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)
downloadast2050-yocto-poky-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
ast2050-yocto-poky-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 0000000..f466164
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/includes-fix.patch
@@ -0,0 +1,42 @@
+Add missing includes required when building with modern toolchain, based on
+patch from Debian bugzilla:
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505954
+
+Should no longer be required once upgraded to 0.7.22 or later.
+
+Index: apt-0.7.14/apt-pkg/acquire.cc
+===================================================================
+--- apt-0.7.14.orig/apt-pkg/acquire.cc 2008-05-28 14:22:13.000000000 +0100
++++ apt-0.7.14/apt-pkg/acquire.cc 2010-07-23 17:30:11.494883936 +0100
+@@ -22,6 +22,7 @@
+
+ #include <apti18n.h>
+
++#include <cstdio>
+ #include <iostream>
+ #include <sstream>
+
+Index: apt-0.7.14/apt-pkg/contrib/sha256.h
+===================================================================
+--- apt-0.7.14.orig/apt-pkg/contrib/sha256.h 2008-05-28 14:22:14.000000000 +0100
++++ apt-0.7.14/apt-pkg/contrib/sha256.h 2010-07-23 17:30:11.494883936 +0100
+@@ -14,6 +14,7 @@
+ #ifndef APTPKG_SHA256_H
+ #define APTPKG_SHA256_H
+
++#include <stdint.h>
+ #include <string>
+ #include <cstring>
+ #include <algorithm>
+Index: apt-0.7.14/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc 2008-05-28 14:22:14.000000000 +0100
++++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc 2010-07-23 17:30:36.960856870 +0100
+@@ -20,6 +20,7 @@
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <sys/select.h>
++#include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #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 0000000..5f3634b
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/no-ko-translation.patch
@@ -0,0 +1,9 @@
+---
+ po/LINGUAS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- apt-0.7.14.orig/po/LINGUAS
++++ apt-0.7.14/po/LINGUAS
+@@ -1 +1 @@
+-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
++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 0000000..682a96d
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/noconfigure.patch
@@ -0,0 +1,35 @@
+---
+ apt-pkg/packagemanager.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- apt-0.6.45exp2.orig/apt-pkg/packagemanager.cc
++++ apt-0.6.45exp2/apt-pkg/packagemanager.cc
+@@ -534,10 +534,12 @@ bool pkgPackageManager::SmartUnPack(PkgI
+
+ List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
+
++#if 0
+ // Perform immedate configuration of the package.
+ if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
+ if (SmartConfigure(Pkg) == false)
+ return _error->Error("Internal Error, Could not perform immediate configuration (2) on %s",Pkg.Name());
++#endif
+
+ return true;
+ }
+@@ -609,6 +611,7 @@ pkgPackageManager::OrderResult pkgPackag
+ DoneSomething = true;
+ }
+
++#if 0
+ // Final run through the configure phase
+ if (ConfigureAll() == false)
+ return Failed;
+@@ -623,6 +626,7 @@ pkgPackageManager::OrderResult pkgPackag
+ return Failed;
+ }
+ }
++#endif
+
+ return Completed;
+ }
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 0000000..db8cf93
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/nodoc.patch
@@ -0,0 +1,19 @@
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- apt-0.7.14.orig/Makefile
++++ apt-0.7.14/Makefile
+@@ -15,11 +15,11 @@ all headers library clean veryclean bina
+ $(MAKE) -C apt-inst $@
+ $(MAKE) -C methods $@
+ $(MAKE) -C cmdline $@
+ $(MAKE) -C ftparchive $@
+ $(MAKE) -C dselect $@
+- $(MAKE) -C doc $@
++# $(MAKE) -C doc $@
+ $(MAKE) -C po $@
+
+ # Some very common aliases
+ .PHONY: maintainer-clean dist-clean distclean pristine sanity
+ 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 0000000..894a697
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-0.7.14/use-host.patch
@@ -0,0 +1,44 @@
+---
+ buildlib/sizetable | 4 +++-
+ configure.in | 2 +-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- apt-0.7.14.orig/buildlib/sizetable
++++ apt-0.7.14/buildlib/sizetable
+@@ -9,16 +9,19 @@
+ #
+ # This is used primarily for the MD5 algorithm.
+ # The format is:-
+ # CPU endian sizeof: char, int, short, long
+ i386 little 1 4 2 4
++i486 little 1 4 2 4
++i586 little 1 4 2 4
++i686 little 1 4 2 4
+ armeb big 1 4 2 4
+ arm little 1 4 2 4
+ alpha little 1 4 2 8
+ mipsel little 1 4 2 4
+ sparc big 1 4 2 4
+ sparc64 big 1 4 2 8
+ m68k big 1 4 2 4
+ powerpc big 1 4 2 4
+ mips big 1 4 2 4
+ hppa big 1 4 2 4
+-m32r big 1 4 2 4
+\ No newline at end of file
++m32r big 1 4 2 4
+--- apt-0.7.14.orig/configure.in
++++ apt-0.7.14/configure.in
+@@ -86,11 +86,11 @@ AC_SUBST(BDBLIB)
+ dnl Converts the ARCH to be something singular for this general CPU family
+ dnl This is often the dpkg architecture string.
+ dnl First check against the full canonical canoncial-system-type in $target
+ dnl and if that fails, just look for the cpu
+ AC_MSG_CHECKING(debian architecture)
+-archset="`dpkg-architecture -qDEB_HOST_ARCH`"
++archset="`echo $host_alias|cut -d'-' -f1`"
+ if test "x$archset" = "x"; then
+ AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
+ fi
+ AC_MSG_RESULT($archset)
+ 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 0000000..b16f99e
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -0,0 +1,63 @@
+require apt.inc
+inherit native
+
+DEPENDS += "dpkg-native gettext-native"
+PACKAGES = ""
+USE_NLS = "yes"
+
+SRC_URI += "file://db_linking_hack.patch"
+
+python do_install () {
+ bb.build.exec_func('do_install_base', d)
+ bb.build.exec_func('do_install_config', d)
+}
+
+python do_install_config () {
+ indir = os.path.dirname(bb.data.getVar('FILE',d,1))
+ infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
+ data = infile.read()
+ infile.close()
+
+ data = bb.data.expand(data, d)
+
+ outdir = os.path.join(bb.data.getVar('D', d, 1), bb.data.getVar('sysconfdir', d, 1), 'apt')
+ if not os.path.exists(outdir):
+ os.makedirs(outdir)
+ outpath = os.path.join(outdir, 'apt.conf.sample')
+
+ outfile = file(outpath, 'w')
+ outfile.write(data)
+ outfile.close()
+}
+
+do_install_base () {
+ install -d ${D}${bindir}
+ install -m 0755 bin/apt-cdrom ${D}${bindir}/
+ install -m 0755 bin/apt-get ${D}${bindir}/
+ install -m 0755 bin/apt-config ${D}${bindir}/
+ install -m 0755 bin/apt-cache ${D}${bindir}/
+ install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
+ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+
+ eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
+ oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
+ ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
+ oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
+ ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
+
+ install -d ${D}${libdir}/apt/methods
+ install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
+
+ install -d ${D}${libdir}/dpkg/methods/apt
+ install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
+ install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
+
+ install -d ${D}${sysconfdir}/apt
+ install -d ${D}${localstatedir}/lib/apt/lists/partial
+ install -d ${D}${localstatedir}/cache/apt/archives/partial
+
+ install -d ${D}${localstatedir}/log/apt/
+}
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 0000000..2f04b72
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native_0.7.14.bb
@@ -0,0 +1,8 @@
+require apt-native.inc
+
+PR = "r3"
+
+SRC_URI += "file://nodoc.patch \
+ file://noconfigure.patch \
+ file://no-curl.patch \
+ 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 0000000..9e104f1
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -0,0 +1,104 @@
+apt-manpages="doc/apt-cache.8 \
+ doc/apt-cdrom.8 \
+ doc/apt-config.8 \
+ doc/apt-get.8 \
+ doc/apt.8 \
+ doc/apt.conf.5 \
+ doc/apt_preferences.5 \
+ doc/fr/apt-cache.fr.8 \
+ doc/fr/apt-cdrom.fr.8 \
+ doc/fr/apt-config.fr.8 \
+ doc/fr/apt-get.fr.8 \
+ doc/fr/apt.conf.fr.5 \
+ doc/fr/apt_preferences.fr.5 \
+ doc/fr/sources.list.fr.5 \
+ doc/es/apt.es.8 \
+ doc/es/apt-cache.es.8 \
+ doc/es/apt-cdrom.es.8 \
+ doc/es/apt-config.es.8 \
+ doc/es/apt-get.es.8 \
+ doc/es/apt.conf.es.5 \
+ doc/es/apt_preferences.es.5 \
+ doc/es/sources.list.es.5 \
+ doc/pt_BR/apt_preferences.pt_BR.5 \
+ doc/ja/apt-cache.ja.8 \
+ doc/ja/apt-cdrom.ja.8 \
+ doc/ja/apt-get.ja.8 \
+ doc/ja/apt.conf.ja.5 \
+ doc/sources.list.5"
+apt-utils-manpages="doc/apt-extracttemplates.1 \
+ doc/apt-sortpkgs.1 \
+ doc/fr/apt-extracttemplates.fr.1 \
+ doc/fr/apt-sortpkgs.fr.1"
+# doc/fr/apt-ftparchive.fr.1
+# doc/apt-ftparchive.1
+
+def get_files_apt_doc(d, bb, manpages):
+ import re
+ manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
+ manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
+ return manpages
+
+def get_commands_apt_doc(d, bb, manpages):
+ import os
+ s = list()
+ __dir_cache__ = list()
+ for m in manpages.split():
+ dest = get_files_apt_doc(d, bb, m)
+ dir = os.path.dirname(dest)
+ if not dir in __dir_cache__:
+ s.append("install -d ${D}/%s" % dir)
+ __dir_cache__.append(dir)
+ s.append("install -m 0644 %s ${D}/%s" % (m, dest))
+ return "\n".join(s)
+
+PACKAGES += "${PN}-utils ${PN}-utils-doc"
+FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
+ ${bindir}/apt-config ${bindir}/apt-cache \
+ ${libdir}/apt ${libdir}/libapt*.so.* \
+ ${localstatedir} ${sysconfdir} \
+ ${libdir}/dpkg"
+FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
+FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} \
+ ${docdir}/apt"
+FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}"
+FILES_${PN}-dev = "${libdir}/libapt*.so"
+
+do_install () {
+ set -x
+ ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))}
+ ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}
+ install -d ${D}${bindir}
+ install -m 0755 bin/apt-cdrom ${D}${bindir}/
+ install -m 0755 bin/apt-get ${D}${bindir}/
+ install -m 0755 bin/apt-config ${D}${bindir}/
+ install -m 0755 bin/apt-cache ${D}${bindir}/
+
+ install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
+ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+
+ eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
+ oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
+ ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
+ oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
+ ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
+
+ install -d ${D}${libdir}/apt/methods
+ install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
+
+ install -d ${D}${libdir}/dpkg/methods/apt
+ install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
+ install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
+ install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
+
+ install -d ${D}${sysconfdir}/apt
+ install -d ${D}${localstatedir}/lib/apt/lists/partial
+ install -d ${D}${localstatedir}/cache/apt/archives/partial
+ install -d ${D}${docdir}/apt/examples
+ install -m 0644 doc/examples/* ${D}${docdir}/apt/examples/
+
+ install -d ${D}${includedir}/apt-pkg/
+ install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
+}
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
new file mode 100644
index 0000000..546683f
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -0,0 +1,26 @@
+DESCRIPTION = "Advanced front-end for dpkg."
+LICENSE = "GPL"
+SECTION = "base"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
+ file://no-ko-translation.patch \
+ file://use-host.patch \
+ "
+
+inherit autotools gettext
+
+EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
+
+# Apt wants to know the glibc version by running a binary file, which will
+# fail, so we have to tell configure which version to use Since I don't know
+# the impliations of setting a wrong value I only provide one for angstrom,
+# which uses glibc 2.5 (which claims to be 2.4)
+# Koen - 20070327
+EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4"
+
+# under Debian it is set to libc6.3 as they use glibc 2.3
+# They also provide glibc 2.5 in 'experimental' and it works with APT built
+# for 2.3 so we set it in same way
+EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3"
+
+FILES_${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 0000000..0ea9b48
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt_0.7.14.bb
@@ -0,0 +1,15 @@
+DEPENDS = "curl db"
+RDEPENDS = "dpkg"
+
+require apt.inc
+
+PR = "r3"
+
+SRC_URI += "file://nodoc.patch \
+ file://includes-fix.patch"
+
+require apt-package.inc
+
+FILES_${PN} += "${bindir}/apt-key"
+apt-manpages += "doc/apt-key.8"
+
diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/files/apt.conf
new file mode 100644
index 0000000..2bd9ddb
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/apt.conf
@@ -0,0 +1,43 @@
+Dir "${STAGING_DIR_NATIVE}/"
+{
+ State "var/lib/apt/"
+ {
+ Lists "lists/";
+ status "${IMAGE_ROOTFS}/var/dpkg/status";
+ };
+ Cache "var/cache/apt/"
+ {
+ Archives "archives/";
+ pkgcache "";
+ srcpkgcache "";
+ };
+ Bin "${STAGING_BINDIR_NATIVE}/"
+ {
+ methods "${STAGING_LIBDIR}/apt/methods/";
+ gzip "/bin/gzip";
+ dpkg "dpkg";
+ dpkg-source "dpkg-source";
+ dpkg-buildpackage "dpkg-buildpackage";
+ apt-get "apt-get";
+ apt-cache "apt-cache";
+ };
+ Etc "etc/apt/"
+ {
+ Preferences "preferences";
+ };
+};
+
+APT
+{
+ Install-Recommends "true";
+ Immediate-Configure "false";
+ Architecture "i586";
+ Get
+ {
+ Assume-Yes "true";
+ Force-Yes "true"
+ };
+};
+
+DPkg::Options {"--root=${IMAGE_ROOTFS}";"--admindir=${IMAGE_ROOTFS}/var/dpkg";"--force-all";"--no-debsig"};
+};
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 0000000..3c8368b
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/db_linking_hack.patch
@@ -0,0 +1,27 @@
+Index: apt-0.7.3/configure.in
+===================================================================
+--- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000
++++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000
+@@ -67,8 +67,20 @@
+ [AC_DEFINE(HAVE_BDB)
+ BDBLIB="-ldb"
+ AC_MSG_RESULT(yes)],
+- [BDBLIB=""
+- AC_MSG_RESULT(no)]
++
++ LIBS="$LIBS -lpthread"
++ [AC_MSG_CHECKING(if we can link against BerkeleyDB with pthread)
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <db.h>],
++ [int r, s, t; db_version(&r, &s, &t);]
++ )],
++ [AC_DEFINE(HAVE_BDB)
++ BDBLIB="-ldb -lpthread"
++ AC_MSG_RESULT(yes)],
++ [BDBLIB=""
++ AC_MSG_RESULT(no)]
++ )]
+ )]
+ )
+
diff --git a/meta/recipes-devtools/apt/files/environment.patch b/meta/recipes-devtools/apt/files/environment.patch
new file mode 100644
index 0000000..5bea1a0
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/environment.patch
@@ -0,0 +1,13 @@
+Index: apt-0.6.46.2/buildlib/environment.mak.in
+===================================================================
+--- apt-0.6.46.2.orig/buildlib/environment.mak.in 2007-03-29 11:38:58.000000000 +0100
++++ apt-0.6.46.2/buildlib/environment.mak.in 2007-03-29 11:39:12.000000000 +0100
+@@ -62,7 +62,7 @@
+
+ # Shared library things
+ HOST_OS = @host_os@
+-ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
++ifneq ($(words $(filter linux-gnu linux-gnueabi gnu% %gnu,$(HOST_OS))),0)
+ SONAME_MAGIC=-Wl,-soname -Wl,
+ LFLAGS_SO=
+ 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 0000000..4e07c8f
--- /dev/null
+++ b/meta/recipes-devtools/apt/files/no-curl.patch
@@ -0,0 +1,44 @@
+---
+ configure.in | 6 ------
+ methods/makefile | 7 -------
+ 2 files changed, 13 deletions(-)
+
+--- apt-0.7.14.orig/configure.in
++++ apt-0.7.14/configure.in
+@@ -84,16 +84,10 @@ AC_CHECK_HEADER(db.h,
+ )]
+ )
+
+ LIBS="$saveLIBS"
+
+-AC_CHECK_LIB(curl, curl_easy_init,
+- [AC_CHECK_HEADER(curl/curl.h,
+- curl_ok=yes,
+- curl_ok=no)],
+- AC_MSG_ERROR([failed: I need CURL due https support]),
+-)
+
+ AC_SUBST(BDBLIB)
+
+ dnl Converts the ARCH to be something singular for this general CPU family
+ dnl This is often the dpkg architecture string.
+--- apt-0.7.14.orig/methods/makefile
++++ apt-0.7.14/methods/makefile
+@@ -50,17 +50,10 @@ PROGRAM=http
+ SLIBS = -lapt-pkg $(SOCKETLIBS)
+ LIB_MAKES = apt-pkg/makefile
+ SOURCE = http.cc rfc2553emu.cc connect.cc
+ include $(PROGRAM_H)
+
+-# The https method
+-PROGRAM=https
+-SLIBS = -lapt-pkg -lcurl
+-LIB_MAKES = apt-pkg/makefile
+-SOURCE = https.cc
+-include $(PROGRAM_H)
+-
+ # The ftp method
+ PROGRAM=ftp
+ SLIBS = -lapt-pkg $(SOCKETLIBS)
+ LIB_MAKES = apt-pkg/makefile
+ 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 0000000..596535b
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoconf-x.patch
@@ -0,0 +1,36 @@
+Index: lib/autoconf/libs.m4
+===================================================================
+RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/libs.m4,v
+retrieving revision 1.13
+diff -p -u -r1.13 libs.m4
+--- autoconf-2.59/lib/autoconf/libs.m4 6 Sep 2005 15:34:06 -0000 1.13
++++ autoconf-2.59/lib/autoconf/libs.m4 18 Sep 2005 17:09:58 -0000
+@@ -265,13 +265,13 @@ ac_x_header_dirs='
+ /usr/openwin/share/include'
+
+ if test "$ac_x_includes" = no; then
+- # Guess where to find include files, by looking for Intrinsic.h.
++ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+- AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
++ AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
+ [# We can compile using X headers with no special include directory.
+ ac_x_includes=],
+ [for ac_dir in $ac_x_header_dirs; do
+- if test -r "$ac_dir/X11/Intrinsic.h"; then
++ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+@@ -284,9 +284,9 @@ if test "$ac_x_libraries" = no; then
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+- LIBS="-lXt $LIBS"
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
+- [XtMalloc (0)])],
++ LIBS="-lX11 $LIBS"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
++ [XrmInitialize ()])],
+ [LIBS=$ac_save_LIBS
+ # We can link X programs with no special library path.
+ 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 0000000..1f18e04
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoheader-nonfatal-warnings.patch
@@ -0,0 +1,13 @@
+--- autoconf-2.59/bin/autoheader.in~ 2003-10-10 14:52:56.000000000 +0100
++++ autoconf-2.59/bin/autoheader.in 2004-05-03 01:36:45.000000000 +0100
+@@ -272,8 +272,8 @@
+ }
+
+ }
+- exit 1
+- if keys %symbol;
++# exit 1
++# if keys %symbol;
+ }
+
+ 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 0000000..fac7483
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-exclude.patch
@@ -0,0 +1,137 @@
+Index: autoconf-2.63/bin/autoreconf.in
+===================================================================
+--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:39:01.000000000 +0000
++++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:43:38.000000000 +0000
+@@ -76,6 +76,7 @@
+ -i, --install copy missing auxiliary files
+ --no-recursive don't rebuild sub-packages
+ -s, --symlink with -i, install symbolic links instead of copies
++ -x, --exclude=STEPS steps we should not run
+ -m, --make when applicable, re-run ./configure && make
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
+
+@@ -136,6 +137,13 @@
+ # Recurse into subpackages
+ my $recursive = 1;
+
++# Steps to exclude
++my @exclude;
++my @ex;
++
++my $uses_gettext;
++my $configure_ac;
++
+ ## ---------- ##
+ ## Routines. ##
+ ## ---------- ##
+@@ -153,6 +161,7 @@
+ 'B|prepend-include=s' => \@prepend_include,
+ 'i|install' => \$install,
+ 's|symlink' => \$symlink,
++ 'x|exclude=s' => \@exclude,
+ 'm|make' => \$run_make,
+ 'recursive!' => \$recursive);
+
+@@ -162,6 +171,8 @@
+ parse_WARNINGS;
+ parse_warnings '--warnings', @warning;
+
++ @exclude = map { split /,/ } @exclude;
++
+ # Even if the user specified a configure.ac, trim to get the
+ # directory, and look for configure.ac again. Because (i) the code
+ # is simpler, and (ii) we are still able to diagnose simultaneous
+@@ -255,6 +266,11 @@
+ {
+ my ($aclocal, $flags) = @_;
+
++ @ex = grep (/^aclocal$/, @exclude);
++ if ($#ex != -1) {
++ return;
++ }
++
+ # aclocal 1.8+ does all this for free. It can be recognized by its
+ # --force support.
+ if ($aclocal_supports_force)
+@@ -368,7 +384,10 @@
+ }
+ else
+ {
+- xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
++ @ex = grep (/^autopoint$/, @exclude);
++ if ($#ex == -1) {
++ xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
++ }
+ }
+
+
+@@ -532,16 +551,17 @@
+ {
+ $libtoolize .= " --ltdl";
+ }
+- xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
+- $rerun_aclocal = 1;
++ @ex = grep (/^libtoolize$/, @exclude);
++ if ($#ex == -1) {
++ xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
++ $rerun_aclocal = 1;
++ }
+ }
+ else
+ {
+ verb "$configure_ac: not running libtoolize: --install not given";
+ }
+
+-
+-
+ # ------------------- #
+ # Rerunning aclocal. #
+ # ------------------- #
+@@ -572,7 +592,10 @@
+ # latter runs the former, and (ii) autoconf is stricter than
+ # autoheader. So all in all, autoconf should give better error
+ # messages.
+- xsystem ($autoconf);
++ @ex = grep (/^autoconf$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$autoconf");
++ }
+
+
+ # -------------------- #
+@@ -593,7 +616,10 @@
+ }
+ else
+ {
+- xsystem ($autoheader);
++ @ex = grep (/^autoheader$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$autoheader");
++ }
+ }
+
+
+@@ -610,7 +636,10 @@
+ # We should always run automake, and let it decide whether it shall
+ # update the file or not. In fact, the effect of `$force' is already
+ # included in `$automake' via `--no-force'.
+- xsystem ($automake);
++ @ex = grep (/^automake$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$automake");
++ }
+ }
+
+
+@@ -634,7 +663,10 @@
+ }
+ else
+ {
+- xsystem ("$make");
++ @ex = grep (/^make$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$make");
++ }
+ }
+ }
+ }
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 0000000..587a823
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-foreign.patch
@@ -0,0 +1,11 @@
+--- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400
++++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400
+@@ -184,6 +184,8 @@
+
+ $aclocal_supports_force = `$aclocal --help` =~ /--force/;
+
++ $automake .= ' --foreign';
++
+ # Dispatch autoreconf's option to the tools.
+ # --include;
+ $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 0000000..851d243
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch
@@ -0,0 +1,37 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: autoconf-2.63/bin/autoreconf.in
+===================================================================
+--- autoconf-2.63.orig/bin/autoreconf.in 2008-12-31 17:43:55.000000000 +0000
++++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:46:16.000000000 +0000
+@@ -58,7 +58,7 @@
+ $help = "Usage: $0 [OPTION]... [DIRECTORY]...
+
+ Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
+-(formerly `gettextize'), and `libtoolize' where appropriate)
++(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate)
+ repeatedly to remake the GNU Build System files in specified
+ DIRECTORIES and their subdirectories (defaulting to `.').
+
+@@ -115,6 +115,7 @@
+ my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
+ my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
+ my $make = $ENV{'MAKE'} || 'make';
++my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize';
+
+ # --install -- as --add-missing in other tools.
+ my $install = 0;
+@@ -644,6 +645,10 @@
+ }
+ }
+
++ @ex = grep (/^gnu-configize$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$gnuconfigize");
++ }
+
+ # -------------- #
+ # 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 0000000..08646c1
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/autoreconf-include.patch
@@ -0,0 +1,12 @@
+Index: autoconf-2.63/bin/autoreconf.in
+===================================================================
+--- autoconf-2.63.orig/bin/autoreconf.in 2008-08-28 03:08:10.000000000 +0100
++++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:38:40.000000000 +0000
+@@ -190,6 +190,7 @@
+ $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
+ $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include);
+ $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
++ $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include);
+
+ # --install and --symlink;
+ 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 0000000..8a90cd3
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/config_site.patch
@@ -0,0 +1,29 @@
+Poky provides a list of site files in CONFIG_SITE whereas autoconf
+only expects one file. This patch changes autoconf to accept a list of
+them.
+
+RP 1/2/10
+
+Index: autoconf-2.65/lib/autoconf/general.m4
+===================================================================
+--- autoconf-2.65.orig/lib/autoconf/general.m4 2010-02-01 12:41:32.329073138 +0000
++++ autoconf-2.65/lib/autoconf/general.m4 2010-02-01 12:41:56.769040799 +0000
+@@ -1863,17 +1863,10 @@
+ m4_define([AC_SITE_LOAD],
+ [# Prefer an explicitly selected file to automatically selected ones.
+ ac_site_file1=NONE
+-ac_site_file2=NONE
+ if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+-elif test "x$prefix" != xNONE; then
+- ac_site_file1=$prefix/share/config.site
+- ac_site_file2=$prefix/etc/config.site
+-else
+- ac_site_file1=$ac_default_prefix/share/config.site
+- ac_site_file2=$ac_default_prefix/etc/config.site
+ fi
+-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
++for ac_site_file in $ac_site_file1
+ do
+ test "x$ac_site_file" = xNONE && continue
+ 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 0000000..bc73571
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/fix_path_xtra.patch
@@ -0,0 +1,118 @@
+We don't build xmkmf so any values returned from it are going to be wrong.
+Using any paths in /usr/ for x headers/libs is a bad idea when cross compiling.
+This patch removes them to stop any confusion.
+
+RP - 20071115
+
+Index: autoconf-2.65/lib/autoconf/libs.m4
+===================================================================
+--- autoconf-2.65.orig/lib/autoconf/libs.m4 2009-10-29 01:53:41.000000000 +0000
++++ autoconf-2.65/lib/autoconf/libs.m4 2010-01-29 13:40:13.000000000 +0000
+@@ -159,53 +159,6 @@
+ # --------------------- #
+
+
+-# _AC_PATH_X_XMKMF
+-# ----------------
+-# Internal subroutine of _AC_PATH_X.
+-# Set ac_x_includes and/or ac_x_libraries.
+-m4_define([_AC_PATH_X_XMKMF],
+-[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
+-rm -f -r conftest.dir
+-if mkdir conftest.dir; then
+- cd conftest.dir
+- cat >Imakefile <<'_ACEOF'
+-incroot:
+- @echo incroot='${INCROOT}'
+-usrlibdir:
+- @echo usrlibdir='${USRLIBDIR}'
+-libdir:
+- @echo libdir='${LIBDIR}'
+-_ACEOF
+- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+- for ac_var in incroot usrlibdir libdir; do
+- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+- done
+- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+- for ac_extension in a so sl dylib la dll; do
+- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+- test -f "$ac_im_libdir/libX11.$ac_extension"; then
+- ac_im_usrlibdir=$ac_im_libdir; break
+- fi
+- done
+- # Screen out bogus values from the imake configuration. They are
+- # bogus both because they are the default anyway, and because
+- # using them would break gcc on systems where it needs fixed includes.
+- case $ac_im_incroot in
+- /usr/include) ac_x_includes= ;;
+- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+- esac
+- case $ac_im_usrlibdir in
+- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+- esac
+- fi
+- cd ..
+- rm -f -r conftest.dir
+-fi
+-])# _AC_PATH_X_XMKMF
+-
+-
+ # _AC_PATH_X_DIRECT
+ # -----------------
+ # Internal subroutine of _AC_PATH_X.
+@@ -213,44 +166,7 @@
+ m4_define([_AC_PATH_X_DIRECT],
+ [# Standard set of common directories for X headers.
+ # Check X11 before X11Rn because it is often a symlink to the current release.
+-ac_x_header_dirs='
+-/usr/X11/include
+-/usr/X11R7/include
+-/usr/X11R6/include
+-/usr/X11R5/include
+-/usr/X11R4/include
+-
+-/usr/include/X11
+-/usr/include/X11R7
+-/usr/include/X11R6
+-/usr/include/X11R5
+-/usr/include/X11R4
+-
+-/usr/local/X11/include
+-/usr/local/X11R7/include
+-/usr/local/X11R6/include
+-/usr/local/X11R5/include
+-/usr/local/X11R4/include
+-
+-/usr/local/include/X11
+-/usr/local/include/X11R7
+-/usr/local/include/X11R6
+-/usr/local/include/X11R5
+-/usr/local/include/X11R4
+-
+-/usr/X386/include
+-/usr/x386/include
+-/usr/XFree86/include/X11
+-
+-/usr/include
+-/usr/local/include
+-/usr/unsupported/include
+-/usr/athena/include
+-/usr/local/x11r5/include
+-/usr/lpp/Xamples/include
+-
+-/usr/openwin/include
+-/usr/openwin/share/include'
++ac_x_header_dirs=''
+
+ if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+@@ -299,7 +215,6 @@
+ [AC_CACHE_VAL(ac_cv_have_x,
+ [# One or both of the vars are not set, and there is no cached value.
+ ac_x_includes=no ac_x_libraries=no
+-_AC_PATH_X_XMKMF
+ _AC_PATH_X_DIRECT
+ case $ac_x_includes,$ac_x_libraries in #(
+ 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 0000000..5f0d055
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/path_prog_fixes.patch
@@ -0,0 +1,126 @@
+Index: autoconf-2.59/bin/autoheader.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoheader.in 2005-03-09 16:27:17.933878952 -0500
++++ autoconf-2.59/bin/autoheader.in 2005-03-09 16:29:57.360642400 -0500
+@@ -1,8 +1,8 @@
+-#! @PERL@
++#! @bindir@/env perl
+ # -*- Perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
+ if 0;
+
+ # autoheader -- create `config.h.in' from `configure.ac'
+Index: autoconf-2.59/bin/autom4te.in
+===================================================================
+--- autoconf-2.59.orig/bin/autom4te.in 2003-10-28 03:48:36.000000000 -0500
++++ autoconf-2.59/bin/autom4te.in 2005-03-09 16:30:14.957967200 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # autom4te - Wrapper around M4 libraries.
+@@ -87,7 +89,7 @@
+ my $freeze = 0;
+
+ # $M4.
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || '@bindir@/env m4';
+ # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
+ fatal "need GNU m4 1.4 or later: $m4"
+ if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
+Index: autoconf-2.59/bin/autoreconf.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoreconf.in 2005-03-09 16:27:17.354966960 -0500
++++ autoconf-2.59/bin/autoreconf.in 2005-03-09 16:31:19.572144352 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # autoreconf - install the GNU Build System in a directory tree
+Index: autoconf-2.59/bin/autoscan.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoscan.in 2003-09-26 08:57:49.000000000 -0400
++++ autoconf-2.59/bin/autoscan.in 2005-03-09 16:30:18.136483992 -0500
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # autoscan - Create configure.scan (a preliminary configure.ac) for a package.
+ # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
+@@ -21,7 +21,9 @@
+
+ # Written by David MacKenzie <djm@gnu.ai.mit.edu>.
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ BEGIN
+Index: autoconf-2.59/bin/autoupdate.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoupdate.in 2003-08-27 07:26:32.000000000 -0400
++++ autoconf-2.59/bin/autoupdate.in 2005-03-09 16:30:19.912214040 -0500
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # autoupdate - modernize an Autoconf file.
+ # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
+@@ -22,7 +22,9 @@
+ # Originally written by David MacKenzie <djm@gnu.ai.mit.edu>.
+ # Rewritten by Akim Demaille <akim@freefriends.org>.
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ BEGIN
+@@ -54,7 +56,7 @@
+ my @include = ('@datadir@');
+ my $force = 0;
+ # m4.
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || '@bindir@/env m4';
+
+
+ # $HELP
+Index: autoconf-2.59/bin/ifnames.in
+===================================================================
+--- autoconf-2.59.orig/bin/ifnames.in 2003-10-10 09:52:56.000000000 -0400
++++ autoconf-2.59/bin/ifnames.in 2005-03-09 16:30:22.656796800 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # 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 0000000..e6f4096
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf-2.65/program_prefix.patch
@@ -0,0 +1,19 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- autoconf-2.57/lib/autoconf/general.m4~program_prefix
++++ autoconf-2.57/lib/autoconf/general.m4
+@@ -1676,8 +1676,9 @@
+ # The aliases save the names the user supplied, while $host etc.
+ # will get canonicalized.
+ test -n "$target_alias" &&
+- test "$program_prefix$program_suffix$program_transform_name" = \
+- NONENONEs,x,x, &&
++ test "$target_alias" != "$host_alias" &&
++ test "$program_prefix$program_suffix$program_transform_name" = \
++ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-[]dnl
+ ])# AC_CANONICAL_TARGET
+
diff --git a/meta/recipes-devtools/autoconf/autoconf.inc b/meta/recipes-devtools/autoconf/autoconf.inc
new file mode 100644
index 0000000..8816a66
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -0,0 +1,12 @@
+DESCRIPTION = "A package of M4 macros to produce scripts to \
+automatically configure sourcecode."
+LICENSE = "GPLv3"
+HOMEPAGE = "http://www.gnu.org/software/autoconf/"
+SECTION = "devel"
+DEPENDS += "m4-native"
+RDEPENDS_${PN} = "m4 gnu-config"
+
+SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2 \
+ file://program_prefix.patch;patch=1"
+
+inherit 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 0000000..5adb975
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf_2.65.bb
@@ -0,0 +1,23 @@
+require autoconf.inc
+
+PR = "r2"
+
+PARALLEL_MAKE = ""
+
+DEPENDS += "m4-native"
+RDEPENDS_${PN} = "m4 gnu-config"
+
+SRC_URI += "file://autoreconf-include.patch;patch=1 \
+ file://autoreconf-exclude.patch;patch=1 \
+ file://autoreconf-foreign.patch;patch=1 \
+ file://autoreconf-gnuconfigize.patch;patch=1 \
+ file://autoheader-nonfatal-warnings.patch;patch=1 \
+ ${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]} \
+ file://config_site.patch;patch=1"
+
+DEPENDS_virtclass-native = "m4-native gnu-config-native"
+RDEPENDS_${PN}_virtclass-native = "m4-native gnu-config-native"
+
+SRC_URI_append_virtclass-native = " file://fix_path_xtra.patch;patch=1"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/automake/automake.inc b/meta/recipes-devtools/automake/automake.inc
new file mode 100644
index 0000000..d68c45d
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake.inc
@@ -0,0 +1,13 @@
+DESCRIPTION = "A tool for automatically generating Makefiles."
+LICENSE = "GPLv2"
+HOMEPAGE = "http://www.gnu.org/software/automake/"
+SECTION = "devel"
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2 "
+
+inherit autotools
+
+export AUTOMAKE = "${@bb.which('automake', bb.data.getVar('PATH', d, 1))}"
+
+FILES_${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 0000000..fb38442
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake/path_prog_fixes.patch
@@ -0,0 +1,67 @@
+---
+ Makefile.am | 3 ++-
+ Makefile.in | 3 ++-
+ aclocal.in | 4 ++--
+ automake.in | 6 ++++--
+ 4 files changed, 10 insertions(+), 6 deletions(-)
+
+Index: automake-1.10.1/Makefile.am
+===================================================================
+--- automake-1.10.1.orig/Makefile.am 2008-01-21 22:28:58.000000000 +0000
++++ automake-1.10.1/Makefile.am 2008-10-10 17:21:20.000000000 +0100
+@@ -75,7 +75,8 @@
+ -e 's,[@]SHELL[@],$(SHELL),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g' \
+ -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
+- -e 's,[@]datadir[@],$(datadir),g'
++ -e 's,[@]datadir[@],$(datadir),g' \
++ -e 's,[@]bindir[@],$(bindir),g'
+
+ ## These files depend on Makefile so they are rebuilt if $(VERSION),
+ ## $(datadir) or other do_subst'ituted variables change.
+Index: automake-1.10.1/Makefile.in
+===================================================================
+--- automake-1.10.1.orig/Makefile.in 2008-01-21 22:29:10.000000000 +0000
++++ automake-1.10.1/Makefile.in 2008-10-10 17:22:21.000000000 +0100
+@@ -185,7 +185,8 @@
+ -e 's,[@]SHELL[@],$(SHELL),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g' \
+ -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
+- -e 's,[@]datadir[@],$(datadir),g'
++ -e 's,[@]datadir[@],$(datadir),g' \
++ -e 's,[@]bindir[@],$(bindir),g'
+
+ WGET = wget
+ WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
+Index: automake-1.10.1/aclocal.in
+===================================================================
+--- automake-1.10.1.orig/aclocal.in 2008-01-21 22:11:41.000000000 +0000
++++ automake-1.10.1/aclocal.in 2008-10-10 17:21:20.000000000 +0100
+@@ -1,8 +1,8 @@
+-#!@PERL@ -w
++#!@bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
+ if 0;
+
+ # aclocal - create aclocal.m4 by scanning configure.ac
+Index: automake-1.10.1/automake.in
+===================================================================
+--- automake-1.10.1.orig/automake.in 2008-01-21 22:11:41.000000000 +0000
++++ automake-1.10.1/automake.in 2008-10-10 17:21:20.000000000 +0100
+@@ -1,8 +1,10 @@
+-#!@PERL@ -w
++#!@bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
+ if 0;
+
+ # 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 0000000..a78b690
--- /dev/null
+++ b/meta/recipes-devtools/automake/automake_1.11.1.bb
@@ -0,0 +1,41 @@
+require automake.inc
+
+DEPENDS_virtclass-native = "autoconf-native"
+
+RDEPENDS_automake += "\
+ autoconf \
+ perl \
+ perl-module-bytes \
+ perl-module-constant \
+ perl-module-cwd \
+ perl-module-data-dumper \
+ perl-module-dynaloader \
+ perl-module-errno \
+ perl-module-exporter-heavy \
+ perl-module-file-basename \
+ perl-module-file-compare \
+ perl-module-file-copy \
+ perl-module-file-glob \
+ perl-module-file-spec-unix \
+ perl-module-file-stat \
+ perl-module-getopt-long \
+ perl-module-io \
+ perl-module-io-file \
+ perl-module-posix \
+ perl-module-strict \
+ perl-module-text-parsewords \
+ perl-module-vars "
+
+RDEPENDS_automake-native = "autoconf-native perl-native-runtime"
+
+PATHFIXPATCH = "file://path_prog_fixes.patch;patch=1"
+PATHFIXPATCH_virtclass-native = ""
+
+SRC_URI += "${PATHFIXPATCH}"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${datadir}
+}
+
+BBCLASSEXTEND = "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 0000000..2623301
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
@@ -0,0 +1,22 @@
+--- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200
++++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200
+@@ -561,7 +561,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
+--- /tmp/configure 2008-06-22 14:17:11.000000000 +0200
++++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200
+@@ -2307,7 +2307,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ 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 0000000..dfe9b18
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
@@ -0,0 +1,18 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+Index: binutils-2.19.51.0.3/opcodes/ppc-dis.c
+===================================================================
+--- binutils-2.19.51.0.3.orig/opcodes/ppc-dis.c 2009-04-16 00:38:45.000000000 -0700
++++ binutils-2.19.51.0.3/opcodes/ppc-dis.c 2009-04-16 00:43:56.000000000 -0700
+@@ -132,6 +132,8 @@
+ | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC
+ | PPC_OPCODE_VSX),
+ 0 },
++ { "pmr", (PPC_OPCODE_PMR),
++ 0 },
+ { "ppc", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
+ 0 },
+ { "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 0000000..61517d1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
@@ -0,0 +1,67 @@
+This is because libdir has a trailing slash which breaks the comparision.
+
+RP 2/1/10
+
+Index: binutils-2.20.1/ltmain.sh
+===================================================================
+--- binutils-2.20.1.orig/ltmain.sh 2009-09-01 00:59:32.000000000 +0800
++++ binutils-2.20.1/ltmain.sh 2010-07-29 09:41:14.000000000 +0800
+@@ -2156,8 +2156,12 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Strip any trailing slash from the destination.
++ func_stripname '' '/' "$libdir"
++ destlibdir=$func_stripname_result
++
+ # Determine the prefix the user has applied to our future dir.
+- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
++ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+@@ -5570,8 +5574,14 @@
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+- dir="$libdir"
+- absdir="$libdir"
++ # Adding 'libdir' from the .la file to our library search paths
++ # breaks crosscompilation horribly. We cheat here and don't add
++ # it, instead adding the path where we found the .la. -CL
++ dir="$abs_ladir"
++ absdir="$abs_ladir"
++ libdir="$abs_ladir"
++ #dir="$libdir"
++ #absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+@@ -5942,8 +5952,6 @@
+ add="$libdir/$linklib"
+ fi
+ else
+- # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+@@ -6089,7 +6097,17 @@
+ fi
+ ;;
+ *)
+- path="-L$absdir/$objdir"
++ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
++ # preferring $objdir. RP 31/04/2008
++ if test -f "$absdir/$objdir/$depdepl" ; then
++ depdepl="$absdir/$objdir/$depdepl"
++ path="-L$absdir/$objdir"
++ elif test -f "$absdir/$depdepl" ; then
++ depdepl="$absdir/$depdepl"
++ path="-L$absdir"
++ else
++ path="-L$absdir/$objdir"
++ fi
+ ;;
+ esac
+ 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 0000000..c71f0ad
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
@@ -0,0 +1,29 @@
+# "-fPIE" always triggers segmentation fault in ld.so.1 on mips platform,
+# which was first saw on dbus-daemon. Below borrow the binutils fix from
+# binutils bugzilla:
+#
+# http://sourceware.org/bugzilla/show_bug.cgi?id=10858
+#
+# Its commit message says:
+# * elfxx-mips.c (mips_elf_create_dynamic_relocation): Use section
+# sym dynindx for relocs against defined syms in PIEs.
+#
+# It's in upstream CVS now (rev 1.267), but not in current release
+#
+# By Kevin Tian <kevin.tian@intel.com>, 2010-07-15
+
+diff --git a/elfxx-mips.c b/elfxx-mips.c
+index 3a1c8ba..f6c2c1c 100644
+--- binutils-2.20.1.orig/bfd/elfxx-mips.c
++++ binutils-2.20.1/bfd/elfxx-mips.c
+@@ -5688,9 +5688,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
+
+ /* We must now calculate the dynamic symbol table index to use
+ in the relocation. */
+- if (h != NULL
+- && (!h->root.def_regular
+- || (info->shared && !info->symbolic && !h->root.forced_local)))
++ if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
+ {
+ indx = h->root.dynindx;
+ 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 0000000..8de04e0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,34 @@
+--- binutils-2.18.orig/configure
++++ binutils-2.18/configure
+@@ -2206,7 +2206,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -2504,7 +2504,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.18.orig/gprof/configure
++++ binutils-2.18/gprof/configure
+@@ -4124,6 +4124,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ 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 0000000..04a7e61
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ 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 0000000..f337611
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ 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 0000000..498651a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ 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 0000000..db838cf
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch
@@ -0,0 +1,38 @@
+Source: Khem Raj <raj.khem@gmail.com>
+Disposition: submit upstream.
+
+Description:
+
+We do not need to have the libtool patch anymore for binutils after
+libtool has been updated upstream it include support for it. However
+for building gas natively on uclibc systems we have to link it with
+-lm so that it picks up missing symbols.
+
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
+floatformat.c:(.text+0x1ec): undefined reference to `frexp'
+floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
+floatformat.c:(.text+0x38a): undefined reference to `ldexp'
+floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
+floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
+collect2: ld returned 1 exit status
+make[4]: *** [as-new] Error 1
+
+Index: binutils-2.17.50/gas/configure.tgt
+===================================================================
+--- binutils-2.17.50.orig/gas/configure.tgt
++++ binutils-2.17.50/gas/configure.tgt
+@@ -408,6 +408,12 @@ case ${generic_target} in
+ *-*-netware) fmt=elf em=netware ;;
+ esac
+
++case ${generic_target} in
++ arm-*-*uclibc*)
++ need_libm=yes
++ ;;
++esac
++
+ case ${cpu_type} in
+ alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
+ bfd_gas=yes
+
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 0000000..4cd9e22
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
+ IREL_IN_PLT=
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++ case "$EMULATION_NAME" in
++ *i386*) LIBPATH_SUFFIX=32 ;;
++ esac
++ ;;
++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 0000000..36a14d7
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
@@ -0,0 +1,20 @@
+don't let the distro compiler point to the wrong installation location
+
+Thanks to RP for helping find the source code causing the issue.
+
+2010/08/13
+Nitin A Kamble <nitin.a.kamble@intel.com>
+Index: binutils-2.20.1/libiberty/Makefile.in
+===================================================================
+--- binutils-2.20.1.orig/libiberty/Makefile.in
++++ binutils-2.20.1/libiberty/Makefile.in
+@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst
+ # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+ # default multilib, so we have to take CFLAGS into account as well,
+ # since it will be passed the multilib flags.
+-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++MULTIOSDIR = ""
+ install_to_libdir: all
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
+ $(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 0000000..4953bc2
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -0,0 +1,16 @@
+inherit cross-canadian
+DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
+EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
+ --program-prefix=${TARGET_PREFIX}"
+
+do_install () {
+ autotools_do_install
+
+ # We're not interested in the libs or headers, these would come from the
+ # nativesdk or target version of the binutils recipe
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -f ${D}${libdir}/libbfd*
+ rm -f ${D}${libdir}/libiberty*
+ rm -f ${D}${libdir}/libopcodes*
+ rm -f ${D}${includedir}/*.h
+}
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 0000000..f4a7a0e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross-canadian.inc
+PR = "r4"
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
new file mode 100644
index 0000000..4eeb658
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -0,0 +1,25 @@
+inherit cross
+PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+
+EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
+ --program-prefix=${TARGET_PREFIX} \
+ --disable-install-libbfd \
+ --disable-werror"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
+}
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 0000000..8c7e4bc
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross.inc
+
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 0000000..8ab1e7f
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb
@@ -0,0 +1,3 @@
+require binutils_csl-arm-2008q1.bb
+require binutils-cross.inc
+PR = "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 0000000..f3bc5bf
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
@@ -0,0 +1,12 @@
+require binutils-cross_${PV}.bb
+
+inherit crosssdk
+
+PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
+
+PR = "r3"
+
+do_configure_prepend () {
+ sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
+}
+
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
new file mode 100644
index 0000000..7a352b5
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -0,0 +1,146 @@
+DESCRIPTION = "A GNU collection of binary utilities"
+HOMEPAGE = "http://www.gnu.org/software/binutils/"
+BUGTRACKER = "http://sourceware.org/bugzilla/"
+SECTION = "devel"
+LICENSE = "GPLv2"
+
+DEPENDS = "flex-native bison-native"
+
+inherit autotools gettext
+
+PACKAGES += "${PN}-symlinks"
+
+FILES_${PN} = " \
+ ${bindir}/${TARGET_PREFIX}* \
+ ${libdir}/lib*-*.so \
+ ${prefix}/${TARGET_SYS}/bin/*"
+
+FILES_${PN}-dev = " \
+ ${includedir} \
+ ${libdir}/*.a \
+ ${libdir}/*.la \
+ ${libdir}/libbfd.so \
+ ${libdir}/libopcodes.so"
+
+FILES_${PN}-symlinks = " \
+ ${bindir}/addr2line \
+ ${bindir}/as \
+ ${bindir}/c++filt \
+ ${bindir}/gprof \
+ ${bindir}/ld \
+ ${bindir}/nm \
+ ${bindir}/objcopy \
+ ${bindir}/objdump \
+ ${bindir}/ranlib \
+ ${bindir}/readelf \
+ ${bindir}/size \
+ ${bindir}/strip"
+
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
+ --enable-install-libbfd \
+ --enable-shared"
+
+EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
+
+# This is necessary due to a bug in the binutils Makefiles
+# EXTRA_OEMAKE = "configure-build-libiberty all"
+
+export AR = "${HOST_PREFIX}ar"
+export AS = "${HOST_PREFIX}as"
+export LD = "${HOST_PREFIX}ld"
+export NM = "${HOST_PREFIX}nm"
+export RANLIB = "${HOST_PREFIX}ranlib"
+export OBJCOPY = "${HOST_PREFIX}objcopy"
+export OBJDUMP = "${HOST_PREFIX}objdump"
+
+export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
+export AS_FOR_TARGET = "${TARGET_PREFIX}as"
+export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
+export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
+export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
+
+export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+export CC_FOR_BUILD = "${BUILD_CC}"
+export CPP_FOR_BUILD = "${BUILD_CPP}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+
+export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+do_configure () {
+ (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
+ oe_runconf
+#
+# must prime config.cache to ensure the build of libiberty
+#
+ mkdir -p ${B}/build-${BUILD_SYS}
+ for i in ${CONFIG_SITE}; do
+ cat $i >> ${B}/build-${BUILD_SYS}/config.cache
+ done
+}
+
+do_install () {
+ autotools_do_install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${D}${libdir}/ldscripts
+
+ # Fix the /usr/${TARGET_SYS}/bin/* links
+ for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
+ rm -f $l
+ ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
+ | tr -s / \
+ | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ done
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ cd ${D}${bindir}
+
+ # Symlinks for ease of running these on the native target
+ for p in ${TARGET_SYS}-* ; do
+ ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
+ done
+
+ rm ${D}${bindir}/ar ${D}${bindir}/strings
+}
+
+do_install_virtclass-native () {
+ autotools_do_install
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ # We only want libiberty, libbfd and libopcodes
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -rf ${D}${prefix}/lib/ldscripts
+ rm -rf ${D}${prefix}/share/info
+ rm -rf ${D}${prefix}/share/locale
+ rm -rf ${D}${prefix}/share/man
+ rmdir ${D}${prefix}/share || :
+ rmdir ${D}/${libdir}/gcc-lib || :
+ rmdir ${D}/${libdir}64/gcc-lib || :
+ rmdir ${D}/${libdir} || :
+ rmdir ${D}/${libdir}64 || :
+}
+
+pkg_postinst_${PN}-symlinks () {
+ update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100
+ update-alternatives --install ${bindir}/strings strings ${TARGET_SYS}-strings 100
+}
+
+
+pkg_prerm_${PN}-symlinks () {
+ update-alternatives --remove ar ${TARGET_SYS}-ar
+ update-alternatives --remove strings ${TARGET_SYS}-strings
+}
+
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 0000000..d5cd985
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_2.20.1.bb
@@ -0,0 +1,37 @@
+require binutils.inc
+
+PR = "r2"
+
+LIC_FILES_CHKSUM="\
+ file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+SRC_URI = "\
+ ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2;name=tarball \
+ file://binutils-uclibc-100-uclibc-conf.patch \
+ file://110-arm-eabi-conf.patch \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch \
+ file://binutils-uclibc-300-006_better_file_error.patch \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
+ file://binutils-uclibc-gas-needs-libm.patch \
+ file://binutils-x86_64_i386_biarch.patch \
+ file://binutils-mips-pie.patch \
+ file://binutils-libtool.patch \
+ file://libiberty_path_fix.patch \
+ "
+
+# powerpc patches
+SRC_URI += "\
+ file://binutils-2.16.1-e300c2c3.patch \
+ "
+
+BBCLASSEXTEND = "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 0000000..dd9b798
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb
@@ -0,0 +1,25 @@
+require binutils.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "\
+ http://www.codesourcery.com/gnu_toolchains/arm/portal/package2553/public/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
+ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
+ file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi-conf.patch;patch=1 \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
+ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
+ file://docs_hack2.patch;patch=1 \
+ "
+
+PV = "2.18+csl-arm-2008q1-126"
+
+S = "${WORKDIR}/binutils-stable"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2008q1-126-arm-none-eabi/binutils-2008q1-126.tar.bz2
+}
+
+addtask 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 0000000..38ef529
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/better_file_error.patch
@@ -0,0 +1,17 @@
+diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c
+--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001
++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001
+@@ -127,6 +127,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ 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 0000000..c1d2ac1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/ld_makefile.patch
@@ -0,0 +1,22 @@
+--- binutils-2.11.90.0.19.orig/ld/Makefile.am
++++ binutils-2.11.90.0.19/ld/Makefile.am
+@@ -19,7 +19,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.11.90.0.19.orig/ld/Makefile.in
++++ binutils-2.11.90.0.19/ld/Makefile.in
+@@ -123,7 +123,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ 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 0000000..90ad732
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/objdump_fix.patch
@@ -0,0 +1,134 @@
+From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005
+Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-binutils at sources dot redhat dot com
+Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000
+Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/binutils/>
+List-Post: <mailto:binutils at sources dot redhat dot com>
+List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: binutils-owner at sources dot redhat dot com
+Delivered-To: mailing list binutils at sources dot redhat dot com
+Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000
+Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94)
+ by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000
+Received: from bgo1sminn1.broadpark.no ([217.13.4.93])
+ by bgo1smout1 dot broadpark dot no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET)
+Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET)
+Date: Tue, 22 Feb 2005 20:24:08 +0100
+From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net>
+Subject: [PATCH] objdump relocation fixes for ARM disassembly
+To: binutils at sources dot redhat dot com
+Message-id: <421B86D8.8080604@users.sourceforge.net>
+MIME-version: 1.0
+Content-type: text/plain; charset=ISO-8859-1; format=flowed
+Content-transfer-encoding: 7BIT
+User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
+
+Hello,
+
+objdump disassembly did not relocate correctly for the ARM processor. It seems
+that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other,
+since octets would always be zero) and all relocations would thus fail. I changed the test
+so the flag is set when we are about to disassemble an insn that the current relocation
+entry points to. I also changed objdump_print_addr to use the current relocation entry if
+the insn has such an entry. This causes the symbol printed to be correct for both external
+symbols (from the undefined section) and local symbols.
+
+This has only been tested for the ARM processor, but I don't think it should break other
+DISASSEMBLER_NEEDS_RELOCS processors either.
+
+
+binutils/
+
+2005-02-22 Stig Petter Olsroed <stigpo@users.sourceforge.net>
+
+ * objdump.c (disassemble_bytes): Fixed relocation check for
+ DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the
+ INSN_HAS_RELOC flag. Set the current relocation entry in
+ objdump_disasm_info to allow printing the proper symbol.
+ (objdump_print_addr): Use the relocation entry in
+ objdump_disasm_info to lookup the correct symbol for
+ DISASSEMBLER_NEEDS_RELOCS platforms.
+
+--- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100
++++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100
+@@ -128,6 +128,7 @@
+ arelent ** dynrelbuf;
+ long dynrelcount;
+ disassembler_ftype disassemble_fn;
++ arelent * reloc;
+ };
+
+ /* Architecture to disassemble for, or default if NULL. */
+@@ -852,6 +853,8 @@
+ {
+ struct objdump_disasm_info *aux;
+ asymbol *sym;
++ arelent *q;
++ int skip_find = 0;
+
+ if (sorted_symcount < 1)
+ {
+@@ -861,6 +864,22 @@
+ }
+
+ aux = (struct objdump_disasm_info *) info->application_data;
++
++ q = aux->reloc;
++ if (q != NULL)
++ {
++ if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL)
++ {
++ /* Adjust the vma to the reloc */
++ vma += bfd_asymbol_value (*q->sym_ptr_ptr);
++ if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr)))
++ {
++ skip_find = 1;
++ sym = *q->sym_ptr_ptr;
++ }
++ }
++ }
++ if (!skip_find)
+ sym = find_symbol_for_address (vma, info, NULL);
+ objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
+ skip_zeroes);
+@@ -1350,16 +1369,22 @@
+ info->bytes_per_chunk = 0;
+
+ #ifdef DISASSEMBLER_NEEDS_RELOCS
+- /* FIXME: This is wrong. It tests the number of octets
+- in the last instruction, not the current one. */
+- if (*relppp < relppend
+- && (**relppp)->address >= rel_offset + addr_offset
+- && ((**relppp)->address
+- < rel_offset + addr_offset + octets / opb))
++ /* Check if the current relocation entry applies to the
++ instruction we are about to disassemble.
++ This works for ARM at least.
++ */
++ if ((*relppp) < relppend
++ && ((**relppp)->address == rel_offset + addr_offset))
++ {
+ info->flags = INSN_HAS_RELOC;
++ aux->reloc = **relppp;
++ }
+ else
+ #endif
++ {
+ info->flags = 0;
++ aux->reloc = NULL;
++ }
+
+ octets = (*disassemble_fn) (section->vma + addr_offset, info);
+ info->fprintf_func = (fprintf_ftype) fprintf;
+
+
+
diff --git a/meta/recipes-devtools/binutils/files/plt32trunc.patch b/meta/recipes-devtools/binutils/files/plt32trunc.patch
new file mode 100644
index 0000000..4990f5d
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/plt32trunc.patch
@@ -0,0 +1,24 @@
+--- binutils/bfd/elf32-arm.h.orig 2004-04-22 22:11:15.000000000 -0400
++++ binutils/bfd/elf32-arm.h 2004-04-22 22:28:37.000000000 -0400
+@@ -2229,6 +2229,8 @@ elf32_arm_relocate_section (output_bfd,
+ case R_ARM_PC24:
+ case R_ARM_ABS32:
+ case R_ARM_THM_PC22:
++ case R_ARM_PLT32:
++
+ if (info->shared
+ && (
+ (!info->symbolic && h->dynindx != -1)
+@@ -2262,11 +2264,6 @@ elf32_arm_relocate_section (output_bfd,
+ relocation = 0;
+ break;
+
+- case R_ARM_PLT32:
+- if (h->plt.offset != (bfd_vma)-1)
+- relocation = 0;
+- break;
+-
+ default:
+ if (unresolved_reloc)
+ _bfd_error_handler
+
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 0000000..b3709da
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/signed_char_fix.patch
@@ -0,0 +1,12 @@
+diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c
+--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001
++++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001
+@@ -1830,7 +1830,7 @@
+ * The function returns the length of this instruction in bytes.
+ */
+
+-static char intel_syntax;
++static signed char intel_syntax;
+ static char open_char;
+ static char close_char;
+ 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 0000000..850ec06
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/fix_cross_manpage_building.patch
@@ -0,0 +1,18 @@
+help2man 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.
+
+Date: 2010/06/28
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+Index: bison-2.4.2/doc/Makefile.am
+===================================================================
+--- bison-2.4.2.orig/doc/Makefile.am
++++ bison-2.4.2/doc/Makefile.am
+@@ -77,7 +77,7 @@ PREPATH = $(top_builddir)/src
+ (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) $$program) || exit; \
+ done
+ @echo "Updating man page $@"
+- PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH"; \
++# PATH="$(PREPATH)$(PATH_SEPARATOR)$$PATH";
+ export PATH; \
+ $(HELP2MAN) \
+ --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 0000000..9332354
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison/m4.patch
@@ -0,0 +1,544 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: bison-2.4.2/m4/lcmessage.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/lcmessage.m4
+@@ -0,0 +1,32 @@
++# lcmessage.m4 serial 3 (gettext-0.11.3)
++dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++dnl
++dnl This file can can be used in projects which are not available under
++dnl the GNU General Public License or the GNU Library General Public
++dnl License but which still want to provide support for the GNU gettext
++dnl functionality.
++dnl Please note that the actual code of the GNU gettext library is covered
++dnl by the GNU Library General Public License, and the rest of the GNU
++dnl gettext package package is covered by the GNU General Public License.
++dnl They are *not* in the public domain.
++
++dnl Authors:
++dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
++
++# Check whether LC_MESSAGES is available in <locale.h>.
++
++AC_DEFUN([AM_LC_MESSAGES],
++[
++ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
++ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
++ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
++ if test $am_cv_val_LC_MESSAGES = yes; then
++ AC_DEFINE(HAVE_LC_MESSAGES, 1,
++ [Define if your <locale.h> file defines LC_MESSAGES.])
++ fi
++])
+Index: bison-2.4.2/m4/uintmax_t.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/uintmax_t.m4
+@@ -0,0 +1,29 @@
++# uintmax_t.m4 serial 6 (gettext-0.11)
++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert.
++
++AC_PREREQ(2.13)
++
++# Define uintmax_t to `unsigned long' or `unsigned long long'
++# if <inttypes.h> does not exist.
++
++AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
++[
++ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
++ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
++ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
++ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
++ test $ac_cv_type_unsigned_long_long = yes \
++ && ac_type='unsigned long long' \
++ || ac_type='unsigned long'
++ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
++ [Define to unsigned long or unsigned long long
++ if <inttypes.h> and <stdint.h> don't define.])
++ fi
++])
+Index: bison-2.4.2/m4/glibc21.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/glibc21.m4
+@@ -0,0 +1,32 @@
++# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
++dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++# Test for the GNU C Library, version 2.1 or newer.
++# From Bruno Haible.
++
++AC_DEFUN([jm_GLIBC21],
++ [
++ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
++ ac_cv_gnu_library_2_1,
++ [AC_EGREP_CPP([Lucky GNU user],
++ [
++#include <features.h>
++#ifdef __GNU_LIBRARY__
++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
++ Lucky GNU user
++ #endif
++#endif
++ ],
++ ac_cv_gnu_library_2_1=yes,
++ ac_cv_gnu_library_2_1=no)
++ ]
++ )
++ AC_SUBST(GLIBC21)
++ GLIBC21="$ac_cv_gnu_library_2_1"
++ ]
++)
+Index: bison-2.4.2/m4/stdint_h.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/stdint_h.m4
+@@ -0,0 +1,28 @@
++# stdint_h.m4 serial 2 (gettext-0.11.4)
++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert.
++
++# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
++# doesn't clash with <sys/types.h>, and declares uintmax_t.
++
++AC_DEFUN([jm_AC_HEADER_STDINT_H],
++[
++ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
++ [AC_TRY_COMPILE(
++ [#include <sys/types.h>
++#include <stdint.h>],
++ [uintmax_t i = (uintmax_t) -1;],
++ jm_ac_cv_header_stdint_h=yes,
++ jm_ac_cv_header_stdint_h=no)])
++ if test $jm_ac_cv_header_stdint_h = yes; then
++ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
++[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
++ and declares uintmax_t. ])
++ fi
++])
+Index: bison-2.4.2/m4/inttypes_h.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/inttypes_h.m4
+@@ -0,0 +1,28 @@
++# inttypes_h.m4 serial 4 (gettext-0.11.4)
++dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert.
++
++# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
++# doesn't clash with <sys/types.h>, and declares uintmax_t.
++
++AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
++[
++ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
++ [AC_TRY_COMPILE(
++ [#include <sys/types.h>
++#include <inttypes.h>],
++ [uintmax_t i = (uintmax_t) -1;],
++ jm_ac_cv_header_inttypes_h=yes,
++ jm_ac_cv_header_inttypes_h=no)])
++ if test $jm_ac_cv_header_inttypes_h = yes; then
++ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
++[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
++ and declares uintmax_t. ])
++ fi
++])
+Index: bison-2.4.2/m4/ulonglong.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/ulonglong.m4
+@@ -0,0 +1,23 @@
++# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
++dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert.
++
++AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
++[
++ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
++ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
++ [unsigned long long ullmax = (unsigned long long) -1;
++ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
++ ac_cv_type_unsigned_long_long=yes,
++ ac_cv_type_unsigned_long_long=no)])
++ if test $ac_cv_type_unsigned_long_long = yes; then
++ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
++ [Define if you have the unsigned long long type.])
++ fi
++])
+Index: bison-2.4.2/m4/codeset.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/codeset.m4
+@@ -0,0 +1,23 @@
++# codeset.m4 serial AM1 (gettext-0.10.40)
++dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Bruno Haible.
++
++AC_DEFUN([AM_LANGINFO_CODESET],
++[
++ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
++ [AC_TRY_LINK([#include <langinfo.h>],
++ [char* cs = nl_langinfo(CODESET);],
++ am_cv_langinfo_codeset=yes,
++ am_cv_langinfo_codeset=no)
++ ])
++ if test $am_cv_langinfo_codeset = yes; then
++ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
++ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
++ fi
++])
+Index: bison-2.4.2/m4/intdiv0.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/intdiv0.m4
+@@ -0,0 +1,72 @@
++# intdiv0.m4 serial 1 (gettext-0.11.3)
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Bruno Haible.
++
++AC_DEFUN([gt_INTDIV0],
++[
++ AC_REQUIRE([AC_PROG_CC])dnl
++ AC_REQUIRE([AC_CANONICAL_HOST])dnl
++
++ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
++ gt_cv_int_divbyzero_sigfpe,
++ [
++ AC_TRY_RUN([
++#include <stdlib.h>
++#include <signal.h>
++
++static void
++#ifdef __cplusplus
++sigfpe_handler (int sig)
++#else
++sigfpe_handler (sig) int sig;
++#endif
++{
++ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
++ exit (sig != SIGFPE);
++}
++
++int x = 1;
++int y = 0;
++int z;
++int nan;
++
++int main ()
++{
++ signal (SIGFPE, sigfpe_handler);
++/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
++#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
++ signal (SIGTRAP, sigfpe_handler);
++#endif
++/* Linux/SPARC yields signal SIGILL. */
++#if defined (__sparc__) && defined (__linux__)
++ signal (SIGILL, sigfpe_handler);
++#endif
++
++ z = x / y;
++ nan = y / y;
++ exit (1);
++}
++], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
++ [
++ # Guess based on the CPU.
++ case "$host_cpu" in
++ alpha* | i[34567]86 | m68k | s390*)
++ gt_cv_int_divbyzero_sigfpe="guessing yes";;
++ *)
++ gt_cv_int_divbyzero_sigfpe="guessing no";;
++ esac
++ ])
++ ])
++ case "$gt_cv_int_divbyzero_sigfpe" in
++ *yes) value=1;;
++ *) value=0;;
++ esac
++ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
++ [Define if integer division by zero raises signal SIGFPE.])
++])
+Index: bison-2.4.2/m4/glib.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/glib.m4
+@@ -0,0 +1,196 @@
++# Configure paths for GLIB
++# Owen Taylor 97-11-3
++
++dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
++dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
++dnl gthread is specified in MODULES, pass to glib-config
++dnl
++AC_DEFUN(AM_PATH_GLIB,
++[dnl
++dnl Get the cflags and libraries from the glib-config script
++dnl
++AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
++ glib_config_prefix="$withval", glib_config_prefix="")
++AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
++ glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
++AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
++ , enable_glibtest=yes)
++
++ if test x$glib_config_exec_prefix != x ; then
++ glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
++ if test x${GLIB_CONFIG+set} != xset ; then
++ GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
++ fi
++ fi
++ if test x$glib_config_prefix != x ; then
++ glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
++ if test x${GLIB_CONFIG+set} != xset ; then
++ GLIB_CONFIG=$glib_config_prefix/bin/glib-config
++ fi
++ fi
++
++ for module in . $4
++ do
++ case "$module" in
++ gmodule)
++ glib_config_args="$glib_config_args gmodule"
++ ;;
++ gthread)
++ glib_config_args="$glib_config_args gthread"
++ ;;
++ esac
++ done
++
++ AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
++ min_glib_version=ifelse([$1], ,0.99.7,$1)
++ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
++ no_glib=""
++ if test "$GLIB_CONFIG" = "no" ; then
++ no_glib=yes
++ else
++ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
++ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
++ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
++ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
++ glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
++ if test "x$enable_glibtest" = "xyes" ; then
++ ac_save_CFLAGS="$CFLAGS"
++ ac_save_LIBS="$LIBS"
++ CFLAGS="$CFLAGS $GLIB_CFLAGS"
++ LIBS="$GLIB_LIBS $LIBS"
++dnl
++dnl Now check if the installed GLIB is sufficiently new. (Also sanity
++dnl checks the results of glib-config to some extent
++dnl
++ rm -f conf.glibtest
++ AC_TRY_RUN([
++#include <glib.h>
++#include <stdio.h>
++#include <stdlib.h>
++
++int
++main ()
++{
++ int major, minor, micro;
++ char *tmp_version;
++
++ system ("touch conf.glibtest");
++
++ /* HP/UX 9 (%@#!) writes to sscanf strings */
++ tmp_version = g_strdup("$min_glib_version");
++ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
++ printf("%s, bad version string\n", "$min_glib_version");
++ exit(1);
++ }
++
++ if ((glib_major_version != $glib_config_major_version) ||
++ (glib_minor_version != $glib_config_minor_version) ||
++ (glib_micro_version != $glib_config_micro_version))
++ {
++ printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
++ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
++ glib_major_version, glib_minor_version, glib_micro_version);
++ printf ("*** was found! If glib-config was correct, then it is best\n");
++ printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
++ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
++ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
++ printf("*** required on your system.\n");
++ printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
++ printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
++ printf("*** before re-running configure\n");
++ }
++ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
++ (glib_minor_version != GLIB_MINOR_VERSION) ||
++ (glib_micro_version != GLIB_MICRO_VERSION))
++ {
++ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
++ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
++ printf("*** library (version %d.%d.%d)\n",
++ glib_major_version, glib_minor_version, glib_micro_version);
++ }
++ else
++ {
++ if ((glib_major_version > major) ||
++ ((glib_major_version == major) && (glib_minor_version > minor)) ||
++ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
++ {
++ return 0;
++ }
++ else
++ {
++ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
++ glib_major_version, glib_minor_version, glib_micro_version);
++ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
++ major, minor, micro);
++ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
++ printf("***\n");
++ printf("*** If you have already installed a sufficiently new version, this error\n");
++ printf("*** probably means that the wrong copy of the glib-config shell script is\n");
++ printf("*** being found. The easiest way to fix this is to remove the old version\n");
++ printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
++ printf("*** correct copy of glib-config. (In this case, you will have to\n");
++ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
++ printf("*** so that the correct libraries are found at run-time))\n");
++ }
++ }
++ return 1;
++}
++],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ fi
++ fi
++ if test "x$no_glib" = x ; then
++ AC_MSG_RESULT(yes)
++ ifelse([$2], , :, [$2])
++ else
++ AC_MSG_RESULT(no)
++ if test "$GLIB_CONFIG" = "no" ; then
++ echo "*** The glib-config script installed by GLIB could not be found"
++ echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
++ echo "*** your path, or set the GLIB_CONFIG environment variable to the"
++ echo "*** full path to glib-config."
++ else
++ if test -f conf.glibtest ; then
++ :
++ else
++ echo "*** Could not run GLIB test program, checking why..."
++ CFLAGS="$CFLAGS $GLIB_CFLAGS"
++ LIBS="$LIBS $GLIB_LIBS"
++ AC_TRY_LINK([
++#include <glib.h>
++#include <stdio.h>
++], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
++ [ echo "*** The test program compiled, but did not run. This usually means"
++ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
++ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
++ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
++ echo "*** to the installed location Also, make sure you have run ldconfig if that"
++ echo "*** is required on your system"
++ echo "***"
++ echo "*** If you have an old version installed, it is best to remove it, although"
++ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
++ echo "***"
++ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
++ echo "*** came with the system with the command"
++ echo "***"
++ echo "*** rpm --erase --nodeps gtk gtk-devel" ],
++ [ echo "*** The test program failed to compile or link. See the file config.log for the"
++ echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
++ echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
++ echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
++ CFLAGS="$ac_save_CFLAGS"
++ LIBS="$ac_save_LIBS"
++ fi
++ fi
++ GLIB_CFLAGS=""
++ GLIB_LIBS=""
++ ifelse([$3], , :, [$3])
++ fi
++ AC_SUBST(GLIB_CFLAGS)
++ AC_SUBST(GLIB_LIBS)
++ rm -f conf.glibtest
++])
+Index: bison-2.4.2/m4/isc-posix.m4
+===================================================================
+--- /dev/null
++++ bison-2.4.2/m4/isc-posix.m4
+@@ -0,0 +1,26 @@
++# isc-posix.m4 serial 2 (gettext-0.11.2)
++dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
++
++# This test replaces the one in autoconf.
++# Currently this macro should have the same name as the autoconf macro
++# because gettext's gettext.m4 (distributed in the automake package)
++# still uses it. Otherwise, the use in gettext.m4 makes autoheader
++# give these diagnostics:
++# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
++# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
++
++undefine([AC_ISC_POSIX])
++
++AC_DEFUN([AC_ISC_POSIX],
++ [
++ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
++ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
++ ]
++)
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 0000000..1d053cf
--- /dev/null
+++ b/meta/recipes-devtools/bison/bison_2.4.2.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "GNU Project parser generator (yacc replacement)."
+HOMEPAGE = "http://www.gnu.org/software/bison/"
+LICENSE = "GPL"
+SECTION = "devel"
+PRIORITY = "optional"
+DEPENDS = "gettext bison-native"
+
+PR = "r0"
+
+BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
+ file://m4.patch;patch=1"
+
+SRC_URI = "${BASE_SRC_URI} \
+ file://fix_cross_manpage_building.patch "
+
+DEPENDS_virtclass-native = "gettext-native"
+SRC_URI_virtclass-native = "${BASE_SRC_URI}"
+
+inherit autotools
+acpaths = "-I ${S}/m4"
+
+BBCLASSEXTEND = "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 0000000..0b9b892
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native/glibc-conflict-rename.patch
@@ -0,0 +1,228 @@
+Index: cdrtools-2.01/include/schily.h
+===================================================================
+--- cdrtools-2.01.orig/include/schily.h 2009-06-18 11:30:45.000000000 +0100
++++ cdrtools-2.01/include/schily.h 2009-06-18 11:31:22.000000000 +0100
+@@ -108,7 +108,7 @@
+ /* 6th arg not const, fexecv forces av[ac] = NULL */
+ extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
+ char **));
+-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
++extern int fexecve_schily __PR((const char *, FILE *, FILE *, FILE *,
+ char * const *, char * const *));
+ extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
+ extern int fspawnl __PR((FILE *, FILE *, FILE *,
+@@ -187,7 +187,7 @@
+ extern char *findbytes __PR((const void *, int, char));
+ extern int findline __PR((const char *, char, const char *,
+ int, char **, int));
+-extern int getline __PR((char *, int));
++extern int getline_schily __PR((char *, int));
+ extern int getstr __PR((char *, int));
+ extern int breakline __PR((char *, char, char **, int));
+ extern int getallargs __PR((int *, char * const**, const char *, ...));
+Index: cdrtools-2.01/libscg/scsitransp.c
+===================================================================
+--- cdrtools-2.01.orig/libscg/scsitransp.c 2009-06-18 11:33:57.000000000 +0100
++++ cdrtools-2.01/libscg/scsitransp.c 2009-06-18 11:34:24.000000000 +0100
+@@ -323,7 +323,7 @@
+
+ js_printf("%s", msg);
+ flush();
+- if (getline(okbuf, sizeof (okbuf)) == EOF)
++ if (getline_schily(okbuf, sizeof (okbuf)) == EOF)
+ exit(EX_BAD);
+ if (streql(okbuf, "y") || streql(okbuf, "yes") ||
+ streql(okbuf, "Y") || streql(okbuf, "YES"))
+Index: cdrtools-2.01/libschily/fexec.c
+===================================================================
+--- cdrtools-2.01.orig/libschily/fexec.c 2009-06-18 11:29:29.000000000 +0100
++++ cdrtools-2.01/libschily/fexec.c 2009-06-18 11:30:36.000000000 +0100
+@@ -159,7 +159,7 @@
+ } while (p != NULL);
+ va_end(args);
+
+- ret = fexecve(name, in, out, err, av, env);
++ ret = fexecve_schily(name, in, out, err, av, env);
+ if (av != xav)
+ free(av);
+ return (ret);
+@@ -173,11 +173,11 @@
+ char *av[];
+ {
+ av[ac] = NULL; /* force list to be null terminated */
+- return (fexecve(name, in, out, err, av, environ));
++ return (fexecve_schily(name, in, out, err, av, environ));
+ }
+
+ EXPORT int
+-fexecve(name, in, out, err, av, env)
++fexecve_schily(name, in, out, err, av, env)
+ const char *name;
+ FILE *in, *out, *err;
+ char * const av[], * const env[];
+Index: cdrtools-2.01/libschily/stdio/fgetline.c
+===================================================================
+--- cdrtools-2.01.orig/libschily/stdio/fgetline.c 2009-06-18 11:28:14.000000000 +0100
++++ cdrtools-2.01/libschily/stdio/fgetline.c 2009-06-18 11:28:55.000000000 +0100
+@@ -64,7 +64,7 @@
+ }
+
+ EXPORT int
+-getline(buf, len)
++getline_schily(buf, len)
+ char *buf;
+ int len;
+ {
+Index: cdrtools-2.01/readcd/io.c
+===================================================================
+--- cdrtools-2.01.orig/readcd/io.c 2009-06-18 11:33:57.000000000 +0100
++++ cdrtools-2.01/readcd/io.c 2009-06-18 11:34:38.000000000 +0100
+@@ -138,7 +138,7 @@
+ (*prt)(s, *lp, mini, maxi, dp);
+ flush();
+ line[0] = '\0';
+- if (getline(line, 80) == EOF)
++ if (getline_schily(line, 80) == EOF)
+ exit(EX_BAD);
+
+ linep = skipwhite(line);
+@@ -205,7 +205,7 @@
+ printf("%r", form, args);
+ va_end(args);
+ flush();
+- if (getline(okbuf, sizeof(okbuf)) == EOF)
++ if (getline_schily(okbuf, sizeof(okbuf)) == EOF)
+ exit(EX_BAD);
+ if (okbuf[0] == '?') {
+ printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
+Index: cdrtools-2.01/readcd/readcd.c
+===================================================================
+--- cdrtools-2.01.orig/readcd/readcd.c 2009-06-18 11:33:58.000000000 +0100
++++ cdrtools-2.01/readcd/readcd.c 2009-06-18 11:35:03.000000000 +0100
+@@ -1651,7 +1651,7 @@
+ error("Copy from SCSI (%d,%d,%d) disk to file\n",
+ scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
+ error("Enter filename [%s]: ", defname); flush();
+- (void) getline(filename, sizeof (filename));
++ (void) getline_schily(filename, sizeof (filename));
+ }
+
+ if (askrange) {
+@@ -1820,7 +1820,7 @@
+ error("Copy from file to SCSI (%d,%d,%d) disk\n",
+ scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
+ error("Enter filename [%s]: ", defname); flush();
+- (void) getline(filename, sizeof (filename));
++ (void) getline_schily(filename, sizeof (filename));
+ error("Notice: reading from file always starts at file offset 0.\n");
+
+ getlong("Enter starting sector for copy:", &addr, 0L, end-1);
+Index: cdrtools-2.01/scgcheck/dmaresid.c
+===================================================================
+--- cdrtools-2.01.orig/scgcheck/dmaresid.c 2009-06-18 11:33:59.000000000 +0100
++++ cdrtools-2.01/scgcheck/dmaresid.c 2009-06-18 11:35:43.000000000 +0100
+@@ -64,7 +64,7 @@
+ printf("Ready to start test for working DMA residual count? Enter <CR> to continue: ");
+ fprintf(logfile, "**********> Testing for working DMA residual count.\n");
+ flushit();
+- (void) getline(abuf, sizeof (abuf));
++ (void) getline_schily(abuf, sizeof (abuf));
+
+ printf("**********> Testing for working DMA residual count == 0.\n");
+ fprintf(logfile, "**********> Testing for working DMA residual count == 0.\n");
+@@ -95,7 +95,7 @@
+ printf("Ready to start test for working DMA residual count == DMA count? Enter <CR> to continue: ");
+ fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n");
+ flushit();
+- (void) getline(abuf, sizeof (abuf));
++ (void) getline_schily(abuf, sizeof (abuf));
+ passed = TRUE;
+ dmacnt = cnt;
+ ret = xtinquiry(scgp, 0, dmacnt);
+@@ -130,7 +130,7 @@
+ printf("Ready to start test for working DMA residual count == 1? Enter <CR> to continue: ");
+ fprintf(logfile, "**********> Testing for working DMA residual count == 1.\n");
+ flushit();
+- (void) getline(abuf, sizeof (abuf));
++ (void) getline_schily(abuf, sizeof (abuf));
+ passed = TRUE;
+ dmacnt = cnt+1;
+ ret = xtinquiry(scgp, cnt, dmacnt);
+Index: cdrtools-2.01/scgcheck/scgcheck.c
+===================================================================
+--- cdrtools-2.01.orig/scgcheck/scgcheck.c 2009-06-18 11:33:59.000000000 +0100
++++ cdrtools-2.01/scgcheck/scgcheck.c 2009-06-18 11:35:31.000000000 +0100
+@@ -189,7 +189,7 @@
+ break;
+ error("Enter SCSI device name for bus scanning [%s]: ", device);
+ flushit();
+- (void) getline(device, sizeof (device));
++ (void) getline_schily(device, sizeof (device));
+ if (device[0] == '\0')
+ strcpy(device, "0,6,0");
+
+@@ -227,7 +227,7 @@
+ do {
+ error("Enter SCSI device name [%s]: ", device);
+ flushit();
+- (void) getline(device, sizeof (device));
++ (void) getline_schily(device, sizeof (device));
+ if (device[0] == '\0')
+ strcpy(device, "0,6,0");
+
+@@ -256,7 +256,7 @@
+
+ printf("Ready to start test for second SCSI open? Enter <CR> to continue: ");
+ flushit();
+- (void) getline(abuf, sizeof (abuf));
++ (void) getline_schily(abuf, sizeof (abuf));
+ #define CHECK_SECOND_OPEN
+ #ifdef CHECK_SECOND_OPEN
+ if (!streql(abuf, "n")) {
+@@ -344,7 +344,7 @@
+
+ printf("Ready to start test for succeeded command? Enter <CR> to continue: ");
+ flushit();
+- (void) getline(abuf, sizeof (abuf));
++ (void) getline_schily(abuf, sizeof (abuf));
+ scgp->verbose++;
+ ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry));
+ scg_vsetup(scgp);
+Index: cdrtools-2.01/scgcheck/sense.c
+===================================================================
+--- cdrtools-2.01.orig/scgcheck/sense.c 2009-06-18 11:33:58.000000000 +0100
++++ cdrtools-2.01/scgcheck/sense.c 2009-06-18 11:35:54.000000000 +0100
+@@ -66,7 +66,7 @@
+ printf("Ready to start test for failing command? Enter <CR> to continue: ");
+ fprintf(logfile, "**********> Testing for failed SCSI command.\n");
+ flushit();
+- (void)getline(abuf, sizeof(abuf));
++ (void)getline_schily(abuf, sizeof(abuf));
+ /* scgp->verbose++;*/
+ fillbytes(buf, sizeof(struct scsi_inquiry), '\0');
+ fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0');
+@@ -82,13 +82,13 @@
+ printf("the test utility. Otherwise remove any medium from the drive.\n");
+ printf("Ready to start test for failing command? Enter <CR> to continue: ");
+ flushit();
+- (void)getline(abuf, sizeof(abuf));
++ (void)getline_schily(abuf, sizeof(abuf));
+ ret = test_unit_ready(scgp);
+ if (ret >= 0 || !scg_cmd_err(scgp)) {
+ printf("Test Unit Ready did not fail.\n");
+ printf("Ready to eject tray? Enter <CR> to continue: ");
+ flushit();
+- (void)getline(abuf, sizeof(abuf));
++ (void)getline_schily(abuf, sizeof(abuf));
+ scsi_unload(scgp, (cdr_t *)0);
+ ret = test_unit_ready(scgp);
+ }
+@@ -127,7 +127,7 @@
+ printf("Ready to start test for sense data count? Enter <CR> to continue: ");
+ fprintf(logfile, "**********> Testing for SCSI sense data count.\n");
+ flushit();
+- (void)getline(abuf, sizeof(abuf));
++ (void)getline_schily(abuf, sizeof(abuf));
+ printf("Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
+ fprintf(logfile, "**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
+ 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 0000000..0318d31
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native/no_usr_src.patch
@@ -0,0 +1,26 @@
+Index: cdrtools-2.01/DEFAULTS/Defaults.gnu
+===================================================================
+--- cdrtools-2.01.orig/DEFAULTS/Defaults.gnu 2008-09-22 12:42:12.000000000 +0100
++++ cdrtools-2.01/DEFAULTS/Defaults.gnu 2008-09-22 12:42:27.000000000 +0100
+@@ -18,7 +18,7 @@
+ ###########################################################################
+ CWARNOPTS=
+
+-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
++DEFINCDIRS= $(SRCROOT)/include
+ LDPATH= -L/opt/schily/lib
+ RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
+
+Index: cdrtools-2.01/DEFAULTS/Defaults.linux
+===================================================================
+--- cdrtools-2.01.orig/DEFAULTS/Defaults.linux 2008-09-22 12:42:08.000000000 +0100
++++ cdrtools-2.01/DEFAULTS/Defaults.linux 2008-09-22 12:42:37.000000000 +0100
+@@ -18,7 +18,7 @@
+ ###########################################################################
+ CWARNOPTS=
+
+-DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include
++DEFINCDIRS= $(SRCROOT)/include
+ LDPATH= -L/opt/schily/lib
+ RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
+
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 0000000..2421b23
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb
@@ -0,0 +1,24 @@
+# cdrtools-native OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+LICENSE="GPL"
+DESCRIPTION="A set of tools for CD recording, including cdrecord"
+HOMEPAGE="http://cdrecord.berlios.de/old/private/cdrecord.html"
+PR = "r2"
+
+SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/cdrtools-${PV}.tar.bz2 \
+ file://no_usr_src.patch;patch=1 \
+ file://glibc-conflict-rename.patch;patch=1"
+
+inherit native
+
+STAGE_TEMP="${WORKDIR}/image-temp"
+
+do_install() {
+ install -d ${STAGE_TEMP}
+ make install INS_BASE=${STAGE_TEMP}
+
+ install -d ${D}${bindir}/
+ install ${STAGE_TEMP}/bin/* ${D}${bindir}/
+}
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 0000000..38ae2f7
--- /dev/null
+++ b/meta/recipes-devtools/chrpath/chrpath_0.13.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "chrpath allows you to change the rpath (where the application \
+looks for libraries) in an application. It does not (yet) allow you to add an \
+rpath if there isn't one already."
+LICENSE = "GPL"
+PR = "r2"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/c/chrpath/chrpath_${PV}.orig.tar.gz"
+
+inherit autotools
+
+S = "${WORKDIR}/chrpath-${PV}"
+
+# We don't have a staged chrpath-native for ensuring our binary is relocatable
+# so must use the one we've just built
+CHRPATH_BIN_virtclass-native = "${S}/chrpath"
+
+BBCLASSEXTEND = "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 0000000..6175728
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.2.bb
@@ -0,0 +1,4 @@
+CMAKE_MAJOR_VERSION="2.8"
+require cmake.inc
+inherit native
+PR = "r0"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
new file mode 100644
index 0000000..7743847
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -0,0 +1,16 @@
+# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+DESCRIPTION = "A cross-platform, open-source make system"
+HOMEPAGE = "http://www.cmake.org/"
+BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
+SECTION = "console/utils"
+LICENSE = "BSD"
+
+SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz"
+
+inherit autotools
+
+do_configure () {
+ ./configure --prefix=${prefix} || die "./bootstrap failed"
+}
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 0000000..9603982
--- /dev/null
+++ b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.15.bb
@@ -0,0 +1,12 @@
+SECTION = "console/utils"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
+DESCRIPTION = "command line utilities to work with *.desktop files"
+LICENSE = "GPL"
+
+DEPENDS = "glib-2.0-native"
+
+SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.gz"
+
+inherit autotools native
+
+S = "${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 0000000..53d9c1b
--- /dev/null
+++ b/meta/recipes-devtools/diffstat/diffstat_1.47.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
+the insertions, deletions, and modifications per-file. It is useful for \
+reviewing large, complex patch files."
+HOMEPAGE = "http://invisible-island.net/diffstat/"
+PRIORITY = "optional"
+SECTION = "devel"
+DEPENDS = "gettext"
+
+PR = "r0"
+
+# NOTE: The upstream maintainer has a single 'diffstat.tar.gz' for the
+# latest version of the package. It could easily change out from under us.
+# I'd rather rely on debian, and possible have the sources vanish, than risk
+# the sources _changing_ underneith us. -CL
+SRC_URI = "${DEBIAN_MIRROR}/main/d/diffstat/diffstat_${PV}.orig.tar.gz \
+ ${DEBIAN_MIRROR}/main/d/diffstat/diffstat_${PV}-1.diff.gz;apply=yes"
+S = "${WORKDIR}/diffstat-${PV}"
+
+inherit autotools
+
+do_configure () {
+ if [ ! -e acinclude.m4 ]; then
+ mv aclocal.m4 acinclude.m4
+ fi
+ autotools_do_configure
+}
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 0000000..cce2812
--- /dev/null
+++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "distcc is a parallel build system that distributes \
+compilation of C/C++/ObjC code across machines on a network."
+SECTION = "devel"
+LICENSE = "GPLv2"
+PR = "r5"
+
+DEPENDS = "avahi gtk+"
+RRECOMMENDS = "avahi-daemon"
+
+# Upstream change this patch periodically so store locally
+# http://0pointer.de/public/distcc-avahi.patch
+SRC_URI = "http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2 \
+ file://distcc-avahi.patch;patch=1 \
+ file://default \
+ file://distccmon-gnome.desktop \
+ file://distcc"
+
+inherit autotools pkgconfig update-rc.d
+
+INITSCRIPT_NAME = "distcc"
+
+EXTRA_OECONF = " --with-gtk "
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
+ install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
+}
+
+PACKAGES += "distcc-distmon-gnome"
+
+FILES_${PN} = " ${sysconfdir} \
+ ${bindir}/distcc \
+ ${bindir}/distccd \
+ ${bindir}/distccmon-text"
+FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
+ ${datadir}/distcc"
+
+pkg_postinst_${PN} () {
+ if test "x$D" != "x"; then
+ exit 1
+ else
+ grep distcc /etc/passwd || adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup distcc
+ fi
+}
diff --git a/meta/recipes-devtools/distcc/files/default b/meta/recipes-devtools/distcc/files/default
new file mode 100644
index 0000000..95290f8
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/default
@@ -0,0 +1,19 @@
+# Defaults for distcc initscript
+# sourced by /etc/init.d/distcc
+
+#
+# should distcc be started on boot?
+#
+# STARTDISTCC="true"
+
+STARTDISTCC="true"
+
+#
+# Which networks/hosts should be allowed to connect to the daemon?
+# You can list multiple hosts/networks separated by spaces.
+# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
+# Hosts are represented by a single IP Adress
+#
+# ALLOWEDNETS="127.0.0.1"
+
+ALLOWEDNETS="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 0000000..513bc48
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -0,0 +1,106 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: distcc
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: simple distributed compiler client and server
+### END INIT INFO
+#
+# distccd Debian init.d script contributed by Jason Thomas. (Debian #161136)
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/distccd
+NAME=distcc
+DESC="Distributed Compiler Daemon"
+DAEMON_ARGS="--pid-file=/var/run/$NAME.pid --daemon"
+# please change those variables by overriding them in /etc/defaults/distcc
+ALLOWEDNETS="127.0.0.1"
+
+# Reads config file (will override defaults above)
+[ -r /etc/default/distcc ] && . /etc/default/distcc
+
+test -x $DAEMON || exit 0
+
+set -e
+
+# construct access list
+ALLOW=""
+for net in $ALLOWEDNETS
+do
+ ALLOW="$ALLOW --allow $net"
+done
+
+should_start() {
+ if [ "$STARTDISTCC" != "true" ] && [ "$STARTDISTCC" != "YES" ]; then
+ echo "STARTDISTCC is set to false in /etc/default/distcc"
+ echo "$DAEMON not starting"
+ exit 0
+ fi
+}
+
+case "$1" in
+ start)
+ should_start
+ echo -n "Starting $DESC: $NAME"
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
+ {
+ code=$?
+ echo "$0: start failed with error code $code" >&2
+ exit $code
+ }
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON ||
+ {
+ code=$?
+ echo "$0: stop failed with error code $code" >&2
+ exit $code
+ }
+ echo "."
+ ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo -n "Restarting $DESC: $NAME"
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON
+ sleep 1
+ should_start
+ start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
+ {
+ code=$?
+ echo "$0: restart failed with error code $code" >&2
+ exit $code
+ }
+ echo "."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+
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 0000000..1702ea7
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc-avahi.patch
@@ -0,0 +1,1736 @@
+--- upstream/aclocal.m4 1970-01-01 01:00:00.000000000 +0100
++++ lennart/aclocal.m4 2005-11-18 04:19:18.000000000 +0100
+@@ -0,0 +1,171 @@
++# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
++
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005 Free Software Foundation, Inc.
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
++#
++# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that program.
++
++# PKG_PROG_PKG_CONFIG([MIN-VERSION])
++# ----------------------------------
++AC_DEFUN([PKG_PROG_PKG_CONFIG],
++[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
++m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++fi
++if test -n "$PKG_CONFIG"; then
++ _pkg_min_version=m4_default([$1], [0.9.0])
++ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ PKG_CONFIG=""
++ fi
++
++fi[]dnl
++])# PKG_PROG_PKG_CONFIG
++
++# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
++#
++# Check to see whether a particular set of modules exists. Similar
++# to PKG_CHECK_MODULES(), but does not set variables or print errors.
++#
++#
++# Similar to PKG_CHECK_MODULES, make sure that the first instance of
++# this or PKG_CHECK_MODULES is called, or make sure to call
++# PKG_CHECK_EXISTS manually
++# --------------------------------------------------------------
++AC_DEFUN([PKG_CHECK_EXISTS],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
++if test -n "$PKG_CONFIG" && \
++ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
++ m4_ifval([$2], [$2], [:])
++m4_ifvaln([$3], [else
++ $3])dnl
++fi])
++
++
++# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
++# ---------------------------------------------
++m4_define([_PKG_CONFIG],
++[if test -n "$PKG_CONFIG"; then
++ if test -n "$$1"; then
++ pkg_cv_[]$1="$$1"
++ else
++ PKG_CHECK_EXISTS([$3],
++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
++ [pkg_failed=yes])
++ fi
++else
++ pkg_failed=untried
++fi[]dnl
++])# _PKG_CONFIG
++
++# _PKG_SHORT_ERRORS_SUPPORTED
++# -----------------------------
++AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi[]dnl
++])# _PKG_SHORT_ERRORS_SUPPORTED
++
++
++# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
++# [ACTION-IF-NOT-FOUND])
++#
++#
++# Note that if there is a possibility the first call to
++# PKG_CHECK_MODULES might not happen, you should be sure to include an
++# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
++#
++#
++# --------------------------------------------------------------
++AC_DEFUN([PKG_CHECK_MODULES],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
++AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
++AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
++
++pkg_failed=no
++AC_MSG_CHECKING([for $1])
++
++_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
++_PKG_CONFIG([$1][_LIBS], [libs], [$2])
++
++m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
++and $1[]_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.])
++
++if test $pkg_failed = yes; then
++ _PKG_SHORT_ERRORS_SUPPORTED
++ if test $_pkg_short_errors_supported = yes; then
++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
++ else
++ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
++
++ ifelse([$4], , [AC_MSG_ERROR(dnl
++[Package requirements ($2) were not met:
++
++$$1_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++_PKG_TEXT
++])],
++ [$4])
++elif test $pkg_failed = untried; then
++ ifelse([$4], , [AC_MSG_FAILURE(dnl
++[The pkg-config script could not be found or is too old. Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++_PKG_TEXT
++
++To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
++ [$4])
++else
++ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
++ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
++ AC_MSG_RESULT([yes])
++ ifelse([$3], , :, [$3])
++fi[]dnl
++])# PKG_CHECK_MODULES
++
++m4_include([acinclude.m4])
+--- upstream/Makefile.in 2005-11-18 16:15:40.000000000 +0100
++++ lennart/Makefile.in 2005-11-18 01:14:43.000000000 +0100
+@@ -171,6 +171,7 @@
+ src/ssh.o src/state.o src/strip.o \
+ src/timefile.o src/traceenv.o \
+ src/where.o \
++ @ZEROCONF_DISTCC_OBJS@ \
+ $(common_obj)
+
+ distccd_obj = src/access.o \
+@@ -178,6 +179,7 @@
+ src/ncpus.o \
+ src/prefork.o \
+ src/serve.o src/setuid.o src/srvnet.o src/srvrpc.o src/state.o \
++ @ZEROCONF_DISTCCD_OBJS@ \
+ $(common_obj) @BUILD_POPT@
+
+ # Objects that need to be linked in to build monitors
+--- upstream/src/distcc.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/distcc.c 2005-11-18 01:14:43.000000000 +0100
+@@ -83,6 +83,9 @@
+ " COMPILER defaults to \"cc\"\n"
+ " --help explain usage and exit\n"
+ " --version show version and exit\n"
++" --show-hosts show host list and exit\n"
++" -j calculate the concurrency level from\n"
++" the host list.\n"
+ "\n"
+ "Environment variables:\n"
+ " See the manual page for a complete list.\n"
+@@ -135,7 +138,46 @@
+ signal(SIGHUP, &dcc_client_signalled);
+ }
+
++static void dcc_free_hostlist(struct dcc_hostdef *list) {
++ while (list) {
++ struct dcc_hostdef *l = list;
++ list = list->next;
++ dcc_free_hostdef(l);
++ }
++}
++
++static void dcc_show_hosts(void) {
++ struct dcc_hostdef *list, *l;
++ int nhosts;
++
++ if (dcc_get_hostlist(&list, &nhosts) != 0) {
++ rs_log_crit("Failed to get host list");
++ return;
++ }
++
++ for (l = list; l; l = l->next)
++ printf("%s\n", l->hostdef_string);
++
++ dcc_free_hostlist(list);
++}
++
++static void dcc_concurrency_level(void) {
++ struct dcc_hostdef *list, *l;
++ int nhosts;
++ int nslots = 0;
++
++ if (dcc_get_hostlist(&list, &nhosts) != 0) {
++ rs_log_crit("Failed to get host list");
++ return;
++ }
++
++ for (l = list; l; l = l->next)
++ nslots += l->n_slots;
+
++ dcc_free_hostlist(list);
++
++ printf("%i\n", nslots);
++}
+
+ /**
+ * distcc client entry point.
+@@ -182,6 +224,18 @@
+ ret = 0;
+ goto out;
+ }
++
++ if (!strcmp(argv[1], "--show-hosts")) {
++ dcc_show_hosts();
++ ret = 0;
++ goto out;
++ }
++
++ if (!strcmp(argv[1], "-j")) {
++ dcc_concurrency_level();
++ ret = 0;
++ goto out;
++ }
+
+ dcc_find_compiler(argv, &compiler_args);
+ /* compiler_args is now respectively either "cc -c hello.c" or
+--- upstream/src/distcc.h 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/distcc.h 2005-11-18 01:14:43.000000000 +0100
+@@ -112,7 +112,7 @@
+ int *ret_nhosts);
+ int dcc_parse_hosts(const char *where, const char *source_name,
+ struct dcc_hostdef **ret_list,
+- int *ret_nhosts);
++ int *ret_nhosts, struct dcc_hostdef **ret_prev);
+
+ /* ncpu.c */
+ int dcc_ncpus(int *);
+@@ -226,6 +226,7 @@
+ int dcc_make_tmpnam(const char *, const char *suffix, char **);
+
+ int dcc_mkdir(const char *path) WARN_UNUSED;
++int dcc_get_subdir(const char *name, char **path_ret) WARN_UNUSED;
+ int dcc_get_lock_dir(char **path_ret) WARN_UNUSED;
+ int dcc_get_state_dir(char **path_ret) WARN_UNUSED;
+ int dcc_get_top_dir(char **path_ret) WARN_UNUSED;
+--- upstream/src/dopt.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/dopt.c 2005-11-18 04:14:26.000000000 +0100
+@@ -93,6 +93,10 @@
+ opt_log_level
+ };
+
++#ifdef HAVE_AVAHI
++/* Flag for enabling/disabling Zeroconf using Avahi */
++int opt_zeroconf = 0;
++#endif
+
+ const struct poptOption options[] = {
+ { "allow", 'a', POPT_ARG_STRING, 0, 'a', 0, 0 },
+@@ -115,6 +119,9 @@
+ { "verbose", 0, POPT_ARG_NONE, 0, 'v', 0, 0 },
+ { "version", 0, POPT_ARG_NONE, 0, 'V', 0, 0 },
+ { "wizard", 'W', POPT_ARG_NONE, 0, 'W', 0, 0 },
++#ifdef HAVE_AVAHI
++ { "zeroconf", 0, POPT_ARG_NONE, &opt_zeroconf, 0, 0, 0 },
++#endif
+ { 0, 0, 0, 0, 0, 0, 0 }
+ };
+
+@@ -137,6 +144,9 @@
+ " -p, --port PORT TCP port to listen on\n"
+ " --listen ADDRESS IP address to listen on\n"
+ " -a, --allow IP[/BITS] client address access control\n"
++#ifdef HAVE_AVAHI
++" --zeroconf register via mDNS/DNS-SD\n"
++#endif
+ " Debug and trace:\n"
+ " --log-level=LEVEL set detail level for log file\n"
+ " levels: critical, error, warning, notice, info, debug\n"
+--- upstream/src/dopt.h 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/dopt.h 2005-11-18 02:27:45.000000000 +0100
+@@ -38,3 +38,7 @@
+ extern int opt_lifetime;
+ extern char *opt_listen_addr;
+ extern int opt_niceness;
++
++#ifdef HAVE_AVAHI
++extern int opt_zeroconf;
++#endif
+--- upstream/src/dparent.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/dparent.c 2005-11-18 04:13:23.000000000 +0100
+@@ -70,6 +70,7 @@
+ #include "types.h"
+ #include "daemon.h"
+ #include "netutil.h"
++#include "zeroconf.h"
+
+ static void dcc_nofork_parent(int listen_fd) NORETURN;
+ static void dcc_detach(void);
+@@ -94,6 +95,9 @@
+ int listen_fd;
+ int n_cpus;
+ int ret;
++#ifdef HAVE_AVAHI
++ void *avahi = NULL;
++#endif
+
+ if ((ret = dcc_socket_listen(arg_port, &listen_fd, opt_listen_addr)) != 0)
+ return ret;
+@@ -131,6 +135,14 @@
+ /* Don't catch signals until we've detached or created a process group. */
+ dcc_daemon_catch_signals();
+
++#ifdef HAVE_AVAHI
++ /* Zeroconf registration */
++ if (opt_zeroconf) {
++ if (!(avahi = dcc_zeroconf_register((uint16_t) arg_port, n_cpus)))
++ return EXIT_CONNECT_FAILED;
++ }
++#endif
++
+ /* This is called in the master daemon, whether that is detached or
+ * not. */
+ dcc_master_pid = getpid();
+@@ -138,10 +150,21 @@
+ if (opt_no_fork) {
+ dcc_log_daemon_started("non-forking daemon");
+ dcc_nofork_parent(listen_fd);
++ ret = 0;
+ } else {
+ dcc_log_daemon_started("preforking daemon");
+- return dcc_preforking_parent(listen_fd);
++ ret = dcc_preforking_parent(listen_fd);
+ }
++
++#ifdef HAVE_AVAHI
++ /* Remove zeroconf registration */
++ if (opt_zeroconf) {
++ if (dcc_zeroconf_unregister(avahi) != 0)
++ return EXIT_CONNECT_FAILED;
++ }
++#endif
++
++ return ret;
+ }
+
+
+--- upstream/src/help.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/help.c 2005-11-18 02:27:45.000000000 +0100
+@@ -62,6 +62,9 @@
+ "distcc comes with ABSOLUTELY NO WARRANTY. distcc is free software, and\n"
+ "you may use, modify and redistribute it under the terms of the GNU \n"
+ "General Public License version 2 or later.\n"
++#ifdef HAVE_AVAHI
++"\nBuilt with Zeroconf support.\n"
++#endif
+ "\n"
+ ,
+ prog, PACKAGE_VERSION, GNU_HOST, DISTCC_DEFAULT_PORT,
+--- upstream/src/hostfile.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/hostfile.c 2005-11-18 01:14:43.000000000 +0100
+@@ -59,7 +59,7 @@
+ if ((ret = dcc_load_file_string(fname, &body)) != 0)
+ return ret;
+
+- ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts);
++ ret = dcc_parse_hosts(body, fname, ret_list, ret_nhosts, NULL);
+
+ free(body);
+
+--- upstream/src/hosts.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/hosts.c 2005-11-18 02:27:45.000000000 +0100
+@@ -96,6 +96,10 @@
+ #include "hosts.h"
+ #include "exitcode.h"
+ #include "snprintf.h"
++#ifdef HAVE_AVAHI
++#include "zeroconf.h"
++#define ZEROCONF_MAGIC "+zeroconf"
++#endif
+
+ const int dcc_default_port = DISTCC_DEFAULT_PORT;
+
+@@ -134,9 +138,12 @@
+ char *path, *top;
+ int ret;
+
++ *ret_list = NULL;
++ *ret_nhosts = 0;
++
+ if ((env = getenv("DISTCC_HOSTS")) != NULL) {
+ rs_trace("read hosts from environment");
+- return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts);
++ return dcc_parse_hosts(env, "$DISTCC_HOSTS", ret_list, ret_nhosts, NULL);
+ }
+
+ /* $DISTCC_DIR or ~/.distcc */
+@@ -163,7 +170,7 @@
+ rs_trace("not reading %s: %s", path, strerror(errno));
+ free(path);
+ }
+-
++
+ /* FIXME: Clearer message? */
+ rs_log_warning("no hostlist is set; can't distribute work");
+
+@@ -346,17 +353,19 @@
+ **/
+ int dcc_parse_hosts(const char *where, const char *source_name,
+ struct dcc_hostdef **ret_list,
+- int *ret_nhosts)
++ int *ret_nhosts, struct dcc_hostdef **ret_prev)
+ {
+ int ret;
+- struct dcc_hostdef *prev, *curr;
++ struct dcc_hostdef *curr, *_prev;
++
++ if (!ret_prev) {
++ ret_prev = &_prev;
++ _prev = NULL;
++ }
+
+ /* TODO: Check for '/' in places where it might cause trouble with
+ * a lock file name. */
+
+- prev = NULL;
+- *ret_list = NULL;
+- *ret_nhosts = 0;
+ /* A simple, hardcoded scanner. Some of the GNU routines might be
+ * useful here, but they won't work on less capable systems.
+ *
+@@ -390,6 +399,15 @@
+ token_start = where;
+ token_len = strcspn(where, " #\t\n\f\r");
+
++#ifdef HAVE_AVAHI
++ if (token_len == sizeof(ZEROCONF_MAGIC)-1 &&
++ !strncmp(token_start, ZEROCONF_MAGIC, (unsigned) token_len)) {
++ if ((ret = dcc_zeroconf_add_hosts(ret_list, ret_nhosts, 4, ret_prev) != 0))
++ return ret;
++ goto skip;
++ }
++#endif
++
+ /* Allocate new list item */
+ curr = calloc(1, sizeof(struct dcc_hostdef));
+ if (!curr) {
+@@ -404,8 +422,8 @@
+ }
+
+ /* Link into list */
+- if (prev) {
+- prev->next = curr;
++ if (*ret_prev) {
++ (*ret_prev)->next = curr;
+ } else {
+ *ret_list = curr; /* first */
+ }
+@@ -434,10 +452,15 @@
+ return ret;
+ }
+
++ (*ret_nhosts)++;
++ *ret_prev = curr;
++
++#ifdef HAVE_AVAHI
++ skip:
++#endif
++
+ /* continue to next token if any */
+ where = token_start + token_len;
+- prev = curr;
+- (*ret_nhosts)++;
+ }
+
+ if (*ret_nhosts) {
+--- upstream/src/io.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/io.c 2005-11-18 01:14:43.000000000 +0100
+@@ -163,7 +163,7 @@
+ return ret;
+ else
+ continue;
+- } else if (r == -1 && errno == EAGAIN) {
++ } else if (r == -1 && errno == EINTR) {
+ continue;
+ } else if (r == -1) {
+ rs_log_error("failed to read: %s", strerror(errno));
+@@ -205,9 +205,6 @@
+ } else if (r == -1) {
+ rs_log_error("failed to write: %s", strerror(errno));
+ return EXIT_IO_ERROR;
+- } else if (r == 0) {
+- rs_log_error("unexpected eof on fd%d", fd);
+- return EXIT_TRUNCATED;
+ } else {
+ buf = &((char *) buf)[r];
+ len -= r;
+--- upstream/src/tempfile.c 2005-11-18 16:15:40.000000000 +0100
++++ lennart/src/tempfile.c 2005-11-18 01:14:43.000000000 +0100
+@@ -161,7 +161,7 @@
+ * Return a subdirectory of the DISTCC_DIR of the given name, making
+ * sure that the directory exists.
+ **/
+-static int dcc_get_subdir(const char *name,
++int dcc_get_subdir(const char *name,
+ char **dir_ret)
+ {
+ int ret;
+--- upstream/configure.ac 2005-11-18 16:15:40.000000000 +0100
++++ lennart/configure.ac 2005-11-18 04:18:07.000000000 +0100
+@@ -388,6 +388,23 @@
+ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [define if you have struct sockaddr_storage]),,
+ [#include <sys/socket.h>])
+
++dnl check for avahi
++PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6],
++[AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available])
++CFLAGS="$CFLAGS $AVAHI_CFLAGS"
++LIBS="$LIBS $AVAHI_LIBS"
++ZEROCONF_DISTCC_OBJS="src/zeroconf.o"
++ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o"],
++[ZEROCONF_DISTCC_OBJS=""
++ZEROCONF_DISTCCD_OBJS=""])
++AC_SUBST(ZEROCONF_DISTCC_OBJS)
++AC_SUBST(ZEROCONF_DISTCCD_OBJS)
++
++ACX_PTHREAD
++LIBS="$PTHREAD_LIBS $LIBS"
++CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++CC="$PTHREAD_CC"
++
+ dnl ##### Output
+ AC_SUBST(docdir)
+ AC_SUBST(CFLAGS)
+--- upstream/acinclude.m4 1970-01-01 01:00:00.000000000 +0100
++++ lennart/acinclude.m4 2005-11-18 04:17:08.000000000 +0100
+@@ -0,0 +1,235 @@
++dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
++dnl
++dnl This macro figures out how to build C programs using POSIX threads.
++dnl It sets the PTHREAD_LIBS output variable to the threads library and
++dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
++dnl C compiler flags that are needed. (The user can also force certain
++dnl compiler flags/libs to be tested by setting these environment
++dnl variables.)
++dnl
++dnl Also sets PTHREAD_CC to any special C compiler that is needed for
++dnl multi-threaded programs (defaults to the value of CC otherwise).
++dnl (This is necessary on AIX to use the special cc_r compiler alias.)
++dnl
++dnl NOTE: You are assumed to not only compile your program with these
++dnl flags, but also link it with them as well. e.g. you should link
++dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
++dnl $LIBS
++dnl
++dnl If you are only building threads programs, you may wish to use
++dnl these variables in your default LIBS, CFLAGS, and CC:
++dnl
++dnl LIBS="$PTHREAD_LIBS $LIBS"
++dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++dnl CC="$PTHREAD_CC"
++dnl
++dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
++dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
++dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
++dnl
++dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
++dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
++dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
++dnl default action will define HAVE_PTHREAD.
++dnl
++dnl Please let the authors know if this macro fails on any platform, or
++dnl if you have any other suggestions or comments. This macro was based
++dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
++dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
++dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
++dnl We are also grateful for the helpful feedback of numerous users.
++dnl
++dnl @category InstalledPackages
++dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
++dnl @version 2005-01-14
++dnl @license GPLWithACException
++
++AC_DEFUN([ACX_PTHREAD], [
++AC_REQUIRE([AC_CANONICAL_HOST])
++AC_LANG_SAVE
++AC_LANG_C
++acx_pthread_ok=no
++
++# We used to check for pthread.h first, but this fails if pthread.h
++# requires special compiler flags (e.g. on True64 or Sequent).
++# It gets checked for in the link test anyway.
++
++# First of all, check if the user has set any of the PTHREAD_LIBS,
++# etcetera environment variables, and if threads linking works using
++# them:
++if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
++ save_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++ save_LIBS="$LIBS"
++ LIBS="$PTHREAD_LIBS $LIBS"
++ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
++ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
++ AC_MSG_RESULT($acx_pthread_ok)
++ if test x"$acx_pthread_ok" = xno; then
++ PTHREAD_LIBS=""
++ PTHREAD_CFLAGS=""
++ fi
++ LIBS="$save_LIBS"
++ CFLAGS="$save_CFLAGS"
++fi
++
++# We must check for the threads library under a number of different
++# names; the ordering is very important because some systems
++# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
++# libraries is broken (non-POSIX).
++
++# Create a list of thread flags to try. Items starting with a "-" are
++# C compiler flags, and other items are library names, except for "none"
++# which indicates that we try without any flags at all, and "pthread-config"
++# which is a program returning the flags for the Pth emulation library.
++
++acx_pthread_flags="pthreads pthread none -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config"
++
++# The ordering *is* (sometimes) important. Some notes on the
++# individual items follow:
++
++# pthreads: AIX (must check this before -lpthread)
++# none: in case threads are in libc; should be tried before -Kthread and
++# other compiler flags to prevent continual compiler warnings
++# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
++# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
++# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
++# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
++# -pthreads: Solaris/gcc
++# -mthreads: Mingw32/gcc, Lynx/gcc
++# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
++# doesn't hurt to check since this sometimes defines pthreads too;
++# also defines -D_REENTRANT)
++# pthread: Linux, etcetera
++# --thread-safe: KAI C++
++# pthread-config: use pthread-config program (for GNU Pth library)
++
++case "${host_cpu}-${host_os}" in
++ *solaris*)
++
++ # On Solaris (at least, for some versions), libc contains stubbed
++ # (non-functional) versions of the pthreads routines, so link-based
++ # tests will erroneously succeed. (We need to link with -pthread or
++ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
++ # a function called by this macro, so we could check for that, but
++ # who knows whether they'll stub that too in a future libc.) So,
++ # we'll just look for -pthreads and -lpthread first:
++
++ acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
++ ;;
++esac
++
++if test x"$acx_pthread_ok" = xno; then
++for flag in $acx_pthread_flags; do
++
++ case $flag in
++ none)
++ AC_MSG_CHECKING([whether pthreads work without any flags])
++ ;;
++
++ -*)
++ AC_MSG_CHECKING([whether pthreads work with $flag])
++ PTHREAD_CFLAGS="$flag"
++ ;;
++
++ pthread-config)
++ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
++ if test x"$acx_pthread_config" = xno; then continue; fi
++ PTHREAD_CFLAGS="`pthread-config --cflags`"
++ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
++ ;;
++
++ *)
++ AC_MSG_CHECKING([for the pthreads library -l$flag])
++ PTHREAD_LIBS="-l$flag"
++ ;;
++ esac
++
++ save_LIBS="$LIBS"
++ save_CFLAGS="$CFLAGS"
++ LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++
++ # Check for various functions. We must include pthread.h,
++ # since some functions may be macros. (On the Sequent, we
++ # need a special flag -Kthread to make this header compile.)
++ # We check for pthread_join because it is in -lpthread on IRIX
++ # while pthread_create is in libc. We check for pthread_attr_init
++ # due to DEC craziness with -lpthreads. We check for
++ # pthread_cleanup_push because it is one of the few pthread
++ # functions on Solaris that doesn't have a non-functional libc stub.
++ # We try pthread_create on general principles.
++ AC_TRY_LINK([#include <pthread.h>],
++ [pthread_t th; pthread_join(th, 0);
++ pthread_attr_init(0); pthread_cleanup_push(0, 0);
++ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
++ [acx_pthread_ok=yes])
++
++ LIBS="$save_LIBS"
++ CFLAGS="$save_CFLAGS"
++
++ AC_MSG_RESULT($acx_pthread_ok)
++ if test "x$acx_pthread_ok" = xyes; then
++ break;
++ fi
++
++ PTHREAD_LIBS=""
++ PTHREAD_CFLAGS=""
++done
++fi
++
++# Various other checks:
++if test "x$acx_pthread_ok" = xyes; then
++ save_LIBS="$LIBS"
++ LIBS="$PTHREAD_LIBS $LIBS"
++ save_CFLAGS="$CFLAGS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++
++ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
++ AC_MSG_CHECKING([for joinable pthread attribute])
++ attr_name=unknown
++ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
++ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
++ [attr_name=$attr; break])
++ done
++ AC_MSG_RESULT($attr_name)
++ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
++ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
++ [Define to necessary symbol if this constant
++ uses a non-standard name on your system.])
++ fi
++
++ AC_MSG_CHECKING([if more special flags are required for pthreads])
++ flag=no
++ case "${host_cpu}-${host_os}" in
++ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
++ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
++ esac
++ AC_MSG_RESULT(${flag})
++ if test "x$flag" != xno; then
++ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
++ fi
++
++ LIBS="$save_LIBS"
++ CFLAGS="$save_CFLAGS"
++
++ # More AIX lossage: must compile with cc_r
++ AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
++else
++ PTHREAD_CC="$CC"
++fi
++
++AC_SUBST(PTHREAD_LIBS)
++AC_SUBST(PTHREAD_CFLAGS)
++AC_SUBST(PTHREAD_CC)
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$acx_pthread_ok" = xyes; then
++ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
++ :
++else
++ acx_pthread_ok=no
++ $2
++fi
++AC_LANG_RESTORE
++])dnl ACX_PTHREAD
+--- upstream/src/zeroconf.h 1970-01-01 01:00:00.000000000 +0100
++++ lennart/src/zeroconf.h 2005-11-18 04:06:29.000000000 +0100
+@@ -0,0 +1,13 @@
++#ifndef foozeroconfhfoo
++#define foozeroconfhfoo
++
++#include <inttypes.h>
++
++int dcc_zeroconf_add_hosts(struct dcc_hostdef **re_list, int *ret_nhosts, int slots, struct dcc_hostdef **ret_prev);
++
++void * dcc_zeroconf_register(uint16_t port, int n_cpus);
++int dcc_zeroconf_unregister(void*);
++
++#define DCC_DNS_SERVICE_TYPE "_distcc._tcp"
++
++#endif
+--- upstream/src/zeroconf.c 1970-01-01 01:00:00.000000000 +0100
++++ lennart/src/zeroconf.c 2005-11-18 15:51:45.000000000 +0100
+@@ -0,0 +1,602 @@
++/* -*- c-file-style: "java"; indent-tabs-mode: nil -*- */
++
++#include "config.h"
++
++#include <assert.h>
++#include <stdio.h>
++#include <sys/select.h>
++#include <signal.h>
++#include <sys/file.h>
++#include <sys/time.h>
++#include <time.h>
++#include <sys/stat.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <limits.h>
++
++#include <avahi-common/domain.h>
++#include <avahi-common/error.h>
++#include <avahi-common/malloc.h>
++#include <avahi-common/address.h>
++#include <avahi-common/simple-watch.h>
++#include <avahi-client/lookup.h>
++
++#include "distcc.h"
++#include "hosts.h"
++#include "zeroconf.h"
++#include "trace.h"
++#include "exitcode.h"
++
++/* How long shall the background daemon be idle before i terminates itself? */
++#define MAX_IDLE_TIME 20
++
++/* Maxium size of host file to load */
++#define MAX_FILE_SIZE (1024*100)
++
++/* General daemon data */
++struct daemon_data {
++ struct host *hosts;
++ int fd;
++ int n_slots;
++
++ AvahiClient *client;
++ AvahiServiceBrowser *browser;
++ AvahiSimplePoll *simple_poll;
++};
++
++/* Zeroconf service wrapper */
++struct host {
++ struct daemon_data *daemon_data;
++ struct host *next;
++
++ AvahiIfIndex interface;
++ AvahiProtocol protocol;
++ char *service;
++ char *domain;
++
++ AvahiAddress address;
++ uint16_t port;
++ int n_cpus;
++
++ AvahiServiceResolver *resolver;
++};
++
++/* A generic, system independant lock routine, similar to sys_lock,
++ * but more powerful:
++ * rw: if non-zero: r/w lock instead of r/o lock
++ * enable: lock or unlock
++ * block: block when locking */
++static int generic_lock(int fd, int rw, int enable, int block) {
++#if defined(F_SETLK)
++ struct flock lockparam;
++
++ lockparam.l_type = enable ? (rw ? F_WRLCK : F_RDLCK) : F_UNLCK;
++ lockparam.l_whence = SEEK_SET;
++ lockparam.l_start = 0;
++ lockparam.l_len = 0; /* whole file */
++
++ return fcntl(fd, block ? F_SETLKW : F_SETLK, &lockparam);
++#elif defined(HAVE_FLOCK)
++ return flock(fd, (enable ? (rw ? LOCK_EX : LOCK_SH) : LOCK_UN) | (block ? LOCK_NB : 0));
++#elif defined(HAVE_LOCKF)
++ return lockf(fd, (enable ? (block ? F_LOCK : F_TLOCK) : F_ULOCK));
++#else
++# error "No supported lock method. Please port this code."
++#endif
++}
++
++/* Return the number of seconds, when the specified file was last
++ * read. If the atime of that file is < clip_time, use clip_time
++ * instead */
++static time_t fd_last_used(int fd, time_t clip_time) {
++ struct stat st;
++ time_t now, ft;
++ assert(fd >= 0);
++
++ if (fstat(fd, &st) < 0) {
++ rs_log_crit("fstat() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if ((now = time(NULL)) == (time_t) -1) {
++ rs_log_crit("time() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ ft = clip_time ? (st.st_atime < clip_time ? clip_time : st.st_atime) : st.st_atime;
++ assert(ft <= now);
++
++ return now - ft;
++}
++
++/* Write host data to host file */
++static int write_hosts(struct daemon_data *d) {
++ struct host *h;
++ int r = 0;
++ assert(d);
++
++ rs_log_info("writing zeroconf data.\n");
++
++ if (generic_lock(d->fd, 1, 1, 1) < 0) {
++ rs_log_crit("lock failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if (lseek(d->fd, 0, SEEK_SET) < 0) {
++ rs_log_crit("lseek() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ if (ftruncate(d->fd, 0) < 0) {
++ rs_log_crit("ftruncate() failed: %s\n", strerror(errno));
++ return -1;
++ }
++
++ for (h = d->hosts; h; h = h->next) {
++ char t[256], a[AVAHI_ADDRESS_STR_MAX];
++
++ if (h->resolver)
++ /* Not yet fully resolved */
++ continue;
++
++ snprintf(t, sizeof(t), "%s:%u/%i\n", avahi_address_snprint(a, sizeof(a), &h->address), h->port, d->n_slots * h->n_cpus);
++
++ if (dcc_writex(d->fd, t, strlen(t)) != 0) {
++ rs_log_crit("write() failed: %s\n", strerror(errno));
++ goto finish;
++ }
++ }
++
++ r = 0;
++
++finish:
++
++ generic_lock(d->fd, 1, 0, 1);
++ return r;
++
++};
++
++/* Free host data */
++static void free_host(struct host *h) {
++ assert(h);
++
++ if (h->resolver)
++ avahi_service_resolver_free(h->resolver);
++
++ free(h->service);
++ free(h->domain);
++ free(h);
++}
++
++/* Remove a service from the host list */
++static void remove_service(struct daemon_data *d, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *domain) {
++ struct host *h, *p = NULL;
++ assert(d);
++
++ for (h = d->hosts; h; h = h->next) {
++ if (h->interface == interface &&
++ h->protocol == protocol &&
++ !strcmp(h->service, name) &&
++ avahi_domain_equal(h->domain, domain)) {
++
++ if (p)
++ p->next = h->next;
++ else
++ d->hosts = h->next;
++
++ free_host(h);
++
++ break;
++ } else
++ p = h;
++ }
++}
++
++/* Called when a resolve call completes */
++static void resolve_reply(AvahiServiceResolver *UNUSED(r),
++ AvahiIfIndex UNUSED(interface),
++ AvahiProtocol UNUSED(protocol),
++ AvahiResolverEvent event,
++ const char *name,
++ const char *UNUSED(type),
++ const char *UNUSED(domain),
++ const char *UNUSED(host_name),
++ const AvahiAddress *a,
++ uint16_t port,
++ AvahiStringList *txt,
++ AvahiLookupResultFlags UNUSED(flags),
++ void *userdata) {
++
++ struct host *h = userdata;
++
++ switch (event) {
++
++ case AVAHI_RESOLVER_FOUND: {
++ AvahiStringList *i;
++
++ /* Look for the number of CPUs in TXT RRs */
++ for (i = txt; i; i = i->next) {
++ char *key, *value;
++
++ if (avahi_string_list_get_pair(i, &key, &value, NULL) < 0)
++ continue;
++
++ if (!strcmp(key, "cpus"))
++ if ((h->n_cpus = atoi(value)) <= 0)
++ h->n_cpus = 1;
++
++ avahi_free(key);
++ avahi_free(value);
++ }
++
++ h->address = *a;
++ h->port = port;
++
++ avahi_service_resolver_free(h->resolver);
++ h->resolver = NULL;
++
++ /* Write modified hosts file */
++ write_hosts(h->daemon_data);
++
++ break;
++ }
++
++ case AVAHI_RESOLVER_FAILURE:
++
++ rs_log_warning("Failed to resolve service '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(h->daemon_data->client)));
++
++ free_host(h);
++ break;
++ }
++
++}
++
++/* Called whenever a new service is found or removed */
++static void browse_reply(AvahiServiceBrowser *UNUSED(b),
++ AvahiIfIndex interface,
++ AvahiProtocol protocol,
++ AvahiBrowserEvent event,
++ const char *name,
++ const char *type,
++ const char *domain,
++ AvahiLookupResultFlags UNUSED(flags),
++ void *userdata) {
++
++ struct daemon_data *d = userdata;
++ assert(d);
++
++ switch (event) {
++ case AVAHI_BROWSER_NEW: {
++ struct host *h;
++
++ h = malloc(sizeof(struct host));
++ assert(h);
++
++ rs_log_info("new service: %s\n", name);
++
++ if (!(h->resolver = avahi_service_resolver_new(d->client,
++ interface,
++ protocol,
++ name,
++ type,
++ domain,
++ AVAHI_PROTO_UNSPEC,
++ 0,
++ resolve_reply,
++ h))) {
++ rs_log_warning("Failed to create service resolver for '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(d->client)));
++
++ free(h);
++
++ } else {
++
++ /* Fill in missing data */
++ h->service = strdup(name);
++ assert(h->service);
++ h->domain = strdup(domain);
++ assert(h->domain);
++ h->daemon_data = d;
++ h->interface = interface;
++ h->protocol = protocol;
++ h->next = d->hosts;
++ h->n_cpus = 1;
++ d->hosts = h;
++ }
++
++ break;
++ }
++
++ case AVAHI_BROWSER_REMOVE:
++
++ rs_log_info("Removed service: %s\n", name);
++
++ remove_service(d, interface, protocol, name, domain);
++ write_hosts(d);
++ break;
++
++ case AVAHI_BROWSER_FAILURE:
++ rs_log_crit("Service Browser failure '%s': %s\n", name,
++ avahi_strerror(avahi_client_errno(d->client)));
++
++ avahi_simple_poll_quit(d->simple_poll);
++ break;
++
++ case AVAHI_BROWSER_CACHE_EXHAUSTED:
++ case AVAHI_BROWSER_ALL_FOR_NOW:
++ ;
++
++ }
++}
++
++static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
++ struct daemon_data *d = userdata;
++
++ switch (state) {
++
++ case AVAHI_CLIENT_FAILURE:
++ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
++ avahi_simple_poll_quit(d->simple_poll);
++ break;
++
++ case AVAHI_CLIENT_S_COLLISION:
++ case AVAHI_CLIENT_S_REGISTERING:
++ case AVAHI_CLIENT_S_RUNNING:
++ case AVAHI_CLIENT_CONNECTING:
++ ;
++ }
++}
++
++/* The main function of the background daemon */
++static void daemon_proc(const char *host_file, const char *lock_file, int n_slots) {
++ int ret = 1;
++ int lock_fd = -1;
++ struct daemon_data d;
++ time_t clip_time;
++ int error;
++
++ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
++
++ /* Prepare daemon data structure */
++ d.fd = -1;
++ d.hosts = NULL;
++ d.n_slots = n_slots;
++ d.simple_poll = NULL;
++ d.browser = NULL;
++ d.client = NULL;
++ clip_time = time(NULL);
++
++ rs_log_info("Zeroconf daemon running.\n");
++
++ /* Open daemon lock file and lock it */
++ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
++ goto finish;
++ }
++
++ if (generic_lock(lock_fd, 1, 1, 0) < 0) {
++ /* lock failed, there's probably already another daemon running */
++ goto finish;
++ }
++
++ /* Open host file */
++ if ((d.fd = open(host_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
++ goto finish;
++ }
++
++ /* Clear host file */
++ write_hosts(&d);
++
++ if (!(d.simple_poll = avahi_simple_poll_new())) {
++ rs_log_crit("Failed to create simple poll object.\n");
++ goto finish;
++ }
++
++ if (!(d.client = avahi_client_new(avahi_simple_poll_get(d.simple_poll),
++ 0,
++ client_callback,
++ &d,
++ &error))) {
++ rs_log_crit("Failed to create Avahi client object: %s\n", avahi_strerror(error));
++ goto finish;
++ }
++
++ if (!(d.browser = avahi_service_browser_new(d.client,
++ AVAHI_IF_UNSPEC,
++ AVAHI_PROTO_UNSPEC,
++ DCC_DNS_SERVICE_TYPE,
++ NULL,
++ 0,
++ browse_reply,
++ &d))) {
++ rs_log_crit("Failed to create service browser object: %s\n", avahi_strerror(avahi_client_errno(d.client)));
++ goto finish;
++ }
++
++ /* Check whether the host file has been used recently */
++ while (fd_last_used(d.fd, clip_time) <= MAX_IDLE_TIME) {
++
++ /* Iterate the main loop for 500ms */
++ if (avahi_simple_poll_iterate(d.simple_poll, 500) != 0) {
++ rs_log_crit("Event loop exited abnormaly.\n");
++ goto finish;
++ }
++ }
++
++ /* Wer are idle */
++ rs_log_info("Zeroconf daemon unused.\n");
++
++ ret = 0;
++
++finish:
++
++ /* Cleanup */
++ if (lock_fd >= 0) {
++ generic_lock(lock_fd, 1, 0, 0);
++ close(lock_fd);
++ }
++
++ if (d.fd >= 0)
++ close(d.fd);
++
++ while (d.hosts) {
++ struct host *h = d.hosts;
++ d.hosts = d.hosts->next;
++ free_host(h);
++ }
++
++ if (d.client)
++ avahi_client_free(d.client);
++
++ if (d.simple_poll)
++ avahi_simple_poll_free(d.simple_poll);
++
++ rs_log_info("zeroconf daemon ended.\n");
++
++ _exit(ret);
++}
++
++/* Return path to the zeroconf directory in ~/.distcc */
++static int get_zeroconf_dir(char **dir_ret) {
++ static char *cached;
++ int ret;
++
++ if (cached) {
++ *dir_ret = cached;
++ return 0;
++ } else {
++ ret = dcc_get_subdir("zeroconf", dir_ret);
++ if (ret == 0)
++ cached = *dir_ret;
++ return ret;
++ }
++}
++
++/* Get the host list from zeroconf */
++int dcc_zeroconf_add_hosts(struct dcc_hostdef **ret_list, int *ret_nhosts, int n_slots, struct dcc_hostdef **ret_prev) {
++ char host_file[PATH_MAX], lock_file[PATH_MAX], *s = NULL;
++ int lock_fd = -1, host_fd = -1;
++ int fork_daemon = 0;
++ int r = -1;
++ char *dir;
++ struct stat st;
++
++ if (get_zeroconf_dir(&dir) != 0) {
++ rs_log_crit("failed to get zeroconf dir.\n");
++ goto finish;
++ }
++
++ snprintf(lock_file, sizeof(lock_file), "%s/lock", dir);
++ snprintf(host_file, sizeof(host_file), "%s/hosts", dir);
++
++ /* Open lock file */
++ if ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", lock_file, strerror(errno));
++ goto finish;
++ }
++
++ /* Try to lock the lock file */
++ if (generic_lock(lock_fd, 1, 1, 0) >= 0) {
++ /* The lock succeeded => there's no daemon running yet! */
++ fork_daemon = 1;
++ generic_lock(lock_fd, 1, 0, 0);
++ }
++
++ close(lock_fd);
++
++ /* Shall we fork a new daemon? */
++ if (fork_daemon) {
++ pid_t pid;
++
++ rs_log_info("Spawning zeroconf daemon.\n");
++
++ if ((pid = fork()) == -1) {
++ rs_log_crit("fork() failed: %s\n", strerror(errno));
++ goto finish;
++ } else if (pid == 0) {
++ int fd;
++ /* Child */
++
++ /* Close file descriptors and replace them by /dev/null */
++ close(0);
++ close(1);
++ close(2);
++ fd = open("/dev/null", O_RDWR);
++ assert(fd == 0);
++ fd = dup(0);
++ assert(fd == 1);
++ fd = dup(0);
++ assert(fd == 2);
++
++#ifdef HAVE_SETSID
++ setsid();
++#endif
++
++ chdir("/");
++ rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
++ daemon_proc(host_file, lock_file, n_slots);
++ }
++
++ /* Parent */
++
++ /* Wait some time for initial host gathering */
++ usleep(1000000); /* 1000 ms */
++
++ }
++
++ /* Open host list read-only */
++ if ((host_fd = open(host_file, O_RDONLY)) < 0) {
++ rs_log_crit("open('%s') failed: %s\n", host_file, strerror(errno));
++ goto finish;
++ }
++
++ /* A read lock */
++ if (generic_lock(host_fd, 0, 1, 1) < 0) {
++ rs_log_crit("lock failed: %s\n", strerror(errno));
++ goto finish;
++ }
++
++ /* Get file size */
++ if (fstat(host_fd, &st) < 0) {
++ rs_log_crit("stat() failed: %s\n", strerror(errno));
++ goto finish;
++ }
++
++ if (st.st_size >= MAX_FILE_SIZE) {
++ rs_log_crit("file too large.\n");
++ goto finish;
++ }
++
++ /* read file data */
++ s = malloc((size_t) st.st_size+1);
++ assert(s);
++
++ if (dcc_readx(host_fd, s, (size_t) st.st_size) != 0) {
++ rs_log_crit("failed to read from file.\n");
++ goto finish;
++ }
++ s[st.st_size] = 0;
++
++ /* Parse host data */
++ if (dcc_parse_hosts(s, host_file, ret_list, ret_nhosts, ret_prev) != 0) {
++ rs_log_crit("failed to parse host file.\n");
++ goto finish;
++ }
++
++ r = 0;
++
++finish:
++ if (host_fd >= 0) {
++ generic_lock(host_fd, 0, 0, 1);
++ close(host_fd);
++ }
++
++ free(s);
++
++ return r;
++}
++
+--- upstream/src/zeroconf-reg.c 1970-01-01 01:00:00.000000000 +0100
++++ lennart/src/zeroconf-reg.c 2005-11-18 15:34:00.000000000 +0100
+@@ -0,0 +1,297 @@
++/* -*- c-file-style: "java"; indent-tabs-mode: nil -*- */
++
++#include "config.h"
++
++#include <assert.h>
++#include <stdio.h>
++#include <sys/select.h>
++#include <signal.h>
++#include <sys/file.h>
++#include <sys/time.h>
++#include <time.h>
++#include <sys/stat.h>
++#include <sys/poll.h>
++#include <pthread.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <errno.h>
++
++#include <avahi-common/simple-watch.h>
++#include <avahi-common/error.h>
++#include <avahi-common/alternative.h>
++#include <avahi-common/malloc.h>
++#include <avahi-client/publish.h>
++
++#include "distcc.h"
++#include "zeroconf.h"
++#include "trace.h"
++#include "exitcode.h"
++
++struct context {
++ int thread_running;
++ pthread_t thread_id;
++ pthread_mutex_t mutex;
++ char *name;
++ AvahiSimplePoll *simple_poll;
++ AvahiClient *client;
++ AvahiEntryGroup *group;
++ uint16_t port;
++ int n_cpus;
++};
++
++static void publish_reply(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata);
++
++static void register_stuff(struct context *ctx) {
++
++ if (!ctx->group) {
++
++ if (!(ctx->group = avahi_entry_group_new(ctx->client, publish_reply, ctx))) {
++ rs_log_crit("Failed to create entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ }
++
++ if (avahi_entry_group_is_empty(ctx->group)) {
++ char cpus[32];
++
++ snprintf(cpus, sizeof(cpus), "cpus=%i", ctx->n_cpus);
++
++ /* Register our service */
++
++ if (avahi_entry_group_add_service(ctx->group,
++ AVAHI_IF_UNSPEC,
++ AVAHI_PROTO_UNSPEC,
++ 0,
++ ctx->name,
++ DCC_DNS_SERVICE_TYPE,
++ NULL,
++ NULL,
++ ctx->port,
++ "txtvers=1",
++ cpus,
++ "distcc="PACKAGE_VERSION,
++ "gnuhost="GNU_HOST,
++ NULL) < 0) {
++ rs_log_crit("Failed to add service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ if (avahi_entry_group_commit(ctx->group) < 0) {
++ rs_log_crit("Failed to commit entry group: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++ }
++
++ return;
++
++ fail:
++ avahi_simple_poll_quit(ctx->simple_poll);
++}
++
++/* Called when publishing of service data completes */
++static void publish_reply(AvahiEntryGroup *UNUSED(g), AvahiEntryGroupState state, void *userdata) {
++ struct context *ctx = userdata;
++
++ switch (state) {
++
++ case AVAHI_ENTRY_GROUP_COLLISION: {
++ char *n;
++
++ /* Pick a new name for our service */
++
++ n = avahi_alternative_service_name(ctx->name);
++ assert(n);
++
++ avahi_free(ctx->name);
++ ctx->name = n;
++
++ register_stuff(ctx);
++ break;
++ }
++
++ case AVAHI_ENTRY_GROUP_FAILURE:
++ rs_log_crit("Failed to register service: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ avahi_simple_poll_quit(ctx->simple_poll);
++ break;
++
++ case AVAHI_ENTRY_GROUP_UNCOMMITED:
++ case AVAHI_ENTRY_GROUP_REGISTERING:
++ case AVAHI_ENTRY_GROUP_ESTABLISHED:
++ ;
++ }
++}
++
++static void client_callback(AvahiClient *client, AvahiClientState state, void *userdata) {
++ struct context *ctx = userdata;
++
++ ctx->client = client;
++
++ switch (state) {
++
++ case AVAHI_CLIENT_S_RUNNING:
++
++ register_stuff(ctx);
++ break;
++
++ case AVAHI_CLIENT_S_COLLISION:
++
++ if (ctx->group)
++ avahi_entry_group_reset(ctx->group);
++ break;
++
++ case AVAHI_CLIENT_FAILURE:
++
++ if (avahi_client_errno(client) == AVAHI_ERR_DISCONNECTED) {
++ int error;
++
++ avahi_client_free(ctx->client);
++ ctx->client = NULL;
++ ctx->group = NULL;
++
++ /* Reconnect to the server */
++
++ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll),
++ AVAHI_CLIENT_NO_FAIL,
++ client_callback,
++ ctx,
++ &error))) {
++
++ rs_log_crit("Failed to contact server: %s\n", avahi_strerror(error));
++ avahi_simple_poll_quit(ctx->simple_poll);
++ }
++
++ } else {
++ rs_log_crit("Client failure: %s\n", avahi_strerror(avahi_client_errno(client)));
++ avahi_simple_poll_quit(ctx->simple_poll);
++ }
++
++ break;
++
++ case AVAHI_CLIENT_S_REGISTERING:
++ case AVAHI_CLIENT_CONNECTING:
++ ;
++ }
++}
++
++static void* thread(void *userdata) {
++ struct context *ctx = userdata;
++ sigset_t mask;
++ int r;
++
++ /* Make sure that signals are delivered to the main thread */
++ sigfillset(&mask);
++ pthread_sigmask(SIG_BLOCK, &mask, NULL);
++
++ pthread_mutex_lock(&ctx->mutex);
++
++ /* Run the main loop */
++ r = avahi_simple_poll_loop(ctx->simple_poll);
++
++ /* Cleanup some stuff */
++ if (ctx->client)
++ avahi_client_free(ctx->client);
++ ctx->client = NULL;
++ ctx->group = NULL;
++
++ pthread_mutex_unlock(&ctx->mutex);
++
++ return NULL;
++}
++
++static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
++ pthread_mutex_t *mutex = userdata;
++ int r;
++
++ /* Before entering poll() we unlock the mutex, so that
++ * avahi_simple_poll_quit() can succeed from another thread. */
++
++ pthread_mutex_unlock(mutex);
++ r = poll(ufds, nfds, timeout);
++ pthread_mutex_lock(mutex);
++
++ return r;
++}
++
++/* register a distcc service in DNS-SD/mDNS with the given port and number of CPUs */
++void* dcc_zeroconf_register(uint16_t port, int n_cpus) {
++ struct context *ctx = NULL;
++
++ char service[256] = "distcc@";
++ int error, ret;
++
++ ctx = malloc(sizeof(struct context));
++ assert(ctx);
++ ctx->client = NULL;
++ ctx->group = NULL;
++ ctx->simple_poll = NULL;
++ ctx->thread_running = 0;
++ ctx->port = port;
++ ctx->n_cpus = n_cpus;
++ pthread_mutex_init(&ctx->mutex, NULL);
++
++ /* Prepare service name */
++ gethostname(service+7, sizeof(service)-8);
++ service[sizeof(service)-1] = 0;
++
++ ctx->name = strdup(service);
++ assert(ctx->name);
++
++ if (!(ctx->simple_poll = avahi_simple_poll_new())) {
++ rs_log_crit("Failed to create event loop object.\n");
++ goto fail;
++ }
++
++ avahi_simple_poll_set_func(ctx->simple_poll, poll_func, &ctx->mutex);
++
++ if (!(ctx->client = avahi_client_new(avahi_simple_poll_get(ctx->simple_poll), AVAHI_CLIENT_NO_FAIL, client_callback, ctx, &error))) {
++ rs_log_crit("Failed to create client object: %s\n", avahi_strerror(avahi_client_errno(ctx->client)));
++ goto fail;
++ }
++
++ /* Create the mDNS event handler */
++ if ((ret = pthread_create(&ctx->thread_id, NULL, thread, ctx)) < 0) {
++ rs_log_crit("Failed to create thread: %s\n", strerror(ret));
++ goto fail;
++ }
++
++ ctx->thread_running = 1;
++
++ return ctx;
++
++ fail:
++
++ if (ctx)
++ dcc_zeroconf_unregister(ctx);
++
++ return NULL;
++}
++
++/* Unregister this server from DNS-SD/mDNS */
++int dcc_zeroconf_unregister(void *u) {
++ struct context *ctx = u;
++
++ if (ctx->thread_running) {
++ pthread_mutex_lock(&ctx->mutex);
++ avahi_simple_poll_quit(ctx->simple_poll);
++ pthread_mutex_unlock(&ctx->mutex);
++
++ pthread_join(ctx->thread_id, NULL);
++ ctx->thread_running = 0;
++ }
++
++ avahi_free(ctx->name);
++
++ if (ctx->client)
++ avahi_client_free(ctx->client);
++
++ if (ctx->simple_poll)
++ avahi_simple_poll_free(ctx->simple_poll);
++
++ pthread_mutex_destroy(&ctx->mutex);
++
++ free(ctx);
++
++ return 0;
++}
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 0000000..7b5d85c
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=0.9.4
+Exec=distccmon-gnome
+Name=distcc monitor
+GenericName=Distributed Compile Monitor
+Comment=Graphical view of distributed compile tasks
+Icon=distccmon-gnome-icon
+TryExec=distccmon-gnome
+Terminal=false
+Type=Application
+Categories=GNOME;Development;
+StartupNotify=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 0000000..4853c15
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb
@@ -0,0 +1,19 @@
+# dosfstools-native OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+require dosfstools_${PV}.bb
+
+PR="r5"
+
+SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+ file://mkdosfs-bootcode.patch;patch=1 \
+ file://mkdosfs-dir.patch;patch=1 \
+ file://alignment_hack.patch;patch=1 \
+ file://dosfstools-2.10-kernel-2.6.patch;patch=1 \
+ file://msdos_fat12_undefined.patch;patch=1 \
+ file://dosfstools-msdos_fs-types.patch;patch=1 \
+ file://include-linux-types.patch;patch=1 \
+ file://2.6.20-syscall.patch;patch=1"
+
+inherit 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 0000000..7cf2662
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
@@ -0,0 +1,65 @@
+Index: dosfstools-2.10/dosfsck/io.c
+===================================================================
+--- dosfstools-2.10.orig/dosfsck/io.c 2007-06-07 16:15:52.000000000 +0200
++++ dosfstools-2.10/dosfsck/io.c 2007-06-07 16:16:06.000000000 +0200
+@@ -42,28 +42,11 @@
+ /* Use the _llseek system call directly, because there (once?) was a bug in
+ * the glibc implementation of it. */
+ #include <linux/unistd.h>
+-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
+ /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
+ static loff_t llseek( int fd, loff_t offset, int whence )
+ {
+ return lseek(fd, offset, whence);
+ }
+-#else
+-# ifndef __NR__llseek
+-# error _llseek system call not present
+-# endif
+-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
+- loff_t *, res, uint, wh );
+-
+-static loff_t llseek( int fd, loff_t offset, int whence )
+-{
+- loff_t actual;
+-
+- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
+- return (loff_t)-1;
+- return actual;
+-}
+-#endif
+
+
+ void fs_open(char *path,int rw)
+Index: dosfstools-2.10/mkdosfs/mkdosfs.c
+===================================================================
+--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2007-06-07 16:15:11.000000000 +0200
++++ dosfstools-2.10/mkdosfs/mkdosfs.c 2007-06-07 16:15:30.000000000 +0200
+@@ -116,27 +116,11 @@
+ /* Use the _llseek system call directly, because there (once?) was a bug in
+ * the glibc implementation of it. */
+ #include <linux/unistd.h>
+-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
+ /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
+ static loff_t llseek( int fd, loff_t offset, int whence )
+ {
+ return lseek(fd, offset, whence);
+ }
+-#else
+-# ifndef __NR__llseek
+-# error _llseek system call not present
+-# endif
+-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
+- loff_t *, res, uint, wh );
+-static loff_t llseek( int fd, loff_t offset, int whence )
+-{
+- loff_t actual;
+-
+- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
+- return (loff_t)-1;
+- return actual;
+-}
+-#endif
+
+ #define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
+
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 0000000..e15060a
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
@@ -0,0 +1,34 @@
+The problem is that unsigned char[2] is
+guranteed to be 8Bit aligned on arm
+but unsigned short is/needs to be 16bit aligned
+the union { unsigned short; unsigned char[2] } trick
+didn't work so no we use the alpha hack.
+
+memcpy into an 16bit aligned
+
+ -zecke
+
+
+--- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
++++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
+@@ -36,17 +36,15 @@
+ { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
+ };
+
+-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
++
+ /* Unaligned fields must first be copied byte-wise */
+ #define GET_UNALIGNED_W(f) \
+ ({ \
+ unsigned short __v; \
+ memcpy( &__v, &f, sizeof(__v) ); \
+- CF_LE_W( *(unsigned short *)&f ); \
++ CF_LE_W( *(unsigned short *)&__v ); \
+ })
+-#else
+-#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
+-#endif
++
+
+
+ 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 0000000..3ecafc3
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch
@@ -0,0 +1,74 @@
+Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
+Date: 2004-02-09
+Initial Package Version: 2.6
+Origin: Jim Gifford
+Upstream Status: Accepted
+Description: Fixes Compile Issues with the 2.6 Kernel
+
+--- dosfstools-2.10/dosfsck/common.h.orig 2004-02-09 18:37:59.056737458 +0000
++++ dosfstools-2.10/dosfsck/common.h 2004-02-09 18:38:18.333392952 +0000
+@@ -2,6 +2,13 @@
+
+ /* Written 1993 by Werner Almesberger */
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
++ #define __KERNEL__
++ #include <asm/types.h>
++ #undef __KERNEL__
++ #define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
++#endif
+
+ #ifndef _COMMON_H
+ #define _COMMON_H
+--- dosfstools-2.10/dosfsck/file.c.orig 2004-02-09 18:40:52.016728845 +0000
++++ dosfstools-2.10/dosfsck/file.c 2004-02-09 18:40:03.665117865 +0000
+@@ -15,6 +15,14 @@
+ #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
+ #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
+ #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
++ #define __KERNEL__
++ #include <asm/types.h>
++ #undef __KERNEL__
++#endif
++
+ #include <linux/msdos_fs.h>
+
+ #include "common.h"
+--- dosfstools-2.10/dosfsck/dosfsck.h.orig 2004-02-09 18:57:11.022870974 +0000
++++ dosfstools-2.10/dosfsck/dosfsck.h 2004-02-09 18:56:20.628614393 +0000
+@@ -13,6 +13,15 @@
+ #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
+ #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
+ #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
++ #define __KERNEL__
++ #include <asm/types.h>
++ #include <asm/byteorder.h>
++ #undef __KERNEL__
++#endif
++
+ #include <linux/msdos_fs.h>
+
+ /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
+--- dosfstools-2.10/mkdosfs/mkdosfs.c.orig 2004-02-09 18:31:41.997157413 +0000
++++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-02-09 18:34:07.311945252 +0000
+@@ -66,6 +66,13 @@
+ #include <time.h>
+ #include <errno.h>
+
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
++ #define __KERNEL__
++ #include <asm/types.h>
++ #undef __KERNEL__
++#endif
++
+ #if __BYTE_ORDER == __BIG_ENDIAN
+
+ #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 0000000..e70a3ea
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch
@@ -0,0 +1,30 @@
+--- dosfstools-2.10/dosfsck/dosfsck.h.org 2006-02-21 08:36:14.000000000 -0700
++++ dosfstools-2.10/dosfsck/dosfsck.h 2006-02-21 08:40:12.000000000 -0700
+@@ -22,6 +22,14 @@
+ #undef __KERNEL__
+ #endif
+
++#ifndef __s8
++#include <asm/types.h>
++#endif
++
++#ifndef __ASM_STUB_BYTEORDER_H__
++#include <asm/byteorder.h>
++#endif
++
+ #include <linux/msdos_fs.h>
+
+ /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
+--- dosfstools-2.10/dosfsck/file.c.org 2006-02-21 08:37:36.000000000 -0700
++++ dosfstools-2.10/dosfsck/file.c 2006-02-21 08:37:47.000000000 -0700
+@@ -23,6 +23,10 @@
+ #undef __KERNEL__
+ #endif
+
++#ifndef __s8
++#include <asm/types.h>
++#endif
++
+ #include <linux/msdos_fs.h>
+
+ #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 0000000..4bbd4e7
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch
@@ -0,0 +1,17 @@
+mkdsofs is using types of the style __u8, which it gets with some
+versions of libc headers via linux/hdreg.h including asm/types.h.
+Newer version of fedora (at least) have a hdreg.h whichdoes not
+include asm/types.h. To work around this patch mkdosfs.c to explicity
+include linux/types.h which will in turn pull in asm/types.h which
+defines these variables.
+
+--- dosfstools-2.10/mkdosfs/mkdosfs.c~ 2006-07-12 18:46:21.000000000 +1000
++++ dosfstools-2.10/mkdosfs/mkdosfs.c 2006-07-12 18:46:21.000000000 +1000
+@@ -60,6 +60,7 @@
+ #include "../version.h"
+
+ #include <fcntl.h>
++#include <linux/types.h>
+ #include <linux/hdreg.h>
+ #include <linux/fs.h>
+ #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 0000000..52be862
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
@@ -0,0 +1,240 @@
+diff -urN dosfstools-2.10.orig/mkdosfs/ChangeLog dosfstools-2.10/mkdosfs/ChangeLog
+--- dosfstools-2.10.orig/mkdosfs/ChangeLog 1997-06-18 03:09:38.000000000 -0700
++++ dosfstools-2.10/mkdosfs/ChangeLog 2004-08-02 20:57:57.734939816 -0700
+@@ -1,3 +1,14 @@
++19th June 2003 Sam Bingner (sam@bingner.com)
++
++ Added option to read in bootcode from a file so that if you have
++ for example Windows 2000 boot code, you can have it write that
++ as the bootcode. This is a dump of the behinning of a partition
++ generally 512 bytes, but can be up to reserved sectors*512 bytes.
++ Also writes 0x80 as the BIOS drive number if we are formatting a
++ hard drive, and sets the number of hidden sectors to be the
++ number of sectors in one track. These were required so that DOS
++ could boot using the bootcode.
++
+ 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com)
+
+ Better algorithm to select cluster sizes on large filesystems.
+diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.8 dosfstools-2.10/mkdosfs/mkdosfs.8
+--- dosfstools-2.10.orig/mkdosfs/mkdosfs.8 2003-05-15 11:28:28.000000000 -0700
++++ dosfstools-2.10/mkdosfs/mkdosfs.8 2004-08-02 20:57:57.735939664 -0700
+@@ -40,6 +40,10 @@
+ .I message-file
+ ]
+ [
++.B \-B
++.I bootcode-file
++]
++[
+ .B \-n
+ .I volume-name
+ ]
+@@ -155,6 +159,18 @@
+ carriage return-line feed combinations, and tabs have been expanded.
+ If the filename is a hyphen (-), the text is taken from standard input.
+ .TP
++.BI \-B " bootcode-file"
++Uses boot machine code from file "file". On any thing other than FAT32,
++this only writes the first 3 bytes, and 480 bytes from offset 3Eh. On
++FAT32, this writes the first 3 bytes, 420 bytes from offset 5Ah to both
++primary and backup boot sectors. Also writes all other reserved sectors
++excluding the sectors following boot sectors (usually sector 2 and 7).
++Does not require that the input file be as large as reserved_sectors*512.
++To make a FAT32 partition bootable, you will need at least the first
++13 sectors (6656 bytes). You can also specify a partition as the argument
++to clone the boot code from that partition.
++i.e mkdosfs -B /dev/sda1 /dev/sda1
++.TP
+ .BI \-n " volume-name"
+ Sets the volume name (label) of the filesystem. The volume name can
+ be up to 11 characters long. The default is no label.
+@@ -188,8 +204,9 @@
+ simply will not support it ;)
+ .SH AUTHOR
+ Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
+-<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
+-<Roman.Hodek@informatik.uni-erlangen.de> for Debian/GNU Linux.
++<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and
++additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
++for Debian/GNU Linux.
+ .SH ACKNOWLEDGEMENTS
+ .B mkdosfs
+ is based on code from
+diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c
+--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2003-06-14 13:07:08.000000000 -0700
++++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:57:57.736939512 -0700
+@@ -24,6 +24,12 @@
+ - New options -A, -S, -C
+ - Support for filesystems > 2GB
+ - FAT32 support
++
++ Fixes/additions June 2003 by Sam Bingner
++ <sam@bingner.com>:
++ - Add -B option to read in bootcode from a file
++ - Write BIOS drive number so that FS can properly boot
++ - Set number of hidden sectors before boot code to be one track
+
+ Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk)
+
+@@ -167,6 +173,8 @@
+ #define FAT_BAD 0x0ffffff7
+
+ #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */
++#define HD_DRIVE_NUMBER 0x80 /* Boot off first hard drive */
++#define FD_DRIVE_NUMBER 0x00 /* Boot off first floppy drive */
+ #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */
+ #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */
+ #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */
+@@ -188,6 +196,8 @@
+ #define BOOTCODE_SIZE 448
+ #define BOOTCODE_FAT32_SIZE 420
+
++#define MAX_RESERVED 0xFFFF
++
+ /* __attribute__ ((packed)) is used on all structures to make gcc ignore any
+ * alignments */
+
+@@ -215,7 +225,7 @@
+ __u16 fat_length; /* sectors/FAT */
+ __u16 secs_track; /* sectors per track */
+ __u16 heads; /* number of heads */
+- __u32 hidden; /* hidden sectors (unused) */
++ __u32 hidden; /* hidden sectors (one track) */
+ __u32 total_sect; /* number of sectors (if sectors == 0) */
+ union {
+ struct {
+@@ -298,6 +308,8 @@
+
+ /* Global variables - the root of all evil :-) - see these and weep! */
+
++static char *template_boot_code; /* Variable to store a full template boot sector in */
++static int use_template = 0;
+ static char *program_name = "mkdosfs"; /* Name of the program */
+ static char *device_name = NULL; /* Name of the device on which to create the filesystem */
+ static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */
+@@ -842,6 +854,12 @@
+ vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16);
+ vi->volume_id[3] = (unsigned char) (volume_id >> 24);
+ }
++ if (bs.media == 0xf8) {
++ vi->drive_number = HD_DRIVE_NUMBER; /* Set bios drive number to 80h */
++ }
++ else {
++ vi->drive_number = FD_DRIVE_NUMBER; /* Set bios drive number to 00h */
++ }
+
+ if (!atari_format) {
+ memcpy(vi->volume_label, volume_name, 11);
+@@ -886,7 +904,7 @@
+ printf( "Using %d reserved sectors\n", reserved_sectors );
+ bs.fats = (char) nr_fats;
+ if (!atari_format || size_fat == 32)
+- bs.hidden = CT_LE_L(0);
++ bs.hidden = bs.secs_track;
+ else
+ /* In Atari format, hidden is a 16 bit field */
+ memset( &bs.hidden, 0, 2 );
+@@ -1358,6 +1376,32 @@
+ * dir area on FAT12/16, and the first cluster on FAT32. */
+ writebuf( (char *) root_dir, size_root_dir, "root directory" );
+
++ if (use_template == 1) {
++ /* dupe template into reserved sectors */
++ seekto( 0, "Start of partition" );
++ if (size_fat == 32) {
++ writebuf( template_boot_code, 3, "backup jmpBoot" );
++ seekto( 0x5a, "sector 1 boot area" );
++ writebuf( template_boot_code+0x5a, 420, "sector 1 boot area" );
++ seekto( 512*2, "third sector" );
++ if (backup_boot != 0) {
++ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" );
++ seekto( backup_boot*sector_size, "backup boot sector" );
++ writebuf( template_boot_code, 3, "backup jmpBoot" );
++ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" );
++ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" );
++ seekto( (backup_boot+2)*sector_size, "sector following backup code" );
++ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" );
++ } else {
++ writebuf( template_boot_code+512*2, (reserved_sectors-2)*512, "remaining data" );
++ }
++ } else {
++ writebuf( template_boot_code, 3, "jmpBoot" );
++ seekto( 0x3e, "sector 1 boot area" );
++ writebuf( template_boot_code+0x3e, 448, "boot code" );
++ }
++ }
++
+ if (info_sector) free( info_sector );
+ free (root_dir); /* Free up the root directory space from setup_tables */
+ free (fat); /* Free up the fat table space reserved during setup_tables */
+@@ -1371,7 +1415,7 @@
+ {
+ fatal_error("\
+ Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\
+- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\
++ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
+ [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
+ [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
+ /dev/name [blocks]\n");
+@@ -1433,7 +1477,7 @@
+ printf ("%s " VERSION " (" VERSION_DATE ")\n",
+ program_name);
+
+- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v")) != EOF)
++ while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
+ /* Scan the command line for options */
+ switch (c)
+ {
+@@ -1494,6 +1538,51 @@
+ listfile = optarg;
+ break;
+
++ case 'B': /* B : read in bootcode */
++ if ( strcmp(optarg, "-") )
++ {
++ msgfile = fopen(optarg, "r");
++ if ( !msgfile )
++ perror(optarg);
++ }
++ else
++ msgfile = stdin;
++
++ if ( msgfile )
++ {
++ if (!(template_boot_code = malloc( MAX_RESERVED )))
++ die( "Out of memory" );
++ /* The template boot sector including reserved must not be > 65535 */
++ use_template = 1;
++ i = 0;
++ do
++ {
++ ch = getc(msgfile);
++ switch (ch)
++ {
++ case EOF:
++ break;
++
++ default:
++ template_boot_code[i++] = ch; /* Store character */
++ break;
++ }
++ }
++ while ( ch != EOF && i < MAX_RESERVED );
++ ch = getc(msgfile); /* find out if we're at EOF */
++
++ /* Fill up with zeros */
++ while( i < MAX_RESERVED )
++ template_boot_code[i++] = '\0';
++
++ if ( ch != EOF )
++ printf ("Warning: template too long; truncated after %d bytes\n", i);
++
++ if ( msgfile != stdin )
++ fclose(msgfile);
++ }
++ break;
++
+ case 'm': /* m : Set boot message */
+ if ( strcmp(optarg, "-") )
+ {
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 0000000..8f753b0
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
@@ -0,0 +1,634 @@
+diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c
+--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2004-08-02 20:48:45.000000000 -0700
++++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:49:44.296953792 -0700
+@@ -18,6 +18,10 @@
+ as a rule), and not the block. For example the boot block does not
+ occupy a full cluster.
+
++ June 2004 - Jordan Crouse (info.linux@amd.com)
++ Added -d <directory> support to populate the image
++ Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved
++
+ Fixes/additions May 1998 by Roman Hodek
+ <Roman.Hodek@informatik.uni-erlangen.de>:
+ - Atari format support
+@@ -71,6 +75,8 @@
+ #include <unistd.h>
+ #include <time.h>
+ #include <errno.h>
++#include <libgen.h>
++#include <dirent.h>
+
+ #if __BYTE_ORDER == __BIG_ENDIAN
+
+@@ -124,6 +130,8 @@
+ }
+ #endif
+
++#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
++
+ /* Constant definitions */
+
+ #define TRUE 1 /* Boolean constants */
+@@ -163,7 +171,6 @@
+ #define ATTR_VOLUME 8 /* volume label */
+ #define ATTR_DIR 16 /* directory */
+ #define ATTR_ARCH 32 /* archived */
+-
+ #define ATTR_NONE 0 /* no attribute bits */
+ #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
+ /* attribute bits that are copied "as is" */
+@@ -258,6 +265,19 @@
+ __u32 reserved2[4];
+ };
+
++/* This stores up to 13 chars of the name */
++
++struct msdos_dir_slot {
++ __u8 id; /* sequence number for slot */
++ __u8 name0_4[10]; /* first 5 characters in name */
++ __u8 attr; /* attribute byte */
++ __u8 reserved; /* always 0 */
++ __u8 alias_checksum; /* checksum for 8.3 alias */
++ __u8 name5_10[12]; /* 6 more characters in name */
++ __u16 start; /* starting cluster number, 0 in long slots */
++ __u8 name11_12[4]; /* last 2 characters in name */
++};
++
+ struct msdos_dir_entry
+ {
+ char name[8], ext[3]; /* name and extension */
+@@ -306,6 +326,15 @@
+
+ #define MESSAGE_OFFSET 29 /* Offset of message in above code */
+
++/* Special structure to keep track of directories as we add them for the -d option */
++
++struct dir_entry {
++ int root; /* Specifies if this is the root dir or not */
++ int count; /* Number of items in the table */
++ int entries; /* Number of entries in the table */
++ struct msdos_dir_entry *table; /* Pointer to the entry table */
++};
++
+ /* Global variables - the root of all evil :-) - see these and weep! */
+
+ static char *template_boot_code; /* Variable to store a full template boot sector in */
+@@ -339,6 +368,9 @@
+ static int size_root_dir; /* Size of the root directory in bytes */
+ static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
+ static int root_dir_entries = 0; /* Number of root directory entries */
++static int root_dir_num_entries = 0;
++static int last_cluster_written = 0;
++
+ static char *blank_sector; /* Blank sector - all zeros */
+
+
+@@ -411,7 +443,6 @@
+ }
+ }
+
+-
+ /* Mark a specified sector as having a particular value in it's FAT entry */
+
+ static void
+@@ -1262,6 +1293,9 @@
+ die ("unable to allocate space for root directory in memory");
+ }
+
++
++ last_cluster_written = 2;
++
+ memset(root_dir, 0, size_root_dir);
+ if ( memcmp(volume_name, " ", 11) )
+ {
+@@ -1310,11 +1344,11 @@
+ }
+
+ if (!(blank_sector = malloc( sector_size )))
+- die( "Out of memory" );
++ die( "Out of memory" );
++
+ memset(blank_sector, 0, sector_size);
+ }
+-
+-
++
+ /* Write the new filesystem's data tables to wherever they're going to end up! */
+
+ #define error(str) \
+@@ -1336,7 +1370,7 @@
+ do { \
+ int __size = (size); \
+ if (write (dev, buf, __size) != __size) \
+- error ("failed whilst writing " errstr); \
++ error ("failed whilst writing " errstr); \
+ } while(0)
+
+
+@@ -1407,6 +1441,452 @@
+ free (fat); /* Free up the fat table space reserved during setup_tables */
+ }
+
++/* Add a file to the specified directory entry, and also write it into the image */
++
++static void copy_filename(char *filename, char *base, char *ext) {
++
++ char *ch = filename;
++ int i, len;
++
++ memset(base, 0x20, 8);
++ memset(ext, 0x20, 3);
++
++ for(len = 0 ; *ch && *ch != '.'; ch++) {
++ base[len++] = toupper(*ch);
++ if (len == 8) break;
++ }
++
++ for ( ; *ch && *ch != '.'; ch++);
++ if (*ch) ch++;
++
++ for(len = 0 ; *ch; ch++) {
++ ext[len++] = toupper(*ch);
++ if (len == 3) break;
++ }
++}
++
++/* Check for an .attrib.<filename> file, and read the attributes therein */
++
++/* We are going to be pretty pedantic about this. The file needs 3
++ bytes at the beginning, the attributes are listed in this order:
++
++ (H)idden|(S)ystem|(A)rchived
++
++ A capital HSA means to enable it, anything else will disable it
++ (I recommend a '-') The unix user attributes will still be used
++ for write access.
++
++ For example, to enable system file access for ldlinux.sys, write
++ the following to .attrib.ldlinux.sys: -S-
++*/
++
++unsigned char check_attrib_file(char *dir, char *filename) {
++
++ char attrib[4] = { '-', '-', '-' };
++ unsigned char *buffer = 0;
++ int ret = ATTR_NONE;
++ int fd = -1;
++
++ buffer = (char *) calloc(1, strlen(dir) + strlen(filename) + 10);
++ if (!buffer) return ATTR_NONE;
++
++ sprintf(buffer, "%s/.attrib.%s", dir, filename);
++
++ if (access(buffer, R_OK))
++ goto exit_attrib;
++
++ if ((fd = open(buffer, O_RDONLY, 0)) < 0)
++ goto exit_attrib;
++
++ if (read(fd, attrib, 3) < 0)
++ goto exit_attrib;
++
++ if (attrib[0] == 'H') ret |= ATTR_HIDDEN;
++ if (attrib[1] == 'S') ret |= ATTR_SYS;
++ if (attrib[2] == 'A') ret |= ATTR_ARCH;
++
++ printf("%s: Setting atrribute %x\n", filename, ret);
++
++ exit_attrib:
++ if (fd >= 0) close(fd);
++ if (buffer) free(buffer);
++
++ return ret;
++}
++
++static void copy_name(char *buffer, int size, char **pointer) {
++ int i;
++
++ for(i = 0; i < size; i += 2) {
++ if (*pointer) {
++ buffer[i] = **pointer;
++ buffer[i + 1] = 0x00;
++ *pointer = **pointer ? *pointer + 1 : 0;
++ }
++ else {
++ buffer[i] = 0xFF;
++ buffer[i + 1] = 0xFF;
++ }
++ }
++}
++
++static int add_file(char *filename, struct dir_entry *dir, unsigned char attr)
++{
++ struct stat stat;
++ struct msdos_dir_entry *entry;
++ int infile = 0;
++ int sectors, clusters;
++ struct tm *ctime;
++ int c, s;
++ int ptr;
++ char *buffer, *base;
++ int start;
++ int usedsec, totalsec;
++
++ char name83[8], ext83[3];
++
++ struct msdos_dir_slot *slot;
++ int i;
++ char *p;
++
++ /* The root directory is static, everything else grows as needed */
++
++ if (dir->root) {
++ if (dir->count == dir->entries) {
++ printf("Error - too many directory entries\n");
++ }
++ }
++ else {
++ if (dir->count == dir->entries) {
++ if (!dir->table)
++ dir->table =
++ (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
++ else {
++ dir->table =
++ (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
++ sizeof(struct msdos_dir_entry));
++
++ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
++ }
++
++ dir->entries++;
++ }
++ }
++
++ infile = open(filename, O_RDONLY, 0);
++ if (!infile) return;
++
++ if (fstat(infile, &stat))
++ goto exit_add;
++
++ if (S_ISCHR(stat.st_mode) ||S_ISBLK(stat.st_mode) ||
++ S_ISFIFO(stat.st_mode) || S_ISLNK(stat.st_mode)) {
++ printf("Error - cannot create a special file in a FATFS\n");
++ goto exit_add;
++ }
++
++ /* FIXME: This isn't very pretty */
++
++ usedsec = start_data_sector + (size_root_dir / sector_size) +
++ (last_cluster_written * bs.cluster_size);
++
++ totalsec = blocks * BLOCK_SIZE / sector_size;
++
++ /* Figure out how many sectors / clustors the file requires */
++
++ sectors = ROUND_UP(stat.st_size, sector_size);
++ clusters = ROUND_UP(sectors, (int) bs.cluster_size);
++
++ if (usedsec + sectors > totalsec) {
++ printf("Error - %s is too big (%d vs %d)\n", filename, sectors, totalsec - usedsec);
++ close(infile);
++ return -1;
++ }
++
++ printf("ADD %s\n", filename);
++
++ /* Grab the basename of the file */
++ base = basename(filename);
++
++ /* Extract out the 8.3 name */
++ copy_filename(base, name83, ext83);
++
++ /* Make an extended name slot */
++
++ slot = (struct msdos_dir_slot *) &dir->table[dir->count++];
++ slot->id = 'A';
++ slot->attr = 0x0F;
++ slot->reserved = 0;
++ slot->start = 0;
++
++ slot->alias_checksum = 0;
++
++ for(i = 0; i < 8; i++)
++ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i];
++
++ for(i = 0; i < 3; i++)
++ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i];
++
++ p = base;
++
++ copy_name(slot->name0_4, 10, &p);
++ copy_name(slot->name5_10, 12, &p);
++ copy_name(slot->name11_12, 4, &p);
++
++
++ /* Get the entry from the root filesytem */
++ entry = &dir->table[dir->count++];
++
++ strncpy(entry->name, name83, 8);
++ strncpy(entry->ext, ext83, 3);
++
++
++ /* If the user has it read only, then add read only to the incoming
++ attribute settings */
++
++ if (!(stat.st_mode & S_IWUSR)) attr |= ATTR_RO;
++ entry->attr = attr;
++
++ /* Set the access time on the file */
++ ctime = localtime(&create_time);
++
++ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
++ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
++
++ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
++ ((ctime->tm_mon+1) << 5) +
++ ((ctime->tm_year-80) << 9)));
++
++ entry->ctime_ms = 0;
++ entry->ctime = entry->time;
++ entry->cdate = entry->date;
++ entry->adate = entry->date;
++ entry->size = stat.st_size;
++
++ start = last_cluster_written;
++
++ entry->start = CT_LE_W(start); /* start sector */
++ entry->starthi = CT_LE_W((start & 0xFFFF0000) >> 16); /* High start sector (for FAT32) */
++
++ /* We mark all of the clusters we use in the FAT */
++
++ for(c = 0; c < clusters; c++ ) {
++ int free;
++ int next = c == (clusters - 1) ? FAT_EOF : start + c + 1;
++ mark_FAT_cluster(start + c, next);
++ last_cluster_written++;
++ }
++
++ /* This confused me too - cluster 2 starts after the
++ root directory data - search me as to why */
++
++ ptr = (start_data_sector * sector_size) + size_root_dir;
++ ptr += (start - 2) * bs.cluster_size * sector_size;
++
++ buffer = (char *) malloc(sector_size);
++
++ if (!buffer) {
++ printf("Error - couldn't allocate memory\n");
++ goto exit_add;
++ }
++
++ /* Write the file into the file block */
++
++ seekto(ptr, "datafile");
++
++ while(1) {
++ int size = read(infile, buffer, sector_size);
++ if (size <= 0) break;
++
++ writebuf(buffer, size, "data");
++ }
++
++ exit_add:
++ if (infile) close(infile);
++}
++
++/* Add a new directory to the specified directory entry, and in turn populate
++ it with its own files */
++
++/* FIXME: This should check to make sure there is enough size to add itself */
++
++static void add_directory(char *filename, struct dir_entry *dir) {
++
++ struct dir_entry *newdir = 0;
++ struct msdos_dir_entry *entry;
++ struct tm *ctime;
++ DIR *rddir = opendir(filename);
++ struct dirent *dentry = 0;
++ int remain;
++ char *data;
++
++ /* If the directory doesn't exist */
++ if (!rddir) return;
++
++ if (dir->root) {
++ if (dir->count == dir->entries) {
++ printf("Error - too many directory entries\n");
++ goto exit_add_dir;
++ }
++ }
++ else {
++ if (dir->count == dir->entries) {
++ if (!dir->table)
++ dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry));
++ else {
++ dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) *
++ sizeof(struct msdos_dir_entry));
++
++ /* Zero it out to avoid issues */
++ memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry));
++ }
++ dir->entries++;
++ }
++ }
++
++ /* Now, create a new directory entry for the new directory */
++ newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry));
++ if (!newdir) goto exit_add_dir;
++
++ entry = &dir->table[dir->count++];
++
++ strncpy(entry->name, basename(filename), sizeof(entry->name));
++
++ entry->attr = ATTR_DIR;
++ ctime = localtime(&create_time);
++
++ entry->time = CT_LE_W((unsigned short)((ctime->tm_sec >> 1) +
++ (ctime->tm_min << 5) + (ctime->tm_hour << 11)));
++
++ entry->date = CT_LE_W((unsigned short)(ctime->tm_mday +
++ ((ctime->tm_mon+1) << 5) +
++ ((ctime->tm_year-80) << 9)));
++
++ entry->ctime_ms = 0;
++ entry->ctime = entry->time;
++ entry->cdate = entry->date;
++ entry->adate = entry->date;
++
++ /* Now, read the directory */
++
++ while((dentry = readdir(rddir))) {
++ struct stat st;
++ char *buffer;
++
++ if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
++ continue;
++
++ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
++ if (dentry->d_name[0] == '.') continue;
++
++ buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3);
++ if (!buffer) continue;
++
++ sprintf(buffer, "%s/%s", filename, dentry->d_name);
++ if (!stat(buffer, &st)) {
++ if (S_ISDIR(st.st_mode))
++ add_directory(buffer, newdir);
++ else if (S_ISREG(st.st_mode)) {
++ unsigned char attrib = check_attrib_file(filename, dentry->d_name);
++ add_file(buffer, newdir, attrib);
++ }
++ }
++
++ free(buffer);
++ }
++
++ /* Now that the entire directory has been written, go ahead and write the directory
++ entry as well */
++
++ entry->start = CT_LE_W(last_cluster_written);
++ entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16);
++ entry->size = newdir->count * sizeof(struct msdos_dir_entry);
++
++ remain = entry->size;
++ data = (char *) newdir->table;
++
++ while(remain) {
++ int size =
++ remain > bs.cluster_size * sector_size ? bs.cluster_size * sector_size : remain;
++
++ int pos = (start_data_sector * sector_size) + size_root_dir;
++ pos += (last_cluster_written - 2) * bs.cluster_size * sector_size;
++
++ seekto(pos, "add_dir");
++ writebuf(data, size, "add_dir");
++
++ remain -= size;
++ data += size;
++
++ mark_FAT_cluster(last_cluster_written, remain ? last_cluster_written + 1 : FAT_EOF);
++ last_cluster_written++;
++ }
++
++ exit_add_dir:
++ if (rddir) closedir(rddir);
++ if (newdir->table) free(newdir->table);
++ if (newdir) free(newdir);
++}
++
++/* Given a directory, add all the files and directories to the root directory of the
++ image.
++*/
++
++static void add_root_directory(char *dirname)
++{
++ DIR *dir = opendir(dirname);
++ struct dirent *entry = 0;
++ struct dir_entry *newdir = 0;
++
++ if (!dir) {
++ printf("Error - directory %s does not exist\n", dirname);
++ return;
++ }
++
++ /* Create the root directory structure - this is a bit different then
++ above, because the table already exists, we just refer to it. */
++
++ newdir = (struct dir_entry *) calloc(1,sizeof(struct dir_entry));
++
++ if (!newdir) {
++ closedir(dir);
++ return;
++ }
++
++ newdir->entries = root_dir_entries;
++ newdir->root = 1;
++ newdir->count = 0;
++ newdir->table = root_dir;
++
++ while((entry = readdir(dir))) {
++ struct stat st;
++ char *buffer;
++
++ if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
++ continue;
++
++ /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */
++ if (entry->d_name[0] == '.') continue;
++
++ buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3);
++ if (!buffer) continue;
++
++ sprintf(buffer, "%s/%s", dirname, entry->d_name);
++ if (!stat(buffer, &st)) {
++ if (S_ISDIR(st.st_mode))
++ add_directory(buffer, newdir);
++ else if (S_ISREG(st.st_mode)) {
++ unsigned char attrib = check_attrib_file(dirname, entry->d_name);
++ add_file(buffer, newdir, attrib);
++ }
++ }
++
++ free(buffer);
++ }
++
++ closedir(dir);
++ if (newdir) free(newdir);
++}
+
+ /* Report the command usage and return a failure error code */
+
+@@ -1418,9 +1898,9 @@
+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
+ [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
+ [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
+- /dev/name [blocks]\n");
++ [-d directory] /dev/name [blocks]\n");
+ }
+-
++
+ /*
+ * ++roman: On m68k, check if this is an Atari; if yes, turn on Atari variant
+ * of MS-DOS filesystem by default.
+@@ -1458,6 +1938,8 @@
+ int c;
+ char *tmp;
+ char *listfile = NULL;
++ char *dirname = NULL;
++
+ FILE *msgfile;
+ struct stat statbuf;
+ int i = 0, pos, ch;
+@@ -1477,7 +1959,7 @@
+ printf ("%s " VERSION " (" VERSION_DATE ")\n",
+ program_name);
+
+- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
++ while ((c = getopt (argc, argv, "AcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF)
+ /* Scan the command line for options */
+ switch (c)
+ {
+@@ -1502,6 +1984,10 @@
+ create = TRUE;
+ break;
+
++ case 'd':
++ dirname = optarg;
++ break;
++
+ case 'f': /* f : Choose number of FATs */
+ nr_fats = (int) strtol (optarg, &tmp, 0);
+ if (*tmp || nr_fats < 1 || nr_fats > 4)
+@@ -1796,8 +2282,10 @@
+ else if (listfile)
+ get_list_blocks (listfile);
+
+- write_tables (); /* Write the file system tables away! */
+
++ if (dirname) add_root_directory(dirname);
++
++ write_tables (); /* Write the file system tables away! */
+ exit (0); /* Terminate with no errors! */
+ }
+
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 0000000..4987aa3
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/msdos_fat12_undefined.patch
@@ -0,0 +1,12 @@
+--- dosfstools-2.10/dosfsck/boot.c.orig 2004-10-15 08:51:42.394725176 -0600
++++ dosfstools-2.10/dosfsck/boot.c 2004-10-15 08:49:16.776862456 -0600
+@@ -14,6 +14,9 @@
+ #include "io.h"
+ #include "boot.h"
+
++#ifndef MSDOS_FAT12
++#define MSDOS_FAT12 4084
++#endif
+
+ #define ROUND_TO_MULTIPLE(n,m) ((n) && (m) ? (n)+(m)-1-((n)-1)%(m) : 0)
+ /* 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 0000000..100044b
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb
@@ -0,0 +1,22 @@
+# dosfstools OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+DESCRIPTION = "DOS FAT Filesystem Utilities"
+
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+PR = "r2"
+
+SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+ file://alignment_hack.patch;patch=1 \
+ file://dosfstools-2.10-kernel-2.6.patch;patch=1 \
+ file://msdos_fat12_undefined.patch;patch=1 \
+ file://include-linux-types.patch;patch=1"
+
+do_install () {
+ oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
+ "MANDIR=${D}${mandir}/man8" install
+}
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 0000000..a5f6e03
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -0,0 +1,21 @@
+# dosfstools OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+DESCRIPTION = "DOS FAT Filesystem Utilities"
+
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+PR = "r0"
+
+SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+ file://alignment_hack.patch;patch=1 \
+ file://msdos_fat12_undefined.patch;patch=1 \
+ file://include-linux-types.patch;patch=1"
+
+do_install () {
+ oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
+ "MANDIR=${D}${mandir}/man8" install
+}
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
new file mode 100644
index 0000000..7a4a1a6
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -0,0 +1,40 @@
+DESCRIPTION = "Package maintenance system for Debian."
+LICENSE = "GPL"
+SECTION = "base"
+PR = "r7"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz \
+ file://ignore_extra_fields.patch;patch=1 \
+ file://noupdalt.patch;patch=1"
+
+DEPENDS = "zlib bzip2"
+DEPENDS_virtclass-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}"
+RDEPENDS_${PN}_virtclass-native = ""
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+PARALLEL_MAKE = ""
+
+inherit autotools gettext
+
+DPKG_INIT_POSITION = "98"
+DPKG_INIT_POSITION_slugos = "41"
+
+pkg_postinst_dpkg () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ install -d $D/${sysconfdir}/rcS.d
+ # this happens at S98 where our good 'ole packages script used to run
+ echo -e "#!/bin/sh
+ dpkg --configure -a
+ rm -f /${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
+" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
+ chmod 0755 $D/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
+fi
+}
+
+do_configure () {
+ echo >> m4/compiler.m4
+ autotools_do_configure
+}
diff --git a/meta/recipes-devtools/dpkg/dpkg/autofoo.patch b/meta/recipes-devtools/dpkg/dpkg/autofoo.patch
new file mode 100644
index 0000000..691121e
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/autofoo.patch
@@ -0,0 +1,48 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- dpkg-1.10.23/configure.in~autofoo
++++ dpkg-1.10.23/configure.in
+@@ -227,21 +227,36 @@
+ # OpenBSD passes AC_TRY_COMPILE for va_copy even though
+ # it doesn't seem to exist, which is odd. We need to use
+ # AC_TRY_RUN.
++#
++# If crosscompiling, use AC_TRY_COMPILE. -CL
+ AC_TRY_RUN([
+ #include <stdarg.h>
+ main(){
+ va_list v1,v2;
+ va_copy(v1, v2);
+ exit(0);}
+-], [AC_MSG_RESULT(yes)
+-AC_DEFINE(HAVE_VA_COPY,,[Whether the va_copy macro exists])],[AC_MSG_RESULT(no)
+-AC_MSG_CHECKING([for va_list assignment copy])
++], [dpkg_cv_va_copy=yes], [dpkg_cv_va_copy=no],
+ AC_TRY_COMPILE([
+ #include <stdarg.h>
++main(){
++va_list v1,v2;
++va_copy(v1, v2);
++exit(0);}
++], [dpkg_cv_va_copy=yes], [dpkg_vc_va_copy=no]))
++
++if test "$dpkg_cv_va_copy" = "yes"; then
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_VA_COPY,,[Whether the va_copy macro exists])
++else
++ AC_MSG_RESULT(no)
++ AC_MSG_CHECKING([for va_list assignment copy])
++ AC_TRY_COMPILE([
++#include <stdarg.h>
+ ],[
+ va_list v1,v2;
+ v1 = v2;
+-], AC_MSG_RESULT(yes),AC_MSG_ERROR(no))])
++], AC_MSG_RESULT(yes), AC_MSG_ERROR(no))
++fi
+
+ DPKG_C_GCC_ATTRIBUTE([,,],supported,[int x],[,,],ATTRIB,[Define if function attributes a la GCC 2.5 and higher are available.],
+ 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 0000000..d09343c
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
@@ -0,0 +1,26 @@
+ dpkg-deb/build.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- dpkg-1.14.19.orig/dpkg-deb/build.c
++++ dpkg-1.14.19/dpkg-deb/build.c
+@@ -241,18 +241,18 @@ void do_build(const char *const *argv) {
+ if (checkedinfo->priority == pri_other) {
+ fprintf(stderr, _("warning, `%s' contains user-defined Priority value `%s'\n"),
+ controlfile, checkedinfo->otherpriority);
+ warns++;
+ }
+- for (field= checkedinfo->available.arbs; field; field= field->next) {
++ /*for (field= checkedinfo->available.arbs; field; field= field->next) {
+ if (known_arbitrary_field(field))
+ continue;
+
+ fprintf(stderr, _("warning, `%s' contains user-defined field `%s'\n"),
+ controlfile, field->name);
+ warns++;
+- }
++ }*/
+ checkversion(checkedinfo->available.version.version,"(upstream) version",&errs);
+ checkversion(checkedinfo->available.version.revision,"Debian revision",&errs);
+ if (errs) ohshit(_("%d errors in control file"),errs);
+
+ 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 0000000..3a8beae
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/nochroot.patch
@@ -0,0 +1,18 @@
+---
+ src/help.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- dpkg-1.13.22.orig/src/help.c
++++ dpkg-1.13.22/src/help.c
+@@ -175,9 +175,11 @@ static const char* preexecscript(const c
+ */
+ size_t instdirl;
+
++#if 0
+ if (*instdir) {
+ if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir);
+ }
++#endif
+ if (f_debug & dbg_scripts) {
+ fprintf(stderr,"D0%05o: fork/exec %s (",dbg_scripts,path);
+ 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 0000000..f5984fe
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch
@@ -0,0 +1,16 @@
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- dpkg-1.13.22.orig/Makefile.am
++++ dpkg-1.13.22/Makefile.am
+@@ -15,8 +15,7 @@ SUBDIRS = \
+ utils \
+ scripts \
+ po \
+- origins \
+- man
++ origins
+
+ ACLOCAL_AMFLAGS = -I m4
+
diff --git a/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch b/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch
new file mode 100644
index 0000000..023e99a
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/noupdalt.patch
@@ -0,0 +1,16 @@
+---
+ scripts/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- dpkg-1.13.22.orig/scripts/Makefile.am
++++ dpkg-1.13.22/scripts/Makefile.am
+@@ -20,8 +20,7 @@ bin_SCRIPTS = \
+ sbin_SCRIPTS = \
+ cleanup-info \
+ dpkg-divert \
+- dpkg-statoverride \
+- update-alternatives
++ dpkg-statoverride
+
+ changelogdir = $(pkglibdir)/parsechangelog
+ 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 0000000..1e54306
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg_1.14.19.bb
@@ -0,0 +1,13 @@
+require dpkg.inc
+
+SRC_URI += "file://noman.patch;patch=1"
+
+EXTRA_OECONF = "--without-static-progs \
+ --without-dselect \
+ --with-start-stop-daemon \
+ --with-zlib \
+ --with-bz2lib \
+ --without-selinux \
+ --without-sgml-doc"
+
+BBCLASSEXTEND = "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 0000000..4b00668
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/acinclude.m4
@@ -0,0 +1,86 @@
+# Extracted from the package's shipped aclocal.m4. Custom macros should be in
+# acinclude.m4 so running aclocal doesn't blow them away.
+#
+# RP 1/6/2010
+
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/check_gnu_make.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# CHECK_GNU_MAKE()
+#
+# DESCRIPTION
+#
+# This macro searches for a GNU version of make. If a match is found, the
+# makefile variable `ifGNUmake' is set to the empty string, otherwise it
+# is set to "#". This is useful for including a special features in a
+# Makefile, which cannot be handled by other versions of make. The
+# variable _cv_gnu_make_command is set to the command to invoke GNU make
+# if it exists, the empty string otherwise.
+#
+# Here is an example of its use:
+#
+# Makefile.in might contain:
+#
+# # A failsafe way of putting a dependency rule into a makefile
+# $(DEPEND):
+# $(CC) -MM $(srcdir)/*.c > $(DEPEND)
+#
+# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
+# @ifGNUmake@ include $(DEPEND)
+# @ifGNUmake@ endif
+#
+# Then configure.in would normally contain:
+#
+# CHECK_GNU_MAKE()
+# AC_OUTPUT(Makefile)
+#
+# Then perhaps to cause gnu make to override any other make, we could do
+# something like this (note that GNU make always looks for GNUmakefile
+# first):
+#
+# if ! test x$_cv_gnu_make_command = x ; then
+# mv Makefile GNUmakefile
+# echo .DEFAULT: > Makefile ;
+# echo \ $_cv_gnu_make_command \$@ >> Makefile;
+# fi
+#
+# Then, if any (well almost any) other make is called, and GNU make also
+# exists, then the other make wraps the GNU make.
+#
+# LICENSE
+#
+# Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+#
+# Note: Modified by Ted Ts'o to add @ifNotGNUMake@
+
+AC_DEFUN(
+ [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
+ _cv_gnu_make_command='' ;
+dnl Search all the common names for GNU make
+ for a in "$MAKE" make gmake gnumake ; do
+ if test -z "$a" ; then continue ; fi ;
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
+ _cv_gnu_make_command=$a ;
+ break;
+ fi
+ done ;
+ ) ;
+dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
+ if test "x$_cv_gnu_make_command" != "x" ; then
+ ifGNUmake='' ;
+ ifNotGNUmake='#' ;
+ else
+ ifGNUmake='#' ;
+ ifNotGNUmake='' ;
+ AC_MSG_RESULT("Not found");
+ fi
+ AC_SUBST(ifGNUmake)
+ AC_SUBST(ifNotGNUmake)
+] )
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 0000000..b0577e3
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/mkdir.patch
@@ -0,0 +1,26 @@
+Index: e2fsprogs-1.41.5/po/Makefile.in.in
+===================================================================
+--- e2fsprogs-1.41.5.orig/po/Makefile.in.in 2009-02-14 13:49:08.000000000 +0000
++++ e2fsprogs-1.41.5/po/Makefile.in.in 2009-08-19 17:52:31.000000000 +0100
+@@ -30,7 +30,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ MKINSTALLDIRS = @MKINSTALLDIRS@
+-mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
++mkinstalldirs = $(MKINSTALLDIRS)
+
+ GMSGFMT = @GMSGFMT@
+ MSGFMT = @MSGFMT@
+Index: e2fsprogs-1.41.5/configure.in
+===================================================================
+--- e2fsprogs-1.41.5.orig/configure.in 2009-08-19 17:53:50.000000000 +0100
++++ e2fsprogs-1.41.5/configure.in 2009-08-19 17:48:38.000000000 +0100
+@@ -970,6 +970,8 @@
+ fi
+ AC_SUBST(BUILD_CFLAGS)
+ AC_SUBST(BUILD_LDFLAGS)
++MKINSTALLDIRS="mkdir -p"
++AC_SUBST(MKINSTALLDIRS)
+ dnl
+ dnl Make our output files, being sure that we create the some miscellaneous
+ 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 0000000..528e319
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.41.12/quotefix.patch
@@ -0,0 +1,43 @@
+These macros are underquoted and break with recent autoconf+automake
+combinations.
+
+RP 1/2/10
+
+Index: e2fsprogs-1.41.5/configure.in
+===================================================================
+--- e2fsprogs-1.41.5.orig/configure.in 2010-02-01 11:40:10.547790252 +0000
++++ e2fsprogs-1.41.5/configure.in 2010-02-01 11:44:51.577876485 +0000
+@@ -397,11 +397,11 @@
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+- AC_CHECK_LIB(blkid, blkid_get_cache,
++ [AC_CHECK_LIB(blkid, blkid_get_cache,
+ [LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
+ [AC_MSG_ERROR([external blkid library not found])],
+- [$LIBBLKID])
++ [$LIBBLKID])]
+ BLKID_CMT=#
+ AC_MSG_RESULT([Disabling private blkid library])
+ else
+@@ -786,15 +786,15 @@
+ dnl
+ SEM_INIT_LIB=''
+ AC_CHECK_FUNC(sem_init, ,
+- AC_CHECK_LIB(pthread, sem_init,
++ [AC_CHECK_LIB(pthread, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT)
+ SEM_INIT_LIB=-lpthread,
+- AC_CHECK_LIB(rt, sem_init,
++ [AC_CHECK_LIB(rt, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT)
+ SEM_INIT_LIB=-lrt,
+- AC_CHECK_LIB(posix4, sem_init,
++ [AC_CHECK_LIB(posix4, sem_init,
+ AC_DEFINE(HAVE_SEM_INIT)
+- SEM_INIT_LIB=-lposix4))))dnl
++ SEM_INIT_LIB=-lposix4)])])])dnl
+ AC_SUBST(SEM_INIT_LIB)
+ dnl
+ 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 0000000..a107178
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "The Ext2 Filesystem Utilities (e2fsprogs) contain all of the standard utilities for creating, fixing, configuring , and debugging ext2 filesystems."
+HOMEPAGE = "http://e2fsprogs.sourceforge.net/"
+
+LICENSE = "GPLv2 & LGPLv2 & BSD & MIT"
+LICENSE_e2fsprogs-blkid = "LGPLv2"
+LICENSE_e2fsprogs-e2fsck = "GPLv2"
+LICENSE_e2fsprogs-mke2fs = "GPLv2"
+LICENSE_e2fsprogs-fsck = "GPLv2"
+LICENSE_e2fsprogs-tune2fs = "GPLv2"
+LICENSE_e2fsprogs-badblocks = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b48f21d765b875bd10400975d12c1ca2 \
+ file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
+ file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
+ file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
+ file://lib/uuid/COPYING;md5=58dcd8452651fc8b07d1f65ce07ca8af \
+ file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
+ file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
+SECTION = "base"
+DEPENDS = "gettext util-linux"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz \
+ file://mkdir.patch;apply=yes"
+
+inherit autotools
+
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 0000000..15c8047
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.41.12.bb
@@ -0,0 +1,46 @@
+require e2fsprogs.inc
+
+PR = "r19"
+
+SRC_URI += "file://quotefix.patch;patch=1 \
+ file://acinclude.m4"
+#file://no-hardlinks.patch;patch=1 \
+
+PARALLEL_MAKE = ""
+
+EXTRA_OECONF += " --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid"
+EXTRA_OECONF_darwin = "--sbindir=${base_sbindir} --enable-bsd-shlibs"
+EXTRA_OECONF_darwin8 = "--sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+do_configure_prepend () {
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_compile_prepend () {
+ find ./ -print|xargs chmod u=rwX
+ ( cd util; ${BUILD_CC} subst.c -o subst )
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-libs
+ # We use blkid from util-linux now so remove from here
+ rm -f ${D}${libdir}/libblkid*
+ rm -rf ${D}${includedir}/blkid
+ rm -f ${D}${libdir}/pkgconfig/blkid.pc
+}
+
+# blkid used to be part of e2fsprogs but is useful outside, add it
+# as an RDEPENDS so that anything relying on it being in e2fsprogs
+# still works
+RDEPENDS_e2fsprogs = "e2fsprogs-blkid e2fsprogs-badblocks"
+
+PACKAGES =+ "e2fsprogs-blkid e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-tune2fs e2fsprogs-badblocks"
+FILES_e2fsprogs-blkid = "${base_sbindir}/blkid"
+FILES_e2fsprogs-fsck = "${base_sbindir}/fsck"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext*"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+
+BBCLASSEXTEND = "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 0000000..680e044
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.108/warnings.patch
@@ -0,0 +1,132 @@
+Index: elfutils-0.108/configure.ac
+===================================================================
+--- elfutils-0.108.orig/configure.ac 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/configure.ac 2006-04-10 19:19:33.000000000 +0100
+@@ -49,6 +49,10 @@
+ dnl Add all the languages for which translations are available.
+ ALL_LINGUAS=
+
++if test X"$CFLAGS" = X; then
++ CFLAGS="-Wall -g -O2"
++fi
++
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+Index: elfutils-0.108/lib/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/lib/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/lib/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -21,7 +21,7 @@
+ else
+ AM_CFLAGS =
+ endif
+-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
++AM_CFLAGS += -fpic -Wshadow -Wunused $($(*F)_CFLAGS)
+ INCLUDES = -I$(srcdir)/../libelf -I..
+
+ noinst_LIBRARIES = libeu.a
+Index: elfutils-0.108/libasm/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/libasm/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/libasm/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -18,7 +18,7 @@
+ else
+ AM_CFLAGS =
+ endif
+-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
++AM_CFLAGS += -Wshadow -Wunused -Wformat=2
+ INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
+ -I$(top_srcdir)/lib
+ GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
+Index: elfutils-0.108/libcpu/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/libcpu/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/libcpu/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -13,7 +13,7 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
+-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
++AM_CFLAGS = -Wshadow -Wformat=2 -Wunused
+ INCLUDES = -I$(srcdir)
+
+ noinst_LIBRARIES = libcpu_i386.a
+Index: elfutils-0.108/libdw/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/libdw/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/libdw/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -18,7 +18,7 @@
+ else
+ AM_CFLAGS =
+ endif
+-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
++AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99
+ INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
+ VERSION = 1
+
+Index: elfutils-0.108/libebl/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/libebl/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/libebl/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -18,7 +18,7 @@
+ else
+ AM_CFLAGS =
+ endif
+-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
++AM_CFLAGS += -fpic -Wshadow -Wunused -Wformat=2 \
+ -std=gnu99
+
+ INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
+Index: elfutils-0.108/libelf/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/libelf/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/libelf/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -21,7 +21,7 @@
+ else
+ AM_CFLAGS =
+ endif
+-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
++AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 \
+ $($(*F)_CFLAGS)
+ INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
+ GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
+Index: elfutils-0.108/src/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/src/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/src/Makefile.am 2006-04-10 19:20:19.000000000 +0100
+@@ -15,14 +15,12 @@
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
+ -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
+ if MUDFLAP
+-AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
++AM_CFLAGS = -Wshadow -Wunused -std=gnu99 -fmudflap \
+ $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
+ $(if $($(*F)_no_Wformat),,-Wformat=2)
+ else
+-AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
+- $(if $($(*F)_no_Werror),,-Werror) \
+- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+- $(if $($(*F)_no_Wformat),,-Wformat=2)
++AM_CFLAGS = -Wshadow -std=gnu99 $(native_ld_cflags) \
++ $(if $($(*F)_no_Werror),,)
+ endif
+ if MUDFLAP
+ libmudflap = -lmudflap
+Index: elfutils-0.108/tests/Makefile.am
+===================================================================
+--- elfutils-0.108.orig/tests/Makefile.am 2006-04-10 19:18:34.000000000 +0100
++++ elfutils-0.108/tests/Makefile.am 2006-04-10 19:19:33.000000000 +0100
+@@ -14,10 +14,10 @@
+ ##
+ DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
+ if MUDFLAP
+-AM_CFLAGS = -Wall -Werror -std=gnu99 -fmudflap\
++AM_CFLAGS = -std=gnu99 -fmudflap\
+ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
+ else
+-AM_CFLAGS = -Wall -Werror -std=gnu99 \
++AM_CFLAGS = -std=gnu99 \
+ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
+ AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
+ 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 0000000..a309d1b
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
@@ -0,0 +1,447 @@
+Index: elfutils-0.146/backends/arm_init.c
+===================================================================
+--- elfutils-0.146.orig/backends/arm_init.c 2009-04-21 14:50:01.000000000 +0000
++++ elfutils-0.146/backends/arm_init.c 2010-04-24 10:11:13.000000000 +0000
+@@ -32,21 +32,32 @@
+ #define RELOC_PREFIX R_ARM_
+ #include "libebl_CPU.h"
+
++#include "libebl_arm.h"
++
+ /* This defines the common reloc hooks based on arm_reloc.def. */
+ #include "common-reloc.c"
+
+
+ const char *
+ arm_init (elf, machine, eh, ehlen)
+- Elf *elf __attribute__ ((unused));
++ Elf *elf;
+ GElf_Half machine __attribute__ ((unused));
+ Ebl *eh;
+ size_t ehlen;
+ {
++ int soft_float = 0;
++
+ /* Check whether the Elf_BH object has a sufficent size. */
+ if (ehlen < sizeof (Ebl))
+ return NULL;
+
++ if (elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
++ soft_float = 1;
++ }
++
+ /* We handle it. */
+ eh->name = "ARM";
+ arm_init_reloc (eh);
+@@ -58,7 +69,10 @@
+ HOOK (eh, core_note);
+ HOOK (eh, auxv_info);
+ HOOK (eh, check_object_attribute);
+- HOOK (eh, return_value_location);
++ if (soft_float)
++ eh->return_value_location = arm_return_value_location_soft;
++ else
++ eh->return_value_location = arm_return_value_location_hard;
+
+ return MODVERSION;
+ }
+Index: elfutils-0.146/backends/arm_regs.c
+===================================================================
+--- elfutils-0.146.orig/backends/arm_regs.c 2009-04-21 14:50:01.000000000 +0000
++++ elfutils-0.146/backends/arm_regs.c 2010-04-24 10:11:13.000000000 +0000
+@@ -28,6 +28,7 @@
+ #endif
+
+ #include <string.h>
++#include <stdio.h>
+ #include <dwarf.h>
+
+ #define BACKEND arm_
+@@ -58,7 +59,15 @@
+ namelen = 2;
+ break;
+
+- case 10 ... 12:
++ case 10 ... 11:
++ name[0] = 'r';
++ name[1] = '1';
++ name[2] = regno % 10 + '0';
++ namelen = 3;
++ break;
++
++ case 12:
++ *type = DW_ATE_unsigned;
+ name[0] = 'r';
+ name[1] = '1';
+ name[2] = regno % 10 + '0';
+@@ -73,6 +82,9 @@
+ break;
+
+ case 16 + 0 ... 16 + 7:
++ /* AADWARF says that there are no registers in that range,
++ * but gcc maps FPA registers here
++ */
+ regno += 96 - 16;
+ /* Fall through. */
+ case 96 + 0 ... 96 + 7:
+@@ -84,11 +96,139 @@
+ namelen = 2;
+ break;
+
++ case 64 + 0 ... 64 + 9:
++ *setname = "VFP";
++ *bits = 32;
++ *type = DW_ATE_float;
++ name[0] = 's';
++ name[1] = regno - 64 + '0';
++ namelen = 2;
++ break;
++
++ case 64 + 10 ... 64 + 31:
++ *setname = "VFP";
++ *bits = 32;
++ *type = DW_ATE_float;
++ name[0] = 's';
++ name[1] = (regno - 64) / 10 + '0';
++ name[2] = (regno - 64) % 10 + '0';
++ namelen = 3;
++ break;
++
++ case 104 + 0 ... 104 + 7:
++ /* XXX TODO:
++ * This can be either intel wireless MMX general purpose/control
++ * registers or xscale accumulator, which have different usage.
++ * We only have the intel wireless MMX here now.
++ * The name needs to be changed for the xscale accumulator too. */
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 32;
++ memcpy(name, "wcgr", 4);
++ name[4] = regno - 104 + '0';
++ namelen = 5;
++ break;
++
++ case 112 + 0 ... 112 + 9:
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 64;
++ name[0] = 'w';
++ name[1] = 'r';
++ name[2] = regno - 112 + '0';
++ namelen = 3;
++ break;
++
++ case 112 + 10 ... 112 + 15:
++ *setname = "MMX";
++ *type = DW_ATE_unsigned;
++ *bits = 64;
++ name[0] = 'w';
++ name[1] = 'r';
++ name[2] = '1';
++ name[3] = regno - 112 - 10 + '0';
++ namelen = 4;
++ break;
++
+ case 128:
++ *setname = "special";
+ *type = DW_ATE_unsigned;
+ return stpcpy (name, "spsr") + 1 - name;
+
++ case 129:
++ *setname = "special";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_fiq") + 1 - name;
++
++ case 130:
++ *setname = "special";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_irq") + 1 - name;
++
++ case 131:
++ *setname = "special";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_abt") + 1 - name;
++
++ case 132:
++ *setname = "special";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_und") + 1 - name;
++
++ case 133:
++ *setname = "special";
++ *type = DW_ATE_unsigned;
++ return stpcpy(name, "spsr_svc") + 1 - name;
++
++ case 144 ... 150:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
++
++ case 151 ... 157:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
++
++ case 158 ... 159:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
++
++ case 160 ... 161:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
++
++ case 162 ... 163:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
++
++ case 164 ... 165:
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
++
++ case 192 ... 199:
++ *setname = "MMX";
++ *bits = 32;
++ *type = DW_ATE_unsigned;
++ name[0] = 'w';
++ name[1] = 'c';
++ name[2] = regno - 192 + '0';
++ namelen = 3;
++ break;
++
+ case 256 + 0 ... 256 + 9:
++ /* XXX TODO: Neon also uses those registers and can contain
++ * both float and integers */
+ *setname = "VFP";
+ *type = DW_ATE_float;
+ *bits = 64;
+Index: elfutils-0.146/backends/arm_retval.c
+===================================================================
+--- elfutils-0.146.orig/backends/arm_retval.c 2010-01-12 16:57:54.000000000 +0000
++++ elfutils-0.146/backends/arm_retval.c 2010-04-24 10:11:13.000000000 +0000
+@@ -45,6 +45,13 @@
+ #define nloc_intreg 1
+ #define nloc_intregs(n) (2 * (n))
+
++/* f1 */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_reg16 },
++ };
++#define nloc_fpreg 1
++
+ /* The return value is a structure and is actually stored in stack space
+ passed in a hidden argument by the caller. But, the compiler
+ helpfully returns the address of that space in r0. */
+@@ -55,8 +62,9 @@
+ #define nloc_aggregate 1
+
+
+-int
+-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++static int
++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
++ int soft_float)
+ {
+ /* Start with the function's type, and get the DW_AT_type attribute,
+ which is the type of the return value. */
+@@ -109,14 +117,31 @@
+ else
+ return -1;
+ }
++ if (tag == DW_TAG_base_type)
++ {
++ Dwarf_Word encoding;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++ if ((encoding == DW_ATE_float) && !soft_float)
++ {
++ *locp = loc_fpreg;
++ if (size <= 8)
++ return nloc_fpreg;
++ goto aggregate;
++ }
++ }
+ if (size <= 16)
+ {
+ intreg:
+ *locp = loc_intreg;
+ return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
+ }
++ /* fall through. */
+
+ aggregate:
++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+
+@@ -135,3 +160,18 @@
+ DWARF and might be valid. */
+ return -2;
+ }
++
++/* return location for -mabi=apcs-gnu -msoft-float */
++int
++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return arm_return_value_location_ (functypedie, locp, 1);
++}
++
++/* return location for -mabi=apcs-gnu -mhard-float (current default) */
++int
++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return arm_return_value_location_ (functypedie, locp, 0);
++}
++
+Index: elfutils-0.146/libelf/elf.h
+===================================================================
+--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:11.000000000 +0000
++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
+@@ -2290,6 +2290,9 @@
+ #define EF_ARM_EABI_VER4 0x04000000
+ #define EF_ARM_EABI_VER5 0x05000000
+
++/* EI_OSABI values */
++#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
++
+ /* Additional symbol types for Thumb. */
+ #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
+ #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
+@@ -2307,12 +2310,19 @@
+
+ /* Processor specific values for the Phdr p_type field. */
+ #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
++#define PT_ARM_UNWIND PT_ARM_EXIDX
+
+ /* Processor specific values for the Shdr sh_type field. */
+ #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
+ #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
+ #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
+
++/* Processor specific values for the Dyn d_tag field. */
++#define DT_ARM_RESERVED1 (DT_LOPROC + 0)
++#define DT_ARM_SYMTABSZ (DT_LOPROC + 1)
++#define DT_ARM_PREEMTMAB (DT_LOPROC + 2)
++#define DT_ARM_RESERVED2 (DT_LOPROC + 3)
++#define DT_ARM_NUM 4
+
+ /* ARM relocs. */
+
+@@ -2344,12 +2354,75 @@
+ #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
+ #define R_ARM_GOT32 26 /* 32 bit GOT entry */
+ #define R_ARM_PLT32 27 /* 32 bit PLT address */
++#define R_ARM_CALL 28
++#define R_ARM_JUMP24 29
++#define R_ARM_THM_JUMP24 30
++#define R_ARM_BASE_ABS 31
+ #define R_ARM_ALU_PCREL_7_0 32
+ #define R_ARM_ALU_PCREL_15_8 33
+ #define R_ARM_ALU_PCREL_23_15 34
+ #define R_ARM_LDR_SBREL_11_0 35
+ #define R_ARM_ALU_SBREL_19_12 36
+ #define R_ARM_ALU_SBREL_27_20 37
++#define R_ARM_TARGET1 38
++#define R_ARM_SBREL31 39
++#define R_ARM_V4BX 40
++#define R_ARM_TARGET2 41
++#define R_ARM_PREL31 42
++#define R_ARM_MOVW_ABS_NC 43
++#define R_ARM_MOVT_ABS 44
++#define R_ARM_MOVW_PREL_NC 45
++#define R_ARM_MOVT_PREL 46
++#define R_ARM_THM_MOVW_ABS_NC 47
++#define R_ARM_THM_MOVT_ABS 48
++#define R_ARM_THM_MOVW_PREL_NC 49
++#define R_ARM_THM_MOVT_PREL 50
++#define R_ARM_THM_JUMP19 51
++#define R_ARM_THM_JUMP6 52
++#define R_ARM_THM_ALU_PREL_11_0 53
++#define R_ARM_THM_PC12 54
++#define R_ARM_ABS32_NOI 55
++#define R_ARM_REL32_NOI 56
++#define R_ARM_ALU_PC_G0_NC 57
++#define R_ARM_ALU_PC_G0 58
++#define R_ARM_ALU_PC_G1_NC 59
++#define R_ARM_ALU_PC_G1 60
++#define R_ARM_ALU_PC_G2 61
++#define R_ARM_LDR_PC_G1 62
++#define R_ARM_LDR_PC_G2 63
++#define R_ARM_LDRS_PC_G0 64
++#define R_ARM_LDRS_PC_G1 65
++#define R_ARM_LDRS_PC_G2 66
++#define R_ARM_LDC_PC_G0 67
++#define R_ARM_LDC_PC_G1 68
++#define R_ARM_LDC_PC_G2 69
++#define R_ARM_ALU_SB_G0_NC 70
++#define R_ARM_ALU_SB_G0 71
++#define R_ARM_ALU_SB_G1_NC 72
++#define R_ARM_ALU_SB_G1 73
++#define R_ARM_ALU_SB_G2 74
++#define R_ARM_LDR_SB_G0 75
++#define R_ARM_LDR_SB_G1 76
++#define R_ARM_LDR_SB_G2 77
++#define R_ARM_LDRS_SB_G0 78
++#define R_ARM_LDRS_SB_G1 79
++#define R_ARM_LDRS_SB_G2 80
++#define R_ARM_LDC_G0 81
++#define R_ARM_LDC_G1 82
++#define R_ARM_LDC_G2 83
++#define R_ARM_MOVW_BREL_NC 84
++#define R_ARM_MOVT_BREL 85
++#define R_ARM_MOVW_BREL 86
++#define R_ARM_THM_MOVW_BREL_NC 87
++#define R_ARM_THM_MOVT_BREL 88
++#define R_ARM_THM_MOVW_BREL 89
++/* 90-93 unallocated */
++#define R_ARM_PLT32_ABS 94
++#define R_ARM_GOT_ABS 95
++#define R_ARM_GOT_PREL 96
++#define R_ARM_GOT_BREL12 97
++#define R_ARM_GOTOFF12 98
++#define R_ARM_GOTRELAX 99
+ #define R_ARM_GNU_VTENTRY 100
+ #define R_ARM_GNU_VTINHERIT 101
+ #define R_ARM_THM_PC11 102 /* thumb unconditional branch */
+@@ -2364,6 +2437,12 @@
+ static TLS block offset */
+ #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
+ TLS block */
++#define R_ARM_TLS_LDO12 109
++#define R_ARM_TLS_LE12 110
++#define R_ARM_TLS_IE12GP 111
++/* 112 - 127 private range */
++#define R_ARM_ME_TOO 128 /* obsolete */
++
+ #define R_ARM_RXPC25 249
+ #define R_ARM_RSBREL32 250
+ #define R_ARM_THM_RPC22 251
+Index: elfutils-0.146/backends/libebl_arm.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/libebl_arm.h 2010-04-24 10:11:13.000000000 +0000
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#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 0000000..41afa5e
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/do-autoreconf.diff
@@ -0,0 +1,337 @@
+Generated by copying the whole dir, running `sh debian/autogen.sh` and diffing.
+
+Index: elfutils-0.148/backends/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/backends/Makefile.in 2010-07-03 13:07:10.000000000 +0000
++++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:13:52.000000000 +0000
+@@ -77,39 +77,54 @@
+ am__objects_4 = ia64_init.$(OBJEXT) ia64_symbol.$(OBJEXT) \
+ ia64_regs.$(OBJEXT) ia64_retval.$(OBJEXT)
+ libebl_ia64_pic_a_OBJECTS = $(am_libebl_ia64_pic_a_OBJECTS)
++libebl_m68k_pic_a_AR = $(AR) $(ARFLAGS)
++libebl_m68k_pic_a_LIBADD =
++am__objects_5 = m68k_init.$(OBJEXT) m68k_symbol.$(OBJEXT) \
++ m68k_regs.$(OBJEXT)
++libebl_m68k_pic_a_OBJECTS = $(am_libebl_m68k_pic_a_OBJECTS)
++libebl_mips_pic_a_AR = $(AR) $(ARFLAGS)
++libebl_mips_pic_a_LIBADD =
++am__objects_6 = mips_init.$(OBJEXT) mips_symbol.$(OBJEXT) \
++ mips_regs.$(OBJEXT) mips_retval.$(OBJEXT)
++libebl_mips_pic_a_OBJECTS = $(am_libebl_mips_pic_a_OBJECTS)
++libebl_parisc_pic_a_AR = $(AR) $(ARFLAGS)
++libebl_parisc_pic_a_LIBADD =
++am__objects_7 = parisc_init.$(OBJEXT) parisc_symbol.$(OBJEXT) \
++ parisc_regs.$(OBJEXT) parisc_retval.$(OBJEXT)
++libebl_parisc_pic_a_OBJECTS = $(am_libebl_parisc_pic_a_OBJECTS)
+ libebl_ppc64_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_ppc64_pic_a_LIBADD =
+-am__objects_5 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \
++am__objects_8 = ppc64_init.$(OBJEXT) ppc64_symbol.$(OBJEXT) \
+ ppc64_retval.$(OBJEXT) ppc64_corenote.$(OBJEXT) \
+ ppc_regs.$(OBJEXT) ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) \
+ ppc_syscall.$(OBJEXT)
+ libebl_ppc64_pic_a_OBJECTS = $(am_libebl_ppc64_pic_a_OBJECTS)
+ libebl_ppc_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_ppc_pic_a_LIBADD =
+-am__objects_6 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \
++am__objects_9 = ppc_init.$(OBJEXT) ppc_symbol.$(OBJEXT) \
+ ppc_retval.$(OBJEXT) ppc_regs.$(OBJEXT) ppc_corenote.$(OBJEXT) \
+ ppc_auxv.$(OBJEXT) ppc_attrs.$(OBJEXT) ppc_syscall.$(OBJEXT)
+ libebl_ppc_pic_a_OBJECTS = $(am_libebl_ppc_pic_a_OBJECTS)
+ libebl_s390_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_s390_pic_a_LIBADD =
+-am__objects_7 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \
++am__objects_10 = s390_init.$(OBJEXT) s390_symbol.$(OBJEXT) \
+ s390_regs.$(OBJEXT) s390_retval.$(OBJEXT)
+ libebl_s390_pic_a_OBJECTS = $(am_libebl_s390_pic_a_OBJECTS)
+ libebl_sh_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_sh_pic_a_LIBADD =
+-am__objects_8 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \
++am__objects_11 = sh_init.$(OBJEXT) sh_symbol.$(OBJEXT) \
+ sh_corenote.$(OBJEXT) sh_regs.$(OBJEXT) sh_retval.$(OBJEXT)
+ libebl_sh_pic_a_OBJECTS = $(am_libebl_sh_pic_a_OBJECTS)
+ libebl_sparc_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_sparc_pic_a_LIBADD =
+-am__objects_9 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \
++am__objects_12 = sparc_init.$(OBJEXT) sparc_symbol.$(OBJEXT) \
+ sparc_regs.$(OBJEXT) sparc_retval.$(OBJEXT) \
+ sparc_corenote.$(OBJEXT) sparc64_corenote.$(OBJEXT) \
+ sparc_auxv.$(OBJEXT)
+ libebl_sparc_pic_a_OBJECTS = $(am_libebl_sparc_pic_a_OBJECTS)
+ libebl_x86_64_pic_a_AR = $(AR) $(ARFLAGS)
+ libebl_x86_64_pic_a_LIBADD =
+-am__objects_10 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \
++am__objects_13 = x86_64_init.$(OBJEXT) x86_64_symbol.$(OBJEXT) \
+ x86_64_corenote.$(OBJEXT) x86_64_cfi.$(OBJEXT) \
+ x86_64_retval.$(OBJEXT) x86_64_regs.$(OBJEXT) \
+ i386_auxv.$(OBJEXT) x86_64_syscall.$(OBJEXT)
+@@ -124,15 +139,18 @@
+ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ SOURCES = $(libebl_alpha_pic_a_SOURCES) $(libebl_arm_pic_a_SOURCES) \
+ $(libebl_i386_pic_a_SOURCES) $(libebl_ia64_pic_a_SOURCES) \
+- $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \
+- $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \
+- $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES)
+-DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \
+- $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \
+- $(libebl_ia64_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \
++ $(libebl_m68k_pic_a_SOURCES) $(libebl_mips_pic_a_SOURCES) \
++ $(libebl_parisc_pic_a_SOURCES) $(libebl_ppc64_pic_a_SOURCES) \
+ $(libebl_ppc_pic_a_SOURCES) $(libebl_s390_pic_a_SOURCES) \
+ $(libebl_sh_pic_a_SOURCES) $(libebl_sparc_pic_a_SOURCES) \
+ $(libebl_x86_64_pic_a_SOURCES)
++DIST_SOURCES = $(libebl_alpha_pic_a_SOURCES) \
++ $(libebl_arm_pic_a_SOURCES) $(libebl_i386_pic_a_SOURCES) \
++ $(libebl_ia64_pic_a_SOURCES) $(libebl_m68k_pic_a_SOURCES) \
++ $(libebl_mips_pic_a_SOURCES) $(libebl_parisc_pic_a_SOURCES) \
++ $(libebl_ppc64_pic_a_SOURCES) $(libebl_ppc_pic_a_SOURCES) \
++ $(libebl_s390_pic_a_SOURCES) $(libebl_sh_pic_a_SOURCES) \
++ $(libebl_sparc_pic_a_SOURCES) $(libebl_x86_64_pic_a_SOURCES)
+ DATA = $(noinst_DATA)
+ HEADERS = $(noinst_HEADERS)
+ ETAGS = etags
+@@ -270,11 +288,12 @@
+ CLEANFILES = *.gcno *.gcda $(foreach m,$(modules), libebl_$(m).map \
+ libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS))
+ textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
+-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
+- libebl_s390_pic.a
++ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
++ libebl_m68k_pic.a
+
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+@@ -328,6 +347,15 @@
+ s390_SRCS = s390_init.c s390_symbol.c s390_regs.c s390_retval.c
+ libebl_s390_pic_a_SOURCES = $(s390_SRCS)
+ am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
++libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
++am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
+ noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
+ EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def)
+ all: all-am
+@@ -383,6 +411,18 @@
+ -rm -f libebl_ia64_pic.a
+ $(libebl_ia64_pic_a_AR) libebl_ia64_pic.a $(libebl_ia64_pic_a_OBJECTS) $(libebl_ia64_pic_a_LIBADD)
+ $(RANLIB) libebl_ia64_pic.a
++libebl_m68k_pic.a: $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_DEPENDENCIES)
++ -rm -f libebl_m68k_pic.a
++ $(libebl_m68k_pic_a_AR) libebl_m68k_pic.a $(libebl_m68k_pic_a_OBJECTS) $(libebl_m68k_pic_a_LIBADD)
++ $(RANLIB) libebl_m68k_pic.a
++libebl_mips_pic.a: $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_DEPENDENCIES)
++ -rm -f libebl_mips_pic.a
++ $(libebl_mips_pic_a_AR) libebl_mips_pic.a $(libebl_mips_pic_a_OBJECTS) $(libebl_mips_pic_a_LIBADD)
++ $(RANLIB) libebl_mips_pic.a
++libebl_parisc_pic.a: $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_DEPENDENCIES)
++ -rm -f libebl_parisc_pic.a
++ $(libebl_parisc_pic_a_AR) libebl_parisc_pic.a $(libebl_parisc_pic_a_OBJECTS) $(libebl_parisc_pic_a_LIBADD)
++ $(RANLIB) libebl_parisc_pic.a
+ libebl_ppc64_pic.a: $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_DEPENDENCIES)
+ -rm -f libebl_ppc64_pic.a
+ $(libebl_ppc64_pic_a_AR) libebl_ppc64_pic.a $(libebl_ppc64_pic_a_OBJECTS) $(libebl_ppc64_pic_a_LIBADD)
+@@ -439,6 +479,17 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_regs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_retval.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ia64_symbol.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_init.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_regs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k_symbol.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_init.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_regs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_retval.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_symbol.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_init.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_regs.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_retval.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parisc_symbol.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_corenote.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_init.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc64_retval.Po@am__quote@
+Index: elfutils-0.148/configure
+===================================================================
+--- elfutils-0.148.orig/configure 2010-07-03 13:06:16.000000000 +0000
++++ elfutils-0.148/configure 2010-07-03 13:13:49.000000000 +0000
+@@ -602,6 +602,8 @@
+ base_cpu
+ NATIVE_LD_FALSE
+ NATIVE_LD_TRUE
++LD_AS_NEEDED
++WEXTRA
+ LEXLIB
+ LEX_OUTPUT_ROOT
+ LEX
+@@ -3852,6 +3854,130 @@
+ as_fn_error "gcc with C99 support required" "$LINENO" 5
+ fi
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5
++$as_echo_n "checking for -Wextra option to $CC... " >&6; }
++if test "${ac_cv_cc_wextra+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ old_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS -Wextra"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++void foo (void) { }
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ ac_cv_cc_wextra=yes
++else
++ ac_cv_cc_wextra=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CFLAGS="$old_CFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5
++$as_echo "$ac_cv_cc_wextra" >&6; }
++
++if test "x$ac_cv_cc_wextra" = xyes; then :
++ WEXTRA=-Wextra
++else
++ WEXTRA=-W
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5
++$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; }
++if test "${ac_cv_cc_gnu89_inline+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ old_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS -fgnu89-inline -Werror"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++void foo (void)
++{
++ inline void bar (void) {}
++ bar ();
++}
++extern inline void baz (void) {}
++
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ ac_cv_cc_gnu89_inline=yes
++else
++ ac_cv_cc_gnu89_inline=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++CFLAGS="$old_CFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5
++$as_echo "$ac_cv_cc_gnu89_inline" >&6; }
++if test "x$ac_cv_cc_gnu89_inline" = xyes; then :
++ WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5
++$as_echo_n "checking for --as-needed linker option... " >&6; }
++if test "${ac_cv_as_needed+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat > conftest.c <<EOF
++int main (void) { return 0; }
++EOF
++if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
++ -fPIC -shared -o conftest.so conftest.c
++ -Wl,--as-needed 1>&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; }
++then
++ ac_cv_as_needed=yes
++else
++ ac_cv_as_needed=no
++fi
++rm -f conftest*
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5
++$as_echo "$ac_cv_as_needed" >&6; }
++if test "x$ac_cv_as_needed" = xyes; then :
++ LD_AS_NEEDED=-Wl,--as-needed
++else
++ LD_AS_NEEDED=
++fi
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
++$as_echo_n "checking for __builtin_popcount... " >&6; }
++if test "${ac_cv_popcount+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++int
++main ()
++{
++exit (__builtin_popcount (127));
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_popcount=yes
++else
++ ac_cv_popcount=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5
++$as_echo "$ac_cv_popcount" >&6; }
++if test "x$ac_cv_popcount" = xyes; then :
++
++$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h
++
++fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
+ $as_echo_n "checking for __thread support... " >&6; }
+ if test "${ac_cv_tls+set}" = set; then :
+@@ -3888,7 +4014,13 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
+ $as_echo "$ac_cv_tls" >&6; }
+ if test "x$ac_cv_tls" != xyes; then :
+- as_fn_error "__thread support required" "$LINENO" 5
++ if test "$use_locks" = yes; then :
++ as_fn_error "--enable-thread-safety requires __thread support" "$LINENO" 5
++else
++
++$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h
++
++fi
+ fi
+
+ # Check whether --enable-largefile was given.
+@@ -4874,7 +5006,7 @@
+
+ # 1.234<whatever> -> 1234<whatever>
+ case "$PACKAGE_VERSION" in
+-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
+ *) as_fn_error "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
+ esac
+ case "$eu_version" in
+@@ -4903,7 +5035,7 @@
+ esac
+
+ # Round up to the next release API (x.y) version.
+-eu_version=$[($eu_version + 999) / 1000]
++eu_version=`expr \( $eu_version + 999 \) / 1000`
+
+ cat >confcache <<\_ACEOF
+ # 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 0000000..59a082b
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
@@ -0,0 +1,69 @@
+Index: elfutils-0.146/libelf/elf.h
+===================================================================
+--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:22:43.000000000 +0000
+@@ -143,6 +143,7 @@
+ #define ELFOSABI_HPUX 1 /* HP-UX */
+ #define ELFOSABI_NETBSD 2 /* NetBSD. */
+ #define ELFOSABI_LINUX 3 /* Linux. */
++#define ELFOSABI_HURD 4 /* GNU/Hurd */
+ #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
+ #define ELFOSABI_AIX 7 /* IBM AIX. */
+ #define ELFOSABI_IRIX 8 /* SGI Irix. */
+@@ -150,8 +151,13 @@
+ #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
+ #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
+ #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
++#define ELFOSABI_OPENVMS 13 /* OpenVMS */
++#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
++#define ELFOSABI_AROS 15 /* Amiga Research OS */
++/* 64-255 Architecture-specific value range */
+ #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
+ #define ELFOSABI_ARM 97 /* ARM */
++/* This is deprecated? It's not in the latest version anymore. */
+ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
+
+ #define EI_ABIVERSION 8 /* ABI version */
+@@ -206,7 +212,7 @@
+ #define EM_H8_300H 47 /* Hitachi H8/300H */
+ #define EM_H8S 48 /* Hitachi H8S */
+ #define EM_H8_500 49 /* Hitachi H8/500 */
+-#define EM_IA_64 50 /* Intel Merced */
++#define EM_IA_64 50 /* Intel IA64 */
+ #define EM_MIPS_X 51 /* Stanford MIPS-X */
+ #define EM_COLDFIRE 52 /* Motorola Coldfire */
+ #define EM_68HC12 53 /* Motorola M68HC12 */
+@@ -220,7 +226,8 @@
+ #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
+ #define EM_X86_64 62 /* AMD x86-64 architecture */
+ #define EM_PDSP 63 /* Sony DSP Processor */
+-
++#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
++#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
+ #define EM_FX66 66 /* Siemens FX66 microcontroller */
+ #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
+ #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
+@@ -250,7 +257,22 @@
+ #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
+ #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
+ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
+-#define EM_NUM 95
++#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
++#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
++#define EM_NS32K 97 /* National Semiconductor 32000 series */
++#define EM_TPC 98 /* Tenor Network TPC processor */
++#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
++#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
++#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
++#define EM_MAX 102 /* MAX Processor */
++#define EM_CR 103 /* National Semiconductor CompactRISC */
++#define EM_F2MC16 104 /* Fujitsu F2MC16 */
++#define EM_MSP430 105 /* TI msp430 micro controller */
++#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
++#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
++#define EM_SEP 108 /* Sharp embedded microprocessor */
++#define EM_ARCA 109 /* Arca RISC Microprocessor */
++#define EM_NUM 110
+
+ /* If it is necessary to assign new unofficial EM_* values, please
+ 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 0000000..9cf9cef
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
@@ -0,0 +1,37 @@
+The ELF_T_LIB and ELF_T_GNUHASH sizes were missing from fsize table.
+
+This could cause a failure in the elf*_xlatetof function.
+
+diff -ur elfutils-0.148.orig/libelf/exttypes.h elfutils-0.148/libelf/exttypes.h
+--- elfutils-0.148.orig/libelf/exttypes.h 2009-01-08 12:56:37.000000000 -0800
++++ elfutils-0.148/libelf/exttypes.h 2010-08-18 14:00:33.000000000 -0700
+@@ -94,6 +94,7 @@
+ Vernaux32 (Ext_);
+ Syminfo32 (Ext_);
+ Move32 (Ext_);
++Lib32 (Ext_);
+ auxv_t32 (Ext_);
+
+ Ehdr64 (Ext_);
+@@ -110,6 +111,7 @@
+ Vernaux64 (Ext_);
+ Syminfo64 (Ext_);
+ Move64 (Ext_);
++Lib64 (Ext_);
+ auxv_t64 (Ext_);
+
+ #undef START
+diff -ur elfutils-0.148.orig/libelf/gelf_fsize.c elfutils-0.148/libelf/gelf_fsize.c
+--- elfutils-0.148.orig/libelf/gelf_fsize.c 2009-01-08 12:56:37.000000000 -0800
++++ elfutils-0.148/libelf/gelf_fsize.c 2010-08-18 14:11:57.000000000 -0700
+@@ -87,7 +87,9 @@
+ [ELF_T_NHDR] = sizeof (ElfW2(LIBELFBITS, Ext_Nhdr)), \
+ [ELF_T_SYMINFO] = sizeof (ElfW2(LIBELFBITS, Ext_Syminfo)), \
+ [ELF_T_MOVE] = sizeof (ElfW2(LIBELFBITS, Ext_Move)), \
+- [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t))
++ [ELF_T_LIB] = sizeof (ElfW2(LIBELFBITS, Ext_Lib)), \
++ [ELF_T_AUXV] = sizeof (ElfW2(LIBELFBITS, Ext_auxv_t)), \
++ [ELF_T_GNUHASH] = ELFW2(LIBELFBITS, FSZ_WORD)
+ TYPE_SIZES (32)
+ },
+ [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 0000000..98353d5
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
@@ -0,0 +1,799 @@
+Index: elfutils-0.146/backends/parisc_init.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/parisc_init.c 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,74 @@
++/* Initialization of PA-RISC specific backend library.
++ Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND parisc_
++#define RELOC_PREFIX R_PARISC_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* This defines the common reloc hooks based on parisc_reloc.def. */
++#include "common-reloc.c"
++
++
++const char *
++parisc_init (elf, machine, eh, ehlen)
++ Elf *elf __attribute__ ((unused));
++ GElf_Half machine __attribute__ ((unused));
++ Ebl *eh;
++ size_t ehlen;
++{
++ int pa64 = 0;
++
++ /* Check whether the Elf_BH object has a sufficent size. */
++ if (ehlen < sizeof (Ebl))
++ return NULL;
++
++ if (elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
++ pa64 = 1;
++ }
++ /* We handle it. */
++ eh->name = "PA-RISC";
++ parisc_init_reloc (eh);
++ HOOK (eh, reloc_simple_type);
++ HOOK (eh, machine_flag_check);
++ HOOK (eh, symbol_type_name);
++ HOOK (eh, segment_type_name);
++ HOOK (eh, section_type_name);
++ HOOK (eh, register_info);
++ if (pa64)
++ eh->return_value_location = parisc_return_value_location_64;
++ else
++ eh->return_value_location = parisc_return_value_location_32;
++
++ return MODVERSION;
++}
+Index: elfutils-0.146/backends/parisc_regs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/parisc_regs.c 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,159 @@
++/* Register names and numbers for PA-RISC DWARF.
++ Copyright (C) 2005, 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++
++ssize_t
++parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
++ const char **prefix, const char **setname,
++ int *bits, int *type)
++{
++ int pa64 = 0;
++
++ if (ebl->elf) {
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
++ if (ehdr->e_flags & EF_PARISC_WIDE)
++ pa64 = 1;
++ }
++
++ int nregs = pa64 ? 127 : 128;
++
++ if (name == NULL)
++ return nregs;
++
++ if (regno < 0 || regno >= nregs || namelen < 6)
++ return -1;
++
++ *prefix = "%";
++
++ if (regno < 32)
++ {
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ if (pa64)
++ {
++ *bits = 64;
++ }
++ else
++ {
++ *bits = 32;
++ }
++ }
++ else if (regno == 32)
++ {
++ *setname = "special";
++ if (pa64)
++ {
++ *bits = 6;
++ }
++ else
++ {
++ *bits = 5;
++ }
++ *type = DW_ATE_unsigned;
++ }
++ else
++ {
++ *setname = "FPU";
++ *type = DW_ATE_float;
++ if (pa64)
++ {
++ *bits = 64;
++ }
++ else
++ {
++ *bits = 32;
++ }
++ }
++
++ if (regno < 33) {
++ switch (regno)
++ {
++ case 0 ... 9:
++ name[0] = 'r';
++ name[1] = regno + '0';
++ namelen = 2;
++ break;
++ case 10 ... 31:
++ name[0] = 'r';
++ name[1] = regno / 10 + '0';
++ name[2] = regno % 10 + '0';
++ namelen = 3;
++ break;
++ case 32:
++ *prefix = NULL;
++ name[0] = 'S';
++ name[1] = 'A';
++ name[2] = 'R';
++ namelen = 3;
++ break;
++ }
++ }
++ else {
++ if (pa64 && ((regno - 72) % 2)) {
++ *setname = NULL;
++ return 0;
++ }
++
++ switch (regno)
++ {
++ case 72 + 0 ... 72 + 11:
++ name[0] = 'f';
++ name[1] = 'r';
++ name[2] = (regno + 8 - 72) / 2 + '0';
++ namelen = 3;
++ if ((regno + 8 - 72) % 2) {
++ name[3] = 'R';
++ namelen++;
++ }
++ break;
++ case 72 + 12 ... 72 + 55:
++ name[0] = 'f';
++ name[1] = 'r';
++ name[2] = (regno + 8 - 72) / 2 / 10 + '0';
++ name[3] = (regno + 8 - 72) / 2 % 10 + '0';
++ namelen = 4;
++ if ((regno + 8 - 72) % 2) {
++ name[4] = 'R';
++ namelen++;
++ }
++ break;
++ default:
++ *setname = NULL;
++ return 0;
++ }
++ }
++ name[namelen++] = '\0';
++ return namelen;
++}
+Index: elfutils-0.146/backends/parisc_reloc.def
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/parisc_reloc.def 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,128 @@
++/* List the relocation types for PA-RISC. -*- C -*-
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++/* NAME, REL|EXEC|DYN */
++
++RELOC_TYPE (NONE, EXEC|DYN)
++RELOC_TYPE (DIR32, REL|EXEC|DYN)
++RELOC_TYPE (DIR21L, REL|EXEC|DYN)
++RELOC_TYPE (DIR17R, REL)
++RELOC_TYPE (DIR17F, REL)
++RELOC_TYPE (DIR14R, REL|DYN)
++RELOC_TYPE (PCREL32, REL)
++RELOC_TYPE (PCREL21L, REL)
++RELOC_TYPE (PCREL17R, REL)
++RELOC_TYPE (PCREL17F, REL)
++RELOC_TYPE (PCREL14R, REL|EXEC)
++RELOC_TYPE (DPREL21L, REL)
++RELOC_TYPE (DPREL14WR, REL)
++RELOC_TYPE (DPREL14DR, REL)
++RELOC_TYPE (DPREL14R, REL)
++RELOC_TYPE (GPREL21L, 0)
++RELOC_TYPE (GPREL14R, 0)
++RELOC_TYPE (LTOFF21L, REL)
++RELOC_TYPE (LTOFF14R, REL)
++RELOC_TYPE (DLTIND14F, 0)
++RELOC_TYPE (SETBASE, 0)
++RELOC_TYPE (SECREL32, REL)
++RELOC_TYPE (BASEREL21L, 0)
++RELOC_TYPE (BASEREL17R, 0)
++RELOC_TYPE (BASEREL14R, 0)
++RELOC_TYPE (SEGBASE, 0)
++RELOC_TYPE (SEGREL32, REL)
++RELOC_TYPE (PLTOFF21L, 0)
++RELOC_TYPE (PLTOFF14R, 0)
++RELOC_TYPE (PLTOFF14F, 0)
++RELOC_TYPE (LTOFF_FPTR32, 0)
++RELOC_TYPE (LTOFF_FPTR21L, 0)
++RELOC_TYPE (LTOFF_FPTR14R, 0)
++RELOC_TYPE (FPTR64, 0)
++RELOC_TYPE (PLABEL32, REL|DYN)
++RELOC_TYPE (PCREL64, 0)
++RELOC_TYPE (PCREL22C, 0)
++RELOC_TYPE (PCREL22F, 0)
++RELOC_TYPE (PCREL14WR, 0)
++RELOC_TYPE (PCREL14DR, 0)
++RELOC_TYPE (PCREL16F, 0)
++RELOC_TYPE (PCREL16WF, 0)
++RELOC_TYPE (PCREL16DF, 0)
++RELOC_TYPE (DIR64, REL|DYN)
++RELOC_TYPE (DIR14WR, REL)
++RELOC_TYPE (DIR14DR, REL)
++RELOC_TYPE (DIR16F, REL)
++RELOC_TYPE (DIR16WF, REL)
++RELOC_TYPE (DIR16DF, REL)
++RELOC_TYPE (GPREL64, 0)
++RELOC_TYPE (GPREL14WR, 0)
++RELOC_TYPE (GPREL14DR, 0)
++RELOC_TYPE (GPREL16F, 0)
++RELOC_TYPE (GPREL16WF, 0)
++RELOC_TYPE (GPREL16DF, 0)
++RELOC_TYPE (LTOFF64, 0)
++RELOC_TYPE (LTOFF14WR, 0)
++RELOC_TYPE (LTOFF14DR, 0)
++RELOC_TYPE (LTOFF16F, 0)
++RELOC_TYPE (LTOFF16WF, 0)
++RELOC_TYPE (LTOFF16DF, 0)
++RELOC_TYPE (SECREL64, 0)
++RELOC_TYPE (BASEREL14WR, 0)
++RELOC_TYPE (BASEREL14DR, 0)
++RELOC_TYPE (SEGREL64, 0)
++RELOC_TYPE (PLTOFF14WR, 0)
++RELOC_TYPE (PLTOFF14DR, 0)
++RELOC_TYPE (PLTOFF16F, 0)
++RELOC_TYPE (PLTOFF16WF, 0)
++RELOC_TYPE (PLTOFF16DF, 0)
++RELOC_TYPE (LTOFF_FPTR64, 0)
++RELOC_TYPE (LTOFF_FPTR14WR, 0)
++RELOC_TYPE (LTOFF_FPTR14DR, 0)
++RELOC_TYPE (LTOFF_FPTR16F, 0)
++RELOC_TYPE (LTOFF_FPTR16WF, 0)
++RELOC_TYPE (LTOFF_FPTR16DF, 0)
++RELOC_TYPE (COPY, EXEC)
++RELOC_TYPE (IPLT, EXEC|DYN)
++RELOC_TYPE (EPLT, 0)
++RELOC_TYPE (TPREL32, DYN)
++RELOC_TYPE (TPREL21L, 0)
++RELOC_TYPE (TPREL14R, 0)
++RELOC_TYPE (LTOFF_TP21L, 0)
++RELOC_TYPE (LTOFF_TP14R, 0)
++RELOC_TYPE (LTOFF_TP14F, 0)
++RELOC_TYPE (TPREL64, 0)
++RELOC_TYPE (TPREL14WR, 0)
++RELOC_TYPE (TPREL14DR, 0)
++RELOC_TYPE (TPREL16F, 0)
++RELOC_TYPE (TPREL16WF, 0)
++RELOC_TYPE (TPREL16DF, 0)
++RELOC_TYPE (LTOFF_TP64, 0)
++RELOC_TYPE (LTOFF_TP14WR, 0)
++RELOC_TYPE (LTOFF_TP14DR, 0)
++RELOC_TYPE (LTOFF_TP16F, 0)
++RELOC_TYPE (LTOFF_TP16WF, 0)
++RELOC_TYPE (LTOFF_TP16DF, 0)
++RELOC_TYPE (TLS_DTPMOD32, DYN)
++RELOC_TYPE (TLS_DTPMOD64, DYN)
++
++#define NO_RELATIVE_RELOC 1
+Index: elfutils-0.146/backends/parisc_retval.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/parisc_retval.c 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,213 @@
++/* Function return value location for Linux/PA-RISC ABI.
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <assert.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* %r28, or pair %r28, %r29. */
++static const Dwarf_Op loc_intreg32[] =
++ {
++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++static const Dwarf_Op loc_intreg[] =
++ {
++ { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_intreg 1
++#define nloc_intregpair 4
++
++/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
++static const Dwarf_Op loc_fpreg32[] =
++ {
++ { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++#define nloc_fpreg32 2
++#define nloc_fpregpair32 4
++
++/* $fr4 */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_regx, .number = 72 },
++ };
++#define nloc_fpreg 1
++
++#if 0
++/* The return value is a structure and is actually stored in stack space
++ passed in a hidden argument by the caller. Address of the location is stored
++ in %r28 before function call, but it may be changed by function. */
++static const Dwarf_Op loc_aggregate[] =
++ {
++ { .atom = DW_OP_breg28 },
++ };
++#define nloc_aggregate 1
++#endif
++
++static int
++parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
++{
++ Dwarf_Word regsize = pa64 ? 8 : 4;
++
++ /* Start with the function's type, and get the DW_AT_type attribute,
++ which is the type of the return value. */
++
++ Dwarf_Attribute attr_mem;
++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++ if (attr == NULL)
++ /* The function has no return value, like a `void' function in C. */
++ return 0;
++
++ Dwarf_Die die_mem;
++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++ int tag = dwarf_tag (typedie);
++
++ /* Follow typedefs and qualifiers to get to the actual type. */
++ while (tag == DW_TAG_typedef
++ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
++ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++
++ switch (tag)
++ {
++ case -1:
++ return -1;
++
++ case DW_TAG_subrange_type:
++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++ /* Fall through. */
++
++ case DW_TAG_base_type:
++ case DW_TAG_enumeration_type:
++ case DW_TAG_pointer_type:
++ case DW_TAG_ptr_to_member_type:
++ {
++ Dwarf_Word size;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++ &attr_mem), &size) != 0)
++ {
++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++ size = 4;
++ else
++ return -1;
++ }
++ if (tag == DW_TAG_base_type)
++ {
++ Dwarf_Word encoding;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++ if (encoding == DW_ATE_float)
++ {
++ if (pa64) {
++ *locp = loc_fpreg;
++ if (size <= 8)
++ return nloc_fpreg;
++ }
++ else {
++ *locp = loc_fpreg32;
++ if (size <= 4)
++ return nloc_fpreg32;
++ else if (size <= 8)
++ return nloc_fpregpair32;
++ }
++ goto aggregate;
++ }
++ }
++ if (pa64)
++ *locp = loc_intreg;
++ else
++ *locp = loc_intreg32;
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2 * regsize)
++ return nloc_intregpair;
++
++ /* Else fall through. */
++ }
++
++ case DW_TAG_structure_type:
++ case DW_TAG_class_type:
++ case DW_TAG_union_type:
++ case DW_TAG_array_type:
++ aggregate: {
++ Dwarf_Word size;
++ if (dwarf_aggregate_size (typedie, &size) != 0)
++ return -1;
++ if (pa64)
++ *locp = loc_intreg;
++ else
++ *locp = loc_intreg32;
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2 * regsize)
++ return nloc_intregpair;
++#if 0
++ /* there should be some way to know this location... But I do not see it. */
++ *locp = loc_aggregate;
++ return nloc_aggregate;
++#endif
++ /* fall through. */
++ }
++ }
++
++ /* XXX We don't have a good way to return specific errors from ebl calls.
++ This value means we do not understand the type, but it is well-formed
++ DWARF and might be valid. */
++ return -2;
++}
++
++int
++parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return parisc_return_value_location_ (functypedie, locp, 0);
++}
++
++int
++parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ return parisc_return_value_location_ (functypedie, locp, 1);
++}
++
+Index: elfutils-0.146/backends/parisc_symbol.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/parisc_symbol.c 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,112 @@
++/* PA-RISC specific symbolic name handling.
++ Copyright (C) 2002, 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++
++const char *
++parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ switch (segment)
++ {
++ case PT_PARISC_ARCHEXT:
++ return "PARISC_ARCHEXT";
++ case PT_PARISC_UNWIND:
++ return "PARISC_UNWIND";
++ default:
++ break;
++ }
++ return NULL;
++}
++
++/* Return symbolic representation of symbol type. */
++const char *
++parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ if (symbol == STT_PARISC_MILLICODE)
++ return "PARISC_MILLI";
++ return NULL;
++}
++
++/* Return symbolic representation of section type. */
++const char *
++parisc_section_type_name (int type,
++ char *buf __attribute__ ((unused)),
++ size_t len __attribute__ ((unused)))
++{
++ switch (type)
++ {
++ case SHT_PARISC_EXT:
++ return "PARISC_EXT";
++ case SHT_PARISC_UNWIND:
++ return "PARISC_UNWIND";
++ case SHT_PARISC_DOC:
++ return "PARISC_DOC";
++ }
++
++ return NULL;
++}
++
++/* Check whether machine flags are valid. */
++bool
++parisc_machine_flag_check (GElf_Word flags)
++{
++ if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
++ EF_PARISC_WIDE | EF_PARISC_NO_KABP |
++ EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
++ return 0;
++
++ GElf_Word arch = flags & EF_PARISC_ARCH;
++
++ return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
++ (arch == EFA_PARISC_2_0));
++}
++
++/* Check for the simple reloc types. */
++Elf_Type
++parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++ switch (type)
++ {
++ case R_PARISC_DIR64:
++ case R_PARISC_SECREL64:
++ return ELF_T_XWORD;
++ case R_PARISC_DIR32:
++ case R_PARISC_SECREL32:
++ return ELF_T_WORD;
++ default:
++ return ELF_T_NUM;
++ }
++}
+Index: elfutils-0.146/backends/libebl_parisc.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/libebl_parisc.h 2010-04-24 10:10:50.000000000 +0000
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_HPPA_H
++#define _LIBEBL_HPPA_H 1
++
++#include <libdw.h>
++
++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+Index: elfutils-0.146/backends/Makefile.am
+===================================================================
+--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:10:41.000000000 +0000
++++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:10:50.000000000 +0000
+@@ -29,11 +29,11 @@
+ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
+
+
+-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390
++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
+- libebl_s390_pic.a
++ libebl_s390_pic.a libebl_parisc_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -95,6 +95,9 @@
+ libebl_s390_pic_a_SOURCES = $(s390_SRCS)
+ am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os)
+
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ @rm -f $(@:.so=.map)
+Index: elfutils-0.146/libelf/elf.h
+===================================================================
+--- elfutils-0.146.orig/libelf/elf.h 2010-04-13 20:08:02.000000000 +0000
++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:10:50.000000000 +0000
+@@ -1789,16 +1789,24 @@
+ #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
+ #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
+ #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
++#define R_PARISC_DPREL14WR 19
++#define R_PARISC_DPREL14DR 20
+ #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
+ #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
+ #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
+ #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
+ #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
++#define R_PARISC_DLTIND14F 39
++#define R_PARISC_SETBASE 40
+ #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
++#define R_PARISC_BASEREL21L 42
++#define R_PARISC_BASEREL17R 43
++#define R_PARISC_BASEREL14R 46
+ #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
+ #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
+ #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
+ #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
++#define R_PARISC_PLTOFF14F 55
+ #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
+ #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
+ #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
+@@ -1807,6 +1815,7 @@
+ #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
+ #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
+ #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
++#define R_PARISC_PCREL22C 73
+ #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
+ #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
+ #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
+@@ -1832,6 +1841,8 @@
+ #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
+ #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
+ #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
++#define R_PARISC_BASEREL14WR 107
++#define R_PARISC_BASEREL14DR 108
+ #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
+ #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
+ #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 0000000..a5cc01f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/i386_dis.h
@@ -0,0 +1,1657 @@
+#define MNEMONIC_BITS 10
+#define SUFFIX_BITS 3
+#define FCT1_BITS 7
+#define STR1_BITS 4
+#define OFF1_1_BITS 7
+#define OFF1_1_BIAS 3
+#define OFF1_2_BITS 7
+#define OFF1_2_BIAS 4
+#define OFF1_3_BITS 1
+#define OFF1_3_BIAS 7
+#define FCT2_BITS 6
+#define STR2_BITS 2
+#define OFF2_1_BITS 7
+#define OFF2_1_BIAS 5
+#define OFF2_2_BITS 7
+#define OFF2_2_BIAS 4
+#define OFF2_3_BITS 4
+#define OFF2_3_BIAS 7
+#define FCT3_BITS 4
+#define STR3_BITS 1
+#define OFF3_1_BITS 6
+#define OFF3_1_BIAS 10
+#define OFF3_2_BITS 1
+#define OFF3_2_BIAS 21
+
+#include <i386_data.h>
+
+#define suffix_none 0
+#define suffix_w 1
+#define suffix_w0 2
+#define suffix_W 3
+#define suffix_tttn 4
+#define suffix_D 7
+#define suffix_w1 5
+#define suffix_W1 6
+
+static const opfct_t op1_fct[] =
+{
+ NULL,
+ FCT_MOD$R_M,
+ FCT_Mod$R_m,
+ FCT_abs,
+ FCT_ax,
+ FCT_ax$w,
+ FCT_ccc,
+ FCT_ddd,
+ FCT_disp8,
+ FCT_ds_bx,
+ FCT_ds_si,
+ FCT_dx,
+ FCT_es_di,
+ FCT_freg,
+ FCT_imm$s,
+ FCT_imm$w,
+ FCT_imm16,
+ FCT_imm8,
+ FCT_imms8,
+ FCT_mmxreg,
+ FCT_mod$16r_m,
+ FCT_mod$64r_m,
+ FCT_mod$8r_m,
+ FCT_mod$r_m,
+ FCT_mod$r_m$w,
+ FCT_reg,
+ FCT_reg$w,
+ FCT_reg16,
+ FCT_reg64,
+ FCT_rel,
+ FCT_sel,
+ FCT_sreg2,
+ FCT_sreg3,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op1_str[] =
+ "%ax\0"
+ "%cl\0"
+ "%eax\0"
+ "%st\0"
+ "%xmm0\0"
+ "*";
+static const uint8_t op1_str_idx[] = {
+ 0,
+ 4,
+ 8,
+ 13,
+ 17,
+ 23,
+};
+static const opfct_t op2_fct[] =
+{
+ NULL,
+ FCT_MOD$R_M,
+ FCT_Mod$R_m,
+ FCT_abs,
+ FCT_absval,
+ FCT_ax$w,
+ FCT_ccc,
+ FCT_ddd,
+ FCT_ds_si,
+ FCT_dx,
+ FCT_es_di,
+ FCT_freg,
+ FCT_imm8,
+ FCT_mmxreg,
+ FCT_mod$64r_m,
+ FCT_mod$r_m,
+ FCT_mod$r_m$w,
+ FCT_moda$r_m,
+ FCT_reg,
+ FCT_reg$w,
+ FCT_reg64,
+ FCT_sreg3,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op2_str[] =
+ "%ecx\0"
+ "%st";
+static const uint8_t op2_str_idx[] = {
+ 0,
+ 5,
+};
+static const opfct_t op3_fct[] =
+{
+ NULL,
+ FCT_mmxreg,
+ FCT_mod$r_m,
+ FCT_reg,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op3_str[] =
+ "%edx";
+static const uint8_t op3_str_idx[] = {
+ 0,
+};
+static const struct instr_enc instrtab[] =
+{
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+};
+static const uint8_t match_data[] =
+{
+ 0x11, 0x37,
+ 0x22, 0xd5, 0xa,
+ 0x22, 0xd4, 0xa,
+ 0x11, 0x3f,
+ 0x1, 0xfe, 0x14,
+ 0x2, 0xfe, 0x80, 0x38, 0x10,
+ 0x2, 0xfe, 0x82, 0x38, 0x10,
+ 0x2, 0xfe, 0x10, 0, 0,
+ 0x2, 0xfe, 0x12, 0, 0,
+ 0x1, 0xfe, 0x4,
+ 0x2, 0xfe, 0x80, 0x38, 0,
+ 0x12, 0x83, 0x38, 0,
+ 0x2, 0xfe, 0, 0, 0,
+ 0x2, 0xfe, 0x2, 0, 0,
+ 0x34, 0x66, 0xf, 0xd0, 0, 0,
+ 0x34, 0xf2, 0xf, 0xd0, 0, 0,
+ 0x1, 0xfe, 0x24,
+ 0x2, 0xfe, 0x80, 0x38, 0x20,
+ 0x2, 0xfe, 0x82, 0x38, 0x20,
+ 0x2, 0xfe, 0x20, 0, 0,
+ 0x2, 0xfe, 0x22, 0, 0,
+ 0x34, 0x66, 0xf, 0x54, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x34, 0x66, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x12, 0x63, 0, 0,
+ 0x12, 0x62, 0, 0,
+ 0x23, 0xf, 0xbc, 0, 0,
+ 0x23, 0xf, 0xbd, 0, 0,
+ 0x12, 0xf, 0xf8, 0xc8,
+ 0x23, 0xf, 0xa3, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x20,
+ 0x23, 0xf, 0xbb, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x38,
+ 0x23, 0xf, 0xb3, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x30,
+ 0x23, 0xf, 0xab, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x28,
+ 0x11, 0xe8,
+ 0x12, 0xff, 0x38, 0x10,
+ 0x11, 0x9a,
+ 0x12, 0xff, 0x38, 0x18,
+ 0x11, 0x98,
+ 0x11, 0x99,
+ 0x11, 0xf8,
+ 0x11, 0xfc,
+ 0x11, 0xfa,
+ 0x22, 0xf, 0x5,
+ 0x22, 0xf, 0x6,
+ 0x22, 0xf, 0x7,
+ 0x22, 0xf, 0x34,
+ 0x22, 0xf, 0x35,
+ 0x11, 0xf5,
+ 0x13, 0xf, 0xf0, 0x40, 0, 0,
+ 0x1, 0xfe, 0x3c,
+ 0x2, 0xfe, 0x80, 0x38, 0x38,
+ 0x12, 0x83, 0x38, 0x38,
+ 0x2, 0xfe, 0x38, 0, 0,
+ 0x2, 0xfe, 0x3a, 0, 0,
+ 0x34, 0xf2, 0xf, 0xc2, 0, 0,
+ 0x34, 0xf3, 0xf, 0xc2, 0, 0,
+ 0x34, 0x66, 0xf, 0xc2, 0, 0,
+ 0x23, 0xf, 0xc2, 0, 0,
+ 0x1, 0xfe, 0xa6,
+ 0x13, 0xf, 0xfe, 0xb0, 0, 0,
+ 0x23, 0xf, 0xc7, 0x38, 0x8,
+ 0x22, 0xf, 0xa2,
+ 0x34, 0xf3, 0xf, 0xe6, 0, 0,
+ 0x34, 0xf2, 0xf, 0xe6, 0, 0,
+ 0x34, 0x66, 0xf, 0xe6, 0, 0,
+ 0x11, 0x27,
+ 0x11, 0x2f,
+ 0x2, 0xfe, 0xfe, 0x38, 0x8,
+ 0x1, 0xf8, 0x48,
+ 0x2, 0xfe, 0xf6, 0x38, 0x30,
+ 0x22, 0xf, 0x77,
+ 0x11, 0xc8,
+ 0x22, 0xd9, 0xd0,
+ 0x22, 0xd9, 0xe0,
+ 0x22, 0xd9, 0xe1,
+ 0x22, 0xd9, 0xe4,
+ 0x22, 0xd9, 0xe5,
+ 0x22, 0xd9, 0xe8,
+ 0x22, 0xd9, 0xe9,
+ 0x22, 0xd9, 0xea,
+ 0x22, 0xd9, 0xeb,
+ 0x22, 0xd9, 0xec,
+ 0x22, 0xd9, 0xed,
+ 0x22, 0xd9, 0xee,
+ 0x22, 0xd9, 0xf0,
+ 0x22, 0xd9, 0xf1,
+ 0x22, 0xd9, 0xf2,
+ 0x22, 0xd9, 0xf3,
+ 0x22, 0xd9, 0xf4,
+ 0x22, 0xd9, 0xf5,
+ 0x22, 0xd9, 0xf6,
+ 0x22, 0xd9, 0xf7,
+ 0x22, 0xd9, 0xf8,
+ 0x22, 0xd9, 0xf9,
+ 0x22, 0xd9, 0xfa,
+ 0x22, 0xd9, 0xfb,
+ 0x22, 0xd9, 0xfc,
+ 0x22, 0xd9, 0xfd,
+ 0x22, 0xd9, 0xfe,
+ 0x22, 0xd9, 0xff,
+ 0x12, 0xd8, 0xf8, 0xc0,
+ 0x12, 0xdc, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xd8, 0x38, 0,
+ 0x12, 0xd8, 0xf8, 0xc8,
+ 0x12, 0xdc, 0xf8, 0xc8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x8,
+ 0x12, 0xd8, 0xf8, 0xe0,
+ 0x12, 0xdc, 0xf8, 0xe0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x20,
+ 0x12, 0xd8, 0xf8, 0xe8,
+ 0x12, 0xdc, 0xf8, 0xe8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x28,
+ 0x12, 0xdd, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xd9, 0x38, 0x10,
+ 0x12, 0xdd, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xd9, 0x38, 0x18,
+ 0x12, 0xd9, 0x38, 0x20,
+ 0x12, 0xd9, 0x38, 0x28,
+ 0x12, 0xd9, 0x38, 0x30,
+ 0x12, 0xd9, 0x38, 0x38,
+ 0x12, 0xd9, 0xf8, 0xc8,
+ 0x12, 0xde, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xda, 0x38, 0,
+ 0x12, 0xda, 0xf8, 0xc8,
+ 0x12, 0xde, 0xf8, 0xc8,
+ 0x2, 0xfb, 0xda, 0x38, 0x8,
+ 0x12, 0xde, 0xf8, 0xe0,
+ 0x2, 0xfb, 0xda, 0x38, 0x20,
+ 0x12, 0xde, 0xf8, 0xe8,
+ 0x2, 0xfb, 0xda, 0x38, 0x28,
+ 0x22, 0xdf, 0xe0,
+ 0x12, 0xdf, 0x38, 0x20,
+ 0x12, 0xdf, 0xf8, 0xf0,
+ 0x12, 0xdf, 0x38, 0x30,
+ 0x22, 0xd9, 0xe0,
+ 0x33, 0x9b, 0xdb, 0xe2,
+ 0x33, 0x9b, 0xdb, 0xe3,
+ 0x11, 0x9b,
+ 0x22, 0xdb, 0xe2,
+ 0x12, 0xda, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xc8,
+ 0x12, 0xda, 0xf8, 0xd0,
+ 0x12, 0xda, 0xf8, 0xd8,
+ 0x12, 0xdb, 0xf8, 0xc0,
+ 0x12, 0xdb, 0xf8, 0xc8,
+ 0x12, 0xdb, 0xf8, 0xd0,
+ 0x12, 0xdb, 0xf8, 0xd8,
+ 0x12, 0xd8, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x10,
+ 0x12, 0xd8, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x18,
+ 0x22, 0xde, 0xd9,
+ 0x12, 0xdb, 0xf8, 0xf0,
+ 0x12, 0xdf, 0xf8, 0xf0,
+ 0x12, 0xdb, 0xf8, 0xe8,
+ 0x12, 0xdf, 0xf8, 0xe8,
+ 0x22, 0xd9, 0xff,
+ 0x22, 0xd9, 0xf6,
+ 0x12, 0xd8, 0xf8, 0xf0,
+ 0x12, 0xdc, 0xf8, 0xf0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x30,
+ 0x12, 0xda, 0x38, 0x30,
+ 0x12, 0xde, 0xf8, 0xf0,
+ 0x12, 0xde, 0x38, 0x30,
+ 0x12, 0xde, 0xf8, 0xf8,
+ 0x12, 0xd8, 0xf8, 0xf8,
+ 0x12, 0xdc, 0xf8, 0xf8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x38,
+ 0x12, 0xda, 0x38, 0x38,
+ 0x12, 0xde, 0x38, 0x38,
+ 0x12, 0xde, 0xf8, 0xf0,
+ 0x12, 0xdd, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xda, 0x38, 0x10,
+ 0x12, 0xda, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xda, 0x38, 0x18,
+ 0x12, 0xdf, 0x38, 0,
+ 0x12, 0xdb, 0x38, 0,
+ 0x12, 0xdf, 0x38, 0x28,
+ 0x22, 0xd9, 0xf7,
+ 0x22, 0xdb, 0xe3,
+ 0x2, 0xfb, 0xdb, 0x38, 0x10,
+ 0x2, 0xfb, 0xdb, 0x38, 0x18,
+ 0x12, 0xdf, 0x38, 0x38,
+ 0x2, 0xfb, 0xdb, 0x38, 0x8,
+ 0x12, 0xdd, 0x38, 0x8,
+ 0x12, 0xdb, 0x38, 0x28,
+ 0x12, 0xdb, 0x38, 0x38,
+ 0x12, 0xd9, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xd9, 0x38, 0,
+ 0x12, 0xdd, 0xf8, 0xe0,
+ 0x12, 0xdd, 0x38, 0x20,
+ 0x12, 0xdd, 0xf8, 0xe8,
+ 0x12, 0xdd, 0x38, 0x30,
+ 0x12, 0xdd, 0x38, 0x38,
+ 0x11, 0xf4,
+ 0x2, 0xfe, 0xf6, 0x38, 0x38,
+ 0x2, 0xfe, 0xf6, 0x38, 0x28,
+ 0x23, 0xf, 0xaf, 0, 0,
+ 0x2, 0xfd, 0x69, 0, 0,
+ 0x1, 0xfe, 0xe4,
+ 0x1, 0xfe, 0xec,
+ 0x2, 0xfe, 0xfe, 0x38, 0,
+ 0x1, 0xf8, 0x40,
+ 0x1, 0xfe, 0x6c,
+ 0x11, 0xcd,
+ 0x11, 0xcc,
+ 0x11, 0xce,
+ 0x22, 0xf, 0x8,
+ 0x33, 0xf, 0x1, 0xf8,
+ 0x23, 0xf, 0x1, 0x38, 0x38,
+ 0x11, 0xcf,
+ 0x1, 0xf0, 0x70,
+ 0x12, 0xf, 0xf0, 0x80,
+ 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
+ 0x11, 0xe3,
+ 0x11, 0xeb,
+ 0x11, 0xe9,
+ 0x12, 0xff, 0x38, 0x20,
+ 0x11, 0xea,
+ 0x12, 0xff, 0x38, 0x28,
+ 0x11, 0x9f,
+ 0x23, 0xf, 0x2, 0, 0,
+ 0x12, 0xc5, 0, 0,
+ 0x12, 0x8d, 0, 0,
+ 0x11, 0xc9,
+ 0x12, 0xc4, 0, 0,
+ 0x23, 0xf, 0xb4, 0, 0,
+ 0x23, 0xf, 0xb5, 0, 0,
+ 0x23, 0xf, 0x1, 0x38, 0x10,
+ 0x23, 0xf, 0x1, 0x38, 0x18,
+ 0x23, 0xf, 0, 0x38, 0x10,
+ 0x23, 0xf, 0x1, 0x38, 0x30,
+ 0x11, 0xf0,
+ 0x1, 0xfe, 0xac,
+ 0x11, 0xe2,
+ 0x11, 0xe1,
+ 0x11, 0xe0,
+ 0x23, 0xf, 0x3, 0, 0,
+ 0x23, 0xf, 0xb2, 0, 0,
+ 0x23, 0xf, 0, 0x38, 0x18,
+ 0x2, 0xfe, 0x88, 0, 0,
+ 0x2, 0xfe, 0x8a, 0, 0,
+ 0x2, 0xfe, 0xc6, 0x38, 0,
+ 0x1, 0xf0, 0xb0,
+ 0x1, 0xfe, 0xa0,
+ 0x1, 0xfe, 0xa2,
+ 0x23, 0xf, 0x20, 0xc0, 0xc0,
+ 0x23, 0xf, 0x22, 0xc0, 0xc0,
+ 0x23, 0xf, 0x21, 0xc0, 0xc0,
+ 0x23, 0xf, 0x23, 0xc0, 0xc0,
+ 0x12, 0x8c, 0, 0,
+ 0x12, 0x8e, 0, 0,
+ 0x1, 0xfe, 0xa4,
+ 0x23, 0xf, 0xbe, 0, 0,
+ 0x23, 0xf, 0xbf, 0, 0,
+ 0x23, 0xf, 0xb6, 0, 0,
+ 0x23, 0xf, 0xb7, 0, 0,
+ 0x2, 0xfe, 0xf6, 0x38, 0x20,
+ 0x2, 0xfe, 0xf6, 0x38, 0x18,
+ 0x22, 0xf3, 0x90,
+ 0x11, 0x90,
+ 0x34, 0xf3, 0xf, 0xb8, 0, 0,
+ 0x2, 0xfe, 0xf6, 0x38, 0x10,
+ 0x2, 0xfe, 0x8, 0, 0,
+ 0x2, 0xfe, 0xa, 0, 0,
+ 0x2, 0xfe, 0x80, 0x38, 0x8,
+ 0x2, 0xfe, 0x82, 0x38, 0x8,
+ 0x1, 0xfe, 0xc,
+ 0x1, 0xfe, 0xe6,
+ 0x1, 0xfe, 0xee,
+ 0x1, 0xfe, 0x6e,
+ 0x12, 0x8f, 0x38, 0,
+ 0x12, 0xf, 0xc7, 0x81,
+ 0x11, 0x9d,
+ 0x12, 0xff, 0x38, 0x30,
+ 0x1, 0xf8, 0x50,
+ 0x1, 0xf8, 0x58,
+ 0x1, 0xfd, 0x68,
+ 0x1, 0xe7, 0x6,
+ 0x12, 0xf, 0xc7, 0x80,
+ 0x11, 0x60,
+ 0x11, 0x61,
+ 0x11, 0x9c,
+ 0x2, 0xfe, 0xd0, 0x38, 0x10,
+ 0x2, 0xfe, 0xd2, 0x38, 0x10,
+ 0x2, 0xfe, 0xc0, 0x38, 0x10,
+ 0x2, 0xfe, 0xd0, 0x38, 0x18,
+ 0x2, 0xfe, 0xd2, 0x38, 0x18,
+ 0x2, 0xfe, 0xc0, 0x38, 0x18,
+ 0x22, 0xf, 0x32,
+ 0x22, 0xf, 0x33,
+ 0x22, 0xf, 0x31,
+ 0x11, 0xc3,
+ 0x11, 0xc2,
+ 0x11, 0xcb,
+ 0x11, 0xca,
+ 0x2, 0xfe, 0xd0, 0x38, 0,
+ 0x2, 0xfe, 0xd2, 0x38, 0,
+ 0x2, 0xfe, 0xc0, 0x38, 0,
+ 0x2, 0xfe, 0xd0, 0x38, 0x8,
+ 0x2, 0xfe, 0xd2, 0x38, 0x8,
+ 0x2, 0xfe, 0xc0, 0x38, 0x8,
+ 0x22, 0xf, 0xaa,
+ 0x11, 0x9e,
+ 0x2, 0xfe, 0xd0, 0x38, 0x38,
+ 0x2, 0xfe, 0xd2, 0x38, 0x38,
+ 0x2, 0xfe, 0xc0, 0x38, 0x38,
+ 0x2, 0xfe, 0x18, 0, 0,
+ 0x2, 0xfe, 0x1a, 0, 0,
+ 0x1, 0xfe, 0x1c,
+ 0x2, 0xfe, 0x80, 0x38, 0x18,
+ 0x2, 0xfe, 0x82, 0x38, 0x18,
+ 0x1, 0xfe, 0xae,
+ 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
+ 0x2, 0xfe, 0xd0, 0x38, 0x20,
+ 0x2, 0xfe, 0xd2, 0x38, 0x20,
+ 0x2, 0xfe, 0xc0, 0x38, 0x20,
+ 0x2, 0xfe, 0xd0, 0x38, 0x28,
+ 0x23, 0xf, 0xa4, 0, 0,
+ 0x23, 0xf, 0xa5, 0, 0,
+ 0x2, 0xfe, 0xd2, 0x38, 0x28,
+ 0x2, 0xfe, 0xc0, 0x38, 0x28,
+ 0x23, 0xf, 0xac, 0, 0,
+ 0x23, 0xf, 0xad, 0, 0,
+ 0x33, 0xf, 0x1, 0xc1,
+ 0x33, 0xf, 0x1, 0xc2,
+ 0x33, 0xf, 0x1, 0xc3,
+ 0x33, 0xf, 0x1, 0xc4,
+ 0x23, 0xf, 0x78, 0, 0,
+ 0x23, 0xf, 0x79, 0, 0,
+ 0x23, 0xf, 0x1, 0x38, 0,
+ 0x33, 0xf, 0x1, 0xc8,
+ 0x33, 0xf, 0x1, 0xc9,
+ 0x23, 0xf, 0x1, 0x38, 0x8,
+ 0x23, 0xf, 0, 0x38, 0,
+ 0x23, 0xf, 0x1, 0x38, 0x20,
+ 0x11, 0xf9,
+ 0x11, 0xfd,
+ 0x11, 0xfb,
+ 0x1, 0xfe, 0xaa,
+ 0x23, 0xf, 0, 0x38, 0x8,
+ 0x2, 0xfe, 0x28, 0, 0,
+ 0x2, 0xfe, 0x2a, 0, 0,
+ 0x1, 0xfe, 0x2c,
+ 0x2, 0xfe, 0x80, 0x38, 0x28,
+ 0x2, 0xfe, 0x82, 0x38, 0x28,
+ 0x2, 0xfe, 0x84, 0, 0,
+ 0x1, 0xfe, 0xa8,
+ 0x2, 0xfe, 0xf6, 0x38, 0,
+ 0x22, 0xf, 0xb,
+ 0x23, 0xf, 0, 0x38, 0x20,
+ 0x23, 0xf, 0, 0x38, 0x28,
+ 0x22, 0xf, 0x9,
+ 0x23, 0xf, 0xd, 0x38, 0,
+ 0x23, 0xf, 0xd, 0x38, 0x8,
+ 0x23, 0xf, 0x18, 0x38, 0,
+ 0x23, 0xf, 0x18, 0x38, 0x8,
+ 0x23, 0xf, 0x18, 0x38, 0x10,
+ 0x23, 0xf, 0x18, 0x38, 0x18,
+ 0x23, 0xf, 0x1f, 0, 0,
+ 0x22, 0xf, 0x30,
+ 0x13, 0xf, 0xfe, 0xc0, 0, 0,
+ 0x2, 0xfe, 0x86, 0, 0,
+ 0x1, 0xf8, 0x90,
+ 0x11, 0xd7,
+ 0x2, 0xfe, 0x30, 0, 0,
+ 0x2, 0xfe, 0x32, 0, 0,
+ 0x1, 0xfe, 0x34,
+ 0x2, 0xfe, 0x80, 0x38, 0x30,
+ 0x2, 0xfe, 0x82, 0x38, 0x30,
+ 0x22, 0xf, 0x77,
+ 0x34, 0x66, 0xf, 0xdb, 0, 0,
+ 0x23, 0xf, 0xdb, 0, 0,
+ 0x34, 0x66, 0xf, 0xdf, 0, 0,
+ 0x23, 0xf, 0xdf, 0, 0,
+ 0x34, 0x66, 0xf, 0xf5, 0, 0,
+ 0x23, 0xf, 0xf5, 0, 0,
+ 0x34, 0x66, 0xf, 0xeb, 0, 0,
+ 0x23, 0xf, 0xeb, 0, 0,
+ 0x34, 0x66, 0xf, 0xef, 0, 0,
+ 0x23, 0xf, 0xef, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
+ 0x23, 0xf, 0xae, 0x38, 0x8,
+ 0x23, 0xf, 0xae, 0x38, 0,
+ 0x23, 0xf, 0xae, 0x38, 0x10,
+ 0x23, 0xf, 0xae, 0x38, 0x18,
+ 0x34, 0xf2, 0xf, 0x10, 0, 0,
+ 0x34, 0xf3, 0xf, 0x10, 0, 0,
+ 0x34, 0x66, 0xf, 0x10, 0, 0,
+ 0x23, 0xf, 0x10, 0, 0,
+ 0x34, 0xf2, 0xf, 0x11, 0, 0,
+ 0x34, 0xf3, 0xf, 0x11, 0, 0,
+ 0x34, 0x66, 0xf, 0x11, 0, 0,
+ 0x23, 0xf, 0x11, 0, 0,
+ 0x34, 0xf2, 0xf, 0x12, 0, 0,
+ 0x34, 0xf3, 0xf, 0x12, 0, 0,
+ 0x34, 0x66, 0xf, 0x12, 0, 0,
+ 0x23, 0xf, 0x12, 0xc0, 0xc0,
+ 0x23, 0xf, 0x12, 0, 0,
+ 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
+ 0x23, 0xf, 0x13, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x13, 0, 0,
+ 0x23, 0xf, 0x13, 0, 0,
+ 0x34, 0x66, 0xf, 0x14, 0, 0,
+ 0x23, 0xf, 0x14, 0, 0,
+ 0x34, 0x66, 0xf, 0x15, 0, 0,
+ 0x23, 0xf, 0x15, 0, 0,
+ 0x34, 0xf3, 0xf, 0x16, 0, 0,
+ 0x34, 0x66, 0xf, 0x16, 0, 0,
+ 0x23, 0xf, 0x16, 0xc0, 0xc0,
+ 0x23, 0xf, 0x16, 0, 0,
+ 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
+ 0x23, 0xf, 0x17, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x17, 0, 0,
+ 0x23, 0xf, 0x17, 0, 0,
+ 0x34, 0x66, 0xf, 0x28, 0, 0,
+ 0x23, 0xf, 0x28, 0, 0,
+ 0x34, 0x66, 0xf, 0x29, 0, 0,
+ 0x23, 0xf, 0x29, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2a, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2a, 0, 0,
+ 0x34, 0x66, 0xf, 0x2a, 0, 0,
+ 0x23, 0xf, 0x2a, 0, 0,
+ 0x34, 0x66, 0xf, 0x2b, 0, 0,
+ 0x23, 0xf, 0x2b, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2c, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2c, 0, 0,
+ 0x34, 0x66, 0xf, 0x2c, 0, 0,
+ 0x23, 0xf, 0x2c, 0, 0,
+ 0x34, 0x66, 0xf, 0x2d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2d, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2d, 0, 0,
+ 0x23, 0xf, 0x2d, 0, 0,
+ 0x34, 0x66, 0xf, 0x2e, 0, 0,
+ 0x23, 0xf, 0x2e, 0, 0,
+ 0x34, 0x66, 0xf, 0x2f, 0, 0,
+ 0x23, 0xf, 0x2f, 0, 0,
+ 0x22, 0xf, 0x37,
+ 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
+ 0x23, 0xf, 0x50, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x51, 0, 0,
+ 0x34, 0xf2, 0xf, 0x51, 0, 0,
+ 0x34, 0xf3, 0xf, 0x51, 0, 0,
+ 0x23, 0xf, 0x51, 0, 0,
+ 0x34, 0xf3, 0xf, 0x52, 0, 0,
+ 0x23, 0xf, 0x52, 0, 0,
+ 0x34, 0xf3, 0xf, 0x53, 0, 0,
+ 0x23, 0xf, 0x53, 0, 0,
+ 0x34, 0x66, 0xf, 0x54, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x34, 0x66, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x34, 0x66, 0xf, 0x56, 0, 0,
+ 0x23, 0xf, 0x56, 0, 0,
+ 0x34, 0x66, 0xf, 0x57, 0, 0,
+ 0x23, 0xf, 0x57, 0, 0,
+ 0x34, 0xf2, 0xf, 0x58, 0, 0,
+ 0x34, 0xf3, 0xf, 0x58, 0, 0,
+ 0x34, 0x66, 0xf, 0x58, 0, 0,
+ 0x23, 0xf, 0x58, 0, 0,
+ 0x34, 0xf2, 0xf, 0x59, 0, 0,
+ 0x34, 0xf3, 0xf, 0x59, 0, 0,
+ 0x34, 0x66, 0xf, 0x59, 0, 0,
+ 0x23, 0xf, 0x59, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5a, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5a, 0, 0,
+ 0x34, 0x66, 0xf, 0x5a, 0, 0,
+ 0x23, 0xf, 0x5a, 0, 0,
+ 0x34, 0x66, 0xf, 0x5b, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5b, 0, 0,
+ 0x23, 0xf, 0x5b, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5c, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5c, 0, 0,
+ 0x34, 0x66, 0xf, 0x5c, 0, 0,
+ 0x23, 0xf, 0x5c, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5d, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5d, 0, 0,
+ 0x34, 0x66, 0xf, 0x5d, 0, 0,
+ 0x23, 0xf, 0x5d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5e, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5e, 0, 0,
+ 0x34, 0x66, 0xf, 0x5e, 0, 0,
+ 0x23, 0xf, 0x5e, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5f, 0, 0,
+ 0x34, 0x66, 0xf, 0x5f, 0, 0,
+ 0x23, 0xf, 0x5f, 0, 0,
+ 0x34, 0x66, 0xf, 0x60, 0, 0,
+ 0x23, 0xf, 0x60, 0, 0,
+ 0x34, 0x66, 0xf, 0x61, 0, 0,
+ 0x23, 0xf, 0x61, 0, 0,
+ 0x34, 0x66, 0xf, 0x62, 0, 0,
+ 0x23, 0xf, 0x62, 0, 0,
+ 0x34, 0x66, 0xf, 0x63, 0, 0,
+ 0x23, 0xf, 0x63, 0, 0,
+ 0x34, 0x66, 0xf, 0x64, 0, 0,
+ 0x23, 0xf, 0x64, 0, 0,
+ 0x34, 0x66, 0xf, 0x65, 0, 0,
+ 0x23, 0xf, 0x65, 0, 0,
+ 0x34, 0x66, 0xf, 0x66, 0, 0,
+ 0x23, 0xf, 0x66, 0, 0,
+ 0x34, 0x66, 0xf, 0x67, 0, 0,
+ 0x23, 0xf, 0x67, 0, 0,
+ 0x34, 0x66, 0xf, 0x68, 0, 0,
+ 0x23, 0xf, 0x68, 0, 0,
+ 0x34, 0x66, 0xf, 0x69, 0, 0,
+ 0x23, 0xf, 0x69, 0, 0,
+ 0x34, 0x66, 0xf, 0x6a, 0, 0,
+ 0x23, 0xf, 0x6a, 0, 0,
+ 0x34, 0x66, 0xf, 0x6b, 0, 0,
+ 0x23, 0xf, 0x6b, 0, 0,
+ 0x34, 0x66, 0xf, 0x6c, 0, 0,
+ 0x34, 0x66, 0xf, 0x6d, 0, 0,
+ 0x34, 0x66, 0xf, 0x6e, 0, 0,
+ 0x23, 0xf, 0x6e, 0, 0,
+ 0x34, 0x66, 0xf, 0x6f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x6f, 0, 0,
+ 0x23, 0xf, 0x6f, 0, 0,
+ 0x34, 0x66, 0xf, 0x70, 0, 0,
+ 0x34, 0xf2, 0xf, 0x70, 0, 0,
+ 0x34, 0xf3, 0xf, 0x70, 0, 0,
+ 0x23, 0xf, 0x70, 0, 0,
+ 0x34, 0x66, 0xf, 0x74, 0, 0,
+ 0x23, 0xf, 0x74, 0, 0,
+ 0x34, 0x66, 0xf, 0x75, 0, 0,
+ 0x23, 0xf, 0x75, 0, 0,
+ 0x34, 0x66, 0xf, 0x76, 0, 0,
+ 0x23, 0xf, 0x76, 0, 0,
+ 0x34, 0x66, 0xf, 0x7c, 0, 0,
+ 0x34, 0xf2, 0xf, 0x7c, 0, 0,
+ 0x34, 0x66, 0xf, 0x7d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x7d, 0, 0,
+ 0x34, 0x66, 0xf, 0x7e, 0, 0,
+ 0x34, 0xf3, 0xf, 0x7e, 0, 0,
+ 0x23, 0xf, 0x7e, 0, 0,
+ 0x34, 0x66, 0xf, 0x7f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x7f, 0, 0,
+ 0x23, 0xf, 0x7f, 0, 0,
+ 0x23, 0xf, 0xc3, 0, 0,
+ 0x34, 0x66, 0xf, 0xc4, 0, 0,
+ 0x23, 0xf, 0xc4, 0, 0,
+ 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
+ 0x23, 0xf, 0xc5, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xc6, 0, 0,
+ 0x23, 0xf, 0xc6, 0, 0,
+ 0x34, 0x66, 0xf, 0xd1, 0, 0,
+ 0x23, 0xf, 0xd1, 0, 0,
+ 0x34, 0x66, 0xf, 0xd2, 0, 0,
+ 0x23, 0xf, 0xd2, 0, 0,
+ 0x34, 0x66, 0xf, 0xd3, 0, 0,
+ 0x23, 0xf, 0xd3, 0, 0,
+ 0x34, 0x66, 0xf, 0xd4, 0, 0,
+ 0x23, 0xf, 0xd4, 0, 0,
+ 0x34, 0x66, 0xf, 0xd5, 0, 0,
+ 0x23, 0xf, 0xd5, 0, 0,
+ 0x34, 0x66, 0xf, 0xd6, 0, 0,
+ 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
+ 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
+ 0x23, 0xf, 0xd7, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xd8, 0, 0,
+ 0x23, 0xf, 0xd8, 0, 0,
+ 0x34, 0x66, 0xf, 0xd9, 0, 0,
+ 0x23, 0xf, 0xd9, 0, 0,
+ 0x34, 0x66, 0xf, 0xda, 0, 0,
+ 0x23, 0xf, 0xda, 0, 0,
+ 0x34, 0x66, 0xf, 0xdc, 0, 0,
+ 0x23, 0xf, 0xdc, 0, 0,
+ 0x34, 0x66, 0xf, 0xdd, 0, 0,
+ 0x23, 0xf, 0xdd, 0, 0,
+ 0x34, 0x66, 0xf, 0xde, 0, 0,
+ 0x23, 0xf, 0xde, 0, 0,
+ 0x34, 0x66, 0xf, 0xe0, 0, 0,
+ 0x23, 0xf, 0xe0, 0, 0,
+ 0x34, 0x66, 0xf, 0xe1, 0, 0,
+ 0x23, 0xf, 0xe1, 0, 0,
+ 0x34, 0x66, 0xf, 0xe2, 0, 0,
+ 0x23, 0xf, 0xe2, 0, 0,
+ 0x34, 0x66, 0xf, 0xe3, 0, 0,
+ 0x23, 0xf, 0xe3, 0, 0,
+ 0x34, 0x66, 0xf, 0xe4, 0, 0,
+ 0x23, 0xf, 0xe4, 0, 0,
+ 0x34, 0x66, 0xf, 0xe5, 0, 0,
+ 0x23, 0xf, 0xe5, 0, 0,
+ 0x34, 0x66, 0xf, 0xe7, 0, 0,
+ 0x23, 0xf, 0xe7, 0, 0,
+ 0x34, 0x66, 0xf, 0xe8, 0, 0,
+ 0x23, 0xf, 0xe8, 0, 0,
+ 0x34, 0x66, 0xf, 0xe9, 0, 0,
+ 0x23, 0xf, 0xe9, 0, 0,
+ 0x34, 0x66, 0xf, 0xea, 0, 0,
+ 0x23, 0xf, 0xea, 0, 0,
+ 0x34, 0x66, 0xf, 0xec, 0, 0,
+ 0x23, 0xf, 0xec, 0, 0,
+ 0x34, 0x66, 0xf, 0xed, 0, 0,
+ 0x23, 0xf, 0xed, 0, 0,
+ 0x34, 0x66, 0xf, 0xee, 0, 0,
+ 0x23, 0xf, 0xee, 0, 0,
+ 0x34, 0xf2, 0xf, 0xf0, 0, 0,
+ 0x34, 0x66, 0xf, 0xf1, 0, 0,
+ 0x23, 0xf, 0xf1, 0, 0,
+ 0x34, 0x66, 0xf, 0xf2, 0, 0,
+ 0x23, 0xf, 0xf2, 0, 0,
+ 0x34, 0x66, 0xf, 0xf3, 0, 0,
+ 0x23, 0xf, 0xf3, 0, 0,
+ 0x34, 0x66, 0xf, 0xf4, 0, 0,
+ 0x23, 0xf, 0xf4, 0, 0,
+ 0x34, 0x66, 0xf, 0xf6, 0, 0,
+ 0x23, 0xf, 0xf6, 0, 0,
+ 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
+ 0x23, 0xf, 0xf7, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xf8, 0, 0,
+ 0x23, 0xf, 0xf8, 0, 0,
+ 0x34, 0x66, 0xf, 0xf9, 0, 0,
+ 0x23, 0xf, 0xf9, 0, 0,
+ 0x34, 0x66, 0xf, 0xfa, 0, 0,
+ 0x23, 0xf, 0xfa, 0, 0,
+ 0x34, 0x66, 0xf, 0xfb, 0, 0,
+ 0x23, 0xf, 0xfb, 0, 0,
+ 0x34, 0x66, 0xf, 0xfc, 0, 0,
+ 0x23, 0xf, 0xfc, 0, 0,
+ 0x34, 0x66, 0xf, 0xfd, 0, 0,
+ 0x23, 0xf, 0xfd, 0, 0,
+ 0x34, 0x66, 0xf, 0xfe, 0, 0,
+ 0x23, 0xf, 0xfe, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
+ 0x34, 0xf, 0x38, 0, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
+ 0x34, 0xf, 0x38, 0x1, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
+ 0x34, 0xf, 0x38, 0x2, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
+ 0x34, 0xf, 0x38, 0x3, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
+ 0x34, 0xf, 0x38, 0x4, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
+ 0x34, 0xf, 0x38, 0x5, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
+ 0x34, 0xf, 0x38, 0x6, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
+ 0x34, 0xf, 0x38, 0x7, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
+ 0x34, 0xf, 0x38, 0x8, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
+ 0x34, 0xf, 0x38, 0x9, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
+ 0x34, 0xf, 0x38, 0xa, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
+ 0x34, 0xf, 0x38, 0xb, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
+ 0x34, 0xf, 0x38, 0x1c, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
+ 0x34, 0xf, 0x38, 0x1d, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
+ 0x34, 0xf, 0x38, 0x1e, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
+ 0x34, 0xf, 0x3a, 0xf, 0, 0,
+ 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
+ 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
+ 0x23, 0xf, 0xc7, 0x38, 0x30,
+ 0x23, 0xf, 0xc7, 0x38, 0x38,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
+ 0x23, 0xf, 0x71, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
+ 0x23, 0xf, 0x71, 0xf8, 0xe0,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
+ 0x23, 0xf, 0x71, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
+ 0x23, 0xf, 0x72, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
+ 0x23, 0xf, 0x72, 0xf8, 0xe0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
+ 0x23, 0xf, 0x72, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
+ 0x23, 0xf, 0x73, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
+ 0x23, 0xf, 0x73, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
+ 0x33, 0xf, 0xae, 0xe8,
+ 0x33, 0xf, 0xae, 0xf0,
+ 0x33, 0xf, 0xae, 0xf8,
+ 0x23, 0xf, 0xae, 0x38, 0x38,
+ 0x23, 0xf, 0xf, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
+ 0x1, 0xe7, 0x7,
+};
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 0000000..4eb70ba
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
@@ -0,0 +1,307 @@
+Index: elfutils-0.146/backends/m68k_init.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/m68k_init.c 2010-04-24 10:11:38.000000000 +0000
+@@ -0,0 +1,49 @@
++/* Initialization of m68k specific backend library.
++ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++ This software is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ This softare is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this software; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++*/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND m68k_
++#define RELOC_PREFIX R_68K_
++#include "libebl_CPU.h"
++
++/* This defines the common reloc hooks based on m68k_reloc.def. */
++#include "common-reloc.c"
++
++
++const char *
++m68k_init (elf, machine, eh, ehlen)
++ Elf *elf __attribute__ ((unused));
++ GElf_Half machine __attribute__ ((unused));
++ Ebl *eh;
++ size_t ehlen;
++{
++ /* Check whether the Elf_BH object has a sufficent size. */
++ if (ehlen < sizeof (Ebl))
++ return NULL;
++
++ /* We handle it. */
++ eh->name = "m68k";
++ m68k_init_reloc (eh);
++ HOOK (eh, reloc_simple_type);
++ HOOK (eh, register_info);
++
++ return MODVERSION;
++}
+Index: elfutils-0.146/backends/m68k_regs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/m68k_regs.c 2010-04-24 10:11:38.000000000 +0000
+@@ -0,0 +1,106 @@
++/* Register names and numbers for m68k DWARF.
++ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++ This software is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ This software is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this software; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND m68k_
++#include "libebl_CPU.h"
++
++ssize_t
++m68k_register_info (Ebl *ebl __attribute__ ((unused)),
++ int regno, char *name, size_t namelen,
++ const char **prefix, const char **setname,
++ int *bits, int *type)
++{
++ if (name == NULL)
++ return 25;
++
++ if (regno < 0 || regno > 24 || namelen < 5)
++ return -1;
++
++ *prefix = "%";
++ *bits = 32;
++ *type = (regno < 8 ? DW_ATE_signed
++ : regno < 16 ? DW_ATE_address : DW_ATE_float);
++
++ if (regno < 8)
++ {
++ *setname = "integer";
++ }
++ else if (regno < 16)
++ {
++ *setname = "address";
++ }
++ else if (regno < 24)
++ {
++ *setname = "FPU";
++ }
++ else
++ {
++ *setname = "address";
++ *type = DW_ATE_address;
++ }
++
++ switch (regno)
++ {
++ case 0 ... 7:
++ name[0] = 'd';
++ name[1] = regno + '0';
++ namelen = 2;
++ break;
++
++ case 8 ... 13:
++ name[0] = 'a';
++ name[1] = regno - 8 + '0';
++ namelen = 2;
++ break;
++
++ case 14:
++ name[0] = 'f';
++ name[1] = 'p';
++ namelen = 2;
++ break;
++
++ case 15:
++ name[0] = 's';
++ name[1] = 'p';
++ namelen = 2;
++ break;
++
++ case 16 ... 23:
++ name[0] = 'f';
++ name[1] = 'p';
++ name[2] = regno - 16 + '0';
++ namelen = 3;
++ break;
++
++ case 24:
++ name[0] = 'p';
++ name[1] = 'c';
++ namelen = 2;
++ }
++
++ name[namelen++] = '\0';
++ return namelen;
++}
++
+Index: elfutils-0.146/backends/m68k_reloc.def
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/m68k_reloc.def 2010-04-24 10:11:38.000000000 +0000
+@@ -0,0 +1,45 @@
++/* List the relocation types for m68k. -*- C -*-
++ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++ This software is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ This software is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this software; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++*/
++
++/* NAME, REL|EXEC|DYN */
++
++RELOC_TYPE (NONE, 0)
++RELOC_TYPE (32, REL|EXEC|DYN)
++RELOC_TYPE (16, REL)
++RELOC_TYPE (8, REL)
++RELOC_TYPE (PC32, REL|EXEC|DYN)
++RELOC_TYPE (PC16, REL)
++RELOC_TYPE (PC8, REL)
++RELOC_TYPE (GOT32, REL)
++RELOC_TYPE (GOT16, REL)
++RELOC_TYPE (GOT8, REL)
++RELOC_TYPE (GOT32O, REL)
++RELOC_TYPE (GOT16O, REL)
++RELOC_TYPE (GOT8O, REL)
++RELOC_TYPE (PLT32, REL)
++RELOC_TYPE (PLT16, REL)
++RELOC_TYPE (PLT8, REL)
++RELOC_TYPE (PLT32O, REL)
++RELOC_TYPE (PLT16O, REL)
++RELOC_TYPE (PLT8O, REL)
++RELOC_TYPE (COPY, EXEC)
++RELOC_TYPE (GLOB_DAT, EXEC|DYN)
++RELOC_TYPE (JMP_SLOT, EXEC|DYN)
++RELOC_TYPE (RELATIVE, EXEC|DYN)
++RELOC_TYPE (GNU_VTINHERIT, REL)
++RELOC_TYPE (GNU_VTENTRY, REL)
++
+Index: elfutils-0.146/libelf/elf.h
+===================================================================
+--- elfutils-0.146.orig/libelf/elf.h 2010-04-24 10:11:13.000000000 +0000
++++ elfutils-0.146/libelf/elf.h 2010-04-24 10:13:50.000000000 +0000
+@@ -1125,6 +1125,9 @@
+ #define R_68K_GLOB_DAT 20 /* Create GOT entry */
+ #define R_68K_JMP_SLOT 21 /* Create PLT entry */
+ #define R_68K_RELATIVE 22 /* Adjust by program base */
++/* The next 2 are GNU extensions to enable C++ vtable garbage collection. */
++#define R_68K_GNU_VTINHERIT 23
++#define R_68K_GNU_VTENTRY 24
+ #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
+ #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
+ #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
+Index: elfutils-0.146/backends/Makefile.am
+===================================================================
+--- elfutils-0.146.orig/backends/Makefile.am 2010-04-24 10:11:23.000000000 +0000
++++ elfutils-0.146/backends/Makefile.am 2010-04-24 10:11:38.000000000 +0000
+@@ -29,11 +29,12 @@
+ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
+
+
+-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips m68k
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
+- libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
++ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a \
++ libebl_m68k_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -103,6 +104,10 @@
+ libebl_mips_pic_a_SOURCES = $(mips_SRCS)
+ am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
+
++m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c
++libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
++am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ @rm -f $(@:.so=.map)
+ echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+Index: elfutils-0.146/backends/m68k_symbol.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.146/backends/m68k_symbol.c 2010-04-24 10:11:38.000000000 +0000
+@@ -0,0 +1,43 @@
++/* m68k specific symbolic name handling.
++ Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++ This software is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ This software distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this software; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++*/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND m68k_
++#include "libebl_CPU.h"
++
++/* Check for the simple reloc types. */
++Elf_Type
++m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++ switch (type)
++ {
++ case R_68K_32:
++ return ELF_T_SWORD;
++ case R_68K_16:
++ return ELF_T_HALF;
++ case R_68K_8:
++ return ELF_T_BYTE;
++ default:
++ return ELF_T_NUM;
++ }
++}
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 0000000..ffdff90
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
@@ -0,0 +1,711 @@
+Index: elfutils-0.145/backends/mips_init.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.145/backends/mips_init.c 2010-02-24 18:57:35.000000000 +0000
+@@ -0,0 +1,60 @@
++/* Initialization of mips specific backend library.
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND mips_
++#define RELOC_PREFIX R_MIPS_
++#include "libebl_CPU.h"
++
++/* This defines the common reloc hooks based on mips_reloc.def. */
++#include "common-reloc.c"
++
++const char *
++mips_init (elf, machine, eh, ehlen)
++ Elf *elf __attribute__ ((unused));
++ GElf_Half machine __attribute__ ((unused));
++ Ebl *eh;
++ size_t ehlen;
++{
++ /* Check whether the Elf_BH object has a sufficent size. */
++ if (ehlen < sizeof (Ebl))
++ return NULL;
++
++ /* We handle it. */
++ if (machine == EM_MIPS)
++ eh->name = "MIPS R3000 big-endian";
++ else if (machine == EM_MIPS_RS3_LE)
++ eh->name = "MIPS R3000 little-endian";
++
++ mips_init_reloc (eh);
++ HOOK (eh, reloc_simple_type);
++ HOOK (eh, return_value_location);
++ HOOK (eh, register_info);
++
++ return MODVERSION;
++}
+Index: elfutils-0.145/backends/mips_regs.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.145/backends/mips_regs.c 2010-02-24 18:57:35.000000000 +0000
+@@ -0,0 +1,104 @@
++/* Register names and numbers for MIPS DWARF.
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++ssize_t
++mips_register_info (Ebl *ebl __attribute__((unused)),
++ int regno, char *name, size_t namelen,
++ const char **prefix, const char **setname,
++ int *bits, int *type)
++{
++ if (name == NULL)
++ return 66;
++
++ if (regno < 0 || regno > 65 || namelen < 4)
++ return -1;
++
++ *prefix = "$";
++
++ if (regno < 32)
++ {
++ *setname = "integer";
++ *type = DW_ATE_signed;
++ *bits = 32;
++ if (regno < 32 + 10)
++ {
++ name[0] = regno + '0';
++ namelen = 1;
++ }
++ else
++ {
++ name[0] = (regno / 10) + '0';
++ name[1] = (regno % 10) + '0';
++ namelen = 2;
++ }
++ }
++ else if (regno < 64)
++ {
++ *setname = "FPU";
++ *type = DW_ATE_float;
++ *bits = 32;
++ name[0] = 'f';
++ if (regno < 32 + 10)
++ {
++ name[1] = (regno - 32) + '0';
++ namelen = 2;
++ }
++ else
++ {
++ name[1] = (regno - 32) / 10 + '0';
++ name[2] = (regno - 32) % 10 + '0';
++ namelen = 3;
++ }
++ }
++ else if (regno == 64)
++ {
++ *type = DW_ATE_signed;
++ *bits = 32;
++ name[0] = 'h';
++ name[1] = 'i';
++ namelen = 2;
++ }
++ else
++ {
++ *type = DW_ATE_signed;
++ *bits = 32;
++ name[0] = 'l';
++ name[1] = 'o';
++ namelen = 2;
++ }
++
++ name[namelen++] = '\0';
++ return namelen;
++}
+Index: elfutils-0.145/backends/mips_reloc.def
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.145/backends/mips_reloc.def 2010-02-24 18:57:35.000000000 +0000
+@@ -0,0 +1,79 @@
++/* List the relocation types for mips. -*- C -*-
++ Copyright (C) 2006 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++/* NAME, REL|EXEC|DYN */
++
++RELOC_TYPE (NONE, 0)
++RELOC_TYPE (16, 0)
++RELOC_TYPE (32, 0)
++RELOC_TYPE (REL32, 0)
++RELOC_TYPE (26, 0)
++RELOC_TYPE (HI16, 0)
++RELOC_TYPE (LO16, 0)
++RELOC_TYPE (GPREL16, 0)
++RELOC_TYPE (LITERAL, 0)
++RELOC_TYPE (GOT16, 0)
++RELOC_TYPE (PC16, 0)
++RELOC_TYPE (CALL16, 0)
++RELOC_TYPE (GPREL32, 0)
++
++RELOC_TYPE (SHIFT5, 0)
++RELOC_TYPE (SHIFT6, 0)
++RELOC_TYPE (64, 0)
++RELOC_TYPE (GOT_DISP, 0)
++RELOC_TYPE (GOT_PAGE, 0)
++RELOC_TYPE (GOT_OFST, 0)
++RELOC_TYPE (GOT_HI16, 0)
++RELOC_TYPE (GOT_LO16, 0)
++RELOC_TYPE (SUB, 0)
++RELOC_TYPE (INSERT_A, 0)
++RELOC_TYPE (INSERT_B, 0)
++RELOC_TYPE (DELETE, 0)
++RELOC_TYPE (HIGHER, 0)
++RELOC_TYPE (HIGHEST, 0)
++RELOC_TYPE (CALL_HI16, 0)
++RELOC_TYPE (CALL_LO16, 0)
++RELOC_TYPE (SCN_DISP, 0)
++RELOC_TYPE (REL16, 0)
++RELOC_TYPE (ADD_IMMEDIATE, 0)
++RELOC_TYPE (PJUMP, 0)
++RELOC_TYPE (RELGOT, 0)
++RELOC_TYPE (JALR, 0)
++RELOC_TYPE (TLS_DTPMOD32, 0)
++RELOC_TYPE (TLS_DTPREL32, 0)
++RELOC_TYPE (TLS_DTPMOD64, 0)
++RELOC_TYPE (TLS_DTPREL64, 0)
++RELOC_TYPE (TLS_GD, 0)
++RELOC_TYPE (TLS_LDM, 0)
++RELOC_TYPE (TLS_DTPREL_HI16, 0)
++RELOC_TYPE (TLS_DTPREL_LO16, 0)
++RELOC_TYPE (TLS_GOTTPREL, 0)
++RELOC_TYPE (TLS_TPREL32, 0)
++RELOC_TYPE (TLS_TPREL64, 0)
++RELOC_TYPE (TLS_TPREL_HI16, 0)
++RELOC_TYPE (TLS_TPREL_LO16, 0)
++
++#define NO_COPY_RELOC 1
++#define NO_RELATIVE_RELOC 1
+Index: elfutils-0.145/backends/mips_retval.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.145/backends/mips_retval.c 2010-02-24 18:57:35.000000000 +0000
+@@ -0,0 +1,321 @@
++/* Function return value location for Linux/mips ABI.
++ Copyright (C) 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <assert.h>
++#include <dwarf.h>
++#include <elf.h>
++
++#include "../libebl/libeblP.h"
++#include "../libdw/libdwP.h"
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
++#define EF_MIPS_ABI 0x0000F000
++
++/* The original o32 abi. */
++#define E_MIPS_ABI_O32 0x00001000
++
++/* O32 extended to work on 64 bit architectures */
++#define E_MIPS_ABI_O64 0x00002000
++
++/* EABI in 32 bit mode */
++#define E_MIPS_ABI_EABI32 0x00003000
++
++/* EABI in 64 bit mode */
++#define E_MIPS_ABI_EABI64 0x00004000
++
++/* All the possible MIPS ABIs. */
++enum mips_abi
++ {
++ MIPS_ABI_UNKNOWN = 0,
++ MIPS_ABI_N32,
++ MIPS_ABI_O32,
++ MIPS_ABI_N64,
++ MIPS_ABI_O64,
++ MIPS_ABI_EABI32,
++ MIPS_ABI_EABI64,
++ MIPS_ABI_LAST
++ };
++
++/* Find the mips ABI of the current file */
++enum mips_abi find_mips_abi(Elf *elf)
++{
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++
++ if (ehdr == NULL)
++ return MIPS_ABI_LAST;
++
++ GElf_Word elf_flags = ehdr->e_flags;
++
++ /* Check elf_flags to see if it specifies the ABI being used. */
++ switch ((elf_flags & EF_MIPS_ABI))
++ {
++ case E_MIPS_ABI_O32:
++ return MIPS_ABI_O32;
++ case E_MIPS_ABI_O64:
++ return MIPS_ABI_O64;
++ case E_MIPS_ABI_EABI32:
++ return MIPS_ABI_EABI32;
++ case E_MIPS_ABI_EABI64:
++ return MIPS_ABI_EABI64;
++ default:
++ if ((elf_flags & EF_MIPS_ABI2))
++ return MIPS_ABI_N32;
++ }
++
++ /* GCC creates a pseudo-section whose name describes the ABI. */
++ size_t shstrndx;
++ if (elf_getshdrstrndx (elf, &shstrndx) < 0)
++ return MIPS_ABI_LAST;
++
++ const char *name;
++ Elf_Scn *scn = NULL;
++ while ((scn = elf_nextscn (elf, scn)) != NULL)
++ {
++ GElf_Shdr shdr_mem;
++ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
++ if (shdr == NULL)
++ return MIPS_ABI_LAST;
++
++ name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
++ if (strncmp (name, ".mdebug.", 8) != 0)
++ continue;
++
++ if (strcmp (name, ".mdebug.abi32") == 0)
++ return MIPS_ABI_O32;
++ else if (strcmp (name, ".mdebug.abiN32") == 0)
++ return MIPS_ABI_N32;
++ else if (strcmp (name, ".mdebug.abi64") == 0)
++ return MIPS_ABI_N64;
++ else if (strcmp (name, ".mdebug.abiO64") == 0)
++ return MIPS_ABI_O64;
++ else if (strcmp (name, ".mdebug.eabi32") == 0)
++ return MIPS_ABI_EABI32;
++ else if (strcmp (name, ".mdebug.eabi64") == 0)
++ return MIPS_ABI_EABI64;
++ else
++ return MIPS_ABI_UNKNOWN;
++ }
++
++ return MIPS_ABI_UNKNOWN;
++}
++
++unsigned int
++mips_abi_regsize (enum mips_abi abi)
++{
++ switch (abi)
++ {
++ case MIPS_ABI_EABI32:
++ case MIPS_ABI_O32:
++ return 4;
++ case MIPS_ABI_N32:
++ case MIPS_ABI_N64:
++ case MIPS_ABI_O64:
++ case MIPS_ABI_EABI64:
++ return 8;
++ case MIPS_ABI_UNKNOWN:
++ case MIPS_ABI_LAST:
++ default:
++ return 0;
++ }
++}
++
++
++/* $v0 or pair $v0, $v1 */
++static const Dwarf_Op loc_intreg_o32[] =
++ {
++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++static const Dwarf_Op loc_intreg[] =
++ {
++ { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_intreg 1
++#define nloc_intregpair 4
++
++/* $f0 (float), or pair $f0, $f1 (double).
++ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
++static const Dwarf_Op loc_fpreg_o32[] =
++ {
++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
++ { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
++ };
++
++/* $f0, or pair $f0, $f2. */
++static const Dwarf_Op loc_fpreg[] =
++ {
++ { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
++ { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
++ };
++#define nloc_fpreg 1
++#define nloc_fpregpair 4
++#define nloc_fpregquad 8
++
++/* The return value is a structure and is actually stored in stack space
++ passed in a hidden argument by the caller. But, the compiler
++ helpfully returns the address of that space in $v0. */
++static const Dwarf_Op loc_aggregate[] =
++ {
++ { .atom = DW_OP_breg2, .number = 0 }
++ };
++#define nloc_aggregate 1
++
++int
++mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++ /* First find the ABI used by the elf object */
++ enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
++
++ /* Something went seriously wrong while trying to figure out the ABI */
++ if (abi == MIPS_ABI_LAST)
++ return -1;
++
++ /* We couldn't identify the ABI, but the file seems valid */
++ if (abi == MIPS_ABI_UNKNOWN)
++ return -2;
++
++ /* Can't handle EABI variants */
++ if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
++ return -2;
++
++ unsigned int regsize = mips_abi_regsize (abi);
++ if (!regsize)
++ return -2;
++
++ /* Start with the function's type, and get the DW_AT_type attribute,
++ which is the type of the return value. */
++
++ Dwarf_Attribute attr_mem;
++ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++ if (attr == NULL)
++ /* The function has no return value, like a `void' function in C. */
++ return 0;
++
++ Dwarf_Die die_mem;
++ Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++ int tag = dwarf_tag (typedie);
++
++ /* Follow typedefs and qualifiers to get to the actual type. */
++ while (tag == DW_TAG_typedef
++ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
++ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++
++ switch (tag)
++ {
++ case -1:
++ return -1;
++
++ case DW_TAG_subrange_type:
++ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++ {
++ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++ typedie = dwarf_formref_die (attr, &die_mem);
++ tag = dwarf_tag (typedie);
++ }
++ /* Fall through. */
++
++ case DW_TAG_base_type:
++ case DW_TAG_enumeration_type:
++ case DW_TAG_pointer_type:
++ case DW_TAG_ptr_to_member_type:
++ {
++ Dwarf_Word size;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++ &attr_mem), &size) != 0)
++ {
++ if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++ size = regsize;
++ else
++ return -1;
++ }
++ if (tag == DW_TAG_base_type)
++ {
++ Dwarf_Word encoding;
++ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++ &attr_mem), &encoding) != 0)
++ return -1;
++
++#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
++
++ if (encoding == DW_ATE_float)
++ {
++ *locp = ABI_LOC(loc_fpreg, regsize);
++ if (size <= regsize)
++ return nloc_fpreg;
++
++ if (size <= 2*regsize)
++ return nloc_fpregpair;
++
++ if (size <= 4*regsize && abi == MIPS_ABI_O32)
++ return nloc_fpregquad;
++
++ goto aggregate;
++ }
++ }
++ *locp = ABI_LOC(loc_intreg, regsize);
++ if (size <= regsize)
++ return nloc_intreg;
++ if (size <= 2*regsize)
++ return nloc_intregpair;
++
++ /* Else fall through. Shouldn't happen though (at least with gcc) */
++ }
++
++ case DW_TAG_structure_type:
++ case DW_TAG_class_type:
++ case DW_TAG_union_type:
++ case DW_TAG_array_type:
++ aggregate:
++ /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
++ if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
++ return -2;
++
++ *locp = loc_aggregate;
++ return nloc_aggregate;
++ }
++
++ /* XXX We don't have a good way to return specific errors from ebl calls.
++ This value means we do not understand the type, but it is well-formed
++ DWARF and might be valid. */
++ return -2;
++}
+Index: elfutils-0.145/backends/mips_symbol.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ elfutils-0.145/backends/mips_symbol.c 2010-02-24 18:57:35.000000000 +0000
+@@ -0,0 +1,52 @@
++/* MIPS specific symbolic name handling.
++ Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
++ This file is part of Red Hat elfutils.
++ Written by Jakub Jelinek <jakub@redhat.com>, 2002.
++
++ Red Hat elfutils is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by the
++ Free Software Foundation; version 2 of the License.
++
++ Red Hat elfutils is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with Red Hat elfutils; if not, write to the Free Software Foundation,
++ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++ Red Hat elfutils is an included package of the Open Invention Network.
++ An included package of the Open Invention Network is a package for which
++ Open Invention Network licensees cross-license their patents. No patent
++ license is granted, either expressly or impliedly, by designation as an
++ included package. Should you wish to participate in the Open Invention
++ Network licensing program, please visit www.openinventionnetwork.com
++ <http://www.openinventionnetwork.com>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++/* Check for the simple reloc types. */
++Elf_Type
++mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++ switch (type)
++ {
++ case R_MIPS_16:
++ return ELF_T_HALF;
++ case R_MIPS_32:
++ return ELF_T_WORD;
++ case R_MIPS_64:
++ return ELF_T_XWORD;
++ default:
++ return ELF_T_NUM;
++ }
++}
+Index: elfutils-0.145/libebl/eblopenbackend.c
+===================================================================
+--- elfutils-0.145.orig/libebl/eblopenbackend.c 2010-02-24 18:55:51.000000000 +0000
++++ elfutils-0.145/libebl/eblopenbackend.c 2010-02-24 18:57:35.000000000 +0000
+@@ -91,6 +91,8 @@
+ { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
+ { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
+ { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
++ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
++ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
+
+ { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
+ { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
+Index: elfutils-0.145/backends/common-reloc.c
+===================================================================
+--- elfutils-0.145.orig/backends/common-reloc.c 2010-02-24 18:55:51.000000000 +0000
++++ elfutils-0.145/backends/common-reloc.c 2010-02-24 18:57:35.000000000 +0000
+@@ -109,11 +109,13 @@
+ }
+
+
++#ifndef NO_COPY_RELOC
+ bool
+ EBLHOOK(copy_reloc_p) (int reloc)
+ {
+ return reloc == R_TYPE (COPY);
+ }
++#endif
+
+ bool
+ EBLHOOK(none_reloc_p) (int reloc)
+@@ -135,7 +137,9 @@
+ ebl->reloc_type_name = EBLHOOK(reloc_type_name);
+ ebl->reloc_type_check = EBLHOOK(reloc_type_check);
+ ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
++#ifndef NO_COPY_RELOC
+ ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
++#endif
+ ebl->none_reloc_p = EBLHOOK(none_reloc_p);
+ #ifndef NO_RELATIVE_RELOC
+ ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
+Index: elfutils-0.145/backends/Makefile.am
+===================================================================
+--- elfutils-0.145.orig/backends/Makefile.am 2010-02-24 18:57:26.000000000 +0000
++++ elfutils-0.145/backends/Makefile.am 2010-02-24 18:57:57.000000000 +0000
+@@ -29,11 +29,11 @@
+ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
+
+
+-modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc
++modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 parisc mips
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
+ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
+ libebl_sparc_pic.a libebl_ppc_pic.a libebl_ppc64_pic.a \
+- libebl_s390_pic.a libebl_parisc_pic.a
++ libebl_s390_pic.a libebl_parisc_pic.a libebl_mips_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+
+@@ -99,6 +99,10 @@
+ libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+ am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ @rm -f $(@:.so=.map)
+ 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 0000000..d3a7246
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
@@ -0,0 +1,1122 @@
+Index: elfutils-0.148/backends/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/backends/ChangeLog 2010-04-13 20:08:02.000000000 +0000
++++ elfutils-0.148/backends/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -106,6 +106,10 @@
+ * ppc_attrs.c (ppc_check_object_attribute): Handle tag
+ GNU_Power_ABI_Struct_Return.
+
++2009-01-23 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
++
+ 2008-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
+@@ -433,6 +437,11 @@
+ * sparc_init.c: Likewise.
+ * x86_64_init.c: Likewise.
+
++2005-11-22 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
++ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
++
+ 2005-11-19 Roland McGrath <roland@redhat.com>
+
+ * ppc64_reloc.def: REL30 -> ADDR30.
+@@ -455,6 +464,9 @@
+ * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
+ (CLEANFILES): Add libebl_$(m).so.
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
+ * ppc64_reloc.def: Likewise.
+
+Index: elfutils-0.148/backends/Makefile.am
+===================================================================
+--- elfutils-0.148.orig/backends/Makefile.am 2010-04-13 20:08:02.000000000 +0000
++++ elfutils-0.148/backends/Makefile.am 2010-07-03 13:04:07.000000000 +0000
+@@ -103,7 +103,7 @@
+ $(LINK) -shared -o $(@:.map=.so) \
+ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
+ -Wl,--version-script,$(@:.so=.map) \
+- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
+ $(textrel_check)
+
+ libebl_i386.so: $(cpu_i386)
+Index: elfutils-0.148/backends/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/backends/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/backends/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -165,6 +165,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -194,6 +195,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -257,7 +259,7 @@
+ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1)
+ @MUDFLAP_FALSE@libmudflap =
+@@ -698,7 +700,7 @@
+ $(LINK) -shared -o $(@:.map=.so) \
+ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
+ -Wl,--version-script,$(@:.so=.map) \
+- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
+ $(textrel_check)
+
+ libebl_i386.so: $(cpu_i386)
+Index: elfutils-0.148/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/ChangeLog 2010-04-21 14:26:40.000000000 +0000
++++ elfutils-0.148/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -2,6 +2,10 @@
+
+ * configure.ac (LOCALEDIR, DATADIRNAME): Removed.
+
++2009-11-22 Roland McGrath <roland@redhat.com>
++
++ * configure.ac: Use sed and expr instead of modern bash extensions.
++
+ 2009-09-21 Ulrich Drepper <drepper@redhat.com>
+
+ * configure.ac: Update for more modern autoconf.
+@@ -10,6 +14,10 @@
+
+ * configure.ac (zip_LIBS): Check for liblzma too.
+
++2009-08-17 Roland McGrath <roland@redhat.com>
++
++ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
++
+ 2009-04-19 Roland McGrath <roland@redhat.com>
+
+ * configure.ac (eu_version): Round down here, not in version.h macros.
+@@ -21,6 +29,8 @@
+
+ 2009-01-23 Roland McGrath <roland@redhat.com>
+
++ * configure.ac: Check for __builtin_popcount.
++
+ * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
+
+ * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
+@@ -101,6 +111,10 @@
+ * configure.ac: Add dummy automake conditional to get dependencies
+ for non-generic linker right. See src/Makefile.am.
+
++2005-11-22 Roland McGrath <roland@redhat.com>
++
++ * configure.ac: Check for --as-needed linker option.
++
+ 2005-11-18 Roland McGrath <roland@redhat.com>
+
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
+@@ -148,6 +162,17 @@
+ * Makefile.am (all_SUBDIRS): Add libdwfl.
+ * configure.ac: Write libdwfl/Makefile.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * configure.ac (WEXTRA): Check for -Wextra and set this substitution.
++
++ * configure.ac: Check for struct stat st_?tim members.
++ * src/strip.c (process_file): Use st_?time if st_?tim are not there.
++
++ * configure.ac: Check for futimes function.
++ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
++ (handle_ar) [! HAVE_FUTIMES]: Likewise.
++
+ 2005-05-19 Roland McGrath <roland@redhat.com>
+
+ * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
+Index: elfutils-0.148/config/eu.am
+===================================================================
+--- elfutils-0.148.orig/config/eu.am 2010-04-21 14:26:40.000000000 +0000
++++ elfutils-0.148/config/eu.am 2010-07-03 13:04:07.000000000 +0000
+@@ -25,11 +25,14 @@
+ ## <http://www.openinventionnetwork.com>.
+ ##
+
++WEXTRA = @WEXTRA@
++LD_AS_NEEDED = @LD_AS_NEEDED@
++
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
+ INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
+ $(if $($(*F)_no_Werror),,-Werror) \
+- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
++ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
+ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
+ $($(*F)_CFLAGS)
+
+Index: elfutils-0.148/config/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/config/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/config/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -76,6 +76,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -105,6 +106,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+Index: elfutils-0.148/config.h.in
+===================================================================
+--- elfutils-0.148.orig/config.h.in 2010-06-28 19:07:37.000000000 +0000
++++ elfutils-0.148/config.h.in 2010-07-03 13:04:07.000000000 +0000
+@@ -1,5 +1,8 @@
+ /* config.h.in. Generated from configure.ac by autoheader. */
+
++/* Have __builtin_popcount. */
++#undef HAVE_BUILTIN_POPCOUNT
++
+ /* $libdir subdirectory containing libebl modules. */
+ #undef LIBEBL_SUBDIR
+
+@@ -55,4 +58,7 @@
+ /* Define for large files, on AIX-style hosts. */
+ #undef _LARGE_FILES
+
++/* Stubbed out if missing compiler support. */
++#undef __thread
++
+ #include <eu-config.h>
+Index: elfutils-0.148/configure.ac
+===================================================================
+--- elfutils-0.148.orig/configure.ac 2010-06-28 19:07:26.000000000 +0000
++++ elfutils-0.148/configure.ac 2010-07-03 13:04:07.000000000 +0000
+@@ -73,6 +73,54 @@
+ AS_IF([test "x$ac_cv_c99" != xyes],
+ AC_MSG_ERROR([gcc with C99 support required]))
+
++AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
++old_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS -Wextra"
++AC_COMPILE_IFELSE([void foo (void) { }],
++ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
++CFLAGS="$old_CFLAGS"])
++AC_SUBST(WEXTRA)
++AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
++
++AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
++old_CFLAGS="$CFLAGS"
++CFLAGS="$CFLAGS -fgnu89-inline -Werror"
++AC_COMPILE_IFELSE([
++void foo (void)
++{
++ inline void bar (void) {}
++ bar ();
++}
++extern inline void baz (void) {}
++], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
++CFLAGS="$old_CFLAGS"])
++AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
++ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
++
++AC_CACHE_CHECK([for --as-needed linker option],
++ ac_cv_as_needed, [dnl
++cat > conftest.c <<EOF
++int main (void) { return 0; }
++EOF
++if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
++ -fPIC -shared -o conftest.so conftest.c
++ -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
++then
++ ac_cv_as_needed=yes
++else
++ ac_cv_as_needed=no
++fi
++rm -f conftest*])
++AS_IF([test "x$ac_cv_as_needed" = xyes],
++ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
++AC_SUBST(LD_AS_NEEDED)
++
++AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
++AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
++ ac_cv_popcount=yes, ac_cv_popcount=no)])
++AS_IF([test "x$ac_cv_popcount" = xyes],
++ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
++
+ AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
+ # Use the same flags that we use for our DSOs, so the test is representative.
+ # Some old compiler/linker/libc combinations fail some ways and not others.
+@@ -88,7 +136,10 @@
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"])
+ AS_IF([test "x$ac_cv_tls" != xyes],
+- AC_MSG_ERROR([__thread support required]))
++ [AS_IF([test "$use_locks" = yes],
++ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
++ [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
++ [Stubbed out if missing compiler support.])])])
+
+ dnl This test must come as early as possible after the compiler configuration
+ dnl tests, because the choice of the file model can (in principle) affect
+@@ -251,7 +302,7 @@
+
+ # 1.234<whatever> -> 1234<whatever>
+ case "$PACKAGE_VERSION" in
+-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
++[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
+ *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
+ esac
+ case "$eu_version" in
+@@ -280,6 +331,6 @@
+ esac
+
+ # Round up to the next release API (x.y) version.
+-[eu_version=$[($eu_version + 999) / 1000]]
++eu_version=`expr \( $eu_version + 999 \) / 1000`
+
+ AC_OUTPUT
+Index: elfutils-0.148/lib/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/lib/ChangeLog 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/lib/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -14,6 +14,9 @@
+
+ 2009-01-23 Roland McGrath <roland@redhat.com>
+
++ * eu-config.h [! HAVE_BUILTIN_POPCOUNT]
++ (__builtin_popcount): New inline function.
++
+ * eu-config.h: Add multiple inclusion protection.
+
+ 2009-01-17 Ulrich Drepper <drepper@redhat.com>
+@@ -70,6 +73,11 @@
+ * Makefile.am (libeu_a_SOURCES): Add it.
+ * system.h: Declare crc32_file.
+
++2005-02-07 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-04-30 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am: Use -ffunction-sections for xmalloc.c.
+Index: elfutils-0.148/lib/eu-config.h
+===================================================================
+--- elfutils-0.148.orig/lib/eu-config.h 2009-08-12 14:23:22.000000000 +0000
++++ elfutils-0.148/lib/eu-config.h 2010-07-03 13:04:07.000000000 +0000
+@@ -182,6 +182,17 @@
+ /* This macro is used by the tests conditionalize for standalone building. */
+ #define ELFUTILS_HEADER(name) <lib##name.h>
+
++#ifndef HAVE_BUILTIN_POPCOUNT
++# define __builtin_popcount hakmem_popcount
++static inline unsigned int __attribute__ ((unused))
++hakmem_popcount (unsigned int x)
++{
++ /* HAKMEM 169 */
++ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
++ return ((n + (n >> 3)) & 030707070707) % 63;
++}
++#endif /* HAVE_BUILTIN_POPCOUNT */
++
+
+ #ifdef SHARED
+ # define OLD_VERSION(name, version) \
+Index: elfutils-0.148/lib/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/lib/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/lib/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -99,6 +99,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -128,6 +129,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -190,7 +192,7 @@
+ -I$(srcdir)/../libelf
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1) -fpic
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libasm/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libasm/ChangeLog 2010-03-05 05:48:23.000000000 +0000
++++ elfutils-0.148/libasm/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -67,6 +67,11 @@
+ * asm_error.c: Add new error ASM_E_IOERROR.
+ * libasmP.h: Add ASM_E_IOERROR definition.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-02-15 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
+Index: elfutils-0.148/libasm/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libasm/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/libasm/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -147,6 +147,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -176,6 +177,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = 1
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -239,7 +241,7 @@
+ -I$(top_srcdir)/libdw
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1)
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libcpu/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libcpu/ChangeLog 2010-03-05 05:48:23.000000000 +0000
++++ elfutils-0.148/libcpu/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -9,6 +9,9 @@
+
+ 2009-01-23 Roland McGrath <roland@redhat.com>
+
++ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old
++ compilers that don't realize it's noreturn.
++
+ * Makefile.am (i386_parse_CFLAGS): Use quotes around command
+ substitution that can produce leading whitespace.
+
+@@ -338,6 +341,11 @@
+ * defs/i386.doc: New file.
+ * defs/x86_64: New file.
+
++2005-04-04 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it instead of -Wextra.
++
+ 2005-02-15 Ulrich Drepper <drepper@redhat.com>
+
+ * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
+Index: elfutils-0.148/libcpu/i386_disasm.c
+===================================================================
+--- elfutils-0.148.orig/libcpu/i386_disasm.c 2009-01-08 20:56:36.000000000 +0000
++++ elfutils-0.148/libcpu/i386_disasm.c 2010-07-03 13:04:07.000000000 +0000
+@@ -791,6 +791,7 @@
+
+ default:
+ assert (! "INVALID not handled");
++ abort ();
+ }
+ }
+ else
+Index: elfutils-0.148/libcpu/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libcpu/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/libcpu/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -116,6 +116,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
+@@ -145,6 +146,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -208,7 +210,7 @@
+ -I$(srcdir)/../libdw -I$(srcdir)/../libasm
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1) -fpic -fdollars-in-identifiers
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libdw/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libdw/ChangeLog 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/libdw/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -276,6 +276,10 @@
+
+ * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
+
++2009-08-17 Roland McGrath <roland@redhat.com>
++
++ * libdw.h: Disable extern inlines for GCC 4.2.
++
+ 2009-08-10 Roland McGrath <roland@redhat.com>
+
+ * dwarf_getscopevar.c: Use dwarf_diename.
+@@ -1044,6 +1048,11 @@
+
+ 2005-05-31 Roland McGrath <roland@redhat.com>
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
++2005-05-31 Roland McGrath <roland@redhat.com>
++
+ * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
+ formref offset.
+
+Index: elfutils-0.148/libdw/libdw.h
+===================================================================
+--- elfutils-0.148.orig/libdw/libdw.h 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/libdw/libdw.h 2010-07-03 13:04:07.000000000 +0000
+@@ -842,7 +842,7 @@
+
+
+ /* Inline optimizations. */
+-#ifdef __OPTIMIZE__
++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
+ /* Return attribute code of given attribute. */
+ __libdw_extern_inline unsigned int
+ dwarf_whatattr (Dwarf_Attribute *attr)
+Index: elfutils-0.148/libdw/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libdw/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/libdw/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -191,6 +191,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -220,6 +221,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = 1
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -282,7 +284,7 @@
+ -I$(srcdir)/../libelf
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1) $(am__append_2)
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libdwfl/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libdwfl/ChangeLog 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/libdwfl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -1265,6 +1265,11 @@
+
+ 2005-07-21 Roland McGrath <roland@redhat.com>
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
++2005-07-21 Roland McGrath <roland@redhat.com>
++
+ * Makefile.am (noinst_HEADERS): Add loc2c.c.
+
+ * test2.c (main): Check sscanf result to quiet warning.
+Index: elfutils-0.148/libdwfl/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libdwfl/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/libdwfl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -181,6 +181,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -210,6 +211,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = 1
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -273,7 +275,7 @@
+ -I$(srcdir)/../libdw
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1)
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libebl/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libebl/ChangeLog 2010-03-05 05:48:23.000000000 +0000
++++ elfutils-0.148/libebl/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -624,6 +624,11 @@
+ * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
+ tracking works right.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * libebl_x86_64.map: Add x86_64_core_note.
+Index: elfutils-0.148/libebl/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libebl/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/libebl/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -143,6 +143,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -172,6 +173,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = 1
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -235,7 +237,7 @@
+ -I$(srcdir)/../libasm
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1) -fpic
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/libelf/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libelf/ChangeLog 2010-06-14 21:17:20.000000000 +0000
++++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:04:07.000000000 +0000
+@@ -657,6 +657,11 @@
+
+ * elf.h: Update from glibc.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-05-08 Roland McGrath <roland@redhat.com>
+
+ * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
+Index: elfutils-0.148/libelf/common.h
+===================================================================
+--- elfutils-0.148.orig/libelf/common.h 2009-01-08 20:56:36.000000000 +0000
++++ elfutils-0.148/libelf/common.h 2010-07-03 13:04:07.000000000 +0000
+@@ -160,7 +160,7 @@
+ (Var) = (sizeof (Var) == 1 \
+ ? (unsigned char) (Var) \
+ : (sizeof (Var) == 2 \
+- ? bswap_16 (Var) \
++ ? (unsigned short int) bswap_16 (Var) \
+ : (sizeof (Var) == 4 \
+ ? bswap_32 (Var) \
+ : bswap_64 (Var))))
+@@ -169,7 +169,7 @@
+ (Dst) = (sizeof (Var) == 1 \
+ ? (unsigned char) (Var) \
+ : (sizeof (Var) == 2 \
+- ? bswap_16 (Var) \
++ ? (unsigned short int) bswap_16 (Var) \
+ : (sizeof (Var) == 4 \
+ ? bswap_32 (Var) \
+ : bswap_64 (Var))))
+Index: elfutils-0.148/libelf/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/libelf/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/libelf/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -189,6 +189,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -218,6 +219,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = 1
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -279,7 +281,7 @@
+ INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1) $(am__append_2)
+ @MUDFLAP_FALSE@libmudflap =
+Index: elfutils-0.148/m4/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/m4/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/m4/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -75,6 +75,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -104,6 +105,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+Index: elfutils-0.148/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/Makefile.in 2010-06-28 19:07:33.000000000 +0000
++++ elfutils-0.148/Makefile.in 2010-07-03 13:04:07.000000000 +0000
+@@ -155,6 +155,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -184,6 +185,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+Index: elfutils-0.148/src/addr2line.c
+===================================================================
+--- elfutils-0.148.orig/src/addr2line.c 2010-05-28 14:38:30.000000000 +0000
++++ elfutils-0.148/src/addr2line.c 2010-07-03 13:05:40.000000000 +0000
+@@ -447,10 +447,10 @@
+ bool parsed = false;
+ int i, j;
+ char *name = NULL;
+- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ && string[i] == '\0')
+ parsed = adjust_to_section (name, &addr, dwfl);
+- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ {
+ default:
+ break;
+Index: elfutils-0.148/src/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/src/ChangeLog 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/src/ChangeLog 2010-07-03 13:04:08.000000000 +0000
+@@ -165,8 +165,16 @@
+ * readelf.c (attr_callback): Use print_block only when we don't use
+ print_ops.
+
++2009-08-17 Roland McGrath <roland@redhat.com>
++
++ * ld.h: Disable extern inlines for GCC 4.2.
++
+ 2009-08-14 Roland McGrath <roland@redhat.com>
+
++ * strings.c (read_block): Conditionalize posix_fadvise use
++ on [POSIX_FADV_SEQUENTIAL].
++ From Petr Salinger <Petr.Salinger@seznam.cz>.
++
+ * ar.c (do_oper_extract): Use pathconf instead of statfs.
+
+ 2009-08-01 Ulrich Drepper <drepper@redhat.com>
+@@ -330,6 +338,8 @@
+ * readelf.c (print_debug_frame_section): Use t instead of j formats
+ for ptrdiff_t OFFSET.
+
++ * addr2line.c (handle_address): Use %a instead of %m for compatibility.
++
+ 2009-01-21 Ulrich Drepper <drepper@redhat.com>
+
+ * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
+@@ -513,6 +523,11 @@
+ that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
+ is valid in RELRO.
+
++2008-03-01 Roland McGrath <roland@redhat.com>
++
++ * readelf.c (dump_archive_index): Tweak portability hack
++ to match [__GNUC__ < 4] too.
++
+ 2008-02-29 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (print_attributes): Add a cast.
+@@ -764,6 +779,8 @@
+
+ * readelf.c (hex_dump): Fix rounding error in whitespace calculation.
+
++ * Makefile.am (readelf_no_Werror): New variable.
++
+ 2007-10-15 Roland McGrath <roland@redhat.com>
+
+ * make-debug-archive.in: New file.
+@@ -1203,6 +1220,10 @@
+ * elflint.c (valid_e_machine): Add EM_ALPHA.
+ Reported by Christian Aichinger <Greek0@gmx.net>.
+
++ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
++ MADV_SEQUENTIAL if undefined. Don't call posix_madvise
++ if neither is defined.
++
+ 2006-08-08 Ulrich Drepper <drepper@redhat.com>
+
+ * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
+@@ -1279,6 +1300,10 @@
+ * Makefile.am: Add hacks to create dependency files for non-generic
+ linker.
+
++2006-04-05 Roland McGrath <roland@redhat.com>
++
++ * strings.c (MAP_POPULATE): Define to 0 if undefined.
++
+ 2006-06-12 Ulrich Drepper <drepper@redhat.com>
+
+ * ldgeneric.c (ld_generic_generate_sections): Don't create .interp
+@@ -1627,6 +1652,11 @@
+ * readelf.c (print_debug_loc_section): Fix indentation for larger
+ address size.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-05-30 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (print_debug_line_section): Print section offset of each
+Index: elfutils-0.148/src/findtextrel.c
+===================================================================
+--- elfutils-0.148.orig/src/findtextrel.c 2009-02-11 01:12:59.000000000 +0000
++++ elfutils-0.148/src/findtextrel.c 2010-07-03 13:04:08.000000000 +0000
+@@ -490,7 +490,11 @@
+
+
+ static void
+-check_rel (size_t nsegments, struct segments segments[nsegments],
++check_rel (size_t nsegments, struct segments segments[
++#if __GNUC__ >= 4
++ nsegments
++#endif
++ ],
+ GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
+ const char *fname, bool more_than_one, void **knownsrcs)
+ {
+Index: elfutils-0.148/src/ld.h
+===================================================================
+--- elfutils-0.148.orig/src/ld.h 2009-06-13 22:39:51.000000000 +0000
++++ elfutils-0.148/src/ld.h 2010-07-03 13:04:08.000000000 +0000
+@@ -1122,6 +1122,7 @@
+
+ /* Checked whether the symbol is undefined and referenced from a DSO. */
+ extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
+ #ifdef __GNUC_STDC_INLINE__
+ __attribute__ ((__gnu_inline__))
+ #endif
+@@ -1139,5 +1140,6 @@
+
+ return sym->defined && sym->in_dso;
+ }
++#endif /* Optimizing and not GCC 4.2. */
+
+ #endif /* ld.h */
+Index: elfutils-0.148/src/Makefile.am
+===================================================================
+--- elfutils-0.148.orig/src/Makefile.am 2010-03-05 05:48:23.000000000 +0000
++++ elfutils-0.148/src/Makefile.am 2010-07-03 13:04:08.000000000 +0000
+@@ -99,6 +99,9 @@
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
+
++# Buggy old compilers.
++readelf_no_Werror = yes
++
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ size_LDADD = $(libelf) $(libeu) $(libmudflap)
+Index: elfutils-0.148/src/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/src/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/src/Makefile.in 2010-07-03 13:04:08.000000000 +0000
+@@ -228,6 +228,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -257,6 +258,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -321,7 +323,7 @@
+ -I$(srcdir)/../libasm
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1)
+ @MUDFLAP_FALSE@libmudflap =
+@@ -368,6 +370,9 @@
+ addr2line_no_Wformat = yes
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
++
++# Buggy old compilers.
++readelf_no_Werror = yes
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
+ size_LDADD = $(libelf) $(libeu) $(libmudflap)
+Index: elfutils-0.148/src/readelf.c
+===================================================================
+--- elfutils-0.148.orig/src/readelf.c 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/src/readelf.c 2010-07-03 13:04:08.000000000 +0000
+@@ -7845,7 +7845,7 @@
+ if (unlikely (elf_rand (elf, as_off) == 0)
+ || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
+ == NULL))
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
++#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
+ while (1)
+ #endif
+ error (EXIT_FAILURE, 0,
+Index: elfutils-0.148/src/strings.c
+===================================================================
+--- elfutils-0.148.orig/src/strings.c 2009-02-11 01:12:59.000000000 +0000
++++ elfutils-0.148/src/strings.c 2010-07-03 13:04:08.000000000 +0000
+@@ -51,6 +51,10 @@
+
+ #include <system.h>
+
++#ifndef MAP_POPULATE
++# define MAP_POPULATE 0
++#endif
++
+
+ /* Prototypes of local functions. */
+ static int read_fd (int fd, const char *fname, off64_t fdlen);
+@@ -491,8 +495,13 @@
+ fd, start_off);
+ if (mem != MAP_FAILED)
+ {
++#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
++# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
++#endif
++#ifdef POSIX_MADV_SEQUENTIAL
+ /* We will go through the mapping sequentially. */
+ (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
++#endif
+ break;
+ }
+ if (errno != EINVAL && errno != ENOMEM)
+@@ -586,9 +595,11 @@
+ elfmap_off = from & ~(ps - 1);
+ elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
+
++#ifdef POSIX_FADV_SEQUENTIAL
+ if (unlikely (elfmap == MAP_FAILED))
+ /* Let the kernel know we are going to read everything in sequence. */
+ (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
++#endif
+ }
+
+ if (unlikely (elfmap == MAP_FAILED))
+Index: elfutils-0.148/src/strip.c
+===================================================================
+--- elfutils-0.148.orig/src/strip.c 2010-01-15 09:05:55.000000000 +0000
++++ elfutils-0.148/src/strip.c 2010-07-03 13:04:08.000000000 +0000
+@@ -53,6 +53,12 @@
+ #include <libebl.h>
+ #include <system.h>
+
++#ifdef HAVE_FUTIMES
++# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
++#else
++# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
++#endif
++
+
+ /* Name and version of program. */
+ static void print_version (FILE *stream, struct argp_state *state);
+@@ -301,8 +307,18 @@
+
+ /* If we have to preserve the timestamp, we need it in the
+ format utimes() understands. */
++#ifdef HAVE_STRUCT_STAT_ST_ATIM
+ TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
++#else
++ tv[0].tv_sec = pre_st.st_atime;
++ tv[0].tv_usec = 0;
++#endif
++#ifdef HAVE_STRUCT_STAT_ST_MTIM
+ TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
++#else
++ tv[1].tv_sec = pre_st.st_atime;
++ tv[1].tv_usec = 0;
++#endif
+ }
+
+ /* Open the file. */
+@@ -1747,7 +1763,7 @@
+ /* If requested, preserve the timestamp. */
+ if (tvp != NULL)
+ {
+- if (futimes (fd, tvp) != 0)
++ if (FUTIMES (fd, output_fname, tvp) != 0)
+ {
+ error (0, errno, gettext ("\
+ cannot set access and modification date of '%s'"),
+@@ -1804,7 +1820,7 @@
+
+ if (tvp != NULL)
+ {
+- if (unlikely (futimes (fd, tvp) != 0))
++ if (unlikely (FUTIMES (fd, fname, tvp) != 0))
+ {
+ error (0, errno, gettext ("\
+ cannot set access and modification date of '%s'"), fname);
+Index: elfutils-0.148/tests/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/tests/ChangeLog 2010-06-28 19:05:56.000000000 +0000
++++ elfutils-0.148/tests/ChangeLog 2010-07-03 13:04:08.000000000 +0000
+@@ -154,6 +154,8 @@
+
+ 2008-01-21 Roland McGrath <roland@redhat.com>
+
++ * line2addr.c (main): Revert last change.
++
+ * testfile45.S.bz2: Add tests for cltq, cqto.
+ * testfile45.expect.bz2: Adjust.
+
+@@ -862,6 +864,11 @@
+ * Makefile.am (TESTS): Add run-elflint-test.sh.
+ (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
+
++2005-05-31 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ 2005-05-24 Ulrich Drepper <drepper@redhat.com>
+
+ * get-files.c (main): Use correct format specifier.
+Index: elfutils-0.148/tests/line2addr.c
+===================================================================
+--- elfutils-0.148.orig/tests/line2addr.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/tests/line2addr.c 2010-07-03 13:04:08.000000000 +0000
+@@ -132,7 +132,7 @@
+ {
+ struct args a = { .arg = argv[cnt] };
+
+- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
++ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
+ {
+ default:
+ case 0:
+Index: elfutils-0.148/tests/Makefile.in
+===================================================================
+--- elfutils-0.148.orig/tests/Makefile.in 2010-06-28 19:07:34.000000000 +0000
++++ elfutils-0.148/tests/Makefile.in 2010-07-03 13:04:08.000000000 +0000
+@@ -372,6 +372,7 @@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
++LD_AS_NEEDED = @LD_AS_NEEDED@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+@@ -401,6 +402,7 @@
+ STRIP = @STRIP@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
++WEXTRA = @WEXTRA@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+@@ -462,7 +464,7 @@
+ INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2)
+ AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \
+ $($(*F)_no_Werror),,-Werror) $(if \
+- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
+ $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \
+ $(am__append_1)
+ @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 0000000..a186308
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
@@ -0,0 +1,1707 @@
+Index: elfutils-0.148/libelf/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/libelf/ChangeLog 2010-07-03 13:07:10.000000000 +0000
++++ elfutils-0.148/libelf/ChangeLog 2010-07-03 13:07:11.000000000 +0000
+@@ -649,10 +649,53 @@
+ If section content hasn't been read yet, do it before looking for the
+ block size. If no section data present, infer size of section header.
+
++2005-05-14 Jakub Jelinek <jakub@redhat.com>
++
++ * libelfP.h (INVALID_NDX): Define.
++ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
++ * gelf_getlib.c (gelf_getlib): Likewise.
++ * gelf_getmove.c (gelf_getmove): Likewise.
++ * gelf_getrel.c (gelf_getrel): Likewise.
++ * gelf_getrela.c (gelf_getrela): Likewise.
++ * gelf_getsym.c (gelf_getsym): Likewise.
++ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
++ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
++ * gelf_getversym.c (gelf_getversym): Likewise.
++ * gelf_update_dyn.c (gelf_update_dyn): Likewise.
++ * gelf_update_lib.c (gelf_update_lib): Likewise.
++ * gelf_update_move.c (gelf_update_move): Likewise.
++ * gelf_update_rel.c (gelf_update_rel): Likewise.
++ * gelf_update_rela.c (gelf_update_rela): Likewise.
++ * gelf_update_sym.c (gelf_update_sym): Likewise.
++ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
++ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
++ * gelf_update_versym.c (gelf_update_versym): Likewise.
++ * elf_newscn.c (elf_newscn): Check for overflow.
++ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
++ (__elfw2(LIBELFBITS,updatefile)): Likewise.
++ * elf_begin.c (file_read_elf): Likewise.
++ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
++ * elf_getarsym.c (elf_getarsym): Likewise.
++ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise.
+ 2005-05-11 Ulrich Drepper <drepper@redhat.com>
+
+ * elf.h: Update again.
+
++2005-05-17 Jakub Jelinek <jakub@redhat.com>
++
++ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
++ table fits into object's bounds.
++ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to
++ elf->map_address. Check if first section header fits into object's
++ bounds.
++ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
++ Check if section header table fits into object's bounds.
++ * elf_begin.c (get_shnum): Ensure section headers fits into
++ object's bounds.
++ (file_read_elf): Make sure scncnt is small enough to allocate both
++ ElfXX_Shdr and Elf_Scn array. Make sure section and program header
++ tables fit into object's bounds. Avoid memory leak on failure.
++
+ 2005-05-09 Ulrich Drepper <drepper@redhat.com>
+
+ * elf.h: Update from glibc.
+Index: elfutils-0.148/libelf/elf32_getphdr.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf32_getphdr.c 2010-04-21 14:26:40.000000000 +0000
++++ elfutils-0.148/libelf/elf32_getphdr.c 2010-07-03 13:07:11.000000000 +0000
+@@ -114,6 +114,16 @@
+
+ if (elf->map_address != NULL)
+ {
++ /* First see whether the information in the ELF header is
++ valid and it does not ask for too much. */
++ if (unlikely (ehdr->e_phoff >= elf->maximum_size)
++ || unlikely (elf->maximum_size - ehdr->e_phoff < size))
++ {
++ /* Something is wrong. */
++ __libelf_seterrno (ELF_E_INVALID_PHDR);
++ goto out;
++ }
++
+ /* All the data is already mapped. Use it. */
+ void *file_phdr = ((char *) elf->map_address
+ + elf->start_offset + ehdr->e_phoff);
+Index: elfutils-0.148/libelf/elf32_getshdr.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf32_getshdr.c 2009-06-13 22:41:42.000000000 +0000
++++ elfutils-0.148/libelf/elf32_getshdr.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Return section header.
+- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2009 Red Hat, Inc.
++ Copyright (C) 1998-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1998.
+
+@@ -81,7 +81,8 @@
+ goto out;
+
+ size_t shnum;
+- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0)
++ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0
++ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
+ goto out;
+ size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
+
+@@ -98,6 +99,16 @@
+
+ if (elf->map_address != NULL)
+ {
++ /* First see whether the information in the ELF header is
++ valid and it does not ask for too much. */
++ if (unlikely (ehdr->e_shoff >= elf->maximum_size)
++ || unlikely (elf->maximum_size - ehdr->e_shoff < size))
++ {
++ /* Something is wrong. */
++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
++ goto free_and_out;
++ }
++
+ ElfW2(LIBELFBITS,Shdr) *notcvt;
+
+ /* All the data is already mapped. If we could use it
+Index: elfutils-0.148/libelf/elf32_newphdr.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf32_newphdr.c 2010-01-12 16:57:54.000000000 +0000
++++ elfutils-0.148/libelf/elf32_newphdr.c 2010-07-03 13:07:11.000000000 +0000
+@@ -135,6 +135,12 @@
+ || count == PN_XNUM
+ || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
+ {
++ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
++ {
++ result = NULL;
++ goto out;
++ }
++
+ /* Allocate a new program header with the appropriate number of
+ elements. */
+ result = (ElfW2(LIBELFBITS,Phdr) *)
+Index: elfutils-0.148/libelf/elf32_updatefile.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf32_updatefile.c 2010-01-12 16:57:54.000000000 +0000
++++ elfutils-0.148/libelf/elf32_updatefile.c 2010-07-03 13:07:11.000000000 +0000
+@@ -223,6 +223,9 @@
+ /* Write all the sections. Well, only those which are modified. */
+ if (shnum > 0)
+ {
++ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
++ return 1;
++
+ Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
+ Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
+ char *const shdr_start = ((char *) elf->map_address + elf->start_offset
+@@ -645,6 +648,10 @@
+ /* Write all the sections. Well, only those which are modified. */
+ if (shnum > 0)
+ {
++ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
++ + sizeof (ElfW2(LIBELFBITS,Shdr)))))
++ return 1;
++
+ off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
+ #if EV_NUM != 2
+ xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
+Index: elfutils-0.148/libelf/elf_begin.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf_begin.c 2010-04-21 14:26:40.000000000 +0000
++++ elfutils-0.148/libelf/elf_begin.c 2010-07-03 13:07:11.000000000 +0000
+@@ -165,7 +165,8 @@
+
+ if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
+ {
+- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
++ if (unlikely (ehdr.e32->e_shoff >= maxsize)
++ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr)))
+ /* Cannot read the first section header. */
+ return 0;
+
+@@ -213,7 +214,8 @@
+
+ if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
+ {
+- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
++ if (unlikely (ehdr.e64->e_shoff >= maxsize)
++ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
+ /* Cannot read the first section header. */
+ return 0;
+
+@@ -285,6 +287,15 @@
+ /* Could not determine the number of sections. */
+ return NULL;
+
++ /* Check for too many sections. */
++ if (e_ident[EI_CLASS] == ELFCLASS32)
++ {
++ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
++ return NULL;
++ }
++ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
++ return NULL;
++
+ /* We can now allocate the memory. Even if there are no section headers,
+ we allocate space for a zeroth section in case we need it later. */
+ const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
+@@ -324,6 +335,16 @@
+ {
+ /* We can use the mmapped memory. */
+ elf->state.elf32.ehdr = ehdr;
++
++ if (unlikely (ehdr->e_shoff >= maxsize)
++ || unlikely (maxsize - ehdr->e_shoff
++ < scncnt * sizeof (Elf32_Shdr)))
++ {
++ free_and_out:
++ free (elf);
++ __libelf_seterrno (ELF_E_INVALID_FILE);
++ return NULL;
++ }
+ elf->state.elf32.shdr
+ = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
+
+@@ -410,6 +431,11 @@
+ {
+ /* We can use the mmapped memory. */
+ elf->state.elf64.ehdr = ehdr;
++
++ if (unlikely (ehdr->e_shoff >= maxsize)
++ || unlikely (ehdr->e_shoff
++ + scncnt * sizeof (Elf32_Shdr) > maxsize))
++ goto free_and_out;
+ elf->state.elf64.shdr
+ = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
+
+Index: elfutils-0.148/libelf/elf_getarsym.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf_getarsym.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/elf_getarsym.c 2010-07-03 13:07:11.000000000 +0000
+@@ -179,6 +179,9 @@
+ size_t index_size = atol (tmpbuf);
+
+ if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
++#if SIZE_MAX <= 4294967295U
++ || n >= SIZE_MAX / sizeof (Elf_Arsym)
++#endif
+ || n * sizeof (uint32_t) > index_size)
+ {
+ /* This index table cannot be right since it does not fit into
+Index: elfutils-0.148/libelf/elf_getshdrstrndx.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf_getshdrstrndx.c 2009-06-13 22:31:35.000000000 +0000
++++ elfutils-0.148/libelf/elf_getshdrstrndx.c 2010-07-03 13:07:11.000000000 +0000
+@@ -125,10 +125,25 @@
+ if (elf->map_address != NULL
+ && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
+ && (ALLOW_UNALIGNED
+- || (((size_t) ((char *) elf->map_address + offset))
++ || (((size_t) ((char *) elf->map_address
++ + elf->start_offset + offset))
+ & (__alignof__ (Elf32_Shdr) - 1)) == 0))
+- /* We can directly access the memory. */
+- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
++ {
++ /* First see whether the information in the ELF header is
++ valid and it does not ask for too much. */
++ if (unlikely (elf->maximum_size - offset
++ < sizeof (Elf32_Shdr)))
++ {
++ /* Something is wrong. */
++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
++ result = -1;
++ goto out;
++ }
++
++ /* We can directly access the memory. */
++ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
++ + offset))->sh_link;
++ }
+ else
+ {
+ /* We avoid reading in all the section headers. Just read
+@@ -163,10 +178,25 @@
+ if (elf->map_address != NULL
+ && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
+ && (ALLOW_UNALIGNED
+- || (((size_t) ((char *) elf->map_address + offset))
++ || (((size_t) ((char *) elf->map_address
++ + elf->start_offset + offset))
+ & (__alignof__ (Elf64_Shdr) - 1)) == 0))
+- /* We can directly access the memory. */
+- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
++ {
++ /* First see whether the information in the ELF header is
++ valid and it does not ask for too much. */
++ if (unlikely (elf->maximum_size - offset
++ < sizeof (Elf64_Shdr)))
++ {
++ /* Something is wrong. */
++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
++ result = -1;
++ goto out;
++ }
++
++ /* We can directly access the memory. */
++ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset
++ + offset))->sh_link;
++ }
+ else
+ {
+ /* We avoid reading in all the section headers. Just read
+Index: elfutils-0.148/libelf/elf_newscn.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf_newscn.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/elf_newscn.c 2010-07-03 13:07:11.000000000 +0000
+@@ -104,10 +104,18 @@
+ else
+ {
+ /* We must allocate a new element. */
+- Elf_ScnList *newp;
++ Elf_ScnList *newp = NULL;
+
+ assert (elf->state.elf.scnincr > 0);
+
++ if (
++#if SIZE_MAX <= 4294967295U
++ likely (elf->state.elf.scnincr
++ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
++#else
++ 1
++#endif
++ )
+ newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
+ + ((elf->state.elf.scnincr *= 2)
+ * sizeof (Elf_Scn)), 1);
+Index: elfutils-0.148/libelf/gelf_getdyn.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getdyn.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getdyn.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get information from dynamic table at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -93,7 +93,7 @@
+ table entries has to be adopted. The user better has provided
+ a buffer where we can store the information. While copying the
+ data we are converting the format. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -114,7 +114,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_getlib.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getlib.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getlib.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get library from table at the given index.
+- Copyright (C) 2004 Red Hat, Inc.
++ Copyright (C) 2004-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+@@ -86,7 +86,7 @@
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+ GElf_Lib *result = NULL;
+- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
++ if (INVALID_NDX (ndx, GElf_Lib, data))
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ else
+ {
+Index: elfutils-0.148/libelf/gelf_getmove.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getmove.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getmove.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get move structure at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -83,7 +83,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
++ if (INVALID_NDX (ndx, GElf_Move, data))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_getrela.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getrela.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getrela.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get RELA relocation information at given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -71,12 +71,6 @@
+ if (data_scn == NULL)
+ return NULL;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return NULL;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_RELA))
+ {
+ __libelf_seterrno (ELF_E_INVALID_HANDLE);
+@@ -93,7 +87,7 @@
+ if (scn->elf->class == ELFCLASS32)
+ {
+ /* We have to convert the data. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ result = NULL;
+@@ -114,7 +108,7 @@
+ {
+ /* Simply copy the data after we made sure we are actually getting
+ correct data. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ result = NULL;
+Index: elfutils-0.148/libelf/gelf_getrel.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getrel.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getrel.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get REL relocation information at given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -71,12 +71,6 @@
+ if (data_scn == NULL)
+ return NULL;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return NULL;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_REL))
+ {
+ __libelf_seterrno (ELF_E_INVALID_HANDLE);
+@@ -93,7 +87,7 @@
+ if (scn->elf->class == ELFCLASS32)
+ {
+ /* We have to convert the data. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ result = NULL;
+@@ -113,7 +107,7 @@
+ {
+ /* Simply copy the data after we made sure we are actually getting
+ correct data. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ result = NULL;
+Index: elfutils-0.148/libelf/gelf_getsym.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getsym.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getsym.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get symbol information from symbol table at the given index.
+- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 1999-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+
+@@ -90,7 +90,7 @@
+ table entries has to be adopted. The user better has provided
+ a buffer where we can store the information. While copying the
+ data we are converting the format. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
++ if (INVALID_NDX (ndx, Elf32_Sym, data))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -119,7 +119,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
++ if (INVALID_NDX (ndx, GElf_Sym, data))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_getsyminfo.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getsyminfo.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getsyminfo.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get additional symbol information from symbol table at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -84,7 +84,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
++ if (INVALID_NDX (ndx, GElf_Syminfo, data))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_getsymshndx.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getsymshndx.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getsymshndx.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,6 +1,6 @@
+ /* Get symbol information and separate section index from symbol table
+ at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -90,7 +90,7 @@
+ section index table. */
+ if (likely (shndxdata_scn != NULL))
+ {
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -110,7 +110,7 @@
+ table entries has to be adopted. The user better has provided
+ a buffer where we can store the information. While copying the
+ data we are converting the format. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
++ if (INVALID_NDX (ndx, Elf32_Sym, symdata))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -139,7 +139,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
++ if (INVALID_NDX (ndx, GElf_Sym, symdata))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_getversym.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_getversym.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_getversym.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Get symbol version information at the given index.
+- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 1999-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 1999.
+
+@@ -92,7 +92,7 @@
+
+ /* The data is already in the correct form. Just make sure the
+ index is OK. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
++ if (INVALID_NDX (ndx, GElf_Versym, data))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ result = NULL;
+Index: elfutils-0.148/libelf/gelf_update_dyn.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_dyn.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_dyn.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update information in dynamic table at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -71,12 +71,6 @@
+ if (data == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_DYN))
+ {
+ /* The type of the data better should match. */
+@@ -102,7 +96,7 @@
+ }
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -116,7 +110,7 @@
+ else
+ {
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_lib.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_lib.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_lib.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update library in table at the given index.
+- Copyright (C) 2004 Red Hat, Inc.
++ Copyright (C) 2004-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2004.
+
+@@ -68,12 +68,6 @@
+ if (data == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
+ if (unlikely (data_scn->d.d_type != ELF_T_LIB))
+ {
+@@ -87,7 +81,7 @@
+
+ /* Check whether we have to resize the data buffer. */
+ int result = 0;
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d))
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ else
+ {
+Index: elfutils-0.148/libelf/gelf_update_move.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_move.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_move.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update move structure at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -75,8 +75,7 @@
+ assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely (ndx < 0)
+- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ return 0;
+Index: elfutils-0.148/libelf/gelf_update_rela.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_rela.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_rela.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update RELA relocation information at given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -68,12 +68,6 @@
+ if (dst == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_RELA))
+ {
+ /* The type of the data better should match. */
+@@ -101,7 +95,7 @@
+ }
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -117,7 +111,7 @@
+ else
+ {
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_rel.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_rel.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_rel.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update REL relocation information at given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -68,12 +68,6 @@
+ if (dst == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_REL))
+ {
+ /* The type of the data better should match. */
+@@ -99,7 +93,7 @@
+ }
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -114,7 +108,7 @@
+ else
+ {
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_sym.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_sym.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_sym.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update symbol information in symbol table at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -72,12 +72,6 @@
+ if (data == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_SYM))
+ {
+ /* The type of the data better should match. */
+@@ -102,7 +96,7 @@
+ }
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -125,7 +119,7 @@
+ else
+ {
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_syminfo.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_syminfo.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_syminfo.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update additional symbol information in symbol table at the given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -72,12 +72,6 @@
+ if (data == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
+ {
+ /* The type of the data better should match. */
+@@ -93,7 +87,7 @@
+ rwlock_wrlock (scn->elf->lock);
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_symshndx.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_symshndx.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_symshndx.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,6 +1,6 @@
+ /* Update symbol information and section index in symbol table at the
+ given index.
+- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2000-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2000.
+
+@@ -77,12 +77,6 @@
+ if (symdata == NULL)
+ return 0;
+
+- if (unlikely (ndx < 0))
+- {
+- __libelf_seterrno (ELF_E_INVALID_INDEX);
+- return 0;
+- }
+-
+ if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
+ {
+ /* The type of the data better should match. */
+@@ -128,7 +122,7 @@
+ }
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+@@ -151,7 +145,7 @@
+ else
+ {
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
++ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ goto out;
+Index: elfutils-0.148/libelf/gelf_update_versym.c
+===================================================================
+--- elfutils-0.148.orig/libelf/gelf_update_versym.c 2009-01-08 20:56:37.000000000 +0000
++++ elfutils-0.148/libelf/gelf_update_versym.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1,5 +1,5 @@
+ /* Update symbol version information.
+- Copyright (C) 2001, 2002 Red Hat, Inc.
++ Copyright (C) 2001-2009 Red Hat, Inc.
+ This file is part of Red Hat elfutils.
+ Written by Ulrich Drepper <drepper@redhat.com>, 2001.
+
+@@ -75,8 +75,7 @@
+ assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
+
+ /* Check whether we have to resize the data buffer. */
+- if (unlikely (ndx < 0)
+- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
++ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d))
+ {
+ __libelf_seterrno (ELF_E_INVALID_INDEX);
+ return 0;
+Index: elfutils-0.148/libelf/libelfP.h
+===================================================================
+--- elfutils-0.148.orig/libelf/libelfP.h 2010-01-12 16:57:54.000000000 +0000
++++ elfutils-0.148/libelf/libelfP.h 2010-07-03 13:07:11.000000000 +0000
+@@ -608,4 +608,8 @@
+ /* Align offset to 4 bytes as needed for note name and descriptor data. */
+ #define NOTE_ALIGN(n) (((n) + 3) & -4U)
+
++/* Convenience macro. */
++#define INVALID_NDX(ndx, type, data) \
++ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
++
+ #endif /* libelfP.h */
+Index: elfutils-0.148/src/ChangeLog
+===================================================================
+--- elfutils-0.148.orig/src/ChangeLog 2010-07-03 13:07:10.000000000 +0000
++++ elfutils-0.148/src/ChangeLog 2010-07-03 13:07:11.000000000 +0000
+@@ -1640,6 +1640,16 @@
+ object symbols or symbols with unknown type.
+ (check_rel): Likewise.
+
++2005-06-09 Roland McGrath <roland@redhat.com>
++
++ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
++ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
++ (handle_scngrp): Check for bogus sh_info.
++
++ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
++ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
++ Don't use assert on input values, instead bail with "illformed" error.
++
+ 2005-06-08 Roland McGrath <roland@redhat.com>
+
+ * readelf.c (print_ops): Add consts.
+@@ -1690,6 +1700,19 @@
+
+ * readelf.c (dwarf_tag_string): Add new tags.
+
++2005-05-17 Jakub Jelinek <jakub@redhat.com>
++
++ * elflint.c (check_hash): Don't check entries beyond end of section.
++ (check_note): Don't crash if gelf_rawchunk fails.
++ (section_name): Return <invalid> if gelf_getshdr returns NULL.
++
++2005-05-14 Jakub Jelinek <jakub@redhat.com>
++
++ * elflint.c (section_name): Return "<invalid>" instead of
++ crashing on invalid section name.
++ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
++ check_symtab_shndx, check_hash, check_versym): Robustify.
++
+ 2005-05-08 Roland McGrath <roland@redhat.com>
+
+ * strip.c (handle_elf): Don't translate hash and versym data formats,
+Index: elfutils-0.148/src/elflint.c
+===================================================================
+--- elfutils-0.148.orig/src/elflint.c 2010-04-13 20:08:02.000000000 +0000
++++ elfutils-0.148/src/elflint.c 2010-07-03 13:07:11.000000000 +0000
+@@ -131,6 +131,10 @@
+ /* Array to count references in section groups. */
+ static int *scnref;
+
++/* Numbers of sections and program headers. */
++static unsigned int shnum;
++static unsigned int phnum;
++
+
+ int
+ main (int argc, char *argv[])
+@@ -319,10 +323,19 @@
+ {
+ GElf_Shdr shdr_mem;
+ GElf_Shdr *shdr;
++ const char *ret;
++
++ if ((unsigned int) idx > shnum)
++ return "<invalid>";
+
+ shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
++ if (shdr == NULL)
++ return "<invalid>";
+
+- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
++ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
++ if (ret == NULL)
++ return "<invalid>";
++ return ret;
+ }
+
+
+@@ -344,11 +357,6 @@
+ (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
+
+
+-/* Numbers of sections and program headers. */
+-static unsigned int shnum;
+-static unsigned int phnum;
+-
+-
+ static void
+ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
+ {
+@@ -632,7 +640,8 @@
+ }
+ }
+
+- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
++ if (shdr->sh_entsize != sh_entsize)
+ ERROR (gettext ("\
+ section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
+ idx, section_name (ebl, idx));
+@@ -670,7 +679,7 @@
+ xndxscnidx, section_name (ebl, xndxscnidx));
+ }
+
+- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
++ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
+ {
+ sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
+ if (sym == NULL)
+@@ -690,7 +699,8 @@
+ else
+ {
+ name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
+- assert (name != NULL);
++ assert (name != NULL
++ || strshdr->sh_type != SHT_STRTAB);
+ }
+
+ if (sym->st_shndx == SHN_XINDEX)
+@@ -1038,9 +1048,11 @@
+ {
+ GElf_Shdr rcshdr_mem;
+ const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
+- assert (rcshdr != NULL);
+
+- if (rcshdr->sh_type == SHT_DYNAMIC)
++ if (rcshdr == NULL)
++ break;
++
++ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
+ {
+ /* Found the dynamic section. Look through it. */
+ Elf_Data *d = elf_getdata (scn, NULL);
+@@ -1050,7 +1062,9 @@
+ {
+ GElf_Dyn dyn_mem;
+ GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
+- assert (dyn != NULL);
++
++ if (dyn == NULL)
++ break;
+
+ if (dyn->d_tag == DT_RELCOUNT)
+ {
+@@ -1064,7 +1078,9 @@
+ /* Does the number specified number of relative
+ relocations exceed the total number of
+ relocations? */
+- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
++ if (shdr->sh_entsize != 0
++ && dyn->d_un.d_val > (shdr->sh_size
++ / shdr->sh_entsize))
+ ERROR (gettext ("\
+ section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
+ idx, section_name (ebl, idx),
+@@ -1224,7 +1240,8 @@
+ }
+ }
+
+- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
++ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
++ if (shdr->sh_entsize != sh_entsize)
+ ERROR (gettext (reltype == ELF_T_RELA ? "\
+ section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
+ section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
+@@ -1447,7 +1464,8 @@
+ Elf_Data *symdata = elf_getdata (symscn, NULL);
+ enum load_state state = state_undecided;
+
+- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
++ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+ {
+ GElf_Rela rela_mem;
+ GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
+@@ -1497,7 +1515,8 @@
+ Elf_Data *symdata = elf_getdata (symscn, NULL);
+ enum load_state state = state_undecided;
+
+- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
++ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+ {
+ GElf_Rel rel_mem;
+ GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
+@@ -1600,7 +1619,8 @@
+ shdr->sh_link, section_name (ebl, shdr->sh_link),
+ idx, section_name (ebl, idx));
+
+- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
++ if (shdr->sh_entsize != sh_entsize)
+ ERROR (gettext ("\
+ section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
+ idx, section_name (ebl, idx));
+@@ -1610,7 +1630,7 @@
+ idx, section_name (ebl, idx));
+
+ bool non_null_warned = false;
+- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
++ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+ {
+ GElf_Dyn dyn_mem;
+ GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
+@@ -1891,6 +1911,8 @@
+ idx, section_name (ebl, idx));
+
+ if (symshdr != NULL
++ && shdr->sh_entsize
++ && symshdr->sh_entsize
+ && (shdr->sh_size / shdr->sh_entsize
+ < symshdr->sh_size / symshdr->sh_entsize))
+ ERROR (gettext ("\
+@@ -1917,6 +1939,12 @@
+ }
+
+ Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
++ if (data == NULL)
++ {
++ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
++ idx, section_name (ebl, idx));
++ return;
++ }
+
+ if (*((Elf32_Word *) data->d_buf) != 0)
+ ERROR (gettext ("symbol 0 should have zero extended section index\n"));
+@@ -1959,7 +1987,7 @@
+
+ size_t maxidx = nchain;
+
+- if (symshdr != NULL)
++ if (symshdr != NULL && symshdr->sh_entsize != 0)
+ {
+ size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
+
+@@ -1970,18 +1998,28 @@
+ maxidx = symsize;
+ }
+
++ Elf32_Word *buf = (Elf32_Word *) data->d_buf;
++ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
+ size_t cnt;
+ for (cnt = 2; cnt < 2 + nbucket; ++cnt)
+- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
++ {
++ if (buf + cnt >= end)
++ break;
++ else if (buf[cnt] >= maxidx)
+ ERROR (gettext ("\
+ section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
+ idx, section_name (ebl, idx), cnt - 2);
++ }
+
+ for (; cnt < 2 + nbucket + nchain; ++cnt)
+- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
++ {
++ if (buf + cnt >= end)
++ break;
++ else if (buf[cnt] >= maxidx)
+ ERROR (gettext ("\
+ section [%2d] '%s': hash chain reference %zu out of bounds\n"),
+ idx, section_name (ebl, idx), cnt - 2 - nbucket);
++ }
+ }
+
+
+@@ -2011,18 +2049,28 @@
+ maxidx = symsize;
+ }
+
++ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
++ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
+ size_t cnt;
+ for (cnt = 2; cnt < 2 + nbucket; ++cnt)
+- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
++ {
++ if (buf + cnt >= end)
++ break;
++ else if (buf[cnt] >= maxidx)
+ ERROR (gettext ("\
+ section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
+ idx, section_name (ebl, idx), cnt - 2);
++ }
+
+ for (; cnt < 2 + nbucket + nchain; ++cnt)
+- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
++ {
++ if (buf + cnt >= end)
++ break;
++ else if (buf[cnt] >= maxidx)
+ ERROR (gettext ("\
+ section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
+- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
++ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
++ }
+ }
+
+
+@@ -2047,7 +2095,7 @@
+ if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
+ {
+ ERROR (gettext ("\
+-section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
++section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
+ idx, section_name (ebl, idx), (long int) shdr->sh_size,
+ (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
+ return;
+@@ -2719,8 +2767,9 @@
+
+ /* The number of elements in the version symbol table must be the
+ same as the number of symbols. */
+- if (shdr->sh_size / shdr->sh_entsize
+- != symshdr->sh_size / symshdr->sh_entsize)
++ if (shdr->sh_entsize && symshdr->sh_entsize
++ && (shdr->sh_size / shdr->sh_entsize
++ != symshdr->sh_size / symshdr->sh_entsize))
+ ERROR (gettext ("\
+ section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
+ idx, section_name (ebl, idx),
+Index: elfutils-0.148/src/readelf.c
+===================================================================
+--- elfutils-0.148.orig/src/readelf.c 2010-07-03 13:07:10.000000000 +0000
++++ elfutils-0.148/src/readelf.c 2010-07-03 13:07:11.000000000 +0000
+@@ -1172,6 +1172,8 @@
+ Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
+
+ GElf_Sym sym_mem;
++ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
++
+ printf ((grpref[0] & GRP_COMDAT)
+ ? ngettext ("\
+ \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
+@@ -1184,8 +1186,8 @@
+ data->d_size / sizeof (Elf32_Word) - 1),
+ elf_ndxscn (scn),
+ elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
+- elf_strptr (ebl->elf, symshdr->sh_link,
+- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
++ (sym == NULL ? NULL
++ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
+ ?: gettext ("<INVALID SYMBOL>"),
+ data->d_size / sizeof (Elf32_Word) - 1);
+
+@@ -1336,7 +1338,8 @@
+ handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
+ {
+ int class = gelf_getclass (ebl->elf);
+- GElf_Shdr glink;
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink;
+ Elf_Data *data;
+ size_t cnt;
+ size_t shstrndx;
+@@ -1351,6 +1354,11 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("cannot get section header string table index"));
+
++ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
++ if (glink == NULL)
++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++
+ printf (ngettext ("\
+ \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
+ "\
+@@ -1360,9 +1368,7 @@
+ class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
+ shdr->sh_offset,
+ (int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+ fputs_unlocked (gettext (" Type Value\n"), stdout);
+
+ for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
+@@ -1945,6 +1951,13 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("cannot get section header string table index"));
+
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
++ &glink_mem);
++ if (glink == NULL)
++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++
+ /* Now we can compute the number of entries in the section. */
+ unsigned int nsyms = data->d_size / (class == ELFCLASS32
+ ? sizeof (Elf32_Sym)
+@@ -1955,15 +1968,12 @@
+ nsyms),
+ (unsigned int) elf_ndxscn (scn),
+ elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
+- GElf_Shdr glink;
+ printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n",
+ " %lu local symbols String table: [%2u] '%s'\n",
+ shdr->sh_info),
+ (unsigned long int) shdr->sh_info,
+ (unsigned int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+
+ fputs_unlocked (class == ELFCLASS32
+ ? gettext ("\
+@@ -2199,7 +2209,13 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("cannot get section header string table index"));
+
+- GElf_Shdr glink;
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
++ &glink_mem);
++ if (glink == NULL)
++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++
+ printf (ngettext ("\
+ \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
+ "\
+@@ -2210,9 +2226,7 @@
+ class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
+ shdr->sh_offset,
+ (unsigned int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+
+ unsigned int offset = 0;
+ for (int cnt = shdr->sh_info; --cnt >= 0; )
+@@ -2265,8 +2279,14 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("cannot get section header string table index"));
+
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
++ &glink_mem);
++ if (glink == NULL)
++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++
+ int class = gelf_getclass (ebl->elf);
+- GElf_Shdr glink;
+ printf (ngettext ("\
+ \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
+ "\
+@@ -2278,9 +2298,7 @@
+ class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
+ shdr->sh_offset,
+ (unsigned int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+
+ unsigned int offset = 0;
+ for (int cnt = shdr->sh_info; --cnt >= 0; )
+@@ -2542,8 +2560,14 @@
+ filename = NULL;
+ }
+
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
++ &glink_mem);
++ if (glink == NULL)
++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++
+ /* Print the header. */
+- GElf_Shdr glink;
+ printf (ngettext ("\
+ \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
+ "\
+@@ -2555,9 +2579,7 @@
+ class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
+ shdr->sh_offset,
+ (unsigned int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+
+ /* Now we can finally look at the actual contents of this section. */
+ for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
+@@ -2609,7 +2631,17 @@
+ for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
+ ++counts[lengths[cnt]];
+
+- GElf_Shdr glink;
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
++ shdr->sh_link),
++ &glink_mem);
++ if (glink == NULL)
++ {
++ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++ return;
++ }
++
+ printf (ngettext ("\
+ \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",
+ "\
+@@ -2622,9 +2654,7 @@
+ shdr->sh_addr,
+ shdr->sh_offset,
+ (unsigned int) shdr->sh_link,
+- elf_strptr (ebl->elf, shstrndx,
+- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+- &glink)->sh_name));
++ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+
+ if (extrastr != NULL)
+ fputs (extrastr, stdout);
+@@ -4312,6 +4342,16 @@
+ return;
+ }
+
++ GElf_Shdr glink_mem;
++ GElf_Shdr *glink;
++ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
++ if (glink == NULL)
++ {
++ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
++ elf_ndxscn (scn));
++ return;
++ }
++
+ printf (ngettext ("\
+ \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
+ "\
+Index: elfutils-0.148/src/strip.c
+===================================================================
+--- elfutils-0.148.orig/src/strip.c 2010-07-03 13:07:10.000000000 +0000
++++ elfutils-0.148/src/strip.c 2010-07-03 13:07:11.000000000 +0000
+@@ -561,6 +561,11 @@
+ goto fail_close;
+ }
+
++ if (shstrndx >= shnum)
++ goto illformed;
++
++#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
++
+ /* Storage for section information. We leave room for two more
+ entries since we unconditionally create a section header string
+ table. Maybe some weird tool created an ELF file without one.
+@@ -582,7 +587,7 @@
+ {
+ /* This should always be true (i.e., there should not be any
+ holes in the numbering). */
+- assert (elf_ndxscn (scn) == cnt);
++ elf_assert (elf_ndxscn (scn) == cnt);
+
+ shdr_info[cnt].scn = scn;
+
+@@ -595,6 +600,7 @@
+ shdr_info[cnt].shdr.sh_name);
+ if (shdr_info[cnt].name == NULL)
+ {
++ illformed:
+ error (0, 0, gettext ("illformed file '%s'"), fname);
+ goto fail_close;
+ }
+@@ -604,6 +610,8 @@
+
+ /* Remember the shdr.sh_link value. */
+ shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
++ if (shdr_info[cnt].old_sh_link >= shnum)
++ goto illformed;
+
+ /* Sections in files other than relocatable object files which
+ are not loaded can be freely moved by us. In relocatable
+@@ -616,7 +624,7 @@
+ appropriate reference. */
+ if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
+ {
+- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
++ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
+ shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
+ }
+ else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
+@@ -633,7 +641,12 @@
+ for (inner = 1;
+ inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
+ ++inner)
++ {
++ if (grpref[inner] < shnum)
+ shdr_info[grpref[inner]].group_idx = cnt;
++ else
++ goto illformed;
++ }
+
+ if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
+ /* If the section group contains only one element and this
+@@ -644,7 +657,7 @@
+ }
+ else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
+ {
+- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
++ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
+ shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
+ }
+
+@@ -652,7 +665,7 @@
+ discarded right away. */
+ if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
+ {
+- assert (shdr_info[cnt].group_idx != 0);
++ elf_assert (shdr_info[cnt].group_idx != 0);
+
+ if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
+ {
+@@ -727,11 +740,15 @@
+ {
+ /* If a relocation section is marked as being removed make
+ sure the section it is relocating is removed, too. */
+- if ((shdr_info[cnt].shdr.sh_type == SHT_REL
++ if (shdr_info[cnt].shdr.sh_type == SHT_REL
+ || shdr_info[cnt].shdr.sh_type == SHT_RELA)
+- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
++ {
++ if (shdr_info[cnt].shdr.sh_info >= shnum)
++ goto illformed;
++ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
+ shdr_info[cnt].idx = 1;
+ }
++ }
+
+ if (shdr_info[cnt].idx == 1)
+ {
+@@ -758,7 +775,7 @@
+ if (shdr_info[cnt].symtab_idx != 0
+ && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
+ {
+- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
++ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
+
+ shdr_info[shdr_info[cnt].symtab_idx].data
+ = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
+@@ -798,6 +815,9 @@
+ else if (scnidx == SHN_XINDEX)
+ scnidx = xndx;
+
++ if (scnidx >= shnum)
++ goto illformed;
++
+ if (shdr_info[scnidx].idx == 0)
+ /* This symbol table has a real symbol in
+ a discarded section. So preserve the
+@@ -828,12 +848,16 @@
+ }
+
+ /* Handle references through sh_info. */
+- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
+- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
++ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
++ {
++ if (shdr_info[cnt].shdr.sh_info >= shnum)
++ goto illformed;
++ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
+ {
+ shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
+ changes |= shdr_info[cnt].shdr.sh_info < cnt;
+ }
++ }
+
+ /* Mark the section as investigated. */
+ shdr_info[cnt].idx = 2;
+@@ -972,7 +996,7 @@
+ error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
+ elf_errmsg (-1));
+
+- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
+
+ /* Add this name to the section header string table. */
+ shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
+@@ -1009,7 +1033,7 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("while create section header section: %s"),
+ elf_errmsg (-1));
+- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
+
+ shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
+ if (shdr_info[cnt].data == NULL)
+@@ -1065,7 +1089,7 @@
+ error (EXIT_FAILURE, 0,
+ gettext ("while create section header section: %s"),
+ elf_errmsg (-1));
+- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
+
+ /* Finalize the string table and fill in the correct indices in the
+ section headers. */
+@@ -1155,20 +1179,20 @@
+ shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
+ NULL);
+
+- assert ((versiondata->d_size / sizeof (Elf32_Word))
++ elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
+ >= shdr_info[cnt].data->d_size / elsize);
+ }
+
+ if (shdr_info[cnt].version_idx != 0)
+ {
+- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
++ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
+ /* This section has associated version
+ information. We have to modify that
+ information, too. */
+ versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
+ NULL);
+
+- assert ((versiondata->d_size / sizeof (GElf_Versym))
++ elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
+ >= shdr_info[cnt].data->d_size / elsize);
+ }
+
+@@ -1223,7 +1247,7 @@
+ sec = shdr_info[sym->st_shndx].idx;
+ else
+ {
+- assert (shndxdata != NULL);
++ elf_assert (shndxdata != NULL);
+
+ sec = shdr_info[xshndx].idx;
+ }
+@@ -1244,7 +1268,7 @@
+ nxshndx = sec;
+ }
+
+- assert (sec < SHN_LORESERVE || shndxdata != NULL);
++ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
+
+ if ((inner != destidx || nshndx != sym->st_shndx
+ || (shndxdata != NULL && nxshndx != xshndx))
+@@ -1268,7 +1292,7 @@
+ || shdr_info[cnt].debug_data == NULL)
+ /* This is a section symbol for a section which has
+ been removed. */
+- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
++ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
+ }
+
+ if (destidx != inner)
+@@ -1455,11 +1479,11 @@
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
+- assert (sym != NULL);
++ elf_assert (sym != NULL);
+
+ const char *name = elf_strptr (elf, strshndx,
+ sym->st_name);
+- assert (name != NULL);
++ elf_assert (name != NULL);
+ size_t hidx = elf_hash (name) % nbucket;
+
+ if (bucket[hidx] == 0)
+@@ -1478,7 +1502,7 @@
+ else
+ {
+ /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
+- assert (shdr_info[cnt].shdr.sh_entsize
++ elf_assert (shdr_info[cnt].shdr.sh_entsize
+ == sizeof (Elf64_Xword));
+
+ Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
+@@ -1509,11 +1533,11 @@
+ {
+ GElf_Sym sym_mem;
+ GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
+- assert (sym != NULL);
++ elf_assert (sym != NULL);
+
+ const char *name = elf_strptr (elf, strshndx,
+ sym->st_name);
+- assert (name != NULL);
++ elf_assert (name != NULL);
+ size_t hidx = elf_hash (name) % nbucket;
+
+ 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 0000000..20f03b8
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
@@ -0,0 +1,19 @@
+On many architectures this test fails because binaries/libs produced by
+binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.
+
+So we run the tests on all archs to see what breaks, but if it breaks we ignore
+the result (exitcode 77 means: this test was skipped).
+
+Index: elfutils-0.128/tests/run-elflint-self.sh
+===================================================================
+--- elfutils-0.128.orig/tests/run-elflint-self.sh 2007-07-08 21:46:16.000000000 +0000
++++ elfutils-0.128/tests/run-elflint-self.sh 2007-07-08 21:46:49.000000000 +0000
+@@ -32,7 +32,7 @@
+ # echo $1
+ if [ -f $1 ]; then
+ testrun ../src/elflint --quiet --gnu-ld $1 ||
+- { echo "*** failure in $1"; status=1; }
++ { echo "*** failure in $1"; status=77; }
+ fi
+ }
+
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 0000000..a0198be
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/x86_64_dis.h
@@ -0,0 +1,1632 @@
+#define MNEMONIC_BITS 10
+#define SUFFIX_BITS 3
+#define FCT1_BITS 7
+#define STR1_BITS 4
+#define OFF1_1_BITS 7
+#define OFF1_1_BIAS 3
+#define OFF1_2_BITS 7
+#define OFF1_2_BIAS 4
+#define OFF1_3_BITS 1
+#define OFF1_3_BIAS 7
+#define FCT2_BITS 6
+#define STR2_BITS 2
+#define OFF2_1_BITS 7
+#define OFF2_1_BIAS 5
+#define OFF2_2_BITS 7
+#define OFF2_2_BIAS 4
+#define OFF2_3_BITS 4
+#define OFF2_3_BIAS 7
+#define FCT3_BITS 4
+#define STR3_BITS 1
+#define OFF3_1_BITS 6
+#define OFF3_1_BIAS 10
+#define OFF3_2_BITS 1
+#define OFF3_2_BIAS 21
+
+#include <i386_data.h>
+
+#define suffix_none 0
+#define suffix_w 1
+#define suffix_w0 2
+#define suffix_W 3
+#define suffix_tttn 4
+#define suffix_D 7
+#define suffix_w1 5
+#define suffix_W1 6
+
+static const opfct_t op1_fct[] =
+{
+ NULL,
+ FCT_MOD$R_M,
+ FCT_Mod$R_m,
+ FCT_abs,
+ FCT_ax,
+ FCT_ax$w,
+ FCT_ccc,
+ FCT_ddd,
+ FCT_disp8,
+ FCT_ds_bx,
+ FCT_ds_si,
+ FCT_dx,
+ FCT_es_di,
+ FCT_freg,
+ FCT_imm$s,
+ FCT_imm$w,
+ FCT_imm16,
+ FCT_imm64$w,
+ FCT_imm8,
+ FCT_imms8,
+ FCT_mmxreg,
+ FCT_mod$16r_m,
+ FCT_mod$64r_m,
+ FCT_mod$8r_m,
+ FCT_mod$r_m,
+ FCT_mod$r_m$w,
+ FCT_reg,
+ FCT_reg$w,
+ FCT_reg64,
+ FCT_rel,
+ FCT_sel,
+ FCT_sreg2,
+ FCT_sreg3,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op1_str[] =
+ "%ax\0"
+ "%cl\0"
+ "%rax\0"
+ "%st\0"
+ "%xmm0\0"
+ "*";
+static const uint8_t op1_str_idx[] = {
+ 0,
+ 4,
+ 8,
+ 13,
+ 17,
+ 23,
+};
+static const opfct_t op2_fct[] =
+{
+ NULL,
+ FCT_MOD$R_M,
+ FCT_Mod$R_m,
+ FCT_abs,
+ FCT_absval,
+ FCT_ax$w,
+ FCT_ccc,
+ FCT_ddd,
+ FCT_ds_si,
+ FCT_dx,
+ FCT_es_di,
+ FCT_freg,
+ FCT_imm8,
+ FCT_mmxreg,
+ FCT_mod$64r_m,
+ FCT_mod$r_m,
+ FCT_mod$r_m$w,
+ FCT_oreg,
+ FCT_oreg$w,
+ FCT_reg,
+ FCT_reg$w,
+ FCT_reg64,
+ FCT_sreg3,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op2_str[] =
+ "%rcx\0"
+ "%st";
+static const uint8_t op2_str_idx[] = {
+ 0,
+ 5,
+};
+static const opfct_t op3_fct[] =
+{
+ NULL,
+ FCT_mmxreg,
+ FCT_mod$r_m,
+ FCT_reg,
+ FCT_string,
+ FCT_xmmreg,
+};
+static const char op3_str[] =
+ "%rdx";
+static const uint8_t op3_str_idx[] = {
+ 0,
+};
+static const struct instr_enc instrtab[] =
+{
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+ { .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, },
+};
+static const uint8_t match_data[] =
+{
+ 0x1, 0xfe, 0x14,
+ 0x2, 0xfe, 0x80, 0x38, 0x10,
+ 0x2, 0xfe, 0x82, 0x38, 0x10,
+ 0x2, 0xfe, 0x10, 0, 0,
+ 0x2, 0xfe, 0x12, 0, 0,
+ 0x1, 0xfe, 0x4,
+ 0x2, 0xfe, 0x80, 0x38, 0,
+ 0x12, 0x83, 0x38, 0,
+ 0x2, 0xfe, 0, 0, 0,
+ 0x2, 0xfe, 0x2, 0, 0,
+ 0x34, 0x66, 0xf, 0xd0, 0, 0,
+ 0x34, 0xf2, 0xf, 0xd0, 0, 0,
+ 0x1, 0xfe, 0x24,
+ 0x2, 0xfe, 0x80, 0x38, 0x20,
+ 0x2, 0xfe, 0x82, 0x38, 0x20,
+ 0x2, 0xfe, 0x20, 0, 0,
+ 0x2, 0xfe, 0x22, 0, 0,
+ 0x34, 0x66, 0xf, 0x54, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x34, 0x66, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x12, 0x63, 0, 0,
+ 0x23, 0xf, 0xbc, 0, 0,
+ 0x23, 0xf, 0xbd, 0, 0,
+ 0x12, 0xf, 0xf8, 0xc8,
+ 0x23, 0xf, 0xa3, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x20,
+ 0x23, 0xf, 0xbb, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x38,
+ 0x23, 0xf, 0xb3, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x30,
+ 0x23, 0xf, 0xab, 0, 0,
+ 0x23, 0xf, 0xba, 0x38, 0x28,
+ 0x11, 0xe8,
+ 0x12, 0xff, 0x38, 0x10,
+ 0x12, 0xff, 0x38, 0x18,
+ 0x11, 0x98,
+ 0x11, 0x99,
+ 0x11, 0xf8,
+ 0x11, 0xfc,
+ 0x11, 0xfa,
+ 0x22, 0xf, 0x5,
+ 0x22, 0xf, 0x6,
+ 0x22, 0xf, 0x7,
+ 0x22, 0xf, 0x34,
+ 0x22, 0xf, 0x35,
+ 0x11, 0xf5,
+ 0x13, 0xf, 0xf0, 0x40, 0, 0,
+ 0x1, 0xfe, 0x3c,
+ 0x2, 0xfe, 0x80, 0x38, 0x38,
+ 0x12, 0x83, 0x38, 0x38,
+ 0x2, 0xfe, 0x38, 0, 0,
+ 0x2, 0xfe, 0x3a, 0, 0,
+ 0x34, 0xf2, 0xf, 0xc2, 0, 0,
+ 0x34, 0xf3, 0xf, 0xc2, 0, 0,
+ 0x34, 0x66, 0xf, 0xc2, 0, 0,
+ 0x23, 0xf, 0xc2, 0, 0,
+ 0x1, 0xfe, 0xa6,
+ 0x13, 0xf, 0xfe, 0xb0, 0, 0,
+ 0x23, 0xf, 0xc7, 0x38, 0x8,
+ 0x22, 0xf, 0xa2,
+ 0x34, 0xf3, 0xf, 0xe6, 0, 0,
+ 0x34, 0xf2, 0xf, 0xe6, 0, 0,
+ 0x34, 0x66, 0xf, 0xe6, 0, 0,
+ 0x2, 0xfe, 0xfe, 0x38, 0x8,
+ 0x2, 0xfe, 0xf6, 0x38, 0x30,
+ 0x22, 0xf, 0x77,
+ 0x11, 0xc8,
+ 0x22, 0xd9, 0xd0,
+ 0x22, 0xd9, 0xe0,
+ 0x22, 0xd9, 0xe1,
+ 0x22, 0xd9, 0xe4,
+ 0x22, 0xd9, 0xe5,
+ 0x22, 0xd9, 0xe8,
+ 0x22, 0xd9, 0xe9,
+ 0x22, 0xd9, 0xea,
+ 0x22, 0xd9, 0xeb,
+ 0x22, 0xd9, 0xec,
+ 0x22, 0xd9, 0xed,
+ 0x22, 0xd9, 0xee,
+ 0x22, 0xd9, 0xf0,
+ 0x22, 0xd9, 0xf1,
+ 0x22, 0xd9, 0xf2,
+ 0x22, 0xd9, 0xf3,
+ 0x22, 0xd9, 0xf4,
+ 0x22, 0xd9, 0xf5,
+ 0x22, 0xd9, 0xf6,
+ 0x22, 0xd9, 0xf7,
+ 0x22, 0xd9, 0xf8,
+ 0x22, 0xd9, 0xf9,
+ 0x22, 0xd9, 0xfa,
+ 0x22, 0xd9, 0xfb,
+ 0x22, 0xd9, 0xfc,
+ 0x22, 0xd9, 0xfd,
+ 0x22, 0xd9, 0xfe,
+ 0x22, 0xd9, 0xff,
+ 0x12, 0xd8, 0xf8, 0xc0,
+ 0x12, 0xdc, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xd8, 0x38, 0,
+ 0x12, 0xd8, 0xf8, 0xc8,
+ 0x12, 0xdc, 0xf8, 0xc8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x8,
+ 0x12, 0xd8, 0xf8, 0xe0,
+ 0x12, 0xdc, 0xf8, 0xe0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x20,
+ 0x12, 0xd8, 0xf8, 0xe8,
+ 0x12, 0xdc, 0xf8, 0xe8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x28,
+ 0x12, 0xdd, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xd9, 0x38, 0x10,
+ 0x12, 0xdd, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xd9, 0x38, 0x18,
+ 0x12, 0xd9, 0x38, 0x20,
+ 0x12, 0xd9, 0x38, 0x28,
+ 0x12, 0xd9, 0x38, 0x30,
+ 0x12, 0xd9, 0x38, 0x38,
+ 0x12, 0xd9, 0xf8, 0xc8,
+ 0x12, 0xde, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xda, 0x38, 0,
+ 0x12, 0xda, 0xf8, 0xc8,
+ 0x12, 0xde, 0xf8, 0xc8,
+ 0x2, 0xfb, 0xda, 0x38, 0x8,
+ 0x12, 0xde, 0xf8, 0xe0,
+ 0x2, 0xfb, 0xda, 0x38, 0x20,
+ 0x12, 0xde, 0xf8, 0xe8,
+ 0x2, 0xfb, 0xda, 0x38, 0x28,
+ 0x22, 0xdf, 0xe0,
+ 0x12, 0xdf, 0x38, 0x20,
+ 0x12, 0xdf, 0xf8, 0xf0,
+ 0x12, 0xdf, 0x38, 0x30,
+ 0x22, 0xd9, 0xe0,
+ 0x33, 0x9b, 0xdb, 0xe2,
+ 0x33, 0x9b, 0xdb, 0xe3,
+ 0x11, 0x9b,
+ 0x22, 0xdb, 0xe2,
+ 0x12, 0xda, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xc8,
+ 0x12, 0xda, 0xf8, 0xd0,
+ 0x12, 0xda, 0xf8, 0xd8,
+ 0x12, 0xdb, 0xf8, 0xc0,
+ 0x12, 0xdb, 0xf8, 0xc8,
+ 0x12, 0xdb, 0xf8, 0xd0,
+ 0x12, 0xdb, 0xf8, 0xd8,
+ 0x12, 0xd8, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x10,
+ 0x12, 0xd8, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x18,
+ 0x22, 0xde, 0xd9,
+ 0x12, 0xdb, 0xf8, 0xf0,
+ 0x12, 0xdf, 0xf8, 0xf0,
+ 0x12, 0xdb, 0xf8, 0xe8,
+ 0x12, 0xdf, 0xf8, 0xe8,
+ 0x22, 0xd9, 0xff,
+ 0x22, 0xd9, 0xf6,
+ 0x12, 0xd8, 0xf8, 0xf0,
+ 0x12, 0xdc, 0xf8, 0xf0,
+ 0x2, 0xfb, 0xd8, 0x38, 0x30,
+ 0x12, 0xda, 0x38, 0x30,
+ 0x12, 0xde, 0xf8, 0xf0,
+ 0x12, 0xde, 0x38, 0x30,
+ 0x12, 0xde, 0xf8, 0xf8,
+ 0x12, 0xd8, 0xf8, 0xf8,
+ 0x12, 0xdc, 0xf8, 0xf8,
+ 0x2, 0xfb, 0xd8, 0x38, 0x38,
+ 0x12, 0xda, 0x38, 0x38,
+ 0x12, 0xde, 0x38, 0x38,
+ 0x12, 0xde, 0xf8, 0xf0,
+ 0x12, 0xdd, 0xf8, 0xc0,
+ 0x12, 0xda, 0xf8, 0xd0,
+ 0x2, 0xfb, 0xda, 0x38, 0x10,
+ 0x12, 0xda, 0xf8, 0xd8,
+ 0x2, 0xfb, 0xda, 0x38, 0x18,
+ 0x12, 0xdf, 0x38, 0,
+ 0x12, 0xdb, 0x38, 0,
+ 0x12, 0xdf, 0x38, 0x28,
+ 0x22, 0xd9, 0xf7,
+ 0x22, 0xdb, 0xe3,
+ 0x2, 0xfb, 0xdb, 0x38, 0x10,
+ 0x2, 0xfb, 0xdb, 0x38, 0x18,
+ 0x12, 0xdf, 0x38, 0x38,
+ 0x2, 0xfb, 0xdb, 0x38, 0x8,
+ 0x12, 0xdd, 0x38, 0x8,
+ 0x12, 0xdb, 0x38, 0x28,
+ 0x12, 0xdb, 0x38, 0x38,
+ 0x12, 0xd9, 0xf8, 0xc0,
+ 0x2, 0xfb, 0xd9, 0x38, 0,
+ 0x12, 0xdd, 0xf8, 0xe0,
+ 0x12, 0xdd, 0x38, 0x20,
+ 0x12, 0xdd, 0xf8, 0xe8,
+ 0x12, 0xdd, 0x38, 0x30,
+ 0x12, 0xdd, 0x38, 0x38,
+ 0x11, 0xf4,
+ 0x2, 0xfe, 0xf6, 0x38, 0x38,
+ 0x2, 0xfe, 0xf6, 0x38, 0x28,
+ 0x23, 0xf, 0xaf, 0, 0,
+ 0x2, 0xfd, 0x69, 0, 0,
+ 0x1, 0xfe, 0xe4,
+ 0x1, 0xfe, 0xec,
+ 0x2, 0xfe, 0xfe, 0x38, 0,
+ 0x1, 0xfe, 0x6c,
+ 0x11, 0xcd,
+ 0x11, 0xcc,
+ 0x22, 0xf, 0x8,
+ 0x33, 0xf, 0x1, 0xf8,
+ 0x23, 0xf, 0x1, 0x38, 0x38,
+ 0x11, 0xcf,
+ 0x1, 0xf0, 0x70,
+ 0x12, 0xf, 0xf0, 0x80,
+ 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
+ 0x11, 0xe3,
+ 0x11, 0xeb,
+ 0x11, 0xe9,
+ 0x12, 0xff, 0x38, 0x20,
+ 0x11, 0xea,
+ 0x12, 0xff, 0x38, 0x28,
+ 0x11, 0x9f,
+ 0x23, 0xf, 0x2, 0, 0,
+ 0x12, 0x8d, 0, 0,
+ 0x11, 0xc9,
+ 0x23, 0xf, 0xb4, 0, 0,
+ 0x23, 0xf, 0xb5, 0, 0,
+ 0x23, 0xf, 0x1, 0x38, 0x10,
+ 0x23, 0xf, 0x1, 0x38, 0x18,
+ 0x23, 0xf, 0, 0x38, 0x10,
+ 0x23, 0xf, 0x1, 0x38, 0x30,
+ 0x11, 0xf0,
+ 0x1, 0xfe, 0xac,
+ 0x11, 0xe2,
+ 0x11, 0xe1,
+ 0x11, 0xe0,
+ 0x23, 0xf, 0x3, 0, 0,
+ 0x23, 0xf, 0xb2, 0, 0,
+ 0x23, 0xf, 0, 0x38, 0x18,
+ 0x2, 0xfe, 0x88, 0, 0,
+ 0x2, 0xfe, 0x8a, 0, 0,
+ 0x2, 0xfe, 0xc6, 0x38, 0,
+ 0x1, 0xf0, 0xb0,
+ 0x1, 0xfe, 0xa0,
+ 0x1, 0xfe, 0xa2,
+ 0x23, 0xf, 0x20, 0xc0, 0xc0,
+ 0x23, 0xf, 0x22, 0xc0, 0xc0,
+ 0x23, 0xf, 0x21, 0xc0, 0xc0,
+ 0x23, 0xf, 0x23, 0xc0, 0xc0,
+ 0x12, 0x8c, 0, 0,
+ 0x12, 0x8e, 0, 0,
+ 0x1, 0xfe, 0xa4,
+ 0x23, 0xf, 0xbe, 0, 0,
+ 0x23, 0xf, 0xbf, 0, 0,
+ 0x23, 0xf, 0xb6, 0, 0,
+ 0x23, 0xf, 0xb7, 0, 0,
+ 0x2, 0xfe, 0xf6, 0x38, 0x20,
+ 0x2, 0xfe, 0xf6, 0x38, 0x18,
+ 0x22, 0xf3, 0x90,
+ 0x11, 0x90,
+ 0x34, 0xf3, 0xf, 0xb8, 0, 0,
+ 0x2, 0xfe, 0xf6, 0x38, 0x10,
+ 0x2, 0xfe, 0x8, 0, 0,
+ 0x2, 0xfe, 0xa, 0, 0,
+ 0x2, 0xfe, 0x80, 0x38, 0x8,
+ 0x2, 0xfe, 0x82, 0x38, 0x8,
+ 0x1, 0xfe, 0xc,
+ 0x1, 0xfe, 0xe6,
+ 0x1, 0xfe, 0xee,
+ 0x1, 0xfe, 0x6e,
+ 0x12, 0x8f, 0xf8, 0xc0,
+ 0x12, 0x8f, 0x38, 0,
+ 0x12, 0xf, 0xc7, 0x81,
+ 0x11, 0x9d,
+ 0x12, 0xff, 0xf8, 0xf0,
+ 0x12, 0xff, 0x38, 0x30,
+ 0x1, 0xf8, 0x50,
+ 0x1, 0xf8, 0x58,
+ 0x1, 0xfd, 0x68,
+ 0x1, 0xe7, 0x6,
+ 0x12, 0xf, 0xc7, 0x80,
+ 0x11, 0x9c,
+ 0x2, 0xfe, 0xd0, 0x38, 0x10,
+ 0x2, 0xfe, 0xd2, 0x38, 0x10,
+ 0x2, 0xfe, 0xc0, 0x38, 0x10,
+ 0x2, 0xfe, 0xd0, 0x38, 0x18,
+ 0x2, 0xfe, 0xd2, 0x38, 0x18,
+ 0x2, 0xfe, 0xc0, 0x38, 0x18,
+ 0x22, 0xf, 0x32,
+ 0x22, 0xf, 0x33,
+ 0x22, 0xf, 0x31,
+ 0x11, 0xc3,
+ 0x11, 0xc2,
+ 0x11, 0xcb,
+ 0x11, 0xca,
+ 0x2, 0xfe, 0xd0, 0x38, 0,
+ 0x2, 0xfe, 0xd2, 0x38, 0,
+ 0x2, 0xfe, 0xc0, 0x38, 0,
+ 0x2, 0xfe, 0xd0, 0x38, 0x8,
+ 0x2, 0xfe, 0xd2, 0x38, 0x8,
+ 0x2, 0xfe, 0xc0, 0x38, 0x8,
+ 0x22, 0xf, 0xaa,
+ 0x11, 0x9e,
+ 0x2, 0xfe, 0xd0, 0x38, 0x38,
+ 0x2, 0xfe, 0xd2, 0x38, 0x38,
+ 0x2, 0xfe, 0xc0, 0x38, 0x38,
+ 0x2, 0xfe, 0x18, 0, 0,
+ 0x2, 0xfe, 0x1a, 0, 0,
+ 0x1, 0xfe, 0x1c,
+ 0x2, 0xfe, 0x80, 0x38, 0x18,
+ 0x2, 0xfe, 0x82, 0x38, 0x18,
+ 0x1, 0xfe, 0xae,
+ 0x13, 0xf, 0xf0, 0x90, 0x38, 0,
+ 0x2, 0xfe, 0xd0, 0x38, 0x20,
+ 0x2, 0xfe, 0xd2, 0x38, 0x20,
+ 0x2, 0xfe, 0xc0, 0x38, 0x20,
+ 0x2, 0xfe, 0xd0, 0x38, 0x28,
+ 0x23, 0xf, 0xa4, 0, 0,
+ 0x23, 0xf, 0xa5, 0, 0,
+ 0x2, 0xfe, 0xd2, 0x38, 0x28,
+ 0x2, 0xfe, 0xc0, 0x38, 0x28,
+ 0x23, 0xf, 0xac, 0, 0,
+ 0x23, 0xf, 0xad, 0, 0,
+ 0x33, 0xf, 0x1, 0xc1,
+ 0x33, 0xf, 0x1, 0xc2,
+ 0x33, 0xf, 0x1, 0xc3,
+ 0x33, 0xf, 0x1, 0xc4,
+ 0x23, 0xf, 0x78, 0, 0,
+ 0x23, 0xf, 0x79, 0, 0,
+ 0x23, 0xf, 0x1, 0x38, 0,
+ 0x33, 0xf, 0x1, 0xc8,
+ 0x33, 0xf, 0x1, 0xc9,
+ 0x23, 0xf, 0x1, 0x38, 0x8,
+ 0x23, 0xf, 0, 0x38, 0,
+ 0x23, 0xf, 0x1, 0x38, 0x20,
+ 0x11, 0xf9,
+ 0x11, 0xfd,
+ 0x11, 0xfb,
+ 0x1, 0xfe, 0xaa,
+ 0x23, 0xf, 0, 0x38, 0x8,
+ 0x2, 0xfe, 0x28, 0, 0,
+ 0x2, 0xfe, 0x2a, 0, 0,
+ 0x1, 0xfe, 0x2c,
+ 0x2, 0xfe, 0x80, 0x38, 0x28,
+ 0x2, 0xfe, 0x82, 0x38, 0x28,
+ 0x2, 0xfe, 0x84, 0, 0,
+ 0x1, 0xfe, 0xa8,
+ 0x2, 0xfe, 0xf6, 0x38, 0,
+ 0x22, 0xf, 0xb,
+ 0x23, 0xf, 0, 0x38, 0x20,
+ 0x23, 0xf, 0, 0x38, 0x28,
+ 0x22, 0xf, 0x9,
+ 0x23, 0xf, 0xd, 0x38, 0,
+ 0x23, 0xf, 0xd, 0x38, 0x8,
+ 0x23, 0xf, 0x18, 0x38, 0,
+ 0x23, 0xf, 0x18, 0x38, 0x8,
+ 0x23, 0xf, 0x18, 0x38, 0x10,
+ 0x23, 0xf, 0x18, 0x38, 0x18,
+ 0x23, 0xf, 0x1f, 0, 0,
+ 0x22, 0xf, 0x30,
+ 0x13, 0xf, 0xfe, 0xc0, 0, 0,
+ 0x2, 0xfe, 0x86, 0, 0,
+ 0x1, 0xf8, 0x90,
+ 0x11, 0xd7,
+ 0x2, 0xfe, 0x30, 0, 0,
+ 0x2, 0xfe, 0x32, 0, 0,
+ 0x1, 0xfe, 0x34,
+ 0x2, 0xfe, 0x80, 0x38, 0x30,
+ 0x2, 0xfe, 0x82, 0x38, 0x30,
+ 0x22, 0xf, 0x77,
+ 0x34, 0x66, 0xf, 0xdb, 0, 0,
+ 0x23, 0xf, 0xdb, 0, 0,
+ 0x34, 0x66, 0xf, 0xdf, 0, 0,
+ 0x23, 0xf, 0xdf, 0, 0,
+ 0x34, 0x66, 0xf, 0xf5, 0, 0,
+ 0x23, 0xf, 0xf5, 0, 0,
+ 0x34, 0x66, 0xf, 0xeb, 0, 0,
+ 0x23, 0xf, 0xeb, 0, 0,
+ 0x34, 0x66, 0xf, 0xef, 0, 0,
+ 0x23, 0xf, 0xef, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x1,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x2,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x3,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x4,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x5,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x6,
+ 0x24, 0xf, 0xc2, 0, 0, 0xff, 0x7,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x1,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x2,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x3,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x4,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x5,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x6,
+ 0x35, 0xf3, 0xf, 0xc2, 0, 0, 0xff, 0x7,
+ 0x23, 0xf, 0xae, 0x38, 0x8,
+ 0x23, 0xf, 0xae, 0x38, 0,
+ 0x23, 0xf, 0xae, 0x38, 0x10,
+ 0x23, 0xf, 0xae, 0x38, 0x18,
+ 0x34, 0xf2, 0xf, 0x10, 0, 0,
+ 0x34, 0xf3, 0xf, 0x10, 0, 0,
+ 0x34, 0x66, 0xf, 0x10, 0, 0,
+ 0x23, 0xf, 0x10, 0, 0,
+ 0x34, 0xf2, 0xf, 0x11, 0, 0,
+ 0x34, 0xf3, 0xf, 0x11, 0, 0,
+ 0x34, 0x66, 0xf, 0x11, 0, 0,
+ 0x23, 0xf, 0x11, 0, 0,
+ 0x34, 0xf2, 0xf, 0x12, 0, 0,
+ 0x34, 0xf3, 0xf, 0x12, 0, 0,
+ 0x34, 0x66, 0xf, 0x12, 0, 0,
+ 0x23, 0xf, 0x12, 0xc0, 0xc0,
+ 0x23, 0xf, 0x12, 0, 0,
+ 0x34, 0x66, 0xf, 0x13, 0xc0, 0xc0,
+ 0x23, 0xf, 0x13, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x13, 0, 0,
+ 0x23, 0xf, 0x13, 0, 0,
+ 0x34, 0x66, 0xf, 0x14, 0, 0,
+ 0x23, 0xf, 0x14, 0, 0,
+ 0x34, 0x66, 0xf, 0x15, 0, 0,
+ 0x23, 0xf, 0x15, 0, 0,
+ 0x34, 0xf3, 0xf, 0x16, 0, 0,
+ 0x34, 0x66, 0xf, 0x16, 0, 0,
+ 0x23, 0xf, 0x16, 0xc0, 0xc0,
+ 0x23, 0xf, 0x16, 0, 0,
+ 0x34, 0x66, 0xf, 0x17, 0xc0, 0xc0,
+ 0x23, 0xf, 0x17, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x17, 0, 0,
+ 0x23, 0xf, 0x17, 0, 0,
+ 0x34, 0x66, 0xf, 0x28, 0, 0,
+ 0x23, 0xf, 0x28, 0, 0,
+ 0x34, 0x66, 0xf, 0x29, 0, 0,
+ 0x23, 0xf, 0x29, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2a, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2a, 0, 0,
+ 0x34, 0x66, 0xf, 0x2a, 0, 0,
+ 0x23, 0xf, 0x2a, 0, 0,
+ 0x34, 0x66, 0xf, 0x2b, 0, 0,
+ 0x23, 0xf, 0x2b, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2c, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2c, 0, 0,
+ 0x34, 0x66, 0xf, 0x2c, 0, 0,
+ 0x23, 0xf, 0x2c, 0, 0,
+ 0x34, 0x66, 0xf, 0x2d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x2d, 0, 0,
+ 0x34, 0xf3, 0xf, 0x2d, 0, 0,
+ 0x23, 0xf, 0x2d, 0, 0,
+ 0x34, 0x66, 0xf, 0x2e, 0, 0,
+ 0x23, 0xf, 0x2e, 0, 0,
+ 0x34, 0x66, 0xf, 0x2f, 0, 0,
+ 0x23, 0xf, 0x2f, 0, 0,
+ 0x22, 0xf, 0x37,
+ 0x34, 0x66, 0xf, 0x50, 0xc0, 0xc0,
+ 0x23, 0xf, 0x50, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0x51, 0, 0,
+ 0x34, 0xf2, 0xf, 0x51, 0, 0,
+ 0x34, 0xf3, 0xf, 0x51, 0, 0,
+ 0x23, 0xf, 0x51, 0, 0,
+ 0x34, 0xf3, 0xf, 0x52, 0, 0,
+ 0x23, 0xf, 0x52, 0, 0,
+ 0x34, 0xf3, 0xf, 0x53, 0, 0,
+ 0x23, 0xf, 0x53, 0, 0,
+ 0x34, 0x66, 0xf, 0x54, 0, 0,
+ 0x23, 0xf, 0x54, 0, 0,
+ 0x34, 0x66, 0xf, 0x55, 0, 0,
+ 0x23, 0xf, 0x55, 0, 0,
+ 0x34, 0x66, 0xf, 0x56, 0, 0,
+ 0x23, 0xf, 0x56, 0, 0,
+ 0x34, 0x66, 0xf, 0x57, 0, 0,
+ 0x23, 0xf, 0x57, 0, 0,
+ 0x34, 0xf2, 0xf, 0x58, 0, 0,
+ 0x34, 0xf3, 0xf, 0x58, 0, 0,
+ 0x34, 0x66, 0xf, 0x58, 0, 0,
+ 0x23, 0xf, 0x58, 0, 0,
+ 0x34, 0xf2, 0xf, 0x59, 0, 0,
+ 0x34, 0xf3, 0xf, 0x59, 0, 0,
+ 0x34, 0x66, 0xf, 0x59, 0, 0,
+ 0x23, 0xf, 0x59, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5a, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5a, 0, 0,
+ 0x34, 0x66, 0xf, 0x5a, 0, 0,
+ 0x23, 0xf, 0x5a, 0, 0,
+ 0x34, 0x66, 0xf, 0x5b, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5b, 0, 0,
+ 0x23, 0xf, 0x5b, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5c, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5c, 0, 0,
+ 0x34, 0x66, 0xf, 0x5c, 0, 0,
+ 0x23, 0xf, 0x5c, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5d, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5d, 0, 0,
+ 0x34, 0x66, 0xf, 0x5d, 0, 0,
+ 0x23, 0xf, 0x5d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5e, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5e, 0, 0,
+ 0x34, 0x66, 0xf, 0x5e, 0, 0,
+ 0x23, 0xf, 0x5e, 0, 0,
+ 0x34, 0xf2, 0xf, 0x5f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x5f, 0, 0,
+ 0x34, 0x66, 0xf, 0x5f, 0, 0,
+ 0x23, 0xf, 0x5f, 0, 0,
+ 0x34, 0x66, 0xf, 0x60, 0, 0,
+ 0x23, 0xf, 0x60, 0, 0,
+ 0x34, 0x66, 0xf, 0x61, 0, 0,
+ 0x23, 0xf, 0x61, 0, 0,
+ 0x34, 0x66, 0xf, 0x62, 0, 0,
+ 0x23, 0xf, 0x62, 0, 0,
+ 0x34, 0x66, 0xf, 0x63, 0, 0,
+ 0x23, 0xf, 0x63, 0, 0,
+ 0x34, 0x66, 0xf, 0x64, 0, 0,
+ 0x23, 0xf, 0x64, 0, 0,
+ 0x34, 0x66, 0xf, 0x65, 0, 0,
+ 0x23, 0xf, 0x65, 0, 0,
+ 0x34, 0x66, 0xf, 0x66, 0, 0,
+ 0x23, 0xf, 0x66, 0, 0,
+ 0x34, 0x66, 0xf, 0x67, 0, 0,
+ 0x23, 0xf, 0x67, 0, 0,
+ 0x34, 0x66, 0xf, 0x68, 0, 0,
+ 0x23, 0xf, 0x68, 0, 0,
+ 0x34, 0x66, 0xf, 0x69, 0, 0,
+ 0x23, 0xf, 0x69, 0, 0,
+ 0x34, 0x66, 0xf, 0x6a, 0, 0,
+ 0x23, 0xf, 0x6a, 0, 0,
+ 0x34, 0x66, 0xf, 0x6b, 0, 0,
+ 0x23, 0xf, 0x6b, 0, 0,
+ 0x34, 0x66, 0xf, 0x6c, 0, 0,
+ 0x34, 0x66, 0xf, 0x6d, 0, 0,
+ 0x34, 0x66, 0xf, 0x6e, 0, 0,
+ 0x23, 0xf, 0x6e, 0, 0,
+ 0x34, 0x66, 0xf, 0x6f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x6f, 0, 0,
+ 0x23, 0xf, 0x6f, 0, 0,
+ 0x34, 0x66, 0xf, 0x70, 0, 0,
+ 0x34, 0xf2, 0xf, 0x70, 0, 0,
+ 0x34, 0xf3, 0xf, 0x70, 0, 0,
+ 0x23, 0xf, 0x70, 0, 0,
+ 0x34, 0x66, 0xf, 0x74, 0, 0,
+ 0x23, 0xf, 0x74, 0, 0,
+ 0x34, 0x66, 0xf, 0x75, 0, 0,
+ 0x23, 0xf, 0x75, 0, 0,
+ 0x34, 0x66, 0xf, 0x76, 0, 0,
+ 0x23, 0xf, 0x76, 0, 0,
+ 0x34, 0x66, 0xf, 0x7c, 0, 0,
+ 0x34, 0xf2, 0xf, 0x7c, 0, 0,
+ 0x34, 0x66, 0xf, 0x7d, 0, 0,
+ 0x34, 0xf2, 0xf, 0x7d, 0, 0,
+ 0x34, 0x66, 0xf, 0x7e, 0, 0,
+ 0x34, 0xf3, 0xf, 0x7e, 0, 0,
+ 0x23, 0xf, 0x7e, 0, 0,
+ 0x34, 0x66, 0xf, 0x7f, 0, 0,
+ 0x34, 0xf3, 0xf, 0x7f, 0, 0,
+ 0x23, 0xf, 0x7f, 0, 0,
+ 0x23, 0xf, 0xc3, 0, 0,
+ 0x34, 0x66, 0xf, 0xc4, 0, 0,
+ 0x23, 0xf, 0xc4, 0, 0,
+ 0x34, 0x66, 0xf, 0xc5, 0xc0, 0xc0,
+ 0x23, 0xf, 0xc5, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xc6, 0, 0,
+ 0x23, 0xf, 0xc6, 0, 0,
+ 0x34, 0x66, 0xf, 0xd1, 0, 0,
+ 0x23, 0xf, 0xd1, 0, 0,
+ 0x34, 0x66, 0xf, 0xd2, 0, 0,
+ 0x23, 0xf, 0xd2, 0, 0,
+ 0x34, 0x66, 0xf, 0xd3, 0, 0,
+ 0x23, 0xf, 0xd3, 0, 0,
+ 0x34, 0x66, 0xf, 0xd4, 0, 0,
+ 0x23, 0xf, 0xd4, 0, 0,
+ 0x34, 0x66, 0xf, 0xd5, 0, 0,
+ 0x23, 0xf, 0xd5, 0, 0,
+ 0x34, 0x66, 0xf, 0xd6, 0, 0,
+ 0x34, 0xf2, 0xf, 0xd6, 0xc0, 0xc0,
+ 0x34, 0xf3, 0xf, 0xd6, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xd7, 0xc0, 0xc0,
+ 0x23, 0xf, 0xd7, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xd8, 0, 0,
+ 0x23, 0xf, 0xd8, 0, 0,
+ 0x34, 0x66, 0xf, 0xd9, 0, 0,
+ 0x23, 0xf, 0xd9, 0, 0,
+ 0x34, 0x66, 0xf, 0xda, 0, 0,
+ 0x23, 0xf, 0xda, 0, 0,
+ 0x34, 0x66, 0xf, 0xdc, 0, 0,
+ 0x23, 0xf, 0xdc, 0, 0,
+ 0x34, 0x66, 0xf, 0xdd, 0, 0,
+ 0x23, 0xf, 0xdd, 0, 0,
+ 0x34, 0x66, 0xf, 0xde, 0, 0,
+ 0x23, 0xf, 0xde, 0, 0,
+ 0x34, 0x66, 0xf, 0xe0, 0, 0,
+ 0x23, 0xf, 0xe0, 0, 0,
+ 0x34, 0x66, 0xf, 0xe1, 0, 0,
+ 0x23, 0xf, 0xe1, 0, 0,
+ 0x34, 0x66, 0xf, 0xe2, 0, 0,
+ 0x23, 0xf, 0xe2, 0, 0,
+ 0x34, 0x66, 0xf, 0xe3, 0, 0,
+ 0x23, 0xf, 0xe3, 0, 0,
+ 0x34, 0x66, 0xf, 0xe4, 0, 0,
+ 0x23, 0xf, 0xe4, 0, 0,
+ 0x34, 0x66, 0xf, 0xe5, 0, 0,
+ 0x23, 0xf, 0xe5, 0, 0,
+ 0x34, 0x66, 0xf, 0xe7, 0, 0,
+ 0x23, 0xf, 0xe7, 0, 0,
+ 0x34, 0x66, 0xf, 0xe8, 0, 0,
+ 0x23, 0xf, 0xe8, 0, 0,
+ 0x34, 0x66, 0xf, 0xe9, 0, 0,
+ 0x23, 0xf, 0xe9, 0, 0,
+ 0x34, 0x66, 0xf, 0xea, 0, 0,
+ 0x23, 0xf, 0xea, 0, 0,
+ 0x34, 0x66, 0xf, 0xec, 0, 0,
+ 0x23, 0xf, 0xec, 0, 0,
+ 0x34, 0x66, 0xf, 0xed, 0, 0,
+ 0x23, 0xf, 0xed, 0, 0,
+ 0x34, 0x66, 0xf, 0xee, 0, 0,
+ 0x23, 0xf, 0xee, 0, 0,
+ 0x34, 0xf2, 0xf, 0xf0, 0, 0,
+ 0x34, 0x66, 0xf, 0xf1, 0, 0,
+ 0x23, 0xf, 0xf1, 0, 0,
+ 0x34, 0x66, 0xf, 0xf2, 0, 0,
+ 0x23, 0xf, 0xf2, 0, 0,
+ 0x34, 0x66, 0xf, 0xf3, 0, 0,
+ 0x23, 0xf, 0xf3, 0, 0,
+ 0x34, 0x66, 0xf, 0xf4, 0, 0,
+ 0x23, 0xf, 0xf4, 0, 0,
+ 0x34, 0x66, 0xf, 0xf6, 0, 0,
+ 0x23, 0xf, 0xf6, 0, 0,
+ 0x34, 0x66, 0xf, 0xf7, 0xc0, 0xc0,
+ 0x23, 0xf, 0xf7, 0xc0, 0xc0,
+ 0x34, 0x66, 0xf, 0xf8, 0, 0,
+ 0x23, 0xf, 0xf8, 0, 0,
+ 0x34, 0x66, 0xf, 0xf9, 0, 0,
+ 0x23, 0xf, 0xf9, 0, 0,
+ 0x34, 0x66, 0xf, 0xfa, 0, 0,
+ 0x23, 0xf, 0xfa, 0, 0,
+ 0x34, 0x66, 0xf, 0xfb, 0, 0,
+ 0x23, 0xf, 0xfb, 0, 0,
+ 0x34, 0x66, 0xf, 0xfc, 0, 0,
+ 0x23, 0xf, 0xfc, 0, 0,
+ 0x34, 0x66, 0xf, 0xfd, 0, 0,
+ 0x23, 0xf, 0xfd, 0, 0,
+ 0x34, 0x66, 0xf, 0xfe, 0, 0,
+ 0x23, 0xf, 0xfe, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0, 0, 0,
+ 0x34, 0xf, 0x38, 0, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1, 0, 0,
+ 0x34, 0xf, 0x38, 0x1, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2, 0, 0,
+ 0x34, 0xf, 0x38, 0x2, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3, 0, 0,
+ 0x34, 0xf, 0x38, 0x3, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x4, 0, 0,
+ 0x34, 0xf, 0x38, 0x4, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x5, 0, 0,
+ 0x34, 0xf, 0x38, 0x5, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x6, 0, 0,
+ 0x34, 0xf, 0x38, 0x6, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x7, 0, 0,
+ 0x34, 0xf, 0x38, 0x7, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x8, 0, 0,
+ 0x34, 0xf, 0x38, 0x8, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x9, 0, 0,
+ 0x34, 0xf, 0x38, 0x9, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0xa, 0, 0,
+ 0x34, 0xf, 0x38, 0xa, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0xb, 0, 0,
+ 0x34, 0xf, 0x38, 0xb, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1c, 0, 0,
+ 0x34, 0xf, 0x38, 0x1c, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1d, 0, 0,
+ 0x34, 0xf, 0x38, 0x1d, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x1e, 0, 0,
+ 0x34, 0xf, 0x38, 0x1e, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xf, 0, 0,
+ 0x34, 0xf, 0x3a, 0xf, 0, 0,
+ 0x34, 0x66, 0xf, 0xc7, 0x38, 0x30,
+ 0x34, 0xf3, 0xf, 0xc7, 0x38, 0x30,
+ 0x23, 0xf, 0xc7, 0x38, 0x30,
+ 0x23, 0xf, 0xc7, 0x38, 0x38,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xd0,
+ 0x23, 0xf, 0x71, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xe0,
+ 0x23, 0xf, 0x71, 0xf8, 0xe0,
+ 0x34, 0x66, 0xf, 0x71, 0xf8, 0xf0,
+ 0x23, 0xf, 0x71, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xd0,
+ 0x23, 0xf, 0x72, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xe0,
+ 0x23, 0xf, 0x72, 0xf8, 0xe0,
+ 0x34, 0x66, 0xf, 0x72, 0xf8, 0xf0,
+ 0x23, 0xf, 0x72, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd0,
+ 0x23, 0xf, 0x73, 0xf8, 0xd0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xd8,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf0,
+ 0x23, 0xf, 0x73, 0xf8, 0xf0,
+ 0x34, 0x66, 0xf, 0x73, 0xf8, 0xf8,
+ 0x33, 0xf, 0xae, 0xe8,
+ 0x33, 0xf, 0xae, 0xf0,
+ 0x33, 0xf, 0xae, 0xf8,
+ 0x23, 0xf, 0xae, 0x38, 0x38,
+ 0x23, 0xf, 0xf, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xc, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xd, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x14, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x15, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x40, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x41, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x21, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2a, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x42, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x2b, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x10, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xe, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x29, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x61, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x60, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x63, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x62, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x37, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x41, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x20, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x22, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3c, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3d, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3f, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3e, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x38, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x39, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3b, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x3a, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x20, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x21, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x22, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x23, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x24, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x25, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x30, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x31, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x32, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x33, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x34, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x35, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x28, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x40, 0, 0,
+ 0x45, 0x66, 0xf, 0x38, 0x17, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x8, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0x9, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xa, 0, 0,
+ 0x45, 0x66, 0xf, 0x3a, 0xb, 0, 0,
+ 0x1, 0xe7, 0x7,
+};
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 0000000..2a1ea09
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.89/warnings.patch
@@ -0,0 +1,98 @@
+--- elfutils-0.89/configure.ac~warnings.patch 2003-09-26 02:04:04.000000000 -0400
++++ elfutils-0.89/configure.ac 2004-05-01 00:16:33.000000000 -0400
+@@ -28,6 +28,10 @@
+
+ ALL_LINGUAS=
+
++if test X"$CFLAGS" = X; then
++ CFLAGS="-Wall -Werror -g -O2"
++fi
++
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_GCC_TRADITIONAL
+--- elfutils-0.89/./lib/Makefile.am~warnings.patch 2003-09-22 18:57:58.000000000 -0400
++++ elfutils-0.89/./lib/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,7 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
+-AM_CFLAGS = -Wall -Werror -fpic
++AM_CFLAGS = -fpic
+ INCLUDES = -I$(srcdir)/../libelf -I..
+
+ noinst_LIBRARIES = libeu.a
+--- elfutils-0.89/./libelf/Makefile.am~warnings.patch 2003-08-12 02:45:24.000000000 -0400
++++ elfutils-0.89/./libelf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,6 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
+-AM_CFLAGS = -Wall -Werror
+ INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
+ GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
+ VERSION = 1
+--- elfutils-0.89/./libebl/Makefile.am~warnings.patch 2003-09-22 18:53:17.000000000 -0400
++++ elfutils-0.89/./libebl/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,7 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall
+-AM_CFLAGS = -Wall -Werror -DOBJDIR=\"$(shell pwd)\" -fpic
++AM_CFLAGS = -DOBJDIR=\"$(shell pwd)\" -fpic
+ INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
+ VERSION = 1
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+--- elfutils-0.89/./libdwarf/Makefile.am~warnings.patch 2003-08-12 02:46:05.000000000 -0400
++++ elfutils-0.89/./libdwarf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,6 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DDWARF_DEBUG
+-AM_CFLAGS = -Wall -Werror
+ INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
+ VERSION = 1
+
+--- elfutils-0.89/./libdw/Makefile.am~warnings.patch 2003-08-12 02:46:18.000000000 -0400
++++ elfutils-0.89/./libdw/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -17,7 +17,6 @@
+ ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
+-AM_CFLAGS = -Wall -Werror -Wshadow
+ INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
+ VERSION = 1
+
+--- elfutils-0.89/./libasm/Makefile.am~warnings.patch 2003-08-13 05:21:25.000000000 -0400
++++ elfutils-0.89/./libasm/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,6 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
+-AM_CFLAGS = -Wall -Werror
+ INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
+ -I$(top_srcdir)/lib
+ GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
+--- elfutils-0.89/./src/Makefile.am~warnings.patch 2003-09-22 18:57:09.000000000 -0400
++++ elfutils-0.89/./src/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,8 +14,8 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -Wshadow $(YYDEBUG) \
+- $(if $($(*F)_no_Werror),,-Werror) $(native_ld_cflags)
+-AM_CFLAGS = -Wall -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
++ $(if $(filter -Werror,$(CFLAGS)),$(if $($(*F)_no_Werror),,-Werror)) $(native_ld_cflags)
++AM_CFLAGS = -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
+ INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl -I$(srcdir)/../lib -I$(srcdir)/../libdwarf -I..
+
+ YACC = @YACC@ -d
+--- elfutils-0.89/./tests/Makefile.am~warnings.patch 2003-08-13 05:19:04.000000000 -0400
++++ elfutils-0.89/./tests/Makefile.am 2004-05-01 00:12:43.000000000 -0400
+@@ -14,7 +14,6 @@
+ ## 3001 King Ranch Road, Ukiah, CA 95482.
+ ##
+ DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
+-AM_CFLAGS = -Wall -Werror
+ AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdwarf:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
+ INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdwarf \
+ -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 0000000..67f34a0
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.108.bb
@@ -0,0 +1,25 @@
+SECTION = "base"
+LICENSE = "OSL"
+DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
+DEPENDS = "libtool"
+PR = "r2"
+
+SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
+ file://warnings.patch;patch=1"
+
+inherit autotools
+
+# Package binaries that overlap with binutils separately
+PACKAGES =+ "${PN}-binutils"
+FILES_${PN}-binutils = "\
+ ${bindir}/addr2line \
+ ${bindir}/ld \
+ ${bindir}/nm \
+ ${bindir}/readelf \
+ ${bindir}/size \
+ ${bindir}/strip"
+# Fix library issues
+FILES_${PN} =+ "${libdir}/*-${PV}.so"
+
+# The elfutils package contains symlinks that trip up insane
+INSANE_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 0000000..18887e4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
+HOMEPAGE = "https://fedorahosted.org/elfutils"
+SECTION = "base"
+LICENSE = "GPLv2 with exceptions"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
+ file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
+DEPENDS = "libtool"
+
+PR = "r1"
+
+SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.148-1.debian.tar.gz
+
+SRC_URI += "\
+ file://redhat-portability.diff \
+ file://redhat-robustify.diff \
+ file://hppa_backend.diff \
+ file://arm_backend.diff \
+ file://mips_backend.diff \
+ file://m68k_backend.diff \
+ file://do-autoreconf.diff \
+ file://testsuite-ignore-elflint.diff \
+ file://elf_additions.diff \
+ file://elfutils-fsize.patch \
+"
+
+# The buildsystem wants to generate 2 .h files from source using a binary it just built,
+# which can not pass the cross compiling, so let's work around it by adding 2 .h files
+# along with the do_configure_prepend()
+
+SRC_URI += "\
+ file://i386_dis.h \
+ file://x86_64_dis.h \
+"
+
+inherit autotools
+
+EXTRA_OECONF = "--program-prefix=eu-"
+
+do_configure_prepend() {
+ sed -i 's:./i386_gendis:echo\ \#:g' ${S}/libcpu/Makefile.am
+
+ cp ${WORKDIR}/*dis.h ${S}/libcpu
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Package utilities separately
+PACKAGES =+ "${PN}-binutils"
+FILES_${PN}-binutils = "\
+ ${bindir}/eu-addr2line \
+ ${bindir}/eu-ld \
+ ${bindir}/eu-nm \
+ ${bindir}/eu-readelf \
+ ${bindir}/eu-size \
+ ${bindir}/eu-strip"
+# Fix library issues
+FILES_${PN} =+ "${libdir}/*-${PV}.so"
+
+# The elfutils package contains symlinks that trip up insane
+INSANE_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 0000000..24cb37a
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils_0.89.bb
@@ -0,0 +1,10 @@
+SECTION = "base"
+LICENSE = "OSL"
+DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
+DEPENDS = "libtool"
+
+SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
+ file://warnings.patch;patch=1"
+
+inherit autotools
+
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 0000000..9321564
--- /dev/null
+++ b/meta/recipes-devtools/fakechroot/fakechroot/fix-readlink.patch
@@ -0,0 +1,26 @@
+---
+ src/libfakechroot.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: fakechroot-2.9/src/libfakechroot.c
+===================================================================
+--- fakechroot-2.9.orig/src/libfakechroot.c 2009-03-31 11:20:41.000000000 +0100
++++ fakechroot-2.9/src/libfakechroot.c 2010-03-22 17:40:17.386783375 +0000
+@@ -775,7 +775,7 @@
+ nextsym(opendir, "opendir");
+ #endif
+ nextsym(pathconf, "pathconf");
+- nextsym(readlink, "readlink");
++ nextsym(readlink, "own_readlink");
+ nextsym(realpath, "realpath");
+ nextsym(remove, "remove");
+ #ifdef HAVE_REMOVEXATTR
+@@ -2492,7 +2492,7 @@
+
+
+ /* #include <unistd.h> */
+-READLINK_TYPE_RETURN readlink (const char *path, char *buf, READLINK_TYPE_ARG3)
++READLINK_TYPE_RETURN own_readlink (const char *path, char *buf, READLINK_TYPE_ARG3)
+ {
+ int status;
+ 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 0000000..aea7636
--- /dev/null
+++ b/meta/recipes-devtools/fakechroot/fakechroot_2.9.bb
@@ -0,0 +1,13 @@
+SECTION = "base"
+DESCRIPTION = "Gives a fake root environment which can support chroot"
+LICENSE = "GPL"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/f/fakechroot/fakechroot_${PV}.orig.tar.gz \
+ file://fix-readlink.patch;patch=1 \
+ ${DEBIAN_MIRROR}/main/f/fakechroot/fakechroot_2.9-1.1.diff.gz;patch=1"
+
+inherit autotools
+
+PR = "r3"
+
+BBCLASSEXTEND = "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 0000000..ae18e8a
--- /dev/null
+++ b/meta/recipes-devtools/fakeroot/fakeroot-1.14.4/absolutepaths.patch
@@ -0,0 +1,47 @@
+Image creation runs under a fakeroot context and calls a script which refers
+to the build systems's python. This loads but can find a libpython from staging
+if these are incompatible, anything can break. These scripts should *not* be
+changing LD_LIBRARY_PATH, just adding an LD_PRELOAD with an absolute path. The
+dyanmic linker can figure out anything else with rpaths.
+
+RP - 23/1/10
+
+Index: fakeroot-1.9.4/configure.ac
+===================================================================
+--- fakeroot-1.9.4.orig/configure.ac 2010-01-23 22:34:39.000000000 +0000
++++ fakeroot-1.9.4/configure.ac 2010-01-23 22:35:14.000000000 +0000
+@@ -414,6 +414,8 @@
+ ;;
+ esac
+
++LDPRELOADABS=1
++
+ AC_DEFINE_UNQUOTED([LIBCPATH], "$libcpath", [path to libc shared object])
+ AC_SUBST(DLSUFFIX)
+ AC_SUBST(LDLIBPATHVAR)
+Index: fakeroot-1.9.4/scripts/fakeroot.in
+===================================================================
+--- fakeroot-1.9.4.orig/scripts/fakeroot.in 2010-01-23 22:34:53.000000000 +0000
++++ fakeroot-1.9.4/scripts/fakeroot.in 2010-01-23 22:37:17.000000000 +0000
+@@ -135,7 +135,7 @@
+ if [ "$WAITINTRAP" -eq 0 ]; then
+ trap "kill -s @signal@ $PID" EXIT INT
+ else
+- 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
++ 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
+ fi
+
+ if test -z "$FAKEROOTKEY" || test -z "$PID"; then
+@@ -158,10 +158,10 @@
+ export FAKEROOT_FD_BASE
+
+ if test -z "$*"; then
+- FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
++ FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
+ RESULT=$?
+ else
+- FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
++ FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
+ RESULT=$?
+ fi
+
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 0000000..4edeccf
--- /dev/null
+++ b/meta/recipes-devtools/fakeroot/fakeroot_1.14.4.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "Provides a fake \"root environment\" by means of LD_PRELOAD and SYSV IPC or TCP trickery"
+HOMEPAGE = "http://fakeroot.alioth.debian.org/"
+SECTION = "base"
+LICENSE = "GPLv2"
+# fakeroot needs getopt which is provided by the util-linux package
+RDEPENDS = "util-linux"
+RDEPENDS_virtclass-native = "util-linux-native"
+PR = "r0"
+PROVIDES += "virtual/fakeroot"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.orig.tar.bz2 \
+ file://absolutepaths.patch"
+
+inherit autotools
+
+do_configure_prepend() {
+ # fakeroot's own bootstrap includes other autoreconf stuff we don't need here
+ # so manually create the aux directory
+ mkdir -p ${S}/build-aux
+}
+
+do_install_append() {
+ install -d ${D}${STAGING_INCDIR}/fakeroot/
+ install -m 644 *.h ${D}${STAGING_INCDIR}/fakeroot
+}
+
+# Compatability for the rare systems not using or having SYSV
+python () {
+ if bb.data.inherits_class("native", d) and bb.data.getVar('HOST_NONSYSV', d, True) and bb.data.getVar('HOST_NONSYSV', d, True) != '0':
+ bb.data.setVar('EXTRA_OECONF', ' --with-ipc=tcp ', d)
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/file/file/dump b/meta/recipes-devtools/file/file/dump
new file mode 100644
index 0000000..628ead8
--- /dev/null
+++ b/meta/recipes-devtools/file/file/dump
@@ -0,0 +1,81 @@
+
+#------------------------------------------------------------------------------
+# dump: file(1) magic for dump file format--for new and old dump filesystems
+#
+# We specify both byte orders in order to recognize byte-swapped dumps.
+#
+24 belong 60012 new-fs dump file (big endian),
+>4 bedate x Previous dump %s,
+>8 bedate x This dump %s,
+>12 belong >0 Volume %ld,
+>692 belong 0 Level zero, type:
+>692 belong >0 Level %d, type:
+>0 belong 1 tape header,
+>0 belong 2 beginning of file record,
+>0 belong 3 map of inodes on tape,
+>0 belong 4 continuation of file record,
+>0 belong 5 end of volume,
+>0 belong 6 map of inodes deleted,
+>0 belong 7 end of medium (for floppy),
+>676 string >\0 Label %s,
+>696 string >\0 Filesystem %s,
+>760 string >\0 Device %s,
+>824 string >\0 Host %s,
+>888 belong >0 Flags %x
+
+24 belong 60011 old-fs dump file (big endian),
+#>4 bedate x Previous dump %s,
+#>8 bedate x This dump %s,
+>12 belong >0 Volume %ld,
+>692 belong 0 Level zero, type:
+>692 belong >0 Level %d, type:
+>0 belong 1 tape header,
+>0 belong 2 beginning of file record,
+>0 belong 3 map of inodes on tape,
+>0 belong 4 continuation of file record,
+>0 belong 5 end of volume,
+>0 belong 6 map of inodes deleted,
+>0 belong 7 end of medium (for floppy),
+>676 string >\0 Label %s,
+>696 string >\0 Filesystem %s,
+>760 string >\0 Device %s,
+>824 string >\0 Host %s,
+>888 belong >0 Flags %x
+
+24 lelong 60012 new-fs dump file (little endian),
+>4 ledate x This dump %s,
+>8 ledate x Previous dump %s,
+>12 lelong >0 Volume %ld,
+>692 lelong 0 Level zero, type:
+>692 lelong >0 Level %d, type:
+>0 lelong 1 tape header,
+>0 lelong 2 beginning of file record,
+>0 lelong 3 map of inodes on tape,
+>0 lelong 4 continuation of file record,
+>0 lelong 5 end of volume,
+>0 lelong 6 map of inodes deleted,
+>0 lelong 7 end of medium (for floppy),
+>676 string >\0 Label %s,
+>696 string >\0 Filesystem %s,
+>760 string >\0 Device %s,
+>824 string >\0 Host %s,
+>888 lelong >0 Flags %x
+
+24 lelong 60011 old-fs dump file (little endian),
+#>4 ledate x Previous dump %s,
+#>8 ledate x This dump %s,
+>12 lelong >0 Volume %ld,
+>692 lelong 0 Level zero, type:
+>692 lelong >0 Level %d, type:
+>0 lelong 1 tape header,
+>0 lelong 2 beginning of file record,
+>0 lelong 3 map of inodes on tape,
+>0 lelong 4 continuation of file record,
+>0 lelong 5 end of volume,
+>0 lelong 6 map of inodes deleted,
+>0 lelong 7 end of medium (for floppy),
+>676 string >\0 Label %s,
+>696 string >\0 Filesystem %s,
+>760 string >\0 Device %s,
+>824 string >\0 Host %s,
+>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 0000000..fd50733
--- /dev/null
+++ b/meta/recipes-devtools/file/file/filesystems
@@ -0,0 +1,812 @@
+
+#------------------------------------------------------------------------------
+# filesystems: file(1) magic for different filesystems
+#
+0 string \366\366\366\366 PC formatted floppy with no filesystem
+# Sun disk labels
+# From /usr/include/sun/dklabel.h:
+0774 beshort 0xdabe Sun disk label
+>0 string x '%s
+>>31 string >\0 \b%s
+>>>63 string >\0 \b%s
+>>>>95 string >\0 \b%s
+>0 string x \b'
+>0734 short >0 %d rpm,
+>0736 short >0 %d phys cys,
+>0740 short >0 %d alts/cyl,
+>0746 short >0 %d interleave,
+>0750 short >0 %d data cyls,
+>0752 short >0 %d alt cyls,
+>0754 short >0 %d heads/partition,
+>0756 short >0 %d sectors/track,
+>0764 long >0 start cyl %ld,
+>0770 long x %ld blocks
+# Is there a boot block written 1 sector in?
+>512 belong&077777777 0600407 \b, boot block present
+# Smart Boot Manager backup file is 41 byte header + first sectors of disc
+# (http://btmgr.sourceforge.net/docs/user-guide-3.html)
+0 string SBMBAKUP_ Smart Boot Manager backup file
+>9 string x \b, version %-5.5s
+>>14 string =_
+>>>15 string x %-.1s
+>>>>16 string =_ \b.
+>>>>>17 string x \b%-.1s
+>>>>>>18 string =_ \b.
+>>>>>>>19 string x \b%-.1s
+# DOS Emulator image is 128 byte header + harddisc image
+0 string DOSEMU\0
+>0x27E leshort 0xAA55 DOS Emulator image
+0x1FE leshort 0xAA55 x86 boot sector
+>2 string OSBS \b, OS/BS MBR
+# J\xf6rg Jenderek <joerg dot jenderek at web dot de>
+>0x8C string Invalid\ partition\ table \b, MS-DOS MBR
+# dr-dos with some upper-, lowercase variants
+>0x9D string Invalid\ partition\ table$
+>>181 string No\ Operating\ System$
+>>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
+>0x9D string Invalid\ partition\ table$
+>>181 string No\ operating\ system$
+>>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
+>342 string Invalid\ partition\ table$
+>>366 string No\ operating\ system$
+>>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
+>295 string NEWLDR\0
+>>302 string Bad\ PT\ $
+>>>310 string No\ OS\ $
+>>>>317 string OS\ load\ err$
+>>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
+>>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
+>>>>>>>387 string Copyright\ (c)\ 1984,1998
+>>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
+>0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222
+>>0x1B8 ubelong >0 \b, Serial 0x%-.4x
+>0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950
+>271 string Invalid\ partition\ table\0
+>>295 string Error\ loading\ operating\ system\0
+>>>326 string Missing\ operating\ system\0 \b, mbr
+#
+>139 string Invalid\ partition\ table\0
+>>163 string Error\ loading\ operating\ system\0
+>>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr
+# http://www.heise.de/ct/05/09/006/ page 184
+#HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes
+>>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x
+>300 string Invalid\ partition\ table\0
+>>324 string Error\ loading\ operating\ system\0
+>>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR
+#??>>>389 string Invalid\ system\ disk
+>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
+>300 string Ung\201ltige\ Partitionstabelle
+#split string to avoid error: String too long
+>>328 string Fehler\ beim\ Laden\
+>>>346 string des\ Betriebssystems
+>>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german)
+>>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x
+>0x145 string Default:\ F \b, FREE-DOS MBR
+>64 string no\ active\ partition\ found
+>>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
+>271 string Operating\ system\ loading
+>>296 string error\r \b, SYSLINUX MBR (2.10)
+# bootloader, bootmanager
+>43 string SMART\ BTMGRFAT12\ \ \
+>>430 string SBMK\ Bad!\r
+>>>3 string SBM \b, Smart Boot Manager
+>>>>6 string >\0 \b, version %s
+>382 string XOSLLOADXCF \b, eXtended Operating System Loader
+>6 string LILO \b, LInux i386 boot LOader
+>>120 string LILO \b, version 22.3.4 SuSe
+>>172 string LILO \b, version 22.5.8 Debian
+>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
+>>394 string stage1 \b, GRand Unified Bootloader (0.5.95)
+>343 string Geom\0Read\0\ Error\0
+>>321 string Loading\ stage1.5 \b, Grand Unified Bootloader
+>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
+>>374 string GRUB\ \0 \b, GRand Unified Bootloader
+>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
+>>376 string GRUB\ \0 \b, GRand Unified Bootloader (0.93)
+>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
+>>377 string GRUB\ \0 \b, GRand Unified Bootloader (0.94)
+>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
+>>379 string GRUB\ \0 \b, GRand Unified Bootloader (0.95)
+>480 string Boot\ failed\r
+>>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06)
+>395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
+>185 string FDBOOT\ Version\
+>>204 string \rNo\ Systemdisk.\
+>>>220 string Booting\ from\ harddisk.\n\r
+>>>245 string Cannot\ load\ from\ harddisk.\n\r
+>>>>273 string Insert\ Systemdisk\
+>>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
+>>>>>>200 string >\0 \b, version %-3s
+>242 string Bootsector\ from\ C.H.\ Hochst\204
+>>278 string No\ Systemdisk.\
+>>>293 string Booting\ from\ harddisk.\n\r
+>>>441 string Cannot\ load\ from\ harddisk.\n\r
+>>>>469 string Insert\ Systemdisk\
+>>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader
+>>>>>>209 string >\0 \b, version %-4.4s
+>(1.b+2) ubyte 0xe
+>>(1.b+3) ubyte 0x1f
+>>>(1.b+4) ubyte 0xbe
+>>>>(1.b+5) ubyte 0x77
+>>>>(1.b+6) ubyte 0x7c
+>>>>>(1.b+7) ubyte 0xac
+>>>>>>(1.b+8) ubyte 0x22
+>>>>>>>(1.b+9) ubyte 0xc0
+>>>>>>>>(1.b+10) ubyte 0x74
+>>>>>>>>>(1.b+11) ubyte 0xb
+>>>>>>>>>>(1.b+12) ubyte 0x56
+>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
+#
+>66 string Solaris\ Boot\ Sector
+>>99 string Incomplete\ MDBoot\ load.
+>>>89 string Version \b, Sun Solaris Bootloader
+>>>>97 byte x version %c
+#
+>408 string OS/2\ !!\ SYS01475\r\0
+>>429 string OS/2\ !!\ SYS02025\r\0
+>>>450 string OS/2\ !!\ SYS02027\r\0
+>>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
+#
+>409 string OS/2\ !!\ SYS01475\r\0
+>>430 string OS/2\ !!\ SYS02025\r\0
+>>>451 string OS/2\ !!\ SYS02027\r\0
+>>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
+>112 string This\ disk\ is\ not\ bootable\r
+>>142 string If\ you\ wish\ to\ make\ it\ bootable
+>>>176 string run\ the\ DOS\ program\ SYS\
+>>>200 string after\ the\r
+>>>>216 string system\ has\ been\ loaded\r\n
+>>>>>242 string Please\ insert\ a\ DOS\ diskette\
+>>>>>271 string into\r\n\ the\ drive\ and\
+>>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
+# XP
+>430 string NTLDR\ is\ missing\xFF\r\n
+>>449 string Disk\ error\xFF\r\n
+>>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
+# DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
+>>>>417 ubyte&0xDF >0
+>>>>>417 string x %-.5s
+>>>>>>422 ubyte&0xDF >0
+>>>>>>>422 string x \b%-.3s
+>>>>>425 ubyte&0xDF >0
+>>>>>>425 string >\ \b.%-.3s
+#
+>>>>371 ubyte >0x20
+>>>>>368 ubyte&0xDF >0
+>>>>>>368 string x %-.5s
+>>>>>>>373 ubyte&0xDF >0
+>>>>>>>>373 string x \b%-.3s
+>>>>>>376 ubyte&0xDF >0
+>>>>>>>376 string x \b.%-.3s
+#
+>430 string NTLDR\ nicht\ gefunden\xFF\r\n
+>>453 string Datentr\204gerfehler\xFF\r\n
+>>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
+>>>>417 ubyte&0xDF >0
+>>>>>417 string x %-.5s
+>>>>>>422 ubyte&0xDF >0
+>>>>>>>422 string x \b%-.3s
+>>>>>425 ubyte&0xDF >0
+>>>>>>425 string >\ \b.%-.3s
+#
+>>>>368 ubyte&0xDF >0
+>>>>>368 string x %-.5s
+>>>>>>373 ubyte&0xDF >0
+>>>>>>>373 string x \b%-.3s
+>>>>>376 ubyte&0xDF >0
+>>>>>>376 string x \b.%-.3s
+#
+>430 string NTLDR\ fehlt\xFF\r\n
+>>444 string Datentr\204gerfehler\xFF\r\n
+>>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
+>>>>417 ubyte&0xDF >0
+>>>>>417 string x %-.5s
+>>>>>>422 ubyte&0xDF >0
+>>>>>>>422 string x \b%-.3s
+>>>>>425 ubyte&0xDF >0
+>>>>>>425 string >\ \b.%-.3s
+# variant
+>>>>371 ubyte >0x20
+>>>>>368 ubyte&0xDF >0
+>>>>>>368 string x %-.5s
+>>>>>>>373 ubyte&0xDF >0
+>>>>>>>>373 string x \b%-.3s
+>>>>>>376 ubyte&0xDF >0
+>>>>>>>376 string x \b.%-.3s
+#
+>430 string NTLDR\ fehlt\xFF\r\n
+>>444 string Medienfehler\xFF\r\n
+>>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
+>>>>371 ubyte >0x20
+>>>>>368 ubyte&0xDF >0
+>>>>>>368 string x %-.5s
+>>>>>>>373 ubyte&0xDF >0
+>>>>>>>>373 string x \b%-.3s
+>>>>>>376 ubyte&0xDF >0
+>>>>>>>376 string x \b.%-.3s
+# variant
+>>>>417 ubyte&0xDF >0
+>>>>>417 string x %-.5s
+>>>>>>422 ubyte&0xDF >0
+>>>>>>>422 string x \b%-.3s
+>>>>>425 ubyte&0xDF >0
+>>>>>>425 string >\ \b.%-.3s
+#
+>430 string Datentr\204ger\ entfernen\xFF\r\n
+>>454 string Medienfehler\xFF\r\n
+>>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
+>>>>368 ubyte&0xDF >0
+>>>>>368 string x %-.5s
+>>>>>>373 ubyte&0xDF >0
+>>>>>>>373 string x \b%-.3s
+>>>>>376 ubyte&0xDF >0
+>>>>>>376 string x \b.%-.3s
+#>3 string NTFS\ \ \ \
+>389 string Fehler\ beim\ Lesen\
+>>407 string des\ Datentr\204gers
+>>>426 string NTLDR\ fehlt
+>>>>440 string NTLDR\ ist\ komprimiert
+>>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
+#>3 string NTFS\ \ \ \
+>313 string A\ disk\ read\ error\ occurred.\r
+>>345 string A\ kernel\ file\ is\ missing\
+>>>370 string from\ the\ disk.\r
+>>>>484 string NTLDR\ is\ compressed
+>>>>>429 string Insert\ a\ system\ diskette\
+>>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
+# DOS loader variants different languages,offsets
+>472 ubyte&0xDF >0
+>>389 string Invalid\ system\ disk\xFF\r\n
+>>>411 string Disk\ I/O\ error
+>>>>428 string Replace\ the\ disk,\ and\
+>>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
+#IO.SYS
+>>>>>>472 ubyte&0xDF >0
+>>>>>>>472 string x \b %-.2s
+>>>>>>>>474 ubyte&0xDF >0
+>>>>>>>>>474 string x \b%-.5s
+>>>>>>>>>>479 ubyte&0xDF >0
+>>>>>>>>>>>479 string x \b%-.1s
+>>>>>>>480 ubyte&0xDF >0
+>>>>>>>>480 string x \b.%-.3s
+#MSDOS.SYS
+>>>>>>>483 ubyte&0xDF >0 \b+
+>>>>>>>>483 string x \b%-.5s
+>>>>>>>>>488 ubyte&0xDF >0
+>>>>>>>>>>488 string x \b%-.3s
+>>>>>>>>491 ubyte&0xDF >0
+>>>>>>>>>491 string x \b.%-.3s
+#
+>>390 string Invalid\ system\ disk\xFF\r\n
+>>>412 string Disk\ I/O\ error\xFF\r\n
+>>>>429 string Replace\ the\ disk,\ and\
+>>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
+>>388 string Ungueltiges\ System\ \xFF\r\n
+>>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
+>>>>427 string Datentraeger\ wechseln\ und\
+>>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497 ubyte&0xDF >0
+>>>>>>>497 string x %-.5s
+>>>>>>>>502 ubyte&0xDF >0
+>>>>>>>>>502 string x \b%-.1s
+>>>>>>>>>>503 ubyte&0xDF >0
+>>>>>>>>>>>503 string x \b%-.1s
+>>>>>>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>>>>>>504 string x \b%-.1s
+>>>>>>505 ubyte&0xDF >0
+>>>>>>>505 string x \b.%-.3s
+#IO.SYS
+>>>>>>472 ubyte&0xDF >0 or
+>>>>>>>472 string x \b %-.2s
+>>>>>>>>474 ubyte&0xDF >0
+>>>>>>>>>474 string x \b%-.5s
+>>>>>>>>>>479 ubyte&0xDF >0
+>>>>>>>>>>>479 string x \b%-.1s
+>>>>>>>480 ubyte&0xDF >0
+>>>>>>>>480 string x \b.%-.3s
+#MSDOS.SYS
+>>>>>>>483 ubyte&0xDF >0 \b+
+>>>>>>>>483 string x \b%-.5s
+>>>>>>>>>488 ubyte&0xDF >0
+>>>>>>>>>>488 string x \b%-.3s
+>>>>>>>>491 ubyte&0xDF >0
+>>>>>>>>>491 string x \b.%-.3s
+#
+>>390 string Ungueltiges\ System\ \xFF\r\n
+>>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
+>>>>429 string Datentraeger\ wechseln\ und\
+>>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
+#WINBOOT.SYS only not spaces (0xDF)
+>>>>>>497 ubyte&0xDF >0
+>>>>>>>497 string x %-.7s
+>>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>>504 string x \b%-.1s
+>>>>>>505 ubyte&0xDF >0
+>>>>>>>505 string x \b.%-.3s
+#IO.SYS
+>>>>>>472 ubyte&0xDF >0 or
+>>>>>>>472 string x \b %-.2s
+>>>>>>>>474 ubyte&0xDF >0
+>>>>>>>>>474 string x \b%-.6s
+>>>>>>>480 ubyte&0xDF >0
+>>>>>>>>480 string x \b.%-.3s
+#MSDOS.SYS
+>>>>>>>483 ubyte&0xDF >0 \b+
+>>>>>>>>483 string x \b%-.5s
+>>>>>>>>>488 ubyte&0xDF >0
+>>>>>>>>>>488 string x \b%-.3s
+>>>>>>>>491 ubyte&0xDF >0
+>>>>>>>>>491 string x \b.%-.3s
+#
+>>389 string Ungueltiges\ System\ \xFF\r\n
+>>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
+>>>>428 string Datentraeger\ wechseln\ und\
+>>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
+# DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
+>>>>>>472 string x %-.2s
+>>>>>>>474 ubyte&0xDF >0
+>>>>>>>>474 string x \b%-.5s
+>>>>>>>>479 ubyte&0xDF >0
+>>>>>>>>>479 string x \b%-.1s
+>>>>>>480 ubyte&0xDF >0
+>>>>>>>480 string x \b.%-.3s
+>>>>>>483 ubyte&0xDF >0 \b+
+>>>>>>>483 string x \b%-.5s
+>>>>>>>488 ubyte&0xDF >0
+>>>>>>>>488 string x \b%-.2s
+>>>>>>>>490 ubyte&0xDF >0
+>>>>>>>>>490 string x \b%-.1s
+>>>>>>>491 ubyte&0xDF >0
+>>>>>>>>491 string x \b.%-.3s
+>479 ubyte&0xDF >0
+>>416 string Kein\ System\ oder\
+>>>433 string Laufwerksfehler
+>>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
+#IO.SYS
+>>>>>479 string x \b %-.2s
+>>>>>>481 ubyte&0xDF >0
+>>>>>>>481 string x \b%-.6s
+>>>>>487 ubyte&0xDF >0
+>>>>>>487 string x \b.%-.3s
+#MSDOS.SYS
+>>>>>>490 ubyte&0xDF >0 \b+
+>>>>>>>490 string x \b%-.5s
+>>>>>>>>495 ubyte&0xDF >0
+>>>>>>>>>495 string x \b%-.3s
+>>>>>>>498 ubyte&0xDF >0
+>>>>>>>>498 string x \b.%-.3s
+#
+>486 ubyte&0xDF >0
+>>416 string Non-System\ disk\ or\
+>>>435 string disk\ error\r
+>>>>447 string Replace\ and\ press\ any\ key\
+>>>>>473 string when\ ready\r \b, Microsoft DOS Bootloader
+>480 ubyte&0xDF >0
+>>393 string Non-System\ disk\ or\
+>>>412 string disk\ error\r
+>>>>424 string Replace\ and\ press\ any\ key\
+>>>>>450 string when\ ready\r \b, Microsoft DOS bootloader
+#IO.SYS
+>>>>>480 string x \b %-.2s
+>>>>>>482 ubyte&0xDF >0
+>>>>>>>48 string x \b%-.6s
+>>>>>488 ubyte&0xDF >0
+>>>>>>488 string x \b.%-.3s
+#MSDOS.SYS
+>>>>>>491 ubyte&0xDF >0 \b+
+>>>>>>>491 string x \b%-.5s
+>>>>>>>>496 ubyte&0xDF >0
+>>>>>>>>>496 string x \b%-.3s
+>>>>>>>499 ubyte&0xDF >0
+>>>>>>>>499 string x \b.%-.3s
+#>43 string \224R-LOADER\ \ SYS =label
+>54 string SYS
+>>324 string VASKK
+>>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
+#
+>70 string IBMBIO\ \ COM
+>>472 string Cannot\ load\ DOS!\
+>>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
+>>471 string Cannot\ load\ DOS\
+>>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
+>444 string KERNEL\ \ SYS
+>>314 string BOOT\ error! \b, FREE-DOS Bootloader
+>499 string KERNEL\ \ SYS
+>>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
+>449 string KERNEL\ \ SYS
+>>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
+>125 string Loading\ FreeDOS...\r
+>>311 string BOOT\ error!\r \b, FREE-DOS bootloader
+>>>441 ubyte&0xDF >0
+>>>>441 string x \b %-.6s
+>>>>>447 ubyte&0xDF >0
+>>>>>>447 string x \b%-.1s
+>>>>>>>448 ubyte&0xDF >0
+>>>>>>>>448 string x \b%-.1s
+>>>>449 ubyte&0xDF >0
+>>>>>449 string x \b.%-.3s
+>124 string FreeDOS\0
+>>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
+# DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
+>>>497 ubyte&0xDF >0
+>>>>497 string x \b %-.6s
+>>>>>503 ubyte&0xDF >0
+>>>>>>503 string x \b%-.1s
+>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>504 string x \b%-.1s
+>>>>505 ubyte&0xDF >0
+>>>>>505 string x \b.%-.3s
+>>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
+>>>497 ubyte&0xDF >0
+>>>>497 string x \b %-.6s
+>>>>>503 ubyte&0xDF >0
+>>>>>>503 string x \b%-.1s
+>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>504 string x \b%-.1s
+>>>>505 ubyte&0xDF >0
+>>>>>505 string x \b.%-.3s
+>>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
+>>>497 ubyte&0xDF >0
+>>>>497 string x \b %-.6s
+>>>>>503 ubyte&0xDF >0
+>>>>>>503 string x \b%-.1s
+>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>504 string x \b%-.1s
+>>>>505 ubyte&0xDF >0
+>>>>>505 string x \b.%-.3s
+>336 string Error!\
+>>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
+>>>497 ubyte&0xDF >0
+>>>>497 string x \b %-.6s
+>>>>>503 ubyte&0xDF >0
+>>>>>>503 string x \b%-.1s
+>>>>>>>504 ubyte&0xDF >0
+>>>>>>>>504 string x \b%-.1s
+>>>>505 ubyte&0xDF >0
+>>>>>505 string x \b.%-.3s
+# loader end
+>0 string \0\0\0\0 \b, extended partition table
+# JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
+# older drives may use E9 xx xx
+>0 lelong&0x009000EB 0x009000EB
+>0 lelong&0x000000E9 0x000000E9
+>>1 ubyte >37 \b, code offset 0x%x
+# mtools-3.9.8/msdos.h
+# usual values are marked with comments to get only informations of strange FAT systems
+# valid sectorsize are from 32 to 2048
+>>>11 uleshort <2049
+>>>>11 uleshort >31
+>>>>>3 string >\0 \b, OEM-ID "%8.8s"
+>>>>>11 uleshort >512 \b, Bytes/sector %u
+#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
+>>>>>11 uleshort <512 \b, Bytes/sector %u
+>>>>>13 ubyte >1 \b, sectors/cluster %u
+#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
+>>>>>14 uleshort >32 \b, reserved sectors %u
+#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
+#>>>>>14 uleshort >1 \b, reserved sectors %u
+#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
+>>>>>14 uleshort <1 \b, reserved sectors %u
+>>>>>16 ubyte >2 \b, FATs %u
+#>>>>>16 ubyte =2 \b, FATs %u (usual)
+>>>>>16 ubyte =1 \b, FAT %u
+>>>>>16 ubyte >0
+>>>>>17 uleshort >0 \b, root entries %u
+#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
+>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
+#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
+>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
+#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
+>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
+>>>>>22 uleshort >0 \b, sectors/FAT %u
+#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
+>>>>>26 ubyte >2 \b, heads %u
+#>>>>>26 ubyte =2 \b, heads %u (usual floppy)
+>>>>>26 ubyte =1 \b, heads %u
+>>>>>28 ulelong >0 \b, hidden sectors %u
+#>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
+>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
+#>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
+# FAT<32 specific
+# NOT le FAT3=NOT 3TAF=0xCCABBEB9
+>>>>>82 ulelong&0xCCABBEB9 >0
+>>>>>>36 ubyte >0x80 \b, physical drive 0x%x
+#>>>>>>36 ubyte =0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
+>>>>>>36 ubyte&0x7F >0 \b, physical drive 0x%x
+#>>>>>>36 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
+>>>>>>37 ubyte >0 \b, reserved 0x%x
+#>>>>>>37 ubyte =0 \b, reserved 0x%x
+>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
+>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
+>>>>>>38 ubyte =0x29
+>>>>>>>39 ulelong x \b, serial number 0x%x
+>>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
+>>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
+>>>>>>>43 string =NO\ NAME \b, unlabeled
+>>>>>>54 string FAT \b, FAT
+>>>>>>>54 string FAT12 \b (12 bit)
+>>>>>>>54 string FAT16 \b (16 bit)
+# FAT32 specific
+>>>>>82 string FAT32 \b, FAT (32 bit)
+>>>>>>36 ulelong x \b, sectors/FAT %u
+>>>>>>40 uleshort >0 \b, extension flags %u
+#>>>>>>40 uleshort =0 \b, extension flags %u
+>>>>>>42 uleshort >0 \b, fsVersion %u
+#>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
+>>>>>>44 ulelong >2 \b, rootdir cluster %u
+#>>>>>>44 ulelong =2 \b, rootdir cluster %u
+#>>>>>>44 ulelong =1 \b, rootdir cluster %u
+>>>>>>48 uleshort >1 \b, infoSector %u
+#>>>>>>48 uleshort =1 \b, infoSector %u (usual)
+>>>>>>48 uleshort <1 \b, infoSector %u
+>>>>>>50 uleshort >6 \b, Backup boot sector %u
+#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
+>>>>>>50 uleshort <6 \b, Backup boot sector %u
+>>>>>>54 ulelong >0 \b, reserved1 0x%x
+>>>>>>58 ulelong >0 \b, reserved2 0x%x
+>>>>>>62 ulelong >0 \b, reserved3 0x%x
+# same structure as FAT1X
+>>>>>>64 ubyte >0x80 \b, physical drive 0x%x
+#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
+>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x
+#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
+>>>>>>65 ubyte >0 \b, reserved 0x%x
+>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x)
+>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x)
+>>>>>>66 ubyte =0x29
+>>>>>>>67 ulelong x \b, serial number 0x%x
+>>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
+>>>>>>71 string >NO\ NAME \b, label: "%11.11s"
+>>>>>>71 string =NO\ NAME \b, unlabeled
+### FATs end
+>0x200 lelong 0x82564557 \b, BSD disklabel
+# FATX
+0 string FATX FATX filesystem data
+
+
+# Minix filesystems - Juan Cespedes <cespedes@debian.org>
+0x410 leshort 0x137f Minix filesystem
+0x410 beshort 0x137f Minix filesystem (big endian),
+>0x402 beshort !0 \b, %d zones
+>0x1e string minix \b, bootable
+0x410 leshort 0x138f Minix filesystem, 30 char names
+0x410 leshort 0x2468 Minix filesystem, version 2
+0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
+
+# romfs filesystems - Juan Cespedes <cespedes@debian.org>
+0 string -rom1fs-\0 romfs filesystem, version 1
+>8 belong x %d bytes,
+>16 string x named %s.
+
+# netboot image - Juan Cespedes <cespedes@debian.org>
+0 lelong 0x1b031336L Netboot image,
+>4 lelong&0xFFFFFF00 0
+>>4 lelong&0x100 0x000 mode 2
+>>4 lelong&0x100 0x100 mode 3
+>4 lelong&0xFFFFFF00 !0 unknown mode
+
+0x18b string OS/2 OS/2 Boot Manager
+
+9564 lelong 0x00011954 Unix Fast File system (little-endian),
+>8404 string x last mounted on %s,
+#>9504 ledate x last checked at %s,
+>8224 ledate x last written at %s,
+>8401 byte x clean flag %d,
+>8228 lelong x number of blocks %d,
+>8232 lelong x number of data blocks %d,
+>8236 lelong x number of cylinder groups %d,
+>8240 lelong x block size %d,
+>8244 lelong x fragment size %d,
+>8252 lelong x minimum percentage of free blocks %d,
+>8256 lelong x rotational delay %dms,
+>8260 lelong x disk rotational speed %drps,
+>8320 lelong 0 TIME optimization
+>8320 lelong 1 SPACE optimization
+
+9564 belong 0x00011954 Unix Fast File system (big-endian),
+>7168 long 0x4c41424c Apple UFS Volume
+>>7186 string x named %s,
+>>7176 belong x volume label version %d,
+>>7180 bedate x created on %s,
+>8404 string x last mounted on %s,
+#>9504 bedate x last checked at %s,
+>8224 bedate x last written at %s,
+>8401 byte x clean flag %d,
+>8228 belong x number of blocks %d,
+>8232 belong x number of data blocks %d,
+>8236 belong x number of cylinder groups %d,
+>8240 belong x block size %d,
+>8244 belong x fragment size %d,
+>8252 belong x minimum percentage of free blocks %d,
+>8256 belong x rotational delay %dms,
+>8260 belong x disk rotational speed %drps,
+>8320 belong 0 TIME optimization
+>8320 belong 1 SPACE optimization
+
+# ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
+0x438 leshort 0xEF53 Linux
+>0x44c lelong x rev %d
+>0x43e leshort x \b.%d
+>0x45c lelong ^0x0000004 ext2 filesystem data
+>>0x43a leshort ^0x0000001 (mounted or unclean)
+>0x45c lelong &0x0000004 ext3 filesystem data
+>>0x460 lelong &0x0000004 (needs journal recovery)
+>0x43a leshort &0x0000002 (errors)
+>0x460 lelong &0x0000001 (compressed)
+#>0x460 lelong &0x0000002 (filetype)
+#>0x464 lelong &0x0000001 (sparse_super)
+>0x464 lelong &0x0000002 (large files)
+
+# SGI disk labels - Nathan Scott <nathans@debian.org>
+0 belong 0x0BE5A941 SGI disk label (volume header)
+
+# SGI XFS filesystem - Nathan Scott <nathans@debian.org>
+0 belong 0x58465342 SGI XFS filesystem data
+>0x4 belong x (blksz %d,
+>0x68 beshort x inosz %d,
+>0x64 beshort ^0x2004 v1 dirs)
+>0x64 beshort &0x2004 v2 dirs)
+
+############################################################################
+# Minix-ST kernel floppy
+0x800 belong 0x46fc2700 Atari-ST Minix kernel image
+>19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy
+>19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy
+
+############################################################################
+# Hmmm, is this a better way of detecting _standard_ floppy images ?
+19 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k
+>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
+19 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k
+>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
+19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
+>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
+
+19 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM
+>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
+19 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs
+>0x1FE leshort 0xAA55 \b, x86 hard disk boot sector
+
+19 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k
+19 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k
+
+# Valid media descriptor bytes for MS-DOS:
+#
+# Byte Capacity Media Size and Type
+# -------------------------------------------------
+#
+# F0 2.88 MB 3.5-inch, 2-sided, 36-sector
+# F0 1.44 MB 3.5-inch, 2-sided, 18-sector
+# F9 720K 3.5-inch, 2-sided, 9-sector
+# F9 1.2 MB 5.25-inch, 2-sided, 15-sector
+# FD 360K 5.25-inch, 2-sided, 9-sector
+# FF 320K 5.25-inch, 2-sided, 8-sector
+# FC 180K 5.25-inch, 1-sided, 9-sector
+# FE 160K 5.25-inch, 1-sided, 8-sector
+# FE 250K 8-inch, 1-sided, single-density
+# FD 500K 8-inch, 2-sided, single-density
+# FE 1.2 MB 8-inch, 2-sided, double-density
+# F8 ----- Fixed disk
+#
+# FC xxxK Apricot 70x1x9 boot disk.
+#
+# Originally a bitmap:
+# xxxxxxx0 Not two sided
+# xxxxxxx1 Double sided
+# xxxxxx0x Not 8 SPT
+# xxxxxx1x 8 SPT
+# xxxxx0xx Not Removable drive
+# xxxxx1xx Removable drive
+# 11111xxx Must be one.
+#
+# But now it's rather random:
+# 111111xx Low density disk
+# 00 SS, Not 8 SPT
+# 01 DS, Not 8 SPT
+# 10 SS, 8 SPT
+# 11 DS, 8 SPT
+#
+# 11111001 Double density 3½ floppy disk, high density 5¼
+# 11110000 High density 3½ floppy disk
+# 11111000 Hard disk any format
+#
+
+# CDROM Filesystems
+32769 string CD001 ISO 9660 CD-ROM filesystem data
+# "application id" which appears to be used as a volume label
+>32808 string >\0 '%s'
+>34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
+37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
+32776 string CDROM High Sierra CD-ROM filesystem data
+
+# cramfs filesystem - russell@coker.com.au
+0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
+>4 lelong x size %d
+>8 lelong &1 version #2
+>8 lelong &2 sorted_dirs
+>8 lelong &4 hole_support
+>32 lelong x CRC 0x%x,
+>36 lelong x edition %d,
+>40 lelong x %d blocks,
+>44 lelong x %d files
+
+0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
+>4 belong x size %d
+>8 belong &1 version #2
+>8 belong &2 sorted_dirs
+>8 belong &4 hole_support
+>32 belong x CRC 0x%x,
+>36 belong x edition %d,
+>40 belong x %d blocks,
+>44 belong x %d files
+
+# reiserfs - russell@coker.com.au
+0x10034 string ReIsErFs ReiserFS V3.5
+0x10034 string ReIsEr2Fs ReiserFS V3.6
+>0x1002c leshort x block size %d
+>0x10032 leshort &2 (mounted or unclean)
+>0x10000 lelong x num blocks %d
+>0x10040 lelong 1 tea hash
+>0x10040 lelong 2 yura hash
+>0x10040 lelong 3 r5 hash
+
+# JFFS - russell@coker.com.au
+0 lelong 0x34383931 Linux Journalled Flash File system, little endian
+0 belong 0x34383931 Linux Journalled Flash File system, big endian
+
+# EST flat binary format (which isn't, but anyway)
+# From: Mark Brown <broonie@sirena.org.uk>
+0 string ESTFBINR EST flat binary
+
+# Aculab VoIP firmware
+# From: Mark Brown <broonie@sirena.org.uk>
+0 string VoIP\ Startup\ and Aculab VoIP firmware
+>35 string x format %s
+
+# PPCBoot image file
+# From: Mark Brown <broonie@sirena.org.uk>
+0 belong 0x27051956 PPCBoot image
+>4 string PPCBoot
+>>12 string x version %s
+
+# JFFS2 file system
+0 leshort 0x1984 Linux old jffs2 filesystem data little endian
+0 lelong 0xe0011985 Linux jffs2 filesystem data little endian
+
+# Squashfs
+0 string sqsh Squashfs filesystem, big endian,
+>28 beshort x version %d.
+>30 beshort x \b%d,
+>8 belong x %d bytes,
+>4 belong x %d inodes,
+>28 beshort <2
+>>32 beshort x blocksize: %d bytes,
+>28 beshort >1
+>>51 belong x blocksize: %d bytes,
+>39 bedate x created: %s
+0 string hsqs Squashfs filesystem, little endian,
+>28 leshort x version %d.
+>30 leshort x \b%d,
+>8 lelong x %d bytes,
+>4 lelong x %d inodes,
+>28 leshort <2
+>>32 leshort x blocksize: %d bytes,
+>28 leshort >1
+>>51 lelong x blocksize: %d bytes,
+>39 ledate x created: %s
+
+# AFS Dump Magic
+# From: Ty Sarna <tsarna@sarna.org>
+0 string \x01\xb3\xa1\x13\x22 AFS Dump
+>&0 belong x (v%d)
+>>&0 byte 0x76
+>>>&0 belong x Vol %d,
+>>>>&0 byte 0x6e
+>>>>>&0 string x %s
+>>>>>>&1 byte 0x74
+>>>>>>>&0 beshort 2
+>>>>>>>>&4 bedate x on: %s
+>>>>>>>>&0 bedate =0 full dump
+>>>>>>>>&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 0000000..7b7d8b6
--- /dev/null
+++ b/meta/recipes-devtools/file/file/ge-le.patch
@@ -0,0 +1,70 @@
+`>=' and `<=' was silently ignored in previous version,
+but causes an warning in file 5.04. Add support for these
+two operators as a feature extension, however, users should
+not rely on them.
+
+8/17/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/src/apprentice.c b/src/apprentice.c
+index 3d4c3cf..a2b86ed 100644
+--- a/src/apprentice.c
++++ b/src/apprentice.c
+@@ -1396,11 +1396,10 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
+ m->reln = *l;
+ ++l;
+ if (*l == '=') {
+- if (ms->flags & MAGIC_CHECK) {
+- file_magwarn(ms, "%c= not supported",
+- m->reln);
+- return -1;
+- }
++ if (m->reln == '>')
++ m->reln = 'g';
++ else if (m->reln == '<')
++ m->reln = 'l';
+ ++l;
+ }
+ break;
+diff --git a/src/softmagic.c b/src/softmagic.c
+index d8a5675..1648e43 100644
+--- a/src/softmagic.c
++++ b/src/softmagic.c
+@@ -1955,6 +1955,38 @@ magiccheck(struct magic_set *ms, struct magic *m)
+ }
+ break;
+
++ case 'g':
++ if (m->flag & UNSIGNED) {
++ matched = v >= l;
++ if ((ms->flags & MAGIC_DEBUG) != 0)
++ (void) fprintf(stderr, "%llu >= %llu = %d\n",
++ (unsigned long long)v,
++ (unsigned long long)l, matched);
++ }
++ else {
++ matched = (int64_t) v >= (int64_t) l;
++ if ((ms->flags & MAGIC_DEBUG) != 0)
++ (void) fprintf(stderr, "%lld >= %lld = %d\n",
++ (long long)v, (long long)l, matched);
++ }
++ break;
++
++ case 'l':
++ if (m->flag & UNSIGNED) {
++ matched = v <= l;
++ if ((ms->flags & MAGIC_DEBUG) != 0)
++ (void) fprintf(stderr, "%llu <= %llu = %d\n",
++ (unsigned long long)v,
++ (unsigned long long)l, matched);
++ }
++ else {
++ matched = (int64_t) v <= (int64_t) l;
++ if ((ms->flags & MAGIC_DEBUG) != 0)
++ (void) fprintf(stderr, "%lld <= %lld = %d\n",
++ (long long)v, (long long)l, matched);
++ }
++ break;
++
+ case '&':
+ matched = (v & l) == l;
+ 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 0000000..055e43e
--- /dev/null
+++ b/meta/recipes-devtools/file/file/stringb-compat.patch
@@ -0,0 +1,29 @@
+`B' in file 4.x has the same meaning with `W' in file 5,
+let `B' be an alias of `W'.
+
+8/17/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/src/apprentice.c b/src/apprentice.c
+index 58826c3..3d4c3cf 100644
+--- a/src/apprentice.c
++++ b/src/apprentice.c
+@@ -1340,6 +1340,7 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
+ "zero range");
+ l = t - 1;
+ break;
++ case CHAR_COMPACT_BLANK:
+ case CHAR_COMPACT_WHITESPACE:
+ m->str_flags |= STRING_COMPACT_WHITESPACE;
+ break;
+diff --git a/src/file.h b/src/file.h
+index c07f2d4..42cf416 100644
+--- a/src/file.h
++++ b/src/file.h
+@@ -282,6 +282,7 @@ struct magic {
+ #define STRING_TEXTTEST BIT(5)
+ #define STRING_BINTEST BIT(6)
+ #define CHAR_COMPACT_WHITESPACE 'W'
++#define CHAR_COMPACT_BLANK 'B'
+ #define CHAR_COMPACT_OPTIONAL_WHITESPACE 'w'
+ #define CHAR_IGNORE_LOWERCASE 'c'
+ #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 0000000..afc0816
--- /dev/null
+++ b/meta/recipes-devtools/file/file_5.04.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
+
+DEPENDS = "zlib file-native"
+DEPENDS_virtclass-native = "zlib-native"
+PR = "r1"
+
+SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
+ file://stringb-compat.patch \
+ file://ge-le.patch \
+ file://dump \
+ file://filesystems"
+
+inherit autotools
+
+do_configure_prepend() {
+ cp ${WORKDIR}/dump ${S}/magic/Magdir/
+ cp ${WORKDIR}/filesystems ${S}/magic/Magdir/
+}
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
new file mode 100644
index 0000000..da95a5e
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "Flex is a tool for generating programs that recognize lexical patterns in text."
+HOMEPAGE = "http://sourceforge.net/projects/flex/"
+
+SECTION = "devel"
+LICENSE = "BSD"
+DEPENDS = "gettext"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 "
+
+inherit autotools
+
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 0000000..eddaa48
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex_2.5.35.bb
@@ -0,0 +1,4 @@
+require flex.inc
+PR = "r1"
+
+BBCLASSEXTEND = "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 0000000..8aede10
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/canadian-build-modules-configure.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.2.2-orig/gcc/configure gcc-4.2.2/gcc/configure
+--- gcc-4.2.2-orig/gcc/configure 2008-08-31 23:10:56.000000000 +0200
++++ gcc-4.2.2/gcc/configure 2008-08-31 23:03:02.000000000 +0200
+@@ -12716,6 +12716,7 @@
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ CPP="${CPP_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \
+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+diff -urN gcc-4.2.2-orig/gcc/configure.ac gcc-4.2.2/gcc/configure.ac
+--- gcc-4.2.2-orig/gcc/configure.ac 2008-08-31 23:10:53.000000000 +0200
++++ gcc-4.2.2/gcc/configure.ac 2008-08-31 23:03:29.000000000 +0200
+@@ -1490,6 +1490,7 @@
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ CPP="${CPP_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --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 0000000..8a2a4c4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch
@@ -0,0 +1,12 @@
+Index: gcc-4.3.3/Makefile.in
+===================================================================
+--- gcc-4.3.3.orig/Makefile.in 2010-06-16 18:04:38.379008150 +0400
++++ gcc-4.3.3/Makefile.in 2010-06-16 18:05:29.115006261 +0400
+@@ -148,6 +148,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASSS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ LIBCFLAGS="$(CFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # 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 0000000..b375336
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.3.1/Makefile.in
+===================================================================
+--- gcc-4.3.1.orig/Makefile.in 2010-07-07 13:08:44.000000000 +0200
++++ gcc-4.3.1/Makefile.in 2010-07-07 13:11:59.246625709 +0200
+@@ -149,7 +149,7 @@
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
+- LIBCFLAGS=""
++ LIBCFLAGS="$(CFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+ 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 0000000..99f813e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc-posix-open-fix.patch
@@ -0,0 +1,11 @@
+--- gcc-3.4.6/gcc/collect2.c 2008-10-04 18:17:17.796750393 +0400
++++ gcc-3.4.6/gcc/collect2.new 2008-10-04 18:24:10.120748711 +0400
+@@ -1534,7 +1534,7 @@ collect_execute (const char *prog, char
+ if (redir)
+ {
+ /* Open response file. */
+- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
++ redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT, S_IWUSR);
+
+ /* Duplicate the stdout and stderr file handles
+ 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 0000000..0da2811
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gcc4-mtune-compat.patch
@@ -0,0 +1,14 @@
+Patch for gcc3 to support gcc4-compatible (and consistent) values for -mtune= option.
+
+--- gcc-3.4.4/gcc/config/arm/arm.c.org 2007-12-15 23:58:35.000000000 +0200
++++ gcc-3.4.4/gcc/config/arm/arm.c 2007-12-16 00:20:39.000000000 +0200
+@@ -432,7 +432,9 @@
+ {"arm10tdmi", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 },
+ {"arm1020t", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_ARCH5 },
+ {"arm926ejs", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
++ {"arm926ej-s", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
+ {"arm1026ejs", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
++ {"arm1026ej-s", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_ARCH5 | FL_ARCH5E },
+ {"xscale", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE },
+ {"iwmmxt", FL_MODE32 | FL_FAST_MULT | FL_ARCH4 | FL_THUMB | FL_LDSCHED | FL_STRONG | FL_ARCH5 | FL_ARCH5E | FL_XSCALE | FL_IWMMXT },
+ /* 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 0000000..0c42851
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gfortran-4.3.x.patch
@@ -0,0 +1,40 @@
+The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
+
+This target doesn't really have a 128-bit integer type, however it does use
+TImode to represent the return value of certain special ABI defined library
+functions. This results in type_for_size(TImode) being called.
+
+Because TImode deosn't correspond to any gfortran integer kind
+gfc_type_for_size returns NULL and we segfault shortly after.
+
+The patch below fixes this by making gfc_type_for_size handle TImode in the
+same way as the C frontend.
+
+Tested on x86_64-linux and arm-linux-gnueabi.
+Applied to trunk.
+
+Paul
+
+2007-05-15 Paul Brook <paul@codesourcery.com>
+
+ gcc/fortran/
+ * trans-types.c (gfc_type_for_size): Handle signed TImode.
+
+Index: gcc-4.2.1/gcc/fortran/trans-types.c
+===================================================================
+--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
++++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
+@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
+ if (type && bits == TYPE_PRECISION (type))
+ return type;
+ }
++
++ /* Handle TImode as a special case because it is used by some backends
++ (eg. ARM) even though it is not available for normal use. */
++#if HOST_BITS_PER_WIDE_INT >= 65
++ if (bits == TYPE_PRECISION (intTI_type_node))
++ return intTI_type_node;
++#endif
+ }
+ else
+ {
diff --git a/meta/recipes-devtools/gcc/files/gfortran.patch b/meta/recipes-devtools/gcc/files/gfortran.patch
new file mode 100644
index 0000000..96905e5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/gfortran.patch
@@ -0,0 +1,40 @@
+The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
+
+This target doesn't really have a 128-bit integer type, however it does use
+TImode to represent the return value of certain special ABI defined library
+functions. This results in type_for_size(TImode) being called.
+
+Because TImode deosn't correspond to any gfortran integer kind
+gfc_type_for_size returns NULL and we segfault shortly after.
+
+The patch below fixes this by making gfc_type_for_size handle TImode in the
+same way as the C frontend.
+
+Tested on x86_64-linux and arm-linux-gnueabi.
+Applied to trunk.
+
+Paul
+
+2007-05-15 Paul Brook <paul@codesourcery.com>
+
+ gcc/fortran/
+ * trans-types.c (gfc_type_for_size): Handle signed TImode.
+
+Index: gcc-4.2.1/gcc/fortran/trans-types.c
+===================================================================
+--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
++++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
+@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
+ if (type && bits == TYPE_PRECISION (type))
+ return type;
+ }
++
++ /* Handle TImode as a special case because it is used by some backends
++ (eg. ARM) even though it is not available for normal use. */
++#if HOST_BITS_PER_WIDE_INT >= 64
++ if (bits == TYPE_PRECISION (intTI_type_node))
++ return intTI_type_node;
++#endif
+ }
+ else
+ {
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 0000000..429e9ff
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr22133-mingw-path-fixup.patch
@@ -0,0 +1,29 @@
+diff -rupN gcc-4.2.orig/gcc/c-incpath.c gcc-4.2/gcc/c-incpath.c
+--- gcc-4.2.orig/gcc/c-incpath.c 2007-09-01 11:28:30.000000000 -0400
++++ gcc-4.2/gcc/c-incpath.c 2008-08-17 16:56:01.000000000 -0400
+@@ -340,13 +340,18 @@ add_path (char *path, int chain, int cxx
+ cpp_dir *p;
+
+ #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+- /* Convert all backslashes to slashes. The native CRT stat()
+- function does not recognize a directory that ends in a backslash
+- (unless it is a drive root dir, such "c:\"). Forward slashes,
+- trailing or otherwise, cause no problems for stat(). */
+- char* c;
+- for (c = path; *c; c++)
+- if (*c == '\\') *c = '/';
++ /* Remove unnecessary trailing slashes. On some versions of MS
++ Windows, trailing _forward_ slashes cause no problems for stat().
++ On newer versions, stat() does not recognise a directory that ends
++ in a '\\' or '/', unless it is a drive root dir, such as "c:/",
++ where it is obligatory. */
++ int pathlen = strlen (path);
++ char* end = path + pathlen - 1;
++ /* Preserve the lead '/' or lead "c:/". */
++ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
++
++ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
++ *end = 0;
+ #endif
+
+ 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 0000000..e16fb44
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr33281-mingw-host-fragment.patch
@@ -0,0 +1,38 @@
+---
+ config/mh-mingw | 3 +++
+ configure | 1 +
+ configure.in | 1 +
+ 3 files changed, 5 insertions(+)
+
+Index: gcc-4.2.3/config/mh-mingw
+===================================================================
+--- /dev/null
++++ gcc-4.2.3/config/mh-mingw
+@@ -0,0 +1,3 @@
++# Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
++# Vista (see PR33281 for details).
++BOOT_CFLAGS += -D__USE_MINGW_ACCESS
+Index: gcc-4.2.3/configure.in
+===================================================================
+--- gcc-4.2.3.orig/configure.in
++++ gcc-4.2.3/configure.in
+@@ -929,6 +929,7 @@ case "${host}" in
+ host_makefile_frag="config/mh-cygwin"
+ ;;
+ *-mingw32*)
++ host_makefile_frag="config/mh-mingw"
+ ;;
+ *-interix*)
+ host_makefile_frag="config/mh-interix"
+Index: gcc-4.2.3/configure
+===================================================================
+--- gcc-4.2.3.orig/configure
++++ gcc-4.2.3/configure
+@@ -1769,6 +1769,7 @@ case "${host}" in
+ host_makefile_frag="config/mh-cygwin"
+ ;;
+ *-mingw32*)
++ host_makefile_frag="config/mh-mingw"
+ ;;
+ *-interix*)
+ 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 0000000..faf44c2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/files/pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch
@@ -0,0 +1,13 @@
+---
+ config/mh-mingw | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: gcc-4.2.3/config/mh-mingw
+===================================================================
+--- gcc-4.2.3.orig/config/mh-mingw
++++ gcc-4.2.3/config/mh-mingw
+@@ -1,3 +1,4 @@
+ # Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
+ # Vista (see PR33281 for details).
+ BOOT_CFLAGS += -D__USE_MINGW_ACCESS
++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 0000000..9b600a0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3.inc
@@ -0,0 +1,69 @@
+require gcc-common.inc
+LICENSE = "GPLv3"
+
+DEPENDS =+ "mpfr gmp"
+NATIVEDEPS = "mpfr-native gmp-native gettext-native"
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \
+ file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \
+ file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \
+ file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \
+ file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \
+ file://debian/pr30961.dpatch;patch=1;pnum=0 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+# file://gfortran.patch;patch=1 \
+ file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+# file://pr34130.patch;patch=1 \
+# file://fortran-static-linking.patch;patch=1 \
+ file://gcc-arm-frename-registers.patch;patch=1 \
+ file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \
+ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://gcc-flags-for-build.patch;patch=1 \
+ file://pr35942.patch;patch=1 \
+ file://optional_libstdc.patch;patch=1 \
+ file://sparseset_rule.patch;patch=1 \
+ file://64bithack.patch;patch=1 \
+"
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+EXTRA_OECONF_BASE = " --enable-cheaders=c_std --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
+EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no"
+EXTRA_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 0000000..0b79960
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/100-uclibc-conf.patch
@@ -0,0 +1,37 @@
+Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
+===================================================================
+--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
++++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
+@@ -105,6 +105,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+Index: gcc-4.3.1/libjava/classpath/ltconfig
+===================================================================
+--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
++++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ 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 0000000..09c9bbe
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,11 @@
+--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
++++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
+@@ -1905,7 +1905,7 @@
+ ;;
+ sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
+ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
+- sh-*-linux* | sh[346lbe]*-*-linux* | \
++ sh*-*-linux* | sh[346lbe]*-*-linux* | \
+ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+ sh64-*-netbsd* | sh64l*-*-netbsd*)
+ 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 0000000..acebe53
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ 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 0000000..70ba98e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/200-uclibc-locale.patch
@@ -0,0 +1,2833 @@
+Index: gcc-4.3.2/libstdc++-v3/acinclude.m4
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/acinclude.m4 2008-04-25 09:52:57.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/acinclude.m4 2008-08-28 17:55:56.000000000 -0700
+@@ -1349,7 +1349,7 @@
+ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
+
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+@@ -1370,6 +1370,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -1541,6 +1544,40 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ AC_MSG_RESULT(uclibc)
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++ AC_SUBST(glibcxx_MOFILES)
++ AC_SUBST(glibcxx_POFILES)
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno> // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
++#define __strtof_l(S, E, L) strtof((S), (E))
++#define __strtod_l(S, E, L) strtod((S), (E))
++#define __strtold_l(S, E, L) strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c) NULL
++#define __freelocale(a) ((void)0)
++#define __duplocale(a) __c_locale()
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ void
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ __c_locale __old)
++ {
++ __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ if (!__cloc)
++ {
++ // This named locale is not supported by the underlying OS.
++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++ "name not valid"));
++ }
++#endif
++ }
++
++ void
++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++ {
++ if (_S_get_c_locale() != __cloc)
++ __freelocale(__cloc);
++ }
++
++ __c_locale
++ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++ { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++ {
++ "LC_CTYPE",
++ "LC_NUMERIC",
++ "LC_TIME",
++ "LC_COLLATE",
++ "LC_MONETARY",
++ "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++ "LC_PAPER",
++ "LC_NAME",
++ "LC_ADDRESS",
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
++#endif
++ };
++}
++
++namespace std
++{
++ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++} // namespace std
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring> // get std::strlen
++#include <cstdio> // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h> // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h> // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++ extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++ typedef __locale_t __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
++
++ // Convert numeric value of type _Tv to string and return length of
++ // string. If snprintf is available use it, otherwise fall back to
++ // the unsafe sprintf which, in general, can be dangerous and should
++ // be avoided.
++ template<typename _Tv>
++ int
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ _Tv __v, const __c_locale& __cloc, int __prec)
++ {
++ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++ _Tv __v, const __c_locale&, int __prec)
++ {
++# ifdef __UCLIBC_HAS_LOCALE__
++ char* __old = std::setlocale(LC_ALL, NULL);
++ char* __sav = new char[std::strlen(__old) + 1];
++ std::strcpy(__sav, __old);
++ std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++ std::setlocale(LC_ALL, __sav);
++ delete [] __sav;
++#endif
++ return __ret;
++ }
++}
++
++#endif
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,308 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <cstdlib> // For MB_CUR_MAX
++#include <climits> // For MB_LEN_MAX
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++ // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_out(state_type& __state, const intern_type* __from,
++ const intern_type* __from_end, const intern_type*& __from_next,
++ extern_type* __to, extern_type* __to_end,
++ extern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++ // in case we fall back to wcrtomb and then continue, in a loop.
++ // NB: wcsnrtombs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++ __from_end - __from_next);
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // wcrtomb.
++ for (; __from < __from_next; ++__from)
++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ extern_type __buf[MB_LEN_MAX];
++ __tmp_state = __state;
++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++ if (__conv > static_cast<size_t>(__to_end - __to_next))
++ __ret = partial;
++ else
++ {
++ memcpy(__to_next, __buf, __conv);
++ __state = __tmp_state;
++ __to_next += __conv;
++ ++__from_next;
++ }
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_in(state_type& __state, const extern_type* __from,
++ const extern_type* __from_end, const extern_type*& __from_next,
++ intern_type* __to, intern_type* __to_end,
++ intern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we store a L'\0' and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++ __from_end
++ - __from_next));
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (;; ++__to_next, __from += __conv)
++ {
++ __conv = mbrtowc(__to_next, __from, __from_end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __from_next = __from;
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ // It is unclear what to return in this case (see DR 382).
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ if (__to_next < __to_end)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from_next;
++ *__to_next++ = L'\0';
++ }
++ else
++ __ret = partial;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_encoding() const throw()
++ {
++ // XXX This implementation assumes that the encoding is
++ // stateless and is either single-byte or variable-width.
++ int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ if (MB_CUR_MAX == 1)
++ __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_max_length() const throw()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ // XXX Probably wrong for stateful encodings.
++ int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_length(state_type& __state, const extern_type* __from,
++ const extern_type* __end, size_t __max) const
++ {
++ int __ret = 0;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we advance past it and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++
++ // A dummy internal buffer is needed in order for mbsnrtocws to consider
++ // its fourth parameter (it wouldn't with NULL as first parameter).
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ * __max));
++ while (__from < __end && __max)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++ __end
++ - __from));
++ if (!__from_chunk_end)
++ __from_chunk_end = __end;
++
++ const extern_type* __tmp_from = __from;
++ size_t __conv = mbsnrtowcs(__to, &__from,
++ __from_chunk_end - __from,
++ __max, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (__from = __tmp_from;; __from += __conv)
++ {
++ __conv = mbrtowc(NULL, __from, __end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __state = __tmp_state;
++ __ret += __from - __tmp_from;
++ break;
++ }
++ if (!__from)
++ __from = __from_chunk_end;
++
++ __ret += __from - __tmp_from;
++ __max -= __conv;
++
++ if (__from < __end && __max)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from;
++ ++__ret;
++ --__max;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++#endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++ // These are basically extensions to char_traits, and perhaps should
++ // be put there instead of here.
++ template<>
++ int
++ collate<char>::_M_compare(const char* __one, const char* __two) const
++ {
++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ const wchar_t* __two) const
++ {
++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++ size_t __n) const
++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L) wctype((S))
++#define __towupper_l(C, L) towupper((C))
++#define __towlower_l(C, L) towlower((C))
++#define __iswctype_l(C, M, L) iswctype((C), (M))
++#endif
++
++namespace std
++{
++ // NB: The other ctype<char> specializations are in src/locale.cc and
++ // various /config/os/* files.
++ template<>
++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++ : ctype<char>(0, false, __refs)
++ {
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ ctype<wchar_t>::__wmask_type
++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++ {
++ __wmask_type __ret;
++ switch (__m)
++ {
++ case space:
++ __ret = __wctype_l("space", _M_c_locale_ctype);
++ break;
++ case print:
++ __ret = __wctype_l("print", _M_c_locale_ctype);
++ break;
++ case cntrl:
++ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++ break;
++ case upper:
++ __ret = __wctype_l("upper", _M_c_locale_ctype);
++ break;
++ case lower:
++ __ret = __wctype_l("lower", _M_c_locale_ctype);
++ break;
++ case alpha:
++ __ret = __wctype_l("alpha", _M_c_locale_ctype);
++ break;
++ case digit:
++ __ret = __wctype_l("digit", _M_c_locale_ctype);
++ break;
++ case punct:
++ __ret = __wctype_l("punct", _M_c_locale_ctype);
++ break;
++ case xdigit:
++ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++ break;
++ case alnum:
++ __ret = __wctype_l("alnum", _M_c_locale_ctype);
++ break;
++ case graph:
++ __ret = __wctype_l("graph", _M_c_locale_ctype);
++ break;
++ default:
++ __ret = __wmask_type();
++ }
++ return __ret;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_toupper(wchar_t __c) const
++ { return __towupper_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_tolower(wchar_t __c) const
++ { return __towlower_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ bool
++ ctype<wchar_t>::
++ do_is(mask __m, wchar_t __c) const
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ bool __ret = false;
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur]
++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ return __ret;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++ {
++ for (; __lo < __hi; ++__vec, ++__lo)
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ mask __m = 0;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++ __m |= _M_bit[__bitcur];
++ *__vec = __m;
++ }
++ return __hi;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi && !this->do_is(__m, *__lo))
++ ++__lo;
++ return __lo;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++ {
++ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++ ++__lo;
++ return __lo;
++ }
++
++ wchar_t
++ ctype<wchar_t>::
++ do_widen(char __c) const
++ { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++ const char*
++ ctype<wchar_t>::
++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++ {
++ while (__lo < __hi)
++ {
++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++ ++__lo;
++ ++__dest;
++ }
++ return __hi;
++ }
++
++ char
++ ctype<wchar_t>::
++ do_narrow(wchar_t __wc, char __dfault) const
++ {
++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++ return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ char* __dest) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ if (_M_narrow_ok)
++ while (__lo < __hi)
++ {
++ if (*__lo >= 0 && *__lo < 128)
++ *__dest = _M_narrow[*__lo];
++ else
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++ ++__lo;
++ ++__dest;
++ }
++ else
++ while (__lo < __hi)
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ ++__lo;
++ ++__dest;
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __hi;
++ }
++
++ void
++ ctype<wchar_t>::_M_initialize_ctype()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ wint_t __i;
++ for (__i = 0; __i < 128; ++__i)
++ {
++ const int __c = wctob(__i);
++ if (__c == EOF)
++ break;
++ else
++ _M_narrow[__i] = static_cast<char>(__c);
++ }
++ if (__i == 128)
++ _M_narrow_ok = true;
++ else
++ _M_narrow_ok = false;
++ for (size_t __j = 0;
++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++ _M_widen[__j] = btowc(__j);
++
++ for (size_t __k = 0; __k <= 11; ++__k)
++ {
++ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ }
++#endif // _GLIBCXX_USE_WCHAR_T
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++ const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++ // Specializations.
++ template<>
++ string
++ messages<char>::do_get(catalog, int, int, const string& __dfault) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++ __uselocale(__old);
++ return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ const char* __msg = gettext(__dfault.c_str());
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return string(__msg);
++#else
++ const char* __msg = gettext(__dfault.c_str());
++ return string(__msg);
++#endif
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ wstring
++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++ {
++# ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ __uselocale(__old);
++ return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return _M_convert_from_char(__msg);
++# else
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ return _M_convert_from_char(__msg);
++# endif
++ }
++#endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++ const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D) ((void)0)
++#define __bindtextdomain(D,P) ((void)0)
++#endif
++
++ // Non-virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::messages(size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ _M_name_messages(_S_get_c_name())
++ { }
++
++ template<typename _CharT>
++ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++ _M_name_messages(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_messages = __tmp;
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ const char* __dir) const
++ {
++ __bindtextdomain(__s.c_str(), __dir);
++ return this->do_open(__s, __loc);
++ }
++
++ // Virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::~messages()
++ {
++ if (_M_name_messages != _S_get_c_name())
++ delete [] _M_name_messages;
++ _S_destroy_c_locale(_M_c_locale_messages);
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
++ const locale&) const
++ {
++ // No error checking is done, assume the catalog exists and can
++ // be used.
++ __textdomain(__s.c_str());
++ return 0;
++ }
++
++ template<typename _CharT>
++ void
++ messages<_CharT>::do_close(catalog) const
++ { }
++
++ // messages_byname
++ template<typename _CharT>
++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++ : messages<_CharT>(__refs)
++ {
++ if (this->_M_name_messages != locale::facet::_S_get_c_name())
++ delete [] this->_M_name_messages;
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ this->_M_name_messages = __tmp;
++
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_messages);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ }
++ }
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ // Construct and return valid pattern consisting of some combination of:
++ // space none symbol sign value
++ money_base::pattern
++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++ {
++ pattern __ret;
++
++ // This insanely complicated routine attempts to construct a valid
++ // pattern for use with monyepunct. A couple of invariants:
++
++ // if (__precedes) symbol -> value
++ // else value -> symbol
++
++ // if (__space) space
++ // else none
++
++ // none == never first
++ // space never first or last
++
++ // Any elegant implementations of this are welcome.
++ switch (__posn)
++ {
++ case 0:
++ case 1:
++ // 1 The sign precedes the value and symbol.
++ __ret.field[0] = sign;
++ if (__space)
++ {
++ // Pattern starts with sign.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[3] = symbol;
++ }
++ __ret.field[2] = space;
++ }
++ else
++ {
++ // Pattern starts with sign and ends with none.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[3] = none;
++ }
++ break;
++ case 2:
++ // 2 The sign follows the value and symbol.
++ if (__space)
++ {
++ // Pattern either ends with sign.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[1] = space;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ // Pattern ends with sign then none.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[1] = symbol;
++ }
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ break;
++ case 3:
++ // 3 The sign immediately precedes the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = sign;
++ __ret.field[1] = symbol;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = sign;
++ __ret.field[3] = symbol;
++ }
++ else
++ {
++ __ret.field[1] = sign;
++ __ret.field[2] = symbol;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ case 4:
++ // 4 The sign immediately follows the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = sign;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = symbol;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ default:
++ ;
++ }
++ return __ret;
++ }
++
++ template<>
++ void
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == true
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ void
++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == false
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ moneypunct<char, true>::~moneypunct()
++ { delete _M_data; }
++
++ template<>
++ moneypunct<char, false>::~moneypunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ void
++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len;
++ __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ moneypunct<wchar_t, true>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++
++ template<>
++ moneypunct<wchar_t, false>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++#endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++ __cloc));
++
++ // Check for NULL, which implies no grouping.
++ if (_M_data->_M_thousands_sep == '\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = "true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = "false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<char>::~numpunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<wchar_t>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++ }
++ else
++ {
++ // Named locale.
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++
++ if (_M_data->_M_thousands_sep == L'\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = L"true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = L"false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<wchar_t>::~numpunct()
++ { delete _M_data; }
++ #endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __timepunct<char>::
++ _M_put(char* __s, size_t __maxlen, const char* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = strftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = '\0';
++ }
++
++ template<>
++ void
++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = "%m/%d/%y";
++ _M_data->_M_date_era_format = "%m/%d/%y";
++ _M_data->_M_time_format = "%H:%M:%S";
++ _M_data->_M_time_era_format = "%H:%M:%S";
++ _M_data->_M_date_time_format = "";
++ _M_data->_M_date_time_era_format = "";
++ _M_data->_M_am = "AM";
++ _M_data->_M_pm = "PM";
++ _M_data->_M_am_pm_format = "";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = "Sunday";
++ _M_data->_M_day2 = "Monday";
++ _M_data->_M_day3 = "Tuesday";
++ _M_data->_M_day4 = "Wednesday";
++ _M_data->_M_day5 = "Thursday";
++ _M_data->_M_day6 = "Friday";
++ _M_data->_M_day7 = "Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = "Sun";
++ _M_data->_M_aday2 = "Mon";
++ _M_data->_M_aday3 = "Tue";
++ _M_data->_M_aday4 = "Wed";
++ _M_data->_M_aday5 = "Thu";
++ _M_data->_M_aday6 = "Fri";
++ _M_data->_M_aday7 = "Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = "January";
++ _M_data->_M_month02 = "February";
++ _M_data->_M_month03 = "March";
++ _M_data->_M_month04 = "April";
++ _M_data->_M_month05 = "May";
++ _M_data->_M_month06 = "June";
++ _M_data->_M_month07 = "July";
++ _M_data->_M_month08 = "August";
++ _M_data->_M_month09 = "September";
++ _M_data->_M_month10 = "October";
++ _M_data->_M_month11 = "November";
++ _M_data->_M_month12 = "December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = "Jan";
++ _M_data->_M_amonth02 = "Feb";
++ _M_data->_M_amonth03 = "Mar";
++ _M_data->_M_amonth04 = "Apr";
++ _M_data->_M_amonth05 = "May";
++ _M_data->_M_amonth06 = "Jun";
++ _M_data->_M_amonth07 = "Jul";
++ _M_data->_M_amonth08 = "Aug";
++ _M_data->_M_amonth09 = "Sep";
++ _M_data->_M_amonth10 = "Oct";
++ _M_data->_M_amonth11 = "Nov";
++ _M_data->_M_amonth12 = "Dec";
++ }
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ __timepunct<wchar_t>::
++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = L'\0';
++ }
++
++ template<>
++ void
++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++// if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = L"%m/%d/%y";
++ _M_data->_M_date_era_format = L"%m/%d/%y";
++ _M_data->_M_time_format = L"%H:%M:%S";
++ _M_data->_M_time_era_format = L"%H:%M:%S";
++ _M_data->_M_date_time_format = L"";
++ _M_data->_M_date_time_era_format = L"";
++ _M_data->_M_am = L"AM";
++ _M_data->_M_pm = L"PM";
++ _M_data->_M_am_pm_format = L"";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = L"Sunday";
++ _M_data->_M_day2 = L"Monday";
++ _M_data->_M_day3 = L"Tuesday";
++ _M_data->_M_day4 = L"Wednesday";
++ _M_data->_M_day5 = L"Thursday";
++ _M_data->_M_day6 = L"Friday";
++ _M_data->_M_day7 = L"Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = L"Sun";
++ _M_data->_M_aday2 = L"Mon";
++ _M_data->_M_aday3 = L"Tue";
++ _M_data->_M_aday4 = L"Wed";
++ _M_data->_M_aday5 = L"Thu";
++ _M_data->_M_aday6 = L"Fri";
++ _M_data->_M_aday7 = L"Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = L"January";
++ _M_data->_M_month02 = L"February";
++ _M_data->_M_month03 = L"March";
++ _M_data->_M_month04 = L"April";
++ _M_data->_M_month05 = L"May";
++ _M_data->_M_month06 = L"June";
++ _M_data->_M_month07 = L"July";
++ _M_data->_M_month08 = L"August";
++ _M_data->_M_month09 = L"September";
++ _M_data->_M_month10 = L"October";
++ _M_data->_M_month11 = L"November";
++ _M_data->_M_month12 = L"December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = L"Jan";
++ _M_data->_M_amonth02 = L"Feb";
++ _M_data->_M_amonth03 = L"Mar";
++ _M_data->_M_amonth04 = L"Apr";
++ _M_data->_M_amonth05 = L"May";
++ _M_data->_M_amonth06 = L"Jun";
++ _M_data->_M_amonth07 = L"Jul";
++ _M_data->_M_amonth08 = L"Aug";
++ _M_data->_M_amonth09 = L"Sep";
++ _M_data->_M_amonth10 = L"Oct";
++ _M_data->_M_amonth11 = L"Nov";
++ _M_data->_M_amonth12 = L"Dec";
++ }
++#if 0
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
++
++ // Day names, starting with "C"'s Sunday.
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
++
++ // Month names, starting with "C"'s January.
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
++ }
++#endif // 0
++ }
++#endif
++}
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-08-28 17:55:56.000000000 -0700
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_timepunct = __tmp;
++ _M_initialize_timepunct(__cloc);
++ }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::~__timepunct()
++ {
++ if (_M_name_timepunct != _S_get_c_name())
++ delete [] _M_name_timepunct;
++ delete _M_data;
++ _S_destroy_c_locale(_M_c_locale_timepunct);
++ }
+Index: gcc-4.3.2/libstdc++-v3/configure
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/configure 2008-07-07 12:49:54.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/configure 2008-08-28 18:02:13.000000000 -0700
+@@ -14003,7 +14003,7 @@
+ enableval="$enable_clocale"
+
+ case "$enableval" in
+- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
+ echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
+ { (exit 1); exit 1; }; } ;;
+@@ -14036,6 +14036,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -14424,6 +14427,76 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ echo "$as_me:$LINENO: result: uclibc" >&5
++echo "${ECHO_T}uclibc" >&6
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$check_msgfmt"; then
++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_check_msgfmt="yes"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
++echo "${ECHO_T}$check_msgfmt" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++
++
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+@@ -17016,7 +17089,7 @@
+
+ # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
+ cat > conftest.$ac_ext << EOF
+-#line 17019 "configure"
++#line 17092 "configure"
+ int main()
+ {
+ // NB: _Atomic_word not necessarily int.
+Index: gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/include/c_compatibility/wchar.h 2007-03-04 14:59:49.000000000 -0800
++++ gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h 2008-08-28 17:55:56.000000000 -0700
+@@ -106,7 +106,9 @@
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+Index: gcc-4.3.2/libstdc++-v3/include/c_std/cwchar
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/include/c_std/cwchar 2007-05-27 07:50:21.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/include/c_std/cwchar 2008-08-28 17:55:56.000000000 -0700
+@@ -182,7 +182,9 @@
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using ::wcsftime;
++#endif
+ using ::wcslen;
+ using ::wcsncat;
+ 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 0000000..f39e652
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/203-uclibc-locale-no__x.patch
@@ -0,0 +1,233 @@
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700
+@@ -60,4 +60,49 @@
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l iswctype_l
++# define __towlower_l towlower_l
++# define __towupper_l towupper_l
++# define __wcscoll_l wcscoll_l
++# define __wcsftime_l wcsftime_l
++# define __wcsxfrm_l wcsxfrm_l
++# define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L) nl_langinfo((N))
++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++# define __strtod_l(S, E, L) strtod((S), (E))
++# define __strtof_l(S, E, L) strtof((S), (E))
++# define __strtold_l(S, E, L) strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c) NULL
++# define __freelocale(a) ((void)0)
++# define __duplocale(a) __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l(C, M, L) iswctype((C), (M))
++# define __towlower_l(C, L) towlower((C))
++# define __towupper_l(C, L) towupper((C))
++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++# define __wctype_l(S, L) wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L) strtof((S), (E))
+-#define __strtod_l(S, E, L) strtod((S), (E))
+-#define __strtold_l(S, E, L) strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c) NULL
+-#define __freelocale(a) ((void)0)
+-#define __duplocale(a) __c_locale()
+-#endif
+-
+ namespace std
+ {
+ template<>
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+ // These are basically extensions to char_traits, and perhaps should
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+ // Construct and return valid pattern consisting of some combination of:
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L) wctype((S))
+-#define __towupper_l(C, L) towupper((C))
+-#define __towlower_l(C, L) towlower((C))
+-#define __iswctype_l(C, M, L) iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+- const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+- const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D) ((void)0)
+-#define __bindtextdomain(D,P) ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D) ((void)0)
++#define bindtextdomain(D,P) ((void)0)
+ #endif
+
+ // Non-virtual member functions.
+@@ -70,7 +66,7 @@
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+- __bindtextdomain(__s.c_str(), __dir);
++ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+
+@@ -90,7 +86,7 @@
+ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+- __textdomain(__s.c_str());
++ textdomain(__s.c_str());
+ return 0;
+ }
+
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700
+@@ -68,6 +68,7 @@
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ 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 0000000..160ab35
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
+@@ -401,7 +401,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
+@@ -127,12 +127,25 @@
+ {
+ // Named locale.
+ // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = __u.__w;
++#endif
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _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 0000000..48eaa1d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/205-uclibc-locale-update.patch
@@ -0,0 +1,519 @@
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -39,23 +39,20 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ template<>
+ void
+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- float __f = __strtof_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __f;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -63,16 +60,13 @@
+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- double __d = __strtod_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __d;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -80,16 +74,13 @@
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- long double __ld = __strtold_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __ld;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ void
+@@ -110,17 +101,18 @@
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+- if (_S_get_c_locale() != __cloc)
++ if (__cloc && _S_get_c_locale() != __cloc)
+ __freelocale(__cloc);
+ }
+
+ __c_locale
+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
+ { return __duplocale(__cloc); }
+-} // namespace std
+
+-namespace __gnu_cxx
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
++
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
+ {
+ "LC_CTYPE",
+@@ -138,9 +130,11 @@
+ "LC_IDENTIFICATION"
+ #endif
+ };
+-}
+
+-namespace std
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+-} // namespace std
++
++_GLIBCXX_END_NAMESPACE
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
+@@ -33,16 +33,20 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+ // various /config/os/* files.
+- template<>
+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
+ : ctype<char>(0, false, __refs)
+ {
+@@ -57,6 +61,8 @@
+ #endif
+ }
+ }
++ ctype_byname<char>::~ctype_byname()
++ { }
+
+ #ifdef _GLIBCXX_USE_WCHAR_T
+ ctype<wchar_t>::__wmask_type
+@@ -138,17 +144,33 @@
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+- // Highest bitmask in ctype_base == 10, but extra in "C"
+- // library for blank.
++ // The case of __m == ctype_base::space is particularly important,
++ // due to its use in many istream functions. Therefore we deal with
++ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++ // is the mask corresponding to ctype_base::space. NB: an encoding
++ // change would not affect correctness!
++
+ bool __ret = false;
+- const size_t __bitmasksize = 11;
+- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+- if (__m & _M_bit[__bitcur]
+- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+- {
+- __ret = true;
+- break;
+- }
++ if (__m == _M_bit[5])
++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++ else
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur])
++ {
++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ else if (__m == _M_bit[__bitcur])
++ break;
++ }
++ }
++
+ return __ret;
+ }
+
+@@ -290,4 +312,5 @@
+ #endif
+ }
+ #endif // _GLIBCXX_USE_WCHAR_T
+-}
++
++_GLIBCXX_END_NAMESPACE
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
+@@ -53,12 +53,16 @@
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+- _M_name_messages(__s)
++ : facet(__refs), _M_c_locale_messages(NULL),
++ _M_name_messages(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
++
++ // Last to avoid leaking memory if new throws.
++ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+
+ template<typename _CharT>
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@
+ }
+ break;
+ default:
+- ;
++ __ret = pattern();
+ }
+ return __ret;
+ }
+@@ -390,7 +395,9 @@
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
+ setlocale(LC_ALL, __name);
+ #endif
+
+@@ -477,8 +484,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -498,8 +505,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+@@ -545,8 +552,11 @@
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
+- setlocale(LC_ALL, __name);
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
++ setlocale(LC_ALL, __name);
+ #endif
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -633,8 +643,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -653,8 +663,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
+@@ -50,12 +50,21 @@
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(__s)
++ _M_name_timepunct(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+- _M_initialize_timepunct(__cloc);
++
++ try
++ { _M_initialize_timepunct(__cloc); }
++ catch(...)
++ {
++ delete [] _M_name_timepunct;
++ __throw_exception_again;
++ }
++
+ }
+
+ template<typename _CharT>
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+
+ #include <cstring> // get std::strlen
+-#include <cstdio> // get std::snprintf or std::sprintf
++#include <cstdio> // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h> // For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h> // For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> // For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h> // For messages
+ #endif
++#include <cstdarg>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+
+@@ -78,23 +80,25 @@
+ #else
+ typedef int* __c_locale;
+ #endif
+-
+- // Convert numeric value of type _Tv to string and return length of
+- // string. If snprintf is available use it, otherwise fall back to
+- // the unsafe sprintf which, in general, can be dangerous and should
++ // Convert numeric value of type double to string and return length of
++ // string. If vsnprintf is available use it, otherwise fall back to
++ // the unsafe vsprintf which, in general, can be dangerous and should
+ // be avoided.
+- template<typename _Tv>
+- int
+- __convert_from_v(char* __out,
+- const int __size __attribute__ ((__unused__)),
+- const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+- _Tv __v, const __c_locale& __cloc, int __prec)
++ inline int
++ __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++ __cloc __attribute__ ((__unused__))
++#endif
++ ,
++ char* __out,
++ const int __size,
++ const char* __fmt, ...)
+ {
++ va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
++
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+- _Tv __v, const __c_locale&, int __prec)
+- {
+ # ifdef __UCLIBC_HAS_LOCALE__
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@
+ # endif
+ #endif
+
+- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++ va_start(__args, __fmt);
++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++ va_end(__args);
+
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -53,11 +53,14 @@
+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+@@ -207,11 +210,14 @@
+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
+@@ -31,6 +31,9 @@
+
+ #include <bits/c++config.h>
+ #include <clocale>
++#include <cstdlib>
++#include <cstring>
++#include <cstddef>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #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 0000000..89d03a8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/300-libstdc++-pic.patch
@@ -0,0 +1,46 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -745,6 +746,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/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 0000000..0e2092f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # 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 0000000..0286586
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/302-c99-snprintf.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.3.1/libstdc++-v3/include/c_std/cstdio
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/include/c_std/cstdio 2006-12-07 01:35:57.000000000 -0800
++++ gcc-4.3.1/libstdc++-v3/include/c_std/cstdio 2008-08-16 02:11:37.000000000 -0700
+@@ -144,7 +144,7 @@
+
+ _GLIBCXX_END_NAMESPACE
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #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 0000000..2ccc80d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
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 0000000..d8e4765
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ 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 0000000..374b1f8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
+@@ -427,7 +427,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -437,7 +437,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -447,7 +447,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -456,7 +456,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -465,7 +465,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* 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 0000000..69587ca
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/306-libstdc++-namespace.patch
@@ -0,0 +1,36 @@
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
+@@ -32,7 +32,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+@@ -115,3 +116,4 @@
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
++}
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
+@@ -33,7 +33,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+@@ -74,3 +75,4 @@
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
++}
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 0000000..774fcfa
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/307-locale_facets.patch
@@ -0,0 +1,19 @@
+This patch fixes a bug into ostream::operator<<(double) due to the wrong size
+passed into the __convert_from_v method. The wrong size is then passed to
+std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
+
+Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
+
+Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
++++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
+@@ -1004,7 +1004,7 @@
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
+ __prec, __v);
+ #endif
+
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 0000000..0bf115c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.2/gcc/Makefile.in
+===================================================================
+--- gcc-4.2/gcc/Makefile.in (revision 121758)
++++ gcc-4.2/gcc/Makefile.in (working copy)
+@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -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 0000000..23fce75
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
+--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
+@@ -21,5 +21,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
+@@ -35,7 +35,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ 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 0000000..f6931b8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/64bithack.patch
@@ -0,0 +1,33 @@
+By default gcc places 64 bit libs in a lib64 directory. This makes it use
+"lib" instead.
+
+RP 25/7/10
+
+Index: gcc-4.3.3/gcc/config/i386/t-linux64
+===================================================================
+--- gcc-4.3.3.orig/gcc/config/i386/t-linux64 2007-09-27 20:56:06.000000000 +0100
++++ gcc-4.3.3/gcc/config/i386/t-linux64 2010-08-03 12:55:04.642189070 +0100
+@@ -12,8 +12,8 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+
+ MULTILIB_OPTIONS = m64/m32
+-MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_DIRNAMES = . 32
++MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+Index: gcc-4.3.3/gcc/config/i386/linux64.h
+===================================================================
+--- gcc-4.3.3.orig/gcc/config/i386/linux64.h 2007-08-02 11:49:31.000000000 +0100
++++ gcc-4.3.3/gcc/config/i386/linux64.h 2010-08-03 13:01:51.621182117 +0100
+@@ -54,7 +54,7 @@
+ done. */
+
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+
+ #if TARGET_64BIT_DEFAULT
+ #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 0000000..7992282
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ 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 0000000..f433942
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/800-arm-bigendian.patch
@@ -0,0 +1,34 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+Index: gcc-4.3.2/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.3.2.orig/gcc/config/arm/linux-elf.h 2007-11-08 05:44:09.000000000 -0800
++++ gcc-4.3.2/gcc/config/arm/linux-elf.h 2008-08-28 21:08:30.000000000 -0700
+@@ -51,7 +51,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+Index: gcc-4.3.2/gcc/config.gcc
+===================================================================
+--- gcc-4.3.2.orig/gcc/config.gcc 2008-08-28 20:57:39.000000000 -0700
++++ gcc-4.3.2/gcc/config.gcc 2008-08-28 21:00:11.000000000 -0700
+@@ -742,6 +742,11 @@
+ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
++ case ${target} in
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ 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 0000000..54490fc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/801-arm-bigendian-eabi.patch
@@ -0,0 +1,14 @@
+Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ 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 0000000..8fac37c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,153 @@
+Hi,
+
+The attached patch makes sure that we create smaller object code for
+simple switch statements. We just make sure to flatten the switch
+statement into an if-else chain, basically.
+
+This fixes a size-regression as compared to gcc-3.4, as can be seen
+below.
+
+2007-04-15 Bernhard Fischer <..>
+
+ * stmt.c (expand_case): Do not create a complex binary tree when
+ optimizing for size but rather use the simple ordered list.
+ (emit_case_nodes): do not emit jumps to the default_label when
+ optimizing for size.
+
+Not regtested so far.
+Comments?
+
+Attached is the test switch.c mentioned below.
+
+$ 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
+gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
+$ 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
+gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
+
+$ size switch-*.o
+ text data bss dec hex filename
+ 169 0 0 169 a9 switch-2.95.o
+ 115 0 0 115 73 switch-3.3.o
+ 103 0 0 103 67 switch-3.4.o
+ 124 0 0 124 7c switch-4.0.o
+ 124 0 0 124 7c switch-4.1.o
+ 124 0 0 124 7c switch-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-4.3-HEAD.o
+ 124 0 0 124 7c switch-4.3.orig-HEAD.o
+ 166 0 0 166 a6 switch-CHAIN-2.95.o
+ 111 0 0 111 6f switch-CHAIN-3.3.o
+ 95 0 0 95 5f switch-CHAIN-3.4.o
+ 95 0 0 95 5f switch-CHAIN-4.0.o
+ 95 0 0 95 5f switch-CHAIN-4.1.o
+ 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
+
+
+Content-Type: text/x-diff; charset=us-ascii
+Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
+
+Index: gcc-4.2.0/gcc/stmt.c
+===================================================================
+--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
++++ gcc-4.2.0/gcc/stmt.c (working copy)
+@@ -2517,7 +2517,11 @@ expand_case (tree exp)
+ use_cost_table
+ = (TREE_CODE (orig_type) != ENUMERAL_TYPE
+ && estimate_case_costs (case_list));
+- balance_case_nodes (&case_list, NULL);
++ /* When optimizing for size, we want a straight list to avoid
++ jumps as much as possible. This basically creates an if-else
++ chain. */
++ if (!optimize_size)
++ balance_case_nodes (&case_list, NULL);
+ emit_case_nodes (index, case_list, default_label, index_type);
+ emit_jump (default_label);
+ }
+@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
+ {
+ if (!node_has_low_bound (node, index_type))
+ {
++ if (!optimize_size) /* don't jl to the .default_label. */
+ emit_cmp_and_jump_insns (index,
+ convert_modes
+ (mode, imode,
+
+
+Content-Type: text/x-csrc; charset=us-ascii
+Content-Disposition: attachment; filename="switch.c"
+
+int
+commutative_tree_code (int code)
+{
+#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
+#ifndef CHAIN
+ switch (code)
+ {
+# if 1
+ CASE(1,3)
+ CASE(3,2)
+ CASE(5,8)
+ CASE(7,1)
+ CASE(33,4)
+ CASE(44,9)
+ CASE(55,10)
+ CASE(66,-1)
+ CASE(77,99)
+ CASE(666,0)
+# else
+ case 1:
+ return 3;
+ case 3:
+ return 2;
+ case 5:
+ return 8;
+ case 7:
+ return 1;
+ case 33:
+ return 4;
+ case 44:
+ return 9;
+ case 55:
+ return 10;
+ case 66:
+ return -1;
+ case 77:
+ return 99;
+ case 666:
+ return 0;
+# endif
+ default:
+ break;
+ }
+ return 4711;
+
+#else
+ if (code == 1)
+ return 3;
+ else if (code == 3)
+ return 2;
+ else if (code == 5)
+ return 8;
+ else if (code == 7)
+ return 1;
+ else if (code == 33)
+ return 4;
+ else if (code == 44)
+ return 9;
+ else if (code == 55)
+ return 10;
+ else if (code == 66)
+ return -1;
+ else if (code == 77)
+ return 99;
+ else if (code == 666)
+ return 0;
+ else
+ return 4711;
+#endif
+}
+
+
+--AhhlLboLdkugWU4S--
+
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 0000000..c4897c0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+#
+# Fixes errors like
+# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
+# collect2: ld returned 1 exit status
+# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
+# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
+
+Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ 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 0000000..5e1edd9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-softfloat.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.0.2/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # 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 0000000..fa63846
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb-cache.patch
@@ -0,0 +1,29 @@
+--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200
++++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200
+@@ -44,6 +44,7 @@
+
+ /* Clear the instruction cache from `beg' to `end'. This makes an
+ inline system call to SYS_cacheflush. */
++#if !defined(__thumb__)
+ #define CLEAR_INSN_CACHE(BEG, END) \
+ { \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
+@@ -53,3 +54,18 @@
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
+ }
++#else
++#define CLEAR_INSN_CACHE(BEG, END) \
++{ \
++ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
++ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
++ register unsigned long _flg __asm ("a3") = 0; \
++ register unsigned long _swi __asm ("a4") = 0xf0002; \
++ __asm __volatile ("push {r7}\n" \
++ " mov r7,a4\n" \
++ " swi 0 @ sys_cacheflush\n" \
++ " pop {r7}\n" \
++ : "=r" (_beg) \
++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
++}
++#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 0000000..7b0b8b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/arm-thumb.patch
@@ -0,0 +1,43 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: gcc-4.3.1/gcc/config/arm/lib1funcs.asm
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/arm/lib1funcs.asm 2007-05-30 12:04:09.000000000 -0700
++++ gcc-4.3.1/gcc/config/arm/lib1funcs.asm 2008-08-28 21:51:17.000000000 -0700
+@@ -1225,11 +1225,12 @@
+ code here switches to the correct mode before executing the function. */
+
+ .text
+- .align 0
++ .align 1
+ .force_thumb
+
+ .macro call_via register
+ THUMB_FUNC_START _call_via_\register
++ .hidden SYM (_call_via_\register)
+
+ bx \register
+ nop
+@@ -1330,6 +1331,7 @@
+ .code 16
+
+ THUMB_FUNC_START _interwork_call_via_\register
++ .hidden SYM (_interwork_call_via_\register)
+
+ bx pc
+ nop
+Index: gcc-4.3.1/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/arm/t-linux 2008-08-28 21:25:24.000000000 -0700
++++ gcc-4.3.1/gcc/config/arm/t-linux 2008-08-28 21:51:17.000000000 -0700
+@@ -6,6 +6,7 @@
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _call_via_rX \
+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+
+ # 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 0000000..fb4d1a2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/cache-amnesia.patch
@@ -0,0 +1,31 @@
+---
+ gcc/configure | 2 +-
+ gcc/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: gcc-4.3.1/gcc/configure
+===================================================================
+--- gcc-4.3.1.orig/gcc/configure 2008-08-20 00:27:57.000000000 -0700
++++ gcc-4.3.1/gcc/configure 2008-08-20 00:45:11.000000000 -0700
+@@ -12813,7 +12813,7 @@ else
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
+Index: gcc-4.3.1/gcc/configure.ac
+===================================================================
+--- gcc-4.3.1.orig/gcc/configure.ac 2008-08-20 00:27:57.000000000 -0700
++++ gcc-4.3.1/gcc/configure.ac 2008-08-20 00:44:52.000000000 -0700
+@@ -1480,7 +1480,7 @@ else
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ 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 0000000..7bb8887
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/arm-unbreak-eabi-armv4t.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+
+# DP: Fix armv4t build on ARM
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
++++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
+@@ -44,7 +44,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ 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 0000000..84c5ef2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/gcc-ice-hack.dpatch
@@ -0,0 +1,331 @@
+#! /bin/sh -e
+
+# DP: Retry the build on an ice, save the calling options and preprocessed
+# DP: source when the ice is reproducible.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2004-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ * system.h (ICE_EXIT_CODE): Define.
+ * gcc.c (execute): Don't free first string early, but at the end
+ of the function. Call retry_ice if compiler exited with
+ ICE_EXIT_CODE.
+ (retry_ice): New function.
+ * diagnostic.c (diagnostic_count_diagnostic,
+ diagnostic_action_after_output, error_recursion): Exit with
+ ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
+
+--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
+@@ -244,7 +244,7 @@
+ fnotice (stderr, "Please submit a full bug report,\n"
+ "with preprocessed source if appropriate.\n"
+ "See %s for instructions.\n", bug_report_url);
+- exit (ICE_EXIT_CODE);
++ exit (FATAL_EXIT_CODE);
+
+ case DK_FATAL:
+ if (context->abort_on_error)
+--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
+@@ -357,6 +357,9 @@
+ #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
+ static const char *convert_filename (const char *, int, int);
+ #endif
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++static void retry_ice (const char *prog, const char **argv);
++#endif
+
+ static const char *getenv_spec_function (int, const char **);
+ static const char *if_exists_spec_function (int, const char **);
+@@ -2999,7 +3002,7 @@
+ }
+ }
+
+- if (string != commands[i].prog)
++ if (i && string != commands[i].prog)
+ free (CONST_CAST (char *, string));
+ }
+
+@@ -3056,6 +3059,16 @@
+ else if (WIFEXITED (status)
+ && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
+ {
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++ /* For ICEs in cc1, cc1obj, cc1plus see if it is
++ reproducible or not. */
++ char *p;
++ if (WEXITSTATUS (status) == ICE_EXIT_CODE
++ && i == 0
++ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
++ && ! strncmp (p + 1, "cc1", 3))
++ retry_ice (commands[0].prog, commands[0].argv);
++#endif
+ if (WEXITSTATUS (status) > greatest_status)
+ greatest_status = WEXITSTATUS (status);
+ ret_code = -1;
+@@ -3076,6 +3089,9 @@
+ }
+ }
+
++ if (commands[0].argv[0] != commands[0].prog)
++ free ((PTR) commands[0].argv[0]);
++
+ return ret_code;
+ }
+ }
+@@ -6016,6 +6032,224 @@
+ switches[switchnum].validated = 1;
+ }
+
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++#define RETRY_ICE_ATTEMPTS 2
++
++static void
++retry_ice (const char *prog, const char **argv)
++{
++ int nargs, out_arg = -1, quiet = 0, attempt;
++ int pid, retries, sleep_interval;
++ const char **new_argv;
++ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
++
++ if (input_filename == NULL || ! strcmp (input_filename, "-"))
++ return;
++
++ for (nargs = 0; argv[nargs] != NULL; ++nargs)
++ /* Only retry compiler ICEs, not preprocessor ones. */
++ if (! strcmp (argv[nargs], "-E"))
++ return;
++ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
++ {
++ if (out_arg == -1)
++ out_arg = nargs;
++ else
++ return;
++ }
++ /* If the compiler is going to output any time information,
++ it might vary between invocations. */
++ else if (! strcmp (argv[nargs], "-quiet"))
++ quiet = 1;
++ else if (! strcmp (argv[nargs], "-ftime-report"))
++ return;
++
++ if (out_arg == -1 || !quiet)
++ return;
++
++ memset (temp_filenames, '\0', sizeof (temp_filenames));
++ new_argv = alloca ((nargs + 3) * sizeof (const char *));
++ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
++ new_argv[nargs++] = "-frandom-seed=0";
++ new_argv[nargs] = NULL;
++ if (new_argv[out_arg][2] == '\0')
++ new_argv[out_arg + 1] = "-";
++ else
++ new_argv[out_arg] = "-o-";
++
++ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
++ {
++ int fd = -1;
++ int status;
++
++ temp_filenames[attempt * 2] = make_temp_file (".out");
++ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
++
++ if (attempt == RETRY_ICE_ATTEMPTS)
++ {
++ int i;
++ int fd1, fd2;
++ struct stat st1, st2;
++ size_t n, len;
++ char *buf;
++
++ buf = xmalloc (8192);
++
++ for (i = 0; i < 2; ++i)
++ {
++ fd1 = open (temp_filenames[i], O_RDONLY);
++ fd2 = open (temp_filenames[2 + i], O_RDONLY);
++
++ if (fd1 < 0 || fd2 < 0)
++ {
++ i = -1;
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
++ {
++ i = -1;
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ if (st1.st_size != st2.st_size)
++ {
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ len = 0;
++ for (n = st1.st_size; n; n -= len)
++ {
++ len = n;
++ if (len > 4096)
++ len = 4096;
++
++ if (read (fd1, buf, len) != (int) len
++ || read (fd2, buf + 4096, len) != (int) len)
++ {
++ i = -1;
++ break;
++ }
++
++ if (memcmp (buf, buf + 4096, len) != 0)
++ break;
++ }
++
++ close (fd1);
++ close (fd2);
++
++ if (n)
++ break;
++ }
++
++ free (buf);
++ if (i == -1)
++ break;
++
++ if (i != 2)
++ {
++ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
++ break;
++ }
++
++ fd = open (temp_filenames[attempt * 2], O_RDWR);
++ if (fd < 0)
++ break;
++ write (fd, "//", 2);
++ for (i = 0; i < nargs; i++)
++ {
++ write (fd, " ", 1);
++ write (fd, new_argv[i], strlen (new_argv[i]));
++ }
++ write (fd, "\n", 1);
++ new_argv[nargs] = "-E";
++ new_argv[nargs + 1] = NULL;
++ }
++
++ /* Fork a subprocess; wait and retry if it fails. */
++ sleep_interval = 1;
++ pid = -1;
++ for (retries = 0; retries < 4; retries++)
++ {
++ pid = fork ();
++ if (pid >= 0)
++ break;
++ sleep (sleep_interval);
++ sleep_interval *= 2;
++ }
++
++ if (pid < 0)
++ break;
++ else if (pid == 0)
++ {
++ if (attempt != RETRY_ICE_ATTEMPTS)
++ fd = open (temp_filenames[attempt * 2], O_RDWR);
++ if (fd < 0)
++ exit (-1);
++ if (fd != 1)
++ {
++ close (1);
++ dup (fd);
++ close (fd);
++ }
++
++ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
++ if (fd < 0)
++ exit (-1);
++ if (fd != 2)
++ {
++ close (2);
++ dup (fd);
++ close (fd);
++ }
++
++ if (prog == new_argv[0])
++ execvp (prog, (char *const *) new_argv);
++ else
++ execv (new_argv[0], (char *const *) new_argv);
++ exit (-1);
++ }
++
++ if (waitpid (pid, &status, 0) < 0)
++ break;
++
++ if (attempt < RETRY_ICE_ATTEMPTS
++ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
++ {
++ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
++ break;
++ }
++ else if (attempt == RETRY_ICE_ATTEMPTS)
++ {
++ close (fd);
++ if (WIFEXITED (status)
++ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
++ {
++ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
++ temp_filenames[attempt * 2]);
++ /* Make sure it is not deleted. */
++ free (temp_filenames[attempt * 2]);
++ temp_filenames[attempt * 2] = NULL;
++ break;
++ }
++ }
++ }
++
++ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
++ if (temp_filenames[attempt])
++ {
++ unlink (temp_filenames[attempt]);
++ free (temp_filenames[attempt]);
++ }
++}
++#endif
++
+ /* Search for a file named NAME trying various prefixes including the
+ user's -B prefix and some standard ones.
+ Return the absolute file name found. If nothing is found, return NAME. */
+--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
+@@ -192,6 +192,7 @@
+ build/gengtype-lex.o-warn = -Wno-error
+ # SYSCALLS.c misses prototypes
+ SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
++build/gcc.o-warn = -Wno-error
+
+ # All warnings have to be shut off in stage1 if the compiler used then
+ # 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 0000000..70c9e81
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/libstdc++-pic.dpatch
@@ -0,0 +1,71 @@
+#! /bin/sh -e
+
+# DP: Build and install libstdc++_pic.a library.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
+--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
++++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
+@@ -210,6 +210,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
+--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
++++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
+@@ -611,7 +611,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -644,6 +644,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -729,6 +730,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/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 0000000..b20fdf5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/debian/pr30961.dpatch
@@ -0,0 +1,179 @@
+#! /bin/sh -e
+
+# DP: <your description>
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+From: "H.J. Lu" <hjl@lucon.org>
+Sender: gcc-patches-owner@gcc.gnu.org
+To: gcc-patches@gcc.gnu.org
+Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
+Date: Mon, 27 Aug 2007 11:34:12 -0700
+
+We start with
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
+ (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
+ (nil)))
+
+(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
+ (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
+ (nil)))
+
+(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+we are trying to allocate registers for insn 6 and we allocate
+xmm0 for the return value. Reload doesn't check if xmm0 can be used for
+DF 59, it allocates xmm1 for DF 59 and generates:
+
+Reloads for insn # 6
+Reload 0: reload_in (DF) = (reg:DF 5 di)
+ SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
+ reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
+ reload_reg_rtx: (reg:DF 22 xmm1)
+...
+
+(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
+ (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
+ (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
+ (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+This patch tries to use the destination register when reloading for input. It
+generates
+
+Reloads for insn # 6
+Reload 0: reload_in (DF) = (reg:DF 5 di)
+ SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
+ reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
+ reload_reg_rtx: (reg:DF 21 xmm0)
+...
+(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
+ (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
+ (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
+ (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
+ (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
+
+(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+
+H.J.
+----
+gcc/
+
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/30961
+ * reload1.c (find_reg): Favor the hard register in destination
+ if it is usable and a memory location is needed for reload
+ input.
+
+gcc/testsuite/
+
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/30961
+ * gcc.target/i386/pr30961-1.c: New.
+
+--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
++++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
+@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
+ HARD_REG_SET not_usable;
+ HARD_REG_SET used_by_other_reload;
+ reg_set_iterator rsi;
++#ifdef SECONDARY_MEMORY_NEEDED
++ rtx body = PATTERN (chain->insn);
++ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
++
++ if (GET_CODE (body) == SET)
++ {
++ rtx dest = SET_DEST (body);
++
++ if ((REG_P (dest)
++ || (GET_CODE (dest) == SUBREG
++ && REG_P (SUBREG_REG (dest)))))
++ dest_reg = reg_or_subregno (dest);
++ }
++#endif
+
+ COPY_HARD_REG_SET (not_usable, bad_spill_regs);
+ IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
+@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
+ this_cost--;
+ if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
+ this_cost--;
++#ifdef SECONDARY_MEMORY_NEEDED
++ /* If a memory location is needed for rl->in and dest_reg
++ is usable, we will favor it. */
++ else if (dest_reg == regno
++ && rl->in
++ && REG_P (rl->in)
++ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
++ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
++ rl->class,
++ rl->mode))
++ this_cost = 0;
++#endif
+ if (this_cost < best_cost
+ /* Among registers with equal cost, prefer caller-saved ones, or
+ use REG_ALLOC_ORDER if it is defined. */
+--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
++++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target lp64 } */
++/* { dg-options "-O2" } */
++
++double
++convert (long long in)
++{
++ double f;
++ __builtin_memcpy( &f, &in, sizeof( in ) );
++ return f;
++}
++
++/* { 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 0000000..77655ad
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-c++-builtin-redecl.patch
@@ -0,0 +1,102 @@
+2007-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ * decl.c (duplicate_decls): When redeclaring a builtin function,
+ keep the merged decl builtin whenever types match, even if new
+ decl defines a function.
+
+ * gcc.dg/builtins-65.c: New test.
+ * g++.dg/ext/builtin10.C: New test.
+
+--- gcc/cp/decl.c.jj 2007-10-01 22:11:09.000000000 +0200
++++ gcc/cp/decl.c 2007-10-02 11:39:46.000000000 +0200
+@@ -1988,23 +1988,21 @@ duplicate_decls (tree newdecl, tree oldd
+ DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
+ DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
+ }
++ /* If redeclaring a builtin function, it stays built in. */
++ if (types_match && DECL_BUILT_IN (olddecl))
++ {
++ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
++ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
++ /* If we're keeping the built-in definition, keep the rtl,
++ regardless of declaration matches. */
++ COPY_DECL_RTL (olddecl, newdecl);
++ }
+ if (new_defines_function)
+ /* If defining a function declared with other language
+ linkage, use the previously declared language linkage. */
+ SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
+ else if (types_match)
+ {
+- /* If redeclaring a builtin function, and not a definition,
+- it stays built in. */
+- if (DECL_BUILT_IN (olddecl))
+- {
+- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+- /* If we're keeping the built-in definition, keep the rtl,
+- regardless of declaration matches. */
+- COPY_DECL_RTL (olddecl, newdecl);
+- }
+-
+ DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
+ /* Don't clear out the arguments if we're redefining a function. */
+ if (DECL_ARGUMENTS (olddecl))
+--- gcc/testsuite/gcc.dg/builtins-65.c.jj 2007-10-02 11:23:51.000000000 +0200
++++ gcc/testsuite/gcc.dg/builtins-65.c 2007-10-02 11:24:12.000000000 +0200
+@@ -0,0 +1,25 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef __SIZE_TYPE__ size_t;
++extern void __chk_fail (void);
++extern int snprintf (char *, size_t, const char *, ...);
++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
++{
++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
++ __chk_fail ();
++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
++}
++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
++
++char buf[10];
++
++int
++main (void)
++{
++ snprintf (buf, 10, "%d%d\n", 10, 10);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "mysnprintf" } } */
++/* { dg-final { scan-assembler-not "__chk_fail" } } */
+--- gcc/testsuite/g++.dg/ext/builtin10.C.jj 2007-10-02 11:19:45.000000000 +0200
++++ gcc/testsuite/g++.dg/ext/builtin10.C 2007-10-02 11:23:26.000000000 +0200
+@@ -0,0 +1,27 @@
++// { dg-do compile }
++// { dg-options "-O2" }
++
++typedef __SIZE_TYPE__ size_t;
++extern "C" {
++extern void __chk_fail (void);
++extern int snprintf (char *, size_t, const char *, ...);
++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
++{
++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
++ __chk_fail ();
++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
++}
++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
++}
++
++char buf[10];
++
++int
++main (void)
++{
++ snprintf (buf, 10, "%d%d\n", 10, 10);
++ return 0;
++}
++
++// { dg-final { scan-assembler "mysnprintf" } }
++// { 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 0000000..00d37bd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-cpp-pragma.patch
@@ -0,0 +1,284 @@
+2008-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ * c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
+ and CPP_PRAGMA_EOL.
+ * c-pragma.c (pragma_ns_name): New typedef.
+ (registered_pp_pragmas): New variable.
+ (c_pp_lookup_pragma): New function.
+ (c_register_pragma_1): If flag_preprocess_only, do nothing
+ for non-expanded pragmas, for expanded ones push pragma's
+ namespace and name into registered_pp_pragmas vector.
+ (c_invoke_pragma_handler): Register OpenMP pragmas even when
+ flag_preprocess_only, don't register GCC pch_preprocess
+ pragma if flag_preprocess_only.
+ * c-opts.c (c_common_init): Call init_pragma even if
+ flag_preprocess_only.
+ * c-pragma.c (c_pp_lookup_pragma): New prototype.
+ * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
+ cpp_register_pragma if flag_preprocess_only.
+
+ * gcc.dg/gomp/preprocess-1.c: New test.
+
+--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
++++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Preprocess only, using cpplib.
+- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
+- Free Software Foundation, Inc.
++ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
++ 2008 Free Software Foundation, Inc.
+ Written by Per Bothner, 1994-95.
+
+ This program is free software; you can redistribute it and/or modify it
+@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
+ avoid_paste = false;
+ print.source = NULL;
+ print.prev = token;
+- cpp_output_token (token, print.outf);
++ if (token->type == CPP_PRAGMA)
++ {
++ const char *space;
++ const char *name;
++
++ maybe_print_line (token->src_loc);
++ fputs ("#pragma ", print.outf);
++ c_pp_lookup_pragma (token->val.pragma, &space, &name);
++ if (space)
++ fprintf (print.outf, "%s %s", space, name);
++ else
++ fprintf (print.outf, "%s", name);
++ print.printed = 1;
++ }
++ else if (token->type == CPP_PRAGMA_EOL)
++ maybe_print_line (token->src_loc);
++ else
++ cpp_output_token (token, print.outf);
+
+ if (token->type == CPP_COMMENT)
+ account_for_newlines (token->val.str.text, token->val.str.len);
+--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
++++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
+ Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+- 2006, 2007 Free Software Foundation, Inc.
++ 2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
+
+ static VEC(pragma_handler, heap) *registered_pragmas;
+
++typedef struct
++{
++ const char *space;
++ const char *name;
++} pragma_ns_name;
++
++DEF_VEC_O (pragma_ns_name);
++DEF_VEC_ALLOC_O (pragma_ns_name, heap);
++
++static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
++
++struct omp_pragma_def { const char *name; unsigned int id; };
++static const struct omp_pragma_def omp_pragmas[] = {
++ { "atomic", PRAGMA_OMP_ATOMIC },
++ { "barrier", PRAGMA_OMP_BARRIER },
++ { "critical", PRAGMA_OMP_CRITICAL },
++ { "flush", PRAGMA_OMP_FLUSH },
++ { "for", PRAGMA_OMP_FOR },
++ { "master", PRAGMA_OMP_MASTER },
++ { "ordered", PRAGMA_OMP_ORDERED },
++ { "parallel", PRAGMA_OMP_PARALLEL },
++ { "section", PRAGMA_OMP_SECTION },
++ { "sections", PRAGMA_OMP_SECTIONS },
++ { "single", PRAGMA_OMP_SINGLE },
++ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
++};
++
++void
++c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
++{
++ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
++ int i;
++
++ for (i = 0; i < n_omp_pragmas; ++i)
++ if (omp_pragmas[i].id == id)
++ {
++ *space = "omp";
++ *name = omp_pragmas[i].name;
++ return;
++ }
++
++ if (id >= PRAGMA_FIRST_EXTERNAL
++ && (id < PRAGMA_FIRST_EXTERNAL
++ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
++ {
++ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
++ id - PRAGMA_FIRST_EXTERNAL)->space;
++ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
++ id - PRAGMA_FIRST_EXTERNAL)->name;
++ return;
++ }
++
++ gcc_unreachable ();
++}
++
+ /* Front-end wrappers for pragma registration to avoid dragging
+ cpplib.h in almost everywhere. */
+
+@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
+ {
+ unsigned id;
+
+- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
+- id = VEC_length (pragma_handler, registered_pragmas);
+- id += PRAGMA_FIRST_EXTERNAL - 1;
+-
+- /* The C++ front end allocates 6 bits in cp_token; the C front end
+- allocates 7 bits in c_token. At present this is sufficient. */
+- gcc_assert (id < 64);
++ if (flag_preprocess_only)
++ {
++ pragma_ns_name ns_name;
++
++ if (!allow_expansion)
++ return;
++
++ ns_name.space = space;
++ ns_name.name = name;
++ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
++ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
++ id += PRAGMA_FIRST_EXTERNAL - 1;
++ }
++ else
++ {
++ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
++ id = VEC_length (pragma_handler, registered_pragmas);
++ id += PRAGMA_FIRST_EXTERNAL - 1;
++
++ /* The C++ front end allocates 6 bits in cp_token; the C front end
++ allocates 7 bits in c_token. At present this is sufficient. */
++ gcc_assert (id < 64);
++ }
+
+ cpp_register_deferred_pragma (parse_in, space, name, id,
+ allow_expansion, false);
+@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
+ void
+ init_pragma (void)
+ {
+- if (flag_openmp && !flag_preprocess_only)
++ if (flag_openmp)
+ {
+- struct omp_pragma_def { const char *name; unsigned int id; };
+- static const struct omp_pragma_def omp_pragmas[] = {
+- { "atomic", PRAGMA_OMP_ATOMIC },
+- { "barrier", PRAGMA_OMP_BARRIER },
+- { "critical", PRAGMA_OMP_CRITICAL },
+- { "flush", PRAGMA_OMP_FLUSH },
+- { "for", PRAGMA_OMP_FOR },
+- { "master", PRAGMA_OMP_MASTER },
+- { "ordered", PRAGMA_OMP_ORDERED },
+- { "parallel", PRAGMA_OMP_PARALLEL },
+- { "section", PRAGMA_OMP_SECTION },
+- { "sections", PRAGMA_OMP_SECTIONS },
+- { "single", PRAGMA_OMP_SINGLE },
+- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
+- };
+-
+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
+ int i;
+
+@@ -947,8 +1002,9 @@ init_pragma (void)
+ omp_pragmas[i].id, true, true);
+ }
+
+- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
+- PRAGMA_GCC_PCH_PREPROCESS, false, false);
++ if (!flag_preprocess_only)
++ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
++ PRAGMA_GCC_PCH_PREPROCESS, false, false);
+
+ #ifdef HANDLE_PRAGMA_PACK
+ #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
+--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
++++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
+@@ -1,5 +1,5 @@
+ /* C/ObjC/C++ command line option handling.
+- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
++ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
+ Contributed by Neil Booth.
+
+@@ -1239,6 +1239,9 @@ c_common_init (void)
+ if (version_flag)
+ c_common_print_pch_checksum (stderr);
+
++ /* Has to wait until now so that cpplib has its hash table. */
++ init_pragma ();
++
+ if (flag_preprocess_only)
+ {
+ finish_options ();
+@@ -1246,9 +1249,6 @@ c_common_init (void)
+ return false;
+ }
+
+- /* Has to wait until now so that cpplib has its hash table. */
+- init_pragma ();
+-
+ return true;
+ }
+
+--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
++++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Pragma related interfaces.
+ Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+- 2007 Free Software Foundation, Inc.
++ 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
+ extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
+ int);
+
++extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
++
+ #endif /* GCC_C_PRAGMA_H */
+--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
++++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
+@@ -892,8 +892,9 @@ enum machopic_addr_class {
+
+ #define DARWIN_REGISTER_TARGET_PRAGMAS() \
+ do { \
+- cpp_register_pragma (parse_in, NULL, "mark", \
+- darwin_pragma_ignore, false); \
++ if (!flag_preprocess_only) \
++ cpp_register_pragma (parse_in, NULL, "mark", \
++ darwin_pragma_ignore, false); \
+ c_register_pragma (0, "options", darwin_pragma_options); \
+ c_register_pragma (0, "segment", darwin_pragma_ignore); \
+ c_register_pragma (0, "unused", darwin_pragma_unused); \
+--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
++++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
+@@ -0,0 +1,16 @@
++/* { dg-do preprocess } */
++
++void foo (void)
++{
++ int i1, j1, k1;
++#define p parallel
++#define P(x) private (x##1)
++#define S(x) shared (x##1)
++#define F(x) firstprivate (x##1)
++#pragma omp p P(i) \
++ S(j) \
++ F(k)
++ ;
++}
++
++/* { 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 0000000..2ad3b24
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-i386-libgomp.patch
@@ -0,0 +1,61 @@
+Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
+hardware isn't supported because NPTL doesn't support it anyway.
+
+--- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
++++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
+@@ -44,14 +44,14 @@ if test $enable_linux_futex = yes; then
+ ;;
+
+ # Note that bare i386 is not included here. We need cmpxchg.
+- i[456]86-*-linux*)
++ i[3456]86-*-linux*)
+ config_path="linux/x86 linux posix"
+ case " ${CC} ${CFLAGS} " in
+ *" -m64 "*)
+ ;;
+ *)
+ if test -z "$with_arch"; then
+- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+ fi
+ esac
+ ;;
+@@ -63,7 +63,7 @@ if test $enable_linux_futex = yes; then
+ config_path="linux/x86 linux posix"
+ case " ${CC} ${CFLAGS} " in
+ *" -m32 "*)
+- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+ ;;
+ esac
+ ;;
+--- libstdc++-v3/libsupc++/guard.cc.jj 2008-03-01 00:58:24.000000000 +0100
++++ libstdc++-v3/libsupc++/guard.cc 2008-03-27 14:08:44.000000000 +0100
+@@ -35,6 +35,27 @@
+ #include <new>
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
++#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
++# define _GLIBCXX_ATOMIC_BUILTINS 1
++# define __sync_val_compare_and_swap(a, b, c) \
++ ({ \
++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
++ int sltas; \
++ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
++ : "=a" (sltas) \
++ : "r" (a), "0" (b), "r" (c) : "memory"); \
++ sltas; \
++ })
++# define __sync_lock_test_and_set(a, b) \
++ ({ \
++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
++ int sltas; \
++ __asm __volatile ("xchgl (%1), %0" \
++ : "=r" (sltas) \
++ : "r" (a), "0" (b) : "memory"); \
++ sltas; \
++ })
++#endif
+ #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
+ && defined(_GLIBCXX_ATOMIC_BUILTINS) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
+ # 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 0000000..8e10979
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ia64-libunwind.patch
@@ -0,0 +1,538 @@
+2004-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ * config.gcc (ia64*-*-linux*): If native and libelf is installed,
+ use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
+ fragments.
+ * config/ia64/t-glibc-no-libunwind: New file.
+ * config/ia64/change-symver.c: New file.
+ * config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
+ define _Unwind_* to __symverglobal_Unwind_*.
+ (alias): Undefine.
+ (symverglobal): Define. Use it on _Unwind_*.
+ * config/ia64/mkmap-symver-multi.awk: New file.
+ * config/ia64/libgcc-ia64-no-libunwind.ver: New file.
+
+--- gcc/config.gcc.jj 2004-10-04 08:55:44.000000000 -0400
++++ gcc/config.gcc 2004-11-13 05:23:50.000000000 -0500
+@@ -1185,9 +1185,16 @@ ia64*-*-freebsd*)
+ ;;
+ ia64*-*-linux*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
+- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
+- if test x$with_system_libunwind != xyes ; then
+- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
++ tmake_file="${tmake_file} ia64/t-ia64"
++ if test x${target} = x${host} && test x${target} = x${build} \
++ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
++ && test -f /usr/lib/libelf.so; then
++ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
++ else
++ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
++ if test x$with_system_libunwind != xyes ; then
++ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
++ fi
+ fi
+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
+--- gcc/config/ia64/t-glibc-no-libunwind.jj 2004-02-18 10:27:36.000000000 -0500
++++ gcc/config/ia64/t-glibc-no-libunwind 2004-11-15 09:56:33.000000000 -0500
+@@ -0,0 +1,30 @@
++# Don't use system libunwind library on IA-64 GLIBC based system,
++# but make _Unwind_* symbols unversioned, so that created programs
++# are usable even when libgcc_s uses libunwind.
++LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
++SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
++SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
++
++SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
++ -Wl,--soname=$(SHLIB_SONAME) \
++ -Wl,--version-script=$(SHLIB_MAP) \
++ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
++ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
++ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
++ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
++ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
++ else true; fi && \
++ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
++ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
++ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
++ GCC_3.4.2 _GLOBAL_ \
++ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
++ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
++ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
++ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
++ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
++ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
++ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
++ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
++
++TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
+--- gcc/config/ia64/change-symver.c.jj 2004-02-18 10:27:36.000000000 -0500
++++ gcc/config/ia64/change-symver.c 2004-11-13 05:23:50.000000000 -0500
+@@ -0,0 +1,211 @@
++#define _GNU_SOURCE 1
++#define _FILE_OFFSET_BITS 64
++#include <endian.h>
++#include <errno.h>
++#include <error.h>
++#include <fcntl.h>
++#include <fnmatch.h>
++#include <gelf.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
++int
++compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
++{
++ if (strcmp (name, "_GLOBAL_") == 0)
++ return 1;
++
++ int cnt;
++ size_t offset = 0;
++ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
++ {
++ GElf_Verdef defmem;
++ GElf_Verdef *def;
++ GElf_Verdaux auxmem;
++ GElf_Verdaux *aux;
++ unsigned int auxoffset;
++
++ /* Get the data at the next offset. */
++ def = gelf_getverdef (verd, offset, &defmem);
++ if (def == NULL)
++ break;
++
++ auxoffset = offset + def->vd_aux;
++ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
++ if (aux == NULL)
++ break;
++
++ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
++ aux->vda_name)) == 0)
++ return def->vd_ndx;
++
++ /* Find the next offset. */
++ offset += def->vd_next;
++ }
++
++ return -1;
++}
++
++int
++main (int argc, char **argv)
++{
++ if (argc < 4)
++ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
++
++ const char *fname = argv[1];
++
++ /* Open the file. */
++ int fd;
++ fd = open (fname, O_RDWR);
++ if (fd == -1)
++ error (1, errno, fname);
++
++ elf_version (EV_CURRENT);
++
++ /* Now get the ELF descriptor. */
++ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
++ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
++ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
++
++ size_t shstrndx;
++ /* Get the section header string table index. */
++ if (elf_getshstrndx (elf, &shstrndx) < 0)
++ error (1, 0, "cannot get shstrndx from %s", fname);
++
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr;
++
++ /* We need the ELF header in a few places. */
++ ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr == NULL)
++ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
++
++ Elf_Scn *scn = NULL;
++ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
++ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
++
++ while ((scn = elf_nextscn (elf, scn)) != NULL)
++ {
++ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
++
++ if (shdr == NULL)
++ error (1, 0, "couldn't get shdr from %s", fname);
++
++ if ((shdr->sh_flags & SHF_ALLOC) != 0)
++ {
++ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
++ Elf_Data **p;
++
++ if (strcmp (name, ".gnu.version") == 0)
++ {
++ p = &ver;
++ ver_shdr = *shdr;
++ }
++ else if (strcmp (name, ".gnu.version_d") == 0)
++ {
++ p = &verd;
++ verd_shdr = *shdr;
++ }
++ else if (strcmp (name, ".dynsym") == 0)
++ {
++ p = &dynsym;
++ dynsym_shdr = *shdr;
++ }
++ else
++ continue;
++
++ if (*p != NULL)
++ error (1, 0, "Two %s sections in %s", name, fname);
++ *p = elf_getdata (scn, NULL);
++ if (*p == NULL || elf_getdata (scn, *p) != NULL)
++ error (1, 0, "No data or non-contiguous data in %s section in %s",
++ name, fname);
++ }
++ }
++
++ if (ver == NULL || verd == NULL || dynsym == NULL)
++ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
++
++ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
++ if (from_idx == -1)
++ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
++
++ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
++ if (to_idx == -1)
++ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
++
++ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
++ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
++ || ver_shdr.sh_entsize != 2
++ || (ver_shdr.sh_size & 1)
++ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
++ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
++
++ size_t nentries = ver_shdr.sh_size / 2;
++ size_t cnt;
++ GElf_Versym array[nentries];
++ for (cnt = 0; cnt < nentries; ++cnt)
++ {
++ GElf_Versym vsymmem;
++ GElf_Versym *vsym;
++
++ vsym = gelf_getversym (ver, cnt, &vsymmem);
++ if (vsym == NULL)
++ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
++
++ array[cnt] = *vsym;
++ if (*vsym != from_idx)
++ continue;
++
++ GElf_Sym sym_mem;
++ GElf_Sym *sym;
++ sym = gelf_getsym (dynsym, cnt, &sym_mem);
++ if (sym == NULL)
++ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
++
++ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
++
++ int argn;
++ for (argn = 4; argn < argc; ++argn)
++ if (fnmatch (argv[argn], name, 0) == 0)
++ {
++ array[cnt] = to_idx;
++ break;
++ }
++ }
++
++ if (sizeof (array[0]) != 2)
++ abort ();
++
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
++ ;
++ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
++#elif __BYTE_ORDER == __BIG_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
++ ;
++ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
++#else
++# error Unsupported endianity
++#endif
++ {
++ for (cnt = 0; cnt < nentries; ++cnt)
++ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
++ }
++ else
++ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
++
++ if (elf_end (elf) != 0)
++ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
++
++ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
++ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
++ fname);
++
++ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
++ error (1, 0, "failed to write .gnu.version section into %s", fname);
++
++ close (fd);
++ return 0;
++}
+--- gcc/config/ia64/unwind-ia64.c.jj 2004-10-04 08:55:57.000000000 -0400
++++ gcc/config/ia64/unwind-ia64.c 2004-11-15 09:07:45.000000000 -0500
+@@ -51,6 +51,51 @@
+ #define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
+ #define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
+
++#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
++extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
++ (_Unwind_Trace_Fn, void *);
++extern void __symverglobal_Unwind_DeleteException
++ (struct _Unwind_Exception *);
++extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
++ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
++extern _Unwind_Word __symverglobal_Unwind_GetCFA
++ (struct _Unwind_Context *);
++extern _Unwind_Word __symverglobal_Unwind_GetBSP
++ (struct _Unwind_Context *);
++extern _Unwind_Word __symverglobal_Unwind_GetGR
++ (struct _Unwind_Context *, int );
++extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
++extern void *__symverglobal_Unwind_GetLanguageSpecificData
++ (struct _Unwind_Context *);
++extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
++ (struct _Unwind_Context *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
++ (struct _Unwind_Exception *);
++extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
++ (struct _Unwind_Exception *);
++extern void __symverglobal_Unwind_SetGR
++ (struct _Unwind_Context *, int, _Unwind_Word);
++extern void __symverglobal_Unwind_SetIP
++ (struct _Unwind_Context *, _Unwind_Ptr);
++#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
++#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
++#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
++#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
++#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
++#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
++#define _Unwind_GetGR __symverglobal_Unwind_GetGR
++#define _Unwind_GetIP __symverglobal_Unwind_GetIP
++#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
++#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
++#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
++#define _Unwind_Resume __symverglobal_Unwind_Resume
++#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
++#define _Unwind_SetGR __symverglobal_Unwind_SetGR
++#define _Unwind_SetIP __symverglobal_Unwind_SetIP
++#endif
++
+ enum unw_application_register
+ {
+ UNW_AR_BSP,
+@@ -2402,4 +2447,44 @@ alias (_Unwind_SetGR);
+ alias (_Unwind_SetIP);
+ #endif
+
++#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
++#undef alias
++#define symverglobal(name, version) \
++__typeof (__symverglobal##name) __symverlocal##name \
++ __attribute__ ((alias ("__symverglobal" #name))); \
++__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
++__asm__ (".symver __symverlocal" #name"," #name "@" #version)
++
++#undef _Unwind_Backtrace
++#undef _Unwind_DeleteException
++#undef _Unwind_FindEnclosingFunction
++#undef _Unwind_ForcedUnwind
++#undef _Unwind_GetBSP
++#undef _Unwind_GetCFA
++#undef _Unwind_GetGR
++#undef _Unwind_GetIP
++#undef _Unwind_GetLanguageSpecificData
++#undef _Unwind_GetRegionStart
++#undef _Unwind_RaiseException
++#undef _Unwind_Resume
++#undef _Unwind_Resume_or_Rethrow
++#undef _Unwind_SetGR
++#undef _Unwind_SetIP
++symverglobal (_Unwind_Backtrace, GCC_3.3);
++symverglobal (_Unwind_DeleteException, GCC_3.0);
++symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
++symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
++symverglobal (_Unwind_GetBSP, GCC_3.3.2);
++symverglobal (_Unwind_GetCFA, GCC_3.3);
++symverglobal (_Unwind_GetGR, GCC_3.0);
++symverglobal (_Unwind_GetIP, GCC_3.0);
++symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
++symverglobal (_Unwind_GetRegionStart, GCC_3.0);
++symverglobal (_Unwind_RaiseException, GCC_3.0);
++symverglobal (_Unwind_Resume, GCC_3.0);
++symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
++symverglobal (_Unwind_SetGR, GCC_3.0);
++symverglobal (_Unwind_SetIP, GCC_3.0);
++#endif
++
+ #endif
+--- gcc/config/ia64/mkmap-symver-multi.awk.jj 2004-02-18 10:27:36.000000000 -0500
++++ gcc/config/ia64/mkmap-symver-multi.awk 2004-11-15 09:46:50.000000000 -0500
+@@ -0,0 +1,133 @@
++# Generate an ELF symbol version map a-la Solaris and GNU ld.
++# Contributed by Richard Henderson <rth@cygnus.com>
++#
++# This file is part of GCC.
++#
++# GCC is free software; you can redistribute it and/or modify it under
++# the terms of the GNU General Public License as published by the Free
++# Software Foundation; either version 2, or (at your option) any later
++# version.
++#
++# GCC is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
++# License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GCC; see the file COPYING. If not, write to the Free
++# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301, USA.
++
++BEGIN {
++ state = "nm";
++ sawsymbol = 0;
++}
++
++# Remove comment and blank lines.
++/^ *#/ || /^ *$/ {
++ next;
++}
++
++# We begin with nm input. Collect the set of symbols that are present
++# so that we can not emit them into the final version script -- Solaris
++# complains at us if we do.
++
++state == "nm" && /^%%/ {
++ state = "ver";
++ next;
++}
++
++state == "nm" && ($1 == "U" || $2 == "U") {
++ next;
++}
++
++state == "nm" && NF == 3 {
++ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
++ def[$3] = 1
++ tl=$3
++ sub(/^.*@/,"",tl)
++ ver[$3] = tl
++ } else {
++ sub(/@@?GCC_[0-9.]*$/,"",$3)
++ def[$3] = 1;
++ }
++ sawsymbol = 1;
++ next;
++}
++
++state == "nm" {
++ next;
++}
++
++# Now we process a simplified variant of the Solaris symbol version
++# script. We have one symbol per line, no semicolons, simple markers
++# for beginning and ending each section, and %inherit markers for
++# describing version inheritence. A symbol may appear in more than
++# one symbol version, and the last seen takes effect.
++
++NF == 3 && $1 == "%inherit" {
++ inherit[$2] = $3;
++ next;
++}
++
++NF == 2 && $2 == "{" {
++ libs[$1] = 1;
++ thislib = $1;
++ next;
++}
++
++$1 == "}" {
++ thislib = "";
++ next;
++}
++
++{
++ ver[$1] = thislib;
++ next;
++}
++
++END {
++ if (!sawsymbol)
++ {
++ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
++ exit 1;
++ }
++ for (l in libs)
++ output(l);
++}
++
++function output(lib) {
++ if (done[lib])
++ return;
++ done[lib] = 1;
++ if (inherit[lib])
++ output(inherit[lib]);
++
++ empty=1
++ for (sym in ver)
++ if ((ver[sym] == lib) && (sym in def))
++ {
++ if (empty)
++ {
++ printf("%s {\n", lib);
++ printf(" global:\n");
++ empty = 0;
++ }
++ symp = sym;
++ sub(/@GCC_[0-9.]*$/,"",symp);
++ printf("\t%s;\n", symp);
++ if (dotsyms)
++ printf("\t.%s;\n", symp);
++ }
++
++ if (empty)
++ {
++ for (l in libs)
++ if (inherit[l] == lib)
++ inherit[l] = inherit[lib];
++ }
++ else if (inherit[lib])
++ printf("} %s;\n", inherit[lib]);
++ else
++ printf ("\n local:\n\t*;\n};\n");
++}
+--- gcc/config/ia64/libgcc-ia64-no-libunwind.ver.jj 2004-02-18 10:27:36.000000000 -0500
++++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2004-11-15 09:19:56.000000000 -0500
+@@ -0,0 +1,17 @@
++GCC_3.4.2 {
++ _Unwind_GetGR
++ _Unwind_RaiseException
++ _Unwind_GetRegionStart
++ _Unwind_SetIP
++ _Unwind_GetIP
++ _Unwind_GetLanguageSpecificData
++ _Unwind_Resume
++ _Unwind_DeleteException
++ _Unwind_SetGR
++ _Unwind_ForcedUnwind
++ _Unwind_Backtrace
++ _Unwind_FindEnclosingFunction
++ _Unwind_GetCFA
++ _Unwind_Resume_or_Rethrow
++ _Unwind_GetBSP
++}
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 0000000..63a1b50
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-debug-iface-type.patch
@@ -0,0 +1,17 @@
+2008-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * lang.c (java_classify_record): Revert 2007-12-20 change.
+
+--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
++++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
+@@ -965,9 +965,7 @@ java_classify_record (tree type)
+ if (! CLASS_P (type))
+ return RECORD_IS_STRUCT;
+
+- /* ??? GDB does not support DW_TAG_interface_type as of December,
+- 2007. Re-enable this at a later time. */
+- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
++ if (CLASS_INTERFACE (TYPE_NAME (type)))
+ return RECORD_IS_INTERFACE;
+
+ 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 0000000..f07ead8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-java-nomulti.patch
@@ -0,0 +1,44 @@
+--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100
++++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100
+@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode,
+ [allow rebuilding of .class and .h files]))
+ AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+
++AC_ARG_ENABLE(libjava-multilib,
++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+ GCC_NO_EXECUTABLES
+
+--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100
++++ libjava/configure 2007-12-07 18:39:58.000000000 +0100
+@@ -1018,6 +1018,8 @@ Optional Features:
+ --enable-gconf-peer compile GConf native peers for util.preferences
+ --enable-java-maintainer-mode
+ allow rebuilding of .class and .h files
++ --enable-libjava-multilib
++ build libjava as multilib
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+@@ -1848,6 +1850,16 @@ else
+ fi
+
+
++# Check whether --enable-libjava-multilib was given.
++if test "${enable_libjava_multilib+set}" = set; then
++ enableval=$enable_libjava_multilib;
++fi
++
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+
+
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 0000000..da85e55
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-libgomp-speedup.patch
@@ -0,0 +1,2797 @@
+2008-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ * config/linux/sparc/futex.h (atomic_write_barrier): Fix membar
+ argument.
+
+2008-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_team_state): Remove single_count field
+ ifndef HAVE_SYNC_BUILTINS.
+ (struct gomp_team): Likewise. Add work_share_list_free_lock
+ ifndef HAVE_SYNC_BUILTINS.
+ * team.c (gomp_new_team): If HAVE_SYNC_BUILTINS is not defined,
+ don't initialize single_count, but instead initialize
+ work_share_list_free_lock.
+ (free_team): Destroy work_share_list_free_lock ifndef
+ HAVE_SYNC_BUILTINS.
+ (gomp_team_start): Don't initialize ts.single_count ifndef
+ HAVE_SYNC_BUILTINS.
+ * work.c (alloc_work_share, free_work_share): Use
+ work_share_list_free_lock instead of atomic chaining ifndef
+ HAVE_SYNC_BUILTINS.
+
+2008-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ * loop.c (gomp_loop_init): Fix GFS_DYNAMIC ws->mode setting.
+ * testsuite/libgomp.c/loop-4.c: New test.
+
+ * libgomp.h (struct gomp_team_state): Add single_count field.
+ (struct gomp_team): Likewise.
+ * team.c (gomp_new_team): Clear single_count.
+ (gomp_team_start): Likewise.
+ * single.c (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.
+
+2008-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ * team.c (gomp_thread_start): Don't clear ts.static_trip here.
+ * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
+ ts.static_trip here.
+ * work.c (gomp_work_share_start): Don't clear ts.static_trip here.
+
+2008-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h: Include ptrlock.h.
+ (struct gomp_work_share): Reshuffle fields. Add next_alloc,
+ next_ws, next_free and inline_ordered_team_ids fields, change
+ ordered_team_ids into pointer from flexible array member.
+ (struct gomp_team_state): Add last_work_share field, remove
+ work_share_generation.
+ (struct gomp_team): Remove work_share_lock, generation_mask,
+ oldest_live_gen, num_live_gen and init_work_shares fields, add
+ work work_share_list_alloc, work_share_list_free and work_share_chunk
+ fields. Change work_shares from pointer to pointers into an array.
+ (gomp_new_team): New prototype.
+ (gomp_team_start): Change type of last argument.
+ (gomp_new_work_share): Removed.
+ (gomp_init_work_share, gomp_fini_work_share): New prototypes.
+ (gomp_work_share_init_done): New static inline.
+ * team.c (gomp_thread_start): Clear ts.last_work_share, don't clear
+ ts.work_share_generation.
+ (new_team): Removed.
+ (gomp_new_team): New function.
+ (free_team): Free gomp_work_share blocks chained through next_alloc,
+ instead of freeing work_shares and destroying work_share_lock.
+ (gomp_team_start): Change last argument from ws to team, don't create
+ new team, set ts.work_share to &team->work_shares[0] and clear
+ ts.last_work_share. Don't clear ts.work_share_generation.
+ (gomp_team_end): Call gomp_fini_work_share.
+ * work.c (gomp_new_work_share): Removed.
+ (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
+ functions.
+ (free_work_share): Add team argument. Call gomp_fini_work_share
+ and then either free ws if orphaned, or put it into
+ work_share_list_free list of the current team.
+ (gomp_work_share_start, gomp_work_share_end,
+ gomp_work_share_end_nowait): Rewritten.
+ * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
+ after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
+ gomp_iter_dynamic_next instead of the _locked variant and don't take
+ lock around it, otherwise acquire it before calling
+ gomp_iter_dynamic_next_locked.
+ (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
+ gomp_iter_dynamic_next instead of the _locked variant and don't take
+ lock around it.
+ (GOMP_parallel_sections_start): Call gomp_new_team instead of
+ gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
+ Adjust gomp_team_start caller.
+ * loop.c (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
+ gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
+ (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
+ gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
+ don't unlock ws->lock, otherwise lock it.
+ (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
+ gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
+ (gomp_parallel_loop_start): Call gomp_new_team instead of
+ gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
+ Adjust gomp_team_start caller.
+ * single.c (GOMP_single_start, GOMP_single_copy_start): Call
+ gomp_work_share_init_done if gomp_work_share_start returned true.
+ Don't unlock ws->lock.
+ * parallel.c (GOMP_parallel_start): Call gomp_new_team and pass that
+ as last argument to gomp_team_start.
+ * config/linux/ptrlock.c: New file.
+ * config/linux/ptrlock.h: New file.
+ * config/posix/ptrlock.c: New file.
+ * config/posix/ptrlock.h: New file.
+ * Makefile.am (libgomp_la_SOURCES): Add ptrlock.c.
+ * Makefile.in: Regenerated.
+ * testsuite/Makefile.in: Regenerated.
+
+2008-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (gomp_active_wait_policy): Remove decl.
+ (gomp_throttled_spin_count_var, gomp_available_cpus,
+ gomp_managed_threads): New extern decls.
+ * team.c (gomp_team_start, gomp_team_end): If number of threads
+ changed, adjust atomically gomp_managed_threads.
+ * env.c (gomp_active_wait_policy, gomp_block_time_var): Remove.
+ (gomp_throttled_spin_count_var, gomp_available_cpus,
+ gomp_managed_threads): New variables.
+ (parse_millis): Removed.
+ (parse_spincount): New function.
+ (parse_wait_policy): Return -1/0/1 instead of setting
+ gomp_active_wait_policy.
+ (initialize_env): Call gomp_init_num_threads unconditionally.
+ Initialize gomp_available_cpus. Call parse_spincount instead
+ of parse_millis, initialize gomp_{,throttled_}spin_count_var
+ depending on presence and value of OMP_WAIT_POLICY and
+ GOMP_SPINCOUNT env vars.
+ * config/linux/wait.h (do_wait): Use gomp_throttled_spin_count_var
+ instead of gomp_spin_count_var if gomp_managed_threads >
+ gomp_available_cpus.
+
+ * config/linux/wait.h: Include errno.h.
+ (FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Define.
+ (gomp_futex_wake, gomp_futex_wait): New extern decls.
+ * config/linux/mutex.c (gomp_futex_wake, gomp_futex_wait): New
+ variables.
+ * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+
+2008-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_work_share): Add mode field. Put lock and
+ next into a different cache line from most of the write-once fields.
+ * loop.c: Include limits.h.
+ (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
+ If adding ws->chunk_size nthreads + 1 times after end won't
+ overflow, set ws->mode to 1.
+ * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
+ ws->chunk_size by incr.
+ (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
+ code.
+ * work.c: Include stddef.h.
+ (gomp_new_work_share): Use offsetof rather than sizeof.
+
+2008-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_team): Change ordered_release field
+ into gomp_sem_t ** from flexible array member. Add implicit_task
+ and initial_work_shares fields.
+ (gomp_new_task): Removed.
+ (gomp_init_task): New prototype.
+ * team.c (new_team): Allocate implicit_task for each thread
+ and initial work_shares together with gomp_team allocation.
+ (free_team): Only free work_shares if it is not init_work_shares.
+ (gomp_team_start): Use gomp_init_task instead of gomp_new_task,
+ set thr->task to the corresponding implicit_task array entry.
+ * task.c (gomp_new_task): Removed.
+ (gomp_init_task): New function.
+ (gomp_end_task): Don't free the task.
+ (GOMP_task): Allocate struct gomp_task on the stack, call
+ gomp_init_task rather than gomp_new_task.
+ * work.c (gomp_work_share_start): If work_shares ==
+ init_work_shares, gomp_malloc + memcpy rather than gomp_realloc.
+
+2008-03-15 Jakub Jelinek <jakub@redhat.com>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * config/linux/bar.h (gomp_barrier_state_t): Rewritten.
+ (gomp_barrier_state_t): Change to unsigned int.
+ (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
+ gomp_barrier_wait_start, gomp_barrier_last_thread): Rewritten.
+ (gomp_barrier_wait_last): Prototype rather than inline.
+ * config/linux/bar.c (gomp_barrier_wait_end): Rewritten.
+ (gomp_barrier_wait_last): New function.
+
+2008-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ * team.c (gomp_thread_start): Use gomp_barrier_wait_last instead
+ of gomp_barrier_wait.
+ * env.c (gomp_block_time_var, gomp_spin_count_var): New variables.
+ (parse_millis): New function.
+ (initialize_env): Handle GOMP_BLOCKTIME env var.
+ * libgomp.h (struct gomp_team): Move close to the end of the struct.
+ (gomp_spin_count_var): New extern var decl.
+ * work.c (gomp_work_share_end): Use gomp_barrier_state_t bstate
+ var instead of bool last, call gomp_barrier_last_thread to check
+ for last thread, pass bstate to gomp_barrier_wait_end.
+ * config/linux/wait.h: New file.
+ * config/linux/mutex.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
+ * config/linux/bar.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t. Call do_wait instead of futex_wait.
+ * config/linux/sem.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
+ * config/linux/lock.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
+ * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
+ * config/linux/bar.h (gomp_barrier_state_t): New typedef.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t.
+ (gomp_barrier_wait_start): Return gomp_barrier_state_t.
+ (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
+ inlines.
+ * config/linux/powerpc/futex.h (cpu_relax, atomic_write_barrier): New
+ static inlines.
+ * config/linux/alpha/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/x86/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/s390/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/ia64/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/sparc/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/posix/bar.c (gomp_barrier_wait_end): Change second argument
+ to gomp_barrier_state_t.
+ * config/posix/bar.h (gomp_barrier_state_t): New typedef.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t.
+ (gomp_barrier_wait_start): Return gomp_barrier_state_t.
+ (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
+ inlines.
+
+--- libgomp/parallel.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/parallel.c 2008-03-26 15:32:06.000000000 +0100
+@@ -68,7 +68,7 @@ void
+ GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
+ {
+ num_threads = gomp_resolve_num_threads (num_threads);
+- gomp_team_start (fn, data, num_threads, NULL);
++ gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
+ }
+
+ void
+--- libgomp/sections.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/sections.c 2008-03-26 15:33:06.000000000 +0100
+@@ -59,14 +59,24 @@ GOMP_sections_start (unsigned count)
+ long s, e, ret;
+
+ if (gomp_work_share_start (false))
+- gomp_sections_init (thr->ts.work_share, count);
++ {
++ gomp_sections_init (thr->ts.work_share, count);
++ gomp_work_share_init_done ();
++ }
+
++#ifdef HAVE_SYNC_BUILTINS
++ if (gomp_iter_dynamic_next (&s, &e))
++ ret = s;
++ else
++ ret = 0;
++#else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ if (gomp_iter_dynamic_next_locked (&s, &e))
+ ret = s;
+ else
+ ret = 0;
+-
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
++#endif
+
+ return ret;
+ }
+@@ -83,15 +93,23 @@ GOMP_sections_start (unsigned count)
+ unsigned
+ GOMP_sections_next (void)
+ {
+- struct gomp_thread *thr = gomp_thread ();
+ long s, e, ret;
+
++#ifdef HAVE_SYNC_BUILTINS
++ if (gomp_iter_dynamic_next (&s, &e))
++ ret = s;
++ else
++ ret = 0;
++#else
++ struct gomp_thread *thr = gomp_thread ();
++
+ gomp_mutex_lock (&thr->ts.work_share->lock);
+ if (gomp_iter_dynamic_next_locked (&s, &e))
+ ret = s;
+ else
+ ret = 0;
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
++#endif
+
+ return ret;
+ }
+@@ -103,15 +121,15 @@ void
+ GOMP_parallel_sections_start (void (*fn) (void *), void *data,
+ unsigned num_threads, unsigned count)
+ {
+- struct gomp_work_share *ws;
++ struct gomp_team *team;
+
+ num_threads = gomp_resolve_num_threads (num_threads);
+ if (gomp_dyn_var && num_threads > count)
+ num_threads = count;
+
+- ws = gomp_new_work_share (false, num_threads);
+- gomp_sections_init (ws, count);
+- gomp_team_start (fn, data, num_threads, ws);
++ team = gomp_new_team (num_threads);
++ gomp_sections_init (&team->work_shares[0], count);
++ gomp_team_start (fn, data, num_threads, team);
+ }
+
+ /* The GOMP_section_end* routines are called after the thread is told
+--- libgomp/env.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/env.c 2008-03-26 16:40:26.000000000 +0100
+@@ -44,6 +44,11 @@ enum gomp_schedule_type gomp_run_sched_v
+ unsigned long gomp_run_sched_chunk = 1;
+ unsigned short *gomp_cpu_affinity;
+ size_t gomp_cpu_affinity_len;
++#ifndef HAVE_SYNC_BUILTINS
++gomp_mutex_t gomp_remaining_threads_lock;
++#endif
++unsigned long gomp_available_cpus = 1, gomp_managed_threads = 1;
++unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
+
+ /* Parse the OMP_SCHEDULE environment variable. */
+
+@@ -147,6 +152,79 @@ parse_unsigned_long (const char *name, u
+ return false;
+ }
+
++/* Parse the GOMP_SPINCOUNT environment varible. Return true if one was
++ present and it was successfully parsed. */
++
++static bool
++parse_spincount (const char *name, unsigned long long *pvalue)
++{
++ char *env, *end;
++ unsigned long long value, mult = 1;
++
++ env = getenv (name);
++ if (env == NULL)
++ return false;
++
++ while (isspace ((unsigned char) *env))
++ ++env;
++ if (*env == '\0')
++ goto invalid;
++
++ if (strncasecmp (env, "infinite", 8) == 0
++ || strncasecmp (env, "infinity", 8) == 0)
++ {
++ value = ~0ULL;
++ end = env + 8;
++ goto check_tail;
++ }
++
++ errno = 0;
++ value = strtoull (env, &end, 10);
++ if (errno)
++ goto invalid;
++
++ while (isspace ((unsigned char) *end))
++ ++end;
++ if (*end != '\0')
++ {
++ switch (tolower (*end))
++ {
++ case 'k':
++ mult = 1000LL;
++ break;
++ case 'm':
++ mult = 1000LL * 1000LL;
++ break;
++ case 'g':
++ mult = 1000LL * 1000LL * 1000LL;
++ break;
++ case 't':
++ mult = 1000LL * 1000LL * 1000LL * 1000LL;
++ break;
++ default:
++ goto invalid;
++ }
++ ++end;
++ check_tail:
++ while (isspace ((unsigned char) *end))
++ ++end;
++ if (*end != '\0')
++ goto invalid;
++ }
++
++ if (value > ~0ULL / mult)
++ value = ~0ULL;
++ else
++ value *= mult;
++
++ *pvalue = value;
++ return true;
++
++ invalid:
++ gomp_error ("Invalid value for environment variable %s", name);
++ return false;
++}
++
+ /* Parse a boolean value for environment variable NAME and store the
+ result in VALUE. */
+
+@@ -281,10 +359,25 @@ initialize_env (void)
+ parse_schedule ();
+ parse_boolean ("OMP_DYNAMIC", &gomp_dyn_var);
+ parse_boolean ("OMP_NESTED", &gomp_nest_var);
++ gomp_init_num_threads ();
++ gomp_available_cpus = gomp_nthreads_var;
+ if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
+- gomp_init_num_threads ();
++ gomp_nthreads_var = gomp_available_cpus;
+ if (parse_affinity ())
+ gomp_init_affinity ();
++ if (!parse_spincount ("GOMP_SPINCOUNT", &gomp_spin_count_var))
++ {
++ /* Using a rough estimation of 100000 spins per msec,
++ use 200 msec blocking.
++ Depending on the CPU speed, this can be e.g. 5 times longer
++ or 5 times shorter. */
++ gomp_spin_count_var = 20000000LL;
++ }
++ /* gomp_throttled_spin_count_var is used when there are more libgomp
++ managed threads than available CPUs. Use very short spinning. */
++ gomp_throttled_spin_count_var = 100LL;
++ if (gomp_throttled_spin_count_var > gomp_spin_count_var)
++ gomp_throttled_spin_count_var = gomp_spin_count_var;
+
+ /* Not strictly environment related, but ordering constructors is tricky. */
+ pthread_attr_init (&gomp_thread_attr);
+--- libgomp/libgomp.h.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/libgomp.h 2008-03-27 12:21:51.000000000 +0100
+@@ -50,6 +50,7 @@
+ #include "sem.h"
+ #include "mutex.h"
+ #include "bar.h"
++#include "ptrlock.h"
+
+
+ /* This structure contains the data to control one work-sharing construct,
+@@ -70,6 +71,8 @@ struct gomp_work_share
+ If this is a SECTIONS construct, this value will always be DYNAMIC. */
+ enum gomp_schedule_type sched;
+
++ int mode;
++
+ /* This is the chunk_size argument to the SCHEDULE clause. */
+ long chunk_size;
+
+@@ -81,17 +84,38 @@ struct gomp_work_share
+ is always 1. */
+ long incr;
+
+- /* This lock protects the update of the following members. */
+- gomp_mutex_t lock;
++ /* This is a circular queue that details which threads will be allowed
++ into the ordered region and in which order. When a thread allocates
++ iterations on which it is going to work, it also registers itself at
++ the end of the array. When a thread reaches the ordered region, it
++ checks to see if it is the one at the head of the queue. If not, it
++ blocks on its RELEASE semaphore. */
++ unsigned *ordered_team_ids;
+
+- union {
+- /* This is the next iteration value to be allocated. In the case of
+- GFS_STATIC loops, this the iteration start point and never changes. */
+- long next;
++ /* This is the number of threads that have registered themselves in
++ the circular queue ordered_team_ids. */
++ unsigned ordered_num_used;
+
+- /* This is the returned data structure for SINGLE COPYPRIVATE. */
+- void *copyprivate;
+- };
++ /* This is the team_id of the currently acknowledged owner of the ordered
++ section, or -1u if the ordered section has not been acknowledged by
++ any thread. This is distinguished from the thread that is *allowed*
++ to take the section next. */
++ unsigned ordered_owner;
++
++ /* This is the index into the circular queue ordered_team_ids of the
++ current thread that's allowed into the ordered reason. */
++ unsigned ordered_cur;
++
++ /* This is a chain of allocated gomp_work_share blocks, valid only
++ in the first gomp_work_share struct in the block. */
++ struct gomp_work_share *next_alloc;
++
++ /* The above fields are written once during workshare initialization,
++ or related to ordered worksharing. Make sure the following fields
++ are in a different cache line. */
++
++ /* This lock protects the update of the following members. */
++ gomp_mutex_t lock __attribute__((aligned (64)));
+
+ /* This is the count of the number of threads that have exited the work
+ share construct. If the construct was marked nowait, they have moved on
+@@ -99,27 +123,28 @@ struct gomp_work_share
+ of the team to exit the work share construct must deallocate it. */
+ unsigned threads_completed;
+
+- /* This is the index into the circular queue ordered_team_ids of the
+- current thread that's allowed into the ordered reason. */
+- unsigned ordered_cur;
++ union {
++ /* This is the next iteration value to be allocated. In the case of
++ GFS_STATIC loops, this the iteration start point and never changes. */
++ long next;
+
+- /* This is the number of threads that have registered themselves in
+- the circular queue ordered_team_ids. */
+- unsigned ordered_num_used;
++ /* This is the returned data structure for SINGLE COPYPRIVATE. */
++ void *copyprivate;
++ };
+
+- /* This is the team_id of the currently acknoledged owner of the ordered
+- section, or -1u if the ordered section has not been acknowledged by
+- any thread. This is distinguished from the thread that is *allowed*
+- to take the section next. */
+- unsigned ordered_owner;
++ union {
++ /* Link to gomp_work_share struct for next work sharing construct
++ encountered after this one. */
++ gomp_ptrlock_t next_ws;
++
++ /* gomp_work_share structs are chained in the free work share cache
++ through this. */
++ struct gomp_work_share *next_free;
++ };
+
+- /* This is a circular queue that details which threads will be allowed
+- into the ordered region and in which order. When a thread allocates
+- iterations on which it is going to work, it also registers itself at
+- the end of the array. When a thread reaches the ordered region, it
+- checks to see if it is the one at the head of the queue. If not, it
+- blocks on its RELEASE semaphore. */
+- unsigned ordered_team_ids[];
++ /* If only few threads are in the team, ordered_team_ids can point
++ to this array which fills the padding at the end of this struct. */
++ unsigned inline_ordered_team_ids[0];
+ };
+
+ /* This structure contains all of the thread-local data associated with
+@@ -133,21 +158,24 @@ struct gomp_team_state
+
+ /* This is the work share construct which this thread is currently
+ processing. Recall that with NOWAIT, not all threads may be
+- processing the same construct. This value is NULL when there
+- is no construct being processed. */
++ processing the same construct. */
+ struct gomp_work_share *work_share;
+
++ /* This is the previous work share construct or NULL if there wasn't any.
++ When all threads are done with the current work sharing construct,
++ the previous one can be freed. The current one can't, as its
++ next_ws field is used. */
++ struct gomp_work_share *last_work_share;
++
+ /* This is the ID of this thread within the team. This value is
+ guaranteed to be between 0 and N-1, where N is the number of
+ threads in the team. */
+ unsigned team_id;
+
+- /* The work share "generation" is a number that increases by one for
+- each work share construct encountered in the dynamic flow of the
+- program. It is used to find the control data for the work share
+- when encountering it for the first time. This particular number
+- reflects the generation of the work_share member of this struct. */
+- unsigned work_share_generation;
++#ifdef HAVE_SYNC_BUILTINS
++ /* Number of single stmts encountered. */
++ unsigned long single_count;
++#endif
+
+ /* For GFS_RUNTIME loops that resolved to GFS_STATIC, this is the
+ trip number through the loop. So first time a particular loop
+@@ -163,41 +191,53 @@ struct gomp_team_state
+
+ struct gomp_team
+ {
+- /* This lock protects access to the following work shares data structures. */
+- gomp_mutex_t work_share_lock;
+-
+- /* This is a dynamically sized array containing pointers to the control
+- structs for all "live" work share constructs. Here "live" means that
+- the construct has been encountered by at least one thread, and not
+- completed by all threads. */
+- struct gomp_work_share **work_shares;
+-
+- /* The work_shares array is indexed by "generation & generation_mask".
+- The mask will be 2**N - 1, where 2**N is the size of the array. */
+- unsigned generation_mask;
+-
+- /* These two values define the bounds of the elements of the work_shares
+- array that are currently in use. */
+- unsigned oldest_live_gen;
+- unsigned num_live_gen;
+-
+ /* This is the number of threads in the current team. */
+ unsigned nthreads;
+
++ /* This is number of gomp_work_share structs that have been allocated
++ as a block last time. */
++ unsigned work_share_chunk;
++
+ /* This is the saved team state that applied to a master thread before
+ the current thread was created. */
+ struct gomp_team_state prev_ts;
+
+- /* This barrier is used for most synchronization of the team. */
+- gomp_barrier_t barrier;
+-
+ /* This semaphore should be used by the master thread instead of its
+ "native" semaphore in the thread structure. Required for nested
+ parallels, as the master is a member of two teams. */
+ gomp_sem_t master_release;
+
+- /* This array contains pointers to the release semaphore of the threads
+- in the team. */
++ /* List of gomp_work_share structs chained through next_free fields.
++ This is populated and taken off only by the first thread in the
++ team encountering a new work sharing construct, in a critical
++ section. */
++ struct gomp_work_share *work_share_list_alloc;
++
++ /* List of gomp_work_share structs freed by free_work_share. New
++ entries are atomically added to the start of the list, and
++ alloc_work_share can safely only move all but the first entry
++ to work_share_list alloc, as free_work_share can happen concurrently
++ with alloc_work_share. */
++ struct gomp_work_share *work_share_list_free;
++
++#ifdef HAVE_SYNC_BUILTINS
++ /* Number of simple single regions encountered by threads in this
++ team. */
++ unsigned long single_count;
++#else
++ /* Mutex protecting addition of workshares to work_share_list_free. */
++ gomp_mutex_t work_share_list_free_lock;
++#endif
++
++ /* This barrier is used for most synchronization of the team. */
++ gomp_barrier_t barrier;
++
++ /* Initial work shares, to avoid allocating any gomp_work_share
++ structs in the common case. */
++ struct gomp_work_share work_shares[8];
++
++ /* This is an array with pointers to the release semaphore
++ of the threads in the team. */
+ gomp_sem_t *ordered_release[];
+ };
+
+@@ -242,6 +282,11 @@ extern bool gomp_dyn_var;
+ extern bool gomp_nest_var;
+ extern enum gomp_schedule_type gomp_run_sched_var;
+ extern unsigned long gomp_run_sched_chunk;
++#ifndef HAVE_SYNC_BUILTINS
++extern gomp_mutex_t gomp_remaining_threads_lock;
++#endif
++extern unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
++extern unsigned long gomp_available_cpus, gomp_managed_threads;
+
+ /* The attributes to be used during thread creation. */
+ extern pthread_attr_t gomp_thread_attr;
+@@ -306,17 +351,27 @@ extern unsigned gomp_dynamic_max_threads
+
+ /* team.c */
+
++extern struct gomp_team *gomp_new_team (unsigned);
+ extern void gomp_team_start (void (*) (void *), void *, unsigned,
+- struct gomp_work_share *);
++ struct gomp_team *);
+ extern void gomp_team_end (void);
+
+ /* work.c */
+
+-extern struct gomp_work_share * gomp_new_work_share (bool, unsigned);
++extern void gomp_init_work_share (struct gomp_work_share *, bool, unsigned);
++extern void gomp_fini_work_share (struct gomp_work_share *);
+ extern bool gomp_work_share_start (bool);
+ extern void gomp_work_share_end (void);
+ extern void gomp_work_share_end_nowait (void);
+
++static inline void
++gomp_work_share_init_done (void)
++{
++ struct gomp_thread *thr = gomp_thread ();
++ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
++ gomp_ptrlock_set (&thr->ts.last_work_share->next_ws, thr->ts.work_share);
++}
++
+ #ifdef HAVE_ATTRIBUTE_VISIBILITY
+ # pragma GCC visibility pop
+ #endif
+--- libgomp/iter.c.jj 2008-03-26 14:48:34.000000000 +0100
++++ libgomp/iter.c 2008-03-26 15:11:23.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -154,7 +154,7 @@ gomp_iter_dynamic_next_locked (long *pst
+ if (start == ws->end)
+ return false;
+
+- chunk = ws->chunk_size * ws->incr;
++ chunk = ws->chunk_size;
+ left = ws->end - start;
+ if (ws->incr < 0)
+ {
+@@ -186,11 +186,38 @@ gomp_iter_dynamic_next (long *pstart, lo
+ struct gomp_work_share *ws = thr->ts.work_share;
+ long start, end, nend, chunk, incr;
+
+- start = ws->next;
+ end = ws->end;
+ incr = ws->incr;
+- chunk = ws->chunk_size * incr;
++ chunk = ws->chunk_size;
++
++ if (__builtin_expect (ws->mode, 1))
++ {
++ long tmp = __sync_fetch_and_add (&ws->next, chunk);
++ if (incr > 0)
++ {
++ if (tmp >= end)
++ return false;
++ nend = tmp + chunk;
++ if (nend > end)
++ nend = end;
++ *pstart = tmp;
++ *pend = nend;
++ return true;
++ }
++ else
++ {
++ if (tmp <= end)
++ return false;
++ nend = tmp + chunk;
++ if (nend < end)
++ nend = end;
++ *pstart = tmp;
++ *pend = nend;
++ return true;
++ }
++ }
+
++ start = ws->next;
+ while (1)
+ {
+ long left = end - start;
+--- libgomp/work.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/work.c 2008-03-27 12:21:51.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,39 +29,138 @@
+ of threads. */
+
+ #include "libgomp.h"
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+
+-/* Create a new work share structure. */
++/* Allocate a new work share structure, preferably from current team's
++ free gomp_work_share cache. */
+
+-struct gomp_work_share *
+-gomp_new_work_share (bool ordered, unsigned nthreads)
++static struct gomp_work_share *
++alloc_work_share (struct gomp_team *team)
+ {
+ struct gomp_work_share *ws;
+- size_t size;
++ unsigned int i;
+
+- size = sizeof (*ws);
+- if (ordered)
+- size += nthreads * sizeof (ws->ordered_team_ids[0]);
++ /* This is called in a critical section. */
++ if (team->work_share_list_alloc != NULL)
++ {
++ ws = team->work_share_list_alloc;
++ team->work_share_list_alloc = ws->next_free;
++ return ws;
++ }
+
+- ws = gomp_malloc_cleared (size);
+- gomp_mutex_init (&ws->lock);
+- ws->ordered_owner = -1;
++#ifdef HAVE_SYNC_BUILTINS
++ ws = team->work_share_list_free;
++ /* We need atomic read from work_share_list_free,
++ as free_work_share can be called concurrently. */
++ __asm ("" : "+r" (ws));
++
++ if (ws && ws->next_free)
++ {
++ struct gomp_work_share *next = ws->next_free;
++ ws->next_free = NULL;
++ team->work_share_list_alloc = next->next_free;
++ return next;
++ }
++#else
++ gomp_mutex_lock (&team->work_share_list_free_lock);
++ ws = team->work_share_list_free;
++ if (ws)
++ {
++ team->work_share_list_alloc = ws->next_free;
++ team->work_share_list_free = NULL;
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++ return ws;
++ }
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++#endif
+
++ team->work_share_chunk *= 2;
++ ws = gomp_malloc (team->work_share_chunk * sizeof (struct gomp_work_share));
++ ws->next_alloc = team->work_shares[0].next_alloc;
++ team->work_shares[0].next_alloc = ws;
++ team->work_share_list_alloc = &ws[1];
++ for (i = 1; i < team->work_share_chunk - 1; i++)
++ ws[i].next_free = &ws[i + 1];
++ ws[i].next_free = NULL;
+ return ws;
+ }
+
++/* Initialize an already allocated struct gomp_work_share.
++ This shouldn't touch the next_alloc field. */
++
++void
++gomp_init_work_share (struct gomp_work_share *ws, bool ordered,
++ unsigned nthreads)
++{
++ gomp_mutex_init (&ws->lock);
++ if (__builtin_expect (ordered, 0))
++ {
++#define INLINE_ORDERED_TEAM_IDS_CNT \
++ ((sizeof (struct gomp_work_share) \
++ - offsetof (struct gomp_work_share, inline_ordered_team_ids)) \
++ / sizeof (((struct gomp_work_share *) 0)->inline_ordered_team_ids[0]))
++
++ if (nthreads > INLINE_ORDERED_TEAM_IDS_CNT)
++ ws->ordered_team_ids
++ = gomp_malloc (nthreads * sizeof (*ws->ordered_team_ids));
++ else
++ ws->ordered_team_ids = ws->inline_ordered_team_ids;
++ memset (ws->ordered_team_ids, '\0',
++ nthreads * sizeof (*ws->ordered_team_ids));
++ ws->ordered_num_used = 0;
++ ws->ordered_owner = -1;
++ ws->ordered_cur = 0;
++ }
++ else
++ ws->ordered_team_ids = NULL;
++ gomp_ptrlock_init (&ws->next_ws, NULL);
++ ws->threads_completed = 0;
++}
+
+-/* Free a work share structure. */
++/* Do any needed destruction of gomp_work_share fields before it
++ is put back into free gomp_work_share cache or freed. */
+
+-static void
+-free_work_share (struct gomp_work_share *ws)
++void
++gomp_fini_work_share (struct gomp_work_share *ws)
+ {
+ gomp_mutex_destroy (&ws->lock);
+- free (ws);
++ if (ws->ordered_team_ids != ws->inline_ordered_team_ids)
++ free (ws->ordered_team_ids);
++ gomp_ptrlock_destroy (&ws->next_ws);
+ }
+
++/* Free a work share struct, if not orphaned, put it into current
++ team's free gomp_work_share cache. */
++
++static inline void
++free_work_share (struct gomp_team *team, struct gomp_work_share *ws)
++{
++ gomp_fini_work_share (ws);
++ if (__builtin_expect (team == NULL, 0))
++ free (ws);
++ else
++ {
++ struct gomp_work_share *next_ws;
++#ifdef HAVE_SYNC_BUILTINS
++ do
++ {
++ next_ws = team->work_share_list_free;
++ ws->next_free = next_ws;
++ }
++ while (!__sync_bool_compare_and_swap (&team->work_share_list_free,
++ next_ws, ws));
++#else
++ gomp_mutex_lock (&team->work_share_list_free_lock);
++ next_ws = team->work_share_list_free;
++ ws->next_free = next_ws;
++ team->work_share_list_free = ws;
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++#endif
++ }
++}
+
+ /* The current thread is ready to begin the next work sharing construct.
+ In all cases, thr->ts.work_share is updated to point to the new
+@@ -74,71 +173,34 @@ gomp_work_share_start (bool ordered)
+ struct gomp_thread *thr = gomp_thread ();
+ struct gomp_team *team = thr->ts.team;
+ struct gomp_work_share *ws;
+- unsigned ws_index, ws_gen;
+
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- ws = gomp_new_work_share (ordered, 1);
++ ws = gomp_malloc (sizeof (*ws));
++ gomp_init_work_share (ws, ordered, 1);
+ thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+- gomp_mutex_lock (&ws->lock);
+- return true;
++ return ws;
+ }
+
+- gomp_mutex_lock (&team->work_share_lock);
+-
+- /* This thread is beginning its next generation. */
+- ws_gen = ++thr->ts.work_share_generation;
+-
+- /* If this next generation is not newer than any other generation in
+- the team, then simply reference the existing construct. */
+- if (ws_gen - team->oldest_live_gen < team->num_live_gen)
++ ws = thr->ts.work_share;
++ thr->ts.last_work_share = ws;
++ ws = gomp_ptrlock_get (&ws->next_ws);
++ if (ws == NULL)
+ {
+- ws_index = ws_gen & team->generation_mask;
+- ws = team->work_shares[ws_index];
++ /* This thread encountered a new ws first. */
++ struct gomp_work_share *ws = alloc_work_share (team);
++ gomp_init_work_share (ws, ordered, team->nthreads);
+ thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+-
+- gomp_mutex_lock (&ws->lock);
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- return false;
++ return true;
+ }
+-
+- /* Resize the work shares queue if we've run out of space. */
+- if (team->num_live_gen++ == team->generation_mask)
++ else
+ {
+- team->work_shares = gomp_realloc (team->work_shares,
+- 2 * team->num_live_gen
+- * sizeof (*team->work_shares));
+-
+- /* Unless oldest_live_gen is zero, the sequence of live elements
+- wraps around the end of the array. If we do nothing, we break
+- lookup of the existing elements. Fix that by unwrapping the
+- data from the front to the end. */
+- if (team->oldest_live_gen > 0)
+- memcpy (team->work_shares + team->num_live_gen,
+- team->work_shares,
+- (team->oldest_live_gen & team->generation_mask)
+- * sizeof (*team->work_shares));
+-
+- team->generation_mask = team->generation_mask * 2 + 1;
+- }
+-
+- ws_index = ws_gen & team->generation_mask;
+- ws = gomp_new_work_share (ordered, team->nthreads);
+- thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+- team->work_shares[ws_index] = ws;
+-
+- gomp_mutex_lock (&ws->lock);
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- return true;
++ thr->ts.work_share = ws;
++ return false;
++ }
+ }
+
+-
+ /* The current thread is done with its current work sharing construct.
+ This version does imply a barrier at the end of the work-share. */
+
+@@ -147,36 +209,28 @@ gomp_work_share_end (void)
+ {
+ struct gomp_thread *thr = gomp_thread ();
+ struct gomp_team *team = thr->ts.team;
+- struct gomp_work_share *ws = thr->ts.work_share;
+- bool last;
+-
+- thr->ts.work_share = NULL;
++ gomp_barrier_state_t bstate;
+
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- free_work_share (ws);
++ free_work_share (NULL, thr->ts.work_share);
++ thr->ts.work_share = NULL;
+ return;
+ }
+
+- last = gomp_barrier_wait_start (&team->barrier);
++ bstate = gomp_barrier_wait_start (&team->barrier);
+
+- if (last)
++ if (gomp_barrier_last_thread (bstate))
+ {
+- unsigned ws_index;
+-
+- ws_index = thr->ts.work_share_generation & team->generation_mask;
+- team->work_shares[ws_index] = NULL;
+- team->oldest_live_gen++;
+- team->num_live_gen = 0;
+-
+- free_work_share (ws);
++ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
++ free_work_share (team, thr->ts.last_work_share);
+ }
+
+- gomp_barrier_wait_end (&team->barrier, last);
++ gomp_barrier_wait_end (&team->barrier, bstate);
++ thr->ts.last_work_share = NULL;
+ }
+
+-
+ /* The current thread is done with its current work sharing construct.
+ This version does NOT imply a barrier at the end of the work-share. */
+
+@@ -188,15 +242,17 @@ gomp_work_share_end_nowait (void)
+ struct gomp_work_share *ws = thr->ts.work_share;
+ unsigned completed;
+
+- thr->ts.work_share = NULL;
+-
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- free_work_share (ws);
++ free_work_share (NULL, ws);
++ thr->ts.work_share = NULL;
+ return;
+ }
+
++ if (__builtin_expect (thr->ts.last_work_share == NULL, 0))
++ return;
++
+ #ifdef HAVE_SYNC_BUILTINS
+ completed = __sync_add_and_fetch (&ws->threads_completed, 1);
+ #else
+@@ -206,18 +262,6 @@ gomp_work_share_end_nowait (void)
+ #endif
+
+ if (completed == team->nthreads)
+- {
+- unsigned ws_index;
+-
+- gomp_mutex_lock (&team->work_share_lock);
+-
+- ws_index = thr->ts.work_share_generation & team->generation_mask;
+- team->work_shares[ws_index] = NULL;
+- team->oldest_live_gen++;
+- team->num_live_gen--;
+-
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- free_work_share (ws);
+- }
++ free_work_share (team, thr->ts.last_work_share);
++ thr->ts.last_work_share = NULL;
+ }
+--- libgomp/single.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/single.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -37,10 +37,24 @@
+ bool
+ GOMP_single_start (void)
+ {
++#ifdef HAVE_SYNC_BUILTINS
++ struct gomp_thread *thr = gomp_thread ();
++ struct gomp_team *team = thr->ts.team;
++ unsigned long single_count;
++
++ if (__builtin_expect (team == NULL, 0))
++ return true;
++
++ single_count = thr->ts.single_count++;
++ return __sync_bool_compare_and_swap (&team->single_count, single_count,
++ single_count + 1L);
++#else
+ bool ret = gomp_work_share_start (false);
+- gomp_mutex_unlock (&gomp_thread ()->ts.work_share->lock);
++ if (ret)
++ gomp_work_share_init_done ();
+ gomp_work_share_end_nowait ();
+ return ret;
++#endif
+ }
+
+ /* This routine is called when first encountering a SINGLE construct that
+@@ -57,10 +71,12 @@ GOMP_single_copy_start (void)
+ void *ret;
+
+ first = gomp_work_share_start (false);
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+
+ if (first)
+- ret = NULL;
++ {
++ gomp_work_share_init_done ();
++ ret = NULL;
++ }
+ else
+ {
+ gomp_barrier_wait (&thr->ts.team->barrier);
+--- libgomp/loop.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/loop.c 2008-03-26 18:47:04.000000000 +0100
+@@ -27,8 +27,9 @@
+
+ /* This file handles the LOOP (FOR/DO) construct. */
+
+-#include "libgomp.h"
++#include <limits.h>
+ #include <stdlib.h>
++#include "libgomp.h"
+
+
+ /* Initialize the given work share construct from the given arguments. */
+@@ -44,6 +45,39 @@ gomp_loop_init (struct gomp_work_share *
+ ? start : end;
+ ws->incr = incr;
+ ws->next = start;
++ if (sched == GFS_DYNAMIC)
++ {
++ ws->chunk_size *= incr;
++
++#ifdef HAVE_SYNC_BUILTINS
++ {
++ /* For dynamic scheduling prepare things to make each iteration
++ faster. */
++ struct gomp_thread *thr = gomp_thread ();
++ struct gomp_team *team = thr->ts.team;
++ long nthreads = team ? team->nthreads : 1;
++
++ if (__builtin_expect (incr > 0, 1))
++ {
++ /* Cheap overflow protection. */
++ if (__builtin_expect ((nthreads | ws->chunk_size)
++ >= 1UL << (sizeof (long)
++ * __CHAR_BIT__ / 2 - 1), 0))
++ ws->mode = 0;
++ else
++ ws->mode = ws->end < (LONG_MAX
++ - (nthreads + 1) * ws->chunk_size);
++ }
++ /* Cheap overflow protection. */
++ else if (__builtin_expect ((nthreads | -ws->chunk_size)
++ >= 1UL << (sizeof (long)
++ * __CHAR_BIT__ / 2 - 1), 0))
++ ws->mode = 0;
++ else
++ ws->mode = ws->end > (nthreads + 1) * -ws->chunk_size - LONG_MAX;
++ }
++#endif
++ }
+ }
+
+ /* The *_start routines are called when first encountering a loop construct
+@@ -68,10 +102,13 @@ gomp_loop_static_start (long start, long
+ {
+ struct gomp_thread *thr = gomp_thread ();
+
++ thr->ts.static_trip = 0;
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_STATIC, chunk_size);
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_STATIC, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ return !gomp_iter_static_next (istart, iend);
+ }
+@@ -84,13 +121,16 @@ gomp_loop_dynamic_start (long start, lon
+ bool ret;
+
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_DYNAMIC, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_DYNAMIC, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ #ifdef HAVE_SYNC_BUILTINS
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+ ret = gomp_iter_dynamic_next (istart, iend);
+ #else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ ret = gomp_iter_dynamic_next_locked (istart, iend);
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
+ #endif
+@@ -106,13 +146,16 @@ gomp_loop_guided_start (long start, long
+ bool ret;
+
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_GUIDED, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_GUIDED, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ #ifdef HAVE_SYNC_BUILTINS
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+ ret = gomp_iter_guided_next (istart, iend);
+ #else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ ret = gomp_iter_guided_next_locked (istart, iend);
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
+ #endif
+@@ -149,13 +192,14 @@ gomp_loop_ordered_static_start (long sta
+ {
+ struct gomp_thread *thr = gomp_thread ();
+
++ thr->ts.static_trip = 0;
+ if (gomp_work_share_start (true))
+ {
+ gomp_loop_init (thr->ts.work_share, start, end, incr,
+ GFS_STATIC, chunk_size);
+ gomp_ordered_static_init ();
++ gomp_work_share_init_done ();
+ }
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+
+ return !gomp_iter_static_next (istart, iend);
+ }
+@@ -168,8 +212,14 @@ gomp_loop_ordered_dynamic_start (long st
+ bool ret;
+
+ if (gomp_work_share_start (true))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_DYNAMIC, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_DYNAMIC, chunk_size);
++ gomp_mutex_lock (&thr->ts.work_share->lock);
++ gomp_work_share_init_done ();
++ }
++ else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+
+ ret = gomp_iter_dynamic_next_locked (istart, iend);
+ if (ret)
+@@ -187,8 +237,14 @@ gomp_loop_ordered_guided_start (long sta
+ bool ret;
+
+ if (gomp_work_share_start (true))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_GUIDED, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_GUIDED, chunk_size);
++ gomp_mutex_lock (&thr->ts.work_share->lock);
++ gomp_work_share_init_done ();
++ }
++ else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+
+ ret = gomp_iter_guided_next_locked (istart, iend);
+ if (ret)
+@@ -375,12 +431,12 @@ gomp_parallel_loop_start (void (*fn) (vo
+ long incr, enum gomp_schedule_type sched,
+ long chunk_size)
+ {
+- struct gomp_work_share *ws;
++ struct gomp_team *team;
+
+ num_threads = gomp_resolve_num_threads (num_threads);
+- ws = gomp_new_work_share (false, num_threads);
+- gomp_loop_init (ws, start, end, incr, sched, chunk_size);
+- gomp_team_start (fn, data, num_threads, ws);
++ team = gomp_new_team (num_threads);
++ gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
++ gomp_team_start (fn, data, num_threads, team);
+ }
+
+ void
+--- libgomp/Makefile.in.jj 2008-01-10 20:53:47.000000000 +0100
++++ libgomp/Makefile.in 2008-03-26 18:51:01.000000000 +0100
+@@ -83,7 +83,7 @@ libgomp_la_LIBADD =
+ am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
+ error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
+ single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
+- bar.lo time.lo fortran.lo affinity.lo
++ bar.lo ptrlock.lo time.lo fortran.lo affinity.lo
+ libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+ depcomp = $(SHELL) $(top_srcdir)/../depcomp
+@@ -292,7 +292,7 @@ libgomp_version_info = -version-info $(l
+ libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
+ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
+ loop.c ordered.c parallel.c sections.c single.c team.c work.c \
+- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
++ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
+
+ nodist_noinst_HEADERS = libgomp_f.h
+ nodist_libsubinclude_HEADERS = omp.h
+@@ -434,6 +434,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordered.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrlock.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sections.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@
+--- libgomp/testsuite/libgomp.c/loop-4.c.jj 2008-03-26 18:47:04.000000000 +0100
++++ libgomp/testsuite/libgomp.c/loop-4.c 2008-03-26 18:47:04.000000000 +0100
+@@ -0,0 +1,28 @@
++/* { dg-do run } */
++
++extern void abort (void);
++
++int
++main (void)
++{
++ int e = 0;
++#pragma omp parallel num_threads (4) reduction(+:e)
++ {
++ long i;
++ #pragma omp for schedule(dynamic,1)
++ for (i = __LONG_MAX__ - 30001; i <= __LONG_MAX__ - 10001; i += 10000)
++ if (i != __LONG_MAX__ - 30001
++ && i != __LONG_MAX__ - 20001
++ && i != __LONG_MAX__ - 10001)
++ e = 1;
++ #pragma omp for schedule(dynamic,1)
++ for (i = -__LONG_MAX__ + 30000; i >= -__LONG_MAX__ + 10000; i -= 10000)
++ if (i != -__LONG_MAX__ + 30000
++ && i != -__LONG_MAX__ + 20000
++ && i != -__LONG_MAX__ + 10000)
++ e = 1;
++ }
++ if (e)
++ abort ();
++ return 0;
++}
+--- libgomp/Makefile.am.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/Makefile.am 2008-03-26 15:15:19.000000000 +0100
+@@ -31,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i
+
+ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
+ loop.c ordered.c parallel.c sections.c single.c team.c work.c \
+- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
++ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
+
+ nodist_noinst_HEADERS = libgomp_f.h
+ nodist_libsubinclude_HEADERS = omp.h
+--- libgomp/team.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/team.c 2008-03-27 12:22:26.000000000 +0100
+@@ -94,7 +94,7 @@ gomp_thread_start (void *xdata)
+ {
+ gomp_barrier_wait (&thr->ts.team->barrier);
+ local_fn (local_data);
+- gomp_barrier_wait (&thr->ts.team->barrier);
++ gomp_barrier_wait_last (&thr->ts.team->barrier);
+ }
+ else
+ {
+@@ -114,11 +114,10 @@ gomp_thread_start (void *xdata)
+ thr->data = NULL;
+ thr->ts.team = NULL;
+ thr->ts.work_share = NULL;
++ thr->ts.last_work_share = NULL;
+ thr->ts.team_id = 0;
+- thr->ts.work_share_generation = 0;
+- thr->ts.static_trip = 0;
+
+- gomp_barrier_wait (&team->barrier);
++ gomp_barrier_wait_last (&team->barrier);
+ gomp_barrier_wait (&gomp_threads_dock);
+
+ local_fn = thr->fn;
+@@ -133,21 +132,29 @@ gomp_thread_start (void *xdata)
+
+ /* Create a new team data structure. */
+
+-static struct gomp_team *
+-new_team (unsigned nthreads, struct gomp_work_share *work_share)
++struct gomp_team *
++gomp_new_team (unsigned nthreads)
+ {
+ struct gomp_team *team;
+ size_t size;
++ int i;
+
+ size = sizeof (*team) + nthreads * sizeof (team->ordered_release[0]);
+ team = gomp_malloc (size);
+- gomp_mutex_init (&team->work_share_lock);
+
+- team->work_shares = gomp_malloc (4 * sizeof (struct gomp_work_share *));
+- team->generation_mask = 3;
+- team->oldest_live_gen = work_share == NULL;
+- team->num_live_gen = work_share != NULL;
+- team->work_shares[0] = work_share;
++ team->work_share_chunk = 8;
++#ifdef HAVE_SYNC_BUILTINS
++ team->single_count = 0;
++#else
++ gomp_mutex_init (&team->work_share_list_free_lock);
++#endif
++ gomp_init_work_share (&team->work_shares[0], false, nthreads);
++ team->work_shares[0].next_alloc = NULL;
++ team->work_share_list_free = NULL;
++ team->work_share_list_alloc = &team->work_shares[1];
++ for (i = 1; i < 7; i++)
++ team->work_shares[i].next_free = &team->work_shares[i + 1];
++ team->work_shares[i].next_free = NULL;
+
+ team->nthreads = nthreads;
+ gomp_barrier_init (&team->barrier, nthreads);
+@@ -164,10 +171,22 @@ new_team (unsigned nthreads, struct gomp
+ static void
+ free_team (struct gomp_team *team)
+ {
+- free (team->work_shares);
+- gomp_mutex_destroy (&team->work_share_lock);
++ if (__builtin_expect (team->work_shares[0].next_alloc != NULL, 0))
++ {
++ struct gomp_work_share *ws = team->work_shares[0].next_alloc;
++ do
++ {
++ struct gomp_work_share *next_ws = ws->next_alloc;
++ free (ws);
++ ws = next_ws;
++ }
++ while (ws != NULL);
++ }
+ gomp_barrier_destroy (&team->barrier);
+ gomp_sem_destroy (&team->master_release);
++#ifndef HAVE_SYNC_BUILTINS
++ gomp_mutex_destroy (&team->work_share_list_free_lock);
++#endif
+ free (team);
+ }
+
+@@ -176,11 +195,10 @@ free_team (struct gomp_team *team)
+
+ void
+ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
+- struct gomp_work_share *work_share)
++ struct gomp_team *team)
+ {
+ struct gomp_thread_start_data *start_data;
+ struct gomp_thread *thr, *nthr;
+- struct gomp_team *team;
+ bool nested;
+ unsigned i, n, old_threads_used = 0;
+ pthread_attr_t thread_attr, *attr;
+@@ -188,17 +206,18 @@ gomp_team_start (void (*fn) (void *), vo
+ thr = gomp_thread ();
+ nested = thr->ts.team != NULL;
+
+- team = new_team (nthreads, work_share);
+-
+ /* Always save the previous state, even if this isn't a nested team.
+ In particular, we should save any work share state from an outer
+ orphaned work share construct. */
+ team->prev_ts = thr->ts;
+
+ thr->ts.team = team;
+- thr->ts.work_share = work_share;
+ thr->ts.team_id = 0;
+- thr->ts.work_share_generation = 0;
++ thr->ts.work_share = &team->work_shares[0];
++ thr->ts.last_work_share = NULL;
++#ifdef HAVE_SYNC_BUILTINS
++ thr->ts.single_count = 0;
++#endif
+ thr->ts.static_trip = 0;
+
+ if (nthreads == 1)
+@@ -241,9 +260,12 @@ gomp_team_start (void (*fn) (void *), vo
+ {
+ nthr = gomp_threads[i];
+ nthr->ts.team = team;
+- nthr->ts.work_share = work_share;
++ nthr->ts.work_share = &team->work_shares[0];
++ nthr->ts.last_work_share = NULL;
+ nthr->ts.team_id = i;
+- nthr->ts.work_share_generation = 0;
++#ifdef HAVE_SYNC_BUILTINS
++ nthr->ts.single_count = 0;
++#endif
+ nthr->ts.static_trip = 0;
+ nthr->fn = fn;
+ nthr->data = data;
+@@ -266,8 +288,24 @@ gomp_team_start (void (*fn) (void *), vo
+ }
+ }
+
++ if (__builtin_expect (nthreads > old_threads_used, 0))
++ {
++ long diff = (long) nthreads - (long) old_threads_used;
++
++ if (old_threads_used == 0)
++ --diff;
++
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, diff);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads += diff;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
++
+ attr = &gomp_thread_attr;
+- if (gomp_cpu_affinity != NULL)
++ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
+ {
+ size_t stacksize;
+ pthread_attr_init (&thread_attr);
+@@ -287,9 +325,12 @@ gomp_team_start (void (*fn) (void *), vo
+ int err;
+
+ start_data->ts.team = team;
+- start_data->ts.work_share = work_share;
++ start_data->ts.work_share = &team->work_shares[0];
++ start_data->ts.last_work_share = NULL;
+ start_data->ts.team_id = i;
+- start_data->ts.work_share_generation = 0;
++#ifdef HAVE_SYNC_BUILTINS
++ start_data->ts.single_count = 0;
++#endif
+ start_data->ts.static_trip = 0;
+ start_data->fn = fn;
+ start_data->fn_data = data;
+@@ -303,7 +344,7 @@ gomp_team_start (void (*fn) (void *), vo
+ gomp_fatal ("Thread creation failed: %s", strerror (err));
+ }
+
+- if (gomp_cpu_affinity != NULL)
++ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
+ pthread_attr_destroy (&thread_attr);
+
+ do_release:
+@@ -313,8 +354,20 @@ gomp_team_start (void (*fn) (void *), vo
+ that should arrive back at the end of this team. The extra
+ threads should be exiting. Note that we arrange for this test
+ to never be true for nested teams. */
+- if (nthreads < old_threads_used)
+- gomp_barrier_reinit (&gomp_threads_dock, nthreads);
++ if (__builtin_expect (nthreads < old_threads_used, 0))
++ {
++ long diff = (long) nthreads - (long) old_threads_used;
++
++ gomp_barrier_reinit (&gomp_threads_dock, nthreads);
++
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, diff);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads += diff;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
+ }
+
+
+@@ -329,8 +382,21 @@ gomp_team_end (void)
+
+ gomp_barrier_wait (&team->barrier);
+
++ gomp_fini_work_share (thr->ts.work_share);
++
+ thr->ts = team->prev_ts;
+
++ if (__builtin_expect (thr->ts.team != NULL, 0))
++ {
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, 1L - team->nthreads);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads -= team->nthreads - 1L;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
++
+ free_team (team);
+ }
+
+--- libgomp/config/posix/bar.h.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/config/posix/bar.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -46,18 +46,32 @@ typedef struct
+ unsigned total;
+ unsigned arrived;
+ } gomp_barrier_t;
++typedef bool gomp_barrier_state_t;
+
+ extern void gomp_barrier_init (gomp_barrier_t *, unsigned);
+ extern void gomp_barrier_reinit (gomp_barrier_t *, unsigned);
+ extern void gomp_barrier_destroy (gomp_barrier_t *);
+
+ extern void gomp_barrier_wait (gomp_barrier_t *);
+-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
++extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
+
+-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
++static inline gomp_barrier_state_t
++gomp_barrier_wait_start (gomp_barrier_t *bar)
+ {
+ gomp_mutex_lock (&bar->mutex1);
+ return ++bar->arrived == bar->total;
+ }
+
++static inline bool
++gomp_barrier_last_thread (gomp_barrier_state_t state)
++{
++ return state;
++}
++
++static inline void
++gomp_barrier_wait_last (gomp_barrier_t *bar)
++{
++ gomp_barrier_wait (bar);
++}
++
+ #endif /* GOMP_BARRIER_H */
+--- libgomp/config/posix/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/posix/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_PTRLOCK_H
++#define GOMP_PTRLOCK_H 1
++
++typedef struct { void *ptr; gomp_mutex_t lock; } gomp_ptrlock_t;
++
++static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ ptrlock->ptr = ptr;
++ gomp_mutex_init (&ptrlock->lock);
++}
++
++static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
++{
++ if (ptrlock->ptr != NULL)
++ return ptrlock->ptr;
++
++ gomp_mutex_lock (&ptrlock->lock);
++ if (ptrlock->ptr != NULL)
++ {
++ gomp_mutex_unlock (&ptrlock->lock);
++ return ptrlock->ptr;
++ }
++
++ return NULL;
++}
++
++static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ ptrlock->ptr = ptr;
++ gomp_mutex_unlock (&ptrlock->lock);
++}
++
++static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
++{
++ gomp_mutex_destroy (&ptrlock->lock);
++}
++
++#endif /* GOMP_PTRLOCK_H */
+--- libgomp/config/posix/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/posix/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1 @@
++/* Everything is in the header. */
+--- libgomp/config/posix/bar.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/config/posix/bar.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -70,7 +70,7 @@ gomp_barrier_reinit (gomp_barrier_t *bar
+ }
+
+ void
+-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
++gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t last)
+ {
+ unsigned int n;
+
+--- libgomp/config/linux/alpha/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/alpha/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -30,8 +30,6 @@
+ #ifndef SYS_futex
+ #define SYS_futex 394
+ #endif
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+
+ static inline void
+@@ -45,7 +43,7 @@ futex_wait (int *addr, int val)
+
+ sc_0 = SYS_futex;
+ sc_16 = (long) addr;
+- sc_17 = FUTEX_WAIT;
++ sc_17 = gomp_futex_wait;
+ sc_18 = val;
+ sc_19 = 0;
+ __asm volatile ("callsys"
+@@ -53,6 +51,20 @@ futex_wait (int *addr, int val)
+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18), "1"(sc_19)
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sc_0 = SYS_futex;
++ sc_17 &= ~FUTEX_PRIVATE_FLAG;
++ sc_19 = 0;
++ __asm volatile ("callsys"
++ : "=r" (sc_0), "=r"(sc_19)
++ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18),
++ "1"(sc_19)
++ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
++ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ }
+ }
+
+ static inline void
+@@ -66,11 +78,35 @@ futex_wake (int *addr, int count)
+
+ sc_0 = SYS_futex;
+ sc_16 = (long) addr;
+- sc_17 = FUTEX_WAKE;
++ sc_17 = gomp_futex_wake;
+ sc_18 = count;
+ __asm volatile ("callsys"
+ : "=r" (sc_0), "=r"(sc_19)
+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sc_0 = SYS_futex;
++ sc_17 &= ~FUTEX_PRIVATE_FLAG;
++ __asm volatile ("callsys"
++ : "=r" (sc_0), "=r"(sc_19)
++ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
++ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
++ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __asm volatile ("wmb" : : : "memory");
+ }
+--- libgomp/config/linux/affinity.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/affinity.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
++/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -38,9 +38,6 @@
+ #ifdef HAVE_PTHREAD_AFFINITY_NP
+
+ static unsigned int affinity_counter;
+-#ifndef HAVE_SYNC_BUILTINS
+-static gomp_mutex_t affinity_lock;
+-#endif
+
+ void
+ gomp_init_affinity (void)
+@@ -76,9 +73,6 @@ gomp_init_affinity (void)
+ CPU_SET (gomp_cpu_affinity[0], &cpuset);
+ pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
+ affinity_counter = 1;
+-#ifndef HAVE_SYNC_BUILTINS
+- gomp_mutex_init (&affinity_lock);
+-#endif
+ }
+
+ void
+@@ -87,13 +81,7 @@ gomp_init_thread_affinity (pthread_attr_
+ unsigned int cpu;
+ cpu_set_t cpuset;
+
+-#ifdef HAVE_SYNC_BUILTINS
+ cpu = __sync_fetch_and_add (&affinity_counter, 1);
+-#else
+- gomp_mutex_lock (&affinity_lock);
+- cpu = affinity_counter++;
+- gomp_mutex_unlock (&affinity_lock);
+-#endif
+ cpu %= gomp_cpu_affinity_len;
+ CPU_ZERO (&cpuset);
+ CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
+--- libgomp/config/linux/bar.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/bar.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -36,40 +36,49 @@
+
+ typedef struct
+ {
+- gomp_mutex_t mutex;
+- unsigned total;
+- unsigned arrived;
+- int generation;
++ /* Make sure total/generation is in a mostly read cacheline, while
++ awaited in a separate cacheline. */
++ unsigned total __attribute__((aligned (64)));
++ unsigned generation;
++ unsigned awaited __attribute__((aligned (64)));
+ } gomp_barrier_t;
++typedef unsigned int gomp_barrier_state_t;
+
+ static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
+ {
+- gomp_mutex_init (&bar->mutex);
+ bar->total = count;
+- bar->arrived = 0;
++ bar->awaited = count;
+ bar->generation = 0;
+ }
+
+ static inline void gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count)
+ {
+- gomp_mutex_lock (&bar->mutex);
++ __sync_fetch_and_add (&bar->awaited, count - bar->total);
+ bar->total = count;
+- gomp_mutex_unlock (&bar->mutex);
+ }
+
+ static inline void gomp_barrier_destroy (gomp_barrier_t *bar)
+ {
+- /* Before destroying, make sure all threads have left the barrier. */
+- gomp_mutex_lock (&bar->mutex);
+ }
+
+ extern void gomp_barrier_wait (gomp_barrier_t *);
+-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
++extern void gomp_barrier_wait_last (gomp_barrier_t *);
++extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
+
+-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
++static inline gomp_barrier_state_t
++gomp_barrier_wait_start (gomp_barrier_t *bar)
+ {
+- gomp_mutex_lock (&bar->mutex);
+- return ++bar->arrived == bar->total;
++ unsigned int ret = bar->generation;
++ /* Do we need any barrier here or is __sync_add_and_fetch acting
++ as the needed LoadLoad barrier already? */
++ ret += __sync_add_and_fetch (&bar->awaited, -1) == 0;
++ return ret;
++}
++
++static inline bool
++gomp_barrier_last_thread (gomp_barrier_state_t state)
++{
++ return state & 1;
+ }
+
+ #endif /* GOMP_BARRIER_H */
+--- libgomp/config/linux/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,65 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_PTRLOCK_H
++#define GOMP_PTRLOCK_H 1
++
++typedef void *gomp_ptrlock_t;
++
++static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ *ptrlock = ptr;
++}
++
++extern void *gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock);
++static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
++{
++ if ((uintptr_t) *ptrlock > 2)
++ return *ptrlock;
++
++ if (__sync_bool_compare_and_swap (ptrlock, NULL, (uintptr_t) 1))
++ return NULL;
++
++ return gomp_ptrlock_get_slow (ptrlock);
++}
++
++extern void gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr);
++static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ if (!__sync_bool_compare_and_swap (ptrlock, (uintptr_t) 1, ptr))
++ gomp_ptrlock_set_slow (ptrlock, ptr);
++}
++
++static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
++{
++}
++
++#endif /* GOMP_PTRLOCK_H */
+--- libgomp/config/linux/lock.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/lock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -29,11 +29,10 @@
+ primitives. This implementation uses atomic instructions and the futex
+ syscall. */
+
+-#include "libgomp.h"
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/syscall.h>
+-#include "futex.h"
++#include "wait.h"
+
+
+ /* The internal gomp_mutex_t and the external non-recursive omp_lock_t
+@@ -137,7 +136,7 @@ omp_set_nest_lock (omp_nest_lock_t *lock
+ return;
+ }
+
+- futex_wait (&lock->owner, otid);
++ do_wait (&lock->owner, otid);
+ }
+ }
+
+--- libgomp/config/linux/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,70 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#include <endian.h>
++#include <limits.h>
++#include "wait.h"
++
++void *
++gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock)
++{
++ int *intptr;
++ __sync_bool_compare_and_swap (ptrlock, 1, 2);
++
++ /* futex works on ints, not pointers.
++ But a valid work share pointer will be at least
++ 8 byte aligned, so it is safe to assume the low
++ 32-bits of the pointer won't contain values 1 or 2. */
++ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
++#if __BYTE_ORDER == __BIG_ENDIAN
++ if (sizeof (*ptrlock) > sizeof (int))
++ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
++#endif
++ do
++ do_wait (intptr, 2);
++ while (*intptr == 2);
++ __asm volatile ("" : : : "memory");
++ return *ptrlock;
++}
++
++void
++gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ int *intptr;
++
++ *ptrlock = ptr;
++ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
++#if __BYTE_ORDER == __BIG_ENDIAN
++ if (sizeof (*ptrlock) > sizeof (int))
++ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
++#endif
++ futex_wake (intptr, INT_MAX);
++}
+--- libgomp/config/linux/x86/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/x86/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -27,9 +27,6 @@
+
+ /* Provide target-specific access to the futex system call. */
+
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+-
+ #ifdef __LP64__
+ # ifndef SYS_futex
+ # define SYS_futex 202
+@@ -38,14 +35,26 @@
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- register long r10 __asm__("%r10") = 0;
++ register long r10 __asm__("%r10");
+ long res;
+
++ r10 = 0;
+ __asm volatile ("syscall"
+ : "=a" (res)
+- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAIT),
+- "d"(val), "r"(r10)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
++ "d" (val), "r" (r10)
+ : "r11", "rcx", "memory");
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ r10 = 0;
++ __asm volatile ("syscall"
++ : "=a" (res)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
++ "d" (val), "r" (r10)
++ : "r11", "rcx", "memory");
++ }
+ }
+
+ static inline void
+@@ -55,8 +64,19 @@ futex_wake (int *addr, int count)
+
+ __asm volatile ("syscall"
+ : "=a" (res)
+- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAKE), "d"(count)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
++ "d" (count)
+ : "r11", "rcx", "memory");
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ __asm volatile ("syscall"
++ : "=a" (res)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
++ "d" (count)
++ : "r11", "rcx", "memory");
++ }
+ }
+ #else
+ # ifndef SYS_futex
+@@ -65,7 +85,7 @@ futex_wake (int *addr, int count)
+
+ # ifdef __PIC__
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ long res;
+@@ -77,11 +97,12 @@ sys_futex0 (int *addr, int op, int val)
+ : "0"(SYS_futex), "r" (addr), "c"(op),
+ "d"(val), "S"(0)
+ : "memory");
++ return res;
+ }
+
+ # else
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ long res;
+@@ -91,6 +112,7 @@ sys_futex0 (int *addr, int op, int val)
+ : "0"(SYS_futex), "b" (addr), "c"(op),
+ "d"(val), "S"(0)
+ : "memory");
++ return res;
+ }
+
+ # endif /* __PIC__ */
+@@ -98,13 +120,37 @@ sys_futex0 (int *addr, int op, int val)
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long res = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long res = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
+ }
+
+ #endif /* __LP64__ */
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("rep; nop" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
++}
+--- libgomp/config/linux/wait.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/wait.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,68 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_WAIT_H
++#define GOMP_WAIT_H 1
++
++#include "libgomp.h"
++#include <errno.h>
++
++#define FUTEX_WAIT 0
++#define FUTEX_WAKE 1
++#define FUTEX_PRIVATE_FLAG 128L
++
++#ifdef HAVE_ATTRIBUTE_VISIBILITY
++# pragma GCC visibility push(hidden)
++#endif
++
++extern long int gomp_futex_wait, gomp_futex_wake;
++
++#include "futex.h"
++
++static inline void do_wait (int *addr, int val)
++{
++ unsigned long long i, count = gomp_spin_count_var;
++
++ if (__builtin_expect (gomp_managed_threads > gomp_available_cpus, 0))
++ count = gomp_throttled_spin_count_var;
++ for (i = 0; i < count; i++)
++ if (__builtin_expect (*addr != val, 0))
++ return;
++ else
++ cpu_relax ();
++ futex_wait (addr, val);
++}
++
++#ifdef HAVE_ATTRIBUTE_VISIBILITY
++# pragma GCC visibility pop
++#endif
++
++#endif /* GOMP_WAIT_H */
+--- libgomp/config/linux/sparc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/sparc/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int g1 __asm__ ("g1");
+@@ -47,9 +45,9 @@ sys_futex0 (int *addr, int op, int val)
+ o3 = 0;
+
+ #ifdef __arch64__
+-# define SYSCALL_STRING "ta\t0x6d"
++# define SYSCALL_STRING "ta\t0x6d; bcs,a,pt %%xcc, 1f; sub %%g0, %%o0, %%o0; 1:"
+ #else
+-# define SYSCALL_STRING "ta\t0x10"
++# define SYSCALL_STRING "ta\t0x10; bcs,a 1f; sub %%g0, %%o0, %%o0; 1:"
+ #endif
+
+ __asm volatile (SYSCALL_STRING
+@@ -65,16 +63,49 @@ sys_futex0 (int *addr, int op, int val)
+ "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",
+ #endif
+ "cc", "memory");
++ return o0;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++#if defined __arch64__ || defined __sparc_v9__
++ __asm volatile ("membar #LoadLoad" : : : "memory");
++#else
++ __asm volatile ("" : : : "memory");
++#endif
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++#if defined __arch64__ || defined __sparc_v9__
++ __asm volatile ("membar #StoreStore" : : : "memory");
++#else
++ __sync_synchronize ();
++#endif
+ }
+--- libgomp/config/linux/ia64/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/ia64/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,23 +29,24 @@
+
+ #include <sys/syscall.h>
+
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+
+-static inline void
+-sys_futex0(int *addr, int op, int val)
++static inline long
++sys_futex0(int *addr, long op, int val)
+ {
+ register long out0 asm ("out0") = (long) addr;
+ register long out1 asm ("out1") = op;
+ register long out2 asm ("out2") = val;
+ register long out3 asm ("out3") = 0;
++ register long r8 asm ("r8");
++ register long r10 asm ("r10");
+ register long r15 asm ("r15") = SYS_futex;
+
+ __asm __volatile ("break 0x100000"
+- : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3)
++ : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3),
++ "=r"(r8), "=r"(r10)
+ : "r"(r15), "r"(out0), "r"(out1), "r"(out2), "r"(out3)
+- : "memory", "r8", "r10", "out4", "out5", "out6", "out7",
++ : "memory", "out4", "out5", "out6", "out7",
+ /* Non-stacked integer registers, minus r8, r10, r15. */
+ "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18",
+ "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27",
+@@ -56,16 +57,41 @@ sys_futex0(int *addr, int op, int val)
+ "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+ /* Branch registers. */
+ "b6");
++ return r8 & r10;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("hint @pause" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
+ }
+--- libgomp/config/linux/s390/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/s390/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int gpr2 __asm__ ("2");
+@@ -49,16 +47,41 @@ sys_futex0 (int *addr, int op, int val)
+ : "i" (SYS_futex),
+ "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
+ : "memory");
++ return gpr2;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
+ }
+--- libgomp/config/linux/mutex.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/mutex.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,9 +29,10 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
++#include "wait.h"
+
++long int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
++long int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
+
+ void
+ gomp_mutex_lock_slow (gomp_mutex_t *mutex)
+@@ -40,7 +41,7 @@ gomp_mutex_lock_slow (gomp_mutex_t *mute
+ {
+ int oldval = __sync_val_compare_and_swap (mutex, 1, 2);
+ if (oldval != 0)
+- futex_wait (mutex, 2);
++ do_wait (mutex, 2);
+ }
+ while (!__sync_bool_compare_and_swap (mutex, 0, 2));
+ }
+--- libgomp/config/linux/sem.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/sem.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,8 +29,7 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
++#include "wait.h"
+
+
+ void
+@@ -44,7 +43,7 @@ gomp_sem_wait_slow (gomp_sem_t *sem)
+ if (__sync_bool_compare_and_swap (sem, val, val - 1))
+ return;
+ }
+- futex_wait (sem, -1);
++ do_wait (sem, -1);
+ }
+ }
+
+--- libgomp/config/linux/powerpc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/powerpc/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int r0 __asm__ ("r0");
+@@ -50,21 +48,48 @@ sys_futex0 (int *addr, int op, int val)
+ doesn't. It doesn't much matter for us. In the interest of unity,
+ go ahead and clobber it always. */
+
+- __asm volatile ("sc"
++ __asm volatile ("sc; mfcr %0"
+ : "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6)
+ : "r"(r0), "r"(r3), "r"(r4), "r"(r5), "r"(r6)
+ : "r7", "r8", "r9", "r10", "r11", "r12",
+ "cr0", "ctr", "memory");
++ if (__builtin_expect (r0 & (1 << 28), 0))
++ return r3;
++ return 0;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __asm volatile ("eieio" : : : "memory");
+ }
+--- libgomp/config/linux/bar.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/bar.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,32 +29,29 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
+ #include <limits.h>
++#include "wait.h"
+
+
+ void
+-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
++gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t state)
+ {
+- if (last)
++ if (__builtin_expect ((state & 1) != 0, 0))
+ {
+- bar->generation++;
+- futex_wake (&bar->generation, INT_MAX);
++ /* Next time we'll be awaiting TOTAL threads again. */
++ bar->awaited = bar->total;
++ atomic_write_barrier ();
++ bar->generation += 2;
++ futex_wake ((int *) &bar->generation, INT_MAX);
+ }
+ else
+ {
+- unsigned int generation = bar->generation;
+-
+- gomp_mutex_unlock (&bar->mutex);
++ unsigned int generation = state;
+
+ do
+- futex_wait (&bar->generation, generation);
++ do_wait ((int *) &bar->generation, generation);
+ while (bar->generation == generation);
+ }
+-
+- if (__sync_add_and_fetch (&bar->arrived, -1) == 0)
+- gomp_mutex_unlock (&bar->mutex);
+ }
+
+ void
+@@ -62,3 +59,18 @@ gomp_barrier_wait (gomp_barrier_t *barri
+ {
+ gomp_barrier_wait_end (barrier, gomp_barrier_wait_start (barrier));
+ }
++
++/* Like gomp_barrier_wait, except that if the encountering thread
++ is not the last one to hit the barrier, it returns immediately.
++ The intended usage is that a thread which intends to gomp_barrier_destroy
++ this barrier calls gomp_barrier_wait, while all other threads
++ call gomp_barrier_wait_last. When gomp_barrier_wait returns,
++ the barrier can be safely destroyed. */
++
++void
++gomp_barrier_wait_last (gomp_barrier_t *barrier)
++{
++ gomp_barrier_state_t state = gomp_barrier_wait_start (barrier);
++ if (state & 1)
++ gomp_barrier_wait_end (barrier, state);
++}
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 0000000..e9ae1bc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-ppc32-retaddr.patch
@@ -0,0 +1,86 @@
+2005-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
+ read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
+ instead of doing an extran indirection from frame_pointer_rtx.
+
+ * gcc.dg/20051128-1.c: New test.
+
+--- gcc/config/rs6000/rs6000.c.jj 2005-11-26 14:38:01.000000000 +0100
++++ gcc/config/rs6000/rs6000.c 2005-11-28 20:32:18.000000000 +0100
+@@ -13166,17 +13166,22 @@ rs6000_return_addr (int count, rtx frame
+ don't try to be too clever here. */
+ if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
+ {
++ rtx x;
+ cfun->machine->ra_needs_full_frame = 1;
+
+- return
+- gen_rtx_MEM
+- (Pmode,
+- memory_address
+- (Pmode,
+- plus_constant (copy_to_reg
+- (gen_rtx_MEM (Pmode,
+- memory_address (Pmode, frame))),
+- RETURN_ADDRESS_OFFSET)));
++ if (count == 0)
++ {
++ gcc_assert (frame == frame_pointer_rtx);
++ x = arg_pointer_rtx;
++ }
++ else
++ {
++ x = memory_address (Pmode, frame);
++ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
++ }
++
++ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
++ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
+ }
+
+ cfun->machine->ra_need_lr = 1;
+--- gcc/testsuite/gcc.dg/20051128-1.c.jj 2005-10-10 11:21:41.096999000 +0200
++++ gcc/testsuite/gcc.dg/20051128-1.c 2005-11-28 12:30:57.000000000 +0100
+@@ -0,0 +1,41 @@
++/* { dg-do run } */
++/* { dg-options "-O2 -fpic" } */
++
++extern void exit (int);
++extern void abort (void);
++
++int b;
++
++struct A
++{
++ void *pad[147];
++ void *ra, *h;
++ long o;
++};
++
++void
++__attribute__((noinline))
++foo (struct A *a, void *x)
++{
++ __builtin_memset (a, 0, sizeof (a));
++ if (!b)
++ exit (0);
++}
++
++void
++__attribute__((noinline))
++bar (void)
++{
++ struct A a;
++
++ __builtin_unwind_init ();
++ foo (&a, __builtin_return_address (0));
++}
++
++int
++main (void)
++{
++ bar ();
++ abort ();
++ return 0;
++}
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 0000000..172bb81
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr27898.patch
@@ -0,0 +1,16 @@
+2006-08-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/27898
+ * gcc.dg/pr27898.c: New test.
+
+--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
++++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
+@@ -0,0 +1,8 @@
++/* PR c/27898 */
++/* { dg-do compile } */
++/* { dg-options "--combine" } */
++/* { dg-additional-sources "pr27898.c" } */
++
++union u { struct { int i; }; };
++
++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 0000000..f356967
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr32139.patch
@@ -0,0 +1,19 @@
+2007-06-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/32139
+ * gcc.c-torture/compile/20070531-1.c: New test.
+
+--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
++++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
+@@ -0,0 +1,11 @@
++/* PR tree-optimization/32139 */
++int foo (void);
++int bar (void) __attribute__ ((const));
++
++int
++test (int x)
++{
++ int a = (x == 10000 ? foo : bar) ();
++ int b = (x == 10000 ? foo : bar) ();
++ return a + b;
++}
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 0000000..9e9c90d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr33763.patch
@@ -0,0 +1,153 @@
+2007-11-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/33763
+ * gcc.dg/pr33763.c: New test.
+ * g++.dg/opt/inline13.C: New test.
+
+2007-11-06 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/33763
+ * tree-inline.c (expand_call_inline): Silently ignore always_inline
+ attribute for redefined extern inline functions.
+
+--- gcc/tree-inline.c.jj 2007-11-06 09:29:04.000000000 +0100
++++ gcc/tree-inline.c 2007-11-06 16:19:12.000000000 +0100
+@@ -2582,6 +2582,12 @@ expand_call_inline (basic_block bb, tree
+ if (!cgraph_inline_p (cg_edge, &reason))
+ {
+ if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
++ /* For extern inline functions that get redefined we always
++ silently ignored alway_inline flag. Better behaviour would
++ be to be able to keep both bodies and use extern inline body
++ for inlining, but we can't do that because frontends overwrite
++ the body. */
++ && !cg_edge->callee->local.redefined_extern_inline
+ /* Avoid warnings during early inline pass. */
+ && (!flag_unit_at_a_time || cgraph_global_info_ready))
+ {
+--- gcc/testsuite/gcc.dg/pr33763.c.jj 2007-11-06 16:19:12.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr33763.c 2007-11-06 16:19:12.000000000 +0100
+@@ -0,0 +1,60 @@
++/* PR tree-optimization/33763 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef struct
++{
++ void *a;
++ void *b;
++} T;
++extern void *foo (const char *, const char *);
++extern void *bar (void *, const char *, T);
++extern int baz (const char *, int);
++
++extern inline __attribute__ ((always_inline, gnu_inline)) int
++baz (const char *x, int y)
++{
++ return 2;
++}
++
++int
++baz (const char *x, int y)
++{
++ return 1;
++}
++
++int xa, xb;
++
++static void *
++inl (const char *x, const char *y)
++{
++ T t = { &xa, &xb };
++ int *f = (int *) __builtin_malloc (sizeof (int));
++ const char *z;
++ int o = 0;
++ void *r = 0;
++
++ for (z = y; *z; z++)
++ {
++ if (*z == 'r')
++ o |= 1;
++ if (*z == 'w')
++ o |= 2;
++ }
++ if (o == 1)
++ *f = baz (x, 0);
++ if (o == 2)
++ *f = baz (x, 1);
++ if (o == 3)
++ *f = baz (x, 2);
++
++ if (o && *f > 0)
++ r = bar (f, "w", t);
++ return r;
++}
++
++void *
++foo (const char *x, const char *y)
++{
++ return inl (x, y);
++}
+--- gcc/testsuite/g++.dg/opt/inline13.C.jj 2007-11-06 16:20:20.000000000 +0100
++++ gcc/testsuite/g++.dg/opt/inline13.C 2007-11-06 16:21:30.000000000 +0100
+@@ -0,0 +1,60 @@
++// PR tree-optimization/33763
++// { dg-do compile }
++// { dg-options "-O2" }
++
++typedef struct
++{
++ void *a;
++ void *b;
++} T;
++extern void *foo (const char *, const char *);
++extern void *bar (void *, const char *, T);
++extern int baz (const char *, int);
++
++extern inline __attribute__ ((always_inline, gnu_inline)) int
++baz (const char *x, int y)
++{
++ return 2;
++}
++
++int
++baz (const char *x, int y)
++{
++ return 1;
++}
++
++int xa, xb;
++
++static void *
++inl (const char *x, const char *y)
++{
++ T t = { &xa, &xb };
++ int *f = (int *) __builtin_malloc (sizeof (int));
++ const char *z;
++ int o = 0;
++ void *r = 0;
++
++ for (z = y; *z; z++)
++ {
++ if (*z == 'r')
++ o |= 1;
++ if (*z == 'w')
++ o |= 2;
++ }
++ if (o == 1)
++ *f = baz (x, 0);
++ if (o == 2)
++ *f = baz (x, 1);
++ if (o == 3)
++ *f = baz (x, 2);
++
++ if (o && *f > 0)
++ r = bar (f, "w", t);
++ return r;
++}
++
++void *
++foo (const char *x, const char *y)
++{
++ return inl (x, y);
++}
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 0000000..6bf3f0d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35440.patch
@@ -0,0 +1,56 @@
+2008-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/35440
+ * c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
+ for all types.
+
+ * gcc.dg/pr35440.c: New test.
+
+--- gcc/c-pretty-print.c.jj 2008-02-11 14:48:12.000000000 +0100
++++ gcc/c-pretty-print.c 2008-03-19 14:50:09.000000000 +0100
+@@ -1173,6 +1173,12 @@ pp_c_initializer_list (c_pretty_printer
+ tree type = TREE_TYPE (e);
+ const enum tree_code code = TREE_CODE (type);
+
++ if (TREE_CODE (e) == CONSTRUCTOR)
++ {
++ pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
++ return;
++ }
++
+ switch (code)
+ {
+ case RECORD_TYPE:
+@@ -1207,16 +1213,12 @@ pp_c_initializer_list (c_pretty_printer
+ case VECTOR_TYPE:
+ if (TREE_CODE (e) == VECTOR_CST)
+ pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
+- else if (TREE_CODE (e) == CONSTRUCTOR)
+- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+ else
+ break;
+ return;
+
+ case COMPLEX_TYPE:
+- if (TREE_CODE (e) == CONSTRUCTOR)
+- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
+- else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
++ if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
+ {
+ const bool cst = TREE_CODE (e) == COMPLEX_CST;
+ pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
+--- gcc/testsuite/gcc.dg/pr35440.c.jj 2008-03-19 15:57:13.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr35440.c 2008-03-19 15:47:35.000000000 +0100
+@@ -0,0 +1,12 @@
++/* PR c/35440 */
++/* { dg-do compile } */
++/* { dg-options "-std=gnu99" } */
++
++struct A {};
++struct B { int i; char j[2]; };
++
++void foo (void)
++{
++ (struct A){}(); /* { dg-error "called object" } */
++ (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */
++}
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 0000000..37b8427
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-pr35751.patch
@@ -0,0 +1,114 @@
+2008-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/35751
+ * c-decl.c (finish_decl): If extern or static var has variable
+ size, set TREE_TYPE (decl) to error_mark_node.
+
+ * decl.c (layout_var_decl): If extern or static var has variable
+ size, set TREE_TYPE (decl) to error_mark_node.
+
+ * gcc.dg/gomp/pr35751.c: New test.
+ * g++.dg/gomp/pr35751.C: New test.
+
+--- gcc/c-decl.c.jj 2008-04-03 09:41:42.000000000 +0200
++++ gcc/c-decl.c 2008-04-03 18:20:52.000000000 +0200
+@@ -3481,7 +3481,10 @@ finish_decl (tree decl, tree init, tree
+ if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
+ constant_expression_warning (DECL_SIZE (decl));
+ else
+- error ("storage size of %q+D isn%'t constant", decl);
++ {
++ error ("storage size of %q+D isn%'t constant", decl);
++ TREE_TYPE (decl) = error_mark_node;
++ }
+ }
+
+ if (TREE_USED (type))
+--- gcc/cp/decl.c.jj 2008-03-31 23:54:40.000000000 +0200
++++ gcc/cp/decl.c 2008-04-03 18:30:19.000000000 +0200
+@@ -4442,7 +4442,10 @@ layout_var_decl (tree decl)
+ if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
+ constant_expression_warning (DECL_SIZE (decl));
+ else
+- error ("storage size of %qD isn't constant", decl);
++ {
++ error ("storage size of %qD isn't constant", decl);
++ TREE_TYPE (decl) = error_mark_node;
++ }
+ }
+ }
+
+--- gcc/testsuite/gcc.dg/gomp/pr35751.c.jj 2008-04-03 18:26:12.000000000 +0200
++++ gcc/testsuite/gcc.dg/gomp/pr35751.c 2008-04-03 18:25:51.000000000 +0200
+@@ -0,0 +1,34 @@
++/* PR c/35751 */
++/* { dg-do compile } */
++/* { dg-options "-fopenmp" } */
++
++void
++foo (int i)
++{
++ extern int a[i]; /* { dg-error "must have no linkage|storage size of" } */
++ static int b[i]; /* { dg-error "storage size of" } */
++
++#pragma omp parallel
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel shared (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel private (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel firstprivate (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++}
+--- gcc/testsuite/g++.dg/gomp/pr35751.C.jj 2008-04-03 18:32:13.000000000 +0200
++++ gcc/testsuite/g++.dg/gomp/pr35751.C 2008-04-03 18:32:32.000000000 +0200
+@@ -0,0 +1,34 @@
++// PR c/35751
++// { dg-do compile }
++// { dg-options "-fopenmp" }
++
++void
++foo (int i)
++{
++ extern int a[i]; // { dg-error "storage size of" }
++ static int b[i]; // { dg-error "storage size of" }
++
++#pragma omp parallel
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel shared (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel private (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++
++#pragma omp parallel firstprivate (a, b)
++ {
++ a[0] = 0;
++ b[0] = 0;
++ }
++}
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 0000000..e96ae6f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh251682.patch
@@ -0,0 +1,89 @@
+2008-04-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR pch/13675
+ * files.c (struct _cpp_file): Remove pch field.
+ (pch_open_file): Don't set file->pch, just file->pchname.
+ (should_stack_file): After pfile->cb.read_pch call
+ free pchname and clear pchname, don't close file->fd.
+ Test file->pchname instead of file->pch. Don't close fd after cb.
+ (_cpp_stack_include): Test file->pchname instead of file->pch.
+
+ * c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
+
+--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
++++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
+@@ -106,9 +106,6 @@ struct _cpp_file
+
+ /* If BUFFER above contains the true contents of the file. */
+ bool buffer_valid;
+-
+- /* File is a PCH (on return from find_include_file). */
+- bool pch;
+ };
+
+ /* A singly-linked list for all searches for a given file name, with
+@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
+ }
+ closedir (pchdir);
+ }
+- if (valid)
+- file->pch = true;
+- else
++ if (!valid)
+ *invalid_pch = true;
+ }
+
+@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
+ return false;
+
+ /* Handle PCH files immediately; don't stack them. */
+- if (file->pch)
++ if (file->pchname)
+ {
+ pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
+- close (file->fd);
+ file->fd = -1;
++ free ((void *) file->pchname);
++ file->pchname = NULL;
+ return false;
+ }
+
+@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
+ complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
+ found a PCH file (in which case linemap_add is not called) or we
+ were included from the command-line. */
+- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
++ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
+ pfile->line_table->highest_location--;
+
+ return _cpp_stack_file (pfile, file, type == IT_IMPORT);
+--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
++++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
+@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
+ if (f == NULL)
+ {
+ cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
++ close (fd);
+ return;
+ }
+
+@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
+ if (fread (&h, sizeof (h), 1, f) != 1)
+ {
+ cpp_errno (pfile, CPP_DL_ERROR, "reading");
++ fclose (f);
+ return;
+ }
+
+@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
+ gt_pch_restore (f);
+
+ if (cpp_read_state (pfile, name, f, smd) != 0)
+- return;
++ {
++ fclose (f);
++ return;
++ }
+
+ fclose (f);
+
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 0000000..c894f83
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh330771.patch
@@ -0,0 +1,34 @@
+2007-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.am (libgcj_tools_la_LIBADD): Add.
+ * Makefile.in: Regenerated.
+
+--- libjava/Makefile.am.jj 2007-03-17 09:20:30.000000000 +0100
++++ libjava/Makefile.am 2007-10-16 15:45:14.000000000 +0200
+@@ -262,6 +262,8 @@ EXTRA_libgcj_la_SOURCES = java/lang/Obje
+
+ libgcj_tools_la_SOURCES = classpath/tools/tools.zip
+ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
++## See jv_convert_LDADD.
++libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
+ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
+ -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+ libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
+--- libjava/Makefile.in.jj 2007-07-04 21:11:11.000000000 +0200
++++ libjava/Makefile.in 2007-10-16 15:56:07.000000000 +0200
+@@ -146,7 +146,6 @@ am__objects_1 = gnu/gcj/xlib/lib_gnu_awt
+ am_lib_gnu_awt_xlib_la_OBJECTS = $(am__objects_1)
+ lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS)
+ @XLIB_AWT_TRUE@am_lib_gnu_awt_xlib_la_rpath = -rpath $(toolexeclibdir)
+-libgcj_tools_la_LIBADD =
+ am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo
+ libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
+ am__DEPENDENCIES_1 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
+@@ -894,6 +893,7 @@ libgcj_la_LINK = $(LIBLINK)
+ EXTRA_libgcj_la_SOURCES = java/lang/Object.java
+ libgcj_tools_la_SOURCES = classpath/tools/tools.zip
+ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
++libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
+ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
+ -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+
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 0000000..28e73b0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fedora/gcc43-rh341221.patch
@@ -0,0 +1,28 @@
+2007-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ * doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
+ timestamp rather than from current date.
+ * doc/Makefile.in: Regenerated.
+
+--- libjava/classpath/doc/Makefile.am.jj 2007-12-07 17:55:00.000000000 +0100
++++ libjava/classpath/doc/Makefile.am 2007-12-07 18:55:28.000000000 +0100
+@@ -30,7 +30,7 @@ TOOLS_MANFILES = \
+ gserialver.1 \
+ gtnameserv.1
+
+-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
++POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+ STAMP = echo timestamp >
+
+--- libjava/classpath/doc/Makefile.in.jj 2007-12-07 17:55:00.000000000 +0100
++++ libjava/classpath/doc/Makefile.in 2007-12-07 18:55:43.000000000 +0100
+@@ -357,7 +357,7 @@ TOOLS_MANFILES = \
+ gserialver.1 \
+ gtnameserv.1
+
+-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
++POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+ STAMP = echo timestamp >
+ @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 0000000..b3d38ad
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+ used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+ directory.
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index f7d86fb..d0966ec 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -4475,6 +4475,6 @@ exec 5>>./config.log
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${FC_SRCEXT-f}
+ ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
+\ No newline at end of file
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 4661306..9f83e55 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -140,7 +140,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # 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 0000000..3dd6321
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/fortran-static-linking.patch
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # 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 0000000..d1df8b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,319 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+---
+ gcc/config.gcc | 2
+ gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
+ gcc/config/rs6000/rs6000.c | 24 +++++
+ gcc/config/rs6000/rs6000.h | 4
+ gcc/config/rs6000/rs6000.md | 3
+ 5 files changed, 220 insertions(+), 2 deletions(-)
+
+Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
+@@ -0,0 +1,189 @@
++;; Pipeline description for Motorola PowerPC e300c3 core.
++;; Copyright (C) 2003 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++
++;; GCC is free software; you can redistribute it and/or modify it
++;; under the terms of the GNU General Public License as published
++;; by the Free Software Foundation; either version 2, or (at your
++;; option) any later version.
++
++;; GCC is distributed in the hope that it will be useful, but WITHOUT
++;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
++;; License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with GCC; see the file COPYING. If not, write to the
++;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
++;; MA 02111-1307, USA.
++
++(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
++(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
++
++;; We don't simulate general issue queue (GIC). If we have SU insn
++;; and then SU1 insn, they can not be issued on the same cycle
++;; (although SU1 insn and then SU insn can be issued) because the SU
++;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
++;; multipass insn scheduling will find the situation and issue the SU1
++;; insn and then the SU insn.
++(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
++
++;; We could describe completion buffers slots in combination with the
++;; retirement units and the order of completion but the result
++;; automaton would behave in the same way because we can not describe
++;; real latency time with taking in order completion into account.
++;; Actually we could define the real latency time by querying reserved
++;; automaton units but the current scheduler uses latency time before
++;; issuing insns and making any reservations.
++;;
++;; So our description is aimed to achieve a insn schedule in which the
++;; insns would not wait in the completion buffer.
++(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
++
++;; Branch unit:
++(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
++
++;; IU:
++(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
++
++;; IU: This used to describe non-pipelined division.
++(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
++
++;; SRU:
++(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
++
++;; Here we simplified LSU unit description not describing the stages.
++(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
++
++;; FPU:
++(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
++
++;; The following units are used to make automata deterministic
++(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
++(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
++
++;; The following sets to make automata deterministic when option ndfa is used.
++(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
++(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
++(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
++(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
++
++;; Some useful abbreviations.
++(define_reservation "ppce300c3_decode"
++ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
++(define_reservation "ppce300c3_issue"
++ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
++(define_reservation "ppce300c3_retire"
++ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
++(define_reservation "ppce300c3_iu_stage0"
++ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
++
++;; Compares can be executed either one of the IU or SRU
++(define_insn_reservation "ppce300c3_cmp" 1
++ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
++ +ppce300c3_retire")
++
++;; Other one cycle IU insns
++(define_insn_reservation "ppce300c3_iu" 1
++ (and (eq_attr "type" "integer,insert_word")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Branch. Actually this latency time is not used by the scheduler.
++(define_insn_reservation "ppce300c3_branch" 1
++ (and (eq_attr "type" "jmpreg,branch")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
++
++;; Multiply is non-pipelined but can be executed in any IU
++(define_insn_reservation "ppce300c3_multiply" 2
++ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
++ ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Divide. We use the average latency time here. We omit reserving a
++;; retire unit because of the result automata will be huge.
++(define_insn_reservation "ppce300c3_divide" 20
++ (and (eq_attr "type" "idiv")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
++ ppce300c3_mu_div*19")
++
++;; CR logical
++(define_insn_reservation "ppce300c3_cr_logical" 1
++ (and (eq_attr "type" "cr_logical,delayed_cr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mfcr
++(define_insn_reservation "ppce300c3_mfcr" 1
++ (and (eq_attr "type" "mfcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtcrf
++(define_insn_reservation "ppce300c3_mtcrf" 1
++ (and (eq_attr "type" "mtcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtjmpr
++(define_insn_reservation "ppce300c3_mtjmpr" 1
++ (and (eq_attr "type" "mtjmpr,mfjmpr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Float point instructions
++(define_insn_reservation "ppce300c3_fpcompare" 3
++ (and (eq_attr "type" "fpcompare")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fp" 3
++ (and (eq_attr "type" "fp")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_dmul" 4
++ (and (eq_attr "type" "dmul")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
++
++; Divides are not pipelined
++(define_insn_reservation "ppce300c3_sdiv" 18
++ (and (eq_attr "type" "sdiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
++
++(define_insn_reservation "ppce300c3_ddiv" 33
++ (and (eq_attr "type" "ddiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
++
++;; Loads
++(define_insn_reservation "ppce300c3_load" 2
++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpload" 2
++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++;; Stores.
++(define_insn_reservation "ppce300c3_store" 2
++ (and (eq_attr "type" "store,store_ux,store_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpstore" 2
++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
+@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
+ 1, /* prefetch streams /*/
+ };
+
++/* Instruction costs on E300C2 and E300C3 cores. */
++static const
++struct processor_costs ppce300c2c3_cost = {
++ COSTS_N_INSNS (4), /* mulsi */
++ COSTS_N_INSNS (4), /* mulsi_const */
++ COSTS_N_INSNS (4), /* mulsi_const9 */
++ COSTS_N_INSNS (4), /* muldi */
++ COSTS_N_INSNS (19), /* divsi */
++ COSTS_N_INSNS (19), /* divdi */
++ COSTS_N_INSNS (3), /* fp */
++ COSTS_N_INSNS (4), /* dmul */
++ COSTS_N_INSNS (18), /* sdiv */
++ COSTS_N_INSNS (33), /* ddiv */
++};
++
+ /* Instruction costs on POWER4 and POWER5 processors. */
+ static const
+ struct processor_costs power4_cost = {
+@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
+ {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
+ /* 8548 has a dummy entry for now. */
+ {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
++ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
++ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
+ {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
+ {"970", PROCESSOR_POWER4,
+ POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
+@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
+ rs6000_cost = &ppc8540_cost;
+ break;
+
++ case PROCESSOR_PPCE300C2:
++ case PROCESSOR_PPCE300C3:
++ rs6000_cost = &ppce300c2c3_cost;
++ break;
++
+ case PROCESSOR_POWER4:
+ case PROCESSOR_POWER5:
+ rs6000_cost = &power4_cost;
+@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
+ case CPU_PPC7400:
+ case CPU_PPC8540:
+ case CPU_CELL:
++ case CPU_PPCE300C2:
++ case CPU_PPCE300C3:
+ return 2;
+ case CPU_RIOS2:
+ case CPU_PPC604:
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
+@@ -117,6 +117,8 @@
+ %{mcpu=G5: -mpower4 -maltivec} \
+ %{mcpu=8540: -me500} \
+ %{mcpu=8548: -me500} \
++%{mcpu=e300c2: -mppc} \
++%{mcpu=e300c3: -mppc -mpmr} \
+ %{maltivec: -maltivec} \
+ -many"
+
+@@ -262,6 +264,8 @@ enum processor_type
+ PROCESSOR_PPC7400,
+ PROCESSOR_PPC7450,
+ PROCESSOR_PPC8540,
++ PROCESSOR_PPCE300C2,
++ PROCESSOR_PPCE300C3,
+ PROCESSOR_POWER4,
+ PROCESSOR_POWER5,
+ PROCESSOR_POWER6,
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
+@@ -133,7 +133,7 @@
+ ;; Processor type -- this attribute must exactly match the processor_type
+ ;; enumeration in rs6000.h.
+
+-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
++(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"
+ (const (symbol_ref "rs6000_cpu_attr")))
+
+
+@@ -166,6 +166,7 @@
+ (include "7xx.md")
+ (include "7450.md")
+ (include "8540.md")
++(include "e300c2c3.md")
+ (include "power4.md")
+ (include "power5.md")
+ (include "power6.md")
+Index: gcc-4.3.1/gcc/config.gcc
+===================================================================
+--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
++++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
+@@ -3144,7 +3144,7 @@ case "${target}" in
+ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
+ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
+ | 601 | 602 | 603 | 603e | ec603e | 604 \
+- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
++ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
+ | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
+ # OK
+ ;;
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 0000000..81522a8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.2.3-linux-multilib-fix.patch
@@ -0,0 +1,23 @@
+Change gcc build : Enable m4 and m4-nofpu (needed for kernel) for sh4-gnu-linux
+
+Signed-off-by: Carl Shaw <carl.shaw@st.com>
+
+Index: gcc/gcc/config.gcc
+===================================================================
+--- gcc.orig/gcc/config.gcc 2008-07-18 10:37:54.000000000 +0100
++++ gcc/gcc/config.gcc 2008-07-18 11:00:42.000000000 +0100
+@@ -2097,11 +2097,12 @@
+ if test x${sh_multilibs} = x ; then
+ case ${target} in
+ sh64-superh-linux* | \
+- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
+ sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
+- sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
++ sh-superh-* | \
++ sh4-*-linux*) sh_multilibs=m4,m4-nofpu ;;
+ sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
+ sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
++ sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
+ *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
+ esac
+ 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 0000000..f33e6c1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,31 @@
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: gcc-4.3.1/configure.ac
+===================================================================
+--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700
++++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700
+@@ -2352,7 +2352,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+Index: gcc-4.3.1/configure
+===================================================================
+--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700
++++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700
+@@ -5841,7 +5841,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ 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 0000000..1d3936b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,6691 @@
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This 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.
+
+Other changes I had to do include:
+
+- 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.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I 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.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Paolo
+
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ PR bootstrap/32161
+
+ * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
+ * configure: Regenerate.
+
+ * Makefile.def: Define stage_libcflags for all bootstrap stages.
+ * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
+ STAGE4_LIBCFLAGS): New.
+ (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
+ $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
+ (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
+ (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
+ (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
+ for target modules. Don't export LIBCFLAGS.
+ (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
+ $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
+ the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+ (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
+ $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
+ * Makefile.in: Regenerate.
+
+config:
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * mh-ppc-darwin (BOOT_CFLAGS): Reenable.
+
+gcc:
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * doc/install.texi: Correct references to CFLAGS, replacing them
+ with BOOT_CFLAGS. Document flags used during bootstrap for
+ target libraries.
+
+
+---
+ Makefile.def | 25
+ Makefile.in | 1845 ++++++++++++++++++++++++++++++-------------------
+ Makefile.tpl | 91 +-
+ config/mh-ppc-darwin | 3
+ configure | 36
+ configure.ac | 32
+ gcc/Makefile.in | 2
+ gcc/configure | 6
+ gcc/configure.ac | 3
+ gcc/doc/install.texi | 56 -
+ libiberty/Makefile.in | 162 ++--
+ libiberty/configure | 46 -
+ libiberty/configure.ac | 43 -
+ 13 files changed, 1454 insertions(+), 896 deletions(-)
+
+Index: gcc-4.3.3/configure.ac
+===================================================================
+--- gcc-4.3.3.orig/configure.ac 2008-02-01 20:29:30.000000000 -0700
++++ gcc-4.3.3/configure.ac 2009-04-29 18:03:50.025603468 -0700
+@@ -1667,6 +1667,38 @@
+ [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
+ AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++ CFLAGS_FOR_TARGET=$CFLAGS
++ case " $CFLAGS " in
++ *" -O2 "*) ;;
++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++ esac
++ case " $CFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++ esac
++fi
++AC_SUBST(CFLAGS_FOR_TARGET)
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++ CXXFLAGS_FOR_TARGET=$CXXFLAGS
++ case " $CXXFLAGS " in
++ *" -O2 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++ esac
++ case " $CXXFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++ esac
++fi
++AC_SUBST(CXXFLAGS_FOR_TARGET)
++
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+Index: gcc-4.3.3/Makefile.def
+===================================================================
+--- gcc-4.3.3.orig/Makefile.def 2007-10-23 08:53:18.000000000 -0700
++++ gcc-4.3.3/Makefile.def 2009-04-29 18:03:50.029603058 -0700
+@@ -214,6 +214,7 @@
+ flags_to_pass = { flag= INSTALL_DATA ; };
+ flags_to_pass = { flag= INSTALL_PROGRAM ; };
+ flags_to_pass = { flag= INSTALL_SCRIPT ; };
++flags_to_pass = { flag= LDFLAGS_FOR_BUILD ; };
+ flags_to_pass = { flag= LEX ; };
+ flags_to_pass = { flag= M4 ; };
+ flags_to_pass = { flag= MAKE ; };
+@@ -511,43 +512,51 @@
+ // compiler probably has never heard of them.
+ stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
+- stage_cflags='$(STAGE1_CFLAGS)' ; };
++ stage_cflags='$(STAGE1_CFLAGS)' ;
++ stage_libcflags='$(STAGE1_LIBCFLAGS)' ; };
+ bootstrap_stage = {
+ id=2 ; prev=1 ;
+ bootstrap_target=bootstrap2 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags="$(STAGE2_CFLAGS)" ; };
++ stage_cflags="$(STAGE2_CFLAGS)" ;
++ stage_libcflags="$(STAGE2_LIBCFLAGS)" ; };
+ bootstrap_stage = {
+ id=b2g0 ; prev=1 ;
+ bootstrap_target=bootstrap2-debug ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags="$(STAGE2_CFLAGS) -g0" ; };
++ stage_cflags="$(STAGE2_CFLAGS) -g0" ;
++ stage_libcflags="$(STAGE2_LIBCFLAGS) -g0" ; };
+ bootstrap_stage = {
+ id=3 ; prev=2 ; lean=1 ;
+ compare_target=compare ;
+ bootstrap_target=bootstrap ;
+ cleanstrap_target=cleanstrap ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags="$(STAGE3_CFLAGS)" ; };
++ stage_cflags="$(STAGE3_CFLAGS)" ;
++ stage_libcflags="$(STAGE3_LIBCFLAGS)" ; };
+ bootstrap_stage = {
+ id=b3g2 ; prev=b2g0 ; lean=1 ;
+ compare_target=compare-debug ;
+ bootstrap_target=bootstrap-debug ;
+ cleanstrap_target=cleanstrap-debug ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags="$(STAGE3_CFLAGS) -g2" ; };
++ stage_cflags="$(STAGE3_CFLAGS) -g2" ;
++ stage_libcflags="$(STAGE3_LIBCFLAGS) -g2" ; };
+ bootstrap_stage = {
+ id=4 ; prev=3 ; lean=2 ;
+ compare_target=compare3 ;
+ bootstrap_target=bootstrap4 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags="$(STAGE4_CFLAGS)" ; };
++ stage_cflags="$(STAGE4_CFLAGS)" ;
++ stage_libcflags="$(STAGE4_CFLAGS)" ; };
+ bootstrap_stage = {
+ id=profile ; prev=1 ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ; };
++ stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ;
++ stage_libcflags='$(STAGE2_LIBCFLAGS) -fprofile-generate' ; };
+ bootstrap_stage = {
+ id=feedback ; prev=profile ;
+ bootstrap_target=profiledbootstrap ;
+ stage_configure_flags="@stage2_werror_flag@" ;
+- stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ; };
++ stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ;
++ stage_libcflags='$(STAGE3_LIBCFLAGS) -fprofile-use' ; };
+Index: gcc-4.3.3/Makefile.tpl
+===================================================================
+--- gcc-4.3.3.orig/Makefile.tpl 2008-08-16 00:28:01.000000000 -0700
++++ gcc-4.3.3/Makefile.tpl 2009-04-29 18:04:16.836611837 -0700
+@@ -23,6 +23,14 @@
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+
++# First, test for a proper version of make, but only where one is required.
++
++@if gcc
++ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty.
++$(error GNU make version 3.80 or newer is required.)
++endif
++@endif gcc
++
+ # -------------------------------
+ # Standard Autoconf-set variables
+ # -------------------------------
+@@ -139,6 +147,13 @@
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
+ WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
+
++# These variables must be set on the make command line for directories
++# built for the build system to override those in BASE_FLAGS_TO_PASSS.
++EXTRA_BUILD_FLAGS = \
++ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
++ LIBCFLAGS=""
++
+ # This is the list of directories to built for the host system.
+ SUBDIRS = @configdirs@
+ # This is set by the configure script to the arguments to use when configuring
+@@ -153,6 +168,7 @@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+@@ -207,10 +223,10 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
++ CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+@@ -323,7 +339,6 @@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-PICFLAG =
+
+ # Only build the C compiler for stage1, because that is the only one that
+ # we can guarantee will build with the native compiler, and also it is the
+@@ -331,14 +346,19 @@
+ # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+ # overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+-STAGE1_CFLAGS=@stage1_cflags@
+ STAGE1_CHECKING=@stage1_checking@
+ STAGE1_LANGUAGES=@stage1_languages@
+
++STAGE1_CFLAGS=@stage1_cflags@
+ STAGE2_CFLAGS=$(BOOT_CFLAGS)
+ STAGE3_CFLAGS=$(BOOT_CFLAGS)
+ STAGE4_CFLAGS=$(BOOT_CFLAGS)
+
++STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++
+ do-compare = @do_compare@
+ do-compare3 = $(do-compare)
+ do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
+@@ -377,22 +397,14 @@
+ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
+ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
+
+-# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
+-# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
+-# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
+-# We want to ensure that TARGET libraries (which we know are built with
+-# gcc) are built with "-O2 -g", so prepend those options when setting
+-# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
+- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
++CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
+-CXXFLAGS_FOR_TARGET = -O2 -g $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
+- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
++
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
+-PICFLAG_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+
+ # ------------------------------------
+ # Miscellaneous targets and flag lists
+@@ -492,19 +504,20 @@
+ # Flags to pass down to makes which are built with the target environment.
+ # The double $ decreases the length of the command line; those variables
+ # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
+-# COMPILER_ prefixed variables are not passed down so we expand them here.
++# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
++# so we expand them here.
+ EXTRA_TARGET_FLAGS = \
+ 'AR=$$(AR_FOR_TARGET)' \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
+ 'CC=$$(CC_FOR_TARGET)' \
+- 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
++ 'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'CXX=$$(CXX_FOR_TARGET)' \
+- 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
++ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
+ 'LD=$(COMPILER_LD_FOR_TARGET)' \
+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
+- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
+- 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
++ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
++ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'NM=$(COMPILER_NM_FOR_TARGET)' \
+ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
+ 'RANLIB=$$(RANLIB_FOR_TARGET)' \
+@@ -852,9 +865,11 @@
+ fi; \
+ [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
+ [+exports+][+ IF prev +] \
+- [+poststage1_exports+][+ ENDIF prev +] \
++ [+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \
++ CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \
+ CFLAGS="[+stage_cflags+]"; export CFLAGS; \
+- LIBCFLAGS="[+stage_cflags+]"; export LIBCFLAGS; \
++ CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \
+ echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ cd [+subdir+]/[+module+] || exit 1; \
+@@ -891,7 +906,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ [+exports+] \
+ (cd [+subdir+]/[+module+] && \
+- $(MAKE) [+args+] [+extra_make_flags+] $(TARGET-[+prefix+][+module+]))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
++ $(TARGET-[+prefix+][+module+]))
+ @endif [+prefix+][+module+]
+
+ [+ IF bootstrap +]
+@@ -911,8 +927,11 @@
+ [+exports+][+ IF prev +] \
+ [+poststage1_exports+][+ ENDIF prev +] \
+ cd [+subdir+]/[+module+] && \
+- $(MAKE) [+args+] \
+- CFLAGS="[+stage_cflags+]" LIBCFLAGS="[+stage_cflags+]" [+
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \
++ LIBCFLAGS="[+stage_libcflags+]" \
++ CFLAGS_FOR_TARGET="[+stage_libcflags+]" \
++ CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+
+ IF prev +][+poststage1_args+][+ ENDIF prev
+ +] [+extra_make_flags+] \
+ $(TARGET-stage[+id+]-[+prefix+][+module+])
+@@ -945,7 +964,8 @@
+ target_alias=(get "target" "${target_alias}")
+ args="$(BUILD_CONFIGARGS)" no-config-site=true +]
+
+-[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
++[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
++ args="$(EXTRA_BUILD_FLAGS)" +]
+ [+ ENDFOR build_module +]
+
+ # --------------------------------------
+@@ -962,7 +982,7 @@
+ [+ all prefix="" subdir="$(HOST_SUBDIR)"
+ exports="$(HOST_EXPORTS)"
+ poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
+- args="$(FLAGS_TO_PASS)"
++ args="$(EXTRA_HOST_FLAGS)"
+ poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
+
+ .PHONY: check-[+module+] maybe-check-[+module+]
+@@ -1060,7 +1080,7 @@
+
+ [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
+ exports="$(RAW_CXX_TARGET_EXPORTS)"
+- args="$(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
++ args="$(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
+ [+ ELSE +]
+ [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
+ check_multilibs=true
+@@ -1071,7 +1091,7 @@
+
+ [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
+ exports="$(NORMAL_TARGET_EXPORTS)"
+- args="$(TARGET_FLAGS_TO_PASS)" +]
++ args="$(EXTRA_TARGET_FLAGS)" +]
+ [+ ENDIF +]
+
+ .PHONY: check-target-[+module+] maybe-check-target-[+module+]
+@@ -1301,7 +1321,7 @@
+
+ # Bubble a bug fix through all the stages up to stage [+id+]. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stage[+id+]-bubble
+ stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -1440,11 +1460,11 @@
+ @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
+
+ .PHONY: restrap
+-restrap:
++restrap::
+ @: $(MAKE); $(stage)
+ rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
+ +]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
+- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
++restrap:: all
+ @endif gcc-bootstrap
+
+ # --------------------------------------
+@@ -1475,7 +1495,7 @@
+
+ [+ ;; These Scheme functions build the bulk of the dependencies.
+ ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
+- ;; where "maybe-" is only included if HARD is true, and all-gcc
++ ;; where "maybe-" is only included if HARD is not true, and all-gcc
+ ;; is taken from VAR-NAME.
+ (define dep-target (lambda (module-kind var-name hard)
+ (string-append
+@@ -1633,7 +1653,8 @@
+
+ # Rebuilding configure.
+ AUTOCONF = autoconf
+-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
++$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
++ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
+ cd $(srcdir) && $(AUTOCONF)
+
+ # ------------------------------
+Index: gcc-4.3.3/config/mh-ppc-darwin
+===================================================================
+--- gcc-4.3.3.orig/config/mh-ppc-darwin 2007-05-23 07:26:31.000000000 -0700
++++ gcc-4.3.3/config/mh-ppc-darwin 2009-04-29 18:03:50.057603252 -0700
+@@ -2,5 +2,4 @@
+ # position-independent-code -- the usual default on Darwin. This fix speeds
+ # compiles by 3-5%.
+
+-# Broken because of PR32009.
+-# BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
++BOOT_CFLAGS=-g -O2 -mdynamic-no-pic
+Index: gcc-4.3.3/gcc/doc/install.texi
+===================================================================
+--- gcc-4.3.3.orig/gcc/doc/install.texi 2009-01-06 17:52:26.000000000 -0700
++++ gcc-4.3.3/gcc/doc/install.texi 2009-04-29 18:03:50.065603803 -0700
+@@ -1778,33 +1778,35 @@
+ stage2 of the 3-stage bootstrap of the compiler are deleted as
+ soon as they are no longer needed.
+
+-If you want to save additional space during the bootstrap and in
+-the final installation as well, you can build the compiler binaries
+-without debugging information as in the following example. This will save
+-roughly 40% of disk space both for the bootstrap and the final installation.
+-(Libraries will still contain debugging information.)
+-
+-@smallexample
+- make CFLAGS='-O' LIBCFLAGS='-g -O2' \
+- LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
+-@end smallexample
+-
+-If you wish to use non-default GCC flags when compiling the stage2 and
+-stage3 compilers, set @code{BOOT_CFLAGS} on the command line when doing
+-@samp{make}. Non-default optimization flags are less well
+-tested here than the default of @samp{-g -O2}, but should still work.
+-In a few cases, you may find that you need to specify special flags such
+-as @option{-msoft-float} here to complete the bootstrap; or, if the
+-native compiler miscompiles the stage1 compiler, you may need to work
+-around this, by choosing @code{BOOT_CFLAGS} to avoid the parts of the
+-stage1 compiler that were miscompiled, or by using @samp{make
++If you wish to use non-default GCC flags when compiling the stage2
++and stage3 compilers, set @code{BOOT_CFLAGS} on the command line when
++doing @samp{make}. For example, if you want to save additional space
++during the bootstrap and in the final installation as well, you can
++build the compiler binaries without debugging information as in the
++following example. This will save roughly 40% of disk space both for
++the bootstrap and the final installation. (Libraries will still contain
++debugging information.)
++
++@smallexample
++ make BOOT_CFLAGS='-O' bootstrap
++@end smallexample
++
++You can place non-default optimization flags into @code{BOOT_CFLAGS}; they
++are less well tested here than the default of @samp{-g -O2}, but should
++still work. In a few cases, you may find that you need to specify special
++flags such as @option{-msoft-float} here to complete the bootstrap; or,
++if the native compiler miscompiles the stage1 compiler, you may need
++to work around this, by choosing @code{BOOT_CFLAGS} to avoid the parts
++of the stage1 compiler that were miscompiled, or by using @samp{make
+ bootstrap4} to increase the number of stages of bootstrap.
+
+-Note that using non-standard @code{CFLAGS} can cause bootstrap to fail
+-if these trigger a warning with the new compiler. For example using
+-@samp{-O2 -g -mcpu=i686} on @code{i686-pc-linux-gnu} will cause bootstrap
+-failure as @option{-mcpu=} is deprecated in 3.4.0 and above.
+-
++@code{BOOT_CFLAGS} does not apply to bootstrapped target libraries.
++Since these are always compiled with the compiler currently being
++bootstrapped, you can use @code{CFLAGS_FOR_TARGET} to modify their
++compilation flags, as for non-bootstrapped target libraries.
++Again, if the native compiler miscompiles the stage1 compiler, you may
++need to work around this by avoiding non-working parts of the stage1
++compiler. Use @code{STAGE1_LIBCFLAGS} to this end.
+
+ If you used the flag @option{--enable-languages=@dots{}} to restrict
+ the compilers to be built, only those you've actually enabled will be
+@@ -2687,8 +2689,8 @@
+ stamp.
+
+ @samp{make compare} may fail on old versions of DEC Unix unless you add
+-@option{-save-temps} to @code{CFLAGS}. On these systems, the name of the
+-assembler input file is stored in the object file, and that makes
++@option{-save-temps} to @code{BOOT_CFLAGS}. On these systems, the name
++of the assembler input file is stored in the object file, and that makes
+ comparison fail if it differs between the @code{stage1} and
+ @code{stage2} compilations. The option @option{-save-temps} forces a
+ fixed name to be used for the assembler input file, instead of a
+Index: gcc-4.3.3/Makefile.in
+===================================================================
+--- gcc-4.3.3.orig/Makefile.in 2008-08-16 00:28:01.000000000 -0700
++++ gcc-4.3.3/Makefile.in 2009-04-29 18:04:32.133111439 -0700
+@@ -20,6 +20,14 @@
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+
++# First, test for a proper version of make, but only where one is required.
++
++@if gcc
++ifeq (,$(.VARIABLES)) # The variable .VARIABLES, new with 3.80, is never empty.
++$(error GNU make version 3.80 or newer is required.)
++endif
++@endif gcc
++
+ # -------------------------------
+ # Standard Autoconf-set variables
+ # -------------------------------
+@@ -136,6 +144,13 @@
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
+ WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
+
++# These variables must be set on the make command line for directories
++# built for the build system to override those in BASE_FLAGS_TO_PASSS.
++EXTRA_BUILD_FLAGS = \
++ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
++ LIBCFLAGS=""
++
+ # This is the list of directories to built for the host system.
+ SUBDIRS = @configdirs@
+ # This is set by the configure script to the arguments to use when configuring
+@@ -150,6 +165,7 @@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX)"; export CXX; \
+@@ -204,10 +220,10 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+- CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
++ CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+@@ -320,7 +336,6 @@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-PICFLAG =
+
+ # Only build the C compiler for stage1, because that is the only one that
+ # we can guarantee will build with the native compiler, and also it is the
+@@ -328,14 +343,19 @@
+ # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+ # overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+-STAGE1_CFLAGS=@stage1_cflags@
+ STAGE1_CHECKING=@stage1_checking@
+ STAGE1_LANGUAGES=@stage1_languages@
+
++STAGE1_CFLAGS=@stage1_cflags@
+ STAGE2_CFLAGS=$(BOOT_CFLAGS)
+ STAGE3_CFLAGS=$(BOOT_CFLAGS)
+ STAGE4_CFLAGS=$(BOOT_CFLAGS)
+
++STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
++
+ do-compare = @do_compare@
+ do-compare3 = $(do-compare)
+ do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
+@@ -374,22 +394,14 @@
+ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
+ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
+
+-# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
+-# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
+-# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
+-# We want to ensure that TARGET libraries (which we know are built with
+-# gcc) are built with "-O2 -g", so prepend those options when setting
+-# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
+- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
++CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
+-CXXFLAGS_FOR_TARGET = -O2 -g $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
+- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
++
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
+-PICFLAG_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+
+ # ------------------------------------
+ # Miscellaneous targets and flag lists
+@@ -496,6 +508,7 @@
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
++ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \
+ "LEX=$(LEX)" \
+ "M4=$(M4)" \
+ "MAKE=$(MAKE)" \
+@@ -592,19 +605,20 @@
+ # Flags to pass down to makes which are built with the target environment.
+ # The double $ decreases the length of the command line; those variables
+ # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
+-# COMPILER_ prefixed variables are not passed down so we expand them here.
++# *_CFLAGS_FOR_TARGET variables are not passed down and most often empty,
++# so we expand them here.
+ EXTRA_TARGET_FLAGS = \
+ 'AR=$$(AR_FOR_TARGET)' \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
+ 'CC=$$(CC_FOR_TARGET)' \
+- 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
++ 'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'CXX=$$(CXX_FOR_TARGET)' \
+- 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
++ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
+ 'LD=$(COMPILER_LD_FOR_TARGET)' \
+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
+- 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
+- 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
++ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
++ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+ 'NM=$(COMPILER_NM_FOR_TARGET)' \
+ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
+ 'RANLIB=$$(RANLIB_FOR_TARGET)' \
+@@ -2738,7 +2752,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/libiberty && \
+- $(MAKE) $(TARGET-build-libiberty))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-libiberty))
+ @endif build-libiberty
+
+
+@@ -2793,7 +2808,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/bison && \
+- $(MAKE) $(TARGET-build-bison))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-bison))
+ @endif build-bison
+
+
+@@ -2848,7 +2864,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/byacc && \
+- $(MAKE) $(TARGET-build-byacc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-byacc))
+ @endif build-byacc
+
+
+@@ -2903,7 +2920,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/flex && \
+- $(MAKE) $(TARGET-build-flex))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-flex))
+ @endif build-flex
+
+
+@@ -2958,7 +2976,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/m4 && \
+- $(MAKE) $(TARGET-build-m4))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-m4))
+ @endif build-m4
+
+
+@@ -3013,7 +3032,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/texinfo && \
+- $(MAKE) $(TARGET-build-texinfo))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-texinfo))
+ @endif build-texinfo
+
+
+@@ -3068,7 +3088,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/fixincludes && \
+- $(MAKE) $(TARGET-build-fixincludes))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
++ $(TARGET-build-fixincludes))
+ @endif build-fixincludes
+
+
+@@ -3127,7 +3148,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ash && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ash))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-ash))
+ @endif ash
+
+
+@@ -3551,7 +3573,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/autoconf && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-autoconf))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-autoconf))
+ @endif autoconf
+
+
+@@ -3975,7 +3998,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/automake && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-automake))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-automake))
+ @endif automake
+
+
+@@ -4399,7 +4423,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bash && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bash))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-bash))
+ @endif bash
+
+
+@@ -4816,9 +4841,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -4847,9 +4872,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -4878,9 +4903,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -4909,9 +4934,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -4940,9 +4965,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -4971,9 +4996,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -5002,9 +5027,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -5033,9 +5058,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ cd $(HOST_SUBDIR)/bfd || exit 1; \
+@@ -5070,7 +5095,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bfd))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-bfd))
+ @endif bfd
+
+
+@@ -5089,8 +5115,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-bfd)
+
+ maybe-clean-stage1-bfd: clean-stage1-bfd
+@@ -5103,7 +5132,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif bfd-bootstrap
+
+@@ -5123,8 +5152,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-bfd)
+
+ maybe-clean-stage2-bfd: clean-stage2-bfd
+@@ -5137,7 +5169,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5158,8 +5190,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-bfd)
+
+ maybe-clean-stageb2g0-bfd: clean-stageb2g0-bfd
+@@ -5172,7 +5207,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5193,8 +5228,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-bfd)
+
+ maybe-clean-stage3-bfd: clean-stage3-bfd
+@@ -5207,7 +5245,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5228,8 +5266,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-bfd)
+
+ maybe-clean-stageb3g2-bfd: clean-stageb3g2-bfd
+@@ -5242,7 +5283,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5263,8 +5304,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-bfd)
+
+ maybe-clean-stage4-bfd: clean-stage4-bfd
+@@ -5277,7 +5321,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5298,8 +5342,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-bfd)
+
+ maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
+@@ -5312,7 +5359,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5333,8 +5380,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-bfd)
+
+ maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
+@@ -5347,7 +5397,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/bfd && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif bfd-bootstrap
+@@ -5754,9 +5804,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5785,9 +5835,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5816,9 +5866,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5847,9 +5897,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5878,9 +5928,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5909,9 +5959,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5940,9 +5990,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -5971,9 +6021,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ cd $(HOST_SUBDIR)/opcodes || exit 1; \
+@@ -6008,7 +6058,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-opcodes))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-opcodes))
+ @endif opcodes
+
+
+@@ -6027,8 +6078,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-opcodes)
+
+ maybe-clean-stage1-opcodes: clean-stage1-opcodes
+@@ -6041,7 +6095,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif opcodes-bootstrap
+
+@@ -6061,8 +6115,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-opcodes)
+
+ maybe-clean-stage2-opcodes: clean-stage2-opcodes
+@@ -6075,7 +6132,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6096,8 +6153,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-opcodes)
+
+ maybe-clean-stageb2g0-opcodes: clean-stageb2g0-opcodes
+@@ -6110,7 +6170,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6131,8 +6191,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-opcodes)
+
+ maybe-clean-stage3-opcodes: clean-stage3-opcodes
+@@ -6145,7 +6208,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6166,8 +6229,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-opcodes)
+
+ maybe-clean-stageb3g2-opcodes: clean-stageb3g2-opcodes
+@@ -6180,7 +6246,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6201,8 +6267,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-opcodes)
+
+ maybe-clean-stage4-opcodes: clean-stage4-opcodes
+@@ -6215,7 +6284,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6236,8 +6305,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-opcodes)
+
+ maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
+@@ -6250,7 +6322,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6271,8 +6343,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-opcodes)
+
+ maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
+@@ -6285,7 +6360,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/opcodes && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif opcodes-bootstrap
+@@ -6692,9 +6767,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6723,9 +6798,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6754,9 +6829,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6785,9 +6860,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6816,9 +6891,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6847,9 +6922,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6878,9 +6953,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6909,9 +6984,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ cd $(HOST_SUBDIR)/binutils || exit 1; \
+@@ -6946,7 +7021,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-binutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-binutils))
+ @endif binutils
+
+
+@@ -6965,8 +7041,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-binutils)
+
+ maybe-clean-stage1-binutils: clean-stage1-binutils
+@@ -6979,7 +7058,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif binutils-bootstrap
+
+@@ -6999,8 +7078,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-binutils)
+
+ maybe-clean-stage2-binutils: clean-stage2-binutils
+@@ -7013,7 +7095,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7034,8 +7116,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-binutils)
+
+ maybe-clean-stageb2g0-binutils: clean-stageb2g0-binutils
+@@ -7048,7 +7133,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7069,8 +7154,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-binutils)
+
+ maybe-clean-stage3-binutils: clean-stage3-binutils
+@@ -7083,7 +7171,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7104,8 +7192,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-binutils)
+
+ maybe-clean-stageb3g2-binutils: clean-stageb3g2-binutils
+@@ -7118,7 +7209,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7139,8 +7230,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-binutils)
+
+ maybe-clean-stage4-binutils: clean-stage4-binutils
+@@ -7153,7 +7247,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7174,8 +7268,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-binutils)
+
+ maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
+@@ -7188,7 +7285,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7209,8 +7306,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-binutils)
+
+ maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
+@@ -7223,7 +7323,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/binutils && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif binutils-bootstrap
+@@ -7637,7 +7737,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bison && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bison))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-bison))
+ @endif bison
+
+
+@@ -8064,7 +8165,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/byacc && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-byacc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-byacc))
+ @endif byacc
+
+
+@@ -8491,7 +8593,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-bzip2))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-bzip2))
+ @endif bzip2
+
+
+@@ -8915,7 +9018,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dejagnu))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-dejagnu))
+ @endif dejagnu
+
+
+@@ -9339,7 +9443,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/diff && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-diff))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-diff))
+ @endif diff
+
+
+@@ -9763,7 +9868,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/dosutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-dosutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-dosutils))
+ @endif dosutils
+
+
+@@ -10181,7 +10287,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/etc && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-etc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-etc))
+ @endif etc
+
+
+@@ -10605,7 +10712,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fastjar && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fastjar))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-fastjar))
+ @endif fastjar
+
+
+@@ -11032,7 +11140,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fileutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fileutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-fileutils))
+ @endif fileutils
+
+
+@@ -11456,7 +11565,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/findutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-findutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-findutils))
+ @endif findutils
+
+
+@@ -11880,7 +11990,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/find && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-find))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-find))
+ @endif find
+
+
+@@ -12304,7 +12415,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-fixincludes))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-fixincludes))
+ @endif fixincludes
+
+
+@@ -12712,7 +12824,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/flex && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-flex))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-flex))
+ @endif flex
+
+
+@@ -13132,9 +13245,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13163,9 +13276,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13194,9 +13307,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13225,9 +13338,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13256,9 +13369,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13287,9 +13400,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13318,9 +13431,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13349,9 +13462,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ cd $(HOST_SUBDIR)/gas || exit 1; \
+@@ -13386,7 +13499,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gas))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gas))
+ @endif gas
+
+
+@@ -13405,8 +13519,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-gas)
+
+ maybe-clean-stage1-gas: clean-stage1-gas
+@@ -13419,7 +13536,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif gas-bootstrap
+
+@@ -13439,8 +13556,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-gas)
+
+ maybe-clean-stage2-gas: clean-stage2-gas
+@@ -13453,7 +13573,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13474,8 +13594,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-gas)
+
+ maybe-clean-stageb2g0-gas: clean-stageb2g0-gas
+@@ -13488,7 +13611,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13509,8 +13632,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-gas)
+
+ maybe-clean-stage3-gas: clean-stage3-gas
+@@ -13523,7 +13649,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13544,8 +13670,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-gas)
+
+ maybe-clean-stageb3g2-gas: clean-stageb3g2-gas
+@@ -13558,7 +13687,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13579,8 +13708,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-gas)
+
+ maybe-clean-stage4-gas: clean-stage4-gas
+@@ -13593,7 +13725,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13614,8 +13746,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-gas)
+
+ maybe-clean-stageprofile-gas: clean-stageprofile-gas
+@@ -13628,7 +13763,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -13649,8 +13784,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-gas)
+
+ maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
+@@ -13663,7 +13801,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gas && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gas-bootstrap
+@@ -14070,9 +14208,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14101,9 +14239,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14132,9 +14270,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14163,9 +14301,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14194,9 +14332,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14225,9 +14363,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14256,9 +14394,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14287,9 +14425,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ cd $(HOST_SUBDIR)/gcc || exit 1; \
+@@ -14324,7 +14462,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(TARGET-gcc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
++ $(TARGET-gcc))
+ @endif gcc
+
+
+@@ -14343,8 +14482,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stage1-gcc)
+
+ maybe-clean-stage1-gcc: clean-stage1-gcc
+@@ -14357,7 +14499,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+
+@@ -14377,8 +14519,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stage2-gcc)
+
+ maybe-clean-stage2-gcc: clean-stage2-gcc
+@@ -14391,7 +14536,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14412,8 +14557,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stageb2g0-gcc)
+
+ maybe-clean-stageb2g0-gcc: clean-stageb2g0-gcc
+@@ -14426,7 +14574,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14447,8 +14595,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stage3-gcc)
+
+ maybe-clean-stage3-gcc: clean-stage3-gcc
+@@ -14461,7 +14612,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14482,8 +14633,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stageb3g2-gcc)
+
+ maybe-clean-stageb3g2-gcc: clean-stageb3g2-gcc
+@@ -14496,7 +14650,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14517,8 +14671,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stage4-gcc)
+
+ maybe-clean-stage4-gcc: clean-stage4-gcc
+@@ -14531,7 +14688,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14552,8 +14709,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stageprofile-gcc)
+
+ maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
+@@ -14566,7 +14726,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -14587,8 +14747,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(TARGET-stagefeedback-gcc)
+
+ maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
+@@ -14601,7 +14764,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gcc && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_GCC_FLAGS) clean
+ @endif gcc-bootstrap
+@@ -15015,7 +15178,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gawk && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gawk))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gawk))
+ @endif gawk
+
+
+@@ -15439,7 +15603,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gettext && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gettext))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gettext))
+ @endif gettext
+
+
+@@ -15856,9 +16021,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -15887,9 +16052,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -15918,9 +16083,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -15949,9 +16114,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -15980,9 +16145,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -16011,9 +16176,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -16042,9 +16207,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -16073,9 +16238,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+@@ -16110,7 +16275,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gmp))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gmp))
+ @endif gmp
+
+
+@@ -16129,8 +16295,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-gmp)
+
+ maybe-clean-stage1-gmp: clean-stage1-gmp
+@@ -16143,7 +16312,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif gmp-bootstrap
+
+@@ -16163,8 +16332,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-gmp)
+
+ maybe-clean-stage2-gmp: clean-stage2-gmp
+@@ -16177,7 +16349,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16198,8 +16370,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-gmp)
+
+ maybe-clean-stageb2g0-gmp: clean-stageb2g0-gmp
+@@ -16212,7 +16387,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16233,8 +16408,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-gmp)
+
+ maybe-clean-stage3-gmp: clean-stage3-gmp
+@@ -16247,7 +16425,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16268,8 +16446,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-gmp)
+
+ maybe-clean-stageb3g2-gmp: clean-stageb3g2-gmp
+@@ -16282,7 +16463,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16303,8 +16484,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-gmp)
+
+ maybe-clean-stage4-gmp: clean-stage4-gmp
+@@ -16317,7 +16501,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16338,8 +16522,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-gmp)
+
+ maybe-clean-stageprofile-gmp: clean-stageprofile-gmp
+@@ -16352,7 +16539,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16373,8 +16560,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-gmp)
+
+ maybe-clean-stagefeedback-gmp: clean-stagefeedback-gmp
+@@ -16387,7 +16577,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif gmp-bootstrap
+@@ -16788,9 +16978,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16819,9 +17009,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16850,9 +17040,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16881,9 +17071,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16912,9 +17102,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16943,9 +17133,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -16974,9 +17164,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -17005,9 +17195,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+@@ -17042,7 +17232,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mpfr))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-mpfr))
+ @endif mpfr
+
+
+@@ -17061,8 +17252,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-mpfr)
+
+ maybe-clean-stage1-mpfr: clean-stage1-mpfr
+@@ -17075,7 +17269,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif mpfr-bootstrap
+
+@@ -17095,8 +17289,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-mpfr)
+
+ maybe-clean-stage2-mpfr: clean-stage2-mpfr
+@@ -17109,7 +17306,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17130,8 +17327,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-mpfr)
+
+ maybe-clean-stageb2g0-mpfr: clean-stageb2g0-mpfr
+@@ -17144,7 +17344,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17165,8 +17365,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-mpfr)
+
+ maybe-clean-stage3-mpfr: clean-stage3-mpfr
+@@ -17179,7 +17382,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17200,8 +17403,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-mpfr)
+
+ maybe-clean-stageb3g2-mpfr: clean-stageb3g2-mpfr
+@@ -17214,7 +17420,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17235,8 +17441,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-mpfr)
+
+ maybe-clean-stage4-mpfr: clean-stage4-mpfr
+@@ -17249,7 +17458,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17270,8 +17479,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-mpfr)
+
+ maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr
+@@ -17284,7 +17496,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17305,8 +17517,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-mpfr)
+
+ maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr
+@@ -17319,7 +17534,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif mpfr-bootstrap
+@@ -17727,7 +17942,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnuserv))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gnuserv))
+ @endif gnuserv
+
+
+@@ -18151,7 +18367,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gprof && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gprof))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gprof))
+ @endif gprof
+
+
+@@ -18575,7 +18792,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gzip && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gzip))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gzip))
+ @endif gzip
+
+
+@@ -18999,7 +19217,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/hello && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-hello))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-hello))
+ @endif hello
+
+
+@@ -19423,7 +19642,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/indent && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-indent))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-indent))
+ @endif indent
+
+
+@@ -19840,9 +20060,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -19871,9 +20091,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -19902,9 +20122,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -19933,9 +20153,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -19964,9 +20184,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -19995,9 +20215,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -20026,9 +20246,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -20057,9 +20277,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ cd $(HOST_SUBDIR)/intl || exit 1; \
+@@ -20094,7 +20314,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-intl))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-intl))
+ @endif intl
+
+
+@@ -20113,8 +20334,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-intl)
+
+ maybe-clean-stage1-intl: clean-stage1-intl
+@@ -20127,7 +20351,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif intl-bootstrap
+
+@@ -20147,8 +20371,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-intl)
+
+ maybe-clean-stage2-intl: clean-stage2-intl
+@@ -20161,7 +20388,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20182,8 +20409,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-intl)
+
+ maybe-clean-stageb2g0-intl: clean-stageb2g0-intl
+@@ -20196,7 +20426,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20217,8 +20447,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-intl)
+
+ maybe-clean-stage3-intl: clean-stage3-intl
+@@ -20231,7 +20464,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20252,8 +20485,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-intl)
+
+ maybe-clean-stageb3g2-intl: clean-stageb3g2-intl
+@@ -20266,7 +20502,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20287,8 +20523,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-intl)
+
+ maybe-clean-stage4-intl: clean-stage4-intl
+@@ -20301,7 +20540,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20322,8 +20561,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-intl)
+
+ maybe-clean-stageprofile-intl: clean-stageprofile-intl
+@@ -20336,7 +20578,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20357,8 +20599,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-intl)
+
+ maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
+@@ -20371,7 +20616,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/intl && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif intl-bootstrap
+@@ -20785,7 +21030,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tcl && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tcl))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-tcl))
+ @endif tcl
+
+
+@@ -21194,7 +21440,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/itcl && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-itcl))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-itcl))
+ @endif itcl
+
+
+@@ -21611,9 +21858,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21642,9 +21889,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21673,9 +21920,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21704,9 +21951,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21735,9 +21982,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21766,9 +22013,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21797,9 +22044,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21828,9 +22075,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ cd $(HOST_SUBDIR)/ld || exit 1; \
+@@ -21865,7 +22112,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-ld))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-ld))
+ @endif ld
+
+
+@@ -21884,8 +22132,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-ld)
+
+ maybe-clean-stage1-ld: clean-stage1-ld
+@@ -21898,7 +22149,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif ld-bootstrap
+
+@@ -21918,8 +22169,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-ld)
+
+ maybe-clean-stage2-ld: clean-stage2-ld
+@@ -21932,7 +22186,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -21953,8 +22207,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-ld)
+
+ maybe-clean-stageb2g0-ld: clean-stageb2g0-ld
+@@ -21967,7 +22224,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -21988,8 +22245,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-ld)
+
+ maybe-clean-stage3-ld: clean-stage3-ld
+@@ -22002,7 +22262,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -22023,8 +22283,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-ld)
+
+ maybe-clean-stageb3g2-ld: clean-stageb3g2-ld
+@@ -22037,7 +22300,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -22058,8 +22321,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-ld)
+
+ maybe-clean-stage4-ld: clean-stage4-ld
+@@ -22072,7 +22338,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -22093,8 +22359,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-ld)
+
+ maybe-clean-stageprofile-ld: clean-stageprofile-ld
+@@ -22107,7 +22376,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -22128,8 +22397,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-ld)
+
+ maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
+@@ -22142,7 +22414,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/ld && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif ld-bootstrap
+@@ -22549,9 +22821,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22580,9 +22852,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22611,9 +22883,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22642,9 +22914,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22673,9 +22945,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22704,9 +22976,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22735,9 +23007,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22766,9 +23038,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ cd $(HOST_SUBDIR)/libcpp || exit 1; \
+@@ -22803,7 +23075,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libcpp))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libcpp))
+ @endif libcpp
+
+
+@@ -22822,8 +23095,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-libcpp)
+
+ maybe-clean-stage1-libcpp: clean-stage1-libcpp
+@@ -22836,7 +23112,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif libcpp-bootstrap
+
+@@ -22856,8 +23132,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-libcpp)
+
+ maybe-clean-stage2-libcpp: clean-stage2-libcpp
+@@ -22870,7 +23149,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -22891,8 +23170,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-libcpp)
+
+ maybe-clean-stageb2g0-libcpp: clean-stageb2g0-libcpp
+@@ -22905,7 +23187,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -22926,8 +23208,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-libcpp)
+
+ maybe-clean-stage3-libcpp: clean-stage3-libcpp
+@@ -22940,7 +23225,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -22961,8 +23246,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-libcpp)
+
+ maybe-clean-stageb3g2-libcpp: clean-stageb3g2-libcpp
+@@ -22975,7 +23263,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -22996,8 +23284,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-libcpp)
+
+ maybe-clean-stage4-libcpp: clean-stage4-libcpp
+@@ -23010,7 +23301,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -23031,8 +23322,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-libcpp)
+
+ maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
+@@ -23045,7 +23339,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -23066,8 +23360,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-libcpp)
+
+ maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
+@@ -23080,7 +23377,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libcpp && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libcpp-bootstrap
+@@ -23487,9 +23784,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23518,9 +23815,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23549,9 +23846,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23580,9 +23877,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23611,9 +23908,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23642,9 +23939,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23673,9 +23970,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23704,9 +24001,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
+@@ -23741,7 +24038,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libdecnumber))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libdecnumber))
+ @endif libdecnumber
+
+
+@@ -23760,8 +24058,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-libdecnumber)
+
+ maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber
+@@ -23774,7 +24075,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif libdecnumber-bootstrap
+
+@@ -23794,8 +24095,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-libdecnumber)
+
+ maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber
+@@ -23808,7 +24112,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -23829,8 +24133,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-libdecnumber)
+
+ maybe-clean-stageb2g0-libdecnumber: clean-stageb2g0-libdecnumber
+@@ -23843,7 +24150,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -23864,8 +24171,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-libdecnumber)
+
+ maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber
+@@ -23878,7 +24188,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -23899,8 +24209,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-libdecnumber)
+
+ maybe-clean-stageb3g2-libdecnumber: clean-stageb3g2-libdecnumber
+@@ -23913,7 +24226,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -23934,8 +24247,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-libdecnumber)
+
+ maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber
+@@ -23948,7 +24264,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -23969,8 +24285,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-libdecnumber)
+
+ maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber
+@@ -23983,7 +24302,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -24004,8 +24323,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-libdecnumber)
+
+ maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber
+@@ -24018,7 +24340,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libdecnumber && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libdecnumber-bootstrap
+@@ -24432,7 +24754,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libgui && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libgui))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libgui))
+ @endif libgui
+
+
+@@ -24849,9 +25172,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -24880,9 +25203,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -24911,9 +25234,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -24942,9 +25265,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -24973,9 +25296,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -25004,9 +25327,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -25035,9 +25358,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -25066,9 +25389,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ cd $(HOST_SUBDIR)/libiberty || exit 1; \
+@@ -25103,7 +25426,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libiberty))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libiberty))
+ @endif libiberty
+
+
+@@ -25122,8 +25446,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-libiberty)
+
+ maybe-clean-stage1-libiberty: clean-stage1-libiberty
+@@ -25136,7 +25463,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif libiberty-bootstrap
+
+@@ -25156,8 +25483,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-libiberty)
+
+ maybe-clean-stage2-libiberty: clean-stage2-libiberty
+@@ -25170,7 +25500,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25191,8 +25521,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-libiberty)
+
+ maybe-clean-stageb2g0-libiberty: clean-stageb2g0-libiberty
+@@ -25205,7 +25538,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25226,8 +25559,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-libiberty)
+
+ maybe-clean-stage3-libiberty: clean-stage3-libiberty
+@@ -25240,7 +25576,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25261,8 +25597,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-libiberty)
+
+ maybe-clean-stageb3g2-libiberty: clean-stageb3g2-libiberty
+@@ -25275,7 +25614,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25296,8 +25635,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-libiberty)
+
+ maybe-clean-stage4-libiberty: clean-stage4-libiberty
+@@ -25310,7 +25652,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25331,8 +25673,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-libiberty)
+
+ maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
+@@ -25345,7 +25690,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25366,8 +25711,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-libiberty)
+
+ maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
+@@ -25380,7 +25728,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif libiberty-bootstrap
+@@ -25794,7 +26142,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtool && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtool))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libtool))
+ @endif libtool
+
+
+@@ -26218,7 +26567,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/m4 && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-m4))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-m4))
+ @endif m4
+
+
+@@ -26642,7 +26992,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/make && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-make))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-make))
+ @endif make
+
+
+@@ -27066,7 +27417,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mmalloc && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mmalloc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-mmalloc))
+ @endif mmalloc
+
+
+@@ -27484,7 +27836,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/patch && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-patch))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-patch))
+ @endif patch
+
+
+@@ -27908,7 +28261,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/perl && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-perl))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-perl))
+ @endif perl
+
+
+@@ -28332,7 +28686,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/prms && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-prms))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-prms))
+ @endif prms
+
+
+@@ -28756,7 +29111,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/rcs && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-rcs))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-rcs))
+ @endif rcs
+
+
+@@ -29180,7 +29536,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/readline && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-readline))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-readline))
+ @endif readline
+
+
+@@ -29604,7 +29961,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/release && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-release))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-release))
+ @endif release
+
+
+@@ -30016,7 +30374,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/recode && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-recode))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-recode))
+ @endif recode
+
+
+@@ -30440,7 +30799,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sed && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sed))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-sed))
+ @endif sed
+
+
+@@ -30864,7 +31224,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/send-pr && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-send-pr))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-send-pr))
+ @endif send-pr
+
+
+@@ -31288,7 +31649,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/shellutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-shellutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-shellutils))
+ @endif shellutils
+
+
+@@ -31712,7 +32074,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sid && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sid))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-sid))
+ @endif sid
+
+
+@@ -32136,7 +32499,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/sim && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-sim))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-sim))
+ @endif sim
+
+
+@@ -32560,7 +32924,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tar && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-tar))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-tar))
+ @endif tar
+
+
+@@ -32984,7 +33349,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/texinfo && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-texinfo))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-texinfo))
+ @endif texinfo
+
+
+@@ -33402,7 +33768,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/textutils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-textutils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-textutils))
+ @endif textutils
+
+
+@@ -33826,7 +34193,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/time && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-time))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-time))
+ @endif time
+
+
+@@ -34250,7 +34618,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/uudecode && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-uudecode))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-uudecode))
+ @endif uudecode
+
+
+@@ -34674,7 +35043,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/wdiff && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-wdiff))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-wdiff))
+ @endif wdiff
+
+
+@@ -35098,7 +35468,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/zip && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zip))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-zip))
+ @endif zip
+
+
+@@ -35518,9 +35889,9 @@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+- $(HOST_EXPORTS) \
++ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE1_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35549,9 +35920,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35580,9 +35951,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -g0"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35611,9 +35982,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35642,9 +36013,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -g2"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35673,9 +36044,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35704,9 +36075,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CXXFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35735,9 +36106,9 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+- $(POSTSTAGE1_HOST_EXPORTS) \
++ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ cd $(HOST_SUBDIR)/zlib || exit 1; \
+@@ -35772,7 +36143,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-zlib))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-zlib))
+ @endif zlib
+
+
+@@ -35791,8 +36163,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) \
+ $(TARGET-stage1-zlib)
+
+ maybe-clean-stage1-zlib: clean-stage1-zlib
+@@ -35805,7 +36180,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ clean
+ @endif zlib-bootstrap
+
+@@ -35825,8 +36200,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-zlib)
+
+ maybe-clean-stage2-zlib: clean-stage2-zlib
+@@ -35839,7 +36217,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -35860,8 +36238,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb2g0-zlib)
+
+ maybe-clean-stageb2g0-zlib: clean-stageb2g0-zlib
+@@ -35874,7 +36255,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -35895,8 +36276,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-zlib)
+
+ maybe-clean-stage3-zlib: clean-stage3-zlib
+@@ -35909,7 +36293,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -35930,8 +36314,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageb3g2-zlib)
+
+ maybe-clean-stageb3g2-zlib: clean-stageb3g2-zlib
+@@ -35944,7 +36331,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -35965,8 +36352,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-zlib)
+
+ maybe-clean-stage4-zlib: clean-stage4-zlib
+@@ -35979,7 +36369,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -36000,8 +36390,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-zlib)
+
+ maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
+@@ -36014,7 +36407,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -36035,8 +36428,11 @@
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-zlib)
+
+ maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
+@@ -36049,7 +36445,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/zlib && \
+- $(MAKE) $(FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+ @endif zlib-bootstrap
+@@ -36451,7 +36847,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gdb && \
+- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-gdb))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
++ $(TARGET-gdb))
+ @endif gdb
+
+
+@@ -36875,7 +37272,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/expect && \
+- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-expect))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
++ $(TARGET-expect))
+ @endif expect
+
+
+@@ -37299,7 +37697,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/guile && \
+- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-guile))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
++ $(TARGET-guile))
+ @endif guile
+
+
+@@ -37723,7 +38122,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/tk && \
+- $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-tk))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS) \
++ $(TARGET-tk))
+ @endif tk
+
+
+@@ -38147,7 +38547,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libtermcap && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libtermcap))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-libtermcap))
+ @endif libtermcap
+
+
+@@ -38505,7 +38906,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/utils && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-utils))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-utils))
+ @endif utils
+
+
+@@ -38923,7 +39325,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gnattools && \
+- $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gnattools))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
++ $(TARGET-gnattools))
+ @endif gnattools
+
+
+@@ -39368,7 +39771,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libstdc++-v3))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
++ $(TARGET-target-libstdc++-v3))
+ @endif target-libstdc++-v3
+
+
+@@ -39809,7 +40213,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libmudflap))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libmudflap))
+ @endif target-libmudflap
+
+
+@@ -40250,7 +40655,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libssp))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libssp))
+ @endif target-libssp
+
+
+@@ -40691,7 +41097,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/newlib && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-newlib))
+ @endif target-newlib
+
+
+@@ -41137,9 +41544,9 @@
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+- $(NORMAL_TARGET_EXPORTS) \
+- CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
++ $(NORMAL_TARGET_EXPORTS) \
++ CFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41180,9 +41587,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41223,9 +41630,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE2_CFLAGS) -g0"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -g0"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41266,9 +41673,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41309,9 +41716,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE3_CFLAGS) -g2"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -g2"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41352,9 +41759,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41395,9 +41802,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41438,9 +41845,9 @@
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+- \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export CFLAGS; \
+- LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
++ \
++ CFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CXXFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+@@ -41475,7 +41882,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgcc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libgcc))
+ @endif target-libgcc
+
+
+@@ -41494,8 +41902,11 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
++ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stage1-target-libgcc)
+
+ maybe-clean-stage1-target-libgcc: clean-stage1-target-libgcc
+@@ -41508,7 +41919,7 @@
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ clean
+ @endif target-libgcc-bootstrap
+
+@@ -41528,8 +41939,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS)" LIBCFLAGS="$(STAGE2_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stage2-target-libgcc)
+
+ maybe-clean-stage2-target-libgcc: clean-stage2-target-libgcc
+@@ -41542,7 +41956,7 @@
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41563,8 +41977,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -g0" LIBCFLAGS="$(STAGE2_CFLAGS) -g0" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stageb2g0-target-libgcc)
+
+ maybe-clean-stageb2g0-target-libgcc: clean-stageb2g0-target-libgcc
+@@ -41577,7 +41994,7 @@
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41598,8 +42015,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS)" LIBCFLAGS="$(STAGE3_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stage3-target-libgcc)
+
+ maybe-clean-stage3-target-libgcc: clean-stage3-target-libgcc
+@@ -41612,7 +42032,7 @@
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41633,8 +42053,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -g2" LIBCFLAGS="$(STAGE3_CFLAGS) -g2" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stageb3g2-target-libgcc)
+
+ maybe-clean-stageb3g2-target-libgcc: clean-stageb3g2-target-libgcc
+@@ -41647,7 +42070,7 @@
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41668,8 +42091,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE4_CFLAGS)" LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
++ LIBCFLAGS="$(STAGE4_CFLAGS)" \
++ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
++ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stage4-target-libgcc)
+
+ maybe-clean-stage4-target-libgcc: clean-stage4-target-libgcc
+@@ -41682,7 +42108,7 @@
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41703,8 +42129,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" LIBCFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
++ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" \
++ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -fprofile-generate" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stageprofile-target-libgcc)
+
+ maybe-clean-stageprofile-target-libgcc: clean-stageprofile-target-libgcc
+@@ -41717,7 +42146,7 @@
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -41738,8 +42167,11 @@
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+- CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" LIBCFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ $(MAKE) $(BASE_FLAGS_TO_PASS) \
++ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
++ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
++ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-stagefeedback-target-libgcc)
+
+ maybe-clean-stagefeedback-target-libgcc: clean-stagefeedback-target-libgcc
+@@ -41752,7 +42184,7 @@
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) \
++ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ \
+ clean
+ @endif target-libgcc-bootstrap
+@@ -42191,7 +42623,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libgfortran))
+ @endif target-libgfortran
+
+
+@@ -42632,7 +43065,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libobjc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libobjc))
+ @endif target-libobjc
+
+
+@@ -43073,7 +43507,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libtermcap))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libtermcap))
+ @endif target-libtermcap
+
+
+@@ -43449,7 +43884,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/winsup && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-winsup))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-winsup))
+ @endif target-winsup
+
+
+@@ -43890,7 +44326,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgloss))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libgloss))
+ @endif target-libgloss
+
+
+@@ -44326,7 +44763,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libiberty))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libiberty))
+ @endif target-libiberty
+
+
+@@ -44767,7 +45205,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/gperf && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-gperf))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-gperf))
+ @endif target-gperf
+
+
+@@ -45208,7 +45647,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/examples && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-examples))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-examples))
+ @endif target-examples
+
+
+@@ -45639,7 +46079,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libffi && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libffi))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libffi))
+ @endif target-libffi
+
+
+@@ -46080,7 +46521,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libjava && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libjava))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
++ $(TARGET-target-libjava))
+ @endif target-libjava
+
+
+@@ -46521,7 +46963,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/zlib && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-zlib))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-zlib))
+ @endif target-zlib
+
+
+@@ -46962,7 +47405,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-boehm-gc))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-boehm-gc))
+ @endif target-boehm-gc
+
+
+@@ -47403,7 +47847,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-qthreads))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-qthreads))
+ @endif target-qthreads
+
+
+@@ -47844,7 +48289,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/rda && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-rda))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-rda))
+ @endif target-rda
+
+
+@@ -48285,7 +48731,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libada && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libada))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libada))
+ @endif target-libada
+
+
+@@ -48726,7 +49173,8 @@
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgomp))
++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
++ $(TARGET-target-libgomp))
+ @endif target-libgomp
+
+
+@@ -49359,7 +49807,7 @@
+
+ # Bubble a bug fix through all the stages up to stage 1. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stage1-bubble
+ stage1-bubble::
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -49570,7 +50018,7 @@
+
+ # Bubble a bug fix through all the stages up to stage 2. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stage2-bubble
+ stage2-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -49802,7 +50250,7 @@
+
+ # Bubble a bug fix through all the stages up to stage b2g0. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stageb2g0-bubble
+ stageb2g0-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -50034,7 +50482,7 @@
+
+ # Bubble a bug fix through all the stages up to stage 3. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stage3-bubble
+ stage3-bubble:: stage2-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -50320,7 +50768,7 @@
+
+ # Bubble a bug fix through all the stages up to stage b3g2. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stageb3g2-bubble
+ stageb3g2-bubble:: stageb2g0-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -50606,7 +51054,7 @@
+
+ # Bubble a bug fix through all the stages up to stage 4. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stage4-bubble
+ stage4-bubble:: stage3-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -50881,7 +51329,7 @@
+
+ # Bubble a bug fix through all the stages up to stage profile. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stageprofile-bubble
+ stageprofile-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -51092,7 +51540,7 @@
+
+ # Bubble a bug fix through all the stages up to stage feedback. They are
+ # remade, but not reconfigured. The next stage (if any) will not be
+-# reconfigured as well.
++# reconfigured either.
+ .PHONY: stagefeedback-bubble
+ stagefeedback-bubble:: stageprofile-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+@@ -51175,10 +51623,10 @@
+ @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
+
+ .PHONY: restrap
+-restrap:
++restrap::
+ @: $(MAKE); $(stage)
+ rm -rf stage1-$(TARGET_SUBDIR) stage2-* stageb2g0-* stage3-* stageb3g2-* stage4-* stageprofile-* stagefeedback-*
+- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
++restrap:: all
+ @endif gcc-bootstrap
+
+ # --------------------------------------
+@@ -52004,7 +52452,8 @@
+
+ # Rebuilding configure.
+ AUTOCONF = autoconf
+-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
++$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
++ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
+ cd $(srcdir) && $(AUTOCONF)
+
+ # ------------------------------
+Index: gcc-4.3.3/configure
+===================================================================
+--- gcc-4.3.3.orig/configure 2008-02-01 20:29:30.000000000 -0700
++++ gcc-4.3.3/configure 2009-04-29 18:03:50.204611816 -0700
+@@ -272,7 +272,7 @@
+ PACKAGE_BUGREPORT=
+
+ ac_unique_file="move-if-change"
+-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'
++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'
+ ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
+
+ # Initialize some variables set by options.
+@@ -5147,6 +5147,38 @@
+ fi;
+
+
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++ CFLAGS_FOR_TARGET=$CFLAGS
++ case " $CFLAGS " in
++ *" -O2 "*) ;;
++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++ esac
++ case " $CFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++ esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++ CXXFLAGS_FOR_TARGET=$CXXFLAGS
++ case " $CXXFLAGS " in
++ *" -O2 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++ esac
++ case " $CXXFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++ esac
++fi
++
++
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+@@ -12825,6 +12857,8 @@
+ s,@stage1_languages@,$stage1_languages,;t t
+ s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t
+ s,@DEBUG_PREFIX_CFLAGS_FOR_TARGET@,$DEBUG_PREFIX_CFLAGS_FOR_TARGET,;t t
++s,@CFLAGS_FOR_TARGET@,$CFLAGS_FOR_TARGET,;t t
++s,@CXXFLAGS_FOR_TARGET@,$CXXFLAGS_FOR_TARGET,;t t
+ s,@RPATH_ENVVAR@,$RPATH_ENVVAR,;t t
+ s,@tooldir@,$tooldir,;t t
+ s,@build_tooldir@,$build_tooldir,;t t
+Index: gcc-4.3.3/libiberty/Makefile.in
+===================================================================
+--- gcc-4.3.3.orig/libiberty/Makefile.in 2007-07-24 23:26:45.000000000 -0700
++++ gcc-4.3.3/libiberty/Makefile.in 2009-04-29 18:03:50.212612133 -0700
+@@ -60,7 +60,7 @@
+ MAKEINFO = @MAKEINFO@
+ PERL = @PERL@
+
+-PICFLAG =
++PICFLAG = @PICFLAG@
+
+ MAKEOVERRIDES =
+
+@@ -143,10 +143,11 @@
+ pex-unix.c pex-win32.c \
+ physmem.c putenv.c \
+ random.c regex.c rename.c rindex.c \
+- safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c spaces.c \
+- splay-tree.c stpcpy.c stpncpy.c strcasecmp.c strchr.c strdup.c \
+- strerror.c strncasecmp.c strncmp.c strrchr.c strsignal.c \
+- strstr.c strtod.c strtol.c strtoul.c strndup.c strverscmp.c \
++ safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c \
++ spaces.c splay-tree.c stpcpy.c stpncpy.c strcasecmp.c \
++ strchr.c strdup.c strerror.c strncasecmp.c strncmp.c \
++ strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \
++ strndup.c strverscmp.c \
+ tmpnam.c \
+ unlink-if-ordinary.c \
+ vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
+@@ -156,7 +157,8 @@
+
+ # These are always included in the library. The first four are listed
+ # first and by compile time to optimize parallel builds.
+-REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
++REQUIRED_OFILES = \
++ ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
+ ./alloca.o ./argv.o \
+ ./choose-temp.o ./concat.o ./cp-demint.o \
+ ./dyn-string.o \
+@@ -473,13 +475,13 @@
+ config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+
+-# Depending on stamp-h makes sure that config.status has been re-run
++# Depending on config.h makes sure that config.status has been re-run
+ # if needed. This prevents problems with parallel builds, in case
+ # subdirectories need to run config.status also.
+ all-subdir check-subdir installcheck-subdir info-subdir \
+ install-info-subdir clean-info-subdir dvi-subdir pdf-subdir install-subdir \
+ etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
+-maintainer-clean-subdir: stamp-h
++maintainer-clean-subdir: config.h
+ @subdirs='$(SUBDIRS)'; \
+ target=`echo $@ | sed -e 's/-subdir//'`; \
+ for dir in $$subdirs ; do \
+@@ -496,40 +498,41 @@
+ # The dependencies in the remainder of this file are automatically
+ # generated by "make maint-deps". Manual edits will be lost.
+
+-./_doprnt.o: $(srcdir)/_doprnt.c stamp-h $(INCDIR)/ansidecl.h \
++./_doprnt.o: $(srcdir)/_doprnt.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/_doprnt.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/_doprnt.c $(OUTPUT_OPTION)
+
+-./alloca.o: $(srcdir)/alloca.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
++./alloca.o: $(srcdir)/alloca.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/alloca.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/alloca.c $(OUTPUT_OPTION)
+
+-./argv.o: $(srcdir)/argv.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
++./argv.o: $(srcdir)/argv.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/argv.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/argv.c $(OUTPUT_OPTION)
+
+-./asprintf.o: $(srcdir)/asprintf.c stamp-h $(INCDIR)/ansidecl.h \
++./asprintf.o: $(srcdir)/asprintf.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/asprintf.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/asprintf.c $(OUTPUT_OPTION)
+
+-./atexit.o: $(srcdir)/atexit.c stamp-h
++./atexit.o: $(srcdir)/atexit.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/atexit.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/atexit.c $(OUTPUT_OPTION)
+
+-./basename.o: $(srcdir)/basename.c stamp-h $(INCDIR)/ansidecl.h \
++./basename.o: $(srcdir)/basename.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/basename.c -o pic/$@; \
+@@ -548,7 +551,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/bcopy.c $(OUTPUT_OPTION)
+
+-./bsearch.o: $(srcdir)/bsearch.c stamp-h $(INCDIR)/ansidecl.h
++./bsearch.o: $(srcdir)/bsearch.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/bsearch.c -o pic/$@; \
+ else true; fi
+@@ -566,20 +569,21 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/calloc.c $(OUTPUT_OPTION)
+
+-./choose-temp.o: $(srcdir)/choose-temp.c stamp-h $(INCDIR)/ansidecl.h \
++./choose-temp.o: $(srcdir)/choose-temp.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/choose-temp.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/choose-temp.c $(OUTPUT_OPTION)
+
+-./clock.o: $(srcdir)/clock.c stamp-h
++./clock.o: $(srcdir)/clock.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/clock.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/clock.c $(OUTPUT_OPTION)
+
+-./concat.o: $(srcdir)/concat.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
++./concat.o: $(srcdir)/concat.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/concat.c -o pic/$@; \
+ else true; fi
+@@ -591,7 +595,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/copysign.c $(OUTPUT_OPTION)
+
+-./cp-demangle.o: $(srcdir)/cp-demangle.c stamp-h $(INCDIR)/ansidecl.h \
++./cp-demangle.o: $(srcdir)/cp-demangle.c config.h $(INCDIR)/ansidecl.h \
+ $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \
+ $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+@@ -599,7 +603,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/cp-demangle.c $(OUTPUT_OPTION)
+
+-./cp-demint.o: $(srcdir)/cp-demint.c stamp-h $(INCDIR)/ansidecl.h \
++./cp-demint.o: $(srcdir)/cp-demint.c config.h $(INCDIR)/ansidecl.h \
+ $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+@@ -607,7 +611,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/cp-demint.c $(OUTPUT_OPTION)
+
+-./cplus-dem.o: $(srcdir)/cplus-dem.c stamp-h $(INCDIR)/ansidecl.h \
++./cplus-dem.o: $(srcdir)/cplus-dem.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+@@ -615,14 +619,14 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/cplus-dem.c $(OUTPUT_OPTION)
+
+-./dyn-string.o: $(srcdir)/dyn-string.c stamp-h $(INCDIR)/ansidecl.h \
++./dyn-string.o: $(srcdir)/dyn-string.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dyn-string.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/dyn-string.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/dyn-string.c $(OUTPUT_OPTION)
+
+-./fdmatch.o: $(srcdir)/fdmatch.c stamp-h $(INCDIR)/ansidecl.h \
++./fdmatch.o: $(srcdir)/fdmatch.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/fdmatch.c -o pic/$@; \
+@@ -635,93 +639,94 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/ffs.c $(OUTPUT_OPTION)
+
+-./fibheap.o: $(srcdir)/fibheap.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
+- $(INCDIR)/libiberty.h
++./fibheap.o: $(srcdir)/fibheap.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/fibheap.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/fibheap.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION)
+
+-./filename_cmp.o: $(srcdir)/filename_cmp.c stamp-h $(INCDIR)/filenames.h \
++./filename_cmp.o: $(srcdir)/filename_cmp.c config.h $(INCDIR)/filenames.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/filename_cmp.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/filename_cmp.c $(OUTPUT_OPTION)
+
+-./floatformat.o: $(srcdir)/floatformat.c stamp-h $(INCDIR)/ansidecl.h \
++./floatformat.o: $(srcdir)/floatformat.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/floatformat.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/floatformat.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/floatformat.c $(OUTPUT_OPTION)
+
+-./fnmatch.o: $(srcdir)/fnmatch.c stamp-h $(INCDIR)/fnmatch.h \
++./fnmatch.o: $(srcdir)/fnmatch.c config.h $(INCDIR)/fnmatch.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/fnmatch.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/fnmatch.c $(OUTPUT_OPTION)
+
+-./fopen_unlocked.o: $(srcdir)/fopen_unlocked.c stamp-h $(INCDIR)/ansidecl.h \
++./fopen_unlocked.o: $(srcdir)/fopen_unlocked.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/fopen_unlocked.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/fopen_unlocked.c $(OUTPUT_OPTION)
+
+-./getcwd.o: $(srcdir)/getcwd.c stamp-h
++./getcwd.o: $(srcdir)/getcwd.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getcwd.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getcwd.c $(OUTPUT_OPTION)
+
+-./getopt.o: $(srcdir)/getopt.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h
++./getopt.o: $(srcdir)/getopt.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getopt.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getopt.c $(OUTPUT_OPTION)
+
+-./getopt1.o: $(srcdir)/getopt1.c stamp-h $(INCDIR)/getopt.h
++./getopt1.o: $(srcdir)/getopt1.c config.h $(INCDIR)/getopt.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getopt1.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getopt1.c $(OUTPUT_OPTION)
+
+-./getpagesize.o: $(srcdir)/getpagesize.c stamp-h
++./getpagesize.o: $(srcdir)/getpagesize.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getpagesize.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getpagesize.c $(OUTPUT_OPTION)
+
+-./getpwd.o: $(srcdir)/getpwd.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
++./getpwd.o: $(srcdir)/getpwd.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getpwd.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getpwd.c $(OUTPUT_OPTION)
+
+-./getruntime.o: $(srcdir)/getruntime.c stamp-h $(INCDIR)/ansidecl.h \
++./getruntime.o: $(srcdir)/getruntime.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/getruntime.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/getruntime.c $(OUTPUT_OPTION)
+
+-./gettimeofday.o: $(srcdir)/gettimeofday.c stamp-h $(INCDIR)/ansidecl.h \
++./gettimeofday.o: $(srcdir)/gettimeofday.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/gettimeofday.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/gettimeofday.c $(OUTPUT_OPTION)
+
+-./hashtab.o: $(srcdir)/hashtab.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
+- $(INCDIR)/libiberty.h
++./hashtab.o: $(srcdir)/hashtab.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/hashtab.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/hashtab.c $(OUTPUT_OPTION)
+
+-./hex.o: $(srcdir)/hex.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
++./hex.o: $(srcdir)/hex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/hex.c -o pic/$@; \
+@@ -740,7 +745,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/insque.c $(OUTPUT_OPTION)
+
+-./lbasename.o: $(srcdir)/lbasename.c stamp-h $(INCDIR)/ansidecl.h \
++./lbasename.o: $(srcdir)/lbasename.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+@@ -748,28 +753,28 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/lbasename.c $(OUTPUT_OPTION)
+
+-./lrealpath.o: $(srcdir)/lrealpath.c stamp-h $(INCDIR)/ansidecl.h \
++./lrealpath.o: $(srcdir)/lrealpath.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/lrealpath.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/lrealpath.c $(OUTPUT_OPTION)
+
+-./make-relative-prefix.o: $(srcdir)/make-relative-prefix.c stamp-h \
++./make-relative-prefix.o: $(srcdir)/make-relative-prefix.c config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/make-relative-prefix.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/make-relative-prefix.c $(OUTPUT_OPTION)
+
+-./make-temp-file.o: $(srcdir)/make-temp-file.c stamp-h $(INCDIR)/ansidecl.h \
++./make-temp-file.o: $(srcdir)/make-temp-file.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/make-temp-file.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/make-temp-file.c $(OUTPUT_OPTION)
+
+-./md5.o: $(srcdir)/md5.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
++./md5.o: $(srcdir)/md5.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/md5.c -o pic/$@; \
+ else true; fi
+@@ -811,7 +816,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/memset.c $(OUTPUT_OPTION)
+
+-./mkstemps.o: $(srcdir)/mkstemps.c stamp-h $(INCDIR)/ansidecl.h
++./mkstemps.o: $(srcdir)/mkstemps.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/mkstemps.c -o pic/$@; \
+ else true; fi
+@@ -823,41 +828,41 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/msdos.c $(OUTPUT_OPTION)
+
+-./objalloc.o: $(srcdir)/objalloc.c stamp-h $(INCDIR)/ansidecl.h \
++./objalloc.o: $(srcdir)/objalloc.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/objalloc.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/objalloc.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/objalloc.c $(OUTPUT_OPTION)
+
+-./obstack.o: $(srcdir)/obstack.c stamp-h $(INCDIR)/obstack.h
++./obstack.o: $(srcdir)/obstack.c config.h $(INCDIR)/obstack.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/obstack.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/obstack.c $(OUTPUT_OPTION)
+
+-./partition.o: $(srcdir)/partition.c stamp-h $(INCDIR)/ansidecl.h \
++./partition.o: $(srcdir)/partition.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/partition.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/partition.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/partition.c $(OUTPUT_OPTION)
+
+-./pex-common.o: $(srcdir)/pex-common.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-common.o: $(srcdir)/pex-common.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-common.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-common.c $(OUTPUT_OPTION)
+
+-./pex-djgpp.o: $(srcdir)/pex-djgpp.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-djgpp.o: $(srcdir)/pex-djgpp.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-djgpp.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-djgpp.c $(OUTPUT_OPTION)
+
+-./pex-msdos.o: $(srcdir)/pex-msdos.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-msdos.o: $(srcdir)/pex-msdos.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+@@ -865,42 +870,42 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-msdos.c $(OUTPUT_OPTION)
+
+-./pex-one.o: $(srcdir)/pex-one.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-one.o: $(srcdir)/pex-one.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-one.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-one.c $(OUTPUT_OPTION)
+
+-./pex-unix.o: $(srcdir)/pex-unix.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-unix.o: $(srcdir)/pex-unix.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-unix.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-unix.c $(OUTPUT_OPTION)
+
+-./pex-win32.o: $(srcdir)/pex-win32.c stamp-h $(INCDIR)/ansidecl.h \
++./pex-win32.o: $(srcdir)/pex-win32.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-win32.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-win32.c $(OUTPUT_OPTION)
+
+-./pexecute.o: $(srcdir)/pexecute.c stamp-h $(INCDIR)/ansidecl.h \
++./pexecute.o: $(srcdir)/pexecute.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pexecute.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pexecute.c $(OUTPUT_OPTION)
+
+-./physmem.o: $(srcdir)/physmem.c stamp-h $(INCDIR)/ansidecl.h \
++./physmem.o: $(srcdir)/physmem.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/physmem.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/physmem.c $(OUTPUT_OPTION)
+
+-./putenv.o: $(srcdir)/putenv.c stamp-h $(INCDIR)/ansidecl.h
++./putenv.o: $(srcdir)/putenv.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/putenv.c -o pic/$@; \
+ else true; fi
+@@ -912,14 +917,14 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/random.c $(OUTPUT_OPTION)
+
+-./regex.o: $(srcdir)/regex.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
++./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/regex.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/regex.c $(OUTPUT_OPTION)
+
+-./rename.o: $(srcdir)/rename.c stamp-h $(INCDIR)/ansidecl.h
++./rename.o: $(srcdir)/rename.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/rename.c -o pic/$@; \
+ else true; fi
+@@ -938,7 +943,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/safe-ctype.c $(OUTPUT_OPTION)
+
+-./setenv.o: $(srcdir)/setenv.c stamp-h $(INCDIR)/ansidecl.h
++./setenv.o: $(srcdir)/setenv.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/setenv.c -o pic/$@; \
+ else true; fi
+@@ -956,20 +961,21 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/snprintf.c $(OUTPUT_OPTION)
+
+-./sort.o: $(srcdir)/sort.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
++./sort.o: $(srcdir)/sort.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/sort.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/sort.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/sort.c $(OUTPUT_OPTION)
+
+-./spaces.o: $(srcdir)/spaces.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
++./spaces.o: $(srcdir)/spaces.c config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/spaces.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/spaces.c $(OUTPUT_OPTION)
+
+-./splay-tree.o: $(srcdir)/splay-tree.c stamp-h $(INCDIR)/ansidecl.h \
++./splay-tree.o: $(srcdir)/splay-tree.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/splay-tree.c -o pic/$@; \
+@@ -1006,7 +1012,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strdup.c $(OUTPUT_OPTION)
+
+-./strerror.o: $(srcdir)/strerror.c stamp-h $(INCDIR)/ansidecl.h \
++./strerror.o: $(srcdir)/strerror.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strerror.c -o pic/$@; \
+@@ -1037,7 +1043,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strrchr.c $(OUTPUT_OPTION)
+
+-./strsignal.o: $(srcdir)/strsignal.c stamp-h $(INCDIR)/ansidecl.h \
++./strsignal.o: $(srcdir)/strsignal.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strsignal.c -o pic/$@; \
+@@ -1056,13 +1062,13 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strtod.c $(OUTPUT_OPTION)
+
+-./strtol.o: $(srcdir)/strtol.c stamp-h $(INCDIR)/safe-ctype.h
++./strtol.o: $(srcdir)/strtol.c config.h $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strtol.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strtol.c $(OUTPUT_OPTION)
+
+-./strtoul.o: $(srcdir)/strtoul.c stamp-h $(INCDIR)/ansidecl.h \
++./strtoul.o: $(srcdir)/strtoul.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strtoul.c -o pic/$@; \
+@@ -1082,14 +1088,14 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/tmpnam.c $(OUTPUT_OPTION)
+
+-./unlink-if-ordinary.o: $(srcdir)/unlink-if-ordinary.c stamp-h \
++./unlink-if-ordinary.o: $(srcdir)/unlink-if-ordinary.c config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/unlink-if-ordinary.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/unlink-if-ordinary.c $(OUTPUT_OPTION)
+
+-./vasprintf.o: $(srcdir)/vasprintf.c stamp-h $(INCDIR)/ansidecl.h \
++./vasprintf.o: $(srcdir)/vasprintf.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/vasprintf.c -o pic/$@; \
+@@ -1114,7 +1120,7 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/vprintf.c $(OUTPUT_OPTION)
+
+-./vsnprintf.o: $(srcdir)/vsnprintf.c stamp-h $(INCDIR)/ansidecl.h \
++./vsnprintf.o: $(srcdir)/vsnprintf.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/vsnprintf.c -o pic/$@; \
+@@ -1127,54 +1133,54 @@
+ else true; fi
+ $(COMPILE.c) $(srcdir)/vsprintf.c $(OUTPUT_OPTION)
+
+-./waitpid.o: $(srcdir)/waitpid.c stamp-h $(INCDIR)/ansidecl.h
++./waitpid.o: $(srcdir)/waitpid.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/waitpid.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/waitpid.c $(OUTPUT_OPTION)
+
+-./xatexit.o: $(srcdir)/xatexit.c stamp-h $(INCDIR)/ansidecl.h \
++./xatexit.o: $(srcdir)/xatexit.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xatexit.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xatexit.c $(OUTPUT_OPTION)
+
+-./xexit.o: $(srcdir)/xexit.c stamp-h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
++./xexit.o: $(srcdir)/xexit.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xexit.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xexit.c $(OUTPUT_OPTION)
+
+-./xmalloc.o: $(srcdir)/xmalloc.c stamp-h $(INCDIR)/ansidecl.h \
++./xmalloc.o: $(srcdir)/xmalloc.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xmalloc.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xmalloc.c $(OUTPUT_OPTION)
+
+-./xmemdup.o: $(srcdir)/xmemdup.c stamp-h $(INCDIR)/ansidecl.h \
++./xmemdup.o: $(srcdir)/xmemdup.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xmemdup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xmemdup.c $(OUTPUT_OPTION)
+
+-./xstrdup.o: $(srcdir)/xstrdup.c stamp-h $(INCDIR)/ansidecl.h \
++./xstrdup.o: $(srcdir)/xstrdup.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrdup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xstrdup.c $(OUTPUT_OPTION)
+
+-./xstrerror.o: $(srcdir)/xstrerror.c stamp-h $(INCDIR)/ansidecl.h \
++./xstrerror.o: $(srcdir)/xstrerror.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrerror.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xstrerror.c $(OUTPUT_OPTION)
+
+-./xstrndup.o: $(srcdir)/xstrndup.c stamp-h $(INCDIR)/ansidecl.h \
++./xstrndup.o: $(srcdir)/xstrndup.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrndup.c -o pic/$@; \
+Index: gcc-4.3.3/libiberty/configure
+===================================================================
+--- gcc-4.3.3.orig/libiberty/configure 2007-07-17 10:52:28.000000000 -0700
++++ gcc-4.3.3/libiberty/configure 2009-04-29 18:03:50.224612238 -0700
+@@ -309,7 +309,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 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'
++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'
+ ac_subst_files='host_makefile_frag'
+
+ # Initialize some variables set by options.
+@@ -3699,9 +3699,7 @@
+ esac
+
+ if [ -n "${frag}" ]; then
+- frags=${libiberty_topdir}/libiberty/config/$frag
+-else
+- frags=
++ frag=${libiberty_topdir}/libiberty/config/$frag
+ fi
+
+ # If they didn't specify --enable-shared, don't generate shared libs.
+@@ -3712,34 +3710,35 @@
+ *) shared=yes ;;
+ esac
+ if [ "${shared}" = "yes" ]; then
+- frag=
+ case "${host}" in
+ *-*-cygwin*) ;;
+- alpha*-*-linux*) frag=mh-elfalphapic ;;
+- arm*-*-*) frag=mh-armpic ;;
+- hppa*-*-*) frag=mh-papic ;;
++ alpha*-*-linux*) PICFLAG=-fPIC ;;
++ arm*-*-*) PICFLAG=-fPIC ;;
++ hppa*-*-*) PICFLAG=-fPIC ;;
++ i370-*-*) PICFLAG=-fPIC ;;
++ ia64-*-*) PICFLAG=-fpic ;;
+ i[34567]86-*-* | x86_64-*-*)
+- frag=mh-x86pic ;;
++ PICFLAG=-fpic ;;
++ m68k-*-*) PICFLAG=-fpic ;;
++ mips*-*-linux) PICFLAG=-fPIC ;;
+ powerpc*-*-aix*) ;;
+- powerpc*-*-*) frag=mh-ppcpic ;;
+- sparc*-*-*) frag=mh-sparcpic ;;
+- s390*-*-*) frag=mh-s390pic ;;
+- *) frag=mh-${host_cpu}pic ;;
++ powerpc*-*-*) PICFLAG=-fPIC ;;
++ sparc*-*-*) case "${CFLAGS}" in
++ *-fpic* ) PICFLAG=-fpic ;;
++ * ) PICFLAG=-fPIC ;;
++ esac ;;
++ s390*-*-*) PICFLAG=-fpic ;;
+ esac
+- if [ -n "${frag}" ]; then
+- frags="${frags} ${libiberty_topdir}/config/${frag}"
+- fi
+ fi
+
++
+ echo "# Warning: this fragment is automatically generated" > temp-frag
+
+-for frag in ${frags}; do
+- if [ -f ${frag} ]; then
+- echo "Appending ${frag} to xhost-mkfrag"
+- echo "# Following fragment copied from ${frag}" >> temp-frag
+- cat ${frag} >> temp-frag
+- fi
+-done
++if [ -n "${frag}" ] && [ -f "${frag}" ]; then
++ echo "Appending ${frag} to xhost-mkfrag"
++ echo "# Following fragment copied from ${frag}" >> temp-frag
++ cat ${frag} >> temp-frag
++fi
+
+ # record if we want to build shared libs.
+ if [ "${shared}" = "yes" ]; then
+@@ -9671,6 +9670,7 @@
+ s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+ s,@INSTALL_DATA@,$INSTALL_DATA,;t t
++s,@PICFLAG@,$PICFLAG,;t t
+ s,@EGREP@,$EGREP,;t t
+ s,@LIBOBJS@,$LIBOBJS,;t t
+ s,@CHECK@,$CHECK,;t t
+Index: gcc-4.3.3/libiberty/configure.ac
+===================================================================
+--- gcc-4.3.3.orig/libiberty/configure.ac 2007-07-17 10:52:28.000000000 -0700
++++ gcc-4.3.3/libiberty/configure.ac 2009-04-29 18:03:50.224612238 -0700
+@@ -187,9 +187,7 @@
+ esac
+
+ if [[ -n "${frag}" ]]; then
+- frags=${libiberty_topdir}/libiberty/config/$frag
+-else
+- frags=
++ frag=${libiberty_topdir}/libiberty/config/$frag
+ fi
+
+ # If they didn't specify --enable-shared, don't generate shared libs.
+@@ -200,34 +198,35 @@
+ *) shared=yes ;;
+ esac
+ if [[ "${shared}" = "yes" ]]; then
+- frag=
+ case "${host}" in
+ *-*-cygwin*) ;;
+- alpha*-*-linux*) frag=mh-elfalphapic ;;
+- arm*-*-*) frag=mh-armpic ;;
+- hppa*-*-*) frag=mh-papic ;;
++ alpha*-*-linux*) PICFLAG=-fPIC ;;
++ arm*-*-*) PICFLAG=-fPIC ;;
++ hppa*-*-*) PICFLAG=-fPIC ;;
++ i370-*-*) PICFLAG=-fPIC ;;
++ ia64-*-*) PICFLAG=-fpic ;;
+ i[[34567]]86-*-* | x86_64-*-*)
+- frag=mh-x86pic ;;
++ PICFLAG=-fpic ;;
++ m68k-*-*) PICFLAG=-fpic ;;
++ mips*-*-linux) PICFLAG=-fPIC ;;
+ powerpc*-*-aix*) ;;
+- powerpc*-*-*) frag=mh-ppcpic ;;
+- sparc*-*-*) frag=mh-sparcpic ;;
+- s390*-*-*) frag=mh-s390pic ;;
+- *) frag=mh-${host_cpu}pic ;;
++ powerpc*-*-*) PICFLAG=-fPIC ;;
++ sparc*-*-*) case "${CFLAGS}" in
++ *-fpic* ) PICFLAG=-fpic ;;
++ * ) PICFLAG=-fPIC ;;
++ esac ;;
++ s390*-*-*) PICFLAG=-fpic ;;
+ esac
+- if [[ -n "${frag}" ]]; then
+- frags="${frags} ${libiberty_topdir}/config/${frag}"
+- fi
+ fi
++AC_SUBST(PICFLAG)
+
+ echo "# Warning: this fragment is automatically generated" > temp-frag
+
+-for frag in ${frags}; do
+- if [[ -f ${frag} ]]; then
+- echo "Appending ${frag} to xhost-mkfrag"
+- echo "# Following fragment copied from ${frag}" >> temp-frag
+- cat ${frag} >> temp-frag
+- fi
+-done
++if [[ -n "${frag}" ]] && [[ -f "${frag}" ]]; then
++ echo "Appending ${frag} to xhost-mkfrag"
++ echo "# Following fragment copied from ${frag}" >> temp-frag
++ cat ${frag} >> temp-frag
++fi
+
+ # record if we want to build shared libs.
+ if [[ "${shared}" = "yes" ]]; then
+Index: gcc-4.3.3/gcc/Makefile.in
+===================================================================
+--- gcc-4.3.3.orig/gcc/Makefile.in 2009-04-29 17:55:20.000000000 -0700
++++ gcc-4.3.3/gcc/Makefile.in 2009-04-29 18:03:50.236612117 -0700
+@@ -689,7 +689,7 @@
+ BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
+
+ # Native linker and preprocessor flags. For x-fragment overrides.
+-BUILD_LDFLAGS=$(LDFLAGS)
++BUILD_LDFLAGS=@BUILD_LDFLAGS@
+ BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
+
+ # Actual name to use when installing a native compiler.
+Index: gcc-4.3.3/gcc/configure
+===================================================================
+--- gcc-4.3.3.orig/gcc/configure 2009-04-29 17:55:27.000000000 -0700
++++ gcc-4.3.3/gcc/configure 2009-04-29 18:03:50.256611768 -0700
+@@ -458,7 +458,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 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'
++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'
+ ac_subst_files='language_hooks'
+
+ # Initialize some variables set by options.
+@@ -12972,6 +12972,7 @@
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+@@ -13469,6 +13470,7 @@
+ # These are the normal (build=host) settings:
+ CC_FOR_BUILD='$(CC)'
+ BUILD_CFLAGS='$(ALL_CFLAGS)'
++BUILD_LDFLAGS='$(LDFLAGS)'
+ STMP_FIXINC=stmp-fixinc
+
+ # Possibly disable fixproto, on a per-target basis.
+@@ -13486,6 +13488,7 @@
+ if test x$build != x$host || test "x$coverage_flags" != x
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
++ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+
+ if test "x$TARGET_SYSTEM_ROOT" = x; then
+ if test "x$STMP_FIXPROTO" != x; then
+@@ -14064,13 +14067,13 @@
+ else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+- (eval echo "\"\$as_me:14067: $ac_compile\"" >&5)
++ (eval echo "\"\$as_me:14070: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:14070: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++ (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:14073: output\"" >&5)
++ (eval echo "\"\$as_me:14076: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+@@ -15125,7 +15128,7 @@
+ ;;
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 15128 "configure"' > conftest.$ac_ext
++ echo '#line 15131 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -15745,11 +15748,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:15748: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:15751: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:15752: \$? = $ac_status" >&5
++ echo "$as_me:15755: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -16067,11 +16070,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16070: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16073: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:16074: \$? = $ac_status" >&5
++ echo "$as_me:16077: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -16172,11 +16175,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16175: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16178: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:16179: \$? = $ac_status" >&5
++ echo "$as_me:16182: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -16227,11 +16230,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16230: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16233: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:16234: \$? = $ac_status" >&5
++ echo "$as_me:16237: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -19024,7 +19027,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19027 "configure"
++#line 19030 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -19124,7 +19127,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19127 "configure"
++#line 19130 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -23934,6 +23937,7 @@
+ s,@inhibit_libc@,$inhibit_libc,;t t
+ s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+ s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
++s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
+ s,@STMP_FIXINC@,$STMP_FIXINC,;t t
+ s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
+ s,@collect2@,$collect2,;t t
+Index: gcc-4.3.3/gcc/configure.ac
+===================================================================
+--- gcc-4.3.3.orig/gcc/configure.ac 2009-04-29 17:55:27.000000000 -0700
++++ gcc-4.3.3/gcc/configure.ac 2009-04-29 18:03:50.264611238 -0700
+@@ -1480,6 +1480,7 @@
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+@@ -1776,6 +1777,7 @@
+ # These are the normal (build=host) settings:
+ CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
+ BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
++BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
+ STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+
+ # Possibly disable fixproto, on a per-target basis.
+@@ -1793,6 +1795,7 @@
+ if test x$build != x$host || test "x$coverage_flags" != x
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
++ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+
+ if test "x$TARGET_SYSTEM_ROOT" = x; then
+ 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 0000000..280b903
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-arm-frename-registers.patch
@@ -0,0 +1,25 @@
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
+Index: gcc-4.3.0/gcc/regrename.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
++++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
+@@ -782,6 +782,10 @@
+ || (predicated && recog_data.operand_type[i] == OP_OUT))
+ recog_data.operand_type[i] = OP_INOUT;
+ }
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+@@ -813,7 +817,7 @@
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ 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 0000000..43a9d73
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-flags-for-build.patch
@@ -0,0 +1,279 @@
+Index: gcc-4.3.2/Makefile.def
+===================================================================
+--- gcc-4.3.2.orig/Makefile.def 2008-08-28 18:21:19.000000000 -0700
++++ gcc-4.3.2/Makefile.def 2008-08-28 18:21:41.000000000 -0700
+@@ -207,6 +207,7 @@
+ flags_to_pass = { flag= BISON ; };
+ flags_to_pass = { flag= CC_FOR_BUILD ; };
+ flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
++flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
+ flags_to_pass = { flag= CXX_FOR_BUILD ; };
+ flags_to_pass = { flag= EXPECT ; };
+ flags_to_pass = { flag= FLEX ; };
+Index: gcc-4.3.2/gcc/Makefile.in
+===================================================================
+--- gcc-4.3.2.orig/gcc/Makefile.in 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/gcc/Makefile.in 2008-08-28 18:21:41.000000000 -0700
+@@ -673,7 +673,7 @@
+
+ # Native linker and preprocessor flags. For x-fragment overrides.
+ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
++BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS)
+
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+Index: gcc-4.3.2/gcc/configure.ac
+===================================================================
+--- gcc-4.3.2.orig/gcc/configure.ac 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/gcc/configure.ac 2008-08-28 18:21:41.000000000 -0700
+@@ -1775,10 +1775,11 @@
+ # Also, we cannot run fixincludes or fix-header.
+
+ # These are the normal (build=host) settings:
+-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
+-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
+-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
+-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
++CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
++BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
++BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS)
++STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+
+ # Possibly disable fixproto, on a per-target basis.
+ case ${use_fixproto} in
+@@ -1796,6 +1797,7 @@
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
+
+ if test "x$TARGET_SYSTEM_ROOT" = x; then
+ if test "x$STMP_FIXPROTO" != x; then
+Index: gcc-4.3.2/Makefile.in
+===================================================================
+--- gcc-4.3.2.orig/Makefile.in 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/Makefile.in 2008-08-28 18:21:41.000000000 -0700
+@@ -272,6 +272,7 @@
+ AS_FOR_BUILD = @AS_FOR_BUILD@
+ CC_FOR_BUILD = @CC_FOR_BUILD@
+ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
+ CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
+@@ -502,6 +503,7 @@
+ "BISON=$(BISON)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
++ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
+Index: gcc-4.3.2/gcc/configure
+===================================================================
+--- gcc-4.3.2.orig/gcc/configure 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/gcc/configure 2008-08-28 18:21:50.000000000 -0700
+@@ -458,7 +458,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 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'
++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'
+ ac_subst_files='language_hooks'
+
+ # Initialize some variables set by options.
+@@ -13471,6 +13471,7 @@
+ CC_FOR_BUILD='$(CC)'
+ BUILD_CFLAGS='$(ALL_CFLAGS)'
+ BUILD_LDFLAGS='$(LDFLAGS)'
++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)'
+ STMP_FIXINC=stmp-fixinc
+
+ # Possibly disable fixproto, on a per-target basis.
+@@ -13489,6 +13490,7 @@
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
+
+ if test "x$TARGET_SYSTEM_ROOT" = x; then
+ if test "x$STMP_FIXPROTO" != x; then
+@@ -14067,13 +14069,13 @@
+ else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+- (eval echo "\"\$as_me:14070: $ac_compile\"" >&5)
++ (eval echo "\"\$as_me:14072: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++ (eval echo "\"\$as_me:14075: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+- (eval echo "\"\$as_me:14076: output\"" >&5)
++ (eval echo "\"\$as_me:14078: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+@@ -15128,7 +15130,7 @@
+ ;;
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 15131 "configure"' > conftest.$ac_ext
++ echo '#line 15133 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -15748,11 +15750,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:15751: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:15753: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:15755: \$? = $ac_status" >&5
++ echo "$as_me:15757: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -16070,11 +16072,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16073: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16075: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:16077: \$? = $ac_status" >&5
++ echo "$as_me:16079: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+@@ -16175,11 +16177,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16178: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16180: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:16182: \$? = $ac_status" >&5
++ echo "$as_me:16184: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -16230,11 +16232,11 @@
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+- (eval echo "\"\$as_me:16233: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16235: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:16237: \$? = $ac_status" >&5
++ echo "$as_me:16239: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+@@ -19027,7 +19029,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19030 "configure"
++#line 19032 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -19127,7 +19129,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19130 "configure"
++#line 19132 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -23938,6 +23940,7 @@
+ s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+ s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
+ s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
++s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
+ s,@STMP_FIXINC@,$STMP_FIXINC,;t t
+ s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
+ s,@collect2@,$collect2,;t t
+Index: gcc-4.3.2/Makefile.tpl
+===================================================================
+--- gcc-4.3.2.orig/Makefile.tpl 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/Makefile.tpl 2008-08-28 18:21:41.000000000 -0700
+@@ -275,6 +275,7 @@
+ AS_FOR_BUILD = @AS_FOR_BUILD@
+ CC_FOR_BUILD = @CC_FOR_BUILD@
+ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
+ CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
+Index: gcc-4.3.2/configure
+===================================================================
+--- gcc-4.3.2.orig/configure 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/configure 2008-08-28 18:21:41.000000000 -0700
+@@ -272,7 +272,7 @@
+ PACKAGE_BUGREPORT=
+
+ ac_unique_file="move-if-change"
+-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'
++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'
+ ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
+
+ # Initialize some variables set by options.
+@@ -5914,6 +5914,7 @@
+ # our build compiler if desired.
+ if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+ fi
+@@ -5991,6 +5992,7 @@
+
+
+
++
+ # Generate default definitions for YACC, M4, LEX and other programs that run
+ # on the build machine. These are used if the Makefile can't locate these
+ # programs in objdir.
+@@ -12874,6 +12876,7 @@
+ s,@AS_FOR_BUILD@,$AS_FOR_BUILD,;t t
+ s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+ s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
++s,@CPPFLAGS_FOR_BUILD@,$CPPFLAGS_FOR_BUILD,;t t
+ s,@CXXFLAGS_FOR_BUILD@,$CXXFLAGS_FOR_BUILD,;t t
+ s,@CXX_FOR_BUILD@,$CXX_FOR_BUILD,;t t
+ s,@DLLTOOL_FOR_BUILD@,$DLLTOOL_FOR_BUILD,;t t
+Index: gcc-4.3.2/configure.ac
+===================================================================
+--- gcc-4.3.2.orig/configure.ac 2008-08-28 18:21:20.000000000 -0700
++++ gcc-4.3.2/configure.ac 2008-08-28 18:21:41.000000000 -0700
+@@ -2425,6 +2425,7 @@
+ # our build compiler if desired.
+ if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+ fi
+@@ -2489,6 +2490,7 @@
+ AC_SUBST(AS_FOR_BUILD)
+ AC_SUBST(CC_FOR_BUILD)
+ AC_SUBST(CFLAGS_FOR_BUILD)
++AC_SUBST(CPPFLAGS_FOR_BUILD)
+ AC_SUBST(CXXFLAGS_FOR_BUILD)
+ AC_SUBST(CXX_FOR_BUILD)
+ 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 0000000..971dfe7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc-release-branch/PR-36500-fix-neon.patch
@@ -0,0 +1,265 @@
+--- foo/gcc/config/arm/arm.c 2008/06/11 10:51:34 136660
++++ foo/gcc/config/arm/arm.c 2008/06/11 10:52:55 136661
+@@ -14830,124 +14830,190 @@
+ {
+ unsigned int i, fcode = ARM_BUILTIN_NEON_BASE;
+
++ tree neon_intQI_type_node;
++ tree neon_intHI_type_node;
++ tree neon_polyQI_type_node;
++ tree neon_polyHI_type_node;
++ tree neon_intSI_type_node;
++ tree neon_intDI_type_node;
++ tree neon_float_type_node;
++
++ tree intQI_pointer_node;
++ tree intHI_pointer_node;
++ tree intSI_pointer_node;
++ tree intDI_pointer_node;
++ tree float_pointer_node;
++
++ tree const_intQI_node;
++ tree const_intHI_node;
++ tree const_intSI_node;
++ tree const_intDI_node;
++ tree const_float_node;
++
++ tree const_intQI_pointer_node;
++ tree const_intHI_pointer_node;
++ tree const_intSI_pointer_node;
++ tree const_intDI_pointer_node;
++ tree const_float_pointer_node;
++
++ tree V8QI_type_node;
++ tree V4HI_type_node;
++ tree V2SI_type_node;
++ tree V2SF_type_node;
++ tree V16QI_type_node;
++ tree V8HI_type_node;
++ tree V4SI_type_node;
++ tree V4SF_type_node;
++ tree V2DI_type_node;
++
++ tree intUQI_type_node;
++ tree intUHI_type_node;
++ tree intUSI_type_node;
++ tree intUDI_type_node;
++
++ tree intEI_type_node;
++ tree intOI_type_node;
++ tree intCI_type_node;
++ tree intXI_type_node;
++
++ tree V8QI_pointer_node;
++ tree V4HI_pointer_node;
++ tree V2SI_pointer_node;
++ tree V2SF_pointer_node;
++ tree V16QI_pointer_node;
++ tree V8HI_pointer_node;
++ tree V4SI_pointer_node;
++ tree V4SF_pointer_node;
++ tree V2DI_pointer_node;
++
++ tree void_ftype_pv8qi_v8qi_v8qi;
++ tree void_ftype_pv4hi_v4hi_v4hi;
++ tree void_ftype_pv2si_v2si_v2si;
++ tree void_ftype_pv2sf_v2sf_v2sf;
++ tree void_ftype_pdi_di_di;
++ tree void_ftype_pv16qi_v16qi_v16qi;
++ tree void_ftype_pv8hi_v8hi_v8hi;
++ tree void_ftype_pv4si_v4si_v4si;
++ tree void_ftype_pv4sf_v4sf_v4sf;
++ tree void_ftype_pv2di_v2di_v2di;
++
++ tree reinterp_ftype_dreg[5][5];
++ tree reinterp_ftype_qreg[5][5];
++ tree dreg_types[5], qreg_types[5];
++
+ /* Create distinguished type nodes for NEON vector element types,
+ and pointers to values of such types, so we can detect them later. */
+- tree neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
+- tree neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
+- tree neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
+- tree neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
+- tree neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
+- tree neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
+- tree neon_float_type_node = make_node (REAL_TYPE);
+-
+- tree intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
+- tree intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
+- tree intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
+- tree intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
+- tree float_pointer_node = build_pointer_type (neon_float_type_node);
++ neon_intQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
++ neon_intHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
++ neon_polyQI_type_node = make_signed_type (GET_MODE_PRECISION (QImode));
++ neon_polyHI_type_node = make_signed_type (GET_MODE_PRECISION (HImode));
++ neon_intSI_type_node = make_signed_type (GET_MODE_PRECISION (SImode));
++ neon_intDI_type_node = make_signed_type (GET_MODE_PRECISION (DImode));
++ neon_float_type_node = make_node (REAL_TYPE);
++ TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
++ layout_type (neon_float_type_node);
++
++ intQI_pointer_node = build_pointer_type (neon_intQI_type_node);
++ intHI_pointer_node = build_pointer_type (neon_intHI_type_node);
++ intSI_pointer_node = build_pointer_type (neon_intSI_type_node);
++ intDI_pointer_node = build_pointer_type (neon_intDI_type_node);
++ float_pointer_node = build_pointer_type (neon_float_type_node);
+
+ /* Next create constant-qualified versions of the above types. */
+- tree const_intQI_node = build_qualified_type (neon_intQI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intHI_node = build_qualified_type (neon_intHI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intSI_node = build_qualified_type (neon_intSI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_intDI_node = build_qualified_type (neon_intDI_type_node,
+- TYPE_QUAL_CONST);
+- tree const_float_node = build_qualified_type (neon_float_type_node,
+- TYPE_QUAL_CONST);
+-
+- tree const_intQI_pointer_node = build_pointer_type (const_intQI_node);
+- tree const_intHI_pointer_node = build_pointer_type (const_intHI_node);
+- tree const_intSI_pointer_node = build_pointer_type (const_intSI_node);
+- tree const_intDI_pointer_node = build_pointer_type (const_intDI_node);
+- tree const_float_pointer_node = build_pointer_type (const_float_node);
++ const_intQI_node = build_qualified_type (neon_intQI_type_node,
++ TYPE_QUAL_CONST);
++ const_intHI_node = build_qualified_type (neon_intHI_type_node,
++ TYPE_QUAL_CONST);
++ const_intSI_node = build_qualified_type (neon_intSI_type_node,
++ TYPE_QUAL_CONST);
++ const_intDI_node = build_qualified_type (neon_intDI_type_node,
++ TYPE_QUAL_CONST);
++ const_float_node = build_qualified_type (neon_float_type_node,
++ TYPE_QUAL_CONST);
++
++ const_intQI_pointer_node = build_pointer_type (const_intQI_node);
++ const_intHI_pointer_node = build_pointer_type (const_intHI_node);
++ const_intSI_pointer_node = build_pointer_type (const_intSI_node);
++ const_intDI_pointer_node = build_pointer_type (const_intDI_node);
++ const_float_pointer_node = build_pointer_type (const_float_node);
+
+ /* Now create vector types based on our NEON element types. */
+ /* 64-bit vectors. */
+- tree V8QI_type_node =
++ V8QI_type_node =
+ build_vector_type_for_mode (neon_intQI_type_node, V8QImode);
+- tree V4HI_type_node =
++ V4HI_type_node =
+ build_vector_type_for_mode (neon_intHI_type_node, V4HImode);
+- tree V2SI_type_node =
++ V2SI_type_node =
+ build_vector_type_for_mode (neon_intSI_type_node, V2SImode);
+- tree V2SF_type_node =
++ V2SF_type_node =
+ build_vector_type_for_mode (neon_float_type_node, V2SFmode);
+ /* 128-bit vectors. */
+- tree V16QI_type_node =
++ V16QI_type_node =
+ build_vector_type_for_mode (neon_intQI_type_node, V16QImode);
+- tree V8HI_type_node =
++ V8HI_type_node =
+ build_vector_type_for_mode (neon_intHI_type_node, V8HImode);
+- tree V4SI_type_node =
++ V4SI_type_node =
+ build_vector_type_for_mode (neon_intSI_type_node, V4SImode);
+- tree V4SF_type_node =
++ V4SF_type_node =
+ build_vector_type_for_mode (neon_float_type_node, V4SFmode);
+- tree V2DI_type_node =
++ V2DI_type_node =
+ build_vector_type_for_mode (neon_intDI_type_node, V2DImode);
+
+ /* Unsigned integer types for various mode sizes. */
+- tree intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
+- tree intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
+- tree intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
+- tree intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
++ intUQI_type_node = make_unsigned_type (GET_MODE_PRECISION (QImode));
++ intUHI_type_node = make_unsigned_type (GET_MODE_PRECISION (HImode));
++ intUSI_type_node = make_unsigned_type (GET_MODE_PRECISION (SImode));
++ intUDI_type_node = make_unsigned_type (GET_MODE_PRECISION (DImode));
+
+ /* Opaque integer types for structures of vectors. */
+- tree intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
+- tree intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
+- tree intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
+- tree intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
++ intEI_type_node = make_signed_type (GET_MODE_PRECISION (EImode));
++ intOI_type_node = make_signed_type (GET_MODE_PRECISION (OImode));
++ intCI_type_node = make_signed_type (GET_MODE_PRECISION (CImode));
++ intXI_type_node = make_signed_type (GET_MODE_PRECISION (XImode));
+
+ /* Pointers to vector types. */
+- tree V8QI_pointer_node = build_pointer_type (V8QI_type_node);
+- tree V4HI_pointer_node = build_pointer_type (V4HI_type_node);
+- tree V2SI_pointer_node = build_pointer_type (V2SI_type_node);
+- tree V2SF_pointer_node = build_pointer_type (V2SF_type_node);
+- tree V16QI_pointer_node = build_pointer_type (V16QI_type_node);
+- tree V8HI_pointer_node = build_pointer_type (V8HI_type_node);
+- tree V4SI_pointer_node = build_pointer_type (V4SI_type_node);
+- tree V4SF_pointer_node = build_pointer_type (V4SF_type_node);
+- tree V2DI_pointer_node = build_pointer_type (V2DI_type_node);
++ V8QI_pointer_node = build_pointer_type (V8QI_type_node);
++ V4HI_pointer_node = build_pointer_type (V4HI_type_node);
++ V2SI_pointer_node = build_pointer_type (V2SI_type_node);
++ V2SF_pointer_node = build_pointer_type (V2SF_type_node);
++ V16QI_pointer_node = build_pointer_type (V16QI_type_node);
++ V8HI_pointer_node = build_pointer_type (V8HI_type_node);
++ V4SI_pointer_node = build_pointer_type (V4SI_type_node);
++ V4SF_pointer_node = build_pointer_type (V4SF_type_node);
++ V2DI_pointer_node = build_pointer_type (V2DI_type_node);
+
+ /* Operations which return results as pairs. */
+- tree void_ftype_pv8qi_v8qi_v8qi =
++ void_ftype_pv8qi_v8qi_v8qi =
+ build_function_type_list (void_type_node, V8QI_pointer_node, V8QI_type_node,
+ V8QI_type_node, NULL);
+- tree void_ftype_pv4hi_v4hi_v4hi =
++ void_ftype_pv4hi_v4hi_v4hi =
+ build_function_type_list (void_type_node, V4HI_pointer_node, V4HI_type_node,
+ V4HI_type_node, NULL);
+- tree void_ftype_pv2si_v2si_v2si =
++ void_ftype_pv2si_v2si_v2si =
+ build_function_type_list (void_type_node, V2SI_pointer_node, V2SI_type_node,
+ V2SI_type_node, NULL);
+- tree void_ftype_pv2sf_v2sf_v2sf =
++ void_ftype_pv2sf_v2sf_v2sf =
+ build_function_type_list (void_type_node, V2SF_pointer_node, V2SF_type_node,
+ V2SF_type_node, NULL);
+- tree void_ftype_pdi_di_di =
++ void_ftype_pdi_di_di =
+ build_function_type_list (void_type_node, intDI_pointer_node,
+ neon_intDI_type_node, neon_intDI_type_node, NULL);
+- tree void_ftype_pv16qi_v16qi_v16qi =
++ void_ftype_pv16qi_v16qi_v16qi =
+ build_function_type_list (void_type_node, V16QI_pointer_node,
+ V16QI_type_node, V16QI_type_node, NULL);
+- tree void_ftype_pv8hi_v8hi_v8hi =
++ void_ftype_pv8hi_v8hi_v8hi =
+ build_function_type_list (void_type_node, V8HI_pointer_node, V8HI_type_node,
+ V8HI_type_node, NULL);
+- tree void_ftype_pv4si_v4si_v4si =
++ void_ftype_pv4si_v4si_v4si =
+ build_function_type_list (void_type_node, V4SI_pointer_node, V4SI_type_node,
+ V4SI_type_node, NULL);
+- tree void_ftype_pv4sf_v4sf_v4sf =
++ void_ftype_pv4sf_v4sf_v4sf =
+ build_function_type_list (void_type_node, V4SF_pointer_node, V4SF_type_node,
+ V4SF_type_node, NULL);
+- tree void_ftype_pv2di_v2di_v2di =
++ void_ftype_pv2di_v2di_v2di =
+ build_function_type_list (void_type_node, V2DI_pointer_node, V2DI_type_node,
+ V2DI_type_node, NULL);
+
+- tree reinterp_ftype_dreg[5][5];
+- tree reinterp_ftype_qreg[5][5];
+- tree dreg_types[5], qreg_types[5];
+-
+- TYPE_PRECISION (neon_float_type_node) = FLOAT_TYPE_SIZE;
+- layout_type (neon_float_type_node);
+-
+ /* Define typedefs which exactly correspond to the modes we are basing vector
+ types on. If you change these names you'll need to change
+ 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 0000000..3d33bcb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
+@@ -1907,7 +1907,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
+@@ -2669,7 +2669,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ 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 0000000..4e162e6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-build-id.patch
@@ -0,0 +1,74 @@
+2007-07-22 Roland McGrath <roland@redhat.com>
+
+ * config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
+ non-relocatable link.
+ * config/linux.h (LINK_EH_SPEC): Likewise.
+ * config/sparc/linux.h (LINK_EH_SPEC): Likewise.
+ * config/sparc/linux64.h (LINK_EH_SPEC): Likewise.
+ * config/alpha/elf.h (LINK_EH_SPEC): Likewise.
+ * config/ia64/linux.h (LINK_EH_SPEC): Likewise.
+
+--- gcc/config/rs6000/sysv4.h.~1~
++++ gcc/config/rs6000/sysv4.h
+@@ -1044,7 +1044,7 @@ extern int fixuplabelno;
+ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
+ #endif
+
+ #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
+--- gcc/config/linux.h.~1~
++++ gcc/config/linux.h
+@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
+ } while (0)
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
+ #endif
+
+ /* Define this so we can compile MS code for use with WINE. */
+--- gcc/config/sparc/linux64.h.~1~
++++ gcc/config/sparc/linux64.h
+@@ -316,7 +316,7 @@ do { \
+ #define DITF_CONVERSION_LIBFUNCS 1
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
+ #endif
+
+ #ifdef HAVE_AS_TLS
+--- gcc/config/sparc/linux.h.~1~
++++ gcc/config/sparc/linux.h
+@@ -188,7 +188,7 @@ do { \
+ #define DITF_CONVERSION_LIBFUNCS 1
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
+ #endif
+
+ #ifdef HAVE_AS_TLS
+--- gcc/config/alpha/elf.h.~1~
++++ gcc/config/alpha/elf.h
+@@ -453,5 +453,5 @@ extern int alpha_this_gpdisp_sequence_nu
+ I imagine that other systems will catch up. In the meantime, it
+ doesn't harm to make sure that the data exists to be used later. */
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
+ #endif
+--- gcc/config/ia64/linux.h.~1~
++++ gcc/config/ia64/linux.h
+@@ -56,7 +56,7 @@ do { \
+ Signalize that because we have fde-glibc, we don't need all C shared libs
+ linked against -lgcc_s. */
+ #undef LINK_EH_SPEC
+-#define LINK_EH_SPEC ""
++#define LINK_EH_SPEC "%{!r:--build-id} "
+
+ #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
+
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 0000000..d49f2b9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gcc43-ppc64-ia64-GNU-stack.patch
@@ -0,0 +1,86 @@
+2007-08-27 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000.c (rs6000_elf_end_indicate_exec_stack): New.
+ * config/rs6000/linux64.h (TARGET_ASM_FILE_END): Use
+ rs6000_elf_end_indicate_exec_stack.
+ * config/ia64/ia64.c (ia64_linux_file_end): new.
+ * config/ia64/linux.h (TARGET_ASM_FILE_END): Use ia64_linux_file_end.
+
+--- gcc/config/rs6000/rs6000.c.jj 2007-12-07 18:41:08.000000000 +0100
++++ gcc/config/rs6000/rs6000.c 2007-12-07 18:42:12.000000000 +0100
+@@ -746,6 +746,7 @@ static void rs6000_file_start (void);
+ static int rs6000_elf_reloc_rw_mask (void);
+ static void rs6000_elf_asm_out_constructor (rtx, int);
+ static void rs6000_elf_asm_out_destructor (rtx, int);
++static void rs6000_elf_end_indicate_exec_stack (void) ATTRIBUTE_UNUSED;
+ static void rs6000_elf_asm_init_sections (void);
+ static section *rs6000_elf_select_rtx_section (enum machine_mode, rtx,
+ unsigned HOST_WIDE_INT);
+@@ -20418,6 +20419,20 @@ rs6000_elf_declare_function_name (FILE *
+ }
+ ASM_OUTPUT_LABEL (file, name);
+ }
++
++static void
++rs6000_elf_end_indicate_exec_stack (void)
++{
++ if (TARGET_32BIT)
++ file_end_indicate_exec_stack ();
++ else
++ {
++ int saved_trampolines_created = trampolines_created;
++ trampolines_created = 0;
++ file_end_indicate_exec_stack ();
++ trampolines_created = saved_trampolines_created;
++ }
++}
+ #endif
+
+ #if TARGET_XCOFF
+--- gcc/config/rs6000/linux64.h.jj 2007-12-07 17:18:06.000000000 +0100
++++ gcc/config/rs6000/linux64.h 2007-12-07 18:41:21.000000000 +0100
+@@ -504,7 +504,7 @@ extern int dot_symbols;
+ #undef DRAFT_V4_STRUCT_RET
+ #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
+
+-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
+
+ #define TARGET_POSIX_IO
+
+--- gcc/config/ia64/linux.h.jj 2007-12-07 18:17:43.000000000 +0100
++++ gcc/config/ia64/linux.h 2007-12-07 18:41:21.000000000 +0100
+@@ -5,7 +5,7 @@
+
+ #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
+
+-#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++#define TARGET_ASM_FILE_END ia64_linux_file_end
+
+ /* This is for -profile to use -lc_p instead of -lc. */
+ #undef CC1_SPEC
+--- gcc/config/ia64/ia64.c.jj 2007-12-07 15:41:58.000000000 +0100
++++ gcc/config/ia64/ia64.c 2007-12-07 18:43:18.000000000 +0100
+@@ -262,6 +262,8 @@ static section *ia64_select_rtx_section
+ static void ia64_output_dwarf_dtprel (FILE *, int, rtx)
+ ATTRIBUTE_UNUSED;
+ static unsigned int ia64_section_type_flags (tree, const char *, int);
++static void ia64_linux_file_end (void)
++ ATTRIBUTE_UNUSED;
+ static void ia64_init_libfuncs (void)
+ ATTRIBUTE_UNUSED;
+ static void ia64_hpux_init_libfuncs (void)
+@@ -9957,4 +9959,13 @@ ia64_c_mode_for_suffix (char suffix)
+ return VOIDmode;
+ }
+
++static void
++ia64_linux_file_end (void)
++{
++ int saved_trampolines_created = trampolines_created;
++ trampolines_created = 0;
++ file_end_indicate_exec_stack ();
++ trampolines_created = saved_trampolines_created;
++}
++
+ #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 0000000..96905e5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/gfortran.patch
@@ -0,0 +1,40 @@
+The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
+
+This target doesn't really have a 128-bit integer type, however it does use
+TImode to represent the return value of certain special ABI defined library
+functions. This results in type_for_size(TImode) being called.
+
+Because TImode deosn't correspond to any gfortran integer kind
+gfc_type_for_size returns NULL and we segfault shortly after.
+
+The patch below fixes this by making gfc_type_for_size handle TImode in the
+same way as the C frontend.
+
+Tested on x86_64-linux and arm-linux-gnueabi.
+Applied to trunk.
+
+Paul
+
+2007-05-15 Paul Brook <paul@codesourcery.com>
+
+ gcc/fortran/
+ * trans-types.c (gfc_type_for_size): Handle signed TImode.
+
+Index: gcc-4.2.1/gcc/fortran/trans-types.c
+===================================================================
+--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
++++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
+@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
+ if (type && bits == TYPE_PRECISION (type))
+ return type;
+ }
++
++ /* Handle TImode as a special case because it is used by some backends
++ (eg. ARM) even though it is not available for normal use. */
++#if HOST_BITS_PER_WIDE_INT >= 64
++ if (bits == TYPE_PRECISION (intTI_type_node))
++ return intTI_type_node;
++#endif
+ }
+ else
+ {
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 0000000..a3a6aff
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/headerpath.patch
@@ -0,0 +1,42 @@
+Index: gcc-4.3.3/gcc/Makefile.in
+===================================================================
+--- gcc-4.3.3.orig/gcc/Makefile.in 2009-09-11 17:51:50.000000000 +0100
++++ gcc-4.3.3/gcc/Makefile.in 2009-09-11 17:56:48.000000000 +0100
+@@ -378,7 +378,7 @@
+ MD5_H = $(srcdir)/../include/md5.h
+
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+-NATIVE_SYSTEM_HEADER_DIR = /usr/include
++NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+
+Index: gcc-4.3.3/gcc/configure
+===================================================================
+--- gcc-4.3.3.orig/gcc/configure 2009-09-11 17:49:58.000000000 +0100
++++ gcc-4.3.3/gcc/configure 2009-09-11 18:00:16.000000000 +0100
+@@ -7315,7 +7315,7 @@
+ enable_shared=yes
+ fi;
+
+-
++NATIVE_SYSTEM_HEADER_DIR=$NATIVE_SYSTEM_HEADER_DIR
+
+ # Check whether --with-build-sysroot or --without-build-sysroot was given.
+ if test "${with_build_sysroot+set}" = set; then
+@@ -7323,7 +7323,6 @@
+
+ fi;
+
+-
+ # Check whether --with-sysroot or --without-sysroot was given.
+ if test "${with_sysroot+set}" = set; then
+ withval="$with_sysroot"
+@@ -23882,6 +23881,7 @@
+ s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
+ s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
+ s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
++s,@NATIVE_SYSTEM_HEADER_DIR@,$NATIVE_SYSTEM_HEADER_DIR,;t t
+ s,@onestep@,$onestep,;t t
+ s,@PKGVERSION@,$PKGVERSION,;t t
+ 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 0000000..fdff3d3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/intermask-bigendian.patch
@@ -0,0 +1,24 @@
+--- gcc-4.2.0/gcc/config/arm/bpabi.h
++++ gcc-4.2.0/gcc/config/arm/bpabi.h
+@@ -33,9 +33,19 @@
+ #undef FPUTYPE_DEFAULT
+ #define FPUTYPE_DEFAULT FPUTYPE_VFP
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#endif
++
+ /* EABI targets should enable interworking by default. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT MASK_INTERWORK
++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
+
+ /* The ARM BPABI functions return a boolean; they use no special
+ calling convention. */
+
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 0000000..9576f60
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/ldflags.patch
@@ -0,0 +1,22 @@
+--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
+@@ -334,7 +334,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
+--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
+@@ -337,7 +337,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
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 0000000..0f74353
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/optional_libstdc.patch
@@ -0,0 +1,23 @@
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since my default the linker will try and link against libstdc++
+which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch
+adds such an option which only disables the -lstdc++ linkage.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Index: gcc-4.3.3/gcc/cp/g++spec.c
+===================================================================
+--- gcc-4.3.3.orig/gcc/cp/g++spec.c 2010-06-29 00:06:03.901695025 +0100
++++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
+@@ -131,6 +131,7 @@
+ if (argv[i][0] == '-')
+ {
+ if (strcmp (argv[i], "-nostdlib") == 0
++ || strcmp (argv[i], "-nostdlib++") == 0
+ || strcmp (argv[i], "-nodefaultlibs") == 0)
+ {
+ 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 0000000..415335f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ 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 0000000..da610f5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/pr35942.patch
@@ -0,0 +1,38 @@
+Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
+
+libstdc++-v3/ChangeLog:
+2010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR libstdc++/35942
+ * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
+ * configure: Regenerate.
+
+
+Index: gcc-4.3.3/libstdc++-v3/configure
+===================================================================
+--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
++++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
+@@ -13759,6 +13759,9 @@
+
+
+
++# Eliminate -lstdc++ addition to postdeps for cross compiles.
++postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
++
+ # Possibly disable most of the library.
+ ## TODO: Consider skipping unncessary tests altogether in this case, rather
+ ## than just ignoring the results. Faster /and/ more correct, win win.
+Index: gcc-4.3.3/libstdc++-v3/configure.ac
+===================================================================
+--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
++++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
+@@ -89,6 +89,9 @@
+ AC_SUBST(enable_shared)
+ AC_SUBST(enable_static)
+
++# Eliminate -lstdc++ addition to postdeps for cross compiles.
++postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
++
+ # Possibly disable most of the library.
+ ## TODO: Consider skipping unncessary tests altogether in this case, rather
+ ## 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 0000000..4377c21
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
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 0000000..a06cd2e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sh3-installfix-fixheaders.patch
@@ -0,0 +1,11 @@
+--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000
++++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000
+@@ -3772,8 +3772,6 @@
+ $(INSTALL_SCRIPT) $(mkinstalldirs) \
+ $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
+ $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
+- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
+- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
+ else :; fi
+ echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
+ > $(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 0000000..9492163
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sh_unwind.patch
@@ -0,0 +1,18 @@
+Index: gcc-4.2.4/gcc/config/sh/linux-unwind.h
+===================================================================
+--- gcc-4.2.4.orig/gcc/config/sh/linux-unwind.h 2008-10-04 00:05:29.434889757 +0200
++++ gcc-4.2.4/gcc/config/sh/linux-unwind.h 2008-10-04 00:06:02.594883544 +0200
+@@ -26,6 +26,7 @@
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
++#ifndef inhibit_libc
+ /* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
+@@ -251,3 +252,5 @@
+ return _URC_NO_REASON;
+ }
+ #endif /* defined (__SH5__) */
++
++#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 0000000..7c8113a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/sparseset_rule.patch
@@ -0,0 +1,20 @@
+Fix a missing config.h dependency when building sparseset.o to prevent
+"conflicting types for 'strsignal'" error, which can intermittently crop
+up for high values of make -j.
+
+Thanks to Richard Purdie and Jeff Dike for their help in tracking this
+down.
+
+Scott Garman <scott.a.garman@intel.com> 2010-07-13
+diff -urN gcc-4.3.3.orig//gcc/Makefile.in gcc-4.3.3/gcc/Makefile.in
+--- gcc-4.3.3.orig//gcc/Makefile.in 2008-12-04 15:00:19.000000000 -0800
++++ gcc-4.3.3/gcc/Makefile.in 2010-07-13 21:30:01.864681358 -0700
+@@ -1789,7 +1789,7 @@
+ $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H)
+ ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(EBITMAP_H)
+-sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h
++sparseset.o: sparseset.c $(CONFIG_H) $(SYSTEM_H) sparseset.h
+
+ COLLECT2_OBJS = collect2.o tlink.o intl.o version.o
+ 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 0000000..b3399ab
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/unbreak-armv4t.patch
@@ -0,0 +1,12 @@
+diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
+--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
+@@ -45,7 +45,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+ #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 0000000..1f3b062
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_DIRECTORY_STRUCTURE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
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 0000000..a7722cb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch
@@ -0,0 +1,28 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+Index: gcc-4.3.1/Makefile.in
+===================================================================
+--- gcc-4.3.1.orig/Makefile.in 2008-08-19 01:09:56.000000000 -0700
++++ gcc-4.3.1/Makefile.in 2008-08-19 01:13:27.000000000 -0700
+@@ -204,6 +204,7 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+Index: gcc-4.3.1/Makefile.tpl
+===================================================================
+--- gcc-4.3.1.orig/Makefile.tpl 2008-08-21 00:07:58.000000000 -0700
++++ gcc-4.3.1/Makefile.tpl 2008-08-21 00:09:52.000000000 -0700
+@@ -223,6 +223,7 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ 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 0000000..6ca2f98
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0.inc
@@ -0,0 +1,81 @@
+require gcc-common.inc
+LICENSE = "GPLv3"
+
+DEPENDS =+ "mpfr gmp libmpc elfutils"
+NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native elfutils-native"
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://gcc-4.5.0_to_svn_162697.patch.bz2 \
+ file://gcc_revert_base_version_to_4.5.0.patch \
+ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://100-uclibc-conf.patch \
+ file://gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://cache-amnesia.patch \
+ file://gcc-flags-for-build.patch \
+ file://libstdc++-emit-__cxa_end_cleanup-in-text.patch \
+ file://arm-bswapsi2.patch \
+ file://gcc-pr43698-arm-rev-instr.patch \
+ \
+ file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \
+ file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \
+ file://fedora/gcc43-java-nomulti.patch;striplevel=0 \
+ file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \
+ file://fedora/gcc43-pr32139.patch;striplevel=0 \
+ file://fedora/gcc43-pr33763.patch;striplevel=0 \
+ file://fedora/gcc43-rh330771.patch;striplevel=0 \
+ file://fedora/gcc43-rh341221.patch;striplevel=0 \
+ file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \
+ file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \
+ file://103-uclibc-conf-noupstream.patch \
+ file://200-uclibc-locale.patch \
+ file://203-uclibc-locale-no__x.patch;striplevel=1 \
+ file://204-uclibc-locale-wchar_fix.patch;striplevel=1 \
+ file://205-uclibc-locale-update.patch;striplevel=1 \
+ file://301-missing-execinfo_h.patch \
+ file://302-c99-snprintf.patch \
+ file://303-c99-complex-ugly-hack.patch \
+ file://304-index_macro.patch \
+ file://305-libmudflap-susv3-legacy.patch \
+ file://306-libstdc++-namespace.patch \
+ file://740-sh-pr24836.patch \
+ file://800-arm-bigendian.patch \
+ file://904-flatten-switch-stmt-00.patch \
+ file://arm-nolibfloat.patch \
+ file://arm-softfloat.patch \
+ file://zecke-xgcc-cpp.patch \
+ file://gcc-poison-system-directories.patch \
+ file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://64bithack.patch \
+ file://optional_libstdc.patch \
+ "
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+#EXTRA_OECONF_BASE = " --enable-cheaders=c_std \
+# --enable-libssp \
+# --disable-bootstrap \
+# --disable-libgomp \
+# --disable-libmudflap"
+EXTRA_OECONF_BASE = " --enable-lto \
+ --enable-libssp \
+ --disable-bootstrap \
+ --disable-libgomp \
+ --disable-libmudflap \
+ --enable-cheaders=c_global "
+
+EXTRA_OECONF_INITIAL = "--disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp \
+ --enable-decimal-float=no"
+
+EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
+ --disable-libgomp \
+ --disable-libssp"
+
+EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float "
+EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float "
+EXTRA_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 0000000..0b79960
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/100-uclibc-conf.patch
@@ -0,0 +1,37 @@
+Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
+===================================================================
+--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
++++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
+@@ -105,6 +105,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+Index: gcc-4.3.1/libjava/classpath/ltconfig
+===================================================================
+--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
++++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ 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 0000000..f9d8ad9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,15 @@
+Corrects sub machine arch corectly
+
+Index: gcc-4.5.0/gcc/config.gcc
+===================================================================
+--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:17:43.809880847 -0700
++++ gcc-4.5.0/gcc/config.gcc 2010-06-25 10:38:09.689882136 -0700
+@@ -2171,7 +2171,7 @@
+ ;;
+ sh-*-elf* | sh[12346l]*-*-elf* | \
+ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
+- sh-*-linux* | sh[2346lbe]*-*-linux* | \
++ sh*-*-linux* | sh[2346lbe]*-*-linux* | \
+ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+ sh64-*-netbsd* | sh64l*-*-netbsd*)
+ 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 0000000..32de11f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/200-uclibc-locale.patch
@@ -0,0 +1,2840 @@
+Index: gcc-4.5.0/libstdc++-v3/acinclude.m4
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/acinclude.m4 2010-04-05 18:27:44.000000000 -0700
++++ gcc-4.5.0/libstdc++-v3/acinclude.m4 2010-06-25 10:42:34.913881064 -0700
+@@ -1703,7 +1703,7 @@
+ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
+
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+@@ -1724,6 +1724,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -1895,6 +1898,40 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ AC_MSG_RESULT(uclibc)
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++ AC_SUBST(glibcxx_MOFILES)
++ AC_SUBST(glibcxx_POFILES)
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno> // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
++#define __strtof_l(S, E, L) strtof((S), (E))
++#define __strtod_l(S, E, L) strtod((S), (E))
++#define __strtold_l(S, E, L) strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c) NULL
++#define __freelocale(a) ((void)0)
++#define __duplocale(a) __c_locale()
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ void
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ __c_locale __old)
++ {
++ __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ if (!__cloc)
++ {
++ // This named locale is not supported by the underlying OS.
++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++ "name not valid"));
++ }
++#endif
++ }
++
++ void
++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++ {
++ if (_S_get_c_locale() != __cloc)
++ __freelocale(__cloc);
++ }
++
++ __c_locale
++ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++ { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++ {
++ "LC_CTYPE",
++ "LC_NUMERIC",
++ "LC_TIME",
++ "LC_COLLATE",
++ "LC_MONETARY",
++ "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++ "LC_PAPER",
++ "LC_NAME",
++ "LC_ADDRESS",
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
++#endif
++ };
++}
++
++namespace std
++{
++ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++} // namespace std
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring> // get std::strlen
++#include <cstdio> // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h> // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h> // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++ extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++ typedef __locale_t __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
++
++ // Convert numeric value of type _Tv to string and return length of
++ // string. If snprintf is available use it, otherwise fall back to
++ // the unsafe sprintf which, in general, can be dangerous and should
++ // be avoided.
++ template<typename _Tv>
++ int
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ _Tv __v, const __c_locale& __cloc, int __prec)
++ {
++ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++ _Tv __v, const __c_locale&, int __prec)
++ {
++# ifdef __UCLIBC_HAS_LOCALE__
++ char* __old = std::setlocale(LC_ALL, NULL);
++ char* __sav = new char[std::strlen(__old) + 1];
++ std::strcpy(__sav, __old);
++ std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++ std::setlocale(LC_ALL, __sav);
++ delete [] __sav;
++#endif
++ return __ret;
++ }
++}
++
++#endif
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,308 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <cstdlib> // For MB_CUR_MAX
++#include <climits> // For MB_LEN_MAX
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++ // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_out(state_type& __state, const intern_type* __from,
++ const intern_type* __from_end, const intern_type*& __from_next,
++ extern_type* __to, extern_type* __to_end,
++ extern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++ // in case we fall back to wcrtomb and then continue, in a loop.
++ // NB: wcsnrtombs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++ __from_end - __from_next);
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // wcrtomb.
++ for (; __from < __from_next; ++__from)
++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ extern_type __buf[MB_LEN_MAX];
++ __tmp_state = __state;
++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++ if (__conv > static_cast<size_t>(__to_end - __to_next))
++ __ret = partial;
++ else
++ {
++ memcpy(__to_next, __buf, __conv);
++ __state = __tmp_state;
++ __to_next += __conv;
++ ++__from_next;
++ }
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_in(state_type& __state, const extern_type* __from,
++ const extern_type* __from_end, const extern_type*& __from_next,
++ intern_type* __to, intern_type* __to_end,
++ intern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we store a L'\0' and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++ __from_end
++ - __from_next));
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (;; ++__to_next, __from += __conv)
++ {
++ __conv = mbrtowc(__to_next, __from, __from_end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __from_next = __from;
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ // It is unclear what to return in this case (see DR 382).
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ if (__to_next < __to_end)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from_next;
++ *__to_next++ = L'\0';
++ }
++ else
++ __ret = partial;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_encoding() const throw()
++ {
++ // XXX This implementation assumes that the encoding is
++ // stateless and is either single-byte or variable-width.
++ int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ if (MB_CUR_MAX == 1)
++ __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_max_length() const throw()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ // XXX Probably wrong for stateful encodings.
++ int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_length(state_type& __state, const extern_type* __from,
++ const extern_type* __end, size_t __max) const
++ {
++ int __ret = 0;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we advance past it and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++
++ // A dummy internal buffer is needed in order for mbsnrtocws to consider
++ // its fourth parameter (it wouldn't with NULL as first parameter).
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ * __max));
++ while (__from < __end && __max)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++ __end
++ - __from));
++ if (!__from_chunk_end)
++ __from_chunk_end = __end;
++
++ const extern_type* __tmp_from = __from;
++ size_t __conv = mbsnrtowcs(__to, &__from,
++ __from_chunk_end - __from,
++ __max, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (__from = __tmp_from;; __from += __conv)
++ {
++ __conv = mbrtowc(NULL, __from, __end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __state = __tmp_state;
++ __ret += __from - __tmp_from;
++ break;
++ }
++ if (!__from)
++ __from = __from_chunk_end;
++
++ __ret += __from - __tmp_from;
++ __max -= __conv;
++
++ if (__from < __end && __max)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from;
++ ++__ret;
++ --__max;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++#endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++ // These are basically extensions to char_traits, and perhaps should
++ // be put there instead of here.
++ template<>
++ int
++ collate<char>::_M_compare(const char* __one, const char* __two) const
++ {
++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ const wchar_t* __two) const
++ {
++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++ size_t __n) const
++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L) wctype((S))
++#define __towupper_l(C, L) towupper((C))
++#define __towlower_l(C, L) towlower((C))
++#define __iswctype_l(C, M, L) iswctype((C), (M))
++#endif
++
++namespace std
++{
++ // NB: The other ctype<char> specializations are in src/locale.cc and
++ // various /config/os/* files.
++ template<>
++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++ : ctype<char>(0, false, __refs)
++ {
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ ctype<wchar_t>::__wmask_type
++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++ {
++ __wmask_type __ret;
++ switch (__m)
++ {
++ case space:
++ __ret = __wctype_l("space", _M_c_locale_ctype);
++ break;
++ case print:
++ __ret = __wctype_l("print", _M_c_locale_ctype);
++ break;
++ case cntrl:
++ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++ break;
++ case upper:
++ __ret = __wctype_l("upper", _M_c_locale_ctype);
++ break;
++ case lower:
++ __ret = __wctype_l("lower", _M_c_locale_ctype);
++ break;
++ case alpha:
++ __ret = __wctype_l("alpha", _M_c_locale_ctype);
++ break;
++ case digit:
++ __ret = __wctype_l("digit", _M_c_locale_ctype);
++ break;
++ case punct:
++ __ret = __wctype_l("punct", _M_c_locale_ctype);
++ break;
++ case xdigit:
++ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++ break;
++ case alnum:
++ __ret = __wctype_l("alnum", _M_c_locale_ctype);
++ break;
++ case graph:
++ __ret = __wctype_l("graph", _M_c_locale_ctype);
++ break;
++ default:
++ __ret = __wmask_type();
++ }
++ return __ret;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_toupper(wchar_t __c) const
++ { return __towupper_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_tolower(wchar_t __c) const
++ { return __towlower_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ bool
++ ctype<wchar_t>::
++ do_is(mask __m, wchar_t __c) const
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ bool __ret = false;
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur]
++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ return __ret;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++ {
++ for (; __lo < __hi; ++__vec, ++__lo)
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ mask __m = 0;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++ __m |= _M_bit[__bitcur];
++ *__vec = __m;
++ }
++ return __hi;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi && !this->do_is(__m, *__lo))
++ ++__lo;
++ return __lo;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++ {
++ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++ ++__lo;
++ return __lo;
++ }
++
++ wchar_t
++ ctype<wchar_t>::
++ do_widen(char __c) const
++ { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++ const char*
++ ctype<wchar_t>::
++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++ {
++ while (__lo < __hi)
++ {
++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++ ++__lo;
++ ++__dest;
++ }
++ return __hi;
++ }
++
++ char
++ ctype<wchar_t>::
++ do_narrow(wchar_t __wc, char __dfault) const
++ {
++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++ return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ char* __dest) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ if (_M_narrow_ok)
++ while (__lo < __hi)
++ {
++ if (*__lo >= 0 && *__lo < 128)
++ *__dest = _M_narrow[*__lo];
++ else
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++ ++__lo;
++ ++__dest;
++ }
++ else
++ while (__lo < __hi)
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ ++__lo;
++ ++__dest;
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __hi;
++ }
++
++ void
++ ctype<wchar_t>::_M_initialize_ctype()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ wint_t __i;
++ for (__i = 0; __i < 128; ++__i)
++ {
++ const int __c = wctob(__i);
++ if (__c == EOF)
++ break;
++ else
++ _M_narrow[__i] = static_cast<char>(__c);
++ }
++ if (__i == 128)
++ _M_narrow_ok = true;
++ else
++ _M_narrow_ok = false;
++ for (size_t __j = 0;
++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++ _M_widen[__j] = btowc(__j);
++
++ for (size_t __k = 0; __k <= 11; ++__k)
++ {
++ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ }
++#endif // _GLIBCXX_USE_WCHAR_T
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++ const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++ // Specializations.
++ template<>
++ string
++ messages<char>::do_get(catalog, int, int, const string& __dfault) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++ __uselocale(__old);
++ return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ const char* __msg = gettext(__dfault.c_str());
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return string(__msg);
++#else
++ const char* __msg = gettext(__dfault.c_str());
++ return string(__msg);
++#endif
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ wstring
++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++ {
++# ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ __uselocale(__old);
++ return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return _M_convert_from_char(__msg);
++# else
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ return _M_convert_from_char(__msg);
++# endif
++ }
++#endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++ const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D) ((void)0)
++#define __bindtextdomain(D,P) ((void)0)
++#endif
++
++ // Non-virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::messages(size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ _M_name_messages(_S_get_c_name())
++ { }
++
++ template<typename _CharT>
++ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++ _M_name_messages(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_messages = __tmp;
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ const char* __dir) const
++ {
++ __bindtextdomain(__s.c_str(), __dir);
++ return this->do_open(__s, __loc);
++ }
++
++ // Virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::~messages()
++ {
++ if (_M_name_messages != _S_get_c_name())
++ delete [] _M_name_messages;
++ _S_destroy_c_locale(_M_c_locale_messages);
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
++ const locale&) const
++ {
++ // No error checking is done, assume the catalog exists and can
++ // be used.
++ __textdomain(__s.c_str());
++ return 0;
++ }
++
++ template<typename _CharT>
++ void
++ messages<_CharT>::do_close(catalog) const
++ { }
++
++ // messages_byname
++ template<typename _CharT>
++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++ : messages<_CharT>(__refs)
++ {
++ if (this->_M_name_messages != locale::facet::_S_get_c_name())
++ delete [] this->_M_name_messages;
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ this->_M_name_messages = __tmp;
++
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_messages);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ }
++ }
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ // Construct and return valid pattern consisting of some combination of:
++ // space none symbol sign value
++ money_base::pattern
++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++ {
++ pattern __ret;
++
++ // This insanely complicated routine attempts to construct a valid
++ // pattern for use with monyepunct. A couple of invariants:
++
++ // if (__precedes) symbol -> value
++ // else value -> symbol
++
++ // if (__space) space
++ // else none
++
++ // none == never first
++ // space never first or last
++
++ // Any elegant implementations of this are welcome.
++ switch (__posn)
++ {
++ case 0:
++ case 1:
++ // 1 The sign precedes the value and symbol.
++ __ret.field[0] = sign;
++ if (__space)
++ {
++ // Pattern starts with sign.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[3] = symbol;
++ }
++ __ret.field[2] = space;
++ }
++ else
++ {
++ // Pattern starts with sign and ends with none.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[3] = none;
++ }
++ break;
++ case 2:
++ // 2 The sign follows the value and symbol.
++ if (__space)
++ {
++ // Pattern either ends with sign.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[1] = space;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ // Pattern ends with sign then none.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[1] = symbol;
++ }
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ break;
++ case 3:
++ // 3 The sign immediately precedes the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = sign;
++ __ret.field[1] = symbol;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = sign;
++ __ret.field[3] = symbol;
++ }
++ else
++ {
++ __ret.field[1] = sign;
++ __ret.field[2] = symbol;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ case 4:
++ // 4 The sign immediately follows the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = sign;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = symbol;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ default:
++ ;
++ }
++ return __ret;
++ }
++
++ template<>
++ void
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == true
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ void
++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == false
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ moneypunct<char, true>::~moneypunct()
++ { delete _M_data; }
++
++ template<>
++ moneypunct<char, false>::~moneypunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ void
++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len;
++ __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ moneypunct<wchar_t, true>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++
++ template<>
++ moneypunct<wchar_t, false>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++#endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++ __cloc));
++
++ // Check for NULL, which implies no grouping.
++ if (_M_data->_M_thousands_sep == '\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = "true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = "false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<char>::~numpunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<wchar_t>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++ }
++ else
++ {
++ // Named locale.
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++
++ if (_M_data->_M_thousands_sep == L'\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = L"true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = L"false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<wchar_t>::~numpunct()
++ { delete _M_data; }
++ #endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __timepunct<char>::
++ _M_put(char* __s, size_t __maxlen, const char* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = strftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = '\0';
++ }
++
++ template<>
++ void
++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = "%m/%d/%y";
++ _M_data->_M_date_era_format = "%m/%d/%y";
++ _M_data->_M_time_format = "%H:%M:%S";
++ _M_data->_M_time_era_format = "%H:%M:%S";
++ _M_data->_M_date_time_format = "";
++ _M_data->_M_date_time_era_format = "";
++ _M_data->_M_am = "AM";
++ _M_data->_M_pm = "PM";
++ _M_data->_M_am_pm_format = "";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = "Sunday";
++ _M_data->_M_day2 = "Monday";
++ _M_data->_M_day3 = "Tuesday";
++ _M_data->_M_day4 = "Wednesday";
++ _M_data->_M_day5 = "Thursday";
++ _M_data->_M_day6 = "Friday";
++ _M_data->_M_day7 = "Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = "Sun";
++ _M_data->_M_aday2 = "Mon";
++ _M_data->_M_aday3 = "Tue";
++ _M_data->_M_aday4 = "Wed";
++ _M_data->_M_aday5 = "Thu";
++ _M_data->_M_aday6 = "Fri";
++ _M_data->_M_aday7 = "Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = "January";
++ _M_data->_M_month02 = "February";
++ _M_data->_M_month03 = "March";
++ _M_data->_M_month04 = "April";
++ _M_data->_M_month05 = "May";
++ _M_data->_M_month06 = "June";
++ _M_data->_M_month07 = "July";
++ _M_data->_M_month08 = "August";
++ _M_data->_M_month09 = "September";
++ _M_data->_M_month10 = "October";
++ _M_data->_M_month11 = "November";
++ _M_data->_M_month12 = "December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = "Jan";
++ _M_data->_M_amonth02 = "Feb";
++ _M_data->_M_amonth03 = "Mar";
++ _M_data->_M_amonth04 = "Apr";
++ _M_data->_M_amonth05 = "May";
++ _M_data->_M_amonth06 = "Jun";
++ _M_data->_M_amonth07 = "Jul";
++ _M_data->_M_amonth08 = "Aug";
++ _M_data->_M_amonth09 = "Sep";
++ _M_data->_M_amonth10 = "Oct";
++ _M_data->_M_amonth11 = "Nov";
++ _M_data->_M_amonth12 = "Dec";
++ }
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ __timepunct<wchar_t>::
++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = L'\0';
++ }
++
++ template<>
++ void
++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++// if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = L"%m/%d/%y";
++ _M_data->_M_date_era_format = L"%m/%d/%y";
++ _M_data->_M_time_format = L"%H:%M:%S";
++ _M_data->_M_time_era_format = L"%H:%M:%S";
++ _M_data->_M_date_time_format = L"";
++ _M_data->_M_date_time_era_format = L"";
++ _M_data->_M_am = L"AM";
++ _M_data->_M_pm = L"PM";
++ _M_data->_M_am_pm_format = L"";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = L"Sunday";
++ _M_data->_M_day2 = L"Monday";
++ _M_data->_M_day3 = L"Tuesday";
++ _M_data->_M_day4 = L"Wednesday";
++ _M_data->_M_day5 = L"Thursday";
++ _M_data->_M_day6 = L"Friday";
++ _M_data->_M_day7 = L"Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = L"Sun";
++ _M_data->_M_aday2 = L"Mon";
++ _M_data->_M_aday3 = L"Tue";
++ _M_data->_M_aday4 = L"Wed";
++ _M_data->_M_aday5 = L"Thu";
++ _M_data->_M_aday6 = L"Fri";
++ _M_data->_M_aday7 = L"Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = L"January";
++ _M_data->_M_month02 = L"February";
++ _M_data->_M_month03 = L"March";
++ _M_data->_M_month04 = L"April";
++ _M_data->_M_month05 = L"May";
++ _M_data->_M_month06 = L"June";
++ _M_data->_M_month07 = L"July";
++ _M_data->_M_month08 = L"August";
++ _M_data->_M_month09 = L"September";
++ _M_data->_M_month10 = L"October";
++ _M_data->_M_month11 = L"November";
++ _M_data->_M_month12 = L"December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = L"Jan";
++ _M_data->_M_amonth02 = L"Feb";
++ _M_data->_M_amonth03 = L"Mar";
++ _M_data->_M_amonth04 = L"Apr";
++ _M_data->_M_amonth05 = L"May";
++ _M_data->_M_amonth06 = L"Jun";
++ _M_data->_M_amonth07 = L"Jul";
++ _M_data->_M_amonth08 = L"Aug";
++ _M_data->_M_amonth09 = L"Sep";
++ _M_data->_M_amonth10 = L"Oct";
++ _M_data->_M_amonth11 = L"Nov";
++ _M_data->_M_amonth12 = L"Dec";
++ }
++#if 0
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
++
++ // Day names, starting with "C"'s Sunday.
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
++
++ // Month names, starting with "C"'s January.
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
++ }
++#endif // 0
++ }
++#endif
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:42:34.913881064 -0700
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_timepunct = __tmp;
++ _M_initialize_timepunct(__cloc);
++ }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::~__timepunct()
++ {
++ if (_M_name_timepunct != _S_get_c_name())
++ delete [] _M_name_timepunct;
++ delete _M_data;
++ _S_destroy_c_locale(_M_c_locale_timepunct);
++ }
+Index: gcc-4.5.0/libstdc++-v3/configure
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/configure 2010-04-05 18:27:44.000000000 -0700
++++ gcc-4.5.0/libstdc++-v3/configure 2010-06-25 10:48:10.124633072 -0700
+@@ -15577,7 +15577,7 @@
+ if test "${enable_clocale+set}" = set; then :
+ enableval=$enable_clocale;
+ case "$enableval" in
+- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
+ *) as_fn_error "Unknown argument to enable/disable clocale" "$LINENO" 5 ;;
+ esac
+
+@@ -15609,6 +15609,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -15885,6 +15888,76 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ echo "$as_me:$LINENO: result: uclibc" >&5
++echo "${ECHO_T}uclibc" >&6
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$check_msgfmt"; then
++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_check_msgfmt="yes"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
++echo "${ECHO_T}$check_msgfmt" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++
++
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+@@ -16940,6 +17013,7 @@
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++#line 17016 "configure"
+ #include <wctype.h>
+ int
+ main ()
+@@ -58165,7 +58239,6 @@
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-
+ int
+ main ()
+ {
+Index: gcc-4.5.0/libstdc++-v3/include/c_compatibility/wchar.h
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/include/c_compatibility/wchar.h 2009-04-09 08:00:19.000000000 -0700
++++ gcc-4.5.0/libstdc++-v3/include/c_compatibility/wchar.h 2010-06-25 10:42:34.949880937 -0700
+@@ -101,7 +101,9 @@
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+Index: gcc-4.5.0/libstdc++-v3/include/c_std/cwchar
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/include/c_std/cwchar 2010-02-04 10:20:34.000000000 -0800
++++ gcc-4.5.0/libstdc++-v3/include/c_std/cwchar 2010-06-25 10:42:34.949880937 -0700
+@@ -177,7 +177,9 @@
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using ::wcsftime;
++#endif
+ using ::wcslen;
+ using ::wcsncat;
+ 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 0000000..f39e652
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/203-uclibc-locale-no__x.patch
@@ -0,0 +1,233 @@
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700
+@@ -60,4 +60,49 @@
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l iswctype_l
++# define __towlower_l towlower_l
++# define __towupper_l towupper_l
++# define __wcscoll_l wcscoll_l
++# define __wcsftime_l wcsftime_l
++# define __wcsxfrm_l wcsxfrm_l
++# define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L) nl_langinfo((N))
++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++# define __strtod_l(S, E, L) strtod((S), (E))
++# define __strtof_l(S, E, L) strtof((S), (E))
++# define __strtold_l(S, E, L) strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c) NULL
++# define __freelocale(a) ((void)0)
++# define __duplocale(a) __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l(C, M, L) iswctype((C), (M))
++# define __towlower_l(C, L) towlower((C))
++# define __towupper_l(C, L) towupper((C))
++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++# define __wctype_l(S, L) wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L) strtof((S), (E))
+-#define __strtod_l(S, E, L) strtod((S), (E))
+-#define __strtold_l(S, E, L) strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c) NULL
+-#define __freelocale(a) ((void)0)
+-#define __duplocale(a) __c_locale()
+-#endif
+-
+ namespace std
+ {
+ template<>
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+ // These are basically extensions to char_traits, and perhaps should
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+ // Construct and return valid pattern consisting of some combination of:
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L) wctype((S))
+-#define __towupper_l(C, L) towupper((C))
+-#define __towlower_l(C, L) towlower((C))
+-#define __iswctype_l(C, M, L) iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+- const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+- const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D) ((void)0)
+-#define __bindtextdomain(D,P) ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D) ((void)0)
++#define bindtextdomain(D,P) ((void)0)
+ #endif
+
+ // Non-virtual member functions.
+@@ -70,7 +66,7 @@
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+- __bindtextdomain(__s.c_str(), __dir);
++ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+
+@@ -90,7 +86,7 @@
+ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+- __textdomain(__s.c_str());
++ textdomain(__s.c_str());
+ return 0;
+ }
+
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700
+@@ -68,6 +68,7 @@
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ 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 0000000..160ab35
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
+@@ -401,7 +401,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
+@@ -127,12 +127,25 @@
+ {
+ // Named locale.
+ // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = __u.__w;
++#endif
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _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 0000000..48eaa1d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/205-uclibc-locale-update.patch
@@ -0,0 +1,519 @@
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -39,23 +39,20 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ template<>
+ void
+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- float __f = __strtof_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __f;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -63,16 +60,13 @@
+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- double __d = __strtod_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __d;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -80,16 +74,13 @@
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- long double __ld = __strtold_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __ld;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ void
+@@ -110,17 +101,18 @@
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+- if (_S_get_c_locale() != __cloc)
++ if (__cloc && _S_get_c_locale() != __cloc)
+ __freelocale(__cloc);
+ }
+
+ __c_locale
+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
+ { return __duplocale(__cloc); }
+-} // namespace std
+
+-namespace __gnu_cxx
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
++
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
+ {
+ "LC_CTYPE",
+@@ -138,9 +130,11 @@
+ "LC_IDENTIFICATION"
+ #endif
+ };
+-}
+
+-namespace std
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+-} // namespace std
++
++_GLIBCXX_END_NAMESPACE
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
+@@ -33,16 +33,20 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+ // various /config/os/* files.
+- template<>
+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
+ : ctype<char>(0, false, __refs)
+ {
+@@ -57,6 +61,8 @@
+ #endif
+ }
+ }
++ ctype_byname<char>::~ctype_byname()
++ { }
+
+ #ifdef _GLIBCXX_USE_WCHAR_T
+ ctype<wchar_t>::__wmask_type
+@@ -138,17 +144,33 @@
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+- // Highest bitmask in ctype_base == 10, but extra in "C"
+- // library for blank.
++ // The case of __m == ctype_base::space is particularly important,
++ // due to its use in many istream functions. Therefore we deal with
++ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++ // is the mask corresponding to ctype_base::space. NB: an encoding
++ // change would not affect correctness!
++
+ bool __ret = false;
+- const size_t __bitmasksize = 11;
+- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+- if (__m & _M_bit[__bitcur]
+- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+- {
+- __ret = true;
+- break;
+- }
++ if (__m == _M_bit[5])
++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++ else
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur])
++ {
++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ else if (__m == _M_bit[__bitcur])
++ break;
++ }
++ }
++
+ return __ret;
+ }
+
+@@ -290,4 +312,5 @@
+ #endif
+ }
+ #endif // _GLIBCXX_USE_WCHAR_T
+-}
++
++_GLIBCXX_END_NAMESPACE
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
+@@ -53,12 +53,16 @@
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+- _M_name_messages(__s)
++ : facet(__refs), _M_c_locale_messages(NULL),
++ _M_name_messages(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
++
++ // Last to avoid leaking memory if new throws.
++ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+
+ template<typename _CharT>
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@
+ }
+ break;
+ default:
+- ;
++ __ret = pattern();
+ }
+ return __ret;
+ }
+@@ -390,7 +395,9 @@
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
+ setlocale(LC_ALL, __name);
+ #endif
+
+@@ -477,8 +484,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -498,8 +505,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+@@ -545,8 +552,11 @@
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
+- setlocale(LC_ALL, __name);
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
++ setlocale(LC_ALL, __name);
+ #endif
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -633,8 +643,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -653,8 +663,8 @@
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
+@@ -50,12 +50,21 @@
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(__s)
++ _M_name_timepunct(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+- _M_initialize_timepunct(__cloc);
++
++ try
++ { _M_initialize_timepunct(__cloc); }
++ catch(...)
++ {
++ delete [] _M_name_timepunct;
++ __throw_exception_again;
++ }
++
+ }
+
+ template<typename _CharT>
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+
+ #include <cstring> // get std::strlen
+-#include <cstdio> // get std::snprintf or std::sprintf
++#include <cstdio> // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h> // For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h> // For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> // For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h> // For messages
+ #endif
++#include <cstdarg>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+
+@@ -78,23 +80,25 @@
+ #else
+ typedef int* __c_locale;
+ #endif
+-
+- // Convert numeric value of type _Tv to string and return length of
+- // string. If snprintf is available use it, otherwise fall back to
+- // the unsafe sprintf which, in general, can be dangerous and should
++ // Convert numeric value of type double to string and return length of
++ // string. If vsnprintf is available use it, otherwise fall back to
++ // the unsafe vsprintf which, in general, can be dangerous and should
+ // be avoided.
+- template<typename _Tv>
+- int
+- __convert_from_v(char* __out,
+- const int __size __attribute__ ((__unused__)),
+- const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+- _Tv __v, const __c_locale& __cloc, int __prec)
++ inline int
++ __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++ __cloc __attribute__ ((__unused__))
++#endif
++ ,
++ char* __out,
++ const int __size,
++ const char* __fmt, ...)
+ {
++ va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
++
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+- _Tv __v, const __c_locale&, int __prec)
+- {
+ # ifdef __UCLIBC_HAS_LOCALE__
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@
+ # endif
+ #endif
+
+- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++ va_start(__args, __fmt);
++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++ va_end(__args);
+
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
+@@ -53,11 +53,14 @@
+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+@@ -207,11 +210,14 @@
+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
++++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
+@@ -31,6 +31,9 @@
+
+ #include <bits/c++config.h>
+ #include <clocale>
++#include <cstdlib>
++#include <cstring>
++#include <cstddef>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #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 0000000..aaa5cee
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/301-missing-execinfo_h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.5.0/boehm-gc/include/gc.h
+===================================================================
+--- gcc-4.5.0.orig/boehm-gc/include/gc.h 2007-04-23 14:10:09.000000000 -0700
++++ gcc-4.5.0/boehm-gc/include/gc.h 2010-06-25 10:49:12.768883509 -0700
+@@ -503,7 +503,7 @@
+ #if defined(__linux__) || defined(__GLIBC__)
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # 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 0000000..12be2da
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/302-c99-snprintf.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.5.0/libstdc++-v3/include/c_std/cstdio
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/include/c_std/cstdio 2010-02-04 10:20:34.000000000 -0800
++++ gcc-4.5.0/libstdc++-v3/include/c_std/cstdio 2010-06-25 10:51:12.712631679 -0700
+@@ -139,7 +139,7 @@
+
+ _GLIBCXX_END_NAMESPACE
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #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 0000000..56aa78c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,14 @@
+Index: gcc-4.5.0/libstdc++-v3/configure
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/configure 2010-06-25 10:48:37.488384191 -0700
++++ gcc-4.5.0/libstdc++-v3/configure 2010-06-25 10:51:23.804380413 -0700
+@@ -18262,6 +18262,9 @@
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
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 0000000..bbb6563
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/304-index_macro.patch
@@ -0,0 +1,28 @@
+Index: gcc-4.5.0/libstdc++-v3/include/ext/rope
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/include/ext/rope 2009-04-09 08:00:19.000000000 -0700
++++ gcc-4.5.0/libstdc++-v3/include/ext/rope 2010-06-25 10:51:33.613383077 -0700
+@@ -54,6 +54,9 @@
+ #include <bits/gthr.h>
+ #include <tr1/functional>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+Index: gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-09 08:00:19.000000000 -0700
++++ gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h 2010-06-25 10:51:33.621381669 -0700
+@@ -49,6 +49,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ 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 0000000..f890acb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.5.0/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.5.0.orig/libmudflap/mf-hooks2.c 2009-04-09 08:00:19.000000000 -0700
++++ gcc-4.5.0/libmudflap/mf-hooks2.c 2010-06-25 10:52:13.937636901 -0700
+@@ -421,7 +421,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -431,7 +431,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -441,7 +441,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -450,7 +450,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -459,7 +459,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* 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 0000000..75c7401
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/306-libstdc++-namespace.patch
@@ -0,0 +1,38 @@
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:49:07.024632961 -0700
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:52:33.980632645 -0700
+@@ -32,7 +32,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+@@ -116,3 +117,4 @@
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
++}
+Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h
+===================================================================
+--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:49:07.024632961 -0700
++++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:52:33.980632645 -0700
+@@ -33,7 +33,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+@@ -75,3 +76,4 @@
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
++}
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 0000000..774fcfa
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/307-locale_facets.patch
@@ -0,0 +1,19 @@
+This patch fixes a bug into ostream::operator<<(double) due to the wrong size
+passed into the __convert_from_v method. The wrong size is then passed to
+std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
+
+Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
+
+Index: gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/include/bits/locale_facets.tcc 2007-11-26 17:59:41.000000000 -0800
++++ gcc-4.3.1/libstdc++-v3/include/bits/locale_facets.tcc 2008-08-16 02:14:48.000000000 -0700
+@@ -1004,7 +1004,7 @@
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
+ __prec, __v);
+ #endif
+
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 0000000..23fce75
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
+--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
+@@ -21,5 +21,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
+@@ -35,7 +35,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ 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 0000000..067676a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/64bithack.patch
@@ -0,0 +1,33 @@
+By default gcc places 64 bit libs in a lib64 directory. This makes it use
+"lib" instead.
+
+RP 25/7/10
+
+Index: gcc-4.5.0/gcc/config/i386/t-linux64
+===================================================================
+--- gcc-4.5.0.orig/gcc/config/i386/t-linux64 2010-08-10 15:47:42.000000000 +0100
++++ gcc-4.5.0/gcc/config/i386/t-linux64 2010-08-10 15:47:47.000000000 +0100
+@@ -24,8 +24,8 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+
+ MULTILIB_OPTIONS = m64/m32
+-MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_DIRNAMES = . 32
++MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+Index: gcc-4.5.0/gcc/config/i386/linux64.h
+===================================================================
+--- gcc-4.5.0.orig/gcc/config/i386/linux64.h 2010-08-10 15:49:06.000000000 +0100
++++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-08-10 15:49:16.000000000 +0100
+@@ -59,7 +59,7 @@
+ done. */
+
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+
+ #if TARGET_64BIT_DEFAULT
+ #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 0000000..d848892
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/740-sh-pr24836.patch
@@ -0,0 +1,29 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+Index: gcc-4.5.0/gcc/configure.ac
+===================================================================
+--- gcc-4.5.0.orig/gcc/configure.ac 2010-03-25 22:40:32.000000000 -0700
++++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:02:48.489057877 -0700
+@@ -2784,7 +2784,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+Index: gcc-4.5.0/gcc/configure
+===================================================================
+--- gcc-4.5.0.orig/gcc/configure 2010-03-25 22:40:32.000000000 -0700
++++ gcc-4.5.0/gcc/configure 2010-06-25 11:02:48.508381845 -0700
+@@ -22156,7 +22156,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ 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 0000000..77d02c3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/800-arm-bigendian.patch
@@ -0,0 +1,34 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2009-11-05 06:47:45.000000000 -0800
++++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:03:06.997132728 -0700
+@@ -51,7 +51,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+Index: gcc-4.5.0/gcc/config.gcc
+===================================================================
+--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:40:33.321880880 -0700
++++ gcc-4.5.0/gcc/config.gcc 2010-06-25 11:03:07.013133525 -0700
+@@ -734,6 +734,11 @@
+ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
++ case ${target} in
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ 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 0000000..c4641dc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,74 @@
+Hi,
+
+The attached patch makes sure that we create smaller object code for
+simple switch statements. We just make sure to flatten the switch
+statement into an if-else chain, basically.
+
+This fixes a size-regression as compared to gcc-3.4, as can be seen
+below.
+
+2007-04-15 Bernhard Fischer <..>
+
+ * stmt.c (expand_case): Do not create a complex binary tree when
+ optimizing for size but rather use the simple ordered list.
+ (emit_case_nodes): do not emit jumps to the default_label when
+ optimizing for size.
+
+Not regtested so far.
+Comments?
+
+Attached is the test switch.c mentioned below.
+
+$ 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
+gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
+$ 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
+gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
+
+$ size switch-*.o
+ text data bss dec hex filename
+ 169 0 0 169 a9 switch-2.95.o
+ 115 0 0 115 73 switch-3.3.o
+ 103 0 0 103 67 switch-3.4.o
+ 124 0 0 124 7c switch-4.0.o
+ 124 0 0 124 7c switch-4.1.o
+ 124 0 0 124 7c switch-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-4.3-HEAD.o
+ 124 0 0 124 7c switch-4.3.orig-HEAD.o
+ 166 0 0 166 a6 switch-CHAIN-2.95.o
+ 111 0 0 111 6f switch-CHAIN-3.3.o
+ 95 0 0 95 5f switch-CHAIN-3.4.o
+ 95 0 0 95 5f switch-CHAIN-4.0.o
+ 95 0 0 95 5f switch-CHAIN-4.1.o
+ 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
+
+
+Content-Type: text/x-diff; charset=us-ascii
+Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
+
+Index: gcc-4.5.0/gcc/stmt.c
+===================================================================
+--- gcc-4.5.0.orig/gcc/stmt.c 2010-02-19 01:53:51.000000000 -0800
++++ gcc-4.5.0/gcc/stmt.c 2010-06-25 11:05:31.816881094 -0700
+@@ -2440,7 +2440,11 @@
+ default code is emitted. */
+
+ use_cost_table = estimate_case_costs (case_list);
+- balance_case_nodes (&case_list, NULL);
++ /* When optimizing for size, we want a straight list to avoid
++ jumps as much as possible. This basically creates an if-else
++ chain. */
++ if (!optimize_size)
++ balance_case_nodes (&case_list, NULL);
+ emit_case_nodes (index, case_list, default_label, index_type);
+ if (default_label)
+ emit_jump (default_label);
+@@ -3008,6 +3012,7 @@
+ {
+ if (!node_has_low_bound (node, index_type))
+ {
++ if (!optimize_size) /* don't jl to the .default_label. */
+ emit_cmp_and_jump_insns (index,
+ convert_modes
+ (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 0000000..7ac61a6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-bswapsi2.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.5/gcc/config/arm/arm.md
+===================================================================
+--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-06-17 09:13:07.000000000 -0700
++++ gcc-4.5/gcc/config/arm/arm.md 2010-06-22 08:08:45.397212002 -0700
+@@ -11267,7 +11267,7 @@
+ (define_expand "bswapsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
+-"TARGET_EITHER"
++"TARGET_EITHER && (arm_arch6 && !optimize_size)"
+ "
+ if (!arm_arch6)
+ {
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 0000000..99f2b20
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+#
+# Fixes errors like
+# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
+# collect2: ld returned 1 exit status
+# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
+# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
+
+Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2010-06-25 11:04:49.572437901 -0700
++++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:06:12.273162283 -0700
+@@ -60,7 +60,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+
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 0000000..181d4fb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-softfloat.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.5.0/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.5.0.orig/gcc/config/arm/t-linux 2009-04-21 12:03:23.000000000 -0700
++++ gcc-4.5.0/gcc/config/arm/t-linux 2010-06-25 11:11:06.836381365 -0700
+@@ -23,7 +23,10 @@
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
+- _arm_addsubdf3 _arm_addsubsf3
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
++# _arm_addsubdf3 _arm_addsubsf3
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # 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 0000000..7bb8887
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/arm-unbreak-eabi-armv4t.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+
+# DP: Fix armv4t build on ARM
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- src/gcc/config/arm/linux-eabi.h.orig 2007-11-24 12:37:38.000000000 +0000
++++ src/gcc/config/arm/linux-eabi.h 2007-11-24 12:39:41.000000000 +0000
+@@ -44,7 +44,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ 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 0000000..b889f9b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/cache-amnesia.patch
@@ -0,0 +1,31 @@
+---
+ gcc/configure | 2 +-
+ gcc/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: gcc-4.5+svnr155514/gcc/configure
+===================================================================
+--- gcc-4.5+svnr155514.orig/gcc/configure 2009-12-29 22:00:40.000000000 -0800
++++ gcc-4.5+svnr155514/gcc/configure 2009-12-29 23:52:43.381592113 -0800
+@@ -10467,7 +10467,7 @@ else
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
+Index: gcc-4.5+svnr155514/gcc/configure.ac
+===================================================================
+--- gcc-4.5+svnr155514.orig/gcc/configure.ac 2009-12-29 22:00:40.000000000 -0800
++++ gcc-4.5+svnr155514/gcc/configure.ac 2009-12-29 23:51:54.589091778 -0800
+@@ -1458,7 +1458,7 @@ else
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ 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 0000000..a149eae
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-c++-builtin-redecl.patch
@@ -0,0 +1,114 @@
+2007-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ * decl.c (duplicate_decls): When redeclaring a builtin function,
+ keep the merged decl builtin whenever types match, even if new
+ decl defines a function.
+
+ * gcc.dg/builtins-65.c: New test.
+ * g++.dg/ext/builtin10.C: New test.
+
+Index: gcc/cp/decl.c
+===================================================================
+--- gcc/cp/decl.c.orig 2010-04-01 11:48:46.000000000 -0700
++++ gcc/cp/decl.c 2010-06-25 10:10:54.749131719 -0700
+@@ -2021,23 +2021,21 @@
+ DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
+ DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
+ }
++ /* If redeclaring a builtin function, it stays built in. */
++ if (types_match && DECL_BUILT_IN (olddecl))
++ {
++ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
++ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
++ /* If we're keeping the built-in definition, keep the rtl,
++ regardless of declaration matches. */
++ COPY_DECL_RTL (olddecl, newdecl);
++ }
+ if (new_defines_function)
+ /* If defining a function declared with other language
+ linkage, use the previously declared language linkage. */
+ SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
+ else if (types_match)
+ {
+- /* If redeclaring a builtin function, and not a definition,
+- it stays built in. */
+- if (DECL_BUILT_IN (olddecl))
+- {
+- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+- /* If we're keeping the built-in definition, keep the rtl,
+- regardless of declaration matches. */
+- COPY_DECL_RTL (olddecl, newdecl);
+- }
+-
+ DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
+ /* Don't clear out the arguments if we're just redeclaring a
+ function. */
+Index: gcc/testsuite/gcc.dg/builtins-65.c
+===================================================================
+--- gcc/testsuite/gcc.dg/builtins-65.c.orig 2009-06-26 02:02:04.000000000 -0700
++++ gcc/testsuite/gcc.dg/builtins-65.c 2010-06-25 10:10:54.784464429 -0700
+@@ -1,3 +1,28 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef __SIZE_TYPE__ size_t;
++extern void __chk_fail (void);
++extern int snprintf (char *, size_t, const char *, ...);
++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
++{
++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
++ __chk_fail ();
++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
++}
++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
++
++char buf[10];
++
++int
++main (void)
++{
++ snprintf (buf, 10, "%d%d\n", 10, 10);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "mysnprintf" } } */
++/* { dg-final { scan-assembler-not "__chk_fail" } } */
+ /* { dg-do link } */
+ /* { dg-options "-O2 -ffast-math" } */
+ /* { dg-require-effective-target c99_runtime } */
+Index: gcc/testsuite/g++.dg/ext/builtin10.C
+===================================================================
+--- gcc/testsuite/g++.dg/ext/builtin10.C.orig 2009-02-02 03:27:50.000000000 -0800
++++ gcc/testsuite/g++.dg/ext/builtin10.C 2010-06-25 10:10:54.816467202 -0700
+@@ -1,3 +1,30 @@
++// { dg-do compile }
++// { dg-options "-O2" }
++
++typedef __SIZE_TYPE__ size_t;
++extern "C" {
++extern void __chk_fail (void);
++extern int snprintf (char *, size_t, const char *, ...);
++extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
++{
++ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
++ __chk_fail ();
++ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
++}
++extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
++}
++
++char buf[10];
++
++int
++main (void)
++{
++ snprintf (buf, 10, "%d%d\n", 10, 10);
++ return 0;
++}
++
++// { dg-final { scan-assembler "mysnprintf" } }
++// { dg-final { scan-assembler-not "__chk_fail" } }
+ // { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
+ // { dg-options "-O2 -fdump-tree-optimized" }
+
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 0000000..00d37bd
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-cpp-pragma.patch
@@ -0,0 +1,284 @@
+2008-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ * c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
+ and CPP_PRAGMA_EOL.
+ * c-pragma.c (pragma_ns_name): New typedef.
+ (registered_pp_pragmas): New variable.
+ (c_pp_lookup_pragma): New function.
+ (c_register_pragma_1): If flag_preprocess_only, do nothing
+ for non-expanded pragmas, for expanded ones push pragma's
+ namespace and name into registered_pp_pragmas vector.
+ (c_invoke_pragma_handler): Register OpenMP pragmas even when
+ flag_preprocess_only, don't register GCC pch_preprocess
+ pragma if flag_preprocess_only.
+ * c-opts.c (c_common_init): Call init_pragma even if
+ flag_preprocess_only.
+ * c-pragma.c (c_pp_lookup_pragma): New prototype.
+ * config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
+ cpp_register_pragma if flag_preprocess_only.
+
+ * gcc.dg/gomp/preprocess-1.c: New test.
+
+--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
++++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Preprocess only, using cpplib.
+- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
+- Free Software Foundation, Inc.
++ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
++ 2008 Free Software Foundation, Inc.
+ Written by Per Bothner, 1994-95.
+
+ This program is free software; you can redistribute it and/or modify it
+@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
+ avoid_paste = false;
+ print.source = NULL;
+ print.prev = token;
+- cpp_output_token (token, print.outf);
++ if (token->type == CPP_PRAGMA)
++ {
++ const char *space;
++ const char *name;
++
++ maybe_print_line (token->src_loc);
++ fputs ("#pragma ", print.outf);
++ c_pp_lookup_pragma (token->val.pragma, &space, &name);
++ if (space)
++ fprintf (print.outf, "%s %s", space, name);
++ else
++ fprintf (print.outf, "%s", name);
++ print.printed = 1;
++ }
++ else if (token->type == CPP_PRAGMA_EOL)
++ maybe_print_line (token->src_loc);
++ else
++ cpp_output_token (token, print.outf);
+
+ if (token->type == CPP_COMMENT)
+ account_for_newlines (token->val.str.text, token->val.str.len);
+--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
++++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
+ Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+- 2006, 2007 Free Software Foundation, Inc.
++ 2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
+
+ static VEC(pragma_handler, heap) *registered_pragmas;
+
++typedef struct
++{
++ const char *space;
++ const char *name;
++} pragma_ns_name;
++
++DEF_VEC_O (pragma_ns_name);
++DEF_VEC_ALLOC_O (pragma_ns_name, heap);
++
++static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
++
++struct omp_pragma_def { const char *name; unsigned int id; };
++static const struct omp_pragma_def omp_pragmas[] = {
++ { "atomic", PRAGMA_OMP_ATOMIC },
++ { "barrier", PRAGMA_OMP_BARRIER },
++ { "critical", PRAGMA_OMP_CRITICAL },
++ { "flush", PRAGMA_OMP_FLUSH },
++ { "for", PRAGMA_OMP_FOR },
++ { "master", PRAGMA_OMP_MASTER },
++ { "ordered", PRAGMA_OMP_ORDERED },
++ { "parallel", PRAGMA_OMP_PARALLEL },
++ { "section", PRAGMA_OMP_SECTION },
++ { "sections", PRAGMA_OMP_SECTIONS },
++ { "single", PRAGMA_OMP_SINGLE },
++ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
++};
++
++void
++c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
++{
++ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
++ int i;
++
++ for (i = 0; i < n_omp_pragmas; ++i)
++ if (omp_pragmas[i].id == id)
++ {
++ *space = "omp";
++ *name = omp_pragmas[i].name;
++ return;
++ }
++
++ if (id >= PRAGMA_FIRST_EXTERNAL
++ && (id < PRAGMA_FIRST_EXTERNAL
++ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
++ {
++ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
++ id - PRAGMA_FIRST_EXTERNAL)->space;
++ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
++ id - PRAGMA_FIRST_EXTERNAL)->name;
++ return;
++ }
++
++ gcc_unreachable ();
++}
++
+ /* Front-end wrappers for pragma registration to avoid dragging
+ cpplib.h in almost everywhere. */
+
+@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
+ {
+ unsigned id;
+
+- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
+- id = VEC_length (pragma_handler, registered_pragmas);
+- id += PRAGMA_FIRST_EXTERNAL - 1;
+-
+- /* The C++ front end allocates 6 bits in cp_token; the C front end
+- allocates 7 bits in c_token. At present this is sufficient. */
+- gcc_assert (id < 64);
++ if (flag_preprocess_only)
++ {
++ pragma_ns_name ns_name;
++
++ if (!allow_expansion)
++ return;
++
++ ns_name.space = space;
++ ns_name.name = name;
++ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
++ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
++ id += PRAGMA_FIRST_EXTERNAL - 1;
++ }
++ else
++ {
++ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
++ id = VEC_length (pragma_handler, registered_pragmas);
++ id += PRAGMA_FIRST_EXTERNAL - 1;
++
++ /* The C++ front end allocates 6 bits in cp_token; the C front end
++ allocates 7 bits in c_token. At present this is sufficient. */
++ gcc_assert (id < 64);
++ }
+
+ cpp_register_deferred_pragma (parse_in, space, name, id,
+ allow_expansion, false);
+@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
+ void
+ init_pragma (void)
+ {
+- if (flag_openmp && !flag_preprocess_only)
++ if (flag_openmp)
+ {
+- struct omp_pragma_def { const char *name; unsigned int id; };
+- static const struct omp_pragma_def omp_pragmas[] = {
+- { "atomic", PRAGMA_OMP_ATOMIC },
+- { "barrier", PRAGMA_OMP_BARRIER },
+- { "critical", PRAGMA_OMP_CRITICAL },
+- { "flush", PRAGMA_OMP_FLUSH },
+- { "for", PRAGMA_OMP_FOR },
+- { "master", PRAGMA_OMP_MASTER },
+- { "ordered", PRAGMA_OMP_ORDERED },
+- { "parallel", PRAGMA_OMP_PARALLEL },
+- { "section", PRAGMA_OMP_SECTION },
+- { "sections", PRAGMA_OMP_SECTIONS },
+- { "single", PRAGMA_OMP_SINGLE },
+- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
+- };
+-
+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
+ int i;
+
+@@ -947,8 +1002,9 @@ init_pragma (void)
+ omp_pragmas[i].id, true, true);
+ }
+
+- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
+- PRAGMA_GCC_PCH_PREPROCESS, false, false);
++ if (!flag_preprocess_only)
++ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
++ PRAGMA_GCC_PCH_PREPROCESS, false, false);
+
+ #ifdef HANDLE_PRAGMA_PACK
+ #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
+--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
++++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
+@@ -1,5 +1,5 @@
+ /* C/ObjC/C++ command line option handling.
+- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
++ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
+ Contributed by Neil Booth.
+
+@@ -1239,6 +1239,9 @@ c_common_init (void)
+ if (version_flag)
+ c_common_print_pch_checksum (stderr);
+
++ /* Has to wait until now so that cpplib has its hash table. */
++ init_pragma ();
++
+ if (flag_preprocess_only)
+ {
+ finish_options ();
+@@ -1246,9 +1249,6 @@ c_common_init (void)
+ return false;
+ }
+
+- /* Has to wait until now so that cpplib has its hash table. */
+- init_pragma ();
+-
+ return true;
+ }
+
+--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
++++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Pragma related interfaces.
+ Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+- 2007 Free Software Foundation, Inc.
++ 2007, 2008 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
+ extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
+ int);
+
++extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
++
+ #endif /* GCC_C_PRAGMA_H */
+--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
++++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
+@@ -892,8 +892,9 @@ enum machopic_addr_class {
+
+ #define DARWIN_REGISTER_TARGET_PRAGMAS() \
+ do { \
+- cpp_register_pragma (parse_in, NULL, "mark", \
+- darwin_pragma_ignore, false); \
++ if (!flag_preprocess_only) \
++ cpp_register_pragma (parse_in, NULL, "mark", \
++ darwin_pragma_ignore, false); \
+ c_register_pragma (0, "options", darwin_pragma_options); \
+ c_register_pragma (0, "segment", darwin_pragma_ignore); \
+ c_register_pragma (0, "unused", darwin_pragma_unused); \
+--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
++++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
+@@ -0,0 +1,16 @@
++/* { dg-do preprocess } */
++
++void foo (void)
++{
++ int i1, j1, k1;
++#define p parallel
++#define P(x) private (x##1)
++#define S(x) shared (x##1)
++#define F(x) firstprivate (x##1)
++#pragma omp p P(i) \
++ S(j) \
++ F(k)
++ ;
++}
++
++/* { 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 0000000..a588db2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-i386-libgomp.patch
@@ -0,0 +1,65 @@
+Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
+hardware isn't supported because NPTL doesn't support it anyway.
+
+Index: libgomp/configure.tgt
+===================================================================
+--- libgomp/configure.tgt.orig 2010-01-28 13:47:59.000000000 -0800
++++ libgomp/configure.tgt 2010-06-25 10:32:26.706135558 -0700
+@@ -48,14 +48,14 @@
+ ;;
+
+ # Note that bare i386 is not included here. We need cmpxchg.
+- i[456]86-*-linux*)
++ i[3456]86-*-linux*)
+ config_path="linux/x86 linux posix"
+ case " ${CC} ${CFLAGS} " in
+ *" -m64 "*)
+ ;;
+ *)
+ if test -z "$with_arch"; then
+- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+ fi
+ esac
+ ;;
+@@ -67,7 +67,7 @@
+ config_path="linux/x86 linux posix"
+ case " ${CC} ${CFLAGS} " in
+ *" -m32 "*)
+- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
++ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
+ ;;
+ esac
+ ;;
+Index: libstdc++-v3/libsupc++/guard.cc
+===================================================================
+--- libstdc++-v3/libsupc++/guard.cc.orig 2009-11-09 14:09:30.000000000 -0800
++++ libstdc++-v3/libsupc++/guard.cc 2010-06-25 10:32:26.710135964 -0700
+@@ -30,6 +30,27 @@
+ #include <new>
+ #include <ext/atomicity.h>
+ #include <ext/concurrence.h>
++#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
++# define _GLIBCXX_ATOMIC_BUILTINS 1
++# define __sync_val_compare_and_swap(a, b, c) \
++ ({ \
++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
++ int sltas; \
++ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
++ : "=a" (sltas) \
++ : "r" (a), "0" (b), "r" (c) : "memory"); \
++ sltas; \
++ })
++# define __sync_lock_test_and_set(a, b) \
++ ({ \
++ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
++ int sltas; \
++ __asm __volatile ("xchgl (%1), %0" \
++ : "=r" (sltas) \
++ : "r" (a), "0" (b) : "memory"); \
++ sltas; \
++ })
++#endif
+ #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
+ && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
+ # 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 0000000..cad13d1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ia64-libunwind.patch
@@ -0,0 +1,550 @@
+2004-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ * config.gcc (ia64*-*-linux*): If native and libelf is installed,
+ use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
+ fragments.
+ * config/ia64/t-glibc-no-libunwind: New file.
+ * config/ia64/change-symver.c: New file.
+ * config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
+ define _Unwind_* to __symverglobal_Unwind_*.
+ (alias): Undefine.
+ (symverglobal): Define. Use it on _Unwind_*.
+ * config/ia64/mkmap-symver-multi.awk: New file.
+ * config/ia64/libgcc-ia64-no-libunwind.ver: New file.
+
+Index: gcc/config.gcc
+===================================================================
+--- gcc/config.gcc.orig 2010-04-07 03:34:00.000000000 -0700
++++ gcc/config.gcc 2010-06-25 10:15:25.133131055 -0700
+@@ -1457,9 +1457,16 @@
+ ;;
+ ia64*-*-linux*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
+- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
+- if test x$with_system_libunwind != xyes ; then
+- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
++ tmake_file="${tmake_file} ia64/t-ia64"
++ if test x${target} = x${host} && test x${target} = x${build} \
++ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
++ && test -f /usr/lib/libelf.so; then
++ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
++ else
++ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
++ if test x$with_system_libunwind != xyes ; then
++ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
++ fi
+ fi
+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
+Index: gcc/config/ia64/t-glibc-no-libunwind
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/config/ia64/t-glibc-no-libunwind 2010-06-25 10:14:32.521880765 -0700
+@@ -0,0 +1,30 @@
++# Don't use system libunwind library on IA-64 GLIBC based system,
++# but make _Unwind_* symbols unversioned, so that created programs
++# are usable even when libgcc_s uses libunwind.
++LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
++SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
++SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
++
++SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
++ -Wl,--soname=$(SHLIB_SONAME) \
++ -Wl,--version-script=$(SHLIB_MAP) \
++ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
++ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
++ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
++ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
++ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
++ else true; fi && \
++ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
++ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
++ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
++ GCC_3.4.2 _GLOBAL_ \
++ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
++ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
++ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
++ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
++ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
++ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
++ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
++ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
++
++TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
+Index: gcc/config/ia64/change-symver.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/config/ia64/change-symver.c 2010-06-25 10:14:32.521880765 -0700
+@@ -0,0 +1,211 @@
++#define _GNU_SOURCE 1
++#define _FILE_OFFSET_BITS 64
++#include <endian.h>
++#include <errno.h>
++#include <error.h>
++#include <fcntl.h>
++#include <fnmatch.h>
++#include <gelf.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
++int
++compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
++{
++ if (strcmp (name, "_GLOBAL_") == 0)
++ return 1;
++
++ int cnt;
++ size_t offset = 0;
++ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
++ {
++ GElf_Verdef defmem;
++ GElf_Verdef *def;
++ GElf_Verdaux auxmem;
++ GElf_Verdaux *aux;
++ unsigned int auxoffset;
++
++ /* Get the data at the next offset. */
++ def = gelf_getverdef (verd, offset, &defmem);
++ if (def == NULL)
++ break;
++
++ auxoffset = offset + def->vd_aux;
++ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
++ if (aux == NULL)
++ break;
++
++ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
++ aux->vda_name)) == 0)
++ return def->vd_ndx;
++
++ /* Find the next offset. */
++ offset += def->vd_next;
++ }
++
++ return -1;
++}
++
++int
++main (int argc, char **argv)
++{
++ if (argc < 4)
++ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
++
++ const char *fname = argv[1];
++
++ /* Open the file. */
++ int fd;
++ fd = open (fname, O_RDWR);
++ if (fd == -1)
++ error (1, errno, fname);
++
++ elf_version (EV_CURRENT);
++
++ /* Now get the ELF descriptor. */
++ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
++ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
++ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
++
++ size_t shstrndx;
++ /* Get the section header string table index. */
++ if (elf_getshstrndx (elf, &shstrndx) < 0)
++ error (1, 0, "cannot get shstrndx from %s", fname);
++
++ GElf_Ehdr ehdr_mem;
++ GElf_Ehdr *ehdr;
++
++ /* We need the ELF header in a few places. */
++ ehdr = gelf_getehdr (elf, &ehdr_mem);
++ if (ehdr == NULL)
++ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
++
++ Elf_Scn *scn = NULL;
++ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
++ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
++
++ while ((scn = elf_nextscn (elf, scn)) != NULL)
++ {
++ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
++
++ if (shdr == NULL)
++ error (1, 0, "couldn't get shdr from %s", fname);
++
++ if ((shdr->sh_flags & SHF_ALLOC) != 0)
++ {
++ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
++ Elf_Data **p;
++
++ if (strcmp (name, ".gnu.version") == 0)
++ {
++ p = &ver;
++ ver_shdr = *shdr;
++ }
++ else if (strcmp (name, ".gnu.version_d") == 0)
++ {
++ p = &verd;
++ verd_shdr = *shdr;
++ }
++ else if (strcmp (name, ".dynsym") == 0)
++ {
++ p = &dynsym;
++ dynsym_shdr = *shdr;
++ }
++ else
++ continue;
++
++ if (*p != NULL)
++ error (1, 0, "Two %s sections in %s", name, fname);
++ *p = elf_getdata (scn, NULL);
++ if (*p == NULL || elf_getdata (scn, *p) != NULL)
++ error (1, 0, "No data or non-contiguous data in %s section in %s",
++ name, fname);
++ }
++ }
++
++ if (ver == NULL || verd == NULL || dynsym == NULL)
++ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
++
++ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
++ if (from_idx == -1)
++ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
++
++ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
++ if (to_idx == -1)
++ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
++
++ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
++ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
++ || ver_shdr.sh_entsize != 2
++ || (ver_shdr.sh_size & 1)
++ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
++ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
++
++ size_t nentries = ver_shdr.sh_size / 2;
++ size_t cnt;
++ GElf_Versym array[nentries];
++ for (cnt = 0; cnt < nentries; ++cnt)
++ {
++ GElf_Versym vsymmem;
++ GElf_Versym *vsym;
++
++ vsym = gelf_getversym (ver, cnt, &vsymmem);
++ if (vsym == NULL)
++ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
++
++ array[cnt] = *vsym;
++ if (*vsym != from_idx)
++ continue;
++
++ GElf_Sym sym_mem;
++ GElf_Sym *sym;
++ sym = gelf_getsym (dynsym, cnt, &sym_mem);
++ if (sym == NULL)
++ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
++
++ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
++
++ int argn;
++ for (argn = 4; argn < argc; ++argn)
++ if (fnmatch (argv[argn], name, 0) == 0)
++ {
++ array[cnt] = to_idx;
++ break;
++ }
++ }
++
++ if (sizeof (array[0]) != 2)
++ abort ();
++
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
++ ;
++ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
++#elif __BYTE_ORDER == __BIG_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
++ ;
++ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
++#else
++# error Unsupported endianity
++#endif
++ {
++ for (cnt = 0; cnt < nentries; ++cnt)
++ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
++ }
++ else
++ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
++
++ if (elf_end (elf) != 0)
++ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
++
++ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
++ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
++ fname);
++
++ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
++ error (1, 0, "failed to write .gnu.version section into %s", fname);
++
++ close (fd);
++ return 0;
++}
+Index: gcc/config/ia64/unwind-ia64.c
+===================================================================
+--- gcc/config/ia64/unwind-ia64.c.orig 2009-09-07 08:41:52.000000000 -0700
++++ gcc/config/ia64/unwind-ia64.c 2010-06-25 10:14:32.521880765 -0700
+@@ -48,6 +48,51 @@
+ #define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) 1
+ #endif
+
++#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
++extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
++ (_Unwind_Trace_Fn, void *);
++extern void __symverglobal_Unwind_DeleteException
++ (struct _Unwind_Exception *);
++extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
++ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
++extern _Unwind_Word __symverglobal_Unwind_GetCFA
++ (struct _Unwind_Context *);
++extern _Unwind_Word __symverglobal_Unwind_GetBSP
++ (struct _Unwind_Context *);
++extern _Unwind_Word __symverglobal_Unwind_GetGR
++ (struct _Unwind_Context *, int );
++extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
++extern void *__symverglobal_Unwind_GetLanguageSpecificData
++ (struct _Unwind_Context *);
++extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
++ (struct _Unwind_Context *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
++ (struct _Unwind_Exception *);
++extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
++extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
++ (struct _Unwind_Exception *);
++extern void __symverglobal_Unwind_SetGR
++ (struct _Unwind_Context *, int, _Unwind_Word);
++extern void __symverglobal_Unwind_SetIP
++ (struct _Unwind_Context *, _Unwind_Ptr);
++#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
++#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
++#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
++#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
++#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
++#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
++#define _Unwind_GetGR __symverglobal_Unwind_GetGR
++#define _Unwind_GetIP __symverglobal_Unwind_GetIP
++#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
++#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
++#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
++#define _Unwind_Resume __symverglobal_Unwind_Resume
++#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
++#define _Unwind_SetGR __symverglobal_Unwind_SetGR
++#define _Unwind_SetIP __symverglobal_Unwind_SetIP
++#endif
++
+ enum unw_application_register
+ {
+ UNW_AR_BSP,
+@@ -2457,4 +2502,44 @@
+ alias (_Unwind_SetIP);
+ #endif
+
++#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
++#undef alias
++#define symverglobal(name, version) \
++__typeof (__symverglobal##name) __symverlocal##name \
++ __attribute__ ((alias ("__symverglobal" #name))); \
++__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
++__asm__ (".symver __symverlocal" #name"," #name "@" #version)
++
++#undef _Unwind_Backtrace
++#undef _Unwind_DeleteException
++#undef _Unwind_FindEnclosingFunction
++#undef _Unwind_ForcedUnwind
++#undef _Unwind_GetBSP
++#undef _Unwind_GetCFA
++#undef _Unwind_GetGR
++#undef _Unwind_GetIP
++#undef _Unwind_GetLanguageSpecificData
++#undef _Unwind_GetRegionStart
++#undef _Unwind_RaiseException
++#undef _Unwind_Resume
++#undef _Unwind_Resume_or_Rethrow
++#undef _Unwind_SetGR
++#undef _Unwind_SetIP
++symverglobal (_Unwind_Backtrace, GCC_3.3);
++symverglobal (_Unwind_DeleteException, GCC_3.0);
++symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
++symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
++symverglobal (_Unwind_GetBSP, GCC_3.3.2);
++symverglobal (_Unwind_GetCFA, GCC_3.3);
++symverglobal (_Unwind_GetGR, GCC_3.0);
++symverglobal (_Unwind_GetIP, GCC_3.0);
++symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
++symverglobal (_Unwind_GetRegionStart, GCC_3.0);
++symverglobal (_Unwind_RaiseException, GCC_3.0);
++symverglobal (_Unwind_Resume, GCC_3.0);
++symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
++symverglobal (_Unwind_SetGR, GCC_3.0);
++symverglobal (_Unwind_SetIP, GCC_3.0);
++#endif
++
+ #endif
+Index: gcc/config/ia64/mkmap-symver-multi.awk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/config/ia64/mkmap-symver-multi.awk 2010-06-25 10:14:32.521880765 -0700
+@@ -0,0 +1,133 @@
++# Generate an ELF symbol version map a-la Solaris and GNU ld.
++# Contributed by Richard Henderson <rth@cygnus.com>
++#
++# This file is part of GCC.
++#
++# GCC is free software; you can redistribute it and/or modify it under
++# the terms of the GNU General Public License as published by the Free
++# Software Foundation; either version 2, or (at your option) any later
++# version.
++#
++# GCC is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
++# License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GCC; see the file COPYING. If not, write to the Free
++# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301, USA.
++
++BEGIN {
++ state = "nm";
++ sawsymbol = 0;
++}
++
++# Remove comment and blank lines.
++/^ *#/ || /^ *$/ {
++ next;
++}
++
++# We begin with nm input. Collect the set of symbols that are present
++# so that we can not emit them into the final version script -- Solaris
++# complains at us if we do.
++
++state == "nm" && /^%%/ {
++ state = "ver";
++ next;
++}
++
++state == "nm" && ($1 == "U" || $2 == "U") {
++ next;
++}
++
++state == "nm" && NF == 3 {
++ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
++ def[$3] = 1
++ tl=$3
++ sub(/^.*@/,"",tl)
++ ver[$3] = tl
++ } else {
++ sub(/@@?GCC_[0-9.]*$/,"",$3)
++ def[$3] = 1;
++ }
++ sawsymbol = 1;
++ next;
++}
++
++state == "nm" {
++ next;
++}
++
++# Now we process a simplified variant of the Solaris symbol version
++# script. We have one symbol per line, no semicolons, simple markers
++# for beginning and ending each section, and %inherit markers for
++# describing version inheritence. A symbol may appear in more than
++# one symbol version, and the last seen takes effect.
++
++NF == 3 && $1 == "%inherit" {
++ inherit[$2] = $3;
++ next;
++}
++
++NF == 2 && $2 == "{" {
++ libs[$1] = 1;
++ thislib = $1;
++ next;
++}
++
++$1 == "}" {
++ thislib = "";
++ next;
++}
++
++{
++ ver[$1] = thislib;
++ next;
++}
++
++END {
++ if (!sawsymbol)
++ {
++ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
++ exit 1;
++ }
++ for (l in libs)
++ output(l);
++}
++
++function output(lib) {
++ if (done[lib])
++ return;
++ done[lib] = 1;
++ if (inherit[lib])
++ output(inherit[lib]);
++
++ empty=1
++ for (sym in ver)
++ if ((ver[sym] == lib) && (sym in def))
++ {
++ if (empty)
++ {
++ printf("%s {\n", lib);
++ printf(" global:\n");
++ empty = 0;
++ }
++ symp = sym;
++ sub(/@GCC_[0-9.]*$/,"",symp);
++ printf("\t%s;\n", symp);
++ if (dotsyms)
++ printf("\t.%s;\n", symp);
++ }
++
++ if (empty)
++ {
++ for (l in libs)
++ if (inherit[l] == lib)
++ inherit[l] = inherit[lib];
++ }
++ else if (inherit[lib])
++ printf("} %s;\n", inherit[lib]);
++ else
++ printf ("\n local:\n\t*;\n};\n");
++}
+Index: gcc/config/ia64/libgcc-ia64-no-libunwind.ver
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2010-06-25 10:14:32.525880902 -0700
+@@ -0,0 +1,17 @@
++GCC_3.4.2 {
++ _Unwind_GetGR
++ _Unwind_RaiseException
++ _Unwind_GetRegionStart
++ _Unwind_SetIP
++ _Unwind_GetIP
++ _Unwind_GetLanguageSpecificData
++ _Unwind_Resume
++ _Unwind_DeleteException
++ _Unwind_SetGR
++ _Unwind_ForcedUnwind
++ _Unwind_Backtrace
++ _Unwind_FindEnclosingFunction
++ _Unwind_GetCFA
++ _Unwind_Resume_or_Rethrow
++ _Unwind_GetBSP
++}
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 0000000..de14a50
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-debug-iface-type.patch
@@ -0,0 +1,19 @@
+2008-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * lang.c (java_classify_record): Revert 2007-12-20 change.
+
+Index: gcc/java/lang.c
+===================================================================
+--- gcc/java/lang.c.orig 2010-01-20 00:17:00.000000000 -0800
++++ gcc/java/lang.c 2010-06-25 10:28:46.569383189 -0700
+@@ -881,9 +881,7 @@
+ if (! CLASS_P (type))
+ return RECORD_IS_STRUCT;
+
+- /* ??? GDB does not support DW_TAG_interface_type as of December,
+- 2007. Re-enable this at a later time. */
+- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
++ if (CLASS_INTERFACE (TYPE_NAME (type)))
+ return RECORD_IS_INTERFACE;
+
+ 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 0000000..3cb10f3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-java-nomulti.patch
@@ -0,0 +1,48 @@
+Index: libjava/configure.ac
+===================================================================
+--- libjava/configure.ac.orig 2010-03-21 12:41:37.000000000 -0700
++++ libjava/configure.ac 2010-06-25 10:17:47.489886278 -0700
+@@ -139,6 +139,13 @@
+ [allow rebuilding of .class and .h files]))
+ AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+
++AC_ARG_ENABLE(libjava-multilib,
++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+ GCC_NO_EXECUTABLES
+
+Index: libjava/configure
+===================================================================
+--- libjava/configure.orig 2010-04-02 11:18:06.000000000 -0700
++++ libjava/configure 2010-06-25 10:17:47.516381209 -0700
+@@ -1609,6 +1609,8 @@
+ default=yes
+ --enable-java-maintainer-mode
+ allow rebuilding of .class and .h files
++ --enable-libjava-multilib
++ build libjava as multilib
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+@@ -3346,6 +3348,16 @@
+ fi
+
+
++# Check whether --enable-libjava-multilib was given.
++if test "${enable_libjava_multilib+set}" = set; then
++ enableval=$enable_libjava_multilib;
++fi
++
++if test "$enable_libjava_multilib" = no; then
++ multilib=no
++ ac_configure_args="$ac_configure_args --disable-multilib"
++fi
++
+ # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+
+
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 0000000..da85e55
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-libgomp-speedup.patch
@@ -0,0 +1,2797 @@
+2008-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ * config/linux/sparc/futex.h (atomic_write_barrier): Fix membar
+ argument.
+
+2008-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_team_state): Remove single_count field
+ ifndef HAVE_SYNC_BUILTINS.
+ (struct gomp_team): Likewise. Add work_share_list_free_lock
+ ifndef HAVE_SYNC_BUILTINS.
+ * team.c (gomp_new_team): If HAVE_SYNC_BUILTINS is not defined,
+ don't initialize single_count, but instead initialize
+ work_share_list_free_lock.
+ (free_team): Destroy work_share_list_free_lock ifndef
+ HAVE_SYNC_BUILTINS.
+ (gomp_team_start): Don't initialize ts.single_count ifndef
+ HAVE_SYNC_BUILTINS.
+ * work.c (alloc_work_share, free_work_share): Use
+ work_share_list_free_lock instead of atomic chaining ifndef
+ HAVE_SYNC_BUILTINS.
+
+2008-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ * loop.c (gomp_loop_init): Fix GFS_DYNAMIC ws->mode setting.
+ * testsuite/libgomp.c/loop-4.c: New test.
+
+ * libgomp.h (struct gomp_team_state): Add single_count field.
+ (struct gomp_team): Likewise.
+ * team.c (gomp_new_team): Clear single_count.
+ (gomp_team_start): Likewise.
+ * single.c (GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.
+
+2008-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ * team.c (gomp_thread_start): Don't clear ts.static_trip here.
+ * loop.c (gomp_loop_static_start, gomp_loop_dynamic_start): Clear
+ ts.static_trip here.
+ * work.c (gomp_work_share_start): Don't clear ts.static_trip here.
+
+2008-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h: Include ptrlock.h.
+ (struct gomp_work_share): Reshuffle fields. Add next_alloc,
+ next_ws, next_free and inline_ordered_team_ids fields, change
+ ordered_team_ids into pointer from flexible array member.
+ (struct gomp_team_state): Add last_work_share field, remove
+ work_share_generation.
+ (struct gomp_team): Remove work_share_lock, generation_mask,
+ oldest_live_gen, num_live_gen and init_work_shares fields, add
+ work work_share_list_alloc, work_share_list_free and work_share_chunk
+ fields. Change work_shares from pointer to pointers into an array.
+ (gomp_new_team): New prototype.
+ (gomp_team_start): Change type of last argument.
+ (gomp_new_work_share): Removed.
+ (gomp_init_work_share, gomp_fini_work_share): New prototypes.
+ (gomp_work_share_init_done): New static inline.
+ * team.c (gomp_thread_start): Clear ts.last_work_share, don't clear
+ ts.work_share_generation.
+ (new_team): Removed.
+ (gomp_new_team): New function.
+ (free_team): Free gomp_work_share blocks chained through next_alloc,
+ instead of freeing work_shares and destroying work_share_lock.
+ (gomp_team_start): Change last argument from ws to team, don't create
+ new team, set ts.work_share to &team->work_shares[0] and clear
+ ts.last_work_share. Don't clear ts.work_share_generation.
+ (gomp_team_end): Call gomp_fini_work_share.
+ * work.c (gomp_new_work_share): Removed.
+ (alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
+ functions.
+ (free_work_share): Add team argument. Call gomp_fini_work_share
+ and then either free ws if orphaned, or put it into
+ work_share_list_free list of the current team.
+ (gomp_work_share_start, gomp_work_share_end,
+ gomp_work_share_end_nowait): Rewritten.
+ * sections.c (GOMP_sections_start): Call gomp_work_share_init_done
+ after gomp_sections_init. If HAVE_SYNC_BUILTINS, call
+ gomp_iter_dynamic_next instead of the _locked variant and don't take
+ lock around it, otherwise acquire it before calling
+ gomp_iter_dynamic_next_locked.
+ (GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
+ gomp_iter_dynamic_next instead of the _locked variant and don't take
+ lock around it.
+ (GOMP_parallel_sections_start): Call gomp_new_team instead of
+ gomp_new_work_share. Call gomp_sections_init on &team->work_shares[0].
+ Adjust gomp_team_start caller.
+ * loop.c (gomp_loop_static_start, gomp_loop_ordered_static_start): Call
+ gomp_work_share_init_done after gomp_loop_init. Don't unlock ws->lock.
+ (gomp_loop_dynamic_start, gomp_loop_guided_start): Call
+ gomp_work_share_init_done after gomp_loop_init. If HAVE_SYNC_BUILTINS,
+ don't unlock ws->lock, otherwise lock it.
+ (gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
+ gomp_work_share_init_done after gomp_loop_init. Lock ws->lock.
+ (gomp_parallel_loop_start): Call gomp_new_team instead of
+ gomp_new_work_share. Call gomp_loop_init on &team->work_shares[0].
+ Adjust gomp_team_start caller.
+ * single.c (GOMP_single_start, GOMP_single_copy_start): Call
+ gomp_work_share_init_done if gomp_work_share_start returned true.
+ Don't unlock ws->lock.
+ * parallel.c (GOMP_parallel_start): Call gomp_new_team and pass that
+ as last argument to gomp_team_start.
+ * config/linux/ptrlock.c: New file.
+ * config/linux/ptrlock.h: New file.
+ * config/posix/ptrlock.c: New file.
+ * config/posix/ptrlock.h: New file.
+ * Makefile.am (libgomp_la_SOURCES): Add ptrlock.c.
+ * Makefile.in: Regenerated.
+ * testsuite/Makefile.in: Regenerated.
+
+2008-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (gomp_active_wait_policy): Remove decl.
+ (gomp_throttled_spin_count_var, gomp_available_cpus,
+ gomp_managed_threads): New extern decls.
+ * team.c (gomp_team_start, gomp_team_end): If number of threads
+ changed, adjust atomically gomp_managed_threads.
+ * env.c (gomp_active_wait_policy, gomp_block_time_var): Remove.
+ (gomp_throttled_spin_count_var, gomp_available_cpus,
+ gomp_managed_threads): New variables.
+ (parse_millis): Removed.
+ (parse_spincount): New function.
+ (parse_wait_policy): Return -1/0/1 instead of setting
+ gomp_active_wait_policy.
+ (initialize_env): Call gomp_init_num_threads unconditionally.
+ Initialize gomp_available_cpus. Call parse_spincount instead
+ of parse_millis, initialize gomp_{,throttled_}spin_count_var
+ depending on presence and value of OMP_WAIT_POLICY and
+ GOMP_SPINCOUNT env vars.
+ * config/linux/wait.h (do_wait): Use gomp_throttled_spin_count_var
+ instead of gomp_spin_count_var if gomp_managed_threads >
+ gomp_available_cpus.
+
+ * config/linux/wait.h: Include errno.h.
+ (FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Define.
+ (gomp_futex_wake, gomp_futex_wait): New extern decls.
+ * config/linux/mutex.c (gomp_futex_wake, gomp_futex_wait): New
+ variables.
+ * config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+ * config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
+ (sys_futex0): Return error code.
+ (futex_wake, futex_wait): If ENOSYS was returned, clear
+ FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
+
+2008-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_work_share): Add mode field. Put lock and
+ next into a different cache line from most of the write-once fields.
+ * loop.c: Include limits.h.
+ (gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
+ If adding ws->chunk_size nthreads + 1 times after end won't
+ overflow, set ws->mode to 1.
+ * iter.c (gomp_iter_dynamic_next_locked): Don't multiply
+ ws->chunk_size by incr.
+ (gomp_iter_dynamic_next): Likewise. If ws->mode, use more efficient
+ code.
+ * work.c: Include stddef.h.
+ (gomp_new_work_share): Use offsetof rather than sizeof.
+
+2008-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ * libgomp.h (struct gomp_team): Change ordered_release field
+ into gomp_sem_t ** from flexible array member. Add implicit_task
+ and initial_work_shares fields.
+ (gomp_new_task): Removed.
+ (gomp_init_task): New prototype.
+ * team.c (new_team): Allocate implicit_task for each thread
+ and initial work_shares together with gomp_team allocation.
+ (free_team): Only free work_shares if it is not init_work_shares.
+ (gomp_team_start): Use gomp_init_task instead of gomp_new_task,
+ set thr->task to the corresponding implicit_task array entry.
+ * task.c (gomp_new_task): Removed.
+ (gomp_init_task): New function.
+ (gomp_end_task): Don't free the task.
+ (GOMP_task): Allocate struct gomp_task on the stack, call
+ gomp_init_task rather than gomp_new_task.
+ * work.c (gomp_work_share_start): If work_shares ==
+ init_work_shares, gomp_malloc + memcpy rather than gomp_realloc.
+
+2008-03-15 Jakub Jelinek <jakub@redhat.com>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * config/linux/bar.h (gomp_barrier_state_t): Rewritten.
+ (gomp_barrier_state_t): Change to unsigned int.
+ (gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
+ gomp_barrier_wait_start, gomp_barrier_last_thread): Rewritten.
+ (gomp_barrier_wait_last): Prototype rather than inline.
+ * config/linux/bar.c (gomp_barrier_wait_end): Rewritten.
+ (gomp_barrier_wait_last): New function.
+
+2008-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ * team.c (gomp_thread_start): Use gomp_barrier_wait_last instead
+ of gomp_barrier_wait.
+ * env.c (gomp_block_time_var, gomp_spin_count_var): New variables.
+ (parse_millis): New function.
+ (initialize_env): Handle GOMP_BLOCKTIME env var.
+ * libgomp.h (struct gomp_team): Move close to the end of the struct.
+ (gomp_spin_count_var): New extern var decl.
+ * work.c (gomp_work_share_end): Use gomp_barrier_state_t bstate
+ var instead of bool last, call gomp_barrier_last_thread to check
+ for last thread, pass bstate to gomp_barrier_wait_end.
+ * config/linux/wait.h: New file.
+ * config/linux/mutex.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
+ * config/linux/bar.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t. Call do_wait instead of futex_wait.
+ * config/linux/sem.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_sem_wait_slow): Call do_wait instead of futex_wait.
+ * config/linux/lock.c: Include wait.h instead of libgomp.h and
+ futex.h.
+ (gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
+ * config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
+ * config/linux/bar.h (gomp_barrier_state_t): New typedef.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t.
+ (gomp_barrier_wait_start): Return gomp_barrier_state_t.
+ (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
+ inlines.
+ * config/linux/powerpc/futex.h (cpu_relax, atomic_write_barrier): New
+ static inlines.
+ * config/linux/alpha/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/x86/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/s390/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/ia64/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/linux/sparc/futex.h (cpu_relax, atomic_write_barrier):
+ Likewise.
+ * config/posix/bar.c (gomp_barrier_wait_end): Change second argument
+ to gomp_barrier_state_t.
+ * config/posix/bar.h (gomp_barrier_state_t): New typedef.
+ (gomp_barrier_wait_end): Change second argument to
+ gomp_barrier_state_t.
+ (gomp_barrier_wait_start): Return gomp_barrier_state_t.
+ (gomp_barrier_last_thread, gomp_barrier_wait_last): New static
+ inlines.
+
+--- libgomp/parallel.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/parallel.c 2008-03-26 15:32:06.000000000 +0100
+@@ -68,7 +68,7 @@ void
+ GOMP_parallel_start (void (*fn) (void *), void *data, unsigned num_threads)
+ {
+ num_threads = gomp_resolve_num_threads (num_threads);
+- gomp_team_start (fn, data, num_threads, NULL);
++ gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
+ }
+
+ void
+--- libgomp/sections.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/sections.c 2008-03-26 15:33:06.000000000 +0100
+@@ -59,14 +59,24 @@ GOMP_sections_start (unsigned count)
+ long s, e, ret;
+
+ if (gomp_work_share_start (false))
+- gomp_sections_init (thr->ts.work_share, count);
++ {
++ gomp_sections_init (thr->ts.work_share, count);
++ gomp_work_share_init_done ();
++ }
+
++#ifdef HAVE_SYNC_BUILTINS
++ if (gomp_iter_dynamic_next (&s, &e))
++ ret = s;
++ else
++ ret = 0;
++#else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ if (gomp_iter_dynamic_next_locked (&s, &e))
+ ret = s;
+ else
+ ret = 0;
+-
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
++#endif
+
+ return ret;
+ }
+@@ -83,15 +93,23 @@ GOMP_sections_start (unsigned count)
+ unsigned
+ GOMP_sections_next (void)
+ {
+- struct gomp_thread *thr = gomp_thread ();
+ long s, e, ret;
+
++#ifdef HAVE_SYNC_BUILTINS
++ if (gomp_iter_dynamic_next (&s, &e))
++ ret = s;
++ else
++ ret = 0;
++#else
++ struct gomp_thread *thr = gomp_thread ();
++
+ gomp_mutex_lock (&thr->ts.work_share->lock);
+ if (gomp_iter_dynamic_next_locked (&s, &e))
+ ret = s;
+ else
+ ret = 0;
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
++#endif
+
+ return ret;
+ }
+@@ -103,15 +121,15 @@ void
+ GOMP_parallel_sections_start (void (*fn) (void *), void *data,
+ unsigned num_threads, unsigned count)
+ {
+- struct gomp_work_share *ws;
++ struct gomp_team *team;
+
+ num_threads = gomp_resolve_num_threads (num_threads);
+ if (gomp_dyn_var && num_threads > count)
+ num_threads = count;
+
+- ws = gomp_new_work_share (false, num_threads);
+- gomp_sections_init (ws, count);
+- gomp_team_start (fn, data, num_threads, ws);
++ team = gomp_new_team (num_threads);
++ gomp_sections_init (&team->work_shares[0], count);
++ gomp_team_start (fn, data, num_threads, team);
+ }
+
+ /* The GOMP_section_end* routines are called after the thread is told
+--- libgomp/env.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/env.c 2008-03-26 16:40:26.000000000 +0100
+@@ -44,6 +44,11 @@ enum gomp_schedule_type gomp_run_sched_v
+ unsigned long gomp_run_sched_chunk = 1;
+ unsigned short *gomp_cpu_affinity;
+ size_t gomp_cpu_affinity_len;
++#ifndef HAVE_SYNC_BUILTINS
++gomp_mutex_t gomp_remaining_threads_lock;
++#endif
++unsigned long gomp_available_cpus = 1, gomp_managed_threads = 1;
++unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
+
+ /* Parse the OMP_SCHEDULE environment variable. */
+
+@@ -147,6 +152,79 @@ parse_unsigned_long (const char *name, u
+ return false;
+ }
+
++/* Parse the GOMP_SPINCOUNT environment varible. Return true if one was
++ present and it was successfully parsed. */
++
++static bool
++parse_spincount (const char *name, unsigned long long *pvalue)
++{
++ char *env, *end;
++ unsigned long long value, mult = 1;
++
++ env = getenv (name);
++ if (env == NULL)
++ return false;
++
++ while (isspace ((unsigned char) *env))
++ ++env;
++ if (*env == '\0')
++ goto invalid;
++
++ if (strncasecmp (env, "infinite", 8) == 0
++ || strncasecmp (env, "infinity", 8) == 0)
++ {
++ value = ~0ULL;
++ end = env + 8;
++ goto check_tail;
++ }
++
++ errno = 0;
++ value = strtoull (env, &end, 10);
++ if (errno)
++ goto invalid;
++
++ while (isspace ((unsigned char) *end))
++ ++end;
++ if (*end != '\0')
++ {
++ switch (tolower (*end))
++ {
++ case 'k':
++ mult = 1000LL;
++ break;
++ case 'm':
++ mult = 1000LL * 1000LL;
++ break;
++ case 'g':
++ mult = 1000LL * 1000LL * 1000LL;
++ break;
++ case 't':
++ mult = 1000LL * 1000LL * 1000LL * 1000LL;
++ break;
++ default:
++ goto invalid;
++ }
++ ++end;
++ check_tail:
++ while (isspace ((unsigned char) *end))
++ ++end;
++ if (*end != '\0')
++ goto invalid;
++ }
++
++ if (value > ~0ULL / mult)
++ value = ~0ULL;
++ else
++ value *= mult;
++
++ *pvalue = value;
++ return true;
++
++ invalid:
++ gomp_error ("Invalid value for environment variable %s", name);
++ return false;
++}
++
+ /* Parse a boolean value for environment variable NAME and store the
+ result in VALUE. */
+
+@@ -281,10 +359,25 @@ initialize_env (void)
+ parse_schedule ();
+ parse_boolean ("OMP_DYNAMIC", &gomp_dyn_var);
+ parse_boolean ("OMP_NESTED", &gomp_nest_var);
++ gomp_init_num_threads ();
++ gomp_available_cpus = gomp_nthreads_var;
+ if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
+- gomp_init_num_threads ();
++ gomp_nthreads_var = gomp_available_cpus;
+ if (parse_affinity ())
+ gomp_init_affinity ();
++ if (!parse_spincount ("GOMP_SPINCOUNT", &gomp_spin_count_var))
++ {
++ /* Using a rough estimation of 100000 spins per msec,
++ use 200 msec blocking.
++ Depending on the CPU speed, this can be e.g. 5 times longer
++ or 5 times shorter. */
++ gomp_spin_count_var = 20000000LL;
++ }
++ /* gomp_throttled_spin_count_var is used when there are more libgomp
++ managed threads than available CPUs. Use very short spinning. */
++ gomp_throttled_spin_count_var = 100LL;
++ if (gomp_throttled_spin_count_var > gomp_spin_count_var)
++ gomp_throttled_spin_count_var = gomp_spin_count_var;
+
+ /* Not strictly environment related, but ordering constructors is tricky. */
+ pthread_attr_init (&gomp_thread_attr);
+--- libgomp/libgomp.h.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/libgomp.h 2008-03-27 12:21:51.000000000 +0100
+@@ -50,6 +50,7 @@
+ #include "sem.h"
+ #include "mutex.h"
+ #include "bar.h"
++#include "ptrlock.h"
+
+
+ /* This structure contains the data to control one work-sharing construct,
+@@ -70,6 +71,8 @@ struct gomp_work_share
+ If this is a SECTIONS construct, this value will always be DYNAMIC. */
+ enum gomp_schedule_type sched;
+
++ int mode;
++
+ /* This is the chunk_size argument to the SCHEDULE clause. */
+ long chunk_size;
+
+@@ -81,17 +84,38 @@ struct gomp_work_share
+ is always 1. */
+ long incr;
+
+- /* This lock protects the update of the following members. */
+- gomp_mutex_t lock;
++ /* This is a circular queue that details which threads will be allowed
++ into the ordered region and in which order. When a thread allocates
++ iterations on which it is going to work, it also registers itself at
++ the end of the array. When a thread reaches the ordered region, it
++ checks to see if it is the one at the head of the queue. If not, it
++ blocks on its RELEASE semaphore. */
++ unsigned *ordered_team_ids;
+
+- union {
+- /* This is the next iteration value to be allocated. In the case of
+- GFS_STATIC loops, this the iteration start point and never changes. */
+- long next;
++ /* This is the number of threads that have registered themselves in
++ the circular queue ordered_team_ids. */
++ unsigned ordered_num_used;
+
+- /* This is the returned data structure for SINGLE COPYPRIVATE. */
+- void *copyprivate;
+- };
++ /* This is the team_id of the currently acknowledged owner of the ordered
++ section, or -1u if the ordered section has not been acknowledged by
++ any thread. This is distinguished from the thread that is *allowed*
++ to take the section next. */
++ unsigned ordered_owner;
++
++ /* This is the index into the circular queue ordered_team_ids of the
++ current thread that's allowed into the ordered reason. */
++ unsigned ordered_cur;
++
++ /* This is a chain of allocated gomp_work_share blocks, valid only
++ in the first gomp_work_share struct in the block. */
++ struct gomp_work_share *next_alloc;
++
++ /* The above fields are written once during workshare initialization,
++ or related to ordered worksharing. Make sure the following fields
++ are in a different cache line. */
++
++ /* This lock protects the update of the following members. */
++ gomp_mutex_t lock __attribute__((aligned (64)));
+
+ /* This is the count of the number of threads that have exited the work
+ share construct. If the construct was marked nowait, they have moved on
+@@ -99,27 +123,28 @@ struct gomp_work_share
+ of the team to exit the work share construct must deallocate it. */
+ unsigned threads_completed;
+
+- /* This is the index into the circular queue ordered_team_ids of the
+- current thread that's allowed into the ordered reason. */
+- unsigned ordered_cur;
++ union {
++ /* This is the next iteration value to be allocated. In the case of
++ GFS_STATIC loops, this the iteration start point and never changes. */
++ long next;
+
+- /* This is the number of threads that have registered themselves in
+- the circular queue ordered_team_ids. */
+- unsigned ordered_num_used;
++ /* This is the returned data structure for SINGLE COPYPRIVATE. */
++ void *copyprivate;
++ };
+
+- /* This is the team_id of the currently acknoledged owner of the ordered
+- section, or -1u if the ordered section has not been acknowledged by
+- any thread. This is distinguished from the thread that is *allowed*
+- to take the section next. */
+- unsigned ordered_owner;
++ union {
++ /* Link to gomp_work_share struct for next work sharing construct
++ encountered after this one. */
++ gomp_ptrlock_t next_ws;
++
++ /* gomp_work_share structs are chained in the free work share cache
++ through this. */
++ struct gomp_work_share *next_free;
++ };
+
+- /* This is a circular queue that details which threads will be allowed
+- into the ordered region and in which order. When a thread allocates
+- iterations on which it is going to work, it also registers itself at
+- the end of the array. When a thread reaches the ordered region, it
+- checks to see if it is the one at the head of the queue. If not, it
+- blocks on its RELEASE semaphore. */
+- unsigned ordered_team_ids[];
++ /* If only few threads are in the team, ordered_team_ids can point
++ to this array which fills the padding at the end of this struct. */
++ unsigned inline_ordered_team_ids[0];
+ };
+
+ /* This structure contains all of the thread-local data associated with
+@@ -133,21 +158,24 @@ struct gomp_team_state
+
+ /* This is the work share construct which this thread is currently
+ processing. Recall that with NOWAIT, not all threads may be
+- processing the same construct. This value is NULL when there
+- is no construct being processed. */
++ processing the same construct. */
+ struct gomp_work_share *work_share;
+
++ /* This is the previous work share construct or NULL if there wasn't any.
++ When all threads are done with the current work sharing construct,
++ the previous one can be freed. The current one can't, as its
++ next_ws field is used. */
++ struct gomp_work_share *last_work_share;
++
+ /* This is the ID of this thread within the team. This value is
+ guaranteed to be between 0 and N-1, where N is the number of
+ threads in the team. */
+ unsigned team_id;
+
+- /* The work share "generation" is a number that increases by one for
+- each work share construct encountered in the dynamic flow of the
+- program. It is used to find the control data for the work share
+- when encountering it for the first time. This particular number
+- reflects the generation of the work_share member of this struct. */
+- unsigned work_share_generation;
++#ifdef HAVE_SYNC_BUILTINS
++ /* Number of single stmts encountered. */
++ unsigned long single_count;
++#endif
+
+ /* For GFS_RUNTIME loops that resolved to GFS_STATIC, this is the
+ trip number through the loop. So first time a particular loop
+@@ -163,41 +191,53 @@ struct gomp_team_state
+
+ struct gomp_team
+ {
+- /* This lock protects access to the following work shares data structures. */
+- gomp_mutex_t work_share_lock;
+-
+- /* This is a dynamically sized array containing pointers to the control
+- structs for all "live" work share constructs. Here "live" means that
+- the construct has been encountered by at least one thread, and not
+- completed by all threads. */
+- struct gomp_work_share **work_shares;
+-
+- /* The work_shares array is indexed by "generation & generation_mask".
+- The mask will be 2**N - 1, where 2**N is the size of the array. */
+- unsigned generation_mask;
+-
+- /* These two values define the bounds of the elements of the work_shares
+- array that are currently in use. */
+- unsigned oldest_live_gen;
+- unsigned num_live_gen;
+-
+ /* This is the number of threads in the current team. */
+ unsigned nthreads;
+
++ /* This is number of gomp_work_share structs that have been allocated
++ as a block last time. */
++ unsigned work_share_chunk;
++
+ /* This is the saved team state that applied to a master thread before
+ the current thread was created. */
+ struct gomp_team_state prev_ts;
+
+- /* This barrier is used for most synchronization of the team. */
+- gomp_barrier_t barrier;
+-
+ /* This semaphore should be used by the master thread instead of its
+ "native" semaphore in the thread structure. Required for nested
+ parallels, as the master is a member of two teams. */
+ gomp_sem_t master_release;
+
+- /* This array contains pointers to the release semaphore of the threads
+- in the team. */
++ /* List of gomp_work_share structs chained through next_free fields.
++ This is populated and taken off only by the first thread in the
++ team encountering a new work sharing construct, in a critical
++ section. */
++ struct gomp_work_share *work_share_list_alloc;
++
++ /* List of gomp_work_share structs freed by free_work_share. New
++ entries are atomically added to the start of the list, and
++ alloc_work_share can safely only move all but the first entry
++ to work_share_list alloc, as free_work_share can happen concurrently
++ with alloc_work_share. */
++ struct gomp_work_share *work_share_list_free;
++
++#ifdef HAVE_SYNC_BUILTINS
++ /* Number of simple single regions encountered by threads in this
++ team. */
++ unsigned long single_count;
++#else
++ /* Mutex protecting addition of workshares to work_share_list_free. */
++ gomp_mutex_t work_share_list_free_lock;
++#endif
++
++ /* This barrier is used for most synchronization of the team. */
++ gomp_barrier_t barrier;
++
++ /* Initial work shares, to avoid allocating any gomp_work_share
++ structs in the common case. */
++ struct gomp_work_share work_shares[8];
++
++ /* This is an array with pointers to the release semaphore
++ of the threads in the team. */
+ gomp_sem_t *ordered_release[];
+ };
+
+@@ -242,6 +282,11 @@ extern bool gomp_dyn_var;
+ extern bool gomp_nest_var;
+ extern enum gomp_schedule_type gomp_run_sched_var;
+ extern unsigned long gomp_run_sched_chunk;
++#ifndef HAVE_SYNC_BUILTINS
++extern gomp_mutex_t gomp_remaining_threads_lock;
++#endif
++extern unsigned long long gomp_spin_count_var, gomp_throttled_spin_count_var;
++extern unsigned long gomp_available_cpus, gomp_managed_threads;
+
+ /* The attributes to be used during thread creation. */
+ extern pthread_attr_t gomp_thread_attr;
+@@ -306,17 +351,27 @@ extern unsigned gomp_dynamic_max_threads
+
+ /* team.c */
+
++extern struct gomp_team *gomp_new_team (unsigned);
+ extern void gomp_team_start (void (*) (void *), void *, unsigned,
+- struct gomp_work_share *);
++ struct gomp_team *);
+ extern void gomp_team_end (void);
+
+ /* work.c */
+
+-extern struct gomp_work_share * gomp_new_work_share (bool, unsigned);
++extern void gomp_init_work_share (struct gomp_work_share *, bool, unsigned);
++extern void gomp_fini_work_share (struct gomp_work_share *);
+ extern bool gomp_work_share_start (bool);
+ extern void gomp_work_share_end (void);
+ extern void gomp_work_share_end_nowait (void);
+
++static inline void
++gomp_work_share_init_done (void)
++{
++ struct gomp_thread *thr = gomp_thread ();
++ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
++ gomp_ptrlock_set (&thr->ts.last_work_share->next_ws, thr->ts.work_share);
++}
++
+ #ifdef HAVE_ATTRIBUTE_VISIBILITY
+ # pragma GCC visibility pop
+ #endif
+--- libgomp/iter.c.jj 2008-03-26 14:48:34.000000000 +0100
++++ libgomp/iter.c 2008-03-26 15:11:23.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -154,7 +154,7 @@ gomp_iter_dynamic_next_locked (long *pst
+ if (start == ws->end)
+ return false;
+
+- chunk = ws->chunk_size * ws->incr;
++ chunk = ws->chunk_size;
+ left = ws->end - start;
+ if (ws->incr < 0)
+ {
+@@ -186,11 +186,38 @@ gomp_iter_dynamic_next (long *pstart, lo
+ struct gomp_work_share *ws = thr->ts.work_share;
+ long start, end, nend, chunk, incr;
+
+- start = ws->next;
+ end = ws->end;
+ incr = ws->incr;
+- chunk = ws->chunk_size * incr;
++ chunk = ws->chunk_size;
++
++ if (__builtin_expect (ws->mode, 1))
++ {
++ long tmp = __sync_fetch_and_add (&ws->next, chunk);
++ if (incr > 0)
++ {
++ if (tmp >= end)
++ return false;
++ nend = tmp + chunk;
++ if (nend > end)
++ nend = end;
++ *pstart = tmp;
++ *pend = nend;
++ return true;
++ }
++ else
++ {
++ if (tmp <= end)
++ return false;
++ nend = tmp + chunk;
++ if (nend < end)
++ nend = end;
++ *pstart = tmp;
++ *pend = nend;
++ return true;
++ }
++ }
+
++ start = ws->next;
+ while (1)
+ {
+ long left = end - start;
+--- libgomp/work.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/work.c 2008-03-27 12:21:51.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,39 +29,138 @@
+ of threads. */
+
+ #include "libgomp.h"
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+
+-/* Create a new work share structure. */
++/* Allocate a new work share structure, preferably from current team's
++ free gomp_work_share cache. */
+
+-struct gomp_work_share *
+-gomp_new_work_share (bool ordered, unsigned nthreads)
++static struct gomp_work_share *
++alloc_work_share (struct gomp_team *team)
+ {
+ struct gomp_work_share *ws;
+- size_t size;
++ unsigned int i;
+
+- size = sizeof (*ws);
+- if (ordered)
+- size += nthreads * sizeof (ws->ordered_team_ids[0]);
++ /* This is called in a critical section. */
++ if (team->work_share_list_alloc != NULL)
++ {
++ ws = team->work_share_list_alloc;
++ team->work_share_list_alloc = ws->next_free;
++ return ws;
++ }
+
+- ws = gomp_malloc_cleared (size);
+- gomp_mutex_init (&ws->lock);
+- ws->ordered_owner = -1;
++#ifdef HAVE_SYNC_BUILTINS
++ ws = team->work_share_list_free;
++ /* We need atomic read from work_share_list_free,
++ as free_work_share can be called concurrently. */
++ __asm ("" : "+r" (ws));
++
++ if (ws && ws->next_free)
++ {
++ struct gomp_work_share *next = ws->next_free;
++ ws->next_free = NULL;
++ team->work_share_list_alloc = next->next_free;
++ return next;
++ }
++#else
++ gomp_mutex_lock (&team->work_share_list_free_lock);
++ ws = team->work_share_list_free;
++ if (ws)
++ {
++ team->work_share_list_alloc = ws->next_free;
++ team->work_share_list_free = NULL;
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++ return ws;
++ }
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++#endif
+
++ team->work_share_chunk *= 2;
++ ws = gomp_malloc (team->work_share_chunk * sizeof (struct gomp_work_share));
++ ws->next_alloc = team->work_shares[0].next_alloc;
++ team->work_shares[0].next_alloc = ws;
++ team->work_share_list_alloc = &ws[1];
++ for (i = 1; i < team->work_share_chunk - 1; i++)
++ ws[i].next_free = &ws[i + 1];
++ ws[i].next_free = NULL;
+ return ws;
+ }
+
++/* Initialize an already allocated struct gomp_work_share.
++ This shouldn't touch the next_alloc field. */
++
++void
++gomp_init_work_share (struct gomp_work_share *ws, bool ordered,
++ unsigned nthreads)
++{
++ gomp_mutex_init (&ws->lock);
++ if (__builtin_expect (ordered, 0))
++ {
++#define INLINE_ORDERED_TEAM_IDS_CNT \
++ ((sizeof (struct gomp_work_share) \
++ - offsetof (struct gomp_work_share, inline_ordered_team_ids)) \
++ / sizeof (((struct gomp_work_share *) 0)->inline_ordered_team_ids[0]))
++
++ if (nthreads > INLINE_ORDERED_TEAM_IDS_CNT)
++ ws->ordered_team_ids
++ = gomp_malloc (nthreads * sizeof (*ws->ordered_team_ids));
++ else
++ ws->ordered_team_ids = ws->inline_ordered_team_ids;
++ memset (ws->ordered_team_ids, '\0',
++ nthreads * sizeof (*ws->ordered_team_ids));
++ ws->ordered_num_used = 0;
++ ws->ordered_owner = -1;
++ ws->ordered_cur = 0;
++ }
++ else
++ ws->ordered_team_ids = NULL;
++ gomp_ptrlock_init (&ws->next_ws, NULL);
++ ws->threads_completed = 0;
++}
+
+-/* Free a work share structure. */
++/* Do any needed destruction of gomp_work_share fields before it
++ is put back into free gomp_work_share cache or freed. */
+
+-static void
+-free_work_share (struct gomp_work_share *ws)
++void
++gomp_fini_work_share (struct gomp_work_share *ws)
+ {
+ gomp_mutex_destroy (&ws->lock);
+- free (ws);
++ if (ws->ordered_team_ids != ws->inline_ordered_team_ids)
++ free (ws->ordered_team_ids);
++ gomp_ptrlock_destroy (&ws->next_ws);
+ }
+
++/* Free a work share struct, if not orphaned, put it into current
++ team's free gomp_work_share cache. */
++
++static inline void
++free_work_share (struct gomp_team *team, struct gomp_work_share *ws)
++{
++ gomp_fini_work_share (ws);
++ if (__builtin_expect (team == NULL, 0))
++ free (ws);
++ else
++ {
++ struct gomp_work_share *next_ws;
++#ifdef HAVE_SYNC_BUILTINS
++ do
++ {
++ next_ws = team->work_share_list_free;
++ ws->next_free = next_ws;
++ }
++ while (!__sync_bool_compare_and_swap (&team->work_share_list_free,
++ next_ws, ws));
++#else
++ gomp_mutex_lock (&team->work_share_list_free_lock);
++ next_ws = team->work_share_list_free;
++ ws->next_free = next_ws;
++ team->work_share_list_free = ws;
++ gomp_mutex_unlock (&team->work_share_list_free_lock);
++#endif
++ }
++}
+
+ /* The current thread is ready to begin the next work sharing construct.
+ In all cases, thr->ts.work_share is updated to point to the new
+@@ -74,71 +173,34 @@ gomp_work_share_start (bool ordered)
+ struct gomp_thread *thr = gomp_thread ();
+ struct gomp_team *team = thr->ts.team;
+ struct gomp_work_share *ws;
+- unsigned ws_index, ws_gen;
+
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- ws = gomp_new_work_share (ordered, 1);
++ ws = gomp_malloc (sizeof (*ws));
++ gomp_init_work_share (ws, ordered, 1);
+ thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+- gomp_mutex_lock (&ws->lock);
+- return true;
++ return ws;
+ }
+
+- gomp_mutex_lock (&team->work_share_lock);
+-
+- /* This thread is beginning its next generation. */
+- ws_gen = ++thr->ts.work_share_generation;
+-
+- /* If this next generation is not newer than any other generation in
+- the team, then simply reference the existing construct. */
+- if (ws_gen - team->oldest_live_gen < team->num_live_gen)
++ ws = thr->ts.work_share;
++ thr->ts.last_work_share = ws;
++ ws = gomp_ptrlock_get (&ws->next_ws);
++ if (ws == NULL)
+ {
+- ws_index = ws_gen & team->generation_mask;
+- ws = team->work_shares[ws_index];
++ /* This thread encountered a new ws first. */
++ struct gomp_work_share *ws = alloc_work_share (team);
++ gomp_init_work_share (ws, ordered, team->nthreads);
+ thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+-
+- gomp_mutex_lock (&ws->lock);
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- return false;
++ return true;
+ }
+-
+- /* Resize the work shares queue if we've run out of space. */
+- if (team->num_live_gen++ == team->generation_mask)
++ else
+ {
+- team->work_shares = gomp_realloc (team->work_shares,
+- 2 * team->num_live_gen
+- * sizeof (*team->work_shares));
+-
+- /* Unless oldest_live_gen is zero, the sequence of live elements
+- wraps around the end of the array. If we do nothing, we break
+- lookup of the existing elements. Fix that by unwrapping the
+- data from the front to the end. */
+- if (team->oldest_live_gen > 0)
+- memcpy (team->work_shares + team->num_live_gen,
+- team->work_shares,
+- (team->oldest_live_gen & team->generation_mask)
+- * sizeof (*team->work_shares));
+-
+- team->generation_mask = team->generation_mask * 2 + 1;
+- }
+-
+- ws_index = ws_gen & team->generation_mask;
+- ws = gomp_new_work_share (ordered, team->nthreads);
+- thr->ts.work_share = ws;
+- thr->ts.static_trip = 0;
+- team->work_shares[ws_index] = ws;
+-
+- gomp_mutex_lock (&ws->lock);
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- return true;
++ thr->ts.work_share = ws;
++ return false;
++ }
+ }
+
+-
+ /* The current thread is done with its current work sharing construct.
+ This version does imply a barrier at the end of the work-share. */
+
+@@ -147,36 +209,28 @@ gomp_work_share_end (void)
+ {
+ struct gomp_thread *thr = gomp_thread ();
+ struct gomp_team *team = thr->ts.team;
+- struct gomp_work_share *ws = thr->ts.work_share;
+- bool last;
+-
+- thr->ts.work_share = NULL;
++ gomp_barrier_state_t bstate;
+
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- free_work_share (ws);
++ free_work_share (NULL, thr->ts.work_share);
++ thr->ts.work_share = NULL;
+ return;
+ }
+
+- last = gomp_barrier_wait_start (&team->barrier);
++ bstate = gomp_barrier_wait_start (&team->barrier);
+
+- if (last)
++ if (gomp_barrier_last_thread (bstate))
+ {
+- unsigned ws_index;
+-
+- ws_index = thr->ts.work_share_generation & team->generation_mask;
+- team->work_shares[ws_index] = NULL;
+- team->oldest_live_gen++;
+- team->num_live_gen = 0;
+-
+- free_work_share (ws);
++ if (__builtin_expect (thr->ts.last_work_share != NULL, 1))
++ free_work_share (team, thr->ts.last_work_share);
+ }
+
+- gomp_barrier_wait_end (&team->barrier, last);
++ gomp_barrier_wait_end (&team->barrier, bstate);
++ thr->ts.last_work_share = NULL;
+ }
+
+-
+ /* The current thread is done with its current work sharing construct.
+ This version does NOT imply a barrier at the end of the work-share. */
+
+@@ -188,15 +242,17 @@ gomp_work_share_end_nowait (void)
+ struct gomp_work_share *ws = thr->ts.work_share;
+ unsigned completed;
+
+- thr->ts.work_share = NULL;
+-
+ /* Work sharing constructs can be orphaned. */
+ if (team == NULL)
+ {
+- free_work_share (ws);
++ free_work_share (NULL, ws);
++ thr->ts.work_share = NULL;
+ return;
+ }
+
++ if (__builtin_expect (thr->ts.last_work_share == NULL, 0))
++ return;
++
+ #ifdef HAVE_SYNC_BUILTINS
+ completed = __sync_add_and_fetch (&ws->threads_completed, 1);
+ #else
+@@ -206,18 +262,6 @@ gomp_work_share_end_nowait (void)
+ #endif
+
+ if (completed == team->nthreads)
+- {
+- unsigned ws_index;
+-
+- gomp_mutex_lock (&team->work_share_lock);
+-
+- ws_index = thr->ts.work_share_generation & team->generation_mask;
+- team->work_shares[ws_index] = NULL;
+- team->oldest_live_gen++;
+- team->num_live_gen--;
+-
+- gomp_mutex_unlock (&team->work_share_lock);
+-
+- free_work_share (ws);
+- }
++ free_work_share (team, thr->ts.last_work_share);
++ thr->ts.last_work_share = NULL;
+ }
+--- libgomp/single.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/single.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -37,10 +37,24 @@
+ bool
+ GOMP_single_start (void)
+ {
++#ifdef HAVE_SYNC_BUILTINS
++ struct gomp_thread *thr = gomp_thread ();
++ struct gomp_team *team = thr->ts.team;
++ unsigned long single_count;
++
++ if (__builtin_expect (team == NULL, 0))
++ return true;
++
++ single_count = thr->ts.single_count++;
++ return __sync_bool_compare_and_swap (&team->single_count, single_count,
++ single_count + 1L);
++#else
+ bool ret = gomp_work_share_start (false);
+- gomp_mutex_unlock (&gomp_thread ()->ts.work_share->lock);
++ if (ret)
++ gomp_work_share_init_done ();
+ gomp_work_share_end_nowait ();
+ return ret;
++#endif
+ }
+
+ /* This routine is called when first encountering a SINGLE construct that
+@@ -57,10 +71,12 @@ GOMP_single_copy_start (void)
+ void *ret;
+
+ first = gomp_work_share_start (false);
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+
+ if (first)
+- ret = NULL;
++ {
++ gomp_work_share_init_done ();
++ ret = NULL;
++ }
+ else
+ {
+ gomp_barrier_wait (&thr->ts.team->barrier);
+--- libgomp/loop.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/loop.c 2008-03-26 18:47:04.000000000 +0100
+@@ -27,8 +27,9 @@
+
+ /* This file handles the LOOP (FOR/DO) construct. */
+
+-#include "libgomp.h"
++#include <limits.h>
+ #include <stdlib.h>
++#include "libgomp.h"
+
+
+ /* Initialize the given work share construct from the given arguments. */
+@@ -44,6 +45,39 @@ gomp_loop_init (struct gomp_work_share *
+ ? start : end;
+ ws->incr = incr;
+ ws->next = start;
++ if (sched == GFS_DYNAMIC)
++ {
++ ws->chunk_size *= incr;
++
++#ifdef HAVE_SYNC_BUILTINS
++ {
++ /* For dynamic scheduling prepare things to make each iteration
++ faster. */
++ struct gomp_thread *thr = gomp_thread ();
++ struct gomp_team *team = thr->ts.team;
++ long nthreads = team ? team->nthreads : 1;
++
++ if (__builtin_expect (incr > 0, 1))
++ {
++ /* Cheap overflow protection. */
++ if (__builtin_expect ((nthreads | ws->chunk_size)
++ >= 1UL << (sizeof (long)
++ * __CHAR_BIT__ / 2 - 1), 0))
++ ws->mode = 0;
++ else
++ ws->mode = ws->end < (LONG_MAX
++ - (nthreads + 1) * ws->chunk_size);
++ }
++ /* Cheap overflow protection. */
++ else if (__builtin_expect ((nthreads | -ws->chunk_size)
++ >= 1UL << (sizeof (long)
++ * __CHAR_BIT__ / 2 - 1), 0))
++ ws->mode = 0;
++ else
++ ws->mode = ws->end > (nthreads + 1) * -ws->chunk_size - LONG_MAX;
++ }
++#endif
++ }
+ }
+
+ /* The *_start routines are called when first encountering a loop construct
+@@ -68,10 +102,13 @@ gomp_loop_static_start (long start, long
+ {
+ struct gomp_thread *thr = gomp_thread ();
+
++ thr->ts.static_trip = 0;
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_STATIC, chunk_size);
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_STATIC, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ return !gomp_iter_static_next (istart, iend);
+ }
+@@ -84,13 +121,16 @@ gomp_loop_dynamic_start (long start, lon
+ bool ret;
+
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_DYNAMIC, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_DYNAMIC, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ #ifdef HAVE_SYNC_BUILTINS
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+ ret = gomp_iter_dynamic_next (istart, iend);
+ #else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ ret = gomp_iter_dynamic_next_locked (istart, iend);
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
+ #endif
+@@ -106,13 +146,16 @@ gomp_loop_guided_start (long start, long
+ bool ret;
+
+ if (gomp_work_share_start (false))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_GUIDED, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_GUIDED, chunk_size);
++ gomp_work_share_init_done ();
++ }
+
+ #ifdef HAVE_SYNC_BUILTINS
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+ ret = gomp_iter_guided_next (istart, iend);
+ #else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+ ret = gomp_iter_guided_next_locked (istart, iend);
+ gomp_mutex_unlock (&thr->ts.work_share->lock);
+ #endif
+@@ -149,13 +192,14 @@ gomp_loop_ordered_static_start (long sta
+ {
+ struct gomp_thread *thr = gomp_thread ();
+
++ thr->ts.static_trip = 0;
+ if (gomp_work_share_start (true))
+ {
+ gomp_loop_init (thr->ts.work_share, start, end, incr,
+ GFS_STATIC, chunk_size);
+ gomp_ordered_static_init ();
++ gomp_work_share_init_done ();
+ }
+- gomp_mutex_unlock (&thr->ts.work_share->lock);
+
+ return !gomp_iter_static_next (istart, iend);
+ }
+@@ -168,8 +212,14 @@ gomp_loop_ordered_dynamic_start (long st
+ bool ret;
+
+ if (gomp_work_share_start (true))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_DYNAMIC, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_DYNAMIC, chunk_size);
++ gomp_mutex_lock (&thr->ts.work_share->lock);
++ gomp_work_share_init_done ();
++ }
++ else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+
+ ret = gomp_iter_dynamic_next_locked (istart, iend);
+ if (ret)
+@@ -187,8 +237,14 @@ gomp_loop_ordered_guided_start (long sta
+ bool ret;
+
+ if (gomp_work_share_start (true))
+- gomp_loop_init (thr->ts.work_share, start, end, incr,
+- GFS_GUIDED, chunk_size);
++ {
++ gomp_loop_init (thr->ts.work_share, start, end, incr,
++ GFS_GUIDED, chunk_size);
++ gomp_mutex_lock (&thr->ts.work_share->lock);
++ gomp_work_share_init_done ();
++ }
++ else
++ gomp_mutex_lock (&thr->ts.work_share->lock);
+
+ ret = gomp_iter_guided_next_locked (istart, iend);
+ if (ret)
+@@ -375,12 +431,12 @@ gomp_parallel_loop_start (void (*fn) (vo
+ long incr, enum gomp_schedule_type sched,
+ long chunk_size)
+ {
+- struct gomp_work_share *ws;
++ struct gomp_team *team;
+
+ num_threads = gomp_resolve_num_threads (num_threads);
+- ws = gomp_new_work_share (false, num_threads);
+- gomp_loop_init (ws, start, end, incr, sched, chunk_size);
+- gomp_team_start (fn, data, num_threads, ws);
++ team = gomp_new_team (num_threads);
++ gomp_loop_init (&team->work_shares[0], start, end, incr, sched, chunk_size);
++ gomp_team_start (fn, data, num_threads, team);
+ }
+
+ void
+--- libgomp/Makefile.in.jj 2008-01-10 20:53:47.000000000 +0100
++++ libgomp/Makefile.in 2008-03-26 18:51:01.000000000 +0100
+@@ -83,7 +83,7 @@ libgomp_la_LIBADD =
+ am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
+ error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
+ single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
+- bar.lo time.lo fortran.lo affinity.lo
++ bar.lo ptrlock.lo time.lo fortran.lo affinity.lo
+ libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+ depcomp = $(SHELL) $(top_srcdir)/../depcomp
+@@ -292,7 +292,7 @@ libgomp_version_info = -version-info $(l
+ libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
+ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
+ loop.c ordered.c parallel.c sections.c single.c team.c work.c \
+- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
++ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
+
+ nodist_noinst_HEADERS = libgomp_f.h
+ nodist_libsubinclude_HEADERS = omp.h
+@@ -434,6 +434,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordered.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrlock.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sections.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single.Plo@am__quote@
+--- libgomp/testsuite/libgomp.c/loop-4.c.jj 2008-03-26 18:47:04.000000000 +0100
++++ libgomp/testsuite/libgomp.c/loop-4.c 2008-03-26 18:47:04.000000000 +0100
+@@ -0,0 +1,28 @@
++/* { dg-do run } */
++
++extern void abort (void);
++
++int
++main (void)
++{
++ int e = 0;
++#pragma omp parallel num_threads (4) reduction(+:e)
++ {
++ long i;
++ #pragma omp for schedule(dynamic,1)
++ for (i = __LONG_MAX__ - 30001; i <= __LONG_MAX__ - 10001; i += 10000)
++ if (i != __LONG_MAX__ - 30001
++ && i != __LONG_MAX__ - 20001
++ && i != __LONG_MAX__ - 10001)
++ e = 1;
++ #pragma omp for schedule(dynamic,1)
++ for (i = -__LONG_MAX__ + 30000; i >= -__LONG_MAX__ + 10000; i -= 10000)
++ if (i != -__LONG_MAX__ + 30000
++ && i != -__LONG_MAX__ + 20000
++ && i != -__LONG_MAX__ + 10000)
++ e = 1;
++ }
++ if (e)
++ abort ();
++ return 0;
++}
+--- libgomp/Makefile.am.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/Makefile.am 2008-03-26 15:15:19.000000000 +0100
+@@ -31,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i
+
+ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
+ loop.c ordered.c parallel.c sections.c single.c team.c work.c \
+- lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
++ lock.c mutex.c proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c
+
+ nodist_noinst_HEADERS = libgomp_f.h
+ nodist_libsubinclude_HEADERS = omp.h
+--- libgomp/team.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/team.c 2008-03-27 12:22:26.000000000 +0100
+@@ -94,7 +94,7 @@ gomp_thread_start (void *xdata)
+ {
+ gomp_barrier_wait (&thr->ts.team->barrier);
+ local_fn (local_data);
+- gomp_barrier_wait (&thr->ts.team->barrier);
++ gomp_barrier_wait_last (&thr->ts.team->barrier);
+ }
+ else
+ {
+@@ -114,11 +114,10 @@ gomp_thread_start (void *xdata)
+ thr->data = NULL;
+ thr->ts.team = NULL;
+ thr->ts.work_share = NULL;
++ thr->ts.last_work_share = NULL;
+ thr->ts.team_id = 0;
+- thr->ts.work_share_generation = 0;
+- thr->ts.static_trip = 0;
+
+- gomp_barrier_wait (&team->barrier);
++ gomp_barrier_wait_last (&team->barrier);
+ gomp_barrier_wait (&gomp_threads_dock);
+
+ local_fn = thr->fn;
+@@ -133,21 +132,29 @@ gomp_thread_start (void *xdata)
+
+ /* Create a new team data structure. */
+
+-static struct gomp_team *
+-new_team (unsigned nthreads, struct gomp_work_share *work_share)
++struct gomp_team *
++gomp_new_team (unsigned nthreads)
+ {
+ struct gomp_team *team;
+ size_t size;
++ int i;
+
+ size = sizeof (*team) + nthreads * sizeof (team->ordered_release[0]);
+ team = gomp_malloc (size);
+- gomp_mutex_init (&team->work_share_lock);
+
+- team->work_shares = gomp_malloc (4 * sizeof (struct gomp_work_share *));
+- team->generation_mask = 3;
+- team->oldest_live_gen = work_share == NULL;
+- team->num_live_gen = work_share != NULL;
+- team->work_shares[0] = work_share;
++ team->work_share_chunk = 8;
++#ifdef HAVE_SYNC_BUILTINS
++ team->single_count = 0;
++#else
++ gomp_mutex_init (&team->work_share_list_free_lock);
++#endif
++ gomp_init_work_share (&team->work_shares[0], false, nthreads);
++ team->work_shares[0].next_alloc = NULL;
++ team->work_share_list_free = NULL;
++ team->work_share_list_alloc = &team->work_shares[1];
++ for (i = 1; i < 7; i++)
++ team->work_shares[i].next_free = &team->work_shares[i + 1];
++ team->work_shares[i].next_free = NULL;
+
+ team->nthreads = nthreads;
+ gomp_barrier_init (&team->barrier, nthreads);
+@@ -164,10 +171,22 @@ new_team (unsigned nthreads, struct gomp
+ static void
+ free_team (struct gomp_team *team)
+ {
+- free (team->work_shares);
+- gomp_mutex_destroy (&team->work_share_lock);
++ if (__builtin_expect (team->work_shares[0].next_alloc != NULL, 0))
++ {
++ struct gomp_work_share *ws = team->work_shares[0].next_alloc;
++ do
++ {
++ struct gomp_work_share *next_ws = ws->next_alloc;
++ free (ws);
++ ws = next_ws;
++ }
++ while (ws != NULL);
++ }
+ gomp_barrier_destroy (&team->barrier);
+ gomp_sem_destroy (&team->master_release);
++#ifndef HAVE_SYNC_BUILTINS
++ gomp_mutex_destroy (&team->work_share_list_free_lock);
++#endif
+ free (team);
+ }
+
+@@ -176,11 +195,10 @@ free_team (struct gomp_team *team)
+
+ void
+ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
+- struct gomp_work_share *work_share)
++ struct gomp_team *team)
+ {
+ struct gomp_thread_start_data *start_data;
+ struct gomp_thread *thr, *nthr;
+- struct gomp_team *team;
+ bool nested;
+ unsigned i, n, old_threads_used = 0;
+ pthread_attr_t thread_attr, *attr;
+@@ -188,17 +206,18 @@ gomp_team_start (void (*fn) (void *), vo
+ thr = gomp_thread ();
+ nested = thr->ts.team != NULL;
+
+- team = new_team (nthreads, work_share);
+-
+ /* Always save the previous state, even if this isn't a nested team.
+ In particular, we should save any work share state from an outer
+ orphaned work share construct. */
+ team->prev_ts = thr->ts;
+
+ thr->ts.team = team;
+- thr->ts.work_share = work_share;
+ thr->ts.team_id = 0;
+- thr->ts.work_share_generation = 0;
++ thr->ts.work_share = &team->work_shares[0];
++ thr->ts.last_work_share = NULL;
++#ifdef HAVE_SYNC_BUILTINS
++ thr->ts.single_count = 0;
++#endif
+ thr->ts.static_trip = 0;
+
+ if (nthreads == 1)
+@@ -241,9 +260,12 @@ gomp_team_start (void (*fn) (void *), vo
+ {
+ nthr = gomp_threads[i];
+ nthr->ts.team = team;
+- nthr->ts.work_share = work_share;
++ nthr->ts.work_share = &team->work_shares[0];
++ nthr->ts.last_work_share = NULL;
+ nthr->ts.team_id = i;
+- nthr->ts.work_share_generation = 0;
++#ifdef HAVE_SYNC_BUILTINS
++ nthr->ts.single_count = 0;
++#endif
+ nthr->ts.static_trip = 0;
+ nthr->fn = fn;
+ nthr->data = data;
+@@ -266,8 +288,24 @@ gomp_team_start (void (*fn) (void *), vo
+ }
+ }
+
++ if (__builtin_expect (nthreads > old_threads_used, 0))
++ {
++ long diff = (long) nthreads - (long) old_threads_used;
++
++ if (old_threads_used == 0)
++ --diff;
++
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, diff);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads += diff;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
++
+ attr = &gomp_thread_attr;
+- if (gomp_cpu_affinity != NULL)
++ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
+ {
+ size_t stacksize;
+ pthread_attr_init (&thread_attr);
+@@ -287,9 +325,12 @@ gomp_team_start (void (*fn) (void *), vo
+ int err;
+
+ start_data->ts.team = team;
+- start_data->ts.work_share = work_share;
++ start_data->ts.work_share = &team->work_shares[0];
++ start_data->ts.last_work_share = NULL;
+ start_data->ts.team_id = i;
+- start_data->ts.work_share_generation = 0;
++#ifdef HAVE_SYNC_BUILTINS
++ start_data->ts.single_count = 0;
++#endif
+ start_data->ts.static_trip = 0;
+ start_data->fn = fn;
+ start_data->fn_data = data;
+@@ -303,7 +344,7 @@ gomp_team_start (void (*fn) (void *), vo
+ gomp_fatal ("Thread creation failed: %s", strerror (err));
+ }
+
+- if (gomp_cpu_affinity != NULL)
++ if (__builtin_expect (gomp_cpu_affinity != NULL, 0))
+ pthread_attr_destroy (&thread_attr);
+
+ do_release:
+@@ -313,8 +354,20 @@ gomp_team_start (void (*fn) (void *), vo
+ that should arrive back at the end of this team. The extra
+ threads should be exiting. Note that we arrange for this test
+ to never be true for nested teams. */
+- if (nthreads < old_threads_used)
+- gomp_barrier_reinit (&gomp_threads_dock, nthreads);
++ if (__builtin_expect (nthreads < old_threads_used, 0))
++ {
++ long diff = (long) nthreads - (long) old_threads_used;
++
++ gomp_barrier_reinit (&gomp_threads_dock, nthreads);
++
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, diff);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads += diff;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
+ }
+
+
+@@ -329,8 +382,21 @@ gomp_team_end (void)
+
+ gomp_barrier_wait (&team->barrier);
+
++ gomp_fini_work_share (thr->ts.work_share);
++
+ thr->ts = team->prev_ts;
+
++ if (__builtin_expect (thr->ts.team != NULL, 0))
++ {
++#ifdef HAVE_SYNC_BUILTINS
++ __sync_fetch_and_add (&gomp_managed_threads, 1L - team->nthreads);
++#else
++ gomp_mutex_lock (&gomp_remaining_threads_lock);
++ gomp_managed_threads -= team->nthreads - 1L;
++ gomp_mutex_unlock (&gomp_remaining_threads_lock);
++#endif
++ }
++
+ free_team (team);
+ }
+
+--- libgomp/config/posix/bar.h.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/config/posix/bar.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -46,18 +46,32 @@ typedef struct
+ unsigned total;
+ unsigned arrived;
+ } gomp_barrier_t;
++typedef bool gomp_barrier_state_t;
+
+ extern void gomp_barrier_init (gomp_barrier_t *, unsigned);
+ extern void gomp_barrier_reinit (gomp_barrier_t *, unsigned);
+ extern void gomp_barrier_destroy (gomp_barrier_t *);
+
+ extern void gomp_barrier_wait (gomp_barrier_t *);
+-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
++extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
+
+-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
++static inline gomp_barrier_state_t
++gomp_barrier_wait_start (gomp_barrier_t *bar)
+ {
+ gomp_mutex_lock (&bar->mutex1);
+ return ++bar->arrived == bar->total;
+ }
+
++static inline bool
++gomp_barrier_last_thread (gomp_barrier_state_t state)
++{
++ return state;
++}
++
++static inline void
++gomp_barrier_wait_last (gomp_barrier_t *bar)
++{
++ gomp_barrier_wait (bar);
++}
++
+ #endif /* GOMP_BARRIER_H */
+--- libgomp/config/posix/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/posix/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_PTRLOCK_H
++#define GOMP_PTRLOCK_H 1
++
++typedef struct { void *ptr; gomp_mutex_t lock; } gomp_ptrlock_t;
++
++static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ ptrlock->ptr = ptr;
++ gomp_mutex_init (&ptrlock->lock);
++}
++
++static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
++{
++ if (ptrlock->ptr != NULL)
++ return ptrlock->ptr;
++
++ gomp_mutex_lock (&ptrlock->lock);
++ if (ptrlock->ptr != NULL)
++ {
++ gomp_mutex_unlock (&ptrlock->lock);
++ return ptrlock->ptr;
++ }
++
++ return NULL;
++}
++
++static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ ptrlock->ptr = ptr;
++ gomp_mutex_unlock (&ptrlock->lock);
++}
++
++static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
++{
++ gomp_mutex_destroy (&ptrlock->lock);
++}
++
++#endif /* GOMP_PTRLOCK_H */
+--- libgomp/config/posix/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/posix/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1 @@
++/* Everything is in the header. */
+--- libgomp/config/posix/bar.c.jj 2007-12-07 14:41:01.000000000 +0100
++++ libgomp/config/posix/bar.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -70,7 +70,7 @@ gomp_barrier_reinit (gomp_barrier_t *bar
+ }
+
+ void
+-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
++gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t last)
+ {
+ unsigned int n;
+
+--- libgomp/config/linux/alpha/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/alpha/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -30,8 +30,6 @@
+ #ifndef SYS_futex
+ #define SYS_futex 394
+ #endif
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+
+ static inline void
+@@ -45,7 +43,7 @@ futex_wait (int *addr, int val)
+
+ sc_0 = SYS_futex;
+ sc_16 = (long) addr;
+- sc_17 = FUTEX_WAIT;
++ sc_17 = gomp_futex_wait;
+ sc_18 = val;
+ sc_19 = 0;
+ __asm volatile ("callsys"
+@@ -53,6 +51,20 @@ futex_wait (int *addr, int val)
+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18), "1"(sc_19)
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sc_0 = SYS_futex;
++ sc_17 &= ~FUTEX_PRIVATE_FLAG;
++ sc_19 = 0;
++ __asm volatile ("callsys"
++ : "=r" (sc_0), "=r"(sc_19)
++ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18),
++ "1"(sc_19)
++ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
++ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ }
+ }
+
+ static inline void
+@@ -66,11 +78,35 @@ futex_wake (int *addr, int count)
+
+ sc_0 = SYS_futex;
+ sc_16 = (long) addr;
+- sc_17 = FUTEX_WAKE;
++ sc_17 = gomp_futex_wake;
+ sc_18 = count;
+ __asm volatile ("callsys"
+ : "=r" (sc_0), "=r"(sc_19)
+ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ if (__builtin_expect (sc_19, 0) && sc_0 == ENOSYS)
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sc_0 = SYS_futex;
++ sc_17 &= ~FUTEX_PRIVATE_FLAG;
++ __asm volatile ("callsys"
++ : "=r" (sc_0), "=r"(sc_19)
++ : "0"(sc_0), "r" (sc_16), "r"(sc_17), "r"(sc_18)
++ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
++ "$22", "$23", "$24", "$25", "$27", "$28", "memory");
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __asm volatile ("wmb" : : : "memory");
+ }
+--- libgomp/config/linux/affinity.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/affinity.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
++/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -38,9 +38,6 @@
+ #ifdef HAVE_PTHREAD_AFFINITY_NP
+
+ static unsigned int affinity_counter;
+-#ifndef HAVE_SYNC_BUILTINS
+-static gomp_mutex_t affinity_lock;
+-#endif
+
+ void
+ gomp_init_affinity (void)
+@@ -76,9 +73,6 @@ gomp_init_affinity (void)
+ CPU_SET (gomp_cpu_affinity[0], &cpuset);
+ pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
+ affinity_counter = 1;
+-#ifndef HAVE_SYNC_BUILTINS
+- gomp_mutex_init (&affinity_lock);
+-#endif
+ }
+
+ void
+@@ -87,13 +81,7 @@ gomp_init_thread_affinity (pthread_attr_
+ unsigned int cpu;
+ cpu_set_t cpuset;
+
+-#ifdef HAVE_SYNC_BUILTINS
+ cpu = __sync_fetch_and_add (&affinity_counter, 1);
+-#else
+- gomp_mutex_lock (&affinity_lock);
+- cpu = affinity_counter++;
+- gomp_mutex_unlock (&affinity_lock);
+-#endif
+ cpu %= gomp_cpu_affinity_len;
+ CPU_ZERO (&cpuset);
+ CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
+--- libgomp/config/linux/bar.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/bar.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -36,40 +36,49 @@
+
+ typedef struct
+ {
+- gomp_mutex_t mutex;
+- unsigned total;
+- unsigned arrived;
+- int generation;
++ /* Make sure total/generation is in a mostly read cacheline, while
++ awaited in a separate cacheline. */
++ unsigned total __attribute__((aligned (64)));
++ unsigned generation;
++ unsigned awaited __attribute__((aligned (64)));
+ } gomp_barrier_t;
++typedef unsigned int gomp_barrier_state_t;
+
+ static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
+ {
+- gomp_mutex_init (&bar->mutex);
+ bar->total = count;
+- bar->arrived = 0;
++ bar->awaited = count;
+ bar->generation = 0;
+ }
+
+ static inline void gomp_barrier_reinit (gomp_barrier_t *bar, unsigned count)
+ {
+- gomp_mutex_lock (&bar->mutex);
++ __sync_fetch_and_add (&bar->awaited, count - bar->total);
+ bar->total = count;
+- gomp_mutex_unlock (&bar->mutex);
+ }
+
+ static inline void gomp_barrier_destroy (gomp_barrier_t *bar)
+ {
+- /* Before destroying, make sure all threads have left the barrier. */
+- gomp_mutex_lock (&bar->mutex);
+ }
+
+ extern void gomp_barrier_wait (gomp_barrier_t *);
+-extern void gomp_barrier_wait_end (gomp_barrier_t *, bool);
++extern void gomp_barrier_wait_last (gomp_barrier_t *);
++extern void gomp_barrier_wait_end (gomp_barrier_t *, gomp_barrier_state_t);
+
+-static inline bool gomp_barrier_wait_start (gomp_barrier_t *bar)
++static inline gomp_barrier_state_t
++gomp_barrier_wait_start (gomp_barrier_t *bar)
+ {
+- gomp_mutex_lock (&bar->mutex);
+- return ++bar->arrived == bar->total;
++ unsigned int ret = bar->generation;
++ /* Do we need any barrier here or is __sync_add_and_fetch acting
++ as the needed LoadLoad barrier already? */
++ ret += __sync_add_and_fetch (&bar->awaited, -1) == 0;
++ return ret;
++}
++
++static inline bool
++gomp_barrier_last_thread (gomp_barrier_state_t state)
++{
++ return state & 1;
+ }
+
+ #endif /* GOMP_BARRIER_H */
+--- libgomp/config/linux/ptrlock.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/ptrlock.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,65 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_PTRLOCK_H
++#define GOMP_PTRLOCK_H 1
++
++typedef void *gomp_ptrlock_t;
++
++static inline void gomp_ptrlock_init (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ *ptrlock = ptr;
++}
++
++extern void *gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock);
++static inline void *gomp_ptrlock_get (gomp_ptrlock_t *ptrlock)
++{
++ if ((uintptr_t) *ptrlock > 2)
++ return *ptrlock;
++
++ if (__sync_bool_compare_and_swap (ptrlock, NULL, (uintptr_t) 1))
++ return NULL;
++
++ return gomp_ptrlock_get_slow (ptrlock);
++}
++
++extern void gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr);
++static inline void gomp_ptrlock_set (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ if (!__sync_bool_compare_and_swap (ptrlock, (uintptr_t) 1, ptr))
++ gomp_ptrlock_set_slow (ptrlock, ptr);
++}
++
++static inline void gomp_ptrlock_destroy (gomp_ptrlock_t *ptrlock)
++{
++}
++
++#endif /* GOMP_PTRLOCK_H */
+--- libgomp/config/linux/lock.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/lock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -29,11 +29,10 @@
+ primitives. This implementation uses atomic instructions and the futex
+ syscall. */
+
+-#include "libgomp.h"
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/syscall.h>
+-#include "futex.h"
++#include "wait.h"
+
+
+ /* The internal gomp_mutex_t and the external non-recursive omp_lock_t
+@@ -137,7 +136,7 @@ omp_set_nest_lock (omp_nest_lock_t *lock
+ return;
+ }
+
+- futex_wait (&lock->owner, otid);
++ do_wait (&lock->owner, otid);
+ }
+ }
+
+--- libgomp/config/linux/ptrlock.c.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/ptrlock.c 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,70 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#include <endian.h>
++#include <limits.h>
++#include "wait.h"
++
++void *
++gomp_ptrlock_get_slow (gomp_ptrlock_t *ptrlock)
++{
++ int *intptr;
++ __sync_bool_compare_and_swap (ptrlock, 1, 2);
++
++ /* futex works on ints, not pointers.
++ But a valid work share pointer will be at least
++ 8 byte aligned, so it is safe to assume the low
++ 32-bits of the pointer won't contain values 1 or 2. */
++ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
++#if __BYTE_ORDER == __BIG_ENDIAN
++ if (sizeof (*ptrlock) > sizeof (int))
++ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
++#endif
++ do
++ do_wait (intptr, 2);
++ while (*intptr == 2);
++ __asm volatile ("" : : : "memory");
++ return *ptrlock;
++}
++
++void
++gomp_ptrlock_set_slow (gomp_ptrlock_t *ptrlock, void *ptr)
++{
++ int *intptr;
++
++ *ptrlock = ptr;
++ __asm volatile ("" : "=r" (intptr) : "0" (ptrlock));
++#if __BYTE_ORDER == __BIG_ENDIAN
++ if (sizeof (*ptrlock) > sizeof (int))
++ intptr += (sizeof (*ptrlock) / sizeof (int)) - 1;
++#endif
++ futex_wake (intptr, INT_MAX);
++}
+--- libgomp/config/linux/x86/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/x86/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -27,9 +27,6 @@
+
+ /* Provide target-specific access to the futex system call. */
+
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+-
+ #ifdef __LP64__
+ # ifndef SYS_futex
+ # define SYS_futex 202
+@@ -38,14 +35,26 @@
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- register long r10 __asm__("%r10") = 0;
++ register long r10 __asm__("%r10");
+ long res;
+
++ r10 = 0;
+ __asm volatile ("syscall"
+ : "=a" (res)
+- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAIT),
+- "d"(val), "r"(r10)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
++ "d" (val), "r" (r10)
+ : "r11", "rcx", "memory");
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ r10 = 0;
++ __asm volatile ("syscall"
++ : "=a" (res)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wait),
++ "d" (val), "r" (r10)
++ : "r11", "rcx", "memory");
++ }
+ }
+
+ static inline void
+@@ -55,8 +64,19 @@ futex_wake (int *addr, int count)
+
+ __asm volatile ("syscall"
+ : "=a" (res)
+- : "0"(SYS_futex), "D" (addr), "S"(FUTEX_WAKE), "d"(count)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
++ "d" (count)
+ : "r11", "rcx", "memory");
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ __asm volatile ("syscall"
++ : "=a" (res)
++ : "0" (SYS_futex), "D" (addr), "S" (gomp_futex_wake),
++ "d" (count)
++ : "r11", "rcx", "memory");
++ }
+ }
+ #else
+ # ifndef SYS_futex
+@@ -65,7 +85,7 @@ futex_wake (int *addr, int count)
+
+ # ifdef __PIC__
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ long res;
+@@ -77,11 +97,12 @@ sys_futex0 (int *addr, int op, int val)
+ : "0"(SYS_futex), "r" (addr), "c"(op),
+ "d"(val), "S"(0)
+ : "memory");
++ return res;
+ }
+
+ # else
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ long res;
+@@ -91,6 +112,7 @@ sys_futex0 (int *addr, int op, int val)
+ : "0"(SYS_futex), "b" (addr), "c"(op),
+ "d"(val), "S"(0)
+ : "memory");
++ return res;
+ }
+
+ # endif /* __PIC__ */
+@@ -98,13 +120,37 @@ sys_futex0 (int *addr, int op, int val)
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long res = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long res = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (res == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
+ }
+
+ #endif /* __LP64__ */
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("rep; nop" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
++}
+--- libgomp/config/linux/wait.h.jj 2008-03-26 15:11:32.000000000 +0100
++++ libgomp/config/linux/wait.h 2008-03-26 15:11:32.000000000 +0100
+@@ -0,0 +1,68 @@
++/* Copyright (C) 2008 Free Software Foundation, Inc.
++ Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++ This file is part of the GNU OpenMP Library (libgomp).
++
++ Libgomp is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Lesser General Public License as published by
++ the Free Software Foundation; either version 2.1 of the License, or
++ (at your option) any later version.
++
++ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
++ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
++ more details.
++
++ You should have received a copy of the GNU Lesser General Public License
++ along with libgomp; see the file COPYING.LIB. If not, write to the
++ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301, USA. */
++
++/* As a special exception, if you link this library with other files, some
++ of which are compiled with GCC, to produce an executable, this library
++ does not by itself cause the resulting executable to be covered by the
++ GNU General Public License. This exception does not however invalidate
++ any other reasons why the executable file might be covered by the GNU
++ General Public License. */
++
++/* This is a Linux specific implementation of a mutex synchronization
++ mechanism for libgomp. This type is private to the library. This
++ implementation uses atomic instructions and the futex syscall. */
++
++#ifndef GOMP_WAIT_H
++#define GOMP_WAIT_H 1
++
++#include "libgomp.h"
++#include <errno.h>
++
++#define FUTEX_WAIT 0
++#define FUTEX_WAKE 1
++#define FUTEX_PRIVATE_FLAG 128L
++
++#ifdef HAVE_ATTRIBUTE_VISIBILITY
++# pragma GCC visibility push(hidden)
++#endif
++
++extern long int gomp_futex_wait, gomp_futex_wake;
++
++#include "futex.h"
++
++static inline void do_wait (int *addr, int val)
++{
++ unsigned long long i, count = gomp_spin_count_var;
++
++ if (__builtin_expect (gomp_managed_threads > gomp_available_cpus, 0))
++ count = gomp_throttled_spin_count_var;
++ for (i = 0; i < count; i++)
++ if (__builtin_expect (*addr != val, 0))
++ return;
++ else
++ cpu_relax ();
++ futex_wait (addr, val);
++}
++
++#ifdef HAVE_ATTRIBUTE_VISIBILITY
++# pragma GCC visibility pop
++#endif
++
++#endif /* GOMP_WAIT_H */
+--- libgomp/config/linux/sparc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/sparc/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int g1 __asm__ ("g1");
+@@ -47,9 +45,9 @@ sys_futex0 (int *addr, int op, int val)
+ o3 = 0;
+
+ #ifdef __arch64__
+-# define SYSCALL_STRING "ta\t0x6d"
++# define SYSCALL_STRING "ta\t0x6d; bcs,a,pt %%xcc, 1f; sub %%g0, %%o0, %%o0; 1:"
+ #else
+-# define SYSCALL_STRING "ta\t0x10"
++# define SYSCALL_STRING "ta\t0x10; bcs,a 1f; sub %%g0, %%o0, %%o0; 1:"
+ #endif
+
+ __asm volatile (SYSCALL_STRING
+@@ -65,16 +63,49 @@ sys_futex0 (int *addr, int op, int val)
+ "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",
+ #endif
+ "cc", "memory");
++ return o0;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++#if defined __arch64__ || defined __sparc_v9__
++ __asm volatile ("membar #LoadLoad" : : : "memory");
++#else
++ __asm volatile ("" : : : "memory");
++#endif
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++#if defined __arch64__ || defined __sparc_v9__
++ __asm volatile ("membar #StoreStore" : : : "memory");
++#else
++ __sync_synchronize ();
++#endif
+ }
+--- libgomp/config/linux/ia64/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/ia64/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,23 +29,24 @@
+
+ #include <sys/syscall.h>
+
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+
+-static inline void
+-sys_futex0(int *addr, int op, int val)
++static inline long
++sys_futex0(int *addr, long op, int val)
+ {
+ register long out0 asm ("out0") = (long) addr;
+ register long out1 asm ("out1") = op;
+ register long out2 asm ("out2") = val;
+ register long out3 asm ("out3") = 0;
++ register long r8 asm ("r8");
++ register long r10 asm ("r10");
+ register long r15 asm ("r15") = SYS_futex;
+
+ __asm __volatile ("break 0x100000"
+- : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3)
++ : "=r"(r15), "=r"(out0), "=r"(out1), "=r"(out2), "=r"(out3),
++ "=r"(r8), "=r"(r10)
+ : "r"(r15), "r"(out0), "r"(out1), "r"(out2), "r"(out3)
+- : "memory", "r8", "r10", "out4", "out5", "out6", "out7",
++ : "memory", "out4", "out5", "out6", "out7",
+ /* Non-stacked integer registers, minus r8, r10, r15. */
+ "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18",
+ "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27",
+@@ -56,16 +57,41 @@ sys_futex0(int *addr, int op, int val)
+ "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
+ /* Branch registers. */
+ "b6");
++ return r8 & r10;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("hint @pause" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
+ }
+--- libgomp/config/linux/s390/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/s390/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int gpr2 __asm__ ("2");
+@@ -49,16 +47,41 @@ sys_futex0 (int *addr, int op, int val)
+ : "i" (SYS_futex),
+ "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
+ : "memory");
++ return gpr2;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == -ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __sync_synchronize ();
+ }
+--- libgomp/config/linux/mutex.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/mutex.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,9 +29,10 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
++#include "wait.h"
+
++long int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
++long int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
+
+ void
+ gomp_mutex_lock_slow (gomp_mutex_t *mutex)
+@@ -40,7 +41,7 @@ gomp_mutex_lock_slow (gomp_mutex_t *mute
+ {
+ int oldval = __sync_val_compare_and_swap (mutex, 1, 2);
+ if (oldval != 0)
+- futex_wait (mutex, 2);
++ do_wait (mutex, 2);
+ }
+ while (!__sync_bool_compare_and_swap (mutex, 0, 2));
+ }
+--- libgomp/config/linux/sem.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/sem.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,8 +29,7 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
++#include "wait.h"
+
+
+ void
+@@ -44,7 +43,7 @@ gomp_sem_wait_slow (gomp_sem_t *sem)
+ if (__sync_bool_compare_and_swap (sem, val, val - 1))
+ return;
+ }
+- futex_wait (sem, -1);
++ do_wait (sem, -1);
+ }
+ }
+
+--- libgomp/config/linux/powerpc/futex.h.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/powerpc/futex.h 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -28,10 +28,8 @@
+ /* Provide target-specific access to the futex system call. */
+
+ #include <sys/syscall.h>
+-#define FUTEX_WAIT 0
+-#define FUTEX_WAKE 1
+
+-static inline void
++static inline long
+ sys_futex0 (int *addr, int op, int val)
+ {
+ register long int r0 __asm__ ("r0");
+@@ -50,21 +48,48 @@ sys_futex0 (int *addr, int op, int val)
+ doesn't. It doesn't much matter for us. In the interest of unity,
+ go ahead and clobber it always. */
+
+- __asm volatile ("sc"
++ __asm volatile ("sc; mfcr %0"
+ : "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6)
+ : "r"(r0), "r"(r3), "r"(r4), "r"(r5), "r"(r6)
+ : "r7", "r8", "r9", "r10", "r11", "r12",
+ "cr0", "ctr", "memory");
++ if (__builtin_expect (r0 & (1 << 28), 0))
++ return r3;
++ return 0;
+ }
+
+ static inline void
+ futex_wait (int *addr, int val)
+ {
+- sys_futex0 (addr, FUTEX_WAIT, val);
++ long err = sys_futex0 (addr, gomp_futex_wait, val);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wait, val);
++ }
+ }
+
+ static inline void
+ futex_wake (int *addr, int count)
+ {
+- sys_futex0 (addr, FUTEX_WAKE, count);
++ long err = sys_futex0 (addr, gomp_futex_wake, count);
++ if (__builtin_expect (err == ENOSYS, 0))
++ {
++ gomp_futex_wait &= ~FUTEX_PRIVATE_FLAG;
++ gomp_futex_wake &= ~FUTEX_PRIVATE_FLAG;
++ sys_futex0 (addr, gomp_futex_wake, count);
++ }
++}
++
++static inline void
++cpu_relax (void)
++{
++ __asm volatile ("" : : : "memory");
++}
++
++static inline void
++atomic_write_barrier (void)
++{
++ __asm volatile ("eieio" : : : "memory");
+ }
+--- libgomp/config/linux/bar.c.jj 2007-12-07 14:41:00.000000000 +0100
++++ libgomp/config/linux/bar.c 2008-03-26 15:11:32.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005 Free Software Foundation, Inc.
++/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ This file is part of the GNU OpenMP Library (libgomp).
+@@ -29,32 +29,29 @@
+ mechanism for libgomp. This type is private to the library. This
+ implementation uses atomic instructions and the futex syscall. */
+
+-#include "libgomp.h"
+-#include "futex.h"
+ #include <limits.h>
++#include "wait.h"
+
+
+ void
+-gomp_barrier_wait_end (gomp_barrier_t *bar, bool last)
++gomp_barrier_wait_end (gomp_barrier_t *bar, gomp_barrier_state_t state)
+ {
+- if (last)
++ if (__builtin_expect ((state & 1) != 0, 0))
+ {
+- bar->generation++;
+- futex_wake (&bar->generation, INT_MAX);
++ /* Next time we'll be awaiting TOTAL threads again. */
++ bar->awaited = bar->total;
++ atomic_write_barrier ();
++ bar->generation += 2;
++ futex_wake ((int *) &bar->generation, INT_MAX);
+ }
+ else
+ {
+- unsigned int generation = bar->generation;
+-
+- gomp_mutex_unlock (&bar->mutex);
++ unsigned int generation = state;
+
+ do
+- futex_wait (&bar->generation, generation);
++ do_wait ((int *) &bar->generation, generation);
+ while (bar->generation == generation);
+ }
+-
+- if (__sync_add_and_fetch (&bar->arrived, -1) == 0)
+- gomp_mutex_unlock (&bar->mutex);
+ }
+
+ void
+@@ -62,3 +59,18 @@ gomp_barrier_wait (gomp_barrier_t *barri
+ {
+ gomp_barrier_wait_end (barrier, gomp_barrier_wait_start (barrier));
+ }
++
++/* Like gomp_barrier_wait, except that if the encountering thread
++ is not the last one to hit the barrier, it returns immediately.
++ The intended usage is that a thread which intends to gomp_barrier_destroy
++ this barrier calls gomp_barrier_wait, while all other threads
++ call gomp_barrier_wait_last. When gomp_barrier_wait returns,
++ the barrier can be safely destroyed. */
++
++void
++gomp_barrier_wait_last (gomp_barrier_t *barrier)
++{
++ gomp_barrier_state_t state = gomp_barrier_wait_start (barrier);
++ if (state & 1)
++ gomp_barrier_wait_end (barrier, state);
++}
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 0000000..3de4158
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-ppc32-retaddr.patch
@@ -0,0 +1,90 @@
+2005-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
+ read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
+ instead of doing an extran indirection from frame_pointer_rtx.
+
+ * gcc.dg/20051128-1.c: New test.
+
+Index: gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc/config/rs6000/rs6000.c.orig 2010-03-27 03:27:39.000000000 -0700
++++ gcc/config/rs6000/rs6000.c 2010-06-25 10:18:04.053381930 -0700
+@@ -17646,17 +17646,22 @@
+ don't try to be too clever here. */
+ if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
+ {
++ rtx x;
+ cfun->machine->ra_needs_full_frame = 1;
+
+- return
+- gen_rtx_MEM
+- (Pmode,
+- memory_address
+- (Pmode,
+- plus_constant (copy_to_reg
+- (gen_rtx_MEM (Pmode,
+- memory_address (Pmode, frame))),
+- RETURN_ADDRESS_OFFSET)));
++ if (count == 0)
++ {
++ gcc_assert (frame == frame_pointer_rtx);
++ x = arg_pointer_rtx;
++ }
++ else
++ {
++ x = memory_address (Pmode, frame);
++ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
++ }
++
++ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
++ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
+ }
+
+ cfun->machine->ra_need_lr = 1;
+Index: gcc/testsuite/gcc.dg/20051128-1.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/20051128-1.c 2010-06-25 10:18:04.061382856 -0700
+@@ -0,0 +1,41 @@
++/* { dg-do run } */
++/* { dg-options "-O2 -fpic" } */
++
++extern void exit (int);
++extern void abort (void);
++
++int b;
++
++struct A
++{
++ void *pad[147];
++ void *ra, *h;
++ long o;
++};
++
++void
++__attribute__((noinline))
++foo (struct A *a, void *x)
++{
++ __builtin_memset (a, 0, sizeof (a));
++ if (!b)
++ exit (0);
++}
++
++void
++__attribute__((noinline))
++bar (void)
++{
++ struct A a;
++
++ __builtin_unwind_init ();
++ foo (&a, __builtin_return_address (0));
++}
++
++int
++main (void)
++{
++ bar ();
++ abort ();
++ return 0;
++}
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 0000000..172bb81
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr27898.patch
@@ -0,0 +1,16 @@
+2006-08-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/27898
+ * gcc.dg/pr27898.c: New test.
+
+--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
++++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
+@@ -0,0 +1,8 @@
++/* PR c/27898 */
++/* { dg-do compile } */
++/* { dg-options "--combine" } */
++/* { dg-additional-sources "pr27898.c" } */
++
++union u { struct { int i; }; };
++
++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 0000000..f356967
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr32139.patch
@@ -0,0 +1,19 @@
+2007-06-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/32139
+ * gcc.c-torture/compile/20070531-1.c: New test.
+
+--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
++++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
+@@ -0,0 +1,11 @@
++/* PR tree-optimization/32139 */
++int foo (void);
++int bar (void) __attribute__ ((const));
++
++int
++test (int x)
++{
++ int a = (x == 10000 ? foo : bar) ();
++ int b = (x == 10000 ? foo : bar) ();
++ return a + b;
++}
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 0000000..68c3065
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-pr33763.patch
@@ -0,0 +1,159 @@
+2007-11-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/33763
+ * gcc.dg/pr33763.c: New test.
+ * g++.dg/opt/inline13.C: New test.
+
+2007-11-06 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/33763
+ * tree-inline.c (expand_call_inline): Silently ignore always_inline
+ attribute for redefined extern inline functions.
+
+Index: gcc/tree-inline.c
+===================================================================
+--- gcc/tree-inline.c.orig 2010-03-18 13:07:13.000000000 -0700
++++ gcc/tree-inline.c 2010-06-25 10:18:51.230139825 -0700
+@@ -3545,6 +3545,12 @@
+ goto egress;
+
+ if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
++ /* For extern inline functions that get redefined we always
++ silently ignored alway_inline flag. Better behaviour would
++ be to be able to keep both bodies and use extern inline body
++ for inlining, but we can't do that because frontends overwrite
++ the body. */
++ && !cg_edge->callee->local.redefined_extern_inline
+ /* Avoid warnings during early inline pass. */
+ && cgraph_global_info_ready)
+ {
+Index: gcc/testsuite/gcc.dg/pr33763.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/pr33763.c 2010-06-25 10:18:51.234141302 -0700
+@@ -0,0 +1,60 @@
++/* PR tree-optimization/33763 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef struct
++{
++ void *a;
++ void *b;
++} T;
++extern void *foo (const char *, const char *);
++extern void *bar (void *, const char *, T);
++extern int baz (const char *, int);
++
++extern inline __attribute__ ((always_inline, gnu_inline)) int
++baz (const char *x, int y)
++{
++ return 2;
++}
++
++int
++baz (const char *x, int y)
++{
++ return 1;
++}
++
++int xa, xb;
++
++static void *
++inl (const char *x, const char *y)
++{
++ T t = { &xa, &xb };
++ int *f = (int *) __builtin_malloc (sizeof (int));
++ const char *z;
++ int o = 0;
++ void *r = 0;
++
++ for (z = y; *z; z++)
++ {
++ if (*z == 'r')
++ o |= 1;
++ if (*z == 'w')
++ o |= 2;
++ }
++ if (o == 1)
++ *f = baz (x, 0);
++ if (o == 2)
++ *f = baz (x, 1);
++ if (o == 3)
++ *f = baz (x, 2);
++
++ if (o && *f > 0)
++ r = bar (f, "w", t);
++ return r;
++}
++
++void *
++foo (const char *x, const char *y)
++{
++ return inl (x, y);
++}
+Index: gcc/testsuite/g++.dg/opt/inline13.C
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/g++.dg/opt/inline13.C 2010-06-25 10:18:51.261052137 -0700
+@@ -0,0 +1,60 @@
++// PR tree-optimization/33763
++// { dg-do compile }
++// { dg-options "-O2" }
++
++typedef struct
++{
++ void *a;
++ void *b;
++} T;
++extern void *foo (const char *, const char *);
++extern void *bar (void *, const char *, T);
++extern int baz (const char *, int);
++
++extern inline __attribute__ ((always_inline, gnu_inline)) int
++baz (const char *x, int y)
++{
++ return 2;
++}
++
++int
++baz (const char *x, int y)
++{
++ return 1;
++}
++
++int xa, xb;
++
++static void *
++inl (const char *x, const char *y)
++{
++ T t = { &xa, &xb };
++ int *f = (int *) __builtin_malloc (sizeof (int));
++ const char *z;
++ int o = 0;
++ void *r = 0;
++
++ for (z = y; *z; z++)
++ {
++ if (*z == 'r')
++ o |= 1;
++ if (*z == 'w')
++ o |= 2;
++ }
++ if (o == 1)
++ *f = baz (x, 0);
++ if (o == 2)
++ *f = baz (x, 1);
++ if (o == 3)
++ *f = baz (x, 2);
++
++ if (o && *f > 0)
++ r = bar (f, "w", t);
++ return r;
++}
++
++void *
++foo (const char *x, const char *y)
++{
++ return inl (x, y);
++}
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 0000000..e96ae6f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh251682.patch
@@ -0,0 +1,89 @@
+2008-04-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR pch/13675
+ * files.c (struct _cpp_file): Remove pch field.
+ (pch_open_file): Don't set file->pch, just file->pchname.
+ (should_stack_file): After pfile->cb.read_pch call
+ free pchname and clear pchname, don't close file->fd.
+ Test file->pchname instead of file->pch. Don't close fd after cb.
+ (_cpp_stack_include): Test file->pchname instead of file->pch.
+
+ * c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
+
+--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
++++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
+@@ -106,9 +106,6 @@ struct _cpp_file
+
+ /* If BUFFER above contains the true contents of the file. */
+ bool buffer_valid;
+-
+- /* File is a PCH (on return from find_include_file). */
+- bool pch;
+ };
+
+ /* A singly-linked list for all searches for a given file name, with
+@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
+ }
+ closedir (pchdir);
+ }
+- if (valid)
+- file->pch = true;
+- else
++ if (!valid)
+ *invalid_pch = true;
+ }
+
+@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
+ return false;
+
+ /* Handle PCH files immediately; don't stack them. */
+- if (file->pch)
++ if (file->pchname)
+ {
+ pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
+- close (file->fd);
+ file->fd = -1;
++ free ((void *) file->pchname);
++ file->pchname = NULL;
+ return false;
+ }
+
+@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
+ complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
+ found a PCH file (in which case linemap_add is not called) or we
+ were included from the command-line. */
+- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
++ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
+ pfile->line_table->highest_location--;
+
+ return _cpp_stack_file (pfile, file, type == IT_IMPORT);
+--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
++++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
+@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
+ if (f == NULL)
+ {
+ cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
++ close (fd);
+ return;
+ }
+
+@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
+ if (fread (&h, sizeof (h), 1, f) != 1)
+ {
+ cpp_errno (pfile, CPP_DL_ERROR, "reading");
++ fclose (f);
+ return;
+ }
+
+@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
+ gt_pch_restore (f);
+
+ if (cpp_read_state (pfile, name, f, smd) != 0)
+- return;
++ {
++ fclose (f);
++ return;
++ }
+
+ fclose (f);
+
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 0000000..4888ac4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh330771.patch
@@ -0,0 +1,31 @@
+2007-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.am (libgcj_tools_la_LIBADD): Add.
+ * Makefile.in: Regenerated.
+
+Index: libjava/Makefile.am
+===================================================================
+--- libjava/Makefile.am.orig 2010-03-21 12:41:37.000000000 -0700
++++ libjava/Makefile.am 2010-06-25 10:22:11.394130458 -0700
+@@ -507,6 +507,8 @@
+ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
+ -fno-bootstrap-classes -fno-indirect-classes \
+ -fsource-filename=$(here)/classpath/tools/all-classes.lst
++## See jv_convert_LDADD.
++libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
+ libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
+ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
+Index: libjava/Makefile.in
+===================================================================
+--- libjava/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
++++ libjava/Makefile.in 2010-06-25 10:27:41.841708512 -0700
+@@ -1190,7 +1190,7 @@
+ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
+
+-libgcj_tools_la_LIBADD = libgcj.la -lm
++libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la -lm
+ libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec $(am__append_22)
+ libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS)
+ 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 0000000..7e2801b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fedora/gcc43-rh341221.patch
@@ -0,0 +1,32 @@
+2007-10-21 Jakub Jelinek <jakub@redhat.com>
+
+ * doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
+ timestamp rather than from current date.
+ * doc/Makefile.in: Regenerated.
+
+Index: libjava/classpath/doc/Makefile.am
+===================================================================
+--- libjava/classpath/doc/Makefile.am.orig 2008-10-21 10:55:01.000000000 -0700
++++ libjava/classpath/doc/Makefile.am 2010-06-25 10:28:30.237631599 -0700
+@@ -31,7 +31,7 @@
+ gtnameserv.1 \
+ gjdoc.1
+
+-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
++POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+ STAMP = echo timestamp >
+
+Index: libjava/classpath/doc/Makefile.in
+===================================================================
+--- libjava/classpath/doc/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
++++ libjava/classpath/doc/Makefile.in 2010-06-25 10:28:30.245635728 -0700
+@@ -376,7 +376,7 @@
+ gtnameserv.1 \
+ gjdoc.1
+
+-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
++POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+ STAMP = echo timestamp >
+ @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 0000000..348c770
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+ used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+ directory.
+
+Index: gcc-4.5+svnr155514/libgfortran/configure
+===================================================================
+--- gcc-4.5+svnr155514.orig/libgfortran/configure 2009-12-29 22:02:01.000000000 -0800
++++ gcc-4.5+svnr155514/libgfortran/configure 2009-12-30 08:12:40.889091657 -0800
+@@ -11655,7 +11655,7 @@ CC="$lt_save_CC"
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${ac_fc_srcext-f}
+ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+Index: gcc-4.5+svnr155514/libgfortran/configure.ac
+===================================================================
+--- gcc-4.5+svnr155514.orig/libgfortran/configure.ac 2009-12-29 22:02:01.000000000 -0800
++++ gcc-4.5+svnr155514/libgfortran/configure.ac 2009-12-30 08:12:13.453094218 -0800
+@@ -187,7 +187,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # 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 0000000..d1df8b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,319 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+---
+ gcc/config.gcc | 2
+ gcc/config/rs6000/e300c2c3.md | 189 ++++++++++++++++++++++++++++++++++++++++++
+ gcc/config/rs6000/rs6000.c | 24 +++++
+ gcc/config/rs6000/rs6000.h | 4
+ gcc/config/rs6000/rs6000.md | 3
+ 5 files changed, 220 insertions(+), 2 deletions(-)
+
+Index: gcc-4.3.1/gcc/config/rs6000/e300c2c3.md
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/gcc/config/rs6000/e300c2c3.md 2008-08-23 16:51:33.000000000 -0700
+@@ -0,0 +1,189 @@
++;; Pipeline description for Motorola PowerPC e300c3 core.
++;; Copyright (C) 2003 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++
++;; GCC is free software; you can redistribute it and/or modify it
++;; under the terms of the GNU General Public License as published
++;; by the Free Software Foundation; either version 2, or (at your
++;; option) any later version.
++
++;; GCC is distributed in the hope that it will be useful, but WITHOUT
++;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
++;; License for more details.
++
++;; You should have received a copy of the GNU General Public License
++;; along with GCC; see the file COPYING. If not, write to the
++;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
++;; MA 02111-1307, USA.
++
++(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
++(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
++
++;; We don't simulate general issue queue (GIC). If we have SU insn
++;; and then SU1 insn, they can not be issued on the same cycle
++;; (although SU1 insn and then SU insn can be issued) because the SU
++;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
++;; multipass insn scheduling will find the situation and issue the SU1
++;; insn and then the SU insn.
++(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
++
++;; We could describe completion buffers slots in combination with the
++;; retirement units and the order of completion but the result
++;; automaton would behave in the same way because we can not describe
++;; real latency time with taking in order completion into account.
++;; Actually we could define the real latency time by querying reserved
++;; automaton units but the current scheduler uses latency time before
++;; issuing insns and making any reservations.
++;;
++;; So our description is aimed to achieve a insn schedule in which the
++;; insns would not wait in the completion buffer.
++(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
++
++;; Branch unit:
++(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
++
++;; IU:
++(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
++
++;; IU: This used to describe non-pipelined division.
++(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
++
++;; SRU:
++(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
++
++;; Here we simplified LSU unit description not describing the stages.
++(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
++
++;; FPU:
++(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
++
++;; The following units are used to make automata deterministic
++(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
++(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
++
++;; The following sets to make automata deterministic when option ndfa is used.
++(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
++(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
++(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
++(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
++
++;; Some useful abbreviations.
++(define_reservation "ppce300c3_decode"
++ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
++(define_reservation "ppce300c3_issue"
++ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
++(define_reservation "ppce300c3_retire"
++ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
++(define_reservation "ppce300c3_iu_stage0"
++ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
++
++;; Compares can be executed either one of the IU or SRU
++(define_insn_reservation "ppce300c3_cmp" 1
++ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
++ +ppce300c3_retire")
++
++;; Other one cycle IU insns
++(define_insn_reservation "ppce300c3_iu" 1
++ (and (eq_attr "type" "integer,insert_word")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Branch. Actually this latency time is not used by the scheduler.
++(define_insn_reservation "ppce300c3_branch" 1
++ (and (eq_attr "type" "jmpreg,branch")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
++
++;; Multiply is non-pipelined but can be executed in any IU
++(define_insn_reservation "ppce300c3_multiply" 2
++ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
++ ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Divide. We use the average latency time here. We omit reserving a
++;; retire unit because of the result automata will be huge.
++(define_insn_reservation "ppce300c3_divide" 20
++ (and (eq_attr "type" "idiv")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
++ ppce300c3_mu_div*19")
++
++;; CR logical
++(define_insn_reservation "ppce300c3_cr_logical" 1
++ (and (eq_attr "type" "cr_logical,delayed_cr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mfcr
++(define_insn_reservation "ppce300c3_mfcr" 1
++ (and (eq_attr "type" "mfcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtcrf
++(define_insn_reservation "ppce300c3_mtcrf" 1
++ (and (eq_attr "type" "mtcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtjmpr
++(define_insn_reservation "ppce300c3_mtjmpr" 1
++ (and (eq_attr "type" "mtjmpr,mfjmpr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Float point instructions
++(define_insn_reservation "ppce300c3_fpcompare" 3
++ (and (eq_attr "type" "fpcompare")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fp" 3
++ (and (eq_attr "type" "fp")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_dmul" 4
++ (and (eq_attr "type" "dmul")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
++
++; Divides are not pipelined
++(define_insn_reservation "ppce300c3_sdiv" 18
++ (and (eq_attr "type" "sdiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
++
++(define_insn_reservation "ppce300c3_ddiv" 33
++ (and (eq_attr "type" "ddiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
++
++;; Loads
++(define_insn_reservation "ppce300c3_load" 2
++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpload" 2
++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++;; Stores.
++(define_insn_reservation "ppce300c3_store" 2
++ (and (eq_attr "type" "store,store_ux,store_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpstore" 2
++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.c 2008-08-23 16:49:39.000000000 -0700
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.c 2008-08-23 16:54:25.000000000 -0700
+@@ -669,6 +669,21 @@ struct processor_costs ppc8540_cost = {
+ 1, /* prefetch streams /*/
+ };
+
++/* Instruction costs on E300C2 and E300C3 cores. */
++static const
++struct processor_costs ppce300c2c3_cost = {
++ COSTS_N_INSNS (4), /* mulsi */
++ COSTS_N_INSNS (4), /* mulsi_const */
++ COSTS_N_INSNS (4), /* mulsi_const9 */
++ COSTS_N_INSNS (4), /* muldi */
++ COSTS_N_INSNS (19), /* divsi */
++ COSTS_N_INSNS (19), /* divdi */
++ COSTS_N_INSNS (3), /* fp */
++ COSTS_N_INSNS (4), /* dmul */
++ COSTS_N_INSNS (18), /* sdiv */
++ COSTS_N_INSNS (33), /* ddiv */
++};
++
+ /* Instruction costs on POWER4 and POWER5 processors. */
+ static const
+ struct processor_costs power4_cost = {
+@@ -1420,6 +1435,8 @@ rs6000_override_options (const char *def
+ {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
+ /* 8548 has a dummy entry for now. */
+ {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_STRICT_ALIGN},
++ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
++ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
+ {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
+ {"970", PROCESSOR_POWER4,
+ POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
+@@ -1845,6 +1862,11 @@ rs6000_override_options (const char *def
+ rs6000_cost = &ppc8540_cost;
+ break;
+
++ case PROCESSOR_PPCE300C2:
++ case PROCESSOR_PPCE300C3:
++ rs6000_cost = &ppce300c2c3_cost;
++ break;
++
+ case PROCESSOR_POWER4:
+ case PROCESSOR_POWER5:
+ rs6000_cost = &power4_cost;
+@@ -18606,6 +18628,8 @@ rs6000_issue_rate (void)
+ case CPU_PPC7400:
+ case CPU_PPC8540:
+ case CPU_CELL:
++ case CPU_PPCE300C2:
++ case CPU_PPCE300C3:
+ return 2;
+ case CPU_RIOS2:
+ case CPU_PPC604:
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.h 2008-01-26 09:18:35.000000000 -0800
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.h 2008-08-23 16:55:30.000000000 -0700
+@@ -117,6 +117,8 @@
+ %{mcpu=G5: -mpower4 -maltivec} \
+ %{mcpu=8540: -me500} \
+ %{mcpu=8548: -me500} \
++%{mcpu=e300c2: -mppc} \
++%{mcpu=e300c3: -mppc -mpmr} \
+ %{maltivec: -maltivec} \
+ -many"
+
+@@ -262,6 +264,8 @@ enum processor_type
+ PROCESSOR_PPC7400,
+ PROCESSOR_PPC7450,
+ PROCESSOR_PPC8540,
++ PROCESSOR_PPCE300C2,
++ PROCESSOR_PPCE300C3,
+ PROCESSOR_POWER4,
+ PROCESSOR_POWER5,
+ PROCESSOR_POWER6,
+Index: gcc-4.3.1/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-4.3.1.orig/gcc/config/rs6000/rs6000.md 2008-02-13 16:14:45.000000000 -0800
++++ gcc-4.3.1/gcc/config/rs6000/rs6000.md 2008-08-23 16:57:29.000000000 -0700
+@@ -133,7 +133,7 @@
+ ;; Processor type -- this attribute must exactly match the processor_type
+ ;; enumeration in rs6000.h.
+
+-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,cell"
++(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"
+ (const (symbol_ref "rs6000_cpu_attr")))
+
+
+@@ -166,6 +166,7 @@
+ (include "7xx.md")
+ (include "7450.md")
+ (include "8540.md")
++(include "e300c2c3.md")
+ (include "power4.md")
+ (include "power5.md")
+ (include "power6.md")
+Index: gcc-4.3.1/gcc/config.gcc
+===================================================================
+--- gcc-4.3.1.orig/gcc/config.gcc 2008-08-23 16:49:43.000000000 -0700
++++ gcc-4.3.1/gcc/config.gcc 2008-08-23 17:03:55.000000000 -0700
+@@ -3144,7 +3144,7 @@ case "${target}" in
+ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
+ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
+ | 601 | 602 | 603 | 603e | ec603e | 604 \
+- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
++ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
+ | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
+ # OK
+ ;;
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 0000000..f33e6c1
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,31 @@
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: gcc-4.3.1/configure.ac
+===================================================================
+--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700
++++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700
+@@ -2352,7 +2352,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+Index: gcc-4.3.1/configure
+===================================================================
+--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700
++++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700
+@@ -5841,7 +5841,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ 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 0000000..af0b81b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,114 @@
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This 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.
+
+Other changes I had to do include:
+
+- 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.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I 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.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Paolo
+
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ PR bootstrap/32161
+
+ * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
+ * configure: Regenerate.
+
+ * Makefile.def: Define stage_libcflags for all bootstrap stages.
+ * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
+ STAGE4_LIBCFLAGS): New.
+ (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
+ $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
+ (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
+ (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
+ (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
+ for target modules. Don't export LIBCFLAGS.
+ (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
+ $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
+ the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+ (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
+ $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
+ * Makefile.in: Regenerate.
+
+config:
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * mh-ppc-darwin (BOOT_CFLAGS): Reenable.
+
+gcc:
+2008-02-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * doc/install.texi: Correct references to CFLAGS, replacing them
+ with BOOT_CFLAGS. Document flags used during bootstrap for
+ target libraries.
+
+
+---
+ Makefile.def | 25
+ Makefile.in | 1845 ++++++++++++++++++++++++++++++-------------------
+ Makefile.tpl | 91 +-
+ config/mh-ppc-darwin | 3
+ configure | 36
+ configure.ac | 32
+ gcc/Makefile.in | 2
+ gcc/configure | 6
+ gcc/configure.ac | 3
+ gcc/doc/install.texi | 56 -
+ libiberty/Makefile.in | 162 ++--
+ libiberty/configure | 46 -
+ libiberty/configure.ac | 43 -
+ 13 files changed, 1454 insertions(+), 896 deletions(-)
+
+Index: gcc-4.5.0/configure
+===================================================================
+--- gcc-4.5.0.orig/configure 2010-06-25 14:51:59.409382073 -0700
++++ gcc-4.5.0/configure 2010-06-25 14:52:35.157132702 -0700
+@@ -7130,6 +7130,38 @@
+ fi
+
+
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++ CFLAGS_FOR_TARGET=$CFLAGS
++ case " $CFLAGS " in
++ *" -O2 "*) ;;
++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++ esac
++ case " $CFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++ esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++ CXXFLAGS_FOR_TARGET=$CXXFLAGS
++ case " $CXXFLAGS " in
++ *" -O2 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++ esac
++ case " $CXXFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++ esac
++fi
++
++
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ 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 0000000..d37a2c0
--- /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 0000000..280b903
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-arm-frename-registers.patch
@@ -0,0 +1,25 @@
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35964
+Index: gcc-4.3.0/gcc/regrename.c
+===================================================================
+--- gcc-4.3.0.orig/gcc/regrename.c 2008-05-28 08:31:15.000000000 -0700
++++ gcc-4.3.0/gcc/regrename.c 2008-05-28 08:34:00.000000000 -0700
+@@ -782,6 +782,10 @@
+ || (predicated && recog_data.operand_type[i] == OP_OUT))
+ recog_data.operand_type[i] = OP_INOUT;
+ }
++ /* Unshare dup_loc RTL */
++ for (i = 0; i < recog_data.n_dups; i++)
++ *recog_data.dup_loc[i] = copy_rtx(*recog_data.dup_loc[i]);
++
+
+ /* Step 1: Close chains for which we have overlapping reads. */
+ for (i = 0; i < n_ops; i++)
+@@ -813,7 +817,7 @@
+ OP_IN, 0);
+
+ for (i = 0; i < recog_data.n_dups; i++)
+- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
++ *recog_data.dup_loc[i] = old_dups[i];
+ for (i = 0; i < n_ops; i++)
+ *recog_data.operand_loc[i] = old_operands[i];
+ 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 0000000..5189285
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-flags-for-build.patch
@@ -0,0 +1,178 @@
+Index: gcc-4.5/Makefile.def
+===================================================================
+--- gcc-4.5.orig/Makefile.def
++++ gcc-4.5/Makefile.def
+@@ -240,6 +240,7 @@ flags_to_pass = { flag= AWK ; };
+ flags_to_pass = { flag= BISON ; };
+ flags_to_pass = { flag= CC_FOR_BUILD ; };
+ flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
++flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
+ flags_to_pass = { flag= CXX_FOR_BUILD ; };
+ flags_to_pass = { flag= EXPECT ; };
+ flags_to_pass = { flag= FLEX ; };
+Index: gcc-4.5/gcc/Makefile.in
+===================================================================
+--- gcc-4.5.orig/gcc/Makefile.in
++++ gcc-4.5/gcc/Makefile.in
+@@ -766,7 +766,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
+
+ # Native linker and preprocessor flags. For x-fragment overrides.
+ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
++BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS)
+
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+Index: gcc-4.5/gcc/configure.ac
+===================================================================
+--- gcc-4.5.orig/gcc/configure.ac
++++ gcc-4.5/gcc/configure.ac
+@@ -1798,16 +1798,18 @@ AC_SUBST(inhibit_libc)
+ # Also, we cannot run fixincludes.
+
+ # These are the normal (build=host) settings:
+-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
+-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
+-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
+-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
++CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
++BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
++BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS)
++STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+
+ # And these apply if build != host, or we are generating coverage data
+ if test x$build != x$host || test "x$coverage_flags" != x
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
+ fi
+
+ # Expand extra_headers to include complete path.
+Index: gcc-4.5/Makefile.in
+===================================================================
+--- gcc-4.5.orig/Makefile.in
++++ gcc-4.5/Makefile.in
+@@ -333,6 +333,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
+ AS_FOR_BUILD = @AS_FOR_BUILD@
+ CC_FOR_BUILD = @CC_FOR_BUILD@
+ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
+ CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
+@@ -662,6 +663,7 @@ BASE_FLAGS_TO_PASS = \
+ "BISON=$(BISON)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
++ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
+Index: gcc-4.5/gcc/configure
+===================================================================
+--- gcc-4.5.orig/gcc/configure
++++ gcc-4.5/gcc/configure
+@@ -707,6 +707,7 @@ SED
+ LIBTOOL
+ collect2
+ STMP_FIXINC
++BUILD_CPPFLAGS
+ BUILD_LDFLAGS
+ BUILD_CFLAGS
+ CC_FOR_BUILD
+@@ -10982,6 +10983,7 @@ fi
+ CC_FOR_BUILD='$(CC)'
+ BUILD_CFLAGS='$(ALL_CFLAGS)'
+ BUILD_LDFLAGS='$(LDFLAGS)'
++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)'
+ STMP_FIXINC=stmp-fixinc
+
+ # And these apply if build != host, or we are generating coverage data
+@@ -10989,6 +10991,7 @@ if test x$build != x$host || test "x$cov
+ then
+ BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
+ fi
+
+ # Expand extra_headers to include complete path.
+@@ -17108,7 +17111,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17111 "configure"
++#line 17114 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -17214,7 +17217,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17217 "configure"
++#line 17220 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+Index: gcc-4.5/Makefile.tpl
+===================================================================
+--- gcc-4.5.orig/Makefile.tpl
++++ gcc-4.5/Makefile.tpl
+@@ -336,6 +336,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
+ AS_FOR_BUILD = @AS_FOR_BUILD@
+ CC_FOR_BUILD = @CC_FOR_BUILD@
+ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
+ CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
+Index: gcc-4.5/configure
+===================================================================
+--- gcc-4.5.orig/configure
++++ gcc-4.5/configure
+@@ -651,6 +651,7 @@ GCJ_FOR_BUILD
+ DLLTOOL_FOR_BUILD
+ CXX_FOR_BUILD
+ CXXFLAGS_FOR_BUILD
++CPPFLAGS_FOR_BUILD
+ CFLAGS_FOR_BUILD
+ CC_FOR_BUILD
+ AS_FOR_BUILD
+@@ -8036,6 +8037,7 @@ esac
+ # our build compiler if desired.
+ if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+ fi
+@@ -8101,6 +8103,7 @@ done
+
+
+
++
+
+
+
+Index: gcc-4.5/configure.ac
+===================================================================
+--- gcc-4.5.orig/configure.ac
++++ gcc-4.5/configure.ac
+@@ -3089,6 +3089,7 @@ esac
+ # our build compiler if desired.
+ if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+ fi
+@@ -3155,6 +3156,7 @@ AC_SUBST(AR_FOR_BUILD)
+ AC_SUBST(AS_FOR_BUILD)
+ AC_SUBST(CC_FOR_BUILD)
+ AC_SUBST(CFLAGS_FOR_BUILD)
++AC_SUBST(CPPFLAGS_FOR_BUILD)
+ AC_SUBST(CXXFLAGS_FOR_BUILD)
+ AC_SUBST(CXX_FOR_BUILD)
+ 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 0000000..84c5ef2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-ice-hack.dpatch
@@ -0,0 +1,331 @@
+#! /bin/sh -e
+
+# DP: Retry the build on an ice, save the calling options and preprocessed
+# DP: source when the ice is reproducible.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2004-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ * system.h (ICE_EXIT_CODE): Define.
+ * gcc.c (execute): Don't free first string early, but at the end
+ of the function. Call retry_ice if compiler exited with
+ ICE_EXIT_CODE.
+ (retry_ice): New function.
+ * diagnostic.c (diagnostic_count_diagnostic,
+ diagnostic_action_after_output, error_recursion): Exit with
+ ICE_EXIT_CODE instead of FATAL_EXIT_CODE.
+
+--- gcc/diagnostic.c.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/diagnostic.c 2007-09-30 10:49:57.000000000 +0000
+@@ -244,7 +244,7 @@
+ fnotice (stderr, "Please submit a full bug report,\n"
+ "with preprocessed source if appropriate.\n"
+ "See %s for instructions.\n", bug_report_url);
+- exit (ICE_EXIT_CODE);
++ exit (FATAL_EXIT_CODE);
+
+ case DK_FATAL:
+ if (context->abort_on_error)
+--- gcc/gcc.c.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/gcc.c 2007-09-30 10:48:39.000000000 +0000
+@@ -357,6 +357,9 @@
+ #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
+ static const char *convert_filename (const char *, int, int);
+ #endif
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++static void retry_ice (const char *prog, const char **argv);
++#endif
+
+ static const char *getenv_spec_function (int, const char **);
+ static const char *if_exists_spec_function (int, const char **);
+@@ -2999,7 +3002,7 @@
+ }
+ }
+
+- if (string != commands[i].prog)
++ if (i && string != commands[i].prog)
+ free (CONST_CAST (char *, string));
+ }
+
+@@ -3056,6 +3059,16 @@
+ else if (WIFEXITED (status)
+ && WEXITSTATUS (status) >= MIN_FATAL_STATUS)
+ {
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++ /* For ICEs in cc1, cc1obj, cc1plus see if it is
++ reproducible or not. */
++ char *p;
++ if (WEXITSTATUS (status) == ICE_EXIT_CODE
++ && i == 0
++ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
++ && ! strncmp (p + 1, "cc1", 3))
++ retry_ice (commands[0].prog, commands[0].argv);
++#endif
+ if (WEXITSTATUS (status) > greatest_status)
+ greatest_status = WEXITSTATUS (status);
+ ret_code = -1;
+@@ -3076,6 +3089,9 @@
+ }
+ }
+
++ if (commands[0].argv[0] != commands[0].prog)
++ free ((PTR) commands[0].argv[0]);
++
+ return ret_code;
+ }
+ }
+@@ -6016,6 +6032,224 @@
+ switches[switchnum].validated = 1;
+ }
+
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS))
++#define RETRY_ICE_ATTEMPTS 2
++
++static void
++retry_ice (const char *prog, const char **argv)
++{
++ int nargs, out_arg = -1, quiet = 0, attempt;
++ int pid, retries, sleep_interval;
++ const char **new_argv;
++ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2];
++
++ if (input_filename == NULL || ! strcmp (input_filename, "-"))
++ return;
++
++ for (nargs = 0; argv[nargs] != NULL; ++nargs)
++ /* Only retry compiler ICEs, not preprocessor ones. */
++ if (! strcmp (argv[nargs], "-E"))
++ return;
++ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o')
++ {
++ if (out_arg == -1)
++ out_arg = nargs;
++ else
++ return;
++ }
++ /* If the compiler is going to output any time information,
++ it might vary between invocations. */
++ else if (! strcmp (argv[nargs], "-quiet"))
++ quiet = 1;
++ else if (! strcmp (argv[nargs], "-ftime-report"))
++ return;
++
++ if (out_arg == -1 || !quiet)
++ return;
++
++ memset (temp_filenames, '\0', sizeof (temp_filenames));
++ new_argv = alloca ((nargs + 3) * sizeof (const char *));
++ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *));
++ new_argv[nargs++] = "-frandom-seed=0";
++ new_argv[nargs] = NULL;
++ if (new_argv[out_arg][2] == '\0')
++ new_argv[out_arg + 1] = "-";
++ else
++ new_argv[out_arg] = "-o-";
++
++ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt)
++ {
++ int fd = -1;
++ int status;
++
++ temp_filenames[attempt * 2] = make_temp_file (".out");
++ temp_filenames[attempt * 2 + 1] = make_temp_file (".err");
++
++ if (attempt == RETRY_ICE_ATTEMPTS)
++ {
++ int i;
++ int fd1, fd2;
++ struct stat st1, st2;
++ size_t n, len;
++ char *buf;
++
++ buf = xmalloc (8192);
++
++ for (i = 0; i < 2; ++i)
++ {
++ fd1 = open (temp_filenames[i], O_RDONLY);
++ fd2 = open (temp_filenames[2 + i], O_RDONLY);
++
++ if (fd1 < 0 || fd2 < 0)
++ {
++ i = -1;
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0)
++ {
++ i = -1;
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ if (st1.st_size != st2.st_size)
++ {
++ close (fd1);
++ close (fd2);
++ break;
++ }
++
++ len = 0;
++ for (n = st1.st_size; n; n -= len)
++ {
++ len = n;
++ if (len > 4096)
++ len = 4096;
++
++ if (read (fd1, buf, len) != (int) len
++ || read (fd2, buf + 4096, len) != (int) len)
++ {
++ i = -1;
++ break;
++ }
++
++ if (memcmp (buf, buf + 4096, len) != 0)
++ break;
++ }
++
++ close (fd1);
++ close (fd2);
++
++ if (n)
++ break;
++ }
++
++ free (buf);
++ if (i == -1)
++ break;
++
++ if (i != 2)
++ {
++ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
++ break;
++ }
++
++ fd = open (temp_filenames[attempt * 2], O_RDWR);
++ if (fd < 0)
++ break;
++ write (fd, "//", 2);
++ for (i = 0; i < nargs; i++)
++ {
++ write (fd, " ", 1);
++ write (fd, new_argv[i], strlen (new_argv[i]));
++ }
++ write (fd, "\n", 1);
++ new_argv[nargs] = "-E";
++ new_argv[nargs + 1] = NULL;
++ }
++
++ /* Fork a subprocess; wait and retry if it fails. */
++ sleep_interval = 1;
++ pid = -1;
++ for (retries = 0; retries < 4; retries++)
++ {
++ pid = fork ();
++ if (pid >= 0)
++ break;
++ sleep (sleep_interval);
++ sleep_interval *= 2;
++ }
++
++ if (pid < 0)
++ break;
++ else if (pid == 0)
++ {
++ if (attempt != RETRY_ICE_ATTEMPTS)
++ fd = open (temp_filenames[attempt * 2], O_RDWR);
++ if (fd < 0)
++ exit (-1);
++ if (fd != 1)
++ {
++ close (1);
++ dup (fd);
++ close (fd);
++ }
++
++ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR);
++ if (fd < 0)
++ exit (-1);
++ if (fd != 2)
++ {
++ close (2);
++ dup (fd);
++ close (fd);
++ }
++
++ if (prog == new_argv[0])
++ execvp (prog, (char *const *) new_argv);
++ else
++ execv (new_argv[0], (char *const *) new_argv);
++ exit (-1);
++ }
++
++ if (waitpid (pid, &status, 0) < 0)
++ break;
++
++ if (attempt < RETRY_ICE_ATTEMPTS
++ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE))
++ {
++ notice ("The bug is not reproducible, so it is likely a hardware or OS problem.\n");
++ break;
++ }
++ else if (attempt == RETRY_ICE_ATTEMPTS)
++ {
++ close (fd);
++ if (WIFEXITED (status)
++ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
++ {
++ notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
++ temp_filenames[attempt * 2]);
++ /* Make sure it is not deleted. */
++ free (temp_filenames[attempt * 2]);
++ temp_filenames[attempt * 2] = NULL;
++ break;
++ }
++ }
++ }
++
++ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++)
++ if (temp_filenames[attempt])
++ {
++ unlink (temp_filenames[attempt]);
++ free (temp_filenames[attempt]);
++ }
++}
++#endif
++
+ /* Search for a file named NAME trying various prefixes including the
+ user's -B prefix and some standard ones.
+ Return the absolute file name found. If nothing is found, return NAME. */
+--- gcc/Makefile.in.orig 2007-09-30 10:48:13.000000000 +0000
++++ gcc/Makefile.in 2007-09-30 10:48:39.000000000 +0000
+@@ -192,6 +192,7 @@
+ build/gengtype-lex.o-warn = -Wno-error
+ # SYSCALLS.c misses prototypes
+ SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
++build/gcc.o-warn = -Wno-error
+
+ # All warnings have to be shut off in stage1 if the compiler used then
+ # 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 0000000..e68a2de
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-poison-system-directories.patch
@@ -0,0 +1,149 @@
+ gcc/
+ 2008-07-02 Joseph Myers <joseph@codesourcery.com>
+ * c-incpath.c: Include toplev.h.
+ (merge_include_chains): Use warning instead of cpp_error for
+ system directory poisoning diagnostic.
+ * Makefile.in (c-incpath.o): Depend on toplev.h.
+ * gcc.c (LINK_COMMAND_SPEC): Pass
+ --error-poison-system-directories if
+ -Werror=poison-system-directories.
+
+ 2007-06-13 Joseph Myers <joseph@codesourcery.com>
+ * common.opt (--Wno-poison-system-directories): New.
+ * doc/invoke.texi (-Wno-poison-system-directories): Document.
+ * c-incpath.c: Include flags.h.
+ (merge_include_chains): Check flag_poison_system_directories.
+ * gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories
+ to linker if -Wno-poison-system-directories.
+ * Makefile.in (c-incpath.o): Depend on $(FLAGS_H).
+
+ 2007-03-20 Daniel Jacobowitz <dan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ * configure.ac (--enable-poison-system-directories): New option.
+ * configure, config.in: Regenerate.
+ * c-incpath.c (merge_include_chains): If
+ ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of
+ /usr/include, /usr/local/include or /usr/X11R6/include.
+
+Index: gcc-4.5.0/gcc/common.opt
+===================================================================
+--- gcc-4.5.0.orig/gcc/common.opt 2010-03-17 20:01:09.000000000 -0700
++++ gcc-4.5.0/gcc/common.opt 2010-06-25 11:35:39.965383734 -0700
+@@ -152,6 +152,10 @@
+ Common Var(warn_padded) Warning
+ Warn when padding is required to align structure members
+
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1)
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one local variable shadows another
+Index: gcc-4.5.0/gcc/config.in
+===================================================================
+--- gcc-4.5.0.orig/gcc/config.in 2010-04-14 02:30:07.000000000 -0700
++++ gcc-4.5.0/gcc/config.in 2010-06-25 11:35:39.969383588 -0700
+@@ -132,6 +132,12 @@
+ #endif
+
+
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+ optimizer and back end) to be checked for dynamic type safety at runtime.
+ This is quite expensive. */
+Index: gcc-4.5.0/gcc/configure.ac
+===================================================================
+--- gcc-4.5.0.orig/gcc/configure.ac 2010-06-25 11:34:01.433382161 -0700
++++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:35:39.969383588 -0700
+@@ -4276,6 +4276,16 @@
+ fi)
+ AC_SUBST(slibdir)
+
++AC_ARG_ENABLE([poison-system-directories],
++ AS_HELP_STRING([--enable-poison-system-directories],
++ [warn for use of native system header directories]),,
++ [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++ [1],
++ [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+Index: gcc-4.5.0/gcc/doc/invoke.texi
+===================================================================
+--- gcc-4.5.0.orig/gcc/doc/invoke.texi 2010-04-06 07:02:22.000000000 -0700
++++ gcc-4.5.0/gcc/doc/invoke.texi 2010-06-25 11:35:39.992666345 -0700
+@@ -252,6 +252,7 @@
+ -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
+ -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
+ -Wpointer-arith -Wno-pointer-to-int-cast @gol
++-Wno-poison-system-directories @gol
+ -Wredundant-decls @gol
+ -Wreturn-type -Wsequence-point -Wshadow @gol
+ -Wsign-compare -Wsign-conversion -Wstack-protector @gol
+@@ -3603,6 +3604,14 @@
+ option will @emph{not} warn about unknown pragmas in system
+ headers---for that, @option{-Wunknown-pragmas} must also be used.
+
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling. This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+Index: gcc-4.5.0/gcc/gcc.c
+===================================================================
+--- gcc-4.5.0.orig/gcc/gcc.c 2010-02-11 04:23:08.000000000 -0800
++++ gcc-4.5.0/gcc/gcc.c 2010-06-25 11:35:40.009381858 -0700
+@@ -792,6 +792,8 @@
+ %{flto} %{fwhopr} %l " LINK_PIE_SPEC \
+ "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
+ %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
++ %{Wno-poison-system-directories:--no-poison-system-directories}\
++ %{Werror=poison-system-directories:--error-poison-system-directories}\
+ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
+ %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
+Index: gcc-4.5.0/gcc/incpath.c
+===================================================================
+--- gcc-4.5.0.orig/gcc/incpath.c 2009-11-25 02:55:54.000000000 -0800
++++ gcc-4.5.0/gcc/incpath.c 2010-06-25 11:35:40.017209818 -0700
+@@ -353,6 +353,24 @@
+ }
+ fprintf (stderr, _("End of search list.\n"));
+ }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++ if (flag_poison_system_directories)
++ {
++ struct cpp_dir *p;
++
++ for (p = heads[QUOTE]; p; p = p->next)
++ {
++ if ((!strncmp (p->name, "/usr/include", 12))
++ || (!strncmp (p->name, "/usr/local/include", 18))
++ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++ warning (OPT_Wpoison_system_directories,
++ "include location \"%s\" is unsafe for "
++ "cross-compilation",
++ p->name);
++ }
++ }
++#endif
+ }
+
+ /* 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 0000000..61c883e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-pr43698-arm-rev-instr.patch
@@ -0,0 +1,117 @@
+backport http://gcc.gnu.org/viewcvs?view=revision&revision=162404
+from trunk
+
+Which fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43698
+
+2010-07-22 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR target/43698
+ * config/arm/arm.md: Split arm_rev into *arm_rev
+ and *thumb1_rev. Set *arm_rev to be predicable.
+
+2010-07-22 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR target/43698
+ * gcc.target/arm/pr43698.c: New test.
+
+
+/scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+Usage: date [OPTION]... [+FORMAT]
+Display the current time in the given FORMAT.
+
+ -d, --date=STRING display time described by STRING, not `now'
+ -f, --file=DATEFILE like --date once for each line of DATEFILE
+ -R, --rfc-822 output RFC-822 compliant date string
+ -u, --utc, --universal print or set Coordinated Universal Time
+ --help display this help and exit
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /bin/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /bin/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /bin/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /scratch/oe/sysroots/i686-linux/usr/share/quilt/compat/date
+date is /bin/date
+date
+Khem
+Index: gcc-4.5/gcc/config/arm/arm.md
+===================================================================
+--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-07-20 20:31:25.000000000 -0700
++++ gcc-4.5/gcc/config/arm/arm.md 2010-07-22 14:55:54.303169081 -0700
+@@ -11197,15 +11197,21 @@
+ (set_attr "length" "4")]
+ )
+
+-(define_insn "arm_rev"
++(define_insn "*arm_rev"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
+- "TARGET_EITHER && arm_arch6"
+- "rev\t%0, %1"
+- [(set (attr "length")
+- (if_then_else (eq_attr "is_thumb" "yes")
+- (const_int 2)
+- (const_int 4)))]
++ "TARGET_32BIT && arm_arch6"
++ "rev%?\t%0, %1"
++ [(set_attr "predicable" "yes")
++ (set_attr "length" "4")]
++)
++
++(define_insn "*thumb1_rev"
++ [(set (match_operand:SI 0 "s_register_operand" "=l")
++ (bswap:SI (match_operand:SI 1 "s_register_operand" "l")))]
++ "TARGET_THUMB1 && arm_arch6"
++ "rev\t%0, %1"
++ [(set_attr "length" "2")]
+ )
+
+ (define_expand "arm_legacy_rev"
+Index: gcc-4.5/gcc/testsuite/gcc.target/arm/pr43698.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.5/gcc/testsuite/gcc.target/arm/pr43698.c 2010-07-22 14:56:35.406670213 -0700
+@@ -0,0 +1,39 @@
++/* { dg-do run } */
++/* { dg-options "-Os -march=armv7-a" } */
++#include <stdint.h>
++#include <stdlib.h>
++
++
++char do_reverse_endian = 0;
++
++# define bswap_32(x) \
++ ((((x) & 0xff000000) >> 24) | \
++ (((x) & 0x00ff0000) >> 8) | \
++ (((x) & 0x0000ff00) << 8) | \
++ (((x) & 0x000000ff) << 24))
++
++#define EGET(X) \
++ (__extension__ ({ \
++ uint64_t __res; \
++ if (!do_reverse_endian) { __res = (X); \
++ } else if (sizeof(X) == 4) { __res = bswap_32((X)); \
++ } \
++ __res; \
++ }))
++
++void __attribute__((noinline)) X(char **phdr, char **data, int *phoff)
++{
++ *phdr = *data + EGET(*phoff);
++}
++
++int main()
++{
++ char *phdr;
++ char *data = (char *)0x40164000;
++ int phoff = 0x34;
++ X(&phdr, &data, &phoff);
++ if (phdr != (char *)0x40164034)
++ abort ();
++ exit (0);
++}
++
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 0000000..4f94fc9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,67 @@
+Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h
+===================================================================
+--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:30:53.993316002 -0700
++++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:31:26.043316001 -0700
+@@ -41,12 +41,17 @@
+
+ #include <clocale>
+ #include <cstddef>
++#include <features.h>
++#include <ctype.h>
+
+ #define _GLIBCXX_NUM_CATEGORIES 0
+
+ _GLIBCXX_BEGIN_NAMESPACE(std)
+-
+- typedef int* __c_locale;
++#ifdef __UCLIBC__
++ typedef __ctype_touplow_t* __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
+
+ // Convert numeric value of type double and long double to string and
+ // return length of string. If vsnprintf is available use it, otherwise
+Index: gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+===================================================================
+--- gcc-4.5.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:30:54.013316002 -0700
++++ gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:31:26.053316001 -0700
+@@ -33,14 +33,21 @@
+ */
+
+ // Information as gleaned from /usr/include/ctype.h
+-
++
++#include <features.h>
++#include <ctype.h>
++
+ _GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// @brief Base class for ctype.
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+- typedef const int* __to_type;
++#ifdef __UCLIBC__
++ typedef const __ctype_touplow_t* __to_type;
++#else
++ typedef const int* __to_type;
++#endif
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc
+===================================================================
+--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-28 12:12:42.000000000 -0700
++++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-30 22:31:26.063316001 -0700
+@@ -256,5 +256,10 @@ _GLIBCXX_END_NAMESPACE
+ #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+ #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+ extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
++#ifdef __UCLIBC__
++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
++#else
+ _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
++#endif
+ #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 0000000..5f134ef
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/gcc_revert_base_version_to_4.5.0.patch
@@ -0,0 +1,9 @@
+the svn patch changed the BASE-VER to 4.5.1, bring it back to 4.5.0
+- Nitin A Kamble nitin.a.kamble@intel.com
+- 2010/07/20
+
+--- gcc-4.5.0/gcc/BASE-VER 2010-07-20 00:57:37.000000000 -0700
++++ gcc-4.5.0.new/gcc/BASE-VER 2010-07-20 01:06:17.000000000 -0700
+@@ -1 +1 @@
+-4.5.1
++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 0000000..ada36a5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-emit-__cxa_end_cleanup-in-text.patch
@@ -0,0 +1,40 @@
+2010-06-07 Khem Raj <raj.khem@gmail.com>
+
+ * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection
+ to emit inline assembly into .text section.
+
+Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc
+===================================================================
+--- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-04 23:20:18.000000000 -0700
++++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-08 11:27:34.247541722 -0700
+@@ -157,22 +157,26 @@ __gnu_end_cleanup(void)
+ // Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
+ // Also push r4 to preserve stack alignment.
+ #ifdef __thumb__
+-asm (".global __cxa_end_cleanup\n"
++asm (" .pushsection .text.__cxa_end_cleanup\n"
++" .global __cxa_end_cleanup\n"
+ " .type __cxa_end_cleanup, \"function\"\n"
+ " .thumb_func\n"
+ "__cxa_end_cleanup:\n"
+ " push\t{r1, r2, r3, r4}\n"
+ " bl\t__gnu_end_cleanup\n"
+ " pop\t{r1, r2, r3, r4}\n"
+-" bl\t_Unwind_Resume @ Never returns\n");
++" bl\t_Unwind_Resume @ Never returns\n"
++" .popsection\n");
+ #else
+-asm (".global __cxa_end_cleanup\n"
++asm (" .pushsection .text.__cxa_end_cleanup\n"
++" .global __cxa_end_cleanup\n"
+ " .type __cxa_end_cleanup, \"function\"\n"
+ "__cxa_end_cleanup:\n"
+ " stmfd\tsp!, {r1, r2, r3, r4}\n"
+ " bl\t__gnu_end_cleanup\n"
+ " ldmfd\tsp!, {r1, r2, r3, r4}\n"
+-" bl\t_Unwind_Resume @ Never returns\n");
++" bl\t_Unwind_Resume @ Never returns\n"
++" .popsection\n");
+ #endif
+
+ #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 0000000..70c9e81
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/libstdc++-pic.dpatch
@@ -0,0 +1,71 @@
+#! /bin/sh -e
+
+# DP: Build and install libstdc++_pic.a library.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
+--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
++++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
+@@ -210,6 +210,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
+--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
++++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
+@@ -611,7 +611,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -644,6 +644,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -729,6 +730,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/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 0000000..0f74353
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/optional_libstdc.patch
@@ -0,0 +1,23 @@
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since my default the linker will try and link against libstdc++
+which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch
+adds such an option which only disables the -lstdc++ linkage.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Index: gcc-4.3.3/gcc/cp/g++spec.c
+===================================================================
+--- gcc-4.3.3.orig/gcc/cp/g++spec.c 2010-06-29 00:06:03.901695025 +0100
++++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
+@@ -131,6 +131,7 @@
+ if (argv[i][0] == '-')
+ {
+ if (strcmp (argv[i], "-nostdlib") == 0
++ || strcmp (argv[i], "-nostdlib++") == 0
+ || strcmp (argv[i], "-nodefaultlibs") == 0)
+ {
+ 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 0000000..b20fdf5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/pr30961.dpatch
@@ -0,0 +1,179 @@
+#! /bin/sh -e
+
+# DP: <your description>
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+From: "H.J. Lu" <hjl@lucon.org>
+Sender: gcc-patches-owner@gcc.gnu.org
+To: gcc-patches@gcc.gnu.org
+Subject: PATCH: PR target/30961: [4.1/4.2/4.3 regression] redundant reg/mem stores/moves
+Date: Mon, 27 Aug 2007 11:34:12 -0700
+
+We start with
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn:HI 6 3 10 2 c.c:3 (set (reg:DF 58 [ <result> ])
+ (subreg:DF (reg/v:DI 59 [ in ]) 0)) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg/v:DI 59 [ in ])
+ (nil)))
+
+(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
+ (reg:DF 58 [ <result> ])) 102 {*movdf_integer_rex64} (expr_list:REG_DEAD (reg:DF 58 [ <result> ])
+ (nil)))
+
+(insn:HI 16 10 0 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+we are trying to allocate registers for insn 6 and we allocate
+xmm0 for the return value. Reload doesn't check if xmm0 can be used for
+DF 59, it allocates xmm1 for DF 59 and generates:
+
+Reloads for insn # 6
+Reload 0: reload_in (DF) = (reg:DF 5 di)
+ SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
+ reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
+ reload_reg_rtx: (reg:DF 22 xmm1)
+...
+
+(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
+ (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 23 22 6 2 c.c:3 (set (reg:DF 22 xmm1)
+ (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 6 23 16 2 c.c:3 (set (reg:DF 21 xmm0 [orig:58 <result> ] [58])
+ (reg:DF 22 xmm1)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 16 6 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+This patch tries to use the destination register when reloading for input. It
+generates
+
+Reloads for insn # 6
+Reload 0: reload_in (DF) = (reg:DF 5 di)
+ SSE_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine
+ reload_in_reg: (subreg:DF (reg/v:DI 5 di [orig:59 in ] [59]) 0)
+ reload_reg_rtx: (reg:DF 21 xmm0)
+...
+(note:HI 4 1 3 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
+
+(note:HI 3 4 22 2 NOTE_INSN_FUNCTION_BEG)
+
+(insn 22 3 23 2 c.c:3 (set (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])
+ (reg:DF 5 di)) 102 {*movdf_integer_rex64} (nil))
+
+(insn 23 22 6 2 c.c:3 (set (reg:DF 21 xmm0)
+ (mem/c:DF (plus:DI (reg/f:DI 7 sp)
+ (const_int -8 [0xfffffffffffffff8])) [0 S8 A8])) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 6 23 10 2 c.c:3 (set (reg:DF 22 xmm1 [orig:58 <result> ] [58])
+ (reg:DF 21 xmm0)) 102 {*movdf_integer_rex64} (nil))
+
+(insn:HI 10 6 16 2 c.c:7 (set (reg/i:DF 21 xmm0 [ <result> ])
+ (reg:DF 22 xmm1 [orig:58 <result> ] [58])) 102 {*movdf_integer_rex64} (nil))
+
+(insn 16 10 21 2 c.c:7 (use (reg/i:DF 21 xmm0 [ <result> ])) -1 (nil))
+
+
+H.J.
+----
+gcc/
+
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/30961
+ * reload1.c (find_reg): Favor the hard register in destination
+ if it is usable and a memory location is needed for reload
+ input.
+
+gcc/testsuite/
+
+2007-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/30961
+ * gcc.target/i386/pr30961-1.c: New.
+
+--- gcc/reload1.c.second 2007-08-27 09:35:08.000000000 -0700
++++ gcc/reload1.c 2007-08-27 09:36:33.000000000 -0700
+@@ -1781,6 +1781,20 @@ find_reg (struct insn_chain *chain, int
+ HARD_REG_SET not_usable;
+ HARD_REG_SET used_by_other_reload;
+ reg_set_iterator rsi;
++#ifdef SECONDARY_MEMORY_NEEDED
++ rtx body = PATTERN (chain->insn);
++ unsigned int dest_reg = FIRST_PSEUDO_REGISTER;
++
++ if (GET_CODE (body) == SET)
++ {
++ rtx dest = SET_DEST (body);
++
++ if ((REG_P (dest)
++ || (GET_CODE (dest) == SUBREG
++ && REG_P (SUBREG_REG (dest)))))
++ dest_reg = reg_or_subregno (dest);
++ }
++#endif
+
+ COPY_HARD_REG_SET (not_usable, bad_spill_regs);
+ IOR_HARD_REG_SET (not_usable, bad_spill_regs_global);
+@@ -1821,6 +1835,18 @@ find_reg (struct insn_chain *chain, int
+ this_cost--;
+ if (rl->out && REG_P (rl->out) && REGNO (rl->out) == regno)
+ this_cost--;
++#ifdef SECONDARY_MEMORY_NEEDED
++ /* If a memory location is needed for rl->in and dest_reg
++ is usable, we will favor it. */
++ else if (dest_reg == regno
++ && rl->in
++ && REG_P (rl->in)
++ && REGNO (rl->in) < FIRST_PSEUDO_REGISTER
++ && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (rl->in)),
++ rl->class,
++ rl->mode))
++ this_cost = 0;
++#endif
+ if (this_cost < best_cost
+ /* Among registers with equal cost, prefer caller-saved ones, or
+ use REG_ALLOC_ORDER if it is defined. */
+--- gcc/testsuite/gcc.target/i386/pr30961-1.c.second 2007-08-27 11:01:59.000000000 -0700
++++ gcc/testsuite/gcc.target/i386/pr30961-1.c 2007-08-27 11:02:51.000000000 -0700
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-require-effective-target lp64 } */
++/* { dg-options "-O2" } */
++
++double
++convert (long long in)
++{
++ double f;
++ __builtin_memcpy( &f, &in, sizeof( in ) );
++ return f;
++}
++
++/* { 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 0000000..da610f5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/pr35942.patch
@@ -0,0 +1,38 @@
+Fix PR 35942: remove -lstdc++ from libtool postdeps for CXX.
+
+libstdc++-v3/ChangeLog:
+2010-01-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR libstdc++/35942
+ * configure.ac: Remove -lstdc++ from libtool's postdeps_CXX.
+ * configure: Regenerate.
+
+
+Index: gcc-4.3.3/libstdc++-v3/configure
+===================================================================
+--- gcc-4.3.3.orig/libstdc++-v3/configure 2010-03-26 17:57:51.000000000 +0000
++++ gcc-4.3.3/libstdc++-v3/configure 2010-03-26 17:57:58.000000000 +0000
+@@ -13759,6 +13759,9 @@
+
+
+
++# Eliminate -lstdc++ addition to postdeps for cross compiles.
++postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
++
+ # Possibly disable most of the library.
+ ## TODO: Consider skipping unncessary tests altogether in this case, rather
+ ## than just ignoring the results. Faster /and/ more correct, win win.
+Index: gcc-4.3.3/libstdc++-v3/configure.ac
+===================================================================
+--- gcc-4.3.3.orig/libstdc++-v3/configure.ac 2010-03-26 17:57:54.000000000 +0000
++++ gcc-4.3.3/libstdc++-v3/configure.ac 2010-03-26 17:57:58.000000000 +0000
+@@ -89,6 +89,9 @@
+ AC_SUBST(enable_shared)
+ AC_SUBST(enable_static)
+
++# Eliminate -lstdc++ addition to postdeps for cross compiles.
++postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
++
+ # Possibly disable most of the library.
+ ## TODO: Consider skipping unncessary tests altogether in this case, rather
+ ## 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 0000000..4ccf35f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.4+svnr145550/gcc/incpath.c
+===================================================================
+--- gcc-4.4+svnr145550.orig/gcc/incpath.c 2009-04-04 13:48:31.000000000 -0700
++++ gcc-4.4+svnr145550/gcc/incpath.c 2009-04-04 14:49:29.000000000 -0700
+@@ -417,6 +417,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
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 0000000..4b827d6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch
@@ -0,0 +1,28 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+Index: gcc-4.5.0/Makefile.in
+===================================================================
+--- gcc-4.5.0.orig/Makefile.in 2010-02-17 03:01:44.000000000 -0800
++++ gcc-4.5.0/Makefile.in 2010-06-25 11:22:08.421381364 -0700
+@@ -266,6 +266,7 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+Index: gcc-4.5.0/Makefile.tpl
+===================================================================
+--- gcc-4.5.0.orig/Makefile.tpl 2010-02-17 03:01:44.000000000 -0800
++++ gcc-4.5.0/Makefile.tpl 2010-06-25 11:22:16.945631990 -0700
+@@ -269,6 +269,7 @@
+ AR="$(AR_FOR_TARGET)"; export AR; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ 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 0000000..1e9c65e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -0,0 +1,46 @@
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+SECTION = "devel"
+LICENSE = "GPL"
+
+NATIVEDEPS = ""
+
+inherit autotools gettext
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+def get_gcc_mips_plt_setting(bb, d):
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'mips', 'mipsel' ] and 'mplt' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
+ return "--with-mips-plt"
+ return ""
+
+# We really need HOST_SYS here for some packages and TARGET_SYS for others.
+# For now, libgcc is most important so we fix for that - RP.
+SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
+
+DEBIANNAME_libgcc = "libgcc1"
+
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
+${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
+${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
+}
+
+#
+# Set some default values
+#
+gcclibdir = "${libdir}/gcc"
+BINV = "${PV}"
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+target_includedir ?= "${includedir}"
+target_libdir ?= "${libdir}"
+target_base_libdir ?= "${base_libdir}"
+target_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 0000000..5a55025
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -0,0 +1,107 @@
+#
+# Build the list of lanaguages to build.
+#
+# These can be overridden by the version specific .inc file.
+
+# Java (gcj doesn't work on all architectures)
+JAVA ?= ",java"
+JAVA_arm ?= ""
+JAVA_armeb ?= ""
+JAVA_mipsel ?= ""
+JAVA_sh3 ?= ""
+# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
+FORTRAN ?= ",f77"
+LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
+# disable --enable-target-optspace for powerpc SPE
+# at -Os libgcc.so.1 creates references into
+# hidden symbols in libgcc.a which linker complains
+# when linking shared libraries further in the build like (gnutls)
+
+OPTSPACE = "${@base_contains('TARGET_ARCH', ['powerpc', 'arm'], '', '--enable-target-optspace',d)}"
+
+EXTRA_OECONF_BASE ?= ""
+EXTRA_OECONF_PATHS ?= ""
+EXTRA_OECONF_INITIAL ?= ""
+EXTRA_OECONF_INTERMEDIATE ?= ""
+
+GCCMULTILIB = "--disable-multilib"
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+ --with-gnu-ld \
+ --enable-shared \
+ --enable-languages=${LANGUAGES} \
+ --enable-threads=posix \
+ ${GCCMULTILIB} \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-symvers=gnu \
+ --enable-libstdcxx-pch \
+ --program-prefix=${TARGET_PREFIX} \
+ ${OPTSPACE} \
+ ${EXTRA_OECONF_BASE} \
+ ${EXTRA_OECONF_FPU} \
+ ${EXTRA_OECONF_PATHS} \
+ ${@get_gcc_mips_plt_setting(bb, d)}"
+
+# Build uclibc compilers without cxa_atexit support
+EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
+EXTRA_OECONF_append_linux-gnueabi = " --enable-__cxa_atexit"
+EXTRA_OECONF_append_linux-uclibc = " --disable-__cxa_atexit"
+EXTRA_OECONF_append_linux-uclibcgnueabi = " --disable-__cxa_atexit"
+EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
+CPPFLAGS = ""
+
+# Used by configure to define additional values for FLAGS_FOR_TARGET -
+# passed to all the compilers.
+ARCH_FLAGS_FOR_TARGET = "${TARGET_CC_ARCH}"
+EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
+
+SYSTEMHEADERS = "${target_includedir}"
+SYSTEMLIBS = "${target_base_libdir}/"
+SYSTEMLIBS1 = "${target_libdir}/"
+
+do_configure () {
+ # Setup these vars for cross building only
+ # ... because foo_FOR_TARGET apparently gets misinterpreted inside the
+ # gcc build stuff when the build is producing a cross compiler - i.e.
+ # when the 'current' target is the 'host' system, and the host is not
+ # the target (because the build is actually making a cross compiler!)
+ if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+ export CC_FOR_TARGET="${CC}"
+ export GCC_FOR_TARGET="${CC}"
+ export CXX_FOR_TARGET="${CXX}"
+ export AS_FOR_TARGET="${HOST_PREFIX}as"
+ export LD_FOR_TARGET="${HOST_PREFIX}ld"
+ export NM_FOR_TARGET="${HOST_PREFIX}nm"
+ export AR_FOR_TARGET="${HOST_PREFIX}ar"
+ export GFORTRAN_FOR_TARGET="gfortran"
+ export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
+ fi
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CXX_FOR_BUILD="${BUILD_CXX}"
+ export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
+ export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
+ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
+ export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+
+ # splice our idea of where the headers live into gcc's world
+ echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${T}/t-oe
+ sed 's%^tmake_file=.*$%& ${T}/t-oe%' < ${S}/gcc/Makefile.in >${S}/gcc/Makefile.in.new
+ mv ${S}/gcc/Makefile.in.new ${S}/gcc/Makefile.in
+ cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${S}/gcc/defaults.h.new
+ echo "#ifndef STANDARD_INCLUDE_DIR" >> ${S}/gcc/defaults.h.new
+ echo "#define STANDARD_INCLUDE_DIR \"${SYSTEMHEADERS}\"" >> ${S}/gcc/defaults.h.new
+ echo "#endif" >> ${S}/gcc/defaults.h.new
+ echo "#ifndef STANDARD_STARTFILE_PREFIX_1" >> ${S}/gcc/defaults.h.new
+ echo "#define STANDARD_STARTFILE_PREFIX_1 \"${SYSTEMLIBS}\"" >> ${S}/gcc/defaults.h.new
+ echo "#endif" >> ${S}/gcc/defaults.h.new
+ echo "#ifndef STANDARD_STARTFILE_PREFIX_2" >> ${S}/gcc/defaults.h.new
+ echo "#define STANDARD_STARTFILE_PREFIX_2 \"${SYSTEMLIBS1}\"" >> ${S}/gcc/defaults.h.new
+ echo "#endif" >> ${S}/gcc/defaults.h.new
+ echo "#endif /* ! GCC_DEFAULTS_H */" >> ${S}/gcc/defaults.h.new
+ mv ${S}/gcc/defaults.h.new ${S}/gcc/defaults.h
+ oe_runconf
+}
+
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 0000000..6051a76
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-cross.inc
@@ -0,0 +1,22 @@
+require gcc-configure-common.inc
+
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_exec_prefix} \
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}/${target_includedir}/c++ \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+do_compile_prepend () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
+}
+
+LIBGCCS_VAR = "-lgcc_s"
+LIBGCCS_VAR_avr32 = ""
+
+do_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 0000000..f9ad61d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -0,0 +1,59 @@
+require gcc-configure-common.inc
+
+EXTRA_OECONF_PATHS = " \
+ --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
+ --with-gxx-include-dir=${includedir}/c++/ \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+RUNTIMETARGET = "libssp libstdc++-v3"
+# ?
+# libiberty
+# libmudflap
+# libgfortran
+
+do_configure () {
+ export CXX="${CXX} -nostdinc++ -nostdlib++"
+ for d in ${RUNTIMETARGET}; do
+ echo "Configuring $d"
+ mkdir -p ${B}/$d/
+ cd ${B}/$d/
+ chmod a+x ${S}/$d/configure
+ ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ done
+}
+
+do_compile () {
+ for d in ${RUNTIMETARGET}; do
+ cd ${B}/$d/
+ oe_runmake
+ done
+}
+
+do_install () {
+ target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
+
+ # Install libgcc from our gcc-cross saved data
+ install -d ${D}${base_libdir} ${D}${libdir}
+ cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
+
+ for d in ${RUNTIMETARGET}; do
+ cd ${B}/$d/
+ oe_runmake 'DESTDIR=${D}' install
+ done
+
+ # Move libgcc_s into /lib
+ mkdir -p ${D}${base_libdir}
+ if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
+ mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
+ else
+ mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
+ fi
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
+
+BBCLASSEXTEND = "nativesdk"
+
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 0000000..0eb33ad
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
@@ -0,0 +1,48 @@
+require gcc-configure-common.inc
+
+# The two lines below conflict, this needs fixing - RP
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
+ --with-gxx-include-dir=${SDKPATH}/sysroots/${TARGET_SYS}${target_includedir}/c++ \
+ --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
+ --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+#
+# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
+# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
+#
+export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
+export AS_FOR_TARGET = "${TARGET_PREFIX}as"
+export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool"
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
+export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
+export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo"
+export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
+export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump"
+export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
+export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip"
+export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres"
+
+#
+# We need to override this and make sure the compiler can find staging
+#
+export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
+
+do_configure () {
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CXX_FOR_BUILD="${BUILD_CXX}"
+ export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
+ export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
+ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
+ export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_compile () {
+ oe_runmake all-host all-target-libgcc
+}
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 0000000..2fd3114
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-configure-target.inc
@@ -0,0 +1,5 @@
+require gcc-configure-common.inc
+
+EXTRA_OECONF_PATHS = " \
+ --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
+ --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 0000000..a3b15c3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -0,0 +1,4 @@
+inherit cross-canadian
+
+DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc gettext-nativesdk"
+
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 0000000..981452b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
@@ -0,0 +1,24 @@
+inherit cross-canadian
+
+require gcc-${PV}.inc
+require gcc-cross-canadian.inc
+require gcc-configure-sdk.inc
+require gcc-package-sdk.inc
+
+PR = "r17"
+
+DEPENDS += "gmp-nativesdk mpfr-nativesdk"
+RDEPENDS_${PN} += "mpfr-nativesdk"
+
+SYSTEMHEADERS = "/usr/include"
+SYSTEMLIBS = "/lib/"
+SYSTEMLIBS1 = "/usr/lib/"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix}"
+
+# to find libmpfr
+# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
+
+PARALLEL_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 0000000..dd19412
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.0.bb
@@ -0,0 +1,25 @@
+inherit cross-canadian
+
+require gcc-${PV}.inc
+require gcc-cross-canadian.inc
+require gcc-configure-sdk.inc
+require gcc-package-sdk.inc
+
+PR = "r6"
+
+DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
+RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
+
+SYSTEMHEADERS = "/usr/include"
+SYSTEMLIBS = "/lib/"
+SYSTEMLIBS1 = "/usr/lib/"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
+ --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
+
+# to find libmpfr
+# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
+
+PARALLEL_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 0000000..f582de9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -0,0 +1,24 @@
+DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+# sysroot is needed in case we use libc-initial
+EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
+ --with-newlib \
+ --without-headers \
+ --disable-shared \
+ --disable-threads \
+ --disable-multilib \
+ --disable-__cxa_atexit \
+ --enable-languages=c \
+ ${OPTSPACE} \
+ --program-prefix=${TARGET_PREFIX} \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+ ${EXTRA_OECONF_INITIAL} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_compile () {
+ oe_runmake
+}
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 0000000..b2c257d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.3.3.bb
@@ -0,0 +1,5 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+PR = "r2"
+
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 0000000..ef52845
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_4.5.0.bb
@@ -0,0 +1,5 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+PR = "r6"
+
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 0000000..0621103
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_csl-arm-2008q1.bb
@@ -0,0 +1,10 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+S = "${WORKDIR}/gcc-4.2"
+
+# Hack till we fix *libc properly
+do_install_append() {
+ 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/
+}
+
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 0000000..72a4241
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -0,0 +1,28 @@
+DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}"
+DEPENDS += "virtual/${TARGET_PREFIX}libc-initial gettext-native"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate"
+PACKAGES = ""
+
+# This is intended to be a -very- basic config
+# sysroot is needed in case we use libc-initial
+EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
+ --enable-shared \
+ --disable-multilib \
+ --disable-threads \
+ --enable-languages=c \
+ ${OPTSPACE} \
+ --program-prefix=${TARGET_PREFIX} \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+ ${EXTRA_OECONF_INTERMEDIATE} \
+ ${@get_gcc_fpu_setting(bb, d)}"
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${target_base_libdir}/
+ mv ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${D}${target_base_libdir}/
+}
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 0000000..10681da
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.3.3.bb
@@ -0,0 +1,4 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-intermediate.inc
+PR = "r2"
+
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 0000000..deeee37
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.0.bb
@@ -0,0 +1,4 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-intermediate.inc
+PR = "r6"
+
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 0000000..8a8f21a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
@@ -0,0 +1,10 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-intermediate.inc
+
+S = "${WORKDIR}/gcc-4.2"
+
+# Hack till we fix *libc properly
+do_install_append() {
+ 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/
+}
+
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 0000000..6dbb19c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
@@ -0,0 +1,15 @@
+# This kernel compiler is required by the Freecom FSG-3 machine
+# This kernel compiler is required by the Nokia tablets
+# Please talk to Rod Whitby and Richard Purdie before considering removing this file.
+
+require gcc-csl-arm-2005q3.inc
+require gcc-cross.inc
+require gcc-cross-initial.inc
+require gcc-cross-kernel.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+PR = "r1"
+
+SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"
+
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 0000000..5347762
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-kernel.inc
@@ -0,0 +1,10 @@
+# Cut-down gcc for kernel builds
+# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
+
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
+
+do_install () {
+ cd gcc
+ oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc
+ install -m 0755 xgcc ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
+}
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
new file mode 100644
index 0000000..5a796bc
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -0,0 +1,12 @@
+inherit cross
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${NATIVEDEPS}"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+require gcc-configure-cross.inc
+require gcc-package-cross.inc
+
+do_compile () {
+ oe_runmake all-host all-target-libgcc
+}
+
diff --git a/meta/recipes-devtools/gcc/gcc-cross4.inc b/meta/recipes-devtools/gcc/gcc-cross4.inc
new file mode 100644
index 0000000..ea20a24
--- /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 0000000..36f91d0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_4.3.3.bb
@@ -0,0 +1,10 @@
+PR = "r15"
+
+require gcc-${PV}.inc
+require gcc-cross4.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
+
+ARCH_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 0000000..8d28ab3
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_4.5.0.bb
@@ -0,0 +1,12 @@
+PR = "r6"
+
+require gcc-${PV}.inc
+require gcc-cross4.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch "
+
+EXTRA_OECONF += "--disable-libunwind-exceptions \
+ --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
+ --with-system-zlib"
+
+ARCH_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 0000000..11857b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb
@@ -0,0 +1,26 @@
+PR = "r2"
+
+require gcc-csl-arm-2008q1.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
+require gcc-package-cross.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch "
+
+EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
+
+#We don't want i686 linux ending up in the CFLAGS_FOR_TARGET like this: -isystem/OE/angstrom-tmp/staging/i686-linux/usr/include
+CFLAGS = ""
+CXXFLAGS = ""
+LDFLAGS = ""
+
+# staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
+do_compile_prepend() {
+ ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+ ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+ ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+ sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
+
+}
+
+ARCH_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 0000000..eb8d273
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
@@ -0,0 +1,8 @@
+inherit crosssdk
+
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
+PROVIDES = "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 0000000..e804b4b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.3.3.bb
@@ -0,0 +1,3 @@
+require gcc-cross-initial_${PV}.bb
+require gcc-crosssdk-initial.inc
+PR = "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 0000000..c76e407
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.0.bb
@@ -0,0 +1,4 @@
+require gcc-cross-initial_${PV}.bb
+require gcc-crosssdk-initial.inc
+
+PR = "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 0000000..ed5d5e8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate.inc
@@ -0,0 +1,9 @@
+inherit crosssdk
+
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk gettext-native"
+DEPENDS += "virtual/${TARGET_PREFIX}libc-initial-nativesdk"
+PROVIDES = "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 0000000..5f01473
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.3.3.bb
@@ -0,0 +1,3 @@
+require gcc-cross-intermediate_${PV}.bb
+require gcc-crosssdk-intermediate.inc
+PR = "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 0000000..42c4987
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.0.bb
@@ -0,0 +1,4 @@
+require gcc-cross-intermediate_${PV}.bb
+require gcc-crosssdk-intermediate.inc
+
+PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk.inc b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
new file mode 100644
index 0000000..6e7d5a7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk.inc
@@ -0,0 +1,16 @@
+inherit crosssdk
+
+SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
+SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
+SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
+
+GCCMULTILIB = "--disable-multilib"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc-nativesdk gettext-native"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/${TARGET_PREFIX}g++-crosssdk"
+
+do_configure_prepend () {
+ # Change the default dynamic linker path to the one in the SDK
+ sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib/#\1${SYSTEMLIBS}#'
+ sed -i ${S}/gcc/config/*/linux*.h -e 's#\(GLIBC_DYNAMIC_LINKER.*\)/lib64/#\1${SYSTEMLIBS}#'
+}
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 0000000..92a3f11
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.3.3.bb
@@ -0,0 +1,3 @@
+require gcc-cross_${PV}.bb
+require gcc-crosssdk.inc
+PR="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 0000000..9e94c80
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_4.5.0.bb
@@ -0,0 +1,4 @@
+require gcc-cross_${PV}.bb
+require gcc-crosssdk.inc
+
+PR = "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 0000000..fd2b379
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm-2005q3.inc
@@ -0,0 +1,22 @@
+require gcc-common.inc
+
+BINV = "3.4.4"
+PV = "3.4.4+csl-arm-2005q3-2"
+PV_chinook-compat = "3.4.4cs2005q3.2"
+
+FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
+
+SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2 \
+ file://gcc_optab_arm.patch;patch=1 \
+ file://gcc-3.4.4-eabi-bigendian.patch;patch=1"
+
+S = "${WORKDIR}/gcc-2005q3"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2005q3-2-arm-none-eabi/gcc-2005q3-2.tar.bz2
+}
+
+addtask unpack2 after do_unpack before do_patch
+
+
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 0000000..e84bd83
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc
@@ -0,0 +1,53 @@
+require gcc-common.inc
+
+BINV = "4.2.3"
+PV = "4.2.3+csl-arm-2008q1-126"
+
+FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
+
+SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
+# file://100-uclibc-conf.patch;patch=1 \
+# file://103-uclibc-conf-noupstream.patch;patch=1 \
+# file://200-uclibc-locale.patch;patch=1 \
+# file://203-uclibc-locale-no__x.patch;patch=1 \
+# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+# file://205-uclibc-locale-update.patch;patch=1 \
+# file://300-libstdc++-pic.patch;patch=1 \
+# file://302-c99-snprintf.patch;patch=1 \
+# file://303-c99-complex-ugly-hack.patch;patch=1 \
+# file://304-index_macro.patch;patch=1 \
+# file://305-libmudflap-susv3-legacy.patch;patch=1 \
+# file://306-libstdc++-namespace.patch;patch=1 \
+# file://307-locale_facets.patch;patch=1 \
+# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+# file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+# file://gfortran.patch;patch=1 \
+# file://fortran-static-linking.patch;patch=1 \
+# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \
+# file://gcc-new-makeinfo.patch;patch=1 \
+"
+
+
+S = "${WORKDIR}/gcc-4.2"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2008q1-126-arm-none-eabi/gcc-2008q1-126.tar.bz2
+}
+
+# Language Overrides
+FORTRAN = ""
+#FORTRAN_linux-gnueabi = ",fortran"
+#JAVA = ",java"
+
+EXTRA_OECONF_BASE = "--enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap"
+EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --disable-bootstrap"
+EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp --disable-bootstrap"
+
+ARM_INSTRUCTION_SET = "arm"
+
+addtask 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 0000000..d0f3e72
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/15342.patch
@@ -0,0 +1,22 @@
+--- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000
++++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000
+@@ -671,7 +671,8 @@
+
+ case SET:
+ scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
+- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
++ scan_rtx (insn, &SET_DEST (x), class, action,
++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
+ return;
+
+ case STRICT_LOW_PART:
+@@ -696,7 +697,8 @@
+ abort ();
+
+ case CLOBBER:
+- scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
++ scan_rtx (insn, &SET_DEST (x), class, action,
++ GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
+ return;
+
+ 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 0000000..c4897c0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+#
+# Fixes errors like
+# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
+# collect2: ld returned 1 exit status
+# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
+# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
+
+Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ 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 0000000..5e1edd9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/arm-softfloat.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.0.2/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # 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 0000000..ef7cd11
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/cache-amnesia.patch
@@ -0,0 +1,13 @@
+diff --git a/gcc/configure b/gcc/configure
+index 44620ab..6e1830c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12272,7 +12272,7 @@ else
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ 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 0000000..3dd6321
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/fortran-static-linking.patch
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # 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 0000000..cf17da6a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch
@@ -0,0 +1,24 @@
+# Fixes errors like the following when building glibc (or any other executable
+# or shared library) when using gcc 3.4.0 for ARM with softfloat:
+#
+# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
+# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
+# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
+# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
+# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
+
+diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
+--- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
++++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # 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 0000000..e6cc42b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-eabi-bigendian.patch
@@ -0,0 +1,12 @@
+--- gcc-2005q3/gcc/config/arm/linux-eabi.h~ 2007-07-10 09:19:47.000000000 +0930
++++ gcc-2005q3/gcc/config/arm/linux-eabi.h 2007-07-10 10:42:37.000000000 +0930
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ 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 0000000..74c1f26
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-3.4.4-makefile-fix.patch
@@ -0,0 +1,29 @@
+--- gcc-3.4.4/gcc/Makefile.in.orig 2005-07-25 21:00:37 +0200
++++ gcc-3.4.4/gcc/Makefile.in 2005-07-25 21:01:19 +0200
+@@ -304,7 +304,7 @@
+ if [ "$(host)" = "$(target)" ] ; then \
+ echo ar; \
+ else \
+- t='$(program_transform_name)'; echo ar | sed -e $$t ; \
++ t='$(program_transform_name)'; echo ar | sed -e "$$t" ; \
+ fi; \
+ fi`
+ AR_FLAGS_FOR_TARGET =
+@@ -317,7 +317,7 @@
+ if [ "$(host)" = "$(target)" ] ; then \
+ echo $(RANLIB); \
+ else \
+- t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
++ t='$(program_transform_name)'; echo ranlib | sed -e "$$t" ; \
+ fi; \
+ fi`
+ NM_FOR_TARGET = ` \
+@@ -329,7 +329,7 @@
+ if [ "$(host)" = "$(target)" ] ; then \
+ echo nm; \
+ else \
+- t='$(program_transform_name)'; echo nm | sed -e $$t ; \
++ t='$(program_transform_name)'; echo nm | sed -e "$$t" ; \
+ fi; \
+ fi`
+
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 0000000..c845503
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-configure-no-fortran.patch
@@ -0,0 +1,1075 @@
+--- tmp/configure.in.orig 2006-09-05 17:50:48.000000000 +0100
++++ tmp/configure.in 2006-09-05 17:50:48.000000000 +0100
+@@ -157,7 +157,6 @@
+ target-libstdc++-v3 \
+ target-libmudflap \
+ target-libssp \
+- target-libgfortran \
+ ${libgcj} \
+ target-libobjc \
+ target-libada"
+@@ -1084,77 +1083,6 @@
+ AC_SUBST(docdir)
+ AC_SUBST(htmldir)
+
+-# Check for GMP and MPFR
+-gmplibs=
+-gmpinc=
+-have_gmp=yes
+-# Specify a location for mpfr
+-# check for this first so it ends up on the link line before gmp.
+-AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH Specify source directory for MPFR library])
+-
+-if test "x$with_mpfr_dir" != x; then
+- gmpinc="-I$with_mpfr_dir"
+- gmplibs="$with_mpfr_dir/libmpfr.a"
+-else
+- gmplibs="-lmpfr"
+-fi
+-
+-AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify directory for installed MPFR library])
+-
+-if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
+- gmpinc="-I$with_mpfr/include"
+-fi
+-
+-# Specify a location for gmp
+-AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library])
+-
+-if test "x$with_gmp_dir" != x; then
+- gmpinc="$gmpinc -I$with_gmp_dir"
+- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
+- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
+- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
+- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
+- fi
+- # One of the later tests will catch the error if neither library is present.
+-else
+- gmplibs="$gmplibs -lgmp"
+-fi
+-
+-AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library])
+-
+-if test "x$with_gmp" != x; then
+- gmplibs="-L$with_gmp/lib $gmplibs"
+- gmpinc="-I$with_gmp/include $gmpinc"
+-fi
+-
+-saved_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $gmpinc"
+-# Check GMP actually works
+-AC_MSG_CHECKING([for correct version of gmp.h])
+-AC_TRY_COMPILE([#include "gmp.h"],[
+-#if __GNU_MP_VERSION < 3
+-choke me
+-#endif
+-], [AC_MSG_RESULT([yes])],
+- [AC_MSG_RESULT([no]); have_gmp=no])
+-
+-if test x"$have_gmp" = xyes; then
+- AC_MSG_CHECKING([for MPFR])
+-
+- saved_LIBS="$LIBS"
+- LIBS="$LIBS $gmplibs"
+- AC_TRY_LINK([#include <gmp.h>
+-#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
+- [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+- LIBS="$saved_LIBS"
+- CFLAGS="$saved_CFLAGS"
+-fi
+-
+-# Flags needed for both GMP and/or MPFR
+-AC_SUBST(gmplibs)
+-AC_SUBST(gmpinc)
+-
+ # By default, C is the only stage 1 language.
+ stage1_languages=c
+ AC_SUBST(stage1_languages)
+@@ -1182,15 +1110,6 @@
+ fi
+ enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
+
+- # 'f95' is the old name for the 'fortran' language. We issue a warning
+- # and make the substitution.
+- case ,${enable_languages}, in
+- *,f95,*)
+- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+- enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
+- ;;
+- esac
+-
+ # First scan to see if an enabled language requires some other language.
+ # We assume that a given config-lang.in will list all the language
+ # front ends it requires, even if some are required indirectly.
+@@ -2213,7 +2132,6 @@
+ NCN_STRICT_CHECK_TARGET_TOOLS(DLLTOOL_FOR_TARGET, dlltool)
+ NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
+ NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj)
+-NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
+ NCN_STRICT_CHECK_TARGET_TOOLS(LD_FOR_TARGET, ld)
+ NCN_STRICT_CHECK_TARGET_TOOLS(LIPO_FOR_TARGET, lipo)
+ NCN_STRICT_CHECK_TARGET_TOOLS(NM_FOR_TARGET, nm)
+@@ -2237,9 +2155,7 @@
+ GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
+ GCC_TARGET_TOOL(gcj, GCJ_FOR_TARGET, GCJ,
+ [gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/], java)
+-GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN,
+- [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran)
+ GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
+ GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
+ GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
+
+--- tmp/Makefile.in.orig 2006-09-06 08:33:46.000000000 +0100
++++ tmp/Makefile.in 2006-09-06 08:33:46.000000000 +0100
+@@ -119,7 +119,6 @@
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+@@ -201,7 +200,6 @@
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+- GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+@@ -313,7 +311,6 @@
+ CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+-GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
+ LD_FOR_TARGET=@LD_FOR_TARGET@
+
+@@ -452,7 +449,6 @@
+ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
+ "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
+ "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
+- "GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
+ "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
+ "LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
+ "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
+@@ -618,7 +614,6 @@
+ maybe-configure-target-libmudflap \
+ maybe-configure-target-libssp \
+ maybe-configure-target-newlib \
+- maybe-configure-target-libgfortran \
+ maybe-configure-target-libobjc \
+ maybe-configure-target-libtermcap \
+ maybe-configure-target-winsup \
+@@ -737,7 +732,6 @@
+ maybe-all-target-libmudflap \
+ maybe-all-target-libssp \
+ maybe-all-target-newlib \
+- maybe-all-target-libgfortran \
+ maybe-all-target-libobjc \
+ maybe-all-target-libtermcap \
+ maybe-all-target-winsup \
+@@ -844,7 +838,6 @@
+ maybe-info-target-libmudflap \
+ maybe-info-target-libssp \
+ maybe-info-target-newlib \
+- maybe-info-target-libgfortran \
+ maybe-info-target-libobjc \
+ maybe-info-target-libtermcap \
+ maybe-info-target-winsup \
+@@ -946,7 +939,6 @@
+ maybe-dvi-target-libmudflap \
+ maybe-dvi-target-libssp \
+ maybe-dvi-target-newlib \
+- maybe-dvi-target-libgfortran \
+ maybe-dvi-target-libobjc \
+ maybe-dvi-target-libtermcap \
+ maybe-dvi-target-winsup \
+@@ -1048,7 +1040,6 @@
+ maybe-html-target-libmudflap \
+ maybe-html-target-libssp \
+ maybe-html-target-newlib \
+- maybe-html-target-libgfortran \
+ maybe-html-target-libobjc \
+ maybe-html-target-libtermcap \
+ maybe-html-target-winsup \
+@@ -1150,7 +1141,6 @@
+ maybe-TAGS-target-libmudflap \
+ maybe-TAGS-target-libssp \
+ maybe-TAGS-target-newlib \
+- maybe-TAGS-target-libgfortran \
+ maybe-TAGS-target-libobjc \
+ maybe-TAGS-target-libtermcap \
+ maybe-TAGS-target-winsup \
+@@ -1252,7 +1242,6 @@
+ maybe-install-info-target-libmudflap \
+ maybe-install-info-target-libssp \
+ maybe-install-info-target-newlib \
+- maybe-install-info-target-libgfortran \
+ maybe-install-info-target-libobjc \
+ maybe-install-info-target-libtermcap \
+ maybe-install-info-target-winsup \
+@@ -1354,7 +1343,6 @@
+ maybe-install-html-target-libmudflap \
+ maybe-install-html-target-libssp \
+ maybe-install-html-target-newlib \
+- maybe-install-html-target-libgfortran \
+ maybe-install-html-target-libobjc \
+ maybe-install-html-target-libtermcap \
+ maybe-install-html-target-winsup \
+@@ -1456,7 +1444,6 @@
+ maybe-installcheck-target-libmudflap \
+ maybe-installcheck-target-libssp \
+ maybe-installcheck-target-newlib \
+- maybe-installcheck-target-libgfortran \
+ maybe-installcheck-target-libobjc \
+ maybe-installcheck-target-libtermcap \
+ maybe-installcheck-target-winsup \
+@@ -1558,7 +1545,6 @@
+ maybe-mostlyclean-target-libmudflap \
+ maybe-mostlyclean-target-libssp \
+ maybe-mostlyclean-target-newlib \
+- maybe-mostlyclean-target-libgfortran \
+ maybe-mostlyclean-target-libobjc \
+ maybe-mostlyclean-target-libtermcap \
+ maybe-mostlyclean-target-winsup \
+@@ -1660,7 +1646,6 @@
+ maybe-clean-target-libmudflap \
+ maybe-clean-target-libssp \
+ maybe-clean-target-newlib \
+- maybe-clean-target-libgfortran \
+ maybe-clean-target-libobjc \
+ maybe-clean-target-libtermcap \
+ maybe-clean-target-winsup \
+@@ -1762,7 +1747,6 @@
+ maybe-distclean-target-libmudflap \
+ maybe-distclean-target-libssp \
+ maybe-distclean-target-newlib \
+- maybe-distclean-target-libgfortran \
+ maybe-distclean-target-libobjc \
+ maybe-distclean-target-libtermcap \
+ maybe-distclean-target-winsup \
+@@ -1864,7 +1848,6 @@
+ maybe-maintainer-clean-target-libmudflap \
+ maybe-maintainer-clean-target-libssp \
+ maybe-maintainer-clean-target-newlib \
+- maybe-maintainer-clean-target-libgfortran \
+ maybe-maintainer-clean-target-libobjc \
+ maybe-maintainer-clean-target-libtermcap \
+ maybe-maintainer-clean-target-winsup \
+@@ -2024,7 +2007,6 @@
+ maybe-check-target-libmudflap \
+ maybe-check-target-libssp \
+ maybe-check-target-newlib \
+- maybe-check-target-libgfortran \
+ maybe-check-target-libobjc \
+ maybe-check-target-libtermcap \
+ maybe-check-target-winsup \
+@@ -2223,7 +2205,6 @@
+ maybe-install-target-libmudflap \
+ maybe-install-target-libssp \
+ maybe-install-target-newlib \
+- maybe-install-target-libgfortran \
+ maybe-install-target-libobjc \
+ maybe-install-target-libtermcap \
+ maybe-install-target-winsup \
+@@ -31606,382 +31587,6 @@
+
+
+ # There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+-@if target-libgfortran
+-$(TARGET_SUBDIR)/libgfortran/multilib.out: multilib.out
+- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+- rm -f $(TARGET_SUBDIR)/libgfortran/Makefile || : ; \
+- cp multilib.out $(TARGET_SUBDIR)/libgfortran/multilib.out
+-@endif target-libgfortran
+-
+-
+-
+-.PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
+-maybe-configure-target-libgfortran:
+-@if target-libgfortran
+-maybe-configure-target-libgfortran: configure-target-libgfortran
+-configure-target-libgfortran: $(TARGET_SUBDIR)/libgfortran/multilib.out
+- @$(unstage)
+- @test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \
+- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
+- cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
+- case $(srcdir) in \
+- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+- *) topdir=`echo $(TARGET_SUBDIR)/libgfortran/ | \
+- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+- esac; \
+- srcdiroption="--srcdir=$${topdir}/libgfortran"; \
+- libsrcdir="$$s/libgfortran"; \
+- rm -f no-such-file || : ; \
+- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+- $(TARGET_CONFIGARGS) $${srcdiroption} \
+- || exit 1
+-@endif target-libgfortran
+-
+-
+-
+-
+-
+-.PHONY: all-target-libgfortran maybe-all-target-libgfortran
+-maybe-all-target-libgfortran:
+-@if target-libgfortran
+-TARGET-target-libgfortran=all
+-maybe-all-target-libgfortran: all-target-libgfortran
+-all-target-libgfortran: configure-target-libgfortran
+- @$(unstage)
+- @r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgfortran))
+-@endif target-libgfortran
+-
+-
+-
+-
+-
+-.PHONY: check-target-libgfortran maybe-check-target-libgfortran
+-maybe-check-target-libgfortran:
+-@if target-libgfortran
+-maybe-check-target-libgfortran: check-target-libgfortran
+-
+-check-target-libgfortran:
+- @: $(MAKE); $(unstage)
+- @r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+-
+-@endif target-libgfortran
+-
+-.PHONY: install-target-libgfortran maybe-install-target-libgfortran
+-maybe-install-target-libgfortran:
+-@if target-libgfortran
+-maybe-install-target-libgfortran: install-target-libgfortran
+-
+-install-target-libgfortran: installdirs
+- @: $(MAKE); $(unstage)
+- @r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+-
+-@endif target-libgfortran
+-
+-# Other targets (info, dvi, etc.)
+-
+-.PHONY: maybe-info-target-libgfortran info-target-libgfortran
+-maybe-info-target-libgfortran:
+-@if target-libgfortran
+-maybe-info-target-libgfortran: info-target-libgfortran
+-
+-info-target-libgfortran: \
+- configure-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing info in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- info) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-dvi-target-libgfortran dvi-target-libgfortran
+-maybe-dvi-target-libgfortran:
+-@if target-libgfortran
+-maybe-dvi-target-libgfortran: dvi-target-libgfortran
+-
+-dvi-target-libgfortran: \
+- configure-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing dvi in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- dvi) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-html-target-libgfortran html-target-libgfortran
+-maybe-html-target-libgfortran:
+-@if target-libgfortran
+-maybe-html-target-libgfortran: html-target-libgfortran
+-
+-html-target-libgfortran: \
+- configure-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing html in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- html) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-TAGS-target-libgfortran TAGS-target-libgfortran
+-maybe-TAGS-target-libgfortran:
+-@if target-libgfortran
+-maybe-TAGS-target-libgfortran: TAGS-target-libgfortran
+-
+-TAGS-target-libgfortran: \
+- configure-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing TAGS in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- TAGS) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-install-info-target-libgfortran install-info-target-libgfortran
+-maybe-install-info-target-libgfortran:
+-@if target-libgfortran
+-maybe-install-info-target-libgfortran: install-info-target-libgfortran
+-
+-install-info-target-libgfortran: \
+- configure-target-libgfortran \
+- info-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing install-info in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- install-info) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-install-html-target-libgfortran install-html-target-libgfortran
+-maybe-install-html-target-libgfortran:
+-@if target-libgfortran
+-maybe-install-html-target-libgfortran: install-html-target-libgfortran
+-
+-install-html-target-libgfortran: \
+- configure-target-libgfortran \
+- html-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing install-html in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- install-html) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-installcheck-target-libgfortran installcheck-target-libgfortran
+-maybe-installcheck-target-libgfortran:
+-@if target-libgfortran
+-maybe-installcheck-target-libgfortran: installcheck-target-libgfortran
+-
+-installcheck-target-libgfortran: \
+- configure-target-libgfortran
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing installcheck in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- installcheck) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-mostlyclean-target-libgfortran mostlyclean-target-libgfortran
+-maybe-mostlyclean-target-libgfortran:
+-@if target-libgfortran
+-maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran
+-
+-mostlyclean-target-libgfortran:
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- mostlyclean) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-clean-target-libgfortran clean-target-libgfortran
+-maybe-clean-target-libgfortran:
+-@if target-libgfortran
+-maybe-clean-target-libgfortran: clean-target-libgfortran
+-
+-clean-target-libgfortran:
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing clean in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- clean) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-distclean-target-libgfortran distclean-target-libgfortran
+-maybe-distclean-target-libgfortran:
+-@if target-libgfortran
+-maybe-distclean-target-libgfortran: distclean-target-libgfortran
+-
+-distclean-target-libgfortran:
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing distclean in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- distclean) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-.PHONY: maybe-maintainer-clean-target-libgfortran maintainer-clean-target-libgfortran
+-maybe-maintainer-clean-target-libgfortran:
+-@if target-libgfortran
+-maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran
+-
+-maintainer-clean-target-libgfortran:
+- @: $(MAKE); $(unstage)
+- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+- r=`${PWD_COMMAND}`; export r; \
+- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+- $(NORMAL_TARGET_EXPORTS) \
+- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgfortran" ; \
+- for flag in $(EXTRA_TARGET_FLAGS); do \
+- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+- done; \
+- (cd $(TARGET_SUBDIR)/libgfortran && \
+- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+- "RANLIB=$${RANLIB}" \
+- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+- maintainer-clean) \
+- || exit 1
+-
+-@endif target-libgfortran
+-
+-
+-
+-# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+ @if target-libobjc
+ $(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+@@ -38574,8 +38179,6 @@
+
+ configure-target-newlib: maybe-all-gcc
+
+-configure-target-libgfortran: maybe-all-gcc
+-
+ configure-target-libobjc: maybe-all-gcc
+
+ configure-target-libtermcap: maybe-all-gcc
+@@ -38613,9 +38216,7 @@
+
+ configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
+
+-configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
+-
+ configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
+
+ configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
+
+--- tmp/Makefile.tpl.orig 2006-09-06 08:36:52.000000000 +0100
++++ tmp/Makefile.tpl 2006-09-06 08:36:52.000000000 +0100
+@@ -122,7 +122,6 @@
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+- GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+@@ -204,7 +203,6 @@
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
+- GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
+ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
+ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
+@@ -316,7 +314,6 @@
+ CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+-GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
+ LD_FOR_TARGET=@LD_FOR_TARGET@
+
+--- tmp/Makefile.def.orig 2006-09-06 08:38:50.000000000 +0100
++++ tmp/Makefile.def 2006-09-06 08:38:50.000000000 +0100
+@@ -117,7 +117,6 @@
+ target_modules = { module= libmudflap; lib_path=.libs; };
+ target_modules = { module= libssp; lib_path=.libs; };
+ target_modules = { module= newlib; };
+-target_modules = { module= libgfortran; };
+ target_modules = { module= libobjc; };
+ target_modules = { module= libtermcap; no_check=true;
+ missing=mostlyclean;
+@@ -227,7 +226,6 @@
+ flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
+ flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
+ flags_to_pass = { flag= GCJ_FOR_TARGET ; };
+-flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
+ flags_to_pass = { flag= LD_FOR_TARGET ; };
+ flags_to_pass = { flag= LIPO_FOR_TARGET ; };
+ flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
+@@ -415,7 +413,6 @@
+ lang_env_dependencies = { module=boehm-gc; };
+ lang_env_dependencies = { module=gperf; cxx=true; };
+ lang_env_dependencies = { module=libada; };
+-lang_env_dependencies = { module=libgfortran; };
+ lang_env_dependencies = { module=libffi; };
+ lang_env_dependencies = { module=libjava; cxx=true; };
+ lang_env_dependencies = { module=libmudflap; };
+
+--- tmp/configure.orgig 2006-09-06 10:01:52.000000000 +0100
++++ tmp/configure 2006-09-06 10:01:52.000000000 +0100
+@@ -921,7 +921,6 @@
+ target-libstdc++-v3 \
+ target-libmudflap \
+ target-libssp \
+- target-libgfortran \
+ ${libgcj} \
+ target-libobjc \
+ target-libada"
+@@ -2246,135 +2245,6 @@
+ fi
+
+
+-
+-
+-
+-
+-# Check for GMP and MPFR
+-gmplibs=
+-gmpinc=
+-have_gmp=yes
+-# Specify a location for mpfr
+-# check for this first so it ends up on the link line before gmp.
+-# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
+-if test "${with_mpfr_dir+set}" = set; then
+- withval="$with_mpfr_dir"
+- :
+-fi
+-
+-
+-if test "x$with_mpfr_dir" != x; then
+- gmpinc="-I$with_mpfr_dir"
+- gmplibs="$with_mpfr_dir/libmpfr.a"
+-else
+- gmplibs="-lmpfr"
+-fi
+-
+-# Check whether --with-mpfr or --without-mpfr was given.
+-if test "${with_mpfr+set}" = set; then
+- withval="$with_mpfr"
+- :
+-fi
+-
+-
+-if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
+- gmpinc="-I$with_mpfr/include"
+-fi
+-
+-# Specify a location for gmp
+-# Check whether --with-gmp-dir or --without-gmp-dir was given.
+-if test "${with_gmp_dir+set}" = set; then
+- withval="$with_gmp_dir"
+- :
+-fi
+-
+-
+-if test "x$with_gmp_dir" != x; then
+- gmpinc="$gmpinc -I$with_gmp_dir"
+- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
+- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
+- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
+- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
+- fi
+- # One of the later tests will catch the error if neither library is present.
+-else
+- gmplibs="$gmplibs -lgmp"
+-fi
+-
+-# Check whether --with-gmp or --without-gmp was given.
+-if test "${with_gmp+set}" = set; then
+- withval="$with_gmp"
+- :
+-fi
+-
+-
+-if test "x$with_gmp" != x; then
+- gmplibs="-L$with_gmp/lib $gmplibs"
+- gmpinc="-I$with_gmp/include $gmpinc"
+-fi
+-
+-saved_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $gmpinc"
+-# Check GMP actually works
+-echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
+-echo "configure:2322: checking for correct version of gmp.h" >&5
+-cat > conftest.$ac_ext <<EOF
+-#line 2324 "configure"
+-#include "confdefs.h"
+-#include "gmp.h"
+-int main() {
+-
+-#if __GNU_MP_VERSION < 3
+-choke me
+-#endif
+-
+-; return 0; }
+-EOF
+-if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- echo "$ac_t""yes" 1>&6
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- echo "$ac_t""no" 1>&6; have_gmp=no
+-fi
+-rm -f conftest*
+-
+-if test x"$have_gmp" = xyes; then
+- echo $ac_n "checking for MPFR""... $ac_c" 1>&6
+-echo "configure:2348: checking for MPFR" >&5
+-
+- saved_LIBS="$LIBS"
+- LIBS="$LIBS $gmplibs"
+- cat > conftest.$ac_ext <<EOF
+-#line 2353 "configure"
+-#include "confdefs.h"
+-#include <gmp.h>
+-#include <mpfr.h>
+-int main() {
+-mpfr_t n; mpfr_init(n);
+-; return 0; }
+-EOF
+-if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- echo "$ac_t""yes" 1>&6
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- echo "$ac_t""no" 1>&6; have_gmp=no
+-fi
+-rm -f conftest*
+- LIBS="$saved_LIBS"
+- CFLAGS="$saved_CFLAGS"
+-fi
+-
+-# Flags needed for both GMP and/or MPFR
+-
+-
+-
+ # By default, C is the only stage 1 language.
+ stage1_languages=c
+
+@@ -2402,15 +2272,6 @@
+ fi
+ enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
+
+- # 'f95' is the old name for the 'fortran' language. We issue a warning
+- # and make the substitution.
+- case ,${enable_languages}, in
+- *,f95,*)
+- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+- enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
+- ;;
+- esac
+-
+ # First scan to see if an enabled language requires some other language.
+ # We assume that a given config-lang.in will list all the language
+ # front ends it requires, even if some are required indirectly.
+@@ -5036,81 +4897,6 @@
+ fi
+ fi
+
+- for ncn_progname in gfortran; do
+- if test -n "$ncn_target_tool_prefix"; then
+- # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
+-set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:5045: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- if test -n "$GFORTRAN_FOR_TARGET"; then
+- ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
+-else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
+-fi
+-fi
+-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+-if test -n "$GFORTRAN_FOR_TARGET"; then
+- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+-else
+- echo "$ac_t""no" 1>&6
+-fi
+-
+- fi
+- if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
+- # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+-set dummy ${ncn_progname}; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:5076: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- if test -n "$GFORTRAN_FOR_TARGET"; then
+- ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
+-else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
+-fi
+-fi
+-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+-if test -n "$GFORTRAN_FOR_TARGET"; then
+- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+-else
+- echo "$ac_t""no" 1>&6
+-fi
+-
+- fi
+- test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
+-done
+-
+-if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
+- set dummy gfortran
+- if test $build = $target ; then
+- GFORTRAN_FOR_TARGET="$2"
+- else
+- GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
+- fi
+-fi
+-
+ for ncn_progname in ld; do
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
+@@ -5843,34 +5629,6 @@
+ echo "$ac_t""pre-installed" 1>&6
+ fi
+ fi
+-echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
+-echo "configure:5848: checking where to find the target gfortran" >&5
+-if test "x${build}" != "x${host}" ; then
+- # Canadian cross, just use what we found
+- echo "$ac_t""pre-installed" 1>&6
+-else
+- ok=yes
+- case " ${configdirs} " in
+- *" gcc "*) ;;
+- *) ok=no ;;
+- esac
+- case ,${enable_languages}, in
+- *,fortran,*) ;;
+- *) ok=no ;;
+- esac
+- if test $ok = yes; then
+- # An in-tree tool is available and we can use it
+- GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
+- echo "$ac_t""just compiled" 1>&6
+- elif test "x$target" = "x$host"; then
+- # We can use an host tool
+- GFORTRAN_FOR_TARGET='$(GFORTRAN)'
+- echo "$ac_t""host tool" 1>&6
+- else
+- # We need a cross tool
+- echo "$ac_t""pre-installed" 1>&6
+- fi
+-fi
+ echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
+ echo "configure:5876: checking where to find the target ld" >&5
+ if test "x${build}" != "x${host}" ; then
+@@ -6413,7 +6171,6 @@
+ s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
+ s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
+ s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
+-s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
+ s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
+ s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
+ s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
+
+--- tmp/config-ml.in.orig 2006-09-06 10:27:49.000000000 +0100
++++ tmp/config-ml.in 2006-09-06 10:27:49.000000000 +0100
+@@ -785,14 +785,12 @@
+ break
+ fi
+ done
+- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
++ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"'
+
+ if [ "${with_target_subdir}" = "." ]; then
+ CC_=$CC' '
+ CXX_=$CXX' '
+- F77_=$F77' '
+ GCJ_=$GCJ' '
+- GFORTRAN_=$GFORTRAN' '
+ else
+ # Create a regular expression that matches any string as long
+ # as ML_POPDIR.
+@@ -821,18 +819,6 @@
+ esac
+ done
+
+- F77_=
+- for arg in ${F77}; do
+- case $arg in
+- -[BIL]"${ML_POPDIR}"/*)
+- 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"`' ' ;;
+- "${ML_POPDIR}"/*)
+- 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"`' ' ;;
+- *)
+- F77_="${F77_}${arg} " ;;
+- esac
+- done
+-
+ GCJ_=
+ for arg in ${GCJ}; do
+ case $arg in
+@@ -845,18 +831,6 @@
+ esac
+ done
+
+- GFORTRAN_=
+- for arg in ${GFORTRAN}; do
+- case $arg in
+- -[BIL]"${ML_POPDIR}"/*)
+- 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"`' ' ;;
+- "${ML_POPDIR}"/*)
+- 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"`' ' ;;
+- *)
+- GFORTRAN_="${GFORTRAN_}${arg} " ;;
+- esac
+- done
+-
+ if test "x${LD_LIBRARY_PATH+set}" = xset; then
+ LD_LIBRARY_PATH_=
+ 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 0000000..b984605
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc-new-makeinfo.patch
@@ -0,0 +1,35 @@
+---
+ configure | 2 +-
+ configure.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- gcc-2006q1.orig/configure
++++ gcc-2006q1/configure
+@@ -3453,11 +3453,11 @@ case " $build_configdirs " in
+ *)
+
+ # For an installed makeinfo, we require it to be from texinfo 4.2 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+ fi
+ ;;
+--- gcc-2006q1.orig/configure.in
++++ gcc-2006q1/configure.in
+@@ -2078,11 +2078,11 @@ case " $build_configdirs " in
+ *)
+ changequote(,)
+ # For an installed makeinfo, we require it to be from texinfo 4.2 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+ fi
+ ;;
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 0000000..cdb20be
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc34-arm-tune.patch
@@ -0,0 +1,9 @@
+--- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400
+@@ -126,3 +126,6 @@
+
+ #define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
++
++/* Tune for XScale. */
++#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 0000000..3d33bcb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
+@@ -1907,7 +1907,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
+@@ -2669,7 +2669,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ 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 0000000..fa21b26
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/gcc_optab_arm.patch
@@ -0,0 +1,95 @@
+ARM is the only architecture that has a helper function that returns
+an unbiased result. This fix is trivial enough that we can show it
+doesn't effect any of the other arches. Can we consider this a
+regression fix since it used to work until the helper was added :}
+
+Tested with no regressions on x86_64-pc-linux-gnu and arm-none-eabi.
+
+Cheers,
+Carlos.
+--
+Carlos O'Donell
+CodeSourcery
+carlos@codesourcery.com
+(650) 331-3385 x716
+
+gcc/
+
+2006-01-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias
+ the comparison routine return.
+
+gcc/testsuite/
+
+2006-01-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * gcc.dg/unsigned-long-compare.c: New test.
+
+Index: gcc/optabs.c
+===================================================================
+--- 1/gcc/optabs.c (revision 110300)
++++ 2/gcc/optabs.c (working copy)
+@@ -3711,18 +3711,24 @@
+ result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK,
+ word_mode, 2, x, mode, y, mode);
+
++ /* There are two kinds of comparison routines. Biased routines
++ return 0/1/2, and unbiased routines return -1/0/1. Other parts
++ of gcc expect that the comparison operation is equivalent
++ to the modified comparison. For signed comparisons compare the
++ result against 1 in the unbiased case, and zero in the biased
++ case. For unsigned comparisons always compare against 1 after
++ biasing the unbased result by adding 1. This gives us a way to
++ represent LTU. */
+ *px = result;
+ *pmode = word_mode;
+- if (TARGET_LIB_INT_CMP_BIASED)
+- /* Integer comparison returns a result that must be compared
+- against 1, so that even if we do an unsigned compare
+- afterward, there is still a value that can represent the
+- result "less than". */
+- *py = const1_rtx;
+- else
++ *py = const1_rtx;
++
++ if (!TARGET_LIB_INT_CMP_BIASED)
+ {
+- *py = const0_rtx;
+- *punsignedp = 1;
++ if (*punsignedp)
++ *px = plus_constant (result, 1);
++ else
++ *py = const0_rtx;
+ }
+ return;
+ }
+Index: gcc/testsuite/gcc.dg/unsigned-long-compare.c
+===================================================================
+--- 1/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
++++ 2/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0)
+@@ -0,0 +1,24 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc. */
++/* Contributed by Carlos O'Donell on 2006-01-27 */
++
++/* Test a division corner case where the expression simplifies
++ to a comparison, and the optab expansion is wrong. The optab
++ expansion emits a function whose return is unbiased and needs
++ adjustment. */
++/* Origin: Carlos O'Donell <carlos@codesourcery.com> */
++/* { dg-do run { target arm-*-*eabi* } } */
++/* { dg-options "" } */
++#include <stdlib.h>
++
++#define BIG_CONSTANT 0xFFFFFFFF80000000ULL
++
++int main (void)
++{
++ unsigned long long OneULL = 1ULL;
++ unsigned long long result;
++
++ result = OneULL / BIG_CONSTANT;
++ if (result)
++ abort ();
++ exit (0);
++}
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 0000000..e5d12cf
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/no-libfloat.patch
@@ -0,0 +1,11 @@
+--- gcc/gcc/config/arm/linux-elf.h.old 2005-04-20 00:46:28.923375320 +0100
++++ gcc/gcc/config/arm/linux-elf.h 2005-04-20 00:46:34.181575952 +0100
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ 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 0000000..9a49794
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/pic-without-sl.patch
@@ -0,0 +1,303 @@
+Index: gcc/config/arm/arm-protos.h
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm-protos.h,v
+retrieving revision 1.60.4.20
+diff -u -r1.60.4.20 arm-protos.h
+--- gcc/config/arm/arm-protos.h 29 Mar 2005 03:00:11 -0000 1.60.4.20
++++ gcc/config/arm/arm-protos.h 23 Apr 2005 04:41:06 -0000
+@@ -64,6 +64,7 @@
+ extern enum reg_class vfp_secondary_reload_class (enum machine_mode, rtx);
+ extern int tls_symbolic_operand (rtx, enum machine_mode);
+ extern bool arm_tls_operand_p (rtx x);
++extern bool arm_pc_pic_operand_p (rtx x);
+
+ /* Predicates. */
+ extern int s_register_operand (rtx, enum machine_mode);
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.303.2.79
+diff -u -r1.303.2.79 arm.c
+--- gcc/config/arm/arm.c 12 Apr 2005 06:17:07 -0000 1.303.2.79
++++ gcc/config/arm/arm.c 23 Apr 2005 04:41:09 -0000
+@@ -1003,7 +1003,7 @@
+
+ /* If stack checking is disabled, we can use r10 as the PIC register,
+ which keeps r9 available. */
+- if (flag_pic)
++ if (0 && flag_pic)
+ arm_pic_register = TARGET_APCS_STACK ? 9 : 10;
+
+ if (TARGET_APCS_FLOAT)
+@@ -3120,6 +3120,10 @@
+ rtx
+ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
+ {
++ if (GET_CODE (orig) == UNSPEC
++ && XINT (orig, 1) == UNSPEC_GOTSLOTPC)
++ abort ();
++
+ if (GET_CODE (orig) == SYMBOL_REF
+ || GET_CODE (orig) == LABEL_REF)
+ {
+@@ -3149,27 +3153,80 @@
+ else
+ address = reg;
+
+- if (TARGET_ARM)
+- emit_insn (gen_pic_load_addr_arm (address, orig));
+- else
+- emit_insn (gen_pic_load_addr_thumb (address, orig));
++ if (arm_pic_register != INVALID_REGNUM)
++ {
++ /* Using GP-based PIC addressing. */
++ if (TARGET_ARM)
++ emit_insn (gen_pic_load_addr_arm (address, orig));
++ else
++ emit_insn (gen_pic_load_addr_thumb (address, orig));
++
++ if ((GET_CODE (orig) == LABEL_REF
++ || (GET_CODE (orig) == SYMBOL_REF &&
++ SYMBOL_REF_LOCAL_P (orig)))
++ && NEED_GOT_RELOC)
++ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
++ else
++ {
++ pic_ref = gen_rtx_MEM (Pmode,
++ gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
++ address));
++ RTX_UNCHANGING_P (pic_ref) = 1;
++ }
+
+- if ((GET_CODE (orig) == LABEL_REF
+- || (GET_CODE (orig) == SYMBOL_REF &&
+- SYMBOL_REF_LOCAL_P (orig)))
+- && NEED_GOT_RELOC)
+- pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
++ current_function_uses_pic_offset_table = 1;
++ }
+ else
+ {
+- pic_ref = gen_rtx_MEM (Pmode,
+- gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
+- address));
+- RTX_UNCHANGING_P (pic_ref) = 1;
++ /* Using PC-based PIC addressing. */
++ rtx label, tmp;
++ int offset;
++
++ label = gen_label_rtx ();
++ offset = TARGET_ARM ? 8 : 4;
++
++ if (GET_CODE (orig) == LABEL_REF
++ || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
++ {
++ /* This symbol is defined locally. We don't need a GOT entry. */
++ tmp = gen_rtx_MINUS (Pmode, gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_PIC_SYM), gen_rtx_PLUS (Pmode,
++ gen_rtx_LABEL_REF (Pmode, label),
++ GEN_INT (offset)));
++
++ load_tls_operand (tmp, address);
++
++ if (TARGET_ARM)
++ emit_insn (gen_pic_add_dot_plus_eight (address, label));
++ else
++ emit_insn (gen_pic_add_dot_plus_four (address, label));
++ }
++ else
++ {
++ rtx x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_GOTSLOTPC);
++ rtx dummy_label;
++
++ dummy_label = gen_label_rtx ();
++ LABEL_PRESERVE_P (dummy_label) = 1;
++ LABEL_NUSES (dummy_label) = 1;
++
++ tmp = gen_rtx_MINUS (Pmode, x, gen_rtx_PLUS (Pmode,
++ gen_rtx_LABEL_REF (Pmode, label),
++ GEN_INT (offset)));
++
++ load_tls_operand (tmp, address);
++
++ if (TARGET_ARM)
++ emit_insn (gen_tls_load_dot_plus_eight (address, address, label, dummy_label));
++ else
++ emit_insn (gen_tls_load_dot_plus_four (address, address, label, dummy_label));
++ }
++
++ pic_ref = address;
+ }
+
+ insn = emit_move_insn (reg, pic_ref);
+ #endif
+- current_function_uses_pic_offset_table = 1;
++
+ /* Put a REG_EQUAL note on this insn, so that it can be optimized
+ by loop. */
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
+@@ -3179,11 +3236,17 @@
+ else if (GET_CODE (orig) == CONST)
+ {
+ rtx base, offset;
++ bool minus = FALSE;
+
+ if (GET_CODE (XEXP (orig, 0)) == PLUS
+ && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
+ return orig;
+
++ if (GET_CODE (XEXP (orig, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (orig, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (orig, 0), 0), 1) == UNSPEC_GOTSLOTPC)
++ return orig;
++
+ if (GET_CODE (XEXP (orig, 0)) == UNSPEC)
+ return orig;
+
+@@ -3201,6 +3264,13 @@
+ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
+ base == reg ? 0 : reg);
+ }
++ else if (GET_CODE (XEXP (orig, 0)) == MINUS)
++ {
++ minus = TRUE;
++ base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
++ offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
++ base == reg ? 0 : reg);
++ }
+ else
+ abort ();
+
+@@ -3228,7 +3298,7 @@
+ return reg;
+ }
+
+- return gen_rtx_PLUS (Pmode, base, offset);
++ return minus ? gen_rtx_MINUS (Pmode, base, offset) : gen_rtx_PLUS (Pmode, base, offset);
+ }
+
+ return orig;
+@@ -3267,7 +3337,7 @@
+ rtx l1, pic_tmp, pic_tmp2, pic_rtx;
+ rtx global_offset_table;
+
+- if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
++ if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE || arm_pic_register == INVALID_REGNUM)
+ return;
+
+ if (!flag_pic)
+@@ -3341,8 +3411,11 @@
+ static int
+ pcrel_constant_p (rtx x)
+ {
++ if (GET_CODE (x) == CONST)
++ return pcrel_constant_p (XEXP (x, 0));
++
+ if (GET_CODE (x) == MINUS)
+- return symbol_mentioned_p (XEXP (x, 0)) && label_mentioned_p (XEXP (x, 1));
++ 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));
+
+ if (GET_CODE (x) == UNSPEC
+ && XINT (x, 1) == UNSPEC_TLS
+@@ -3946,12 +4019,32 @@
+ return SYMBOL_REF_TLS_MODEL (op);
+ }
+
++bool
++arm_pc_pic_operand_p (rtx op)
++{
++ if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTSLOTPC)
++ return 1;
++
++ if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == MINUS
++ && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC
++ && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_PIC_SYM)
++ return 1;
++
++ return 0;
++}
++
+ /* Valid input to a move instruction. */
+ int
+ move_input_operand (rtx op, enum machine_mode mode)
+ {
+ if (tls_symbolic_operand (op, mode))
+ return 0;
++ if (pcrel_constant_p (op))
++ return 1;
+ return general_operand (op, mode);
+ }
+
+@@ -15634,11 +15727,34 @@
+ return TRUE;
+ }
+
++static bool
++arm_emit_got_decoration (FILE *fp, rtx x)
++{
++ rtx val;
++
++ val = XVECEXP (x, 0, 0);
++
++ fputs ("_gotslotpc_(", fp);
++
++ output_addr_const (fp, val);
++
++ fputc (')', fp);
++
++ return TRUE;
++}
++
+ bool
+ arm_output_addr_const_extra (FILE *fp, rtx x)
+ {
+ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS)
+ return arm_emit_tls_decoration (fp, x);
++ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSLOTPC)
++ return arm_emit_got_decoration (fp, x);
++ else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM)
++ {
++ output_addr_const (fp, XVECEXP (x, 0, 0));
++ return TRUE;
++ }
+ else if (GET_CODE (x) == CONST_VECTOR)
+ return arm_emit_vector_const (fp, x);
+
+Index: gcc/config/arm/arm.md
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.md,v
+retrieving revision 1.145.2.31
+diff -u -r1.145.2.31 arm.md
+--- gcc/config/arm/arm.md 28 Mar 2005 19:04:37 -0000 1.145.2.31
++++ gcc/config/arm/arm.md 23 Apr 2005 04:41:11 -0000
+@@ -88,6 +88,7 @@
+ (UNSPEC_WMADDS 18) ; Used by the intrinsic form of the iWMMXt WMADDS instruction.
+ (UNSPEC_WMADDU 19) ; Used by the intrinsic form of the iWMMXt WMADDU instruction.
+ (UNSPEC_TLS 20) ; A symbol that has been treated properly for TLS usage.
++ (UNSPEC_GOTSLOTPC 21)
+ ]
+ )
+
+@@ -4179,7 +4180,8 @@
+ && (CONSTANT_P (operands[1])
+ || symbol_mentioned_p (operands[1])
+ || label_mentioned_p (operands[1]))
+- && ! tls_mentioned_p (operands[1]))
++ && ! tls_mentioned_p (operands[1])
++ && ! arm_pc_pic_operand_p (operands[1]))
+ operands[1] = legitimize_pic_address (operands[1], SImode,
+ (no_new_pseudos ? operands[0] : 0));
+ }
+@@ -4412,7 +4414,8 @@
+ (mem:SI (unspec:SI [(plus:SI (match_dup 0)
+ (const (plus:SI (pc) (const_int 8))))]
+ UNSPEC_PIC_BASE)))
+- (use (label_ref (match_operand 1 "" "")))])]
++ (use (label_ref (match_operand 1 "" "")))
++ (use (label_ref (match_operand 1 "" "")))])]
+ ""
+ )
+
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 0000000..415335f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ 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 0000000..8b05cb7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ 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);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ 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);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ 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);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
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 0000000..921cab6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-csl-arm/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+Index: gcc-4.1.1/Makefile.in
+===================================================================
+--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
+@@ -194,6 +194,7 @@
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ 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 0000000..4f902fa
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -0,0 +1,47 @@
+INHIBIT_PACKAGE_STRIP = "1"
+
+# Compute how to get from libexecdir to bindir in python (easier than shell)
+BINRELPATH = "${@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))}"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install-host
+
+ install -d ${D}${target_base_libdir}
+ install -d ${D}${target_libdir}
+
+ # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
+ # gfortran is fully backwards compatible. This is a safe and practical solution.
+ ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true
+
+
+ # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
+ # found. These need to be relative paths so they work in different locations.
+ dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
+ install -d $dest
+ for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+ ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
+ done
+
+ # Remove things we don't need but keep share/java
+ for d in info man share/doc share/locale share/man share/info; do
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d
+ done
+
+ # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
+ if [ "${PN}" == "gcc-cross" -o "${PN}" == "gcc-crosssdk" ]; then
+ dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
+ oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc
+
+ # Ideally here we'd override the libgcc Makefile's idea of slibdir but
+ # for now, we just move the files to the correct location
+
+ install -d $dest${target_base_libdir}
+ mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
+ rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
+
+ # Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
+
+ mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
+ rmdir $dest${target_libdir}/gcc
+ fi
+}
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 0000000..40a9ed0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
@@ -0,0 +1,58 @@
+PACKAGES = "\
+ libgcc \
+ libgcc-dev \
+ libstdc++ \
+ libstdc++-precompile-dev \
+ libstdc++-dev \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libgfortran \
+ libgfortran-dev \
+ libmudflap \
+ libmudflap-dev \
+"
+
+FILES_libgcc = "${base_libdir}/libgcc*.so.*"
+FILES_libgcc-dev = " \
+ ${base_libdir}/libgcc*.so \
+ ${libdir}/${TARGET_SYS}/${BINV}/crt* \
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
+
+FILES_libg2c = "${target_libdir}/libg2c.so.*"
+FILES_libg2c-dev = "\
+ ${libdir}/libg2c.so \
+ ${libdir}/libg2c.a \
+ ${libdir}/libfrtbegin.a"
+
+FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+FILES_libstdc++-dev = "\
+ ${includedir}/c++/ \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++.la \
+ ${libdir}/libstdc++.a \
+ ${libdir}/libsupc++.la \
+ ${libdir}/libsupc++.a"
+
+FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
+
+FILES_libssp = "${libdir}/libssp.so.*"
+FILES_libssp-dev = " \
+ ${libdir}/libssp*.so \
+ ${libdir}/libssp*.a \
+ ${libdir}/libssp*.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
+
+FILES_libgfortran = "${libdir}/libgfortran.so.*"
+FILES_libgfortran-dev = " \
+ ${libdir}/libgfortran.a \
+ ${libdir}/libgfortran.so \
+ ${libdir}/libgfortranbegin.a"
+
+FILES_libmudflap = "${libdir}/libmudflap*.so.*"
+FILES_libmudflap-dev = "\
+ ${libdir}/libmudflap*.so \
+ ${libdir}/libmudflap*.a \
+ ${libdir}/libmudflap*.la"
+
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 0000000..23b9a48
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
@@ -0,0 +1,52 @@
+INHIBIT_PACKAGE_STRIP = "1"
+
+# Having anything auto depending on gcc-cross-sdk is a really bad idea...
+EXCLUDE_FROM_SHLIBS = "1"
+
+PACKAGES = "${PN} ${PN}-doc"
+
+FILES_${PN} = "\
+ ${bindir}/* \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
+ ${includedir}/c++/${BINV} \
+ ${prefix}/${TARGET_SYS}/bin/* \
+ ${prefix}/${TARGET_SYS}/lib/* \
+ ${prefix}/${TARGET_SYS}/usr/include/* \
+ "
+FILES_${PN}-doc = "\
+ ${infodir} \
+ ${mandir} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
+ "
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install-host
+
+ # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
+ rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
+ rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
+
+ # We care about g++ not c++
+ rm -f ${D}${bindir}/*c++
+
+ # We don't care about the gcc-<version> copies
+ rm -f ${D}${bindir}/*gcc-?.?*
+
+ # We use libiberty from binutils
+ rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
+ rm -f ${D}${libdir}/libiberty.a
+
+ # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
+ # found.
+ dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
+ install -d $dest
+ for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+ ln -sf ${bindir}/${TARGET_PREFIX}$t $dest$t
+ done
+}
+
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 0000000..3286da6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
@@ -0,0 +1,99 @@
+PACKAGES = "\
+ ${PN} ${PN}-symlinks \
+ g++ g++-symlinks \
+ cpp cpp-symlinks \
+ g77 g77-symlinks \
+ gfortran gfortran-symlinks \
+ gcov gcov-symlinks \
+ ${PN}-doc \
+"
+
+FILES_${PN} = "\
+ ${bindir}/${TARGET_PREFIX}gcc \
+ ${bindir}/${TARGET_PREFIX}gccbug \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
+"
+FILES_${PN}-symlinks = "\
+ ${bindir}/cc \
+ ${bindir}/gcc \
+ ${bindir}/gccbug \
+"
+
+FILES_g77 = "\
+ ${bindir}/${TARGET_PREFIX}g77 \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
+"
+FILES_g77-symlinks = "\
+ ${bindir}/g77 \
+ ${bindir}/f77 \
+"
+FILES_gfortran = "\
+ ${bindir}/${TARGET_PREFIX}gfortran \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
+"
+FILES_gfortran-symlinks = "\
+ ${bindir}/gfortran \
+ ${bindir}/f95"
+
+FILES_cpp = "\
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${base_libdir}/cpp \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
+FILES_cpp-symlinks = "${bindir}/cpp"
+
+FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
+FILES_gcov-symlinks = "${bindir}/gcov"
+
+FILES_g++ = "\
+ ${bindir}/${TARGET_PREFIX}g++ \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
+"
+FILES_g++-symlinks = "\
+ ${bindir}/c++ \
+ ${bindir}/g++ \
+"
+
+
+FILES_${PN}-doc = "\
+ ${infodir} \
+ ${mandir} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
+"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install-host
+
+ # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
+ rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
+ rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
+
+ # Hack around specs file assumptions
+ 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
+
+ # Cleanup manpages..
+ rm -rf ${D}${mandir}/man7
+
+ cd ${D}${bindir}
+
+ # We care about g++ not c++
+ rm -f *c++
+
+ # We don't care about the gcc-<version> ones for this
+ rm -f *gcc-?.?*
+
+ # Symlinks so we can use these trivially on the target
+ ln -sf ${TARGET_SYS}-g77 g77 || true
+ ln -sf ${TARGET_SYS}-gfortran gfortran || true
+ ln -sf ${TARGET_SYS}-g++ g++
+ ln -sf ${TARGET_SYS}-gcc gcc
+ ln -sf g77 f77 || true
+ ln -sf gfortran f95 || true
+ ln -sf g++ c++
+ ln -sf gcc cc
+ ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
+}
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 0000000..543bf24
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.3.3.bb
@@ -0,0 +1,11 @@
+PR = "r15"
+
+require gcc-${PV}.inc
+require gcc-configure-runtime.inc
+require gcc-package-runtime.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
+EXTRA_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 0000000..28bae50
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.0.bb
@@ -0,0 +1,11 @@
+PR = "r6"
+
+require gcc-${PV}.inc
+require gcc-configure-runtime.inc
+require gcc-package-runtime.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
+EXTRA_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 0000000..a2ae0c0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_4.3.3.bb
@@ -0,0 +1,10 @@
+PR = "r8"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
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 0000000..e133c5b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_4.5.0.bb
@@ -0,0 +1,10 @@
+PR = "r6"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
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 0000000..832167c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
@@ -0,0 +1,5 @@
+PR = "r1"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require 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 0000000..16b653e
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -0,0 +1,48 @@
+DESCRIPTION = "gdb - GNU debugger"
+HOMEPAGE = "http://www.gnu.org/software/gdb/"
+LICENSE="GPLv3+"
+SECTION = "devel"
+PRIORITY = "optional"
+DEPENDS = "ncurses readline elfutils"
+
+inherit autotools
+
+SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
+ file://no-werror.patch"
+
+export CC_FOR_BUILD = "${BUILD_CC}"
+export CXX_FOR_BUILD = "${BUILD_CXX}"
+export CPP_FOR_BUILD = "${BUILD_CPP}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
+export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
+
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
+
+EXPAT = "--without-expat"
+
+EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
+ --with-curses --disable-multilib --with-system-readline --disable-sim \
+ ${GDBPROPREFIX} --with-libelf=${STAGING_DIR_TARGET} ${EXPAT}"
+GDBPROPREFIX = "--program-prefix=''"
+
+do_configure () {
+ # override this function to avoid the autoconf/automake/aclocal/autoheader
+ # calls for now
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ oe_runconf
+}
+
+# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
+# right bits installed by binutils.
+do_install_append() {
+ rm -rf ${D}${libdir}
+ rm -rf ${D}${includedir}
+ rm -rf ${D}${datadir}/locale
+}
+
+RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
+RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
+
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 0000000..3adcdcc
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.1.bb
@@ -0,0 +1,10 @@
+require gdb-common.inc
+
+DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk"
+
+inherit cross-canadian
+
+PR = "r1"
+
+GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
+EXPAT = "--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 0000000..20db86b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -0,0 +1,10 @@
+require gdb-common.inc
+
+DEPENDS = "ncurses-native"
+
+#EXTRA_OEMAKE += "LDFLAGS='${BUILD_LDFLAGS}'"
+
+GDBPROPREFIX = ""
+
+inherit cross
+inherit 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 0000000..3e4ce6f
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.1.bb
@@ -0,0 +1,5 @@
+require gdb-cross.inc
+
+SRC_URI += "file://sim-install-6.6.patch;patch=1"
+
+PR = "r1"
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
new file mode 100644
index 0000000..0ddd90b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -0,0 +1,12 @@
+require gdb-common.inc
+
+inherit gettext
+
+SRC_URI += "file://kill_arm_map_symbols.patch \
+ file://gdbserver-cflags-last.diff;striplevel=0 "
+#LDFLAGS_append = " -s"
+#export CFLAGS_append=" -L${STAGING_LIBDIR}"
+
+# cross-canadian must not see this
+PACKAGES =+ "gdbserver"
+FILES_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 0000000..41395f9
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/gdbserver-cflags-last.diff
@@ -0,0 +1,15 @@
+Index: gdb/gdbserver/Makefile.in
+===================================================================
+--- gdb/gdbserver/Makefile.in.orig
++++ gdb/gdbserver/Makefile.in
+@@ -89,8 +89,8 @@ WARN_CFLAGS = -Wall
+ CFLAGS = @CFLAGS@
+
+ # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
+-INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
+- ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS}
++INTERNAL_CFLAGS = $(WARN_CFLAGS) ${GLOBAL_CFLAGS} \
++ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CFLAGS}
+
+ # LDFLAGS is specifically reserved for setting from the command line
+ # 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 0000000..1771421
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
@@ -0,0 +1,24 @@
+Index: gdb-6.3/gdb/arm-tdep.c
+===================================================================
+--- gdb-6.3.orig/gdb/arm-tdep.c 2004-08-03 02:02:20.000000000 +0000
++++ gdb-6.3/gdb/arm-tdep.c 2005-11-09 15:13:29.000000000 +0000
+@@ -2491,6 +2491,19 @@
+ static void
+ arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
+ {
++
++ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
++ displaying disassembly so we use this horrible hack here to
++ artifically set their address to the highest possible value.
++ This is wrong of course, and it prevents the symbols from being
++ used for their intended purpose - to distinguish between ARM
++ and THUMB code. So we ought to find a better way to do this. */
++ if (bfd_asymbol_name (sym)
++ && bfd_asymbol_name (sym)[0] == '$'
++ && bfd_asymbol_name (sym)[1] != 0
++ && bfd_asymbol_name (sym)[2] == 0)
++ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
++
+ /* Thumb symbols are of type STT_LOPROC, (synonymous with
+ STT_ARM_TFUNC). */
+ 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 0000000..0d1897f
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/libiberty-cross.patch
@@ -0,0 +1,630 @@
+--- libiberty/configure.in.old 2004-03-31 21:25:25.000000000 +0100
++++ libiberty/configure.in 2004-03-31 21:18:02.000000000 +0100
+@@ -100,6 +100,7 @@
+ AC_CHECK_TOOL(RANLIB, ranlib, :)
+
+ LIB_AC_PROG_CC
++AC_PROG_CC_WORKS
+
+ AC_PROG_CC_C_O
+ # autoconf is lame and doesn't give us any substitution variable for this.
+@@ -402,7 +403,6 @@
+
+ # We haven't set the list of objects yet. Use the standard autoconf
+ # tests. This will only work if the compiler works.
+- AC_PROG_CC_WORKS
+ AC_REPLACE_FUNCS($funcs)
+ libiberty_AC_FUNC_C_ALLOCA
+ AC_FUNC_VFORK
+
+--- libiberty/configure.old 2003-06-19 21:05:35.000000000 +0100
++++ libiberty/configure 2004-03-31 21:35:12.000000000 +0100
+@@ -1000,13 +1000,60 @@
+ fi
+
+
++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++cat > conftest.$ac_ext << EOF
++
++#line 1016 "configure"
++#include "confdefs.h"
++
++main(){return(0);}
++EOF
++if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ ac_cv_prog_cc_works=yes
++ # If we can't run a trivial program, we are probably using a cross compiler.
++ if (./conftest; exit) 2>/dev/null; then
++ ac_cv_prog_cc_cross=no
++ else
++ ac_cv_prog_cc_cross=yes
++ fi
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ ac_cv_prog_cc_works=no
++fi
++rm -fr conftest*
++ac_ext=c
++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
++cross_compiling=$ac_cv_prog_cc_cross
++
++echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
++if test $ac_cv_prog_cc_works = no; then
++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
++fi
++echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
++echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
++cross_compiling=$ac_cv_prog_cc_cross
++
+
+ if test "x$CC" != xcc; then
+ echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
+-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
++echo "configure:1054: checking whether $CC and cc understand -c and -o together" >&5
+ else
+ echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
+-echo "configure:1010: checking whether cc understands -c and -o together" >&5
++echo "configure:1057: checking whether cc understands -c and -o together" >&5
+ fi
+ set dummy $CC; ac_cc="`echo $2 |
+ sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
+@@ -1018,16 +1065,16 @@
+ # We do the test twice because some compilers refuse to overwrite an
+ # existing .o file with -o, though they will create one.
+ ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
+-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
++if { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
++ test -f conftest.o && { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
++ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ ac_try='cc -c conftest.c -o conftest.o 1>&5'
+- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
++ if { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
++ test -f conftest.o && { (eval echo configure:1078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ then
+ # cc works too.
+ :
+@@ -1063,7 +1110,7 @@
+
+
+ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+-echo "configure:1067: checking for POSIXized ISC" >&5
++echo "configure:1114: checking for POSIXized ISC" >&5
+ if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+ then
+@@ -1084,12 +1131,12 @@
+ fi
+
+ echo $ac_n "checking for working const""... $ac_c" 1>&6
+-echo "configure:1088: checking for working const" >&5
++echo "configure:1135: checking for working const" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1093 "configure"
++#line 1140 "configure"
+ #include "confdefs.h"
+
+ int main() {
+@@ -1138,7 +1185,7 @@
+
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+ else
+@@ -1159,21 +1206,21 @@
+ fi
+
+ echo $ac_n "checking for inline""... $ac_c" 1>&6
+-echo "configure:1163: checking for inline" >&5
++echo "configure:1210: checking for inline" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_cv_c_inline=no
+ for ac_kw in inline __inline__ __inline; do
+ cat > conftest.$ac_ext <<EOF
+-#line 1170 "configure"
++#line 1217 "configure"
+ #include "confdefs.h"
+
+ int main() {
+ } $ac_kw foo() {
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_inline=$ac_kw; break
+ else
+@@ -1199,14 +1246,14 @@
+ esac
+
+ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+-echo "configure:1203: checking whether byte ordering is bigendian" >&5
++echo "configure:1250: checking whether byte ordering is bigendian" >&5
+ if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_cv_c_bigendian=unknown
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat > conftest.$ac_ext <<EOF
+-#line 1210 "configure"
++#line 1257 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -1217,11 +1264,11 @@
+ #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat > conftest.$ac_ext <<EOF
+-#line 1225 "configure"
++#line 1272 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -1232,7 +1279,7 @@
+ #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_bigendian=yes
+ else
+@@ -1252,7 +1299,7 @@
+ echo $ac_n "cross-compiling... " 2>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1256 "configure"
++#line 1303 "configure"
+ #include "confdefs.h"
+ main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+@@ -1265,7 +1312,7 @@
+ exit (u.c[sizeof (long) - 1] == 1);
+ }
+ EOF
+-if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_c_bigendian=no
+ else
+@@ -1283,7 +1330,7 @@
+ echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+ if test $ac_cv_c_bigendian = unknown; then
+ echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
+-echo "configure:1287: checking to probe for byte ordering" >&5
++echo "configure:1334: checking to probe for byte ordering" >&5
+
+ cat >conftest.c <<EOF
+ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+@@ -1352,7 +1399,7 @@
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # ./install, which can be erroneously created by make from ./install.sh.
+ echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+-echo "configure:1356: checking for a BSD compatible install" >&5
++echo "configure:1403: checking for a BSD compatible install" >&5
+ if test -z "$INSTALL"; then
+ if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1413,7 +1460,7 @@
+ # able to link anything, it had better be able to at least compile
+ # something.
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:1417: checking how to run the C preprocessor" >&5
++echo "configure:1464: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+@@ -1428,13 +1475,13 @@
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+-#line 1432 "configure"
++#line 1479 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -1445,13 +1492,13 @@
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+-#line 1449 "configure"
++#line 1496 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -1462,13 +1509,13 @@
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+-#line 1466 "configure"
++#line 1513 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -1496,17 +1543,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:1500: checking for $ac_hdr" >&5
++echo "configure:1547: checking for $ac_hdr" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1505 "configure"
++#line 1552 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -1533,12 +1580,12 @@
+ done
+
+ echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+-echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5
++echo "configure:1584: checking for sys/wait.h that is POSIX.1 compatible" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1542 "configure"
++#line 1589 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -1554,7 +1601,7 @@
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_sys_wait_h=yes
+ else
+@@ -1575,12 +1622,12 @@
+ fi
+
+ echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+-echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5
++echo "configure:1626: checking whether time.h and sys/time.h may both be included" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1584 "configure"
++#line 1631 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/time.h>
+@@ -1589,7 +1636,7 @@
+ struct tm *tp;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_time=yes
+ else
+@@ -1611,19 +1658,19 @@
+
+
+ echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
+-echo "configure:1615: checking whether errno must be declared" >&5
++echo "configure:1662: checking whether errno must be declared" >&5
+ if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1620 "configure"
++#line 1667 "configure"
+ #include "confdefs.h"
+ #include <errno.h>
+ int main() {
+ int x = errno;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ libiberty_cv_declare_errno=no
+ else
+@@ -1645,12 +1692,12 @@
+
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:1649: checking for ANSI C header files" >&5
++echo "configure:1696: checking for ANSI C header files" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1654 "configure"
++#line 1701 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -1658,7 +1705,7 @@
+ #include <float.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -1675,7 +1722,7 @@
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1679 "configure"
++#line 1726 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+ EOF
+@@ -1693,7 +1740,7 @@
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1697 "configure"
++#line 1744 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ EOF
+@@ -1714,7 +1761,7 @@
+ :
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1718 "configure"
++#line 1765 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+@@ -1725,7 +1772,7 @@
+ exit (0); }
+
+ EOF
+-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ :
+ else
+@@ -1749,12 +1796,12 @@
+ fi
+
+ echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
+-echo "configure:1753: checking for uintptr_t" >&5
++echo "configure:1800: checking for uintptr_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1758 "configure"
++#line 1805 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1790,12 +1837,12 @@
+
+
+ echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+-echo "configure:1794: checking for pid_t" >&5
++echo "configure:1841: checking for pid_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1799 "configure"
++#line 1846 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -1895,12 +1942,12 @@
+ realpath canonicalize_file_name
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:1899: checking for $ac_func" >&5
++echo "configure:1946: checking for $ac_func" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1904 "configure"
++#line 1951 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+@@ -1923,7 +1970,7 @@
+
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+ else
+@@ -2152,53 +2199,6 @@
+
+ # We haven't set the list of objects yet. Use the standard autoconf
+ # tests. This will only work if the compiler works.
+- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+-
+-ac_ext=c
+-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cc_cross
+-
+-cat > conftest.$ac_ext << EOF
+-
+-#line 2168 "configure"
+-#include "confdefs.h"
+-
+-main(){return(0);}
+-EOF
+-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- ac_cv_prog_cc_works=yes
+- # If we can't run a trivial program, we are probably using a cross compiler.
+- if (./conftest; exit) 2>/dev/null; then
+- ac_cv_prog_cc_cross=no
+- else
+- ac_cv_prog_cc_cross=yes
+- fi
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- ac_cv_prog_cc_works=no
+-fi
+-rm -fr conftest*
+-ac_ext=c
+-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cc_cross
+-
+-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+-if test $ac_cv_prog_cc_works = no; then
+- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+-fi
+-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+-cross_compiling=$ac_cv_prog_cc_cross
+-
+ for ac_func in $funcs
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+@@ -2900,7 +2900,7 @@
+ esac
+
+
+-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
++for ac_hdr in unistd.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -3032,24 +3032,11 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+
+-#if HAVE_SYS_TYPES_H
+-# include <sys/types.h>
+-#endif
+-
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
+-#endif
+-
+-#if HAVE_SYS_STAT_H
+-# include <sys/stat.h>
+-#endif
+-
+-#if HAVE_UNISTD_H
+-# include <unistd.h>
+-#endif
+-
+ /* This mess was copied from the GNU getpagesize.h. */
+ #ifndef HAVE_GETPAGESIZE
++# ifdef HAVE_UNISTD_H
++# include <unistd.h>
++# endif
+
+ /* Assume that all systems that can run configure have sys/param.h. */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -3157,7 +3144,7 @@
+ }
+
+ EOF
+-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_func_mmap_fixed_mapped=yes
+ else
+@@ -3181,7 +3168,7 @@
+
+
+ echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
+-echo "configure:3185: checking for working strncmp" >&5
++echo "configure:3172: checking for working strncmp" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3189,7 +3176,7 @@
+ ac_cv_func_strncmp_works=no
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 3193 "configure"
++#line 3180 "configure"
+ #include "confdefs.h"
+
+ /* Test by Jim Wilson and Kaveh Ghazi.
+@@ -3253,7 +3240,7 @@
+ }
+
+ EOF
+-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ ac_cv_func_strncmp_works=yes
+ 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 0000000..0926073
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/no-werror.patch
@@ -0,0 +1,78 @@
+---
+ bfd/warning.m4 | 2 +-
+ configure.ac | 2 +-
+ gdb/Makefile.in | 4 ++--
+ gdb/configure.ac | 8 ++------
+ 4 files changed, 6 insertions(+), 10 deletions(-)
+
+Index: gdb-7.1/bfd/warning.m4
+===================================================================
+--- gdb-7.1.orig/bfd/warning.m4
++++ gdb-7.1/bfd/warning.m4
+@@ -23,7 +23,7 @@ esac
+
+ # Enable -Werror by default when using gcc
+ if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+- ERROR_ON_WARNING=yes
++ ERROR_ON_WARNING=no
+ fi
+
+ NO_WERROR=
+Index: gdb-7.1/configure.ac
+===================================================================
+--- gdb-7.1.orig/configure.ac
++++ gdb-7.1/configure.ac
+@@ -3371,7 +3371,7 @@ AC_SUBST(stage1_checking)
+ AC_ARG_ENABLE(werror,
+ [ --enable-werror enable -Werror in bootstrap stage2 and later], [],
+ [if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+- enable_werror=yes
++ enable_werror=no
+ else
+ enable_werror=no
+ fi])
+Index: gdb-7.1/gdb/Makefile.in
+===================================================================
+--- gdb-7.1.orig/gdb/Makefile.in
++++ gdb-7.1/gdb/Makefile.in
+@@ -151,9 +151,9 @@ READLINE_CFLAGS = @READLINE_CFLAGS@
+ LIBEXPAT = @LIBEXPAT@
+
+ WARN_CFLAGS = @WARN_CFLAGS@
+-WERROR_CFLAGS = @WERROR_CFLAGS@
++WERROR_CFLAGS =
+ GDB_WARN_CFLAGS = $(WARN_CFLAGS)
+-GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
++GDB_WERROR_CFLAGS =
+
+ GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " | sed "s/ -Wformat-nonliteral / /g"`
+
+Index: gdb-7.1/gdb/configure.ac
+===================================================================
+--- gdb-7.1.orig/gdb/configure.ac
++++ gdb-7.1/gdb/configure.ac
+@@ -1525,15 +1525,12 @@ GDB_AC_WITH_DIR(SYSTEM_GDBINIT, system-g
+ AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
+ [case "${enableval}" in
+- yes | y) ERROR_ON_WARNING="yes" ;;
++ yes | y) ERROR_ON_WARNING="no" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
+ esac])
+
+ WERROR_CFLAGS=""
+-if test "${ERROR_ON_WARNING}" = yes ; then
+- WERROR_CFLAGS="-Werror"
+-fi
+
+ # The entries after -Wno-pointer-sign are disabled warnings which may
+ # be enabled in the future, which can not currently be used to build
+@@ -1587,7 +1584,6 @@ then
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+- -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ 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 0000000..a39ceab
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/sim-install-6.6.patch
@@ -0,0 +1,12 @@
+--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
++++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
+@@ -34,7 +34,7 @@
+
+ datadir = @datadir@
+ mandir = @mandir@
+-man1dir = $(mandir)/man1
++man1dir = $(DESTDIR)$(mandir)/man1
+ infodir = @infodir@
+ includedir = @includedir@
+
+
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 0000000..3c88c4c
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/sim-install.patch
@@ -0,0 +1,34 @@
+--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
++++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
+@@ -34,7 +34,7 @@
+
+ datadir = @datadir@
+ mandir = @mandir@
+-man1dir = $(mandir)/man1
++man1dir = $(DESTDIR)$(mandir)/man1
+ infodir = @infodir@
+ includedir = @includedir@
+
+
+--- gdb-6.1/sim/common/Make-common.in~sim-install.patch 2003-09-08 18:24:59.000000000 +0100
++++ gdb-6.1/sim/common/Make-common.in 2004-07-22 17:56:18.947423032 +0100
+@@ -581,14 +581,14 @@
+
+ install-common: installdirs
+ n=`echo run | sed '$(program_transform_name)'`; \
+- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
++ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+ n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
+- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
+- ( cd $(libdir) ; $(RANLIB) $$n )
++ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
++ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
+
+ installdirs:
+- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
+- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
++ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
++ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
+
+ check:
+ 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 0000000..3d6b7ba
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/uclibc.patch
@@ -0,0 +1,194 @@
+--- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
++++ binutils-2.15.91.0.1/bfd/config.bfd
+@@ -128,7 +128,7 @@
+ targ_defvec=ecoffalpha_little_vec
+ targ_selvecs=bfd_elf64_alpha_vec
+ ;;
+- alpha*-*-linux-gnu* | alpha*-*-elf*)
++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
+ targ_defvec=bfd_elf64_alpha_vec
+ targ_selvecs=ecoffalpha_little_vec
+ ;;
+@@ -138,7 +138,7 @@
+ alpha*-*-*)
+ targ_defvec=ecoffalpha_little_vec
+ ;;
+- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
++ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
+ targ_defvec=bfd_elf64_ia64_little_vec
+ targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+ ;;
+@@ -215,7 +215,7 @@
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+- armeb-*-elf | arm*b-*-linux-gnu*)
++ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
+ targ_defvec=bfd_elf32_bigarm_vec
+ targ_selvecs=bfd_elf32_littlearm_vec
+ ;;
+@@ -223,8 +223,8 @@
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
+- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
++ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
+ ;;
+@@ -367,7 +367,7 @@
+ ;;
+
+ #ifdef BFD64
+- hppa*64*-*-linux-gnu*)
++ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
+ targ_defvec=bfd_elf64_hppa_linux_vec
+ targ_selvecs=bfd_elf64_hppa_vec
+ ;;
+@@ -378,7 +378,7 @@
+ ;;
+ #endif
+
+- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
++ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
+ targ_defvec=bfd_elf32_hppa_linux_vec
+ targ_selvecs=bfd_elf32_hppa_vec
+ ;;
+@@ -501,7 +501,7 @@
+ targ_selvecs=bfd_elf32_i386_vec
+ targ_underscore=yes
+ ;;
+- i[3-7]86-*-linux-gnu*)
++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+ targ64_selvecs=bfd_elf64_x86_64_vec
+@@ -515,7 +515,7 @@
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
+ ;;
+- x86_64-*-linux-gnu*)
++ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
+ ;;
+@@ -690,7 +690,7 @@
+ targ_selvecs=bfd_elf32_m68k_vec
+ targ_underscore=yes
+ ;;
+- m68*-*-linux-gnu*)
++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
+ targ_defvec=bfd_elf32_m68k_vec
+ targ_selvecs=m68klinux_vec
+ ;;
+@@ -966,7 +966,8 @@
+ ;;
+ #endif
+ powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
+- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
++ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
++ powerpc-*-rtems* | \
+ powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
+ targ_defvec=bfd_elf32_powerpc_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+@@ -1003,8 +1004,8 @@
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+ ;;
+ powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
+- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
+- powerpcle-*-rtems*)
++ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
++ powerpcle-*-vxworks* | powerpcle-*-rtems*)
+ targ_defvec=bfd_elf32_powerpcle_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
+@@ -1165,7 +1166,7 @@
+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+ targ_underscore=yes
+ ;;
+- sparc-*-linux-gnu*)
++ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
+ ;;
+@@ -1212,7 +1213,7 @@
+ targ_defvec=sunos_big_vec
+ targ_underscore=yes
+ ;;
+- sparc64-*-linux-gnu*)
++ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
+ targ_defvec=bfd_elf64_sparc_vec
+ targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
+ ;;
+--- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
++++ binutils-2.15.91.0.1/bfd/configure
+@@ -1687,6 +1687,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+@@ -5266,7 +5271,7 @@
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ COREFILE=''
+ ;;
+- alpha*-*-linux-gnu*)
++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/alphalinux.h"'
+ ;;
+@@ -5326,7 +5331,7 @@
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/i386mach3.h"'
+ ;;
+- i[3-7]86-*-linux-gnu*)
++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/i386linux.h"'
+ ;;
+@@ -5364,7 +5369,7 @@
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/hp300bsd.h"'
+ ;;
+- m68*-*-linux-gnu*)
++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/m68klinux.h"'
+ ;;
+--- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
++++ binutils-2.15.91.0.1/bfd/configure.in
+@@ -164,7 +164,7 @@
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ COREFILE=''
+ ;;
+- alpha*-*-linux-gnu*)
++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/alphalinux.h"'
+ ;;
+@@ -245,7 +245,7 @@
+ TRAD_HEADER='"hosts/i386mach3.h"'
+ ;;
+ changequote(,)dnl
+- i[3-7]86-*-linux-gnu*)
++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
+ changequote([,])dnl
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/i386linux.h"'
+@@ -286,7 +286,7 @@
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/hp300bsd.h"'
+ ;;
+- m68*-*-linux-gnu*)
++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
+ COREFILE=trad-core.lo
+ TRAD_HEADER='"hosts/m68klinux.h"'
+ ;;
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 0000000..be40f3f
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb_7.1.bb
@@ -0,0 +1,3 @@
+require gdb.inc
+
+PR = "r2"
diff --git a/meta/recipes-devtools/genext2fs/genext2fs.inc b/meta/recipes-devtools/genext2fs/genext2fs.inc
new file mode 100644
index 0000000..859e49b
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "A tool to generate an ext2 filesystem \
+as a normal (non-root) user."
+HOMEPAGE = "http://genext2fs.sourceforge.net/"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://genext2fs.c;beginline=9;endline=17;md5=23ea077d1f7fbfd3a6fa573b415fa001"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/g/genext2fs/genext2fs_${PV}.orig.tar.gz"
+S = "${WORKDIR}/genext2fs-${PV}"
+
+inherit autotools
+
+BBCLASSEXTEND = "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 0000000..3c6f6ba
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs_1.4.1.bb
@@ -0,0 +1,3 @@
+require genext2fs.inc
+
+PR = "r0"
diff --git a/meta/recipes-devtools/git/files/autotools.patch b/meta/recipes-devtools/git/files/autotools.patch
new file mode 100644
index 0000000..1c69c22
--- /dev/null
+++ b/meta/recipes-devtools/git/files/autotools.patch
@@ -0,0 +1,14 @@
+Index: git-1.7.2.1/configure.ac
+===================================================================
+--- git-1.7.2.1.orig/configure.ac 2010-07-28 18:03:43.000000000 +0100
++++ git-1.7.2.1/configure.ac 2010-08-13 14:54:29.181971250 +0100
+@@ -697,7 +697,8 @@
+ else if (strcmp(buf, "12345"))
+ return 2;]])],
+ [ac_cv_c_c99_format=yes],
+- [ac_cv_c_c99_format=no])
++ [ac_cv_c_c99_format=no],
++ [ac_cv_c_c99_format=yes])
+ ])
+ if test $ac_cv_c_c99_format = no; then
+ 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 0000000..5d72df5
--- /dev/null
+++ b/meta/recipes-devtools/git/git.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "The git revision control system used by the Linux kernel developers"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "perl-native openssl curl zlib expat"
+
+SRC_URI = "http://www.kernel.org/pub/software/scm/git/git-${PV}.tar.bz2 \
+ file://autotools.patch;patch=1"
+S = "${WORKDIR}/git-${PV}"
+
+EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl --without-tcltk"
+
+inherit autotools
+
+do_install () {
+ oe_runmake install prefix=${D} bindir=${D}${bindir} \
+ template_dir=${D}${datadir}/git-core/templates \
+ GIT_PYTHON_DIR=${D}${datadir}/git-core/python
+}
+
+FILES_${PN} += "${datadir}/git-core"
+
+BBCLASSEXTEND = "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 0000000..7f822f6
--- /dev/null
+++ b/meta/recipes-devtools/git/git_1.7.2.1.bb
@@ -0,0 +1,3 @@
+require git.inc
+
+PR = "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 0000000..83c9eae
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp-4.2.1/disable-stdc.patch
@@ -0,0 +1,31 @@
+# "extern inline" in traditional gcc means that the function should be
+# inlined wherever it's seen, while in C99, "extern inline" means that i
+# the function should only be inlined where the inline definition is
+# seen while in other places it's not inlined:
+# http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
+#
+# gmp checks "--std=gnu99" to use C99 convention however it internally
+# defines some "extern inline" functions in gmp.h, which is included
+# by mainly .c files and finally lead a flood of redefinition function
+# errors when linking objects together.
+#
+# So disable C99/ANSI detection to stick to tranditional gcc behavior
+#
+# by Kevin Tian <kevin.tian@intel.com>, 2010-08-13
+#
+# (this patch is licensed under GPLv2+)
+
+diff --git a/configure.in b/configure.in
+index 450cc92..aab0b59 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
+ # The C compiler and preprocessor, put into ANSI mode if possible.
+ AC_PROG_CC
+-AC_PROG_CC_STDC
+ AC_PROG_CPP
+-GMP_H_ANSI
+
+
+ # 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 0000000..6b56f7e
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp.inc
@@ -0,0 +1,16 @@
+SECTION = "devel"
+DESCRIPTION = "GNU multiprecision arithmetic library"
+HOMEPAGE = "http://www.swox.com/gmp/"
+LICENSE = "GPLv3 LGPLv3"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/gmp/gmp-${PV}.tar.bz2 \
+ file://configure.patch \
+ file://amd64.patch "
+
+inherit autotools
+
+ARM_INSTRUCTION_SET = "arm"
+
+acpaths = ""
+
+BBCLASSEXTEND = "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 0000000..67be9dd
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/amd64.patch
@@ -0,0 +1,14 @@
+--- gmp-4.1.4/longlong.h.orig 2004-04-22 00:34:28.000000000 +0200
++++ gmp-4.1.4/longlong.h 2005-07-18 01:13:06.000000000 +0200
+@@ -738,8 +738,10 @@
+ count is only an int. */
+ #define count_trailing_zeros(count, x) \
+ do { \
++ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
++ (count) = __cbtmp; \
+ } while (0)
+ #endif /* x86_64 */
+
diff --git a/meta/recipes-devtools/gmp/gmp/configure.patch b/meta/recipes-devtools/gmp/gmp/configure.patch
new file mode 100644
index 0000000..ed0c02d
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/configure.patch
@@ -0,0 +1,195 @@
+ acinclude.m4 | 26 ++++++++++++++------------
+ configure.in | 24 +++++++++---------------
+ 2 files changed, 23 insertions(+), 27 deletions(-)
+
+Index: gmp-5.0.1/acinclude.m4
+===================================================================
+--- gmp-5.0.1.orig/acinclude.m4
++++ gmp-5.0.1/acinclude.m4
+@@ -30,20 +30,20 @@ dnl a_out.exe - OpenVMS DEC C called
+ dnl conftest.exe - various DOS compilers
+
+
+-define(IA64_PATTERN,
++define([IA64_PATTERN],
+ [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
+
+ dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
+ dnl of which config.sub accepts. (Though none of which are likely to work
+ dnl with GMP.)
+ dnl
+-define(M68K_PATTERN,
++define([M68K_PATTERN],
+ [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
+
+-define(POWERPC64_PATTERN,
++define([POWERPC64_PATTERN],
+ [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
+
+-define(X86_PATTERN,
++define([X86_PATTERN],
+ [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
+
+ define(X86_64_PATTERN,
+@@ -64,7 +64,7 @@ dnl x86 -> x86
+ dnl x86/k6 -> k6
+ dnl x86/k6/mmx -> k6_mmx
+
+-define(GMP_FAT_SUFFIX,
++define([GMP_FAT_SUFFIX],
+ [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
+
+
+@@ -73,7 +73,7 @@ dnl ----------------------------------
+ dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
+ dnl shell expression like $foo if desired.
+
+-define(GMP_REMOVE_FROM_LIST,
++define([GMP_REMOVE_FROM_LIST],
+ [remove_from_list_tmp=
+ for remove_from_list_i in $[][$1]; do
+ if test $remove_from_list_i = [$2]; then :;
+@@ -89,12 +89,12 @@ dnl GMP_STRIP_PATH(subdir)
+ dnl ----------------------
+ dnl Strip entries */subdir from $path and $fat_path.
+
+-define(GMP_STRIP_PATH,
++define([GMP_STRIP_PATH],
+ [GMP_STRIP_PATH_VAR(path, [$1])
+ GMP_STRIP_PATH_VAR(fat_path, [$1])
+ ])
+
+-define(GMP_STRIP_PATH_VAR,
++define([GMP_STRIP_PATH_VAR],
+ [tmp_path=
+ for i in $[][$1]; do
+ case $i in
+@@ -115,7 +115,7 @@ dnl
+ dnl Dummy value for GMP_LIMB_BITS is enough
+ dnl for all current configure-time uses of gmp.h.
+
+-define(GMP_INCLUDE_GMP_H,
++define([GMP_INCLUDE_GMP_H],
+ [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
+ #define GMP_NAIL_BITS $GMP_NAIL_BITS
+ #define GMP_LIMB_BITS 123
+@@ -130,7 +130,7 @@ dnl Expand at autoconf time to the valu
+ dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
+ dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
+
+-define(GMP_HEADER_GETVAL,
++define([GMP_HEADER_GETVAL],
+ [patsubst(patsubst(
+ esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
+ [^.*$1[ ]+],[]),
+@@ -144,7 +144,7 @@ dnl The gmp version number, extracted f
+ dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
+ dnl like 3.0.1 if patchlevel > 0.
+
+-define(GMP_VERSION,
++define([GMP_VERSION],
+ [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
+ .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
+ .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
+@@ -1506,7 +1506,9 @@ esac
+ echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
+
+ # All CPUs use asm-defs.m4
+-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
++echo -n ["include("] >>$gmp_tmpconfigm4i
++echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
++echo [")"] >>$gmp_tmpconfigm4i
+ ])
+
+
+Index: gmp-5.0.1/configure.in
+===================================================================
+--- gmp-5.0.1.orig/configure.in
++++ gmp-5.0.1/configure.in
+@@ -29,12 +29,6 @@ AC_REVISION($Revision$)
+ AC_PREREQ(2.59)
+ AC_INIT(GNU MP, GMP_VERSION, gmp-bugs@gmplib.org, gmp)
+ AC_CONFIG_SRCDIR(gmp-impl.h)
+-m4_pattern_forbid([^[ \t]*GMP_])
+-m4_pattern_allow(GMP_LDFLAGS)
+-m4_pattern_allow(GMP_LIMB_BITS)
+-m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
+-m4_pattern_allow(GMP_NAIL_BITS)
+-m4_pattern_allow(GMP_NUMB_BITS)
+
+ # If --target is not used then $target_alias is empty, but if say
+ # "./configure athlon-pc-freebsd3.5" is used, then all three of
+@@ -303,7 +297,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
+ # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
+ # called. User selections of CC etc are respected.
+ #
+-# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
++# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
+ # pre-testing, since they of course depend on AC_PROG_CC, and also some of
+ # them cache their results, which is not wanted.
+ #
+@@ -395,7 +389,7 @@ abilist="standard"
+ # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
+ # c89 over cc here. But note that on HP-UX c89 provides a castrated
+ # environment, and would want to be excluded somehow. Maybe
+-# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
++# already does enough to stick cc into ANSI mode and
+ # we don't need to worry.
+ #
+ cclist="gcc cc"
+@@ -1580,7 +1574,7 @@ esac
+ CFLAGS_or_unset=${CFLAGS-'(unset)'}
+ CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
+
+-cat >&AC_FD_CC <<EOF
++cat >&AS_MESSAGE_LOG_FD() <<EOF
+ User:
+ ABI=$ABI
+ CC=$CC
+@@ -1987,7 +1981,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
+ # The C compiler and preprocessor, put into ANSI mode if possible.
+ AC_PROG_CC
+-AC_PROG_CC_STDC
+ AC_PROG_CPP
+ GMP_H_ANSI
+
+@@ -2010,11 +2003,11 @@ AC_SUBST(CCAS)
+
+ # The C++ compiler, if desired.
+ want_cxx=no
++AC_PROG_CXX
+ if test $enable_cxx != no; then
+ test_CXXFLAGS=${CXXFLAGS+set}
+- AC_PROG_CXX
+
+- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
++ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
+ cxxflags_ac_prog_cxx=$CXXFLAGS
+ cxxflags_list=ac_prog_cxx
+
+@@ -2120,7 +2113,7 @@ case $host in
+ esac
+
+
+-cat >&AC_FD_CC <<EOF
++cat >&AS_MESSAGE_LOG_FD() <<EOF
+ Decided:
+ ABI=$ABI
+ CC=$CC
+@@ -3376,7 +3369,7 @@ GMP_FINISH
+ # FIXME: Upcoming version of autoconf/automake may not like broken lines.
+ # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
+
+-AC_OUTPUT(Makefile \
++AC_CONFIG_FILES([Makefile \
+ mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
+ mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
+ tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
+@@ -3385,4 +3378,5 @@ AC_OUTPUT(Makefile \
+ tests/cxx/Makefile \
+ doc/Makefile tune/Makefile \
+ demos/Makefile demos/calc/Makefile demos/expr/Makefile \
+- gmp.h:gmp-h.in mp.h:mp-h.in)
++ gmp.h:gmp-h.in mp.h:mp-h.in])
++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 0000000..1a01f61
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/sh4-asmfix.patch
@@ -0,0 +1,26 @@
+--- gmp-4.1.4/mpn/sh/add_n.s 2005/11/17 08:44:00 1.1
++++ gmp-4.1.4/mpn/sh/add_n.s 2005/11/17 08:18:57
+@@ -29,8 +29,8 @@
+
+ .text
+ .align 2
+- .global ___gmpn_add_n
+-___gmpn_add_n:
++ .global __gmpn_add_n
++__gmpn_add_n:
+ mov #0,r3 ! clear cy save reg
+
+ Loop: mov.l @r5+,r1
+--- gmp-4.1.4/mpn/sh/sub_n.s 2005/11/17 08:44:04 1.1
++++ gmp-4.1.4/mpn/sh/sub_n.s 2005/11/17 08:18:59
+@@ -29,8 +29,8 @@
+
+ .text
+ .align 2
+- .global ___gmpn_sub_n
+-___gmpn_sub_n:
++ .global __gmpn_sub_n
++__gmpn_sub_n:
+ mov #0,r3 ! clear cy save reg
+
+ 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 0000000..ee3891f
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp/use-includedir.patch
@@ -0,0 +1,13 @@
+Index: gmp-4.2.4/Makefile.am
+===================================================================
+--- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
++++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
+@@ -106,7 +106,7 @@
+ # but anyone knowledgable enough to be playing with exec_prefix will be able
+ # to address that.
+ #
+-includeexecdir = $(exec_prefix)/include
++includeexecdir = $(includedir)
+ include_HEADERS = $(GMPXX_HEADERS_OPTION)
+ nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION)
+ 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 0000000..d70dcf2
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp_4.2.1.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
+HOMEPAGE = "http://gmplib.org/"
+BUGTRACKER = "http://gmplib.org/mailman/listinfo/gmp-bugs"
+# demo is licensed under GPLv2+, which however we don't package at all
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
+ file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
+ file://gmp-h.in;startline=6;endline=21;md5=5e25ffd16996faba8c1cd27b04b16099"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/gmp/${BP}.tar.bz2 \
+ file://disable-stdc.patch"
+
+inherit 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 0000000..dd908bd
--- /dev/null
+++ b/meta/recipes-devtools/gmp/gmp_5.0.1.bb
@@ -0,0 +1,7 @@
+require gmp.inc
+
+PR = "r0"
+
+SRC_URI_append += "file://sh4-asmfix.patch \
+ file://use-includedir.patch "
+
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 0000000..f820cef
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/config-guess-uclibc.patch
@@ -0,0 +1,174 @@
+Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
+
+updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
+updated to 20080123 by Nitin A Kamble (by hand)
+
+Index: config/config.guess
+===================================================================
+--- config.orig/config.guess
++++ config/config.guess
+@@ -139,6 +139,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++# Detect uclibc systems.
++
++LIBC="gnu"
++if [ -f /usr/include/bits/uClibc_config.h ]
++then
++ LIBC=uclibc
++ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
++ then
++ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
++ LIBC=$LIBC$UCLIBC_SUBVER
++ fi
++fi
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -840,13 +853,13 @@ EOF
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+@@ -855,16 +868,16 @@ EOF
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo frv-unknown-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+@@ -887,7 +900,7 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -910,16 +923,16 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
++ echo or32-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -932,40 +945,40 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+@@ -980,20 +993,21 @@ EOF
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
++ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
+ ;;
+ a.out-i386-linux)
+- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
+ exit ;;
+ coff-i386)
+- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
+ exit ;;
+ esac
++ if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit; fi
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ 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 0000000..be8580c
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/gnu-configize.in
@@ -0,0 +1,267 @@
+#! /usr/bin/perl -w
+# -*- perl -*-
+
+eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac'
+ if 0;
+
+# gnu-configize - install the GNU config.guess / config.sub in a directory tree
+# Based on autoreconf:
+# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+BEGIN
+{
+ my $datadir = $ENV{'autom4te_perllibdir'} || '@autom4te_perllibdir@';
+# '/home/kergoth/code/build-arm/tmp/staging/share/autoconf';
+ unshift @INC, $datadir;
+
+ # Override SHELL. On DJGPP SHELL may not be set to a shell
+ # that can handle redirection and quote arguments correctly,
+ # e.g.: COMMAND.COM. For DJGPP always use the shell that configure
+ # has detected.
+ $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos');
+}
+
+use Autom4te::ChannelDefs;
+use Autom4te::Channels;
+use Autom4te::Configure_ac;
+use Autom4te::FileUtils;
+use Autom4te::General;
+use Autom4te::XFile;
+# Do not use Cwd::chdir, since it might hang.
+use Cwd 'cwd';
+use strict;
+
+## ----------- ##
+## Variables. ##
+## ----------- ##
+
+# $HELP
+# -----
+$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ...
+
+Install the GNU config.sub and config.guess scripts in the
+DIRECTORIES or the directory trees driven by CONFIGURE-AC
+(defaulting to `.').
+
+Operation modes:
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -v, --verbose verbosely report processing
+ -f, --force consider all files obsolete
+ -s, --symlink install symbolic links instead of copies
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
+
+" . Autom4te::ChannelDefs::usage . "
+
+The environment variable \`WARNINGS\' is honored. Some subtools might
+support other warning types, using \`all' is encouraged.
+";
+
+# $VERSION
+# --------
+$version = "gnu-configize 1.0
+
+Copyright (C) 2004 Chris Larson
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+";
+
+my $configdir = '@gnu-configdir@';
+#'/home/kergoth/code/build-arm/tmp/staging/i686-linux/share/gnu-config';
+my $autoconf = $ENV{'AUTOCONF'} || 'autoconf';
+
+# use symlinks instead.
+my $symlink = 0;
+
+my $configure_ac;
+
+my $rm = "rm -f";
+my $ln_s = "ln -sf";
+my $cp = "cp -f";
+my $mkdir = "mkdir";
+my $chmod = "chmod";
+
+## ---------- ##
+## Routines. ##
+## ---------- ##
+
+
+# parse_args ()
+# -------------
+# Process any command line arguments.
+sub parse_args ()
+{
+ my $srcdir;
+
+ getopt ('s|symlink' => \$symlink);
+
+ # Even if the user specified a configure.ac, trim to get the
+ # directory, and look for configure.ac again. Because (i) the code
+ # is simpler, and (ii) we are still able to diagnose simultaneous
+ # presence of configure.ac and configure.in.
+ @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV;
+ push @ARGV, '.' unless @ARGV;
+}
+
+
+# &gnu_configize_current_directory
+# -----------------------------
+sub gnu_configize_current_directory ()
+{
+ my $configure_ac = require_configure_ac;
+
+ # ---------------------- #
+ # Is it using Autoconf? #
+ # ---------------------- #
+
+ my $uses_autoconf;
+ my $uses_gettext;
+ my $configure_ac_file = new Autom4te::XFile $configure_ac;
+ while ($_ = $configure_ac_file->getline)
+ {
+ s/#.*//;
+ s/dnl.*//;
+ $uses_autoconf = 1 if /AC_INIT/;
+ }
+
+ if (!$uses_autoconf)
+ {
+ verb "$configure_ac: not using Autoconf";
+ return;
+ }
+
+ my $aux_dir;
+ my @subdir;
+ my $cmd;
+ my $dest;
+
+ verb "$configure_ac: tracing";
+ my $traces = new Autom4te::XFile
+ ("$autoconf"
+ . join (' --trace=', '',
+ # If you change this list, update the
+ # `Autoreconf-preselections' section of autom4te.in.
+ 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
+ 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
+ 'AC_INIT',
+ )
+ . ' |');
+ while ($_ = $traces->getline)
+ {
+ $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/;
+ $uses_autoconf = 1 if /AC_INIT/;
+ push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
+ }
+
+ # The subdirs are *optional*, they may not exist.
+ foreach (@subdir)
+ {
+ if (-d)
+ {
+ verb "$configure_ac: subdirectory $_ to gnu-configize";
+ gnu_configize ($_);
+ }
+ else
+ {
+ verb "$configure_ac: subdirectory $_ not present";
+ }
+ }
+
+ $dest = ".";
+
+ if (defined $aux_dir)
+ {
+ $dest = $aux_dir;
+ if (! -d $aux_dir)
+ {
+ verb "$configure_ac: creating directory $aux_dir";
+ mkdir $aux_dir
+ or error "cannot create $aux_dir: $!";
+ }
+ }
+
+ if (!$symlink)
+ {
+ $cmd = $cp;
+ }
+ else
+ {
+ $cmd = $ln_s;
+ }
+
+ xsystem ("$cmd $configdir/config.guess $dest/");
+ xsystem ("$chmod u+x $dest/config.guess");
+ xsystem ("$cmd $configdir/config.sub $dest/");
+ xsystem ("$chmod u+x $dest/config.sub");
+}
+
+
+# &gnu_configize ($DIRECTORY)
+# ------------------------
+# Reconf the $DIRECTORY.
+sub gnu_configize ($)
+{
+ my ($directory) = @_;
+ my $cwd = cwd;
+
+ # The format for this message is not free: taken from Emacs, itself
+ # using GNU Make's format.
+ verb "Entering directory `$directory'";
+ chdir $directory
+ or error "cannot chdir to $directory: $!";
+
+ gnu_configize_current_directory;
+
+ # The format is not free: taken from Emacs, itself using GNU Make's
+ # format.
+ verb "Leaving directory `$directory'";
+ chdir $cwd
+ or error "cannot chdir to $cwd: $!";
+}
+
+
+## ------ ##
+## Main. ##
+## ------ ##
+
+parse_args;
+
+# Autoreconf all the given configure.ac. A while loop, not a for,
+# since the list can change at runtime because of AC_CONFIG_SUBDIRS.
+for my $directory (@ARGV)
+ {
+ gnu_configize ($directory);
+ }
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## 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 0000000..20a3b11
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config/uclibc.patch
@@ -0,0 +1,21 @@
+--- config.sub.orig 2004-05-14 19:38:36.000000000 -0500
++++ config.sub 2004-05-14 19:39:17.000000000 -0500
+@@ -118,7 +118,7 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+@@ -1135,7 +1135,8 @@
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -mingw32* | -linux-gnu* | -linux-uclibc* \
++ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -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 0000000..66d027e
--- /dev/null
+++ b/meta/recipes-devtools/gnu-config/gnu-config_20080123.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "gnu-configize"
+SECTION = "devel"
+LICENSE = "GPL"
+DEPENDS = ""
+INHIBIT_DEFAULT_DEPS = "1"
+
+FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}"
+PV = "0.1+cvs${FIXEDSRCDATE}"
+PR = "r0"
+
+SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/config;module=config;method=pserver;date=${FIXEDSRCDATE} \
+ file://config-guess-uclibc.patch \
+ file://gnu-configize.in"
+S = "${WORKDIR}/config"
+
+do_compile() {
+ :
+}
+
+do_install () {
+ install -d ${D}${datadir}/gnu-config \
+ ${D}${bindir}
+ cat ${WORKDIR}/gnu-configize.in | \
+ sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \
+ -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize
+ # In the native case we want the system perl as perl-native can't have built yet
+ if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then
+ cat ${WORKDIR}/gnu-configize.in | \
+ sed -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize
+ fi
+ chmod 755 ${D}${bindir}/gnu-configize
+ install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${bindir} ${datadir}/gnu-config"
+
+BBCLASSEXTEND = "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 0000000..d2058e8
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-bash.patch
@@ -0,0 +1,286 @@
+guilt: explicitly call for bash
+
+Running complex guilt stacks of patches/commits can cause interesting
+failures after ~20m of processing, with errors like "Bad substitution".
+
+These have been traced back to having /bin/sh --> /bin/dash on Ubuntu
+systems. Putting a shell that actually *works* (such as /bin/bash)
+in as /bin/sh makes the problem go away. So here we change the guilt
+scripts to explicitly call for bash to ensure we don't have a similar
+issue after deployment.
+
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+---
+ guilt | 2 +-
+ guilt-add | 2 +-
+ guilt-applied | 2 +-
+ guilt-branch | 2 +-
+ guilt-delete | 2 +-
+ guilt-diff | 2 +-
+ guilt-export | 2 +-
+ guilt-files | 2 +-
+ guilt-fold | 2 +-
+ guilt-fork | 2 +-
+ guilt-graph | 2 +-
+ guilt-header | 2 +-
+ guilt-help | 2 +-
+ guilt-import | 2 +-
+ guilt-import-commit | 2 +-
+ guilt-init | 4 ++--
+ guilt-new | 2 +-
+ guilt-next | 2 +-
+ guilt-patchbomb | 2 +-
+ guilt-pop | 2 +-
+ guilt-prev | 2 +-
+ guilt-push | 2 +-
+ guilt-rebase | 2 +-
+ guilt-refresh | 2 +-
+ guilt-rm | 2 +-
+ guilt-series | 2 +-
+ guilt-status | 2 +-
+ guilt-top | 2 +-
+ guilt-unapplied | 2 +-
+ 29 files changed, 30 insertions(+), 30 deletions(-)
+
+--- a/guilt
++++ b/guilt
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006-2010
+ #
+--- a/guilt-add
++++ b/guilt-add
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-applied
++++ b/guilt-applied
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-branch
++++ b/guilt-branch
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007-2008
+ #
+--- a/guilt-delete
++++ b/guilt-delete
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-diff
++++ b/guilt-diff
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (C) 2007 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+ #
+--- a/guilt-export
++++ b/guilt-export
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Pierre Habouzit, 2007
+ #
+--- a/guilt-files
++++ b/guilt-files
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (C) 2007 Yasushi SHOJI <yashi@atmark-techno.com>
+ #
+--- a/guilt-fold
++++ b/guilt-fold
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-fork
++++ b/guilt-fork
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-graph
++++ b/guilt-graph
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-header
++++ b/guilt-header
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006-2010
+ #
+--- a/guilt-help
++++ b/guilt-help
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-import
++++ b/guilt-import
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-import-commit
++++ b/guilt-import-commit
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-init
++++ b/guilt-init
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+@@ -31,7 +31,7 @@ touch "$GUILT_DIR/$branch/status"
+
+ mkdir -p "$GIT_DIR/hooks/guilt"
+ cat > "$GIT_DIR/hooks/guilt/delete" <<EOF
+-#!/bin/sh
++#!/bin/bash
+ # Usage: <script> <patch being removed>
+
+ echo "Removing patch '\$1'..."
+--- a/guilt-new
++++ b/guilt-new
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-next
++++ b/guilt-next
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-patchbomb
++++ b/guilt-patchbomb
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-pop
++++ b/guilt-pop
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-prev
++++ b/guilt-prev
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-push
++++ b/guilt-push
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-rebase
++++ b/guilt-rebase
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2007
+ #
+--- a/guilt-refresh
++++ b/guilt-refresh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-rm
++++ b/guilt-rm
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-series
++++ b/guilt-series
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-status
++++ b/guilt-status
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-top
++++ b/guilt-top
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
+--- a/guilt-unapplied
++++ b/guilt-unapplied
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
+ #
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 0000000..78cc93e
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-import-commit.patch
@@ -0,0 +1,94 @@
+guilt: import commits via git format-patch
+
+Rather than attempting to process commits directly, it
+is preferable to try dumping the change via git format-patch
+to take advantage of the proper header/subject/from lines that
+are generated.
+
+If patches cannot be exported, fall back to importing
+commits via a more custom method.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt-import-commit | 40 +++++++++++++++++++++++++++++-----------
+ 1 file changed, 29 insertions(+), 11 deletions(-)
+
+--- a/guilt-import-commit
++++ b/guilt-import-commit
+@@ -20,46 +20,64 @@ fi
+ disp "About to begin conversion..." >&2
+ disp "Current head: `cat $GIT_DIR/refs/heads/$branch`" >&2
+
++# try git-format-patch first, if it fails fall back to internal
++# methods.
++patches=`git-format-patch -o $GUILT_DIR/$branch $rhash`
++if [ -z "$patches" ]; then
++ need_custom_patches="1"
++fi
++
+ for rev in `git rev-list $rhash`; do
++ if [ ! -z "$need_custom_patches" ]; then
+ s=`git log --pretty=oneline -1 $rev | cut -c 42-`
+
+ fname=`echo $s | sed -e "s/&/and/g" -e "s/[ :]/_/g" -e "s,[/\\],-,g" \
+- -e "s/['\\[{}]//g" -e 's/]//g' -e 's/\*/-/g' \
++ -e "s/['\\()<>[{}]//g" -e 's/]//g' -e 's/\*/-/g' \
+ -e 's/\?/-/g' | tr A-Z a-z`
+
+- disp "Converting `echo $rev | cut -c 1-8` as $fname"
++ disp "Converting `echo $rev | cut -c 1-8` as $fname.patch"
+
+ mangle_prefix=1
+ fname_base=$fname
+- while [ -f "$GUILT_DIR/$branch/$fname" ]; do
++ while [ -f "$GUILT_DIR/$branch/$fname.patch" ]; do
+ fname="$fname_base-$mangle_prefix"
+ mangle_prefix=`expr $mangle_prefix + 1`
+- disp "Patch under that name exists...trying '$fname'"
++ disp "Patch under that name exists...trying '$fname.patch'"
+ done
+
+ (
+ do_make_header $rev
+ echo ""
+ git diff --binary $rev^..$rev
+- ) > $GUILT_DIR/$branch/$fname
++ ) > $GUILT_DIR/$branch/$fname.patch
+
+ # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the
+ # timestamp on the patch
+
+- # insert the patch name into the series file
+- series_insert_patch $fname
++ patches="$patches $fname.patch"
++ fi
+
+- # Only reset if the commit was on this branch
+- if head_check $rev 2> /dev/null; then
++ # Only reset if the commit was on this branch
++ if head_check $rev 2> /dev/null; then
+ # BEWARE: "git reset" ahead! Is there a way to verify that
+ # we really created a patch? - We don't want to lose any
+ # history.
+ git reset --hard $rev^ > /dev/null
+- elif [ -z "$warned" ]; then
++ elif [ -z "$warned" ]; then
+ disp "Warning: commit $rev is not the HEAD...preserving commit" >&2
+ disp "Warning: (this message is displayed only once)" >&2
+ warned=t
+- fi
++ fi
++done
++
++rpatches=`echo "$patches" | sed 's% %\n%g' | tac`
++for patch in $rpatches; do
++
++ iname=`echo $patch | sed s%$GUILT_DIR/$branch/%%`
++ echo "Inserting $iname"
++
++ # insert the patch name into the series file
++ series_insert_patch $iname
+ done
+
+ 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 0000000..a06da5b
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-init.patch
@@ -0,0 +1,23 @@
+guilt: allow previously initialized branches to be re-initialized
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt-init | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/guilt-init
++++ b/guilt-init
+@@ -20,9 +20,9 @@ while case $# in 0) break ;; esac; do
+ shift
+ done
+
+-if [ -d "$GUILT_DIR/$branch" ]; then
+- die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
+-fi
++# if [ -d "$GUILT_DIR/$branch" ]; then
++# die "Branch $branch appears to be already initialized (GIT_DIR=$GIT_DIR)"
++# fi
+
+ [ ! -d "$GUILT_DIR" ] && mkdir "$GUILT_DIR"
+ 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 0000000..c26b324
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-pop.patch
@@ -0,0 +1,71 @@
+guilt: pop and delete tags
+
+Add support for popping to a tag and the ability to delete
+a tag while popping from the tree
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt-pop | 28 ++++++++++++++++++++++++++--
+ 1 file changed, 26 insertions(+), 2 deletions(-)
+
+--- a/guilt-pop
++++ b/guilt-pop
+@@ -17,6 +17,13 @@ while [ $# -gt 0 ]; do
+ -n)
+ num=t
+ ;;
++ -t|--t)
++ tag=$2
++ shift
++ ;;
++ -d|--d) # can only be used with --t
++ delete_tag=t
++ ;;
+ *)
+ break
+ ;;
+@@ -24,7 +31,7 @@ while [ $# -gt 0 ]; do
+ shift
+ done
+
+-# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo"
++# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo" or "guilt-pop -t <tag>"
+ if [ -z "$all" ] && [ $# -gt 1 ]; then
+ usage
+ fi
+@@ -44,12 +51,26 @@ fi
+ patch="$1"
+ [ ! -z "$all" ] && patch="-a"
+
++
++# tag processing will just roll into another one of
++# the pop types, number or patch name
++if [ ! -z "$tag" ]; then
++ git-rev-list HEAD ^$tag > /dev/null 2>/dev/null
++ if [ $? -eq 0 ]; then
++ revs="`git-rev-list HEAD ^$tag`"
++ num=`echo "$revs" | wc -l`
++ patch=$num
++ else
++ echo "Cannot find tag $tag";
++ exit 0
++ fi
++fi
++
+ if [ ! -s "$applied" ]; then
+ disp "No patches applied."
+ exit 0
+ elif [ "$patch" = "-a" ]; then
+ # we are supposed to pop all patches
+-
+ sidx=`wc -l < $applied`
+ eidx=0
+ elif [ ! -z "$num" ]; then
+@@ -96,3 +117,6 @@ pop_many_patches `git rev-parse refs/pat
+ p=`get_top`
+ [ ! -z "$p" ] && disp "Now at $p." || disp "All patches popped."
+
++if [ ! -z "$delete_tag" ]; then
++ git tag -d $tag
++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 0000000..d40119c
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-push-no-series.patch
@@ -0,0 +1,27 @@
+guilt-push: Avoid duplicate hits in a series
+
+If a series file becomes mangled and a patch name appears in there
+more than once, then the guilt-push will fail a horrible and
+incomprehensible death. Make it fail in a sensible way.
+
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+---
+
+ guilt-push | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/guilt-push
++++ b/guilt-push
+@@ -90,6 +90,11 @@ else
+ if [ -z "$eidx" ]; then
+ die "Patch $patch is not in the series or is guarded."
+ fi
++
++ matches=`echo $eidx | wc -w`
++ if [ $matches -gt 1 ]; then
++ die "Patch $patch is in the series multiple times"
++ fi
+ fi
+
+ # 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 0000000..2184329
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-push.patch
@@ -0,0 +1,40 @@
+guilt: add support for pushing and tagging
+
+It can be handy to push AND tag at the same time.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+
+ guilt-push | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/guilt-push
++++ b/guilt-push
+@@ -19,7 +19,11 @@ while [ $# -gt 0 ]; do
+ -n)
+ num=t
+ ;;
+- *)
++ -t|--t)
++ tag=$2
++ shift
++ ;;
++ *)
+ break
+ ;;
+ esac
+@@ -126,3 +130,13 @@ do
+ fi
+ done
+
++ret=$?
++if [ $ret -ne 0 ]; then
++ exit $ret
++fi
++
++# if a tag was specified, tag the tree now.
++if [ -n "$tag" ]; then
++ git-rev-parse HEAD > "$GIT_DIR/refs/tags/$tag"
++fi
++
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 0000000..92e75f2
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt-set-git_exec_path.patch
@@ -0,0 +1,27 @@
+guilt: set GIT_EXEC_PATH in guilt wrapper
+
+git has the habit of tracking the directory where it was
+installed. If you build git, relocate git and then remove
+the old directory --exec-path will return that original
+(now non-existent) directory. We insist that git and
+guilt be in the same directory to ensure they are matched,
+so we use the environment variable GIT_EXEC_PATH to
+force the issue.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/guilt
++++ b/guilt
+@@ -23,6 +23,8 @@ esac
+ # we change directories ourselves
+ SUBDIRECTORY_OK=1
+
++export GIT_EXEC_PATH=`dirname $0`/../libexec/git-core
++
+ if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
+ . "$(git --exec-path)/git-sh-setup"
+ fi
diff --git a/meta/recipes-devtools/guilt/files/guilt.patch b/meta/recipes-devtools/guilt/files/guilt.patch
new file mode 100644
index 0000000..a3352cf
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/guilt.patch
@@ -0,0 +1,317 @@
+guilt: enhanced patch queue management
+
+guilt prefers to track the status and series of patches
+under .git/patches. But this location doesn't allow the
+status of a quilt queue to be committed to a secondary
+repository and later restored.
+
+This change does three things:
+
+ - allows GUILT_BASE to be changed (with a default to "wrs")
+ - allows shadow tracking of the patches (for rebase)
+ - enhances the header detection and creation of patches
+ as they are pushed onto the tree.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 159 insertions(+), 24 deletions(-)
+
+--- a/guilt
++++ b/guilt
+@@ -153,14 +153,16 @@ get_branch()
+
+ verify_branch()
+ {
+- [ ! -d "$GIT_DIR/patches" ] &&
++ [ ! -d "$GUILT_DIR" ] &&
+ die "Patches directory doesn't exist, try guilt-init"
+- [ ! -d "$GIT_DIR/patches/$branch" ] &&
++ [ ! -d "$GUILT_DIR/$branch" ] &&
+ die "Branch $branch is not initialized, try guilt-init"
+- [ ! -f "$GIT_DIR/patches/$branch/series" ] &&
++ [ ! -f "$GUILT_DIR/$branch/series" ] &&
+ die "Branch $branch does not have a series file"
+- [ ! -f "$GIT_DIR/patches/$branch/status" ] &&
++ [ ! -f "$GUILT_DIR/$branch/status" ] &&
+ die "Branch $branch does not have a status file"
++ [ -f "$GUILT_DIR/$branch/applied" ] &&
++ die "Warning: Branch $branch has 'applied' file - guilt is not compatible with stgit"
+ [ -f "$GIT_DIR/patches/$branch/applied" ] &&
+ die "Warning: Branch $branch has 'applied' file - guilt is not compatible with stgit"
+ }
+@@ -339,6 +341,17 @@ BEGIN{}
+ '
+ }
+
++# usage: do_get_only_patch patchfile
++# similar to do_get_patch except everything leading up to
++# the first diff line and after the last chunk are removed
++do_get_only_patch()
++{
++ cat "$1" | awk '
++BEGIN{}
++/^(diff )/,/^(-- |END{})/
++' | sed '/^-- *$/D'
++}
++
+ # usage: do_get_header patchfile
+ do_get_header()
+ {
+@@ -352,8 +365,13 @@ do_get_header()
+ BEGIN{skip=0}
+ /^Subject:/ && (NR==1){print substr($0, 10); next}
+ /^From:/{skip=1; next}
++/^Author:/{skip=1; next}
++/^Date:/{skip=1; next}
++/^commit/{skip=1; next}
+ /^[ \t\f\n\r\v]*$/ && (skip==1){skip=0; next}
+ /^(diff |---$|--- )/{exit}
++/^diff --git/{exit}
++/^Index: /{exit}
+ {print $0}
+ END{}
+ '
+@@ -415,6 +433,15 @@ series_insert_patch()
+ mv "$series.tmp" "$series"
+ }
+
++series_append_patch()
++{
++ # unlike series_insert_patch, which inserts the passed
++ # patch after the current top patch, this function always
++ # appends the patch to the series
++
++ echo $1 >> "$series"
++}
++
+ # usage: series_remove_patch <patchname>
+ series_remove_patch()
+ {
+@@ -473,8 +500,7 @@ remove_patch_refs()
+ # usage: pop_many_patches <commitish> <number of patches>
+ pop_many_patches()
+ {
+- assert_head_check
+-
++ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
+ (
+ cd_to_toplevel
+
+@@ -508,50 +534,149 @@ remove_ref()
+ )
+ }
+
++prep_patch()
++{
++ patch=$1;
++ tgt=$2;
++
++ if test -f $patch; then
++ case $patch in
++ *.gz) gzip -dc $patch > $tgt ;;
++ *.bz2) bzip2 -dc $patch > $tgt ;;
++ *) cp $patch $tgt ;;
++ esac;
++ fi;
++}
++
+ # usage: commit patchname parent
+ commit()
+ {
+ (
+ TMP_MSG=`get_tmp_file msg`
++ TMP_PATCH=`get_tmp_file patch`
++ TMP_PATCH_OUT=`get_tmp_file patch_out`
++ TMP_INFO=`get_tmp_file info`
+
+ p="$GUILT_DIR/$branch/$1"
+ pname="$1"
++ prep_patch "$p" "$TMP_PATCH"
++ p=$TMP_PATCH
++
+ cd_to_toplevel
+
+ git diff-files --name-only | (while read n; do git update-index "$n" ; done)
+
++ # borrowed from git-am
++ header_type=git
++ git mailinfo "$TMP_MSG" "$TMP_PATCH_OUT" \
++ <"$p" >"$TMP_INFO";
++
++ # skip pine's internal folder data
++ grep '^Author: Mail System Internal Data$' \
++ <"$TMP_INFO" >/dev/null
++
++ git stripspace < "$TMP_MSG" > "$TMP_MSG.clean"
++ mv "$TMP_MSG.clean" "$TMP_MSG"
++ git stripspace < "$TMP_INFO" > "$TMP_INFO.clean"
++ mv "$TMP_INFO.clean" "$TMP_INFO"
++
++ # If mailinfo couldn't get something , try another way
+ # grab a commit message out of the patch
+- do_get_header "$p" > "$TMP_MSG"
++ if [ ! -s "$TMP_MSG" ] || [ ! -s "$TMP_INFO" ]; then
++ do_get_header "$p" > "$TMP_MSG"
++ header_type=guilt
++ fi
+
+- # make a default commit message if patch doesn't contain one
+- [ ! -s "$TMP_MSG" ] && echo "patch $pname" > "$TMP_MSG"
++ # last try: make a default commit message if patch doesn't contain one
++ [ ! -s "$TMP_MSG" ] && echo "auto_msg: patch $pname" > "$TMP_MSG"
+
+- # extract a From line from the patch header, and set
+- # GIT_AUTHOR_{NAME,EMAIL}
+- author_str=`sed -n -e '/^From:/ { s/^From: //; p; q; }; /^(diff |---$|--- )/ q' "$p"`
+- if [ ! -z "$author_str" ]; then
++
++ if [ "$header_type" = "guilt" ]; then
++
++ # extract a From line from the patch header, and set
++ # GIT_AUTHOR_{NAME,EMAIL}
++ author_str=`sed -n -e '/^From:/ { s/^From: //; p; q }; /^(diff |---)/ q' "$p"`
++ if [ ! -z "$author_str" ]; then
+ GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
+ export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
+ export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
+- fi
++ fi
++
++
++ # check in the patch for a subject
++ SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$p")"
++ if [ -z "$SUBJECT" ]; then
++ # if we can't find a subject in the patch, then let's construct
++ # one from the header of the patch itself
++ SUBJECT=`cat "$TMP_MSG" | head -n 1`
++ if [ ${#SUBJECT} -gt 60 ]; then
++ SUBJECT=${SUBJECT: -60}
++ fi
++ fi
++
++ if [ -z "$SUBJECT" ]; then
++ # if we are *still* without a subject, then just use
++ # the patch name
++ SUBJECT=`echo $1 | sed 's%^patch *%%'`
++
++ if [ ${#SUBJECT} -gt 60 ]; then
++ SUBJECT=${SUBJECT: -60}
++ fi
++ fi
+
+- # must strip nano-second part otherwise git gets very
+- # confused, and makes up strange timestamps from the past
+- # (chances are it decides to interpret it as a unix
+- # timestamp).
+- export GIT_AUTHOR_DATE="`stat -c %y "$p" | sed -e '
++ SUBJECT=`echo $SUBJECT | sed s'%^ *%%'`
++
++ if [ ! -z "$SUBJECT" ]; then
++ echo "$SUBJECT" >> $TMP_MSG.subject
++ echo "" >> $TMP_MSG.subject
++ cat "$TMP_MSG" >> $TMP_MSG.subject
++ mv "$TMP_MSG.subject" "$TMP_MSG"
++ fi
++
++ # must strip nano-second part otherwise git gets very
++ # confused, and makes up strange timestamps from the past
++ # (chances are it decides to interpret it as a unix
++ # timestamp).
++ export GIT_AUTHOR_DATE="`stat -c %y "$p" | sed -e '\
+ 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/'`"
+- export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
++ export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
++ else
++ # using git headers, closely related to git-am
++
++ GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$TMP_INFO")"
++ GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$TMP_INFO")"
++ GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$TMP_INFO")"
++ if test -z "$GIT_AUTHOR_EMAIL"
++ then
++ echo "Warning: patch does not have a valid e-mail address."
++ GIT_AUTHOR_EMAIL=$GIT_AUTHOR_NAME
++ fi
++
++ SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$TMP_INFO")"
++ if [ ! -z "$SUBJECT" ]; then
++ echo "$SUBJECT" >> $TMP_MSG.subject
++ echo "" >> $TMP_MSG.subject
++ cat "$TMP_MSG" >> $TMP_MSG.subject
++ mv "$TMP_MSG.subject" "$TMP_MSG"
++ fi
++ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
++ fi
+
+ # commit
+ treeish=`git write-tree`
+ commitish=`git commit-tree $treeish -p $2 < "$TMP_MSG"`
++ if [ ! $? -eq 0 ]; then
++ echo "ERROR. Could not commit tree"
++ git-reset --hard HEAD^
++ exit 1
++ fi
+ git update-ref HEAD $commitish
+
+ # mark patch as applied
+ git update-ref "refs/patches/$branch/$pname" HEAD
+
+- rm -f "$TMP_MSG"
++ rm -f "$TMP_MSG" "$TMP_LOG" "$TMP_PATCH" "$TMP_INFO" "$TMP_PATCH_OUT"
++
+ )
+ }
+
+@@ -568,7 +693,7 @@ push_patch()
+ bail_action="$2"
+ reject="--reject"
+
+- assert_head_check
++ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
+ cd_to_toplevel
+
+ # apply the patch if and only if there is something to apply
+@@ -671,7 +796,7 @@ refresh_patch()
+ # incldiffstat
+ __refresh_patch()
+ {
+- assert_head_check
++ head_check "`tail -1 < "$applied" | cut -d: -f 1`"
+
+ (
+ TMP_DIFF=`get_tmp_file diff`
+@@ -711,6 +836,10 @@ __refresh_patch()
+
+ head -n "-$N" < "$applied" > "$applied.tmp"
+ mv "$applied.tmp" "$applied"
++
++ # update the shadow status.
++ ref=`cat $GIT_DIR/refs/tags/${branch}_top`
++ echo "$ref:$1" >> $applied_shadow
+ )
+ }
+
+@@ -791,7 +920,12 @@ diffstat=`git config --bool guilt.diffst
+ # The following gets run every time this file is source'd
+ #
+
+-GUILT_DIR="$GIT_DIR/patches"
++
++# GUILT_DIR="$GIT_DIR/patches"
++if [ -z "$GUILT_BASE" ]; then
++ GUILT_BASE=wrs
++fi
++GUILT_DIR="$GUILT_BASE/patches"
+
+ branch=`get_branch`
+
+@@ -814,6 +948,7 @@ fi
+ # very useful files
+ series="$GUILT_DIR/$branch/series"
+ applied="$GUILT_DIR/$branch/status"
++applied_shadow="$GUILT_DIR/$branch/shadow_status"
+ guards_file="$GUILT_DIR/$branch/guards"
+
+ # 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 0000000..b98ec5e
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/improve_auto_header_gen.patch
@@ -0,0 +1,69 @@
+guilt: improve the generation of an automatic header
+
+Patches that do not have a proper header are encountered when generating
+a tree. This improves the detection of these patches and generates a sane
+header so the eventual commit will be coherent
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+
+ guilt | 24 ++++++++++++++++++------
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+--- a/guilt
++++ b/guilt
+@@ -591,7 +591,12 @@ commit()
+ fi
+
+ # last try: make a default commit message if patch doesn't contain one
+- [ ! -s "$TMP_MSG" ] && echo "auto_msg: patch $pname" > "$TMP_MSG"
++ if [ ! -s "$TMP_MSG" ]; then
++ echo "auto_msg: importing `basename $pname`" > "$TMP_MSG"
++ echo "" >> "$TMP_MSG"
++ echo "This is an automatic import of patch $pname, no headers were" >> "$TMP_MSG"
++ echo "detected and a default message was constructed" >> "$TMP_MSG"
++ fi
+
+
+ if [ "$header_type" = "guilt" ]; then
+@@ -599,12 +604,14 @@ commit()
+ # extract a From line from the patch header, and set
+ # GIT_AUTHOR_{NAME,EMAIL}
+ author_str=`sed -n -e '/^From:/ { s/^From: //; p; q }; /^(diff |---)/ q' "$p"`
+- if [ ! -z "$author_str" ]; then
+- GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
+- export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
+- export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
++ if [ -z "$author_str" ]; then
++ author_str="auto commit <unknown@unknown>"
+ fi
+
++ GIT_AUTHOR_NAME=`echo $author_str | sed -e 's/ *<.*$//'`
++ export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-" "}"
++ export GIT_AUTHOR_EMAIL="`echo $author_str | sed -e 's/[^<]*//'`"
++
+
+ # check in the patch for a subject
+ SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$p")"
+@@ -615,6 +622,11 @@ commit()
+ if [ ${#SUBJECT} -gt 60 ]; then
+ SUBJECT=${SUBJECT: -60}
+ fi
++
++ # remove the line from the tmp msg
++ mv "$TMP_MSG" "$TMP_MSG.work"
++ cat "$TMP_MSG.work" | grep -v -E ".*$SUBJECT.*" > "$TMP_MSG"
++ rm "$TMP_MSG.work"
+ fi
+
+ if [ -z "$SUBJECT" ]; then
+@@ -629,7 +641,7 @@ commit()
+
+ SUBJECT=`echo $SUBJECT | sed s'%^ *%%'`
+
+- if [ ! -z "$SUBJECT" ]; then
++ if [ -n "$SUBJECT" ]; then
+ echo "$SUBJECT" >> $TMP_MSG.subject
+ echo "" >> $TMP_MSG.subject
+ 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 0000000..b6d40db
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/make_git_commands_conditional.patch
@@ -0,0 +1,46 @@
+guilt: allow operation outside of git repos
+
+Sometimes guilt is sourced when there isn't a containing git repository.
+Some of the git commands that are always called will report errors
+unecesarility in this scenario. This adds a variable that will inhibit
+those problematic calls
+
+Signed-off-by <bruce.ashfield@windriver.com>
+
+---
+
+ guilt | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+
+--- a/guilt
++++ b/guilt
+@@ -23,7 +23,9 @@ esac
+ # we change directories ourselves
+ SUBDIRECTORY_OK=1
+
+-. "$(git --exec-path)/git-sh-setup"
++if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
++ . "$(git --exec-path)/git-sh-setup"
++fi
+
+ #
+ # Git version check
+@@ -921,14 +923,15 @@ diffstat=`git config --bool guilt.diffst
+ # The following gets run every time this file is source'd
+ #
+
+-
+ # GUILT_DIR="$GIT_DIR/patches"
+ if [ -z "$GUILT_BASE" ]; then
+ GUILT_BASE=wrs
+ fi
+ GUILT_DIR="$GUILT_BASE/patches"
+
+-branch=`get_branch`
++if [ -z "$DO_NOT_USE_GITREPO_COMMANDS" ]; then
++ branch=`get_branch`
++fi
+
+ # most of the time we want to verify that the repo's branch has been
+ # 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 0000000..368d63b
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/optional_head_check.patch
@@ -0,0 +1,58 @@
+guilt: allow guilt-push to opt out of head checking
+
+Depending on the method used to construct a tree, it is entirely
+possible that branches are not only made up of guilt created commits.
+This mixed mode is valid, and in particular is valid when applying
+patches to a tree.
+
+In the default mode of operation, you will see a warning such as
+this when working on a branch:
+
+Expected HEAD commit dbd5861f81a92b8b329561f94b8575c7ee6768b6
+ got 3e8e6f6bd9f1772b91fc1fe9949f541d0560b487
+
+This looks severe, but is harmless during tree construction,
+since even if the HEAD commit was expected, you can still run into
+issues pushing a patch. This is particularly seen when templates are
+adding patches to a kernel.
+
+To make this look less ominous, we make the head check for patch
+pushing opt-in. Which means that by default, you'll no longer see
+this warning if you work with a mixed mode branch during tree
+construction.
+
+Other modes such as pop or refresh can run into problems when
+the HEAD commit isn't tracked or expected, so they should remained
+checked.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+---
+ guilt | 3 +++
+ guilt-push | 3 +++
+ 2 files changed, 6 insertions(+)
+
+--- a/guilt
++++ b/guilt
+@@ -417,6 +417,9 @@ head_check()
+ return 0 ;;
+ esac
+
++ # If do_head_check isn't set, bail, we are "opt-in"
++ [ -z "$do_head_check" ] && return 0
++
+ if [ "`git rev-parse refs/heads/$branch`" != "`git rev-parse $1`" ]; then
+ disp "Expected HEAD commit $1" >&2
+ disp " got `git rev-parse refs/heads/$branch`" >&2
+--- a/guilt-push
++++ b/guilt-push
+@@ -23,6 +23,9 @@ while [ $# -gt 0 ]; do
+ tag=$2
+ shift
+ ;;
++ --head_check)
++ do_head_check=t
++ ;;
+ *)
+ break
+ ;;
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 0000000..8c9067d
--- /dev/null
+++ b/meta/recipes-devtools/guilt/files/uninstall_force.patch
@@ -0,0 +1,12 @@
+guilt: force removal when uninstalling
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+
+--- a/uninstall.orig
++++ b/uninstall
+@@ -12,4 +12,4 @@
+
+ shift
+
+-(cd $PRE; rm "$@")
++(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 0000000..62d91f6
--- /dev/null
+++ b/meta/recipes-devtools/guilt/guilt-native_0.33.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "guilt is quilt like tool for git"
+LICENSE = "GPL"
+
+PR = r0
+PV = "0.33"
+
+inherit native
+
+SRC_URI = "http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-${PV}.tar.gz\
+ file://guilt-push.patch \
+ file://guilt-pop.patch \
+ file://guilt.patch \
+ file://guilt-init.patch \
+ file://guilt-import-commit.patch \
+ file://uninstall_force.patch \
+ file://guilt-push-no-series.patch \
+ file://make_git_commands_conditional.patch \
+ file://improve_auto_header_gen.patch \
+ file://guilt-set-git_exec_path.patch \
+ file://guilt-bash.patch \
+ file://optional_head_check.patch"
+
+# we don't compile, we just install
+do_compile() {
+ :
+}
+
+do_install() {
+ oe_runmake PREFIX=${D}/${base_prefix}/usr install
+} \ 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 0000000..ef41c53
--- /dev/null
+++ b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils-native_0.8.7.bb
@@ -0,0 +1,9 @@
+LICENSE = "GPLv2"
+DEPENDS = "libxml-simple-perl-native"
+PR = "r1"
+
+SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-0.8.7.tar.gz"
+
+S = "${WORKDIR}/icon-naming-utils-${PV}"
+
+inherit 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 0000000..23135f7
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.2.10.bb
@@ -0,0 +1,34 @@
+require libtool_${PV}.bb
+
+PR = "r1"
+PACKAGES = ""
+SRC_URI_append = " file://cross_compile.patch \
+ file://prefix.patch "
+
+DEPENDS += "libtool-native"
+
+do_configure_prepend () {
+ # Remove any existing libtool m4 since old stale versions would break
+ # any upgrade
+ rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
+ rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
+}
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
+ install -d ${D}${datadir}/libtool/
+ install -d ${D}${datadir}/aclocal/
+ install -c ${S}/libltdl/config/config.guess ${D}${datadir}/libtool/
+ install -c ${S}/libltdl/config/config.sub ${D}${datadir}/libtool/
+ install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${datadir}/libtool/
+ install -c -m 0644 ${S}/libltdl/m4/libtool.m4 ${D}${datadir}/aclocal/
+ install -c -m 0644 ${S}/libltdl/m4/ltdl.m4 ${D}${datadir}/aclocal/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
+
+libtoolcross_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
+ install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
+}
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 0000000..322da4a
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-native_2.2.10.bb
@@ -0,0 +1,22 @@
+require libtool_${PV}.bb
+
+DEPENDS = ""
+
+PR = "r1"
+SRC_URI_append = " file://cross_compile.patch \
+ file://prefix.patch "
+
+inherit native
+
+do_configure_prepend () {
+ # Remove any existing libtool m4 since old stale versions would break
+ # any upgrade
+ rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
+ rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
+}
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${bindir}/
+ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
+}
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 0000000..e972d9e
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-nativesdk_2.2.10.bb
@@ -0,0 +1,27 @@
+require libtool_${PV}.bb
+
+PR = "r1"
+SRC_URI_append = " file://cross_compile.patch \
+ file://prefix.patch "
+
+inherit nativesdk
+
+do_configure_prepend () {
+ # Remove any existing libtool m4 since old stale versions would break
+ # any upgrade
+ rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
+ rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
+}
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${bindir}/
+ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
+
+libtoolnativesdk_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/
+ install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool
+}
diff --git a/meta/recipes-devtools/libtool/libtool.inc b/meta/recipes-devtools/libtool/libtool.inc
new file mode 100644
index 0000000..c94dadd
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "Generic library support script \
+This is GNU libtool, a generic library support script. Libtool hides \
+the complexity of generating special library types (such as shared \
+libraries) behind a consistent interface."
+HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
+SECTION = "devel"
+LICENSE = "GPLv2, LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06 "
+
+SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
+ file://trailingslash.patch \
+ file://prefix-manpage-fix.patch "
+
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 0000000..fc1f4b6
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/cross_compile.patch
@@ -0,0 +1,55 @@
+Tweaks to make cross-compiling work combined and updated from various
+older patches, some by Chris Larson.
+Not upstreable in this form.
+
+RP - 01/05/2008
+
+Index: libtool-2.2.10/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.2.10/libltdl/config/ltmain.m4sh
+@@ -5147,8 +5147,14 @@ func_mode_link ()
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+- dir="$libdir"
+- absdir="$libdir"
++ # Adding 'libdir' from the .la file to our library search paths
++ # breaks crosscompilation horribly. We cheat here and don't add
++ # it, instead adding the path where we found the .la. -CL
++ dir="$abs_ladir"
++ absdir="$abs_ladir"
++ libdir="$abs_ladir"
++ #dir="$libdir"
++ #absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+@@ -5519,8 +5525,6 @@ func_mode_link ()
+ add="$libdir/$linklib"
+ fi
+ else
+- # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+@@ -5667,7 +5671,17 @@ func_mode_link ()
+ fi
+ ;;
+ *)
+- path="-L$absdir/$objdir"
++ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
++ # preferring $objdir. RP 31/04/2008
++ if test -f "$absdir/$objdir/$depdepl" ; then
++ depdepl="$absdir/$objdir/$depdepl"
++ path="-L$absdir/$objdir"
++ elif test -f "$absdir/$depdepl" ; then
++ depdepl="$absdir/$depdepl"
++ path="-L$absdir"
++ else
++ path="-L$absdir/$objdir"
++ fi
+ ;;
+ esac
+ 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 0000000..4728669
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/prefix-manpage-fix.patch
@@ -0,0 +1,19 @@
+For cross environment, it not possible to run the generated executable.
+nstead use the build version of libtool to generate the man pages.
+
+Date: 2010/07/09
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+
+Index: libtool-2.2.10/Makefile.am
+===================================================================
+--- libtool-2.2.10.orig/Makefile.am
++++ libtool-2.2.10/Makefile.am
+@@ -337,7 +337,7 @@ update_mans = \
+ PATH=.$(PATH_SEPARATOR)$$PATH; export PATH; \
+ $(HELP2MAN) --output=$@
+ $(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
+- $(update_mans) --help-option=--help-all libtool
++ $(update_mans) --help-option=--help-all ${build_alias}-libtool
+ $(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
+ $(update_mans) libtoolize
+
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
new file mode 100644
index 0000000..d008608
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -0,0 +1,109 @@
+Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
+it can't be confused with the host libtool.
+
+Originally by: RP
+
+Updated: Date: 2010/06/28
+Nitin A Kamble <nitin.a.kamble@intel.com>
+
+
+Index: libtool-2.2.10/libltdl/m4/libtool.m4
+===================================================================
+--- libtool-2.2.10.orig/libltdl/m4/libtool.m4
++++ libtool-2.2.10/libltdl/m4/libtool.m4
+@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
+ LIBTOOL_DEPS="$ltmain"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+ _LT_SETUP
+@@ -201,7 +202,7 @@ aix3*)
+ esac
+
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+Index: libtool-2.2.10/Makefile.am
+===================================================================
+--- libtool-2.2.10.orig/Makefile.am
++++ libtool-2.2.10/Makefile.am
+@@ -31,7 +31,7 @@ AM_LDFLAGS =
+ DIST_SUBDIRS = .
+ EXTRA_DIST =
+
+-BUILT_SOURCES = libtool libtoolize
++BUILT_SOURCES = $(host_alias)-libtool libtoolize
+
+ CLEANFILES =
+ MOSTLYCLEANFILES =
+@@ -65,7 +65,7 @@ rebuild = rebuild=:; $(timestamp); corre
+ ## ---------------- ##
+
+ # The libtool distributor and the standalone libtool script.
+-bin_SCRIPTS = libtoolize libtool
++bin_SCRIPTS = libtoolize $(host_alias)-libtool
+
+ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
+ rm -f libtoolize.tmp libtoolize
+@@ -91,8 +91,8 @@ $(srcdir)/libtoolize.in: $(sh_files) lib
+ # We used to do this with a 'stamp-vcl' file, but non-gmake builds
+ # would rerun configure on every invocation, so now we manually
+ # check the version numbers from the build rule when necessary.
+-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
+- @target=libtool; $(rebuild); \
++$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
++ @target=$(host_alias)-libtool; $(rebuild); \
+ if test -f "$$target"; then \
+ set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
+ test "$$actualver" = "$$correctver" && rebuild=false; \
+@@ -101,8 +101,8 @@ libtool: $(top_builddir)/config.status $
+ case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
+ done; \
+ if $$rebuild; then \
+- echo $(SHELL) ./config.status $$target; \
+- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
++ echo $(SHELL) ./config.status libtool; \
++ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
+ fi
+
+ .PHONY: configure-subdirs
+@@ -147,7 +147,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
+ ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
+ ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
+ ChangeLog.2008 ChangeLog.2009
+-CLEANFILES += libtool libtoolize libtoolize.tmp \
++CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
+ $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+
+ ## We build ltversion.m4 here, instead of from config.status,
+@@ -523,12 +523,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
+
+ BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
+ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
+- LIBTOOL="$(abs_top_builddir)/libtool" \
++ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
+ tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+
+ INSTALLCHECK_ENVIRONMENT = \
+ LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
+- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
+ LTDLINCL="-I$(includedir)" \
+ LIBLTDL="$(libdir)/libltdl.la" \
+ tst_aclocaldir="$(aclocaldir)"
+@@ -679,7 +679,7 @@ if HAVE_FC
+ TESTS += $(FC_TESTS)
+ endif
+
+-tests/demo-conf.test: libtool
++tests/demo-conf.test: $(host_alias)-libtool
+
+ EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
+ $(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 0000000..313c262
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -0,0 +1,32 @@
+A 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)
+
+This is because libdir has a trailing slash which breaks the comparision.
+
+RP 2/1/10
+
+Merged a patch received from Gary Thomas <gary@mlbassoc.com>
+
+Date: 2010/07/12
+Nitin A Kamble <nitin.a.kamble@intel.com>
+
+Index: libtool-2.2.10/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.10.orig/libltdl/config/ltmain.m4sh
++++ libtool-2.2.10/libltdl/config/ltmain.m4sh
+@@ -1634,8 +1634,15 @@ func_mode_install ()
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Strip any trailing slash from the destination.
++ func_stripname '' '/' "$libdir"
++ destlibdir=$func_stripname_result
++
++ func_stripname '' '/' "$destdir"
++ s_destdir=$func_stripname_result
++
+ # Determine the prefix the user has applied to our future dir.
+- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # 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 0000000..9eaec2d
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool_2.2.10.bb
@@ -0,0 +1,33 @@
+require libtool.inc
+DEPENDS = "libtool-native"
+
+PR = "r1"
+
+PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"
+FILES_${PN} += "${datadir}/aclocal*"
+FILES_libltdl = "${libdir}/libltdl.so.*"
+FILES_libltdl-dev = "${libdir}/libltdl.* ${includedir}/ltdl.h"
+FILES_libltdl-dbg = "${libdir}/.debug/"
+
+inherit autotools
+
+EXTRA_AUTORECONF = "--exclude=libtoolize"
+
+do_compile_prepend () {
+ # Sometimes this file doesn't get rebuilt, force the issue
+ rm -f ${S}/libltdl/config/ltmain.sh
+ make libltdl/config/ltmain.sh
+}
+
+#
+# We want the results of libtool-cross preserved - don't stage anything ourselves.
+#
+SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
+
+libtool_sysroot_preprocess () {
+ if [ "${PN}" == "libtool" ]; then
+ rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${bindir}/*
+ rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/aclocal/*
+ rm -rf ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${datadir}/libtool/config/*
+ fi
+}
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 0000000..fa871b3
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4-native_1.4.13.bb
@@ -0,0 +1,12 @@
+require m4_${PV}.bb
+inherit native
+
+INHIBIT_AUTOTOOLS_DEPS = "1"
+DEPENDS += "gnu-config-native"
+
+do_configure() {
+ install -m 0644 ${STAGING_DATADIR}/gnu-config/config.sub .
+ install -m 0644 ${STAGING_DATADIR}/gnu-config/config.guess .
+ oe_runconf
+}
+
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 0000000..2210387
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/ac_config_links.patch
@@ -0,0 +1,28 @@
+This patch fixes a build problem for m4-native experienced on Ubuntu 9.10,
+where autoconf/automake (AC_CONFIG_LINKS) ends up making GNUmakefile a
+symlink to itself.
+
+The patch comments out ac_config_links directly in configure,
+as autoreconf is not actually run for m4-native.
+
+I believe it should be safe, as GNUmakefile is actually unpacked from
+source, and what we want is to is to not touch it.
+
+Tested on x86_64_linux (Ubuntu 8.04 and 9.10).
+
+2009-11-10 Esben Haabendal <eha@doredevelopment.dk>
+
+diff -urN m4-1.4.13.orig/configure m4-1.4.13/configure
+--- m4-1.4.13.orig/configure 2009-11-10 10:54:00.301707097 +0100
++++ m4-1.4.13/configure 2009-11-10 10:54:17.314206379 +0100
+@@ -14860,8 +14860,8 @@
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+- GNUmakefile=GNUmakefile
+- ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
++ # GNUmakefile=GNUmakefile
++ # ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+
+
diff --git a/meta/recipes-devtools/m4/m4/make.patch b/meta/recipes-devtools/m4/m4/make.patch
new file mode 100644
index 0000000..3577b0b
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4/make.patch
@@ -0,0 +1,41 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- m4-1.4.2/doc/Makefile.in~make
++++ m4-1.4.2/doc/Makefile.in
+@@ -57,9 +57,9 @@
+ date > $(srcdir)/stamp-vti
+
+ install: all
+- $(srcdir)/../mkinstalldirs $(infodir)
++ $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
+ cd $(srcdir) && for file in m4.info*; do \
+- $(INSTALL_DATA) $$file $(infodir)/$$file; \
++ $(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file; \
+ done
+
+ uninstall:
+--- m4-1.4.2/src/Makefile.in~make
++++ m4-1.4.2/src/Makefile.in
+@@ -35,7 +35,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ transform = @program_transform_name@
+-bindir = $(exec_prefix)/bin
++bindir = @bindir@
+
+ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+ LINK = $(CC) $(LDFLAGS) -o $@
+@@ -84,8 +84,8 @@
+ $(LINK) ansi2knr.o $(LIBS)
+
+ install: all
+- $(srcdir)/../mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) m4 $(bindir)/`echo m4 | sed '$(transform)'`
++ $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) m4 $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform)'`
+
+ uninstall:
+ 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 0000000..32d153e
--- /dev/null
+++ b/meta/recipes-devtools/m4/m4_1.4.13.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "GNU m4 is an implementation of the traditional Unix macro processor."
+LICENSE = "GPLv3"
+SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
+ file://ac_config_links.patch;patch=1"
+PR = "r2"
+
+inherit autotools
+
+EXTRA_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 0000000..c998e11
--- /dev/null
+++ b/meta/recipes-devtools/make/files/SCCS.patch
@@ -0,0 +1,16 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- make-3.80/configure.in~SCCS
++++ make-3.80/configure.in
+@@ -264,7 +264,7 @@
+ [Define this if the SCCS 'get' command understands the '-G<file>' option.]);;
+ esac
+ fi
+-rm -f s.conftest conftoast
++rm -f s.conftest conftoast SCCS/*s.conftest
+
+ # Check the system to see if it provides GNU glob. If not, use our
+ # local version.
diff --git a/meta/recipes-devtools/make/make.inc b/meta/recipes-devtools/make/make.inc
new file mode 100644
index 0000000..23629d3
--- /dev/null
+++ b/meta/recipes-devtools/make/make.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "GNU Make examines the timestamps on a set of \
+interdependent files, and, if necessary, issues commands \
+to bring them up-to-date."
+HOMEPAGE = "http://www.gnu.org/software/make/"
+SECTION = "devel"
+LICENSE = "GPL"
+
+SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2 \
+ file://SCCS.patch;patch=1"
+
+inherit 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 0000000..797d26b
--- /dev/null
+++ b/meta/recipes-devtools/make/make_3.81.bb
@@ -0,0 +1,3 @@
+PR = "r0"
+
+require 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 0000000..c7ad722
--- /dev/null
+++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
@@ -0,0 +1,360 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <time.h>
+#include <getopt.h>
+#include <libgen.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#define MINORBITS 8
+#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
+
+/* These are all stolen from busybox's libbb to make
+ * error handling simpler (and since I maintain busybox,
+ * I'm rather partial to these for error handling).
+ * -Erik
+ */
+static const char *const app_name = "makedevs";
+static const char *const memory_exhausted = "memory exhausted";
+static char default_rootdir[]=".";
+static char *rootdir = default_rootdir;
+
+static void verror_msg(const char *s, va_list p)
+{
+ fflush(stdout);
+ fprintf(stderr, "%s: ", app_name);
+ vfprintf(stderr, s, p);
+}
+
+static void error_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ verror_msg(s, p);
+ va_end(p);
+ putc('\n', stderr);
+ exit(EXIT_FAILURE);
+}
+
+static void vperror_msg(const char *s, va_list p)
+{
+ int err = errno;
+
+ if (s == 0)
+ s = "";
+ verror_msg(s, p);
+ if (*s)
+ s = ": ";
+ fprintf(stderr, "%s%s\n", s, strerror(err));
+}
+
+#if 0
+static void perror_msg(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ vperror_msg(s, p);
+ va_end(p);
+}
+#endif
+
+static void perror_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ vperror_msg(s, p);
+ va_end(p);
+ exit(EXIT_FAILURE);
+}
+
+static FILE *xfopen(const char *path, const char *mode)
+{
+ FILE *fp;
+
+ if ((fp = fopen(path, mode)) == NULL)
+ perror_msg_and_die("%s", path);
+ return fp;
+}
+
+static char *xstrdup(const char *s)
+{
+ char *t;
+
+ if (s == NULL)
+ return NULL;
+
+ t = strdup(s);
+
+ if (t == NULL)
+ error_msg_and_die(memory_exhausted);
+
+ return t;
+}
+
+
+static void add_new_directory(char *name, char *path,
+ unsigned long uid, unsigned long gid, unsigned long mode)
+{
+ mkdir(path, mode);
+ chown(path, uid, gid);
+// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode);
+}
+
+static void add_new_device(char *name, char *path, unsigned long uid,
+ unsigned long gid, unsigned long mode, dev_t rdev)
+{
+ int status;
+ struct stat sb;
+ time_t timestamp = time(NULL);
+
+ memset(&sb, 0, sizeof(struct stat));
+ status = lstat(path, &sb);
+
+ if (status >= 0) {
+ /* It is ok for some types of files to not exit on disk (such as
+ * device nodes), but if they _do_ exist the specified mode had
+ * better match the actual file or strange things will happen.... */
+ if ((mode & S_IFMT) != (sb.st_mode & S_IFMT))
+ error_msg_and_die("%s: file type does not match specified type!", path);
+ timestamp = sb.st_mtime;
+ }
+
+ mknod(name, mode, rdev);
+ chown(path, uid, gid);
+// printf("Device: %s %s UID: %ld GID: %ld MODE: %ld MAJOR: %d MINOR: %d\n",
+// path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff));
+}
+
+static void add_new_file(char *name, char *path, unsigned long uid,
+ unsigned long gid, unsigned long mode)
+{
+ int fd = open(path,O_CREAT | O_WRONLY, mode);
+ if (fd < 0) {
+ error_msg_and_die("%s: file can not be created!", path);
+ } else {
+ close(fd);
+ }
+ chmod(path, mode);
+ chown(path, uid, gid);
+// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
+// path, name, gid, uid, mode);
+}
+
+
+static void add_new_fifo(char *name, char *path, unsigned long uid,
+ unsigned long gid, unsigned long mode)
+{
+ if (mknod(path, mode, 0))
+ error_msg_and_die("%s: file can not be created with mknod!", path);
+ chown(path, uid, gid);
+// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
+// path, name, gid, uid, mode);
+}
+
+
+/* device table entries take the form of:
+ <path> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
+ /dev/mem c 640 0 0 1 1 0 0 -
+
+ type can be one of:
+ f A regular file
+ d Directory
+ c Character special device file
+ b Block special device file
+ p Fifo (named pipe)
+
+ I don't bother with symlinks (permissions are irrelevant), hard
+ links (special cases of regular files), or sockets (why bother).
+
+ Regular files must exist in the target root directory. If a char,
+ block, fifo, or directory does not exist, it will be created.
+*/
+static int interpret_table_entry(char *line)
+{
+ char *name;
+ char path[4096], type;
+ unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
+ unsigned long start = 0, increment = 1, count = 0;
+
+ if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %lu", path,
+ &type, &mode, &uid, &gid, &major, &minor, &start,
+ &increment, &count))
+ {
+ return 1;
+ }
+
+ if (!strcmp(path, "/")) {
+ error_msg_and_die("Device table entries require absolute paths");
+ }
+ name = xstrdup(path + 1);
+ sprintf(path, "%s/%s\0", rootdir, name);
+
+ switch (type) {
+ case 'd':
+ mode |= S_IFDIR;
+ add_new_directory(name, path, uid, gid, mode);
+ break;
+ case 'f':
+ mode |= S_IFREG;
+ add_new_file(name, path, uid, gid, mode);
+ break;
+ case 'p':
+ mode |= S_IFIFO;
+ add_new_fifo(name, path, uid, gid, mode);
+ break;
+ case 'c':
+ case 'b':
+ mode |= (type == 'c') ? S_IFCHR : S_IFBLK;
+ if (count > 0) {
+ int i;
+ dev_t rdev;
+ char buf[80];
+
+ for (i = start; i < count; i++) {
+ sprintf(buf, "%s%d", name, i);
+ /* FIXME: MKDEV uses illicit insider knowledge of kernel
+ * major/minor representation... */
+ rdev = MKDEV(major, minor + (i * increment - start));
+ add_new_device(buf, path, uid, gid, mode, rdev);
+ }
+ } else {
+ /* FIXME: MKDEV uses illicit insider knowledge of kernel
+ * major/minor representation... */
+ dev_t rdev = MKDEV(major, minor);
+
+ add_new_device(name, path, uid, gid, mode, rdev);
+ }
+ break;
+ default:
+ error_msg_and_die("Unsupported file type");
+ }
+ if (name) free(name);
+ return 0;
+}
+
+
+static void parse_device_table(FILE * file)
+{
+ char *line;
+ size_t length = 256;
+ int len = 0;
+
+ /* Looks ok so far. The general plan now is to read in one
+ * line at a time, check for leading comment delimiters ('#'),
+ * then try and parse the line as a device table. If we fail
+ * to parse things, try and help the poor fool to fix their
+ * device table with a useful error msg... */
+
+ if((line = (char *)malloc(length)) == NULL) {
+ fclose(file);
+ return;
+ }
+
+ while ((len = getline(&line, &length, file)) != -1) {
+ /* First trim off any whitespace */
+
+ /* trim trailing whitespace */
+ while (len > 0 && isspace(line[len - 1]))
+ line[--len] = '\0';
+
+ /* trim leading whitespace */
+ memmove(line, &line[strspn(line, " \n\r\t\v")], len + 1);
+
+ /* If this is NOT a comment line, try to interpret it */
+ if (*line != '#') interpret_table_entry(line);
+ }
+ if (line) free(line);
+
+ fclose(file);
+}
+
+static int go(char *dname, FILE * devtable)
+{
+ struct stat sb;
+
+ if (lstat(dname, &sb)) {
+ perror_msg_and_die("%s", dname);
+ }
+ if (chdir(dname))
+ perror_msg_and_die("%s", dname);
+
+ if (devtable)
+ parse_device_table(devtable);
+
+ return 0;
+}
+
+
+static struct option long_options[] = {
+ {"root", 1, NULL, 'r'},
+ {"help", 0, NULL, 'h'},
+ {"squash", 0, NULL, 'q'},
+ {"version", 0, NULL, 'v'},
+ {"devtable", 1, NULL, 'D'},
+ {NULL, 0, NULL, 0}
+};
+
+static char *helptext =
+ "Usage: makedevs [OPTIONS]\n"
+ "Build entries based upon device_table.txt\n\n"
+ "Options:\n"
+ " -r, -d, --root=DIR Build filesystem from directory DIR (default: cwd)\n"
+ " -D, --devtable=FILE Use the named FILE as a device table file\n"
+ " -q, --squash Squash permissions and owners making all files be owned by root\n"
+ " -h, --help Display this help text\n"
+ " -v, --version Display version information\n\n";
+
+
+static char *revtext = "$Revision: 0.1 $";
+
+int main(int argc, char **argv)
+{
+ int c, opt;
+ extern char *optarg;
+ struct stat statbuf;
+ FILE *devtable = NULL;
+
+ umask (0);
+
+ while ((opt = getopt_long(argc, argv, "D:d:r:qhv",
+ long_options, &c)) >= 0) {
+ switch (opt) {
+ case 'D':
+ devtable = xfopen(optarg, "r");
+ if (fstat(fileno(devtable), &statbuf) < 0)
+ perror_msg_and_die(optarg);
+ if (statbuf.st_size < 10)
+ error_msg_and_die("%s: not a proper device table file", optarg);
+ break;
+ case 'h':
+ fprintf(stderr, helptext);
+ exit(1);
+ case 'r':
+ case 'd': /* for compatibility with mkfs.jffs, genext2fs, etc... */
+ if (rootdir != default_rootdir) {
+ error_msg_and_die("root directory specified more than once");
+ }
+ rootdir = xstrdup(optarg);
+ break;
+
+ case 'v':
+ fprintf(stderr, "makedevs revision %.*s\n",
+ (int) strlen(revtext) - 13, revtext + 11);
+ exit(1);
+ }
+ }
+
+ go(rootdir, devtable);
+ return 0;
+}
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 0000000..5db2d9b
--- /dev/null
+++ b/meta/recipes-devtools/makedevs/makedevs_1.0.0.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "A tool to make device nodes"
+LICENSE = "GPLv2"
+SECTION = "base"
+PRIORITY = "required"
+SRC_URI = "file://makedevs.c"
+PR = "r6"
+
+do_configure() {
+ install -m 0644 ${WORKDIR}/makedevs.c ${S}/
+}
+
+do_compile() {
+ ${CC} ${CFLAGS} -o ${S}/makedevs ${S}/makedevs.c
+}
+
+do_install() {
+ install -d ${D}${base_sbindir}
+ install -m 0755 ${S}/makedevs ${D}${base_sbindir}/makedevs
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/mpfr/mpfr.inc b/meta/recipes-devtools/mpfr/mpfr.inc
new file mode 100644
index 0000000..dbb859f
--- /dev/null
+++ b/meta/recipes-devtools/mpfr/mpfr.inc
@@ -0,0 +1,6 @@
+DESCRIPTION = "A C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "http://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
+
+inherit 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 0000000..188a5d9
--- /dev/null
+++ b/meta/recipes-devtools/mpfr/mpfr_3.0.0.bb
@@ -0,0 +1,9 @@
+require mpfr.inc
+
+DEPENDS = "gmp"
+PR = "r0"
+
+SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.bz2"
+S = "${WORKDIR}/mpfr-${PV}"
+
+BBCLASSEXTEND = "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 0000000..fb776fd
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils-1.3.1/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -0,0 +1,101 @@
+--- /tmp/mkfs.jffs2.c 2009-01-11 15:28:41.000000000 +0100
++++ git/mkfs.jffs2.c 2009-01-11 15:59:29.000000000 +0100
+@@ -100,6 +100,11 @@
+ struct rb_node hardlink_rb;
+ };
+
++struct ignorepath_entry {
++ struct ignorepath_entry* next; /* Points to the next ignorepath element */
++ char name[PATH_MAX]; /* Name of the entry */
++};
++static struct ignorepath_entry* ignorepath = 0;
+ struct rb_root hardlinks;
+ static int out_fd = -1;
+ static int in_fd = -1;
+@@ -408,7 +413,7 @@
+ char *hpath, *tpath;
+ struct dirent *dp, **namelist;
+ struct filesystem_entry *entry;
+-
++ struct ignorepath_entry* element = ignorepath;
+
+ if (lstat(hostpath, &sb)) {
+ perror_msg_and_die("%s", hostpath);
+@@ -417,6 +422,15 @@
+ entry = add_host_filesystem_entry(targetpath, hostpath,
+ sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
+
++ while ( element ) {
++ if ( strcmp( element->name, targetpath ) == 0 ) {
++ printf( "Note: ignoring directories below '%s'\n", targetpath );
++ return entry;
++ break;
++ }
++ element = element->next;
++ }
++
+ n = scandir(hostpath, &namelist, 0, alphasort);
+ if (n < 0) {
+ perror_msg_and_die("opening directory %s", hostpath);
+@@ -1453,6 +1467,7 @@
+ {"root", 1, NULL, 'r'},
+ {"pagesize", 1, NULL, 's'},
+ {"eraseblock", 1, NULL, 'e'},
++ {"ignore", 1, NULL, 'I'},
+ {"output", 1, NULL, 'o'},
+ {"help", 0, NULL, 'h'},
+ {"verbose", 0, NULL, 'v'},
+@@ -1500,6 +1515,7 @@
+ " -L, --list-compressors Show the list of the avaiable compressors\n"
+ " -t, --test-compression Call decompress and compare with the original (for test)\n"
+ " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
++" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
+ " -o, --output=FILE Output to FILE (default: stdout)\n"
+ " -l, --little-endian Create a little-endian filesystem\n"
+ " -b, --big-endian Create a big-endian filesystem\n"
+@@ -1666,6 +1682,7 @@
+ char *compr_name = NULL;
+ int compr_prior = -1;
+ int warn_page_size = 0;
++ struct ignorepath_entry* element = ignorepath;
+
+ page_size = sysconf(_SC_PAGESIZE);
+ if (page_size < 0) /* System doesn't know so ... */
+@@ -1676,7 +1693,7 @@
+ jffs2_compressors_init();
+
+ while ((opt = getopt_long(argc, argv,
+- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
++ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
+ {
+ switch (opt) {
+ case 'D':
+@@ -1700,6 +1717,28 @@
+ warn_page_size = 0; /* set by user, so don't need to warn */
+ break;
+
++ case 'I':
++ printf( "Note: Adding '%s' to ignore Path\n", optarg );
++ element = ignorepath;
++ if ( !ignorepath ) {
++ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
++ ignorepath->next = 0;
++ strcpy( &ignorepath->name[0], optarg );
++ } else {
++ while ( element->next ) element = element->next;
++ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
++ element->next->next = 0;
++ strcpy( &element->next->name[0], optarg );
++ }
++ printf( "--------- Dumping ignore path list ----------------\n" );
++ element = ignorepath;
++ while ( element ) {
++ printf( " * '%s'\n", &element->name[0] );
++ element = element->next;
++ }
++ printf( "---------------------------------------------------\n" );
++ break;
++
+ case 'o':
+ if (out_fd != -1) {
+ 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 0000000..64f25f7
--- /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 @@
+Index: git/nanddump.c
+===================================================================
+--- git.orig/nanddump.c 2010-04-29 10:24:15.000000000 +0200
++++ git/nanddump.c 2010-04-29 10:28:45.000000000 +0200
+@@ -210,6 +210,7 @@
+
+ /* Make sure device page sizes are valid */
+ if (!(meminfo.oobsize == 128 && meminfo.writesize == 4096) &&
++ !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
+ !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
+ !(meminfo.oobsize == 32 && meminfo.writesize == 1024) &&
+ !(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
+Index: git/nandwrite.c
+===================================================================
+--- git.orig/nandwrite.c 2010-04-29 09:59:30.000000000 +0200
++++ git/nandwrite.c 2010-04-29 10:27:51.000000000 +0200
+@@ -294,6 +294,7 @@
+ if (!(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
+ !(meminfo.oobsize == 8 && meminfo.writesize == 256) &&
+ !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
++ !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
+ !(meminfo.oobsize == 128 && meminfo.writesize == 4096)) {
+ fprintf(stderr, "Unknown flash (not normal NAND)\n");
+ 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 0000000..5555654
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
@@ -0,0 +1,134 @@
+---
+ mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 42 insertions(+), 2 deletions(-)
+
+--- git.orig/mkfs.jffs2.c
++++ git/mkfs.jffs2.c
+@@ -98,10 +98,16 @@ struct filesystem_entry {
+ struct filesystem_entry *next; /* Only relevant to non-directories */
+ struct filesystem_entry *files; /* Only relevant to directories */
+ struct rb_node hardlink_rb;
+ };
+
++struct ignorepath_entry {
++ struct ignorepath_entry* next; /* Points to the next ignorepath element */
++ char name[PATH_MAX]; /* Name of the entry */
++};
++
++static struct ignorepath_entry* ignorepath = 0;
+ struct rb_root hardlinks;
+ static int out_fd = -1;
+ static int in_fd = -1;
+ static char default_rootdir[] = ".";
+ static char *rootdir = default_rootdir;
+@@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv
+ int i, n;
+ struct stat sb;
+ char *hpath, *tpath;
+ struct dirent *dp, **namelist;
+ struct filesystem_entry *entry;
+-
++ struct ignorepath_entry* element = ignorepath;
+
+ if (lstat(hostpath, &sb)) {
+ perror_msg_and_die("%s", hostpath);
+ }
+
+ entry = add_host_filesystem_entry(targetpath, hostpath,
+ sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
+
++ while ( element ) {
++ if ( strcmp( element->name, targetpath ) == 0 ) {
++ printf( "Note: ignoring directories below '%s'\n", targetpath );
++ return entry;
++ break;
++ }
++ element = element->next;
++ }
++
+ n = scandir(hostpath, &namelist, 0, alphasort);
+ if (n < 0) {
+ perror_msg_and_die("opening directory %s", hostpath);
+ }
+
+@@ -1446,10 +1461,11 @@ static void create_target_filesystem(str
+ static struct option long_options[] = {
+ {"pad", 2, NULL, 'p'},
+ {"root", 1, NULL, 'r'},
+ {"pagesize", 1, NULL, 's'},
+ {"eraseblock", 1, NULL, 'e'},
++ {"ignore", 1, NULL, 'I'},
+ {"output", 1, NULL, 'o'},
+ {"help", 0, NULL, 'h'},
+ {"verbose", 0, NULL, 'v'},
+ {"version", 0, NULL, 'V'},
+ {"big-endian", 0, NULL, 'b'},
+@@ -1493,10 +1509,11 @@ static char *helptext =
+ " -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME\n"
+ " Set the priority of a compressor\n"
+ " -L, --list-compressors Show the list of the avaiable compressors\n"
+ " -t, --test-compression Call decompress and compare with the original (for test)\n"
+ " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
++" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
+ " -o, --output=FILE Output to FILE (default: stdout)\n"
+ " -l, --little-endian Create a little-endian filesystem\n"
+ " -b, --big-endian Create a big-endian filesystem\n"
+ " -D, --devtable=FILE Use the named FILE as a device table file\n"
+ " -f, --faketime Change all file times to '0' for regression testing\n"
+@@ -1659,21 +1676,22 @@ int main(int argc, char **argv)
+ FILE *devtable = NULL;
+ struct filesystem_entry *root;
+ char *compr_name = NULL;
+ int compr_prior = -1;
+ int warn_page_size = 0;
++ struct ignorepath_entry* element = ignorepath;
+
+ page_size = sysconf(_SC_PAGESIZE);
+ if (page_size < 0) /* System doesn't know so ... */
+ page_size = 4096; /* ... we make an educated guess */
+ if (page_size != 4096)
+ warn_page_size = 1; /* warn user if page size not 4096 */
+
+ jffs2_compressors_init();
+
+ while ((opt = getopt_long(argc, argv,
+- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
++ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
+ {
+ switch (opt) {
+ case 'D':
+ devtable = xfopen(optarg, "r");
+ if (fstat(fileno(devtable), &sb) < 0)
+@@ -1693,10 +1711,32 @@ int main(int argc, char **argv)
+ case 's':
+ page_size = strtol(optarg, NULL, 0);
+ warn_page_size = 0; /* set by user, so don't need to warn */
+ break;
+
++ case 'I':
++ printf( "Note: Adding '%s' to ignore Path\n", optarg );
++ element = ignorepath;
++ if ( !ignorepath ) {
++ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
++ ignorepath->next = 0;
++ strcpy( &ignorepath->name[0], optarg );
++ } else {
++ while ( element->next ) element = element->next;
++ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
++ element->next->next = 0;
++ strcpy( &element->next->name[0], optarg );
++ }
++ printf( "--------- Dumping ignore path list ----------------\n" );
++ element = ignorepath;
++ while ( element ) {
++ printf( " * '%s'\n", &element->name[0] );
++ element = element->next;
++ }
++ printf( "---------------------------------------------------\n" );
++ break;
++
+ case 'o':
+ if (out_fd != -1) {
+ error_msg_and_die("output filename specified more than once");
+ }
+ 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 0000000..bec60a1
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-ignoreerrors-git.patch
@@ -0,0 +1,26 @@
+---
+ nanddump.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/nanddump.c
+===================================================================
+--- git.orig/nanddump.c 2007-01-23 15:42:34.000000000 +0000
++++ git/nanddump.c 2007-01-23 15:47:57.000000000 +0000
+@@ -281,7 +281,7 @@ int main(int argc, char **argv)
+ }
+ }
+
+- if (badblock) {
++ if (badblock && !ignoreerrors) {
+ if (omitbad)
+ continue;
+ memset (readbuf, 0xff, bs);
+@@ -335,7 +335,7 @@ int main(int argc, char **argv)
+ if (omitoob)
+ continue;
+
+- if (badblock) {
++ if (badblock && !ignoreerrors) {
+ memset (readbuf, 0xff, meminfo.oobsize);
+ } else {
+ /* 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 0000000..4928db0
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/remove-ubi.patch
@@ -0,0 +1,33 @@
+---
+ Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- git.orig/Makefile
++++ git/Makefile
+@@ -41,19 +41,17 @@ $(BUILDDIR)/%.o: %.c
+ $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(<F).dep
+
+ .SUFFIXES:
+
+ all: $(TARGETS)
+- make -C $(BUILDDIR)/ubi-utils
+
+ IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
+ -include ${IGNORE}
+
+ clean:
+ rm -f $(BUILDDIR)/*.o $(TARGETS) $(BUILDDIR)/.*.c.dep $(SYMLINKS)
+ if [ "$(BUILDDIR)x" != ".x" ]; then rm -rf $(BUILDDIR); fi
+- make -C $(BUILDDIR)/ubi-utils clean
+
+ $(SYMLINKS):
+ ln -sf ../fs/jffs2/$@ $@
+
+ $(BUILDDIR)/mkfs.jffs2: $(BUILDDIR)/crc32.o \
+@@ -91,6 +89,5 @@ $(BUILDDIR)/fectest: $(BUILDDIR)/fectest
+ install: ${TARGETS}
+ mkdir -p ${DESTDIR}/${SBINDIR}
+ install -m0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
+ mkdir -p ${DESTDIR}/${MANDIR}/man1
+ gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
+- 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 0000000..12e1c75
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils_1.1.0+git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Tools for managing memory technology devices."
+SECTION = "base"
+DEPENDS = "zlib lzo"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+LICENSE = "GPLv2"
+PR = "r2"
+
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=b995f89a81589be8d8a41c374a6df109d0ee12b3 \
+ file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \
+ file://remove-ubi.patch;patch=1 \
+ file://fix-ignoreerrors-git.patch;patch=1"
+
+S = "${WORKDIR}/git/"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'"
+
+do_install () {
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
+ install -d ${D}${includedir}/mtd/
+ for f in ${S}/include/mtd/*.h; do
+ install -m 0644 $f ${D}${includedir}/mtd/
+ done
+
+}
+
+PARALLEL_MAKE = ""
+
+BBCLASSEXTEND = "native"
+NATIVE_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 0000000..faa2332
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils_1.3.1.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "Tools for managing memory technology devices."
+SECTION = "base"
+DEPENDS = "zlib lzo e2fsprogs util-linux"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+LICENSE = "GPLv2"
+
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV} \
+ file://add-exclusion-to-mkfs-jffs2-git-2.patch;patch=1 \
+ file://fix-ignoreerrors-git.patch;patch=1 \
+ file://add-oobsize-64-and-writesize-4096-as-normal-nand.patch;patch=1"
+
+S = "${WORKDIR}/git/"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
+
+do_install () {
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
+ install -d ${D}${includedir}/mtd/
+ for f in ${S}/include/mtd/*.h; do
+ install -m 0644 $f ${D}${includedir}/mtd/
+ done
+}
+
+PARALLEL_MAKE = ""
+
+BBCLASSEXTEND = "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 0000000..35fae44
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/mtools-makeinfo.patch
@@ -0,0 +1,63 @@
+--- mtools-3.9.9/configure.in.orig 2006-04-14 16:05:54.337655192 -0600
++++ mtools-3.9.9/configure.in 2006-04-14 16:12:29.736545424 -0600
+@@ -21,6 +21,33 @@
+ AC_C_CONST
+ AC_C_INLINE
+
++AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
++if test "x$MAKEINFO" = "x"; then
++ MAKEINFO="@echo makeinfo missing; true"
++fi
++AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, )
++if test "x$TEXI2DVI" = "x"; then
++ TEXI2DVI="@echo texi2dvi missing; true"
++fi
++AC_CHECK_PROG(TEXI2PDF, texi2pdf, texi2pdf, )
++if test "x$TEXI2PDF" = "x"; then
++ TEXI2PDF="@echo texi2pdf missing; true"
++fi
++AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, )
++if test "x$TEXI2HTML" = "x"; then
++ TEXI2HTML="@echo texi2html missing; true"
++fi
++AC_CHECK_PROG(DVI2PS, dvi2ps, dvi2ps, )
++if test "x$DVI2PS" = "x"; then
++ DVI2PS="@echo dvi2ps missing; true"
++fi
++
++AC_SUBST(MAKEINFO)
++AC_SUBST(TEXI2DVI)
++AC_SUBST(TEXI2PDF)
++AC_SUBST(TEXI2HTML)
++AC_SUBST(DVI2PS)
++
+
+ dnl Check for configuration options
+ dnl Enable OS/2 extended density format disks
+--- mtools-3.9.9/Makefile.in.sav 2006-04-14 15:56:19.000000000 -0600
++++ mtools-3.9.9/Makefile.in 2006-04-14 16:15:29.315245312 -0600
+@@ -11,10 +11,11 @@
+ USERLDFLAGS =
+ USERLDLIBS =
+
+-MAKEINFO = makeinfo
+-TEXI2DVI = texi2dvi
+-TEXI2PDF = texi2pdf
+-TEXI2HTML = texi2html
++MAKEINFO = @MAKEINFO@
++TEXI2DVI = @TEXI2DVI@
++TEXI2PDF = @TEXI2PDF@
++TEXI2HTML = @TEXI2HTML@
++DVI2PS = @DVI2PS@
+
+
+ # do not edit below this line
+@@ -181,7 +182,7 @@
+
+ ps: mtools.ps
+ %.ps: %.dvi
+- dvips -f < $< > $@
++ $(DVI2PS) -f < $< > $@
+
+ pdf: mtools.pdf
+ %.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 0000000..2abf534
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/mtools.patch
@@ -0,0 +1,127 @@
+$NetBSD: patch-aa,v 1.10 2007/08/17 20:55:34 joerg Exp $
+
+---
+ Makefile.in | 74 ++++++++++++++++++++++++++----------------------------------
+ 1 file changed, 33 insertions(+), 41 deletions(-)
+
+Index: mtools-3.9.9/Makefile.in
+===================================================================
+--- mtools-3.9.9.orig/Makefile.in 2007-10-12 11:18:46.000000000 +0100
++++ mtools-3.9.9/Makefile.in 2007-10-12 11:28:14.000000000 +0100
+@@ -195,30 +195,22 @@ html: mtools.html mtools_toc.html
+
+ # Don't cd, to avoid breaking install-sh references.
+ install-info: info
+- $(top_srcdir)/mkinstalldirs $(infodir)
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(infodir)
+ if test -f mtools.info; then \
+ for i in mtools.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/$$i; \
++ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/mtools.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
++ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi; \
+- if [ -n "$(INSTALL_INFO)" ] ; then \
+- if [ -f $(infodir)/dir.info ] ; then \
+- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir.info; \
+- fi; \
+- if [ -f $(infodir)/dir ] ; then \
+- $(INSTALL_INFO) $(infodir)/mtools.info $(infodir)/dir; \
+- fi; \
+- fi
+
+ uninstall-info:
+ cd $(infodir) && rm -f mtools.info*
+
+-install: $(bindir)/mtools @BINFLOPPYD@ install-man install-links \
+- $(bindir)/mkmanifest install-scripts install-info
++install: ${DESTDIR}$(bindir)/mtools ${DESTDIR}$(bindir)/floppyd install-man install-links \
++ ${DESTDIR}$(bindir)/mkmanifest install-scripts install-info
+
+ uninstall: uninstall-bin uninstall-man uninstall-links \
+ uninstall-scripts
+@@ -228,52 +220,52 @@ distclean: clean texclean
+ maintainer-clean: distclean
+
+
+-$(bindir)/floppyd: floppyd
+- $(top_srcdir)/mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) floppyd $(bindir)/floppyd
++${DESTDIR}$(bindir)/floppyd: floppyd
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
++ $(INSTALL_PROGRAM) floppyd ${DESTDIR}$(bindir)/floppyd
+
+-$(bindir)/floppyd_installtest: floppyd_installtest
+- $(top_srcdir)/mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) floppyd_installtest $(bindir)/floppyd_installtest
++${DESTDIR}$(bindir)/floppyd_installtest: floppyd_installtest
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
++ $(INSTALL_PROGRAM) floppyd_installtest ${DESTDIR}$(bindir)/floppyd_installtest
+
+-$(bindir)/mtools: mtools
+- $(top_srcdir)/mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) mtools $(bindir)/mtools
++${DESTDIR}$(bindir)/mtools: mtools
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
++ $(INSTALL_PROGRAM) mtools ${DESTDIR}$(bindir)/mtools
+
+-$(bindir)/mkmanifest: mkmanifest
+- $(top_srcdir)/mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) mkmanifest $(bindir)/mkmanifest
++${DESTDIR}$(bindir)/mkmanifest: mkmanifest
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
++ $(INSTALL_PROGRAM) mkmanifest ${DESTDIR}$(bindir)/mkmanifest
+
+ #$(ETCDIR)/mtools: mtools.etc
+ # cp mtools.etc $(ETCDIR)/mtools
+
+-install-links: $(bindir)/mtools
++install-links: ${DESTDIR}$(bindir)/mtools
+ @for j in $(LINKS); do \
+- rm -f $(bindir)/$$j ; \
+- $(LN_S) mtools $(bindir)/$$j ; \
+- echo $(bindir)/$$j ; \
++ rm -f ${DESTDIR}$(bindir)/$$j ; \
++ $(LN_S) mtools ${DESTDIR}$(bindir)/$$j ; \
++ echo ${DESTDIR}$(bindir)/$$j ; \
+ done
+
+ ## "z" is the older version of "gz"; the name is just *too* short
+-install-scripts: $(bindir)/mtools
+- @$(top_srcdir)/mkinstalldirs $(bindir)
++install-scripts: ${DESTDIR}$(bindir)/mtools
++ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ @for j in $(SCRIPTS) ; do \
+- $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j $(bindir)/$$j ; \
+- echo $(bindir)/$$j ; \
++ $(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
++ echo ${DESTDIR}$(bindir)/$$j ; \
+ done
+- rm -f $(bindir)/lz
+- $(LN_S) uz $(bindir)/lz
++ rm -f ${DESTDIR}$(bindir)/lz
++ $(LN_S) uz ${DESTDIR}$(bindir)/lz
+
+ install-man:
+- @$(top_srcdir)/mkinstalldirs $(MAN1DIR)
++ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN1DIR)
+ @for j in $(MAN1); do \
+- $(INSTALL_DATA) $(srcdir)/$$j $(MAN1DIR)/$$j ; \
+- echo $(MAN1DIR)/$$j ; \
++ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN1DIR)/$$j ; \
++ echo ${DESTDIR}$(MAN1DIR)/$$j ; \
+ done
+- @$(top_srcdir)/mkinstalldirs $(MAN5DIR)
++ @$(top_srcdir)/mkinstalldirs ${DESTDIR}$(MAN5DIR)
+ @for j in $(MAN5); do \
+- $(INSTALL_DATA) $(srcdir)/$$j $(MAN5DIR)/$$j ; \
+- echo $(MAN5DIR)/$$j ; \
++ $(INSTALL_DATA) $(srcdir)/$$j ${DESTDIR}$(MAN5DIR)/$$j ; \
++ echo ${DESTDIR}$(MAN5DIR)/$$j ; \
+ done
+
+ 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 0000000..300f43f
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/no-x11.patch
@@ -0,0 +1,19 @@
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- mtools-3.9.9.orig/Makefile.in
++++ mtools-3.9.9/Makefile.in
+@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
+ CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
+ LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
+ ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
+-X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
++X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
+ X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
+
+ all: mtools $(LINKS) mkmanifest @FLOPPYD@
+
+ %.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 0000000..932d88f
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -0,0 +1,22 @@
+# mtools OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+DESCRIPTION="Mtools is a collection of utilities for accessing MS-DOS disks from Unix without mounting them."
+HOMEPAGE="http://mtools.linux.lu"
+LICENSE="GPL"
+PR = "r4"
+
+#http://mtools.linux.lu/mtools-${PV}.tar.gz
+SRC_URI="http://folks.o-hand.com/richard/poky/sources/mtools-${PV}.tar.gz \
+ file://mtools-makeinfo.patch;patch=1 \
+ file://mtools.patch;patch=1 \
+ file://no-x11.patch;patch=1"
+
+S = "${WORKDIR}/mtools-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-x"
+
+BBCLASSEXTEND = "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 0000000..e4a5481
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/index-ignore-filenotfound.patch
@@ -0,0 +1,54 @@
+If we're building an image and some package rebuilds while this is happening
+some package can be removed/added to the ipk deploy directory. The image will
+not depend on this package so we can safely ignore these cases rather than
+error out.
+
+RP - 26/8/09
+
+Index: opkg-utils/opkg-make-index
+===================================================================
+--- opkg-utils.orig/opkg-make-index 2009-08-26 17:21:26.000000000 +0100
++++ opkg-utils/opkg-make-index 2009-08-27 16:11:22.000000000 +0100
+@@ -96,6 +96,7 @@
+ files=glob(pkg_dir + '/*.ipk') + glob(pkg_dir + '/*.deb')
+ files.sort()
+ for filename in files:
++ try:
+ basename = os.path.basename(filename)
+ pkg = None
+ fnameStat = os.stat(filename)
+@@ -130,6 +131,12 @@
+ to_morgue(basename)
+ if opt_s:
+ print filename
++ except OSError:
++ sys.stderr.write("Package %s disappeared on us!\n" % (filename))
++ continue
++ except IOError:
++ sys.stderr.write("Package %s disappeared on us!\n" % (filename))
++ continue
+
+ pkgsStampsFile = open(stamplist_filename, "w")
+ for f in pkgsStamps.keys():
+@@ -148,6 +155,7 @@
+ names = packages.packages.keys()
+ names.sort()
+ for name in names:
++ try:
+ pkg = packages.packages[name]
+ if locales_dir and pkg.depends:
+ depends = string.split(pkg.depends, ',')
+@@ -165,6 +173,13 @@
+ if (verbose):
+ sys.stderr.write("Writing info for package %s\n" % (pkg.package,))
+ print pkg
++ except OSError:
++ sys.stderr.write("Package %s disappeared on us!\n" % (name))
++ continue
++ except IOError:
++ sys.stderr.write("Package %s disappeared on us!\n" % (name))
++ continue
++
+ if packages_filename:
+ sys.stdout.close()
+ 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 0000000..f3b6f1f
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "OPKG Package Manager Utilities"
+SECTION = "base"
+HOMEPAGE = "http://wiki.openmoko.org/wiki/Opkg"
+PRIORITY = "optional"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
+RDEPENDS = "python"
+RDEPENDS_virtclass-native = ""
+PR = "r1"
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
+ file://index-ignore-filenotfound.patch"
+
+S = "${WORKDIR}/opkg-utils"
+
+# Avoid circular dependencies from package_ipk.bbclass
+PACKAGES_virtclass-native = ""
+
+do_install() {
+ oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+}
+
+BBCLASSEXTEND = "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 0000000..540be83
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch
@@ -0,0 +1,34 @@
+Index: trunk/libopkg/opkg.c
+===================================================================
+--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
+@@ -876,3 +876,18 @@
+
+ return ret;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++ pkg_t *pkg1, *pkg2;
++
++ pkg1 = pkg_new();
++ pkg2 = pkg_new();
++
++ parse_version(pkg1, ver1);
++ parse_version(pkg2, ver2);
++
++ return pkg_compare_versions(pkg1, pkg2);
++}
++
+Index: trunk/libopkg/opkg.h
+===================================================================
+--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
+@@ -58,4 +58,6 @@
+
+ int opkg_repository_accessibility_check(void);
+
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #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 0000000..d0711ec
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch
@@ -0,0 +1,17 @@
+Without this, the FILE reference in this header can cause compile issues.
+
+RP - 29/1/10
+
+Index: trunk/libopkg/pkg_dest.h
+===================================================================
+--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
++++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
+@@ -18,6 +18,8 @@
+ #ifndef PKG_DEST_H
+ #define PKG_DEST_H
+
++#include <stdio.h>
++
+ typedef struct pkg_dest pkg_dest_t;
+ struct pkg_dest
+ {
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 0000000..4b12448
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch
@@ -0,0 +1,17 @@
+Rebase for the latest version
+Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c
+--- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800
++++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800
+@@ -523,6 +523,10 @@
+ }
+ }
+
++ if (strlen(tar_entry->name) > 100) {
++ tar_entry->name[100] = 0;
++ }
++
+ // tar_entry->name = xstrdup(tar.formated.name);
+
+ /*
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
new file mode 100644
index 0000000..79c741d
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "opkg configuration files"
+SECTION = "base"
+LICENSE = "MIT"
+
+SRC_URI = "file://opkg.conf.comments \
+ file://lists \
+ file://dest \
+ file://src "
+
+do_compile () {
+ cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/lists >>${WORKDIR}/opkg.conf
+}
+
+do_install () {
+ install -d ${D}${sysconfdir}/
+ install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf
+}
+
+CONFFILES_${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 0000000..088ca40
--- /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 0000000..3c524f8
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/lists
@@ -0,0 +1,2 @@
+lists_dir ext /var/lib/ipkg
+
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 0000000..51623f4
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments
@@ -0,0 +1,23 @@
+# Must have one or more source entries of the form:
+#
+# src <src-name> <source-url>
+#
+# and one or more destination entries of the form:
+#
+# dest <dest-name> <target-path>
+#
+# where <src-name> and <dest-names> are identifiers that
+# should match [a-zA-Z0-9._-]+, <source-url> should be a
+# URL that points to a directory containing a Familiar
+# Packages file, and <target-path> should be a directory
+# that exists on the target system.
+
+# Proxy Support
+#option http_proxy http://proxy.tld:3128
+#option ftp_proxy http://proxy.tld:3128
+#option proxy_username <username>
+#option proxy_password <password>
+
+# Offline mode (for use in constructing flash images offline)
+#option offline_root target
+
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/src b/meta/recipes-devtools/opkg/opkg-collateral/src
new file mode 100644
index 0000000..e69de29
--- /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 0000000..9e27e93
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Base configuration files for opkg"
+LICENSE = "MIT"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_compile() {
+ mkdir -p ${S}/${sysconfdir}/opkg/
+
+ archconf=${S}/${sysconfdir}/opkg/arch.conf
+
+ rm -f $archconf
+ ipkgarchs="${PACKAGE_ARCHS}"
+ priority=1
+ for arch in $ipkgarchs; do
+ echo "arch $arch $priority" >> $archconf
+ priority=$(expr $priority + 5)
+ done
+}
+
+
+do_install () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
+}
+
+FILES_${PN} = "${sysconfdir}/opkg/ "
+
+CONFFILES_${PN} += "${sysconfdir}/opkg/arch.conf"
+
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 0000000..259a60e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb
@@ -0,0 +1,8 @@
+require opkg_${PV}.bb
+
+DEPENDS = "curl"
+PROVIDES += "opkg"
+
+EXTRA_OECONF += "--disable-gpg"
+
+DEFAULT_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 0000000..aa16b55
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
@@ -0,0 +1,10 @@
+require opkg_svn.bb
+
+DEPENDS = "curl"
+PROVIDES += "opkg"
+
+SRCREV = "${SRCREV_pn-opkg}"
+
+EXTRA_OECONF += "--disable-gpg"
+
+DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
new file mode 100644
index 0000000..add1563
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -0,0 +1,33 @@
+DESCRIPTION = "Open Package Manager"
+DESCRIPTION_libopkg = "Open Package Manager Library"
+DESCRIPTION_update-alternatives-cworth = "Update alternatives"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
+DEPENDS = "curl gpgme openssl"
+DEPENDS_virtclass-native = "curl-native"
+DEPENDS_virtclass-nativesdk = "curl-nativesdk"
+
+PE = "1"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg"
+
+# Werror gives all kinds bounds issuses with gcc 4.3.3
+do_configure_prepend() {
+ sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+}
+
+inherit autotools pkgconfig
+
+target_localstatedir := "${localstatedir}"
+EXTRA_OECONF = "--with-opkglibdir=${localstatedir}/lib"
+EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
+EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl"
+
+#PROVIDES_append_virtclass-native = "virtual/update-alternatives-native"
+#RPROVIDES_${PN} += "update-alternatives-native"
+
+BBCLASSEXTEND = "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 0000000..540be83
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
@@ -0,0 +1,34 @@
+Index: trunk/libopkg/opkg.c
+===================================================================
+--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
+@@ -876,3 +876,18 @@
+
+ return ret;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++ pkg_t *pkg1, *pkg2;
++
++ pkg1 = pkg_new();
++ pkg2 = pkg_new();
++
++ parse_version(pkg1, ver1);
++ parse_version(pkg2, ver2);
++
++ return pkg_compare_versions(pkg1, pkg2);
++}
++
+Index: trunk/libopkg/opkg.h
+===================================================================
+--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
+@@ -58,4 +58,6 @@
+
+ int opkg_repository_accessibility_check(void);
+
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #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 0000000..d0711ec
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/headerfix.patch
@@ -0,0 +1,17 @@
+Without this, the FILE reference in this header can cause compile issues.
+
+RP - 29/1/10
+
+Index: trunk/libopkg/pkg_dest.h
+===================================================================
+--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
++++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
+@@ -18,6 +18,8 @@
+ #ifndef PKG_DEST_H
+ #define PKG_DEST_H
+
++#include <stdio.h>
++
+ typedef struct pkg_dest pkg_dest_t;
+ struct pkg_dest
+ {
diff --git a/meta/recipes-devtools/opkg/opkg/logfix.patch b/meta/recipes-devtools/opkg/opkg/logfix.patch
new file mode 100644
index 0000000..da06f00
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/logfix.patch
@@ -0,0 +1,23 @@
+Patch to remove "duplicate" bits of logs from opkg output, which
+massively simplifies do_rootfs logs. The reason is we get unflushed
+data passed to the children and duplicated.
+
+RP - 26/1/10
+
+Index: trunk/libbb/gz_open.c
+===================================================================
+--- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000
++++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000
+@@ -38,6 +38,12 @@
+ perror_msg("pipe");
+ return(NULL);
+ }
++
++ /* If we don't flush, we end up with two copies of anything pending,
++ one from the parent, one from the child */
++ fflush(stdout);
++ fflush(stderr);
++
+ if ((*pid = fork()) == -1) {
+ perror_msg("fork");
+ 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 0000000..4eb3ff9
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
@@ -0,0 +1,53 @@
+require opkg.inc
+
+PROVIDES += "virtual/update-alternatives"
+RPROVIDES_update-alternatives-cworth += "update-alternatives"
+RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
+RDEPENDS_${PN}_virtclass-native = ""
+RDEPENDS_${PN}_virtclass-nativesdk = ""
+PACKAGE_ARCH_update-alternatives-cworth = "all"
+
+SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
+ file://add_vercmp.patch \
+ file://headerfix.patch \
+"
+
+PR = "r3"
+
+PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
+
+FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
+FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
+FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/"
+
+# We need to create the lock directory
+do_install_append() {
+ install -d ${D}${localstatedir}/lib/opkg
+}
+
+# Define a variable to allow distros to run configure earlier.
+# (for example, to enable loading of ethernet kernel modules before networking starts)
+OPKG_INIT_POSITION = "98"
+OPKG_INIT_POSITION_slugos = "41"
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
+ # this happens at S98 where our good 'ole packages script used to run
+ echo "#!/bin/sh
+opkg-cl configure
+rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+ chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+fi
+
+update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+}
+
+pkg_postrm_${PN} () {
+#!/bin/sh
+update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
new file mode 100644
index 0000000..518c767
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -0,0 +1,57 @@
+require opkg.inc
+
+PROVIDES += "virtual/update-alternatives"
+RPROVIDES_update-alternatives-cworth += "update-alternatives"
+RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
+RDEPENDS_${PN}_virtclass-native = ""
+RDEPENDS_${PN}_virtclass-nativesdk = ""
+PACKAGE_ARCH_update-alternatives-cworth = "all"
+
+SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
+ file://opkg_unarchive.patch \
+ file://add_vercmp.patch \
+ file://headerfix.patch \
+ file://logfix.patch"
+
+S = "${WORKDIR}/trunk"
+
+PV = "0.0+svnr${SRCREV}"
+PR = "r15"
+
+PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
+
+FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
+FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
+FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/"
+
+# We need to create the lock directory
+do_install_append() {
+ install -d ${D}${localstatedir}/lib/opkg
+}
+
+# Define a variable to allow distros to run configure earlier.
+# (for example, to enable loading of ethernet kernel modules before networking starts)
+OPKG_INIT_POSITION = "98"
+OPKG_INIT_POSITION_slugos = "41"
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
+ # this happens at S98 where our good 'ole packages script used to run
+ echo "#!/bin/sh
+opkg-cl configure
+rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+ chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+fi
+
+update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+}
+
+pkg_postrm_${PN} () {
+#!/bin/sh
+update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+
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 0000000..7b64ecd
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/2.5.9.patch
@@ -0,0 +1,27399 @@
+diff -urNd -urNd patch-2.5.4/aclocal.m4 patch-2.5.9/aclocal.m4
+--- patch-2.5.4/aclocal.m4 1999-08-29 09:09:30.000000000 -0400
++++ patch-2.5.9/aclocal.m4 2003-05-19 02:30:52.000000000 -0400
+@@ -1,106 +1,34 @@
+-# The following is taken from automake 1.4,
+-# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
+-# because only the former supports 64-bit integral types on HP-UX 10.20.
+-
+-## ----------------------------------------- ##
+-## ANSIfy the C compiler whenever possible. ##
+-## From Franc,ois Pinard ##
+-## ----------------------------------------- ##
+-
+-# serial 2
++# backupfile.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+-# @defmac AC_PROG_CC_STDC
+-# @maindex PROG_CC_STDC
+-# @ovindex CC
+-# If the C compiler in not in ANSI C mode by default, try to add an option
+-# to output variable @code{CC} to make it so. This macro tries various
+-# options that select ANSI C on some system or another. It considers the
+-# compiler to be in ANSI C mode if it handles function prototypes correctly.
+-#
+-# If you use this macro, you should check after calling it whether the C
+-# compiler has been set to accept ANSI C; if not, the shell variable
+-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+-# program @code{ansi2knr}, which comes with Ghostscript.
+-# @end defmac
++AC_DEFUN([gl_BACKUPFILE],
++[
++ dnl Prerequisites of lib/backupfile.c.
++ AC_REQUIRE([AC_HEADER_DIRENT])
++ AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
++ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
++ AC_CHECK_DECLS_ONCE(getenv malloc)
++ jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
+
+-AC_DEFUN(AM_PROG_CC_STDC,
+-[AC_REQUIRE([AC_PROG_CC])
+-AC_BEFORE([$0], [AC_C_INLINE])
+-AC_BEFORE([$0], [AC_C_CONST])
+-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+-dnl a magic option to avoid problems with ANSI preprocessor commands
+-dnl like #elif.
+-dnl FIXME: can't do this because then AC_AIX won't work due to a
+-dnl circular dependency.
+-dnl AC_BEFORE([$0], [AC_PROG_CPP])
+-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+-AC_CACHE_VAL(am_cv_prog_cc_stdc,
+-[am_cv_prog_cc_stdc=no
+-ac_save_CC="$CC"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX -qlanglvl=ansi
+-# Ultrix and OSF/1 -std1
+-# HP-UX -Aa -D_HPUX_SOURCE
+-# SVR4 -Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+-do
+- CC="$ac_save_CC $ac_arg"
+- AC_TRY_COMPILE(
+-[#include <stdarg.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+-struct buf { int x; };
+-FILE * (*rcsopen) (struct buf *, struct stat *, int);
+-static char *e (p, i)
+- char **p;
+- int i;
+-{
+- return p[i];
+-}
+-static char *f (char * (*g) (char **, int), char **p, ...)
+-{
+- char *s;
+- va_list v;
+- va_start (v,p);
+- s = g (p, va_arg (v,int));
+- va_end (v);
+- return s;
+-}
+-int test (int i, double x);
+-struct s1 {int (*f) (int a);};
+-struct s2 {int (*f) (double a);};
+-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+-int argc;
+-char **argv;
+-], [
+-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+-],
+-[am_cv_prog_cc_stdc="$ac_arg"; break])
+-done
+-CC="$ac_save_CC"
+-])
+-if test -z "$am_cv_prog_cc_stdc"; then
+- AC_MSG_RESULT([none needed])
+-else
+- AC_MSG_RESULT($am_cv_prog_cc_stdc)
+-fi
+-case "x$am_cv_prog_cc_stdc" in
+- x|xno) ;;
+- *) CC="$CC $am_cv_prog_cc_stdc" ;;
+-esac
++ dnl Prerequisites of lib/addext.c.
++ AC_REQUIRE([jm_AC_DOS])
++ AC_SYS_LONG_FILE_NAMES
++ AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
++ AC_CHECK_FUNCS(pathconf)
+ ])
+-#serial 2
++#serial 5
+
+ dnl From Jim Meyering.
+ dnl
+ dnl Check whether struct dirent has a member named d_ino.
+ dnl
+
+-AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
++AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
+ [AC_REQUIRE([AC_HEADER_DIRENT])dnl
+ AC_CACHE_CHECK([for d_ino member in directory struct],
+ jm_cv_struct_dirent_d_ino,
+@@ -130,244 +58,548 @@
+ )
+ if test $jm_cv_struct_dirent_d_ino = yes; then
+ AC_DEFINE(D_INO_IN_DIRENT, 1,
+- [Define if there is a member named d_ino in the struct describing
+- directory headers.])
++ [Define if there is a member named d_ino in the struct describing
++ directory headers.])
+ fi
+ ]
+ )
+-#serial 3
++# dirname.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+-dnl From Paul Eggert.
++AC_DEFUN([gl_DIRNAME],
++[
++ dnl Prerequisites of lib/dirname.h.
++ AC_REQUIRE([jm_AC_DOS])
+
+-# Define HAVE_INTTYPES_H if <inttypes.h> exists,
+-# doesn't clash with <sys/types.h>, and declares uintmax_t.
++ dnl Prerequisites of lib/dirname.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
+
+-AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
+-[
+- AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+- [AC_TRY_COMPILE(
+- [#include <sys/types.h>
+-#include <inttypes.h>],
+- [uintmax_t i = (uintmax_t) -1;],
+- jm_ac_cv_header_inttypes_h=yes,
+- jm_ac_cv_header_inttypes_h=no)])
+- if test $jm_ac_cv_header_inttypes_h = yes; then
+- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+-[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+- and declares uintmax_t. ])
+- fi
++ dnl Prerequisites of lib/basename.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++
++ dnl Prerequisites of lib/stripslash.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
+ ])
+ #serial 5
+
+-dnl By default, many hosts won't let programs access large files;
+-dnl one must use special compiler options to get large-file access to work.
+-dnl For more details about this brain damage please see:
+-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
++# Define some macros required for proper operation of code in lib/*.c
++# on MSDOS/Windows systems.
+
+-dnl Written by Paul Eggert <eggert@twinsun.com>.
++# From Jim Meyering.
+
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
+-AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
+- [AC_CACHE_CHECK([for $1 value to request large file support],
+- ac_cv_sys_largefile_$1,
+- [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
+- ac_cv_sys_largefile_$1=no
+- ifelse($1, CFLAGS,
+- [case "$host_os" in
+- # IRIX 6.2 and later require cc -n32.
+-changequote(, )dnl
+- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
+-changequote([, ])dnl
+- if test "$GCC" != yes; then
+- ac_cv_sys_largefile_CFLAGS=-n32
+- fi
+- ac_save_CC="$CC"
+- CC="$CC $ac_cv_sys_largefile_CFLAGS"
+- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
+- CC="$ac_save_CC"
+- esac])
+- }])])
++AC_DEFUN([jm_AC_DOS],
++ [
++ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
++ [
++ AC_TRY_COMPILE([],
++ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
++neither MSDOS nor Windows
++#endif],
++ [ac_cv_win_or_dos=yes],
++ [ac_cv_win_or_dos=no])
++ ])
+
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
+-AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
+- [case $2 in
+- no) ;;
+- ?*)
+- case "[$]$1" in
+- '') $1=$2 ;;
+- *) $1=[$]$1' '$2 ;;
+- esac ;;
+- esac])
++ if test x"$ac_cv_win_or_dos" = xyes; then
++ ac_fs_accepts_drive_letter_prefix=1
++ ac_fs_backslash_is_file_name_separator=1
++ else
++ ac_fs_accepts_drive_letter_prefix=0
++ ac_fs_backslash_is_file_name_separator=0
++ fi
+
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
+-AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
+- [AC_CACHE_CHECK([for $1], $2,
+- [$2=no
+-changequote(, )dnl
+- $4
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- -D$1)
+- $2=1 ;;
+- -D$1=*)
+- $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+- esac
+- done
+-changequote([, ])dnl
+- ])
+- if test "[$]$2" != no; then
+- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
+- fi])
++ AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
++ [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
++# define FILESYSTEM_PREFIX_LEN(Filename) \
++ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
++#else
++# define FILESYSTEM_PREFIX_LEN(Filename) 0
++#endif])
+
+-AC_DEFUN(AC_SYS_LARGEFILE,
+- [AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_ENABLE(largefile,
+- [ --disable-largefile omit support for large files])
+- if test "$enable_largefile" != no; then
+- AC_CHECK_TOOL(GETCONF, getconf)
+- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
+- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
+- AC_SYS_LARGEFILE_FLAGS(LIBS)
++ AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
++ $ac_fs_accepts_drive_letter_prefix,
++ [Define on systems for which file names may have a so-called
++ `drive letter' prefix, define this to compute the length of that
++ prefix, including the colon.])
+
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- no) ;;
+- -D_FILE_OFFSET_BITS=*) ;;
+- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
+- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
+- -D?* | -I?*)
+- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
+- *)
+- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
+- esac
+- done
+- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
+- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
+- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
+- ac_cv_sys_file_offset_bits,
+- [Number of bits in a file offset, on hosts where this is settable.],
+- [case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_file_offset_bits=64 ;;
+- esac])
+- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
+- ac_cv_sys_largefile_source,
+- [Define to make fseeko etc. visible, on some hosts.],
+- [case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_largefile_source=1 ;;
+- esac])
+- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
+- ac_cv_sys_large_files,
+- [Define for large files, on AIX-style hosts.],
+- [case "$host_os" in
+- # AIX 4.2 and later
+- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+- ac_cv_sys_large_files=1 ;;
+- esac])
+- fi
++ AH_VERBATIM(ISSLASH,
++ [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
++# define ISSLASH(C) ((C) == '/' || (C) == '\\')
++#else
++# define ISSLASH(C) ((C) == '/')
++#endif])
++
++ AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
++ $ac_fs_backslash_is_file_name_separator,
++ [Define if the backslash character may also serve as a file name
++ component separator.])
+ ])
+-#serial 3
++#serial 7
++
++AC_DEFUN([gl_ERROR],
++[
++ AC_FUNC_ERROR_AT_LINE
++ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
++ jm_PREREQ_ERROR
++])
++
++# Prerequisites of lib/error.c.
++AC_DEFUN([jm_PREREQ_ERROR],
++[
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_REQUIRE([AC_FUNC_VPRINTF])
++ AC_CHECK_FUNCS(strerror)
++ AC_CHECK_DECLS([strerror])
++ AC_FUNC_STRERROR_R
++])
++# getopt.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_GETOPT],
++[
++ dnl Prerequisites of lib/getopt.c.
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
++# malloc.m4 serial 7
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+ dnl From Jim Meyering.
+ dnl Determine whether malloc accepts 0 as its argument.
+ dnl If it doesn't, arrange to use the replacement function.
+-dnl
+
+-AC_DEFUN(jm_FUNC_MALLOC,
++AC_DEFUN([jm_FUNC_MALLOC],
+ [
+- dnl xmalloc.c requires that this symbol be defined so it doesn't
+- dnl mistakenly use a broken malloc -- as it might if this test were omitted.
+- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
+- [Define if the malloc check has been performed. ])
++ AC_REQUIRE([AC_FUNC_MALLOC])
++ dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
++ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
++ gl_PREREQ_MALLOC
++ fi
++])
+
+- AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
+- [AC_TRY_RUN([
+- char *malloc ();
+- int
+- main ()
+- {
+- exit (malloc (0) ? 0 : 1);
+- }
++# Prerequisites of lib/malloc.c.
++AC_DEFUN([gl_PREREQ_MALLOC], [
++ :
++])
++# mbrtowc.m4 serial 5
++dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert
++
++dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
++dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
++
++AC_DEFUN([jm_FUNC_MBRTOWC],
++[
++ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
++ jm_cv_func_mbrtowc,
++ [AC_TRY_LINK(
++ [#include <wchar.h>],
++ [mbstate_t state; return ! (sizeof state && mbrtowc);],
++ jm_cv_func_mbrtowc=yes,
++ jm_cv_func_mbrtowc=no)])
++ if test $jm_cv_func_mbrtowc = yes; then
++ AC_DEFINE(HAVE_MBRTOWC, 1,
++ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
++ fi
++])
++# mbstate_t.m4 serial 9
++dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++# From Paul Eggert.
++
++# BeOS 5 has <wchar.h> but does not define mbstate_t,
++# so you can't declare an object of that type.
++# Check for this incompatibility with Standard C.
++
++# AC_TYPE_MBSTATE_T
++# -----------------
++AC_DEFUN([AC_TYPE_MBSTATE_T],
++ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [AC_INCLUDES_DEFAULT
++# include <wchar.h>],
++ [mbstate_t x; return sizeof x;])],
++ [ac_cv_type_mbstate_t=yes],
++ [ac_cv_type_mbstate_t=no])])
++ if test $ac_cv_type_mbstate_t = yes; then
++ AC_DEFINE([HAVE_MBSTATE_T], 1,
++ [Define to 1 if <wchar.h> declares mbstate_t.])
++ else
++ AC_DEFINE([mbstate_t], int,
++ [Define to a type if <wchar.h> does not define.])
++ fi])
++# memchr.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_MEMCHR],
++[
++ AC_REPLACE_FUNCS(memchr)
++ if test $ac_cv_func_memchr = no; then
++ jm_PREREQ_MEMCHR
++ fi
++])
++
++# Prerequisites of lib/memchr.c.
++AC_DEFUN([jm_PREREQ_MEMCHR], [
++ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
++ AC_CHECK_HEADERS(bp-sym.h)
++])
++#serial 1
++
++dnl From Mumit Khan and Paul Eggert
++dnl Determine whether mkdir accepts only one argument instead of the usual two.
++
++AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
++ [AC_CHECK_FUNCS(mkdir)
++ AC_CACHE_CHECK([whether mkdir takes only one argument],
++ patch_cv_mkdir_takes_one_arg,
++ [patch_cv_mkdir_takes_one_arg=no
++ if test $ac_cv_func_mkdir = yes; then
++ AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
+ ],
+- jm_cv_func_working_malloc=yes,
+- jm_cv_func_working_malloc=no,
+- dnl When crosscompiling, assume malloc is broken.
+- jm_cv_func_working_malloc=no)
++ [mkdir (".", 0);],
++ ,
++ [AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
++ ],
++ [mkdir (".");],
++ patch_cv_mkdir_takes_one_arg=yes
++ )]
++ )
++ fi
++ ]
++ )
++ if test $patch_cv_mkdir_takes_one_arg = yes; then
++ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
++ [Define if mkdir takes only one argument.])
++ fi
++ ]
++)
++# onceonly.m4 serial 3
++dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl This file defines some "once only" variants of standard autoconf macros.
++dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
++dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
++dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
++dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
++dnl The advantage is that the check for each of the headers/functions/decls
++dnl will be put only once into the 'configure' file. It keeps the size of
++dnl the 'configure' file down, and avoids redundant output when 'configure'
++dnl is run.
++dnl The drawback is that the checks cannot be conditionalized. If you write
++dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
++dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
++dnl empty, and the check will be inserted before the body of the AC_DEFUNed
++dnl function.
++
++dnl Autoconf version 2.57 or newer is recommended.
++AC_PREREQ(2.54)
++
++# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
++# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
++AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
++ :
++ AC_FOREACH([gl_HEADER_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
++ [-./], [___])), [
++ AC_CHECK_HEADERS(gl_HEADER_NAME)
++ ])
++ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
++ [-./], [___])))
+ ])
+- if test $jm_cv_func_working_malloc = no; then
+- AC_SUBST(LIBOBJS)
+- LIBOBJS="$LIBOBJS malloc.$ac_objext"
+- AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
+- [Define to rpl_malloc if the replacement function should be used.])
+- fi
+ ])
+-## ------------------------------- ##
+-## Check for function prototypes. ##
+-## From Franc,ois Pinard ##
+-## ------------------------------- ##
+
+-# serial 1
++# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
++# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
++AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
++ :
++ AC_FOREACH([gl_FUNC_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
++ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
++ ])
++])
+
+-AC_DEFUN(AM_C_PROTOTYPES,
+-[AC_REQUIRE([AM_PROG_CC_STDC])
+-AC_REQUIRE([AC_PROG_CPP])
+-AC_MSG_CHECKING([for function prototypes])
+-if test "$am_cv_prog_cc_stdc" != no; then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
+- U= ANSI2KNR=
+-else
+- AC_MSG_RESULT(no)
+- U=_ ANSI2KNR=./ansi2knr
+- # Ensure some checks needed by ansi2knr itself.
+- AC_HEADER_STDC
+- AC_CHECK_HEADERS(string.h)
+-fi
+-AC_SUBST(U)dnl
+-AC_SUBST(ANSI2KNR)dnl
++# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
++# AC_CHECK_DECLS(DECL1, DECL2, ...).
++AC_DEFUN([AC_CHECK_DECLS_ONCE], [
++ :
++ AC_FOREACH([gl_DECL_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
++ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
++ ])
+ ])
+-#serial 3
++# quote.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_QUOTE],
++[
++ dnl Prerequisites of lib/quote.c.
++ AC_CHECK_HEADERS_ONCE(stddef.h)
++])
++# quotearg.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_QUOTEARG],
++[
++ dnl Prerequisites of lib/quotearg.c.
++ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
++ AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
++ AC_TYPE_MBSTATE_T
++ jm_FUNC_MBRTOWC
++])
++# realloc.m4 serial 7
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+ dnl From Jim Meyering.
+ dnl Determine whether realloc works when both arguments are 0.
+ dnl If it doesn't, arrange to use the replacement function.
+-dnl
+
+-AC_DEFUN(jm_FUNC_REALLOC,
++AC_DEFUN([jm_FUNC_REALLOC],
+ [
+- dnl xmalloc.c requires that this symbol be defined so it doesn't
+- dnl mistakenly use a broken realloc -- as it might if this test were omitted.
+- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
+- [Define if the realloc check has been performed. ])
++ AC_REQUIRE([AC_FUNC_REALLOC])
++ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
++ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
++ gl_PREREQ_REALLOC
++ fi
++])
+
+- AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
+- [AC_TRY_RUN([
+- char *realloc ();
+- int
+- main ()
+- {
+- exit (realloc (0, 0) ? 0 : 1);
+- }
+- ],
+- jm_cv_func_working_realloc=yes,
+- jm_cv_func_working_realloc=no,
+- dnl When crosscompiling, assume realloc is broken.
+- jm_cv_func_working_realloc=no)
+- ])
+- if test $jm_cv_func_working_realloc = no; then
+- AC_SUBST(LIBOBJS)
+- LIBOBJS="$LIBOBJS realloc.$ac_objext"
+- AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
+- [Define to rpl_realloc if the replacement function should be used.])
++# Prerequisites of lib/realloc.c.
++AC_DEFUN([gl_PREREQ_REALLOC], [
++ :
++])
++# rmdir.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_RMDIR],
++[
++ AC_REPLACE_FUNCS(rmdir)
++ if test $ac_cv_func_rmdir = no; then
++ gl_PREREQ_RMDIR
+ fi
+ ])
+-#serial 2
++
++# Prerequisites of lib/rmdir.c.
++AC_DEFUN([gl_PREREQ_RMDIR], [
++ AC_REQUIRE([AC_HEADER_STAT])
++ :
++])
++
++# Check for setmode, DOS style.
++
++# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++AC_DEFUN([AC_FUNC_SETMODE_DOS],
++ [AC_CHECK_HEADERS(fcntl.h unistd.h)
++ AC_CACHE_CHECK([for DOS-style setmode],
++ [ac_cv_func_setmode_dos],
++ [AC_TRY_LINK(
++ [#include <io.h>
++ #if HAVE_FCNTL_H
++ # include <fcntl.h>
++ #endif
++ #if HAVE_UNISTD_H
++ # include <unistd.h>
++ #endif],
++ [int ret = setmode && setmode (1, O_BINARY);],
++ [ac_cv_func_setmode_dos=yes],
++ [ac_cv_func_setmode_dos=no])])
++ if test $ac_cv_func_setmode_dos = yes; then
++ AC_DEFINE(HAVE_SETMODE_DOS, 1,
++ [Define to 1 if you have the DOS-style `setmode' function.])
++ fi])
++# Check for stdbool.h that conforms to C99.
++
++# Copyright (C) 2002-2003 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++# Prepare for substituting <stdbool.h> if it is not supported.
++
++AC_DEFUN([AM_STDBOOL_H],
++[
++ AC_REQUIRE([AC_HEADER_STDBOOL])
++
++ # Define two additional variables used in the Makefile substitution.
++
++ if test "$ac_cv_header_stdbool_h" = yes; then
++ STDBOOL_H=''
++ else
++ STDBOOL_H='stdbool.h'
++ fi
++ AC_SUBST([STDBOOL_H])
++
++ if test "$ac_cv_type__Bool" = yes; then
++ HAVE__BOOL=1
++ else
++ HAVE__BOOL=0
++ fi
++ AC_SUBST([HAVE__BOOL])
++])
++
++# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
++# have this macro built-in.
++
++AC_DEFUN([AC_HEADER_STDBOOL],
++ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
++ [ac_cv_header_stdbool_h],
++ [AC_TRY_COMPILE(
++ [
++ #include <stdbool.h>
++ #ifndef bool
++ "error: bool is not defined"
++ #endif
++ #ifndef false
++ "error: false is not defined"
++ #endif
++ #if false
++ "error: false is not 0"
++ #endif
++ #ifndef true
++ "error: false is not defined"
++ #endif
++ #if true != 1
++ "error: true is not 1"
++ #endif
++ #ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++ #endif
++
++ struct s { _Bool s: 1; _Bool t; } s;
++
++ char a[true == 1 ? 1 : -1];
++ char b[false == 0 ? 1 : -1];
++ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++ char d[(bool) -0.5 == true ? 1 : -1];
++ bool e = &s;
++ char f[(_Bool) -0.0 == false ? 1 : -1];
++ char g[true];
++ char h[sizeof (_Bool)];
++ char i[sizeof s.t];
++ ],
++ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
++ [ac_cv_header_stdbool_h=yes],
++ [ac_cv_header_stdbool_h=no])])
++ AC_CHECK_TYPES([_Bool])
++ if test $ac_cv_header_stdbool_h = yes; then
++ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
++ fi])
++#serial 7 -*- autoconf -*-
++
++dnl From Jim Meyering.
++dnl
++dnl See if the glibc *_unlocked I/O macros or functions are available.
++dnl Use only those *_unlocked macros or functions that are declared
++dnl (because some of them were declared in Solaris 2.5.1 but were removed
++dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
++dnl on Solaris 2.6).
++
++AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
++[
++ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
++ dnl etc.
++ AC_REQUIRE([AC_GNU_SOURCE])
++
++ AC_CHECK_DECLS_ONCE(
++ [clearerr_unlocked feof_unlocked ferror_unlocked
++ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
++ fread_unlocked fwrite_unlocked getc_unlocked
++ getchar_unlocked putc_unlocked putchar_unlocked])
++])
++#serial 5
+
+ dnl From Jim Meyering
+
+@@ -375,9 +607,9 @@
+ dnl usually in <utime.h>.
+ dnl Some systems have utime.h but don't declare the struct anywhere.
+
+-AC_DEFUN(jm_STRUCT_UTIMBUF,
++AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
+ [
+- AC_CHECK_HEADERS(utime.h)
++ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
+ AC_REQUIRE([AC_HEADER_TIME])
+ AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
+ [AC_TRY_COMPILE(
+@@ -402,8 +634,34 @@
+ ])
+
+ if test $fu_cv_sys_struct_utimbuf = yes; then
+- AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
+-[Define if struct utimbuf is declared -- usually in <utime.h>.
+- Some systems have utime.h but don't declare the struct anywhere. ])
++ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
++ [Define if struct utimbuf is declared -- usually in <utime.h>.
++ Some systems have utime.h but don't declare the struct anywhere. ])
+ fi
+ ])
++# xalloc.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_XALLOC],
++[
++ gl_PREREQ_XMALLOC
++ gl_PREREQ_XSTRDUP
++])
++
++# Prerequisites of lib/xmalloc.c.
++AC_DEFUN([gl_PREREQ_XMALLOC], [
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_REQUIRE([jm_FUNC_MALLOC])
++ AC_REQUIRE([jm_FUNC_REALLOC])
++])
++
++# Prerequisites of lib/xstrdup.c.
++AC_DEFUN([gl_PREREQ_XSTRDUP], [
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
+diff -urNd -urNd patch-2.5.4/addext.c patch-2.5.9/addext.c
+--- patch-2.5.4/addext.c 1999-01-18 12:02:28.000000000 -0500
++++ patch-2.5.9/addext.c 2003-05-18 01:30:52.000000000 -0400
+@@ -1,5 +1,7 @@
+ /* addext.c -- add an extension to a file name
+- Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
++
++ Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
++ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -29,8 +31,6 @@
+ # define HAVE_LONG_FILE_NAMES 0
+ #endif
+
+-#include <backupfile.h>
+-
+ #if HAVE_LIMITS_H
+ # include <limits.h>
+ #endif
+@@ -49,7 +49,13 @@
+ # include <unistd.h>
+ #endif
+
+-char *base_name PARAMS ((char const *));
++#include <errno.h>
++#ifndef errno
++extern int errno;
++#endif
++
++#include "backupfile.h"
++#include "dirname.h"
+
+ /* Append to FILENAME the extension EXT, unless the result would be too long,
+ in which case just append the character E. */
+@@ -58,25 +64,34 @@
+ addext (char *filename, char const *ext, int e)
+ {
+ char *s = base_name (filename);
+- size_t slen = strlen (s), extlen = strlen (ext);
+- long slen_max = -1;
++ size_t slen = base_len (s);
++ size_t extlen = strlen (ext);
++ size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX;
+
+ #if HAVE_PATHCONF && defined _PC_NAME_MAX
+- if (slen + extlen <= _POSIX_NAME_MAX && ! HAVE_DOS_FILE_NAMES)
+- /* The file name is so short there's no need to call pathconf. */
+- slen_max = _POSIX_NAME_MAX;
+- else if (s == filename)
+- slen_max = pathconf (".", _PC_NAME_MAX);
+- else
++ if (_POSIX_NAME_MAX < slen + extlen || HAVE_DOS_FILE_NAMES)
+ {
+- char c = *s;
+- *s = 0;
+- slen_max = pathconf (filename, _PC_NAME_MAX);
+- *s = c;
++ /* The new base name is long enough to require a pathconf check. */
++ long name_max;
++ errno = 0;
++ if (s == filename)
++ name_max = pathconf (".", _PC_NAME_MAX);
++ else
++ {
++ char c = *s;
++ if (! ISSLASH (c))
++ *s = 0;
++ name_max = pathconf (filename, _PC_NAME_MAX);
++ *s = c;
++ }
++ if (0 <= name_max || errno == 0)
++ {
++ long size = slen_max = name_max;
++ if (name_max != size)
++ slen_max = -1;
++ }
+ }
+ #endif
+- if (slen_max < 0)
+- slen_max = HAVE_LONG_FILE_NAMES ? 255 : 14;
+
+ if (HAVE_DOS_FILE_NAMES && slen_max <= 12)
+ {
+diff -urNd -urNd patch-2.5.4/ansi2knr.1 patch-2.5.9/ansi2knr.1
+--- patch-2.5.4/ansi2knr.1 1997-07-04 15:39:00.000000000 -0400
++++ patch-2.5.9/ansi2knr.1 1969-12-31 19:00:00.000000000 -0500
+@@ -1,36 +0,0 @@
+-.TH ANSI2KNR 1 "19 Jan 1996"
+-.SH NAME
+-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
+-.SH SYNOPSIS
+-.I ansi2knr
+-[--varargs] input_file [output_file]
+-.SH DESCRIPTION
+-If no output_file is supplied, output goes to stdout.
+-.br
+-There are no error messages.
+-.sp
+-.I ansi2knr
+-recognizes function definitions by seeing a non-keyword identifier at the left
+-margin, followed by a left parenthesis, with a right parenthesis as the last
+-character on the line, and with a left brace as the first token on the
+-following line (ignoring possible intervening comments). It will recognize a
+-multi-line header provided that no intervening line ends with a left or right
+-brace or a semicolon. These algorithms ignore whitespace and comments, except
+-that the function name must be the first thing on the line.
+-.sp
+-The following constructs will confuse it:
+-.br
+- - Any other construct that starts at the left margin and follows the
+-above syntax (such as a macro or function call).
+-.br
+- - Some macros that tinker with the syntax of the function header.
+-.sp
+-The --varargs switch is obsolete, and is recognized only for
+-backwards compatibility. The present version of
+-.I ansi2knr
+-will always attempt to convert a ... argument to va_alist and va_dcl.
+-.SH AUTHOR
+-L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
+-continues to maintain the current version; most of the code in the current
+-version is his work. ansi2knr also includes contributions by Francois
+-Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
+diff -urNd -urNd patch-2.5.4/ansi2knr.c patch-2.5.9/ansi2knr.c
+--- patch-2.5.4/ansi2knr.c 1999-04-13 10:44:41.000000000 -0400
++++ patch-2.5.9/ansi2knr.c 1969-12-31 19:00:00.000000000 -0500
+@@ -1,678 +0,0 @@
+-/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
+-
+-/*$Id: ansi2knr.c,v 1.14 1999/04/13 14:44:33 meyering Exp $*/
+-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
+-
+-/*
+-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
+-WARRANTY. No author or distributor accepts responsibility to anyone for the
+-consequences of using it or for whether it serves any particular purpose or
+-works at all, unless he says so in writing. Refer to the GNU General Public
+-License (the "GPL") for full details.
+-
+-Everyone is granted permission to copy, modify and redistribute ansi2knr,
+-but only under the conditions described in the GPL. A copy of this license
+-is supposed to have been given to you along with ansi2knr so you can know
+-your rights and responsibilities. It should be in a file named COPYLEFT,
+-or, if there is no file named COPYLEFT, a file named COPYING. Among other
+-things, the copyright notice and this notice must be preserved on all
+-copies.
+-
+-We explicitly state here what we believe is already implied by the GPL: if
+-the ansi2knr program is distributed as a separate set of sources and a
+-separate executable file which are aggregated on a storage medium together
+-with another program, this in itself does not bring the other program under
+-the GPL, nor does the mere fact that such a program or the procedures for
+-constructing it invoke the ansi2knr executable bring any other part of the
+-program under the GPL.
+-*/
+-
+-/*
+- * Usage:
+- ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
+- * --filename provides the file name for the #line directive in the output,
+- * overriding input_file (if present).
+- * If no input_file is supplied, input is read from stdin.
+- * If no output_file is supplied, output goes to stdout.
+- * There are no error messages.
+- *
+- * ansi2knr recognizes function definitions by seeing a non-keyword
+- * identifier at the left margin, followed by a left parenthesis,
+- * with a right parenthesis as the last character on the line,
+- * and with a left brace as the first token on the following line
+- * (ignoring possible intervening comments), except that a line
+- * consisting of only
+- * identifier1(identifier2)
+- * will not be considered a function definition unless identifier2 is
+- * the word "void", and a line consisting of
+- * identifier1(identifier2, <<arbitrary>>)
+- * will not be considered a function definition.
+- * ansi2knr will recognize a multi-line header provided
+- * that no intervening line ends with a left or right brace or a semicolon.
+- * These algorithms ignore whitespace and comments, except that
+- * the function name must be the first thing on the line.
+- * The following constructs will confuse it:
+- * - Any other construct that starts at the left margin and
+- * follows the above syntax (such as a macro or function call).
+- * - Some macros that tinker with the syntax of function headers.
+- */
+-
+-/*
+- * The original and principal author of ansi2knr is L. Peter Deutsch
+- * <ghost@aladdin.com>. Other authors are noted in the change history
+- * that follows (in reverse chronological order):
+- lpd 1999-04-12 added minor fixes from Pavel Roskin
+- <pavel_roskin@geocities.com> for clean compilation with
+- gcc -W -Wall
+- lpd 1999-03-22 added hack to recognize lines consisting of
+- identifier1(identifier2, xxx) as *not* being procedures
+- lpd 1999-02-03 made indentation of preprocessor commands consistent
+- lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
+- endless loop; quoted strings within an argument list
+- confused the parser
+- lpd 1999-01-24 added a check for write errors on the output,
+- suggested by Jim Meyering <meyering@ascend.com>
+- lpd 1998-11-09 added further hack to recognize identifier(void)
+- as being a procedure
+- lpd 1998-10-23 added hack to recognize lines consisting of
+- identifier1(identifier2) as *not* being procedures
+- lpd 1997-12-08 made input_file optional; only closes input and/or
+- output file if not stdin or stdout respectively; prints
+- usage message on stderr rather than stdout; adds
+- --filename switch (changes suggested by
+- <ceder@lysator.liu.se>)
+- lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
+- compilers that don't understand void, as suggested by
+- Tom Lane
+- lpd 1996-01-15 changed to require that the first non-comment token
+- on the line following a function header be a left brace,
+- to reduce sensitivity to macros, as suggested by Tom Lane
+- <tgl@sss.pgh.pa.us>
+- lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
+- undefined preprocessor symbols as 0; changed all #ifdefs
+- for configuration symbols to #ifs
+- lpd 1995-04-05 changed copyright notice to make it clear that
+- including ansi2knr in a program does not bring the entire
+- program under the GPL
+- lpd 1994-12-18 added conditionals for systems where ctype macros
+- don't handle 8-bit characters properly, suggested by
+- Francois Pinard <pinard@iro.umontreal.ca>;
+- removed --varargs switch (this is now the default)
+- lpd 1994-10-10 removed CONFIG_BROKETS conditional
+- lpd 1994-07-16 added some conditionals to help GNU `configure',
+- suggested by Francois Pinard <pinard@iro.umontreal.ca>;
+- properly erase prototype args in function parameters,
+- contributed by Jim Avera <jima@netcom.com>;
+- correct error in writeblanks (it shouldn't erase EOLs)
+- lpd 1989-xx-xx original version
+- */
+-
+-/* Most of the conditionals here are to make ansi2knr work with */
+-/* or without the GNU configure machinery. */
+-
+-#if HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <stdio.h>
+-#include <ctype.h>
+-
+-#if HAVE_CONFIG_H
+-
+-/*
+- For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
+- This will define HAVE_CONFIG_H and so, activate the following lines.
+- */
+-
+-# if STDC_HEADERS || HAVE_STRING_H
+-# include <string.h>
+-# else
+-# include <strings.h>
+-# endif
+-
+-#else /* not HAVE_CONFIG_H */
+-
+-/* Otherwise do it the hard way */
+-
+-# ifdef BSD
+-# include <strings.h>
+-# else
+-# ifdef VMS
+- extern int strlen(), strncmp();
+-# else
+-# include <string.h>
+-# endif
+-# endif
+-
+-#endif /* not HAVE_CONFIG_H */
+-
+-#if STDC_HEADERS
+-# include <stdlib.h>
+-#else
+-/*
+- malloc and free should be declared in stdlib.h,
+- but if you've got a K&R compiler, they probably aren't.
+- */
+-# ifdef MSDOS
+-# include <malloc.h>
+-# else
+-# ifdef VMS
+- extern char *malloc();
+- extern void free();
+-# else
+- extern char *malloc();
+- extern int free();
+-# endif
+-# endif
+-
+-#endif
+-
+-/* Define NULL (for *very* old compilers). */
+-#ifndef NULL
+-# define NULL (0)
+-#endif
+-
+-/*
+- * The ctype macros don't always handle 8-bit characters correctly.
+- * Compensate for this here.
+- */
+-#ifdef isascii
+-# undef HAVE_ISASCII /* just in case */
+-# define HAVE_ISASCII 1
+-#else
+-#endif
+-#if STDC_HEADERS || !HAVE_ISASCII
+-# define is_ascii(c) 1
+-#else
+-# define is_ascii(c) isascii(c)
+-#endif
+-
+-#define is_space(c) (is_ascii(c) && isspace(c))
+-#define is_alpha(c) (is_ascii(c) && isalpha(c))
+-#define is_alnum(c) (is_ascii(c) && isalnum(c))
+-
+-/* Scanning macros */
+-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
+-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
+-
+-/* Forward references */
+-char *skipspace();
+-char *scanstring();
+-int writeblanks();
+-int test1();
+-int convert1();
+-
+-/* The main program */
+-int
+-main(argc, argv)
+- int argc;
+- char *argv[];
+-{ FILE *in = stdin;
+- FILE *out = stdout;
+- char *filename = 0;
+- char *program_name = argv[0];
+- char *output_name = 0;
+-#define bufsize 5000 /* arbitrary size */
+- char *buf;
+- char *line;
+- char *more;
+- char *usage =
+- "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
+- /*
+- * In previous versions, ansi2knr recognized a --varargs switch.
+- * If this switch was supplied, ansi2knr would attempt to convert
+- * a ... argument to va_alist and va_dcl; if this switch was not
+- * supplied, ansi2knr would simply drop any such arguments.
+- * Now, ansi2knr always does this conversion, and we only
+- * check for this switch for backward compatibility.
+- */
+- int convert_varargs = 1;
+- int output_error;
+-
+- while ( argc > 1 && argv[1][0] == '-' ) {
+- if ( !strcmp(argv[1], "--varargs") ) {
+- convert_varargs = 1;
+- argc--;
+- argv++;
+- continue;
+- }
+- if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
+- filename = argv[2];
+- argc -= 2;
+- argv += 2;
+- continue;
+- }
+- fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
+- argv[1]);
+- fprintf(stderr, usage);
+- exit(1);
+- }
+- switch ( argc )
+- {
+- default:
+- fprintf(stderr, usage);
+- exit(0);
+- case 3:
+- output_name = argv[2];
+- out = fopen(output_name, "w");
+- if ( out == NULL ) {
+- fprintf(stderr, "%s: Cannot open output file %s\n",
+- program_name, output_name);
+- exit(1);
+- }
+- /* falls through */
+- case 2:
+- in = fopen(argv[1], "r");
+- if ( in == NULL ) {
+- fprintf(stderr, "%s: Cannot open input file %s\n",
+- program_name, argv[1]);
+- exit(1);
+- }
+- if ( filename == 0 )
+- filename = argv[1];
+- /* falls through */
+- case 1:
+- break;
+- }
+- if ( filename )
+- fprintf(out, "#line 1 \"%s\"\n", filename);
+- buf = malloc(bufsize);
+- if ( buf == NULL )
+- {
+- fprintf(stderr, "Unable to allocate read buffer!\n");
+- exit(1);
+- }
+- line = buf;
+- while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
+- {
+-test: line += strlen(line);
+- switch ( test1(buf) )
+- {
+- case 2: /* a function header */
+- convert1(buf, out, 1, convert_varargs);
+- break;
+- case 1: /* a function */
+- /* Check for a { at the start of the next line. */
+- more = ++line;
+-f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
+- goto wl;
+- if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
+- goto wl;
+- switch ( *skipspace(more, 1) )
+- {
+- case '{':
+- /* Definitely a function header. */
+- convert1(buf, out, 0, convert_varargs);
+- fputs(more, out);
+- break;
+- case 0:
+- /* The next line was blank or a comment: */
+- /* keep scanning for a non-comment. */
+- line += strlen(line);
+- goto f;
+- default:
+- /* buf isn't a function header, but */
+- /* more might be. */
+- fputs(buf, out);
+- strcpy(buf, more);
+- line = buf;
+- goto test;
+- }
+- break;
+- case -1: /* maybe the start of a function */
+- if ( line != buf + (bufsize - 1) ) /* overflow check */
+- continue;
+- /* falls through */
+- default: /* not a function */
+-wl: fputs(buf, out);
+- break;
+- }
+- line = buf;
+- }
+- if ( line != buf )
+- fputs(buf, out);
+- free(buf);
+- if ( output_name ) {
+- output_error = ferror(out);
+- output_error |= fclose(out);
+- } else { /* out == stdout */
+- fflush(out);
+- output_error = ferror(out);
+- }
+- if ( output_error ) {
+- fprintf(stderr, "%s: error writing to %s\n", program_name,
+- (output_name ? output_name : "stdout"));
+- exit(1);
+- }
+- if ( in != stdin )
+- fclose(in);
+- return 0;
+-}
+-
+-/* Skip over whitespace and comments, in either direction. */
+-char *
+-skipspace(p, dir)
+- register char *p;
+- register int dir; /* 1 for forward, -1 for backward */
+-{ for ( ; ; )
+- { while ( is_space(*p) )
+- p += dir;
+- if ( !(*p == '/' && p[dir] == '*') )
+- break;
+- p += dir; p += dir;
+- while ( !(*p == '*' && p[dir] == '/') )
+- { if ( *p == 0 )
+- return p; /* multi-line comment?? */
+- p += dir;
+- }
+- p += dir; p += dir;
+- }
+- return p;
+-}
+-
+-/* Scan over a quoted string, in either direction. */
+-char *
+-scanstring(p, dir)
+- register char *p;
+- register int dir;
+-{
+- for (p += dir; ; p += dir)
+- if (*p == '"' && p[-dir] != '\\')
+- return p + dir;
+-}
+-
+-/*
+- * Write blanks over part of a string.
+- * Don't overwrite end-of-line characters.
+- */
+-int
+-writeblanks(start, end)
+- char *start;
+- char *end;
+-{ char *p;
+- for ( p = start; p < end; p++ )
+- if ( *p != '\r' && *p != '\n' )
+- *p = ' ';
+- return 0;
+-}
+-
+-/*
+- * Test whether the string in buf is a function definition.
+- * The string may contain and/or end with a newline.
+- * Return as follows:
+- * 0 - definitely not a function definition;
+- * 1 - definitely a function definition;
+- * 2 - definitely a function prototype (NOT USED);
+- * -1 - may be the beginning of a function definition,
+- * append another line and look again.
+- * The reason we don't attempt to convert function prototypes is that
+- * Ghostscript's declaration-generating macros look too much like
+- * prototypes, and confuse the algorithms.
+- */
+-int
+-test1(buf)
+- char *buf;
+-{ register char *p = buf;
+- char *bend;
+- char *endfn;
+- int contin;
+-
+- if ( !isidfirstchar(*p) )
+- return 0; /* no name at left margin */
+- bend = skipspace(buf + strlen(buf) - 1, -1);
+- switch ( *bend )
+- {
+- case ';': contin = 0 /*2*/; break;
+- case ')': contin = 1; break;
+- case '{': return 0; /* not a function */
+- case '}': return 0; /* not a function */
+- default: contin = -1;
+- }
+- while ( isidchar(*p) )
+- p++;
+- endfn = p;
+- p = skipspace(p, 1);
+- if ( *p++ != '(' )
+- return 0; /* not a function */
+- p = skipspace(p, 1);
+- if ( *p == ')' )
+- return 0; /* no parameters */
+- /* Check that the apparent function name isn't a keyword. */
+- /* We only need to check for keywords that could be followed */
+- /* by a left parenthesis (which, unfortunately, is most of them). */
+- { static char *words[] =
+- { "asm", "auto", "case", "char", "const", "double",
+- "extern", "float", "for", "if", "int", "long",
+- "register", "return", "short", "signed", "sizeof",
+- "static", "switch", "typedef", "unsigned",
+- "void", "volatile", "while", 0
+- };
+- char **key = words;
+- char *kp;
+- unsigned len = endfn - buf;
+-
+- while ( (kp = *key) != 0 )
+- { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
+- return 0; /* name is a keyword */
+- key++;
+- }
+- }
+- {
+- char *id = p;
+- int len;
+- /*
+- * Check for identifier1(identifier2) and not
+- * identifier1(void), or identifier1(identifier2, xxxx).
+- */
+-
+- while ( isidchar(*p) )
+- p++;
+- len = p - id;
+- p = skipspace(p, 1);
+- if (*p == ',' ||
+- (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
+- )
+- return 0; /* not a function */
+- }
+- /*
+- * If the last significant character was a ), we need to count
+- * parentheses, because it might be part of a formal parameter
+- * that is a procedure.
+- */
+- if (contin > 0) {
+- int level = 0;
+-
+- for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
+- level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
+- if (level > 0)
+- contin = -1;
+- }
+- return contin;
+-}
+-
+-/* Convert a recognized function definition or header to K&R syntax. */
+-int
+-convert1(buf, out, header, convert_varargs)
+- char *buf;
+- FILE *out;
+- int header; /* Boolean */
+- int convert_varargs; /* Boolean */
+-{ char *endfn;
+- register char *p;
+- /*
+- * The breaks table contains pointers to the beginning and end
+- * of each argument.
+- */
+- char **breaks;
+- unsigned num_breaks = 2; /* for testing */
+- char **btop;
+- char **bp;
+- char **ap;
+- char *vararg = 0;
+-
+- /* Pre-ANSI implementations don't agree on whether strchr */
+- /* is called strchr or index, so we open-code it here. */
+- for ( endfn = buf; *(endfn++) != '('; )
+- ;
+-top: p = endfn;
+- breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
+- if ( breaks == NULL )
+- { /* Couldn't allocate break table, give up */
+- fprintf(stderr, "Unable to allocate break table!\n");
+- fputs(buf, out);
+- return -1;
+- }
+- btop = breaks + num_breaks * 2 - 2;
+- bp = breaks;
+- /* Parse the argument list */
+- do
+- { int level = 0;
+- char *lp = NULL;
+- char *rp = NULL;
+- char *end = NULL;
+-
+- if ( bp >= btop )
+- { /* Filled up break table. */
+- /* Allocate a bigger one and start over. */
+- free((char *)breaks);
+- num_breaks <<= 1;
+- goto top;
+- }
+- *bp++ = p;
+- /* Find the end of the argument */
+- for ( ; end == NULL; p++ )
+- { switch(*p)
+- {
+- case ',':
+- if ( !level ) end = p;
+- break;
+- case '(':
+- if ( !level ) lp = p;
+- level++;
+- break;
+- case ')':
+- if ( --level < 0 ) end = p;
+- else rp = p;
+- break;
+- case '/':
+- if (p[1] == '*')
+- p = skipspace(p, 1) - 1;
+- break;
+- case '"':
+- p = scanstring(p, 1) - 1;
+- break;
+- default:
+- ;
+- }
+- }
+- /* Erase any embedded prototype parameters. */
+- if ( lp && rp )
+- writeblanks(lp + 1, rp);
+- p--; /* back up over terminator */
+- /* Find the name being declared. */
+- /* This is complicated because of procedure and */
+- /* array modifiers. */
+- for ( ; ; )
+- { p = skipspace(p - 1, -1);
+- switch ( *p )
+- {
+- case ']': /* skip array dimension(s) */
+- case ')': /* skip procedure args OR name */
+- { int level = 1;
+- while ( level )
+- switch ( *--p )
+- {
+- case ']': case ')':
+- level++;
+- break;
+- case '[': case '(':
+- level--;
+- break;
+- case '/':
+- if (p > buf && p[-1] == '*')
+- p = skipspace(p, -1) + 1;
+- break;
+- case '"':
+- p = scanstring(p, -1) + 1;
+- break;
+- default: ;
+- }
+- }
+- if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
+- { /* We found the name being declared */
+- while ( !isidfirstchar(*p) )
+- p = skipspace(p, 1) + 1;
+- goto found;
+- }
+- break;
+- default:
+- goto found;
+- }
+- }
+-found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
+- { if ( convert_varargs )
+- { *bp++ = "va_alist";
+- vararg = p-2;
+- }
+- else
+- { p++;
+- if ( bp == breaks + 1 ) /* sole argument */
+- writeblanks(breaks[0], p);
+- else
+- writeblanks(bp[-1] - 1, p);
+- bp--;
+- }
+- }
+- else
+- { while ( isidchar(*p) ) p--;
+- *bp++ = p+1;
+- }
+- p = end;
+- }
+- while ( *p++ == ',' );
+- *bp = p;
+- /* Make a special check for 'void' arglist */
+- if ( bp == breaks+2 )
+- { p = skipspace(breaks[0], 1);
+- if ( !strncmp(p, "void", 4) )
+- { p = skipspace(p+4, 1);
+- if ( p == breaks[2] - 1 )
+- { bp = breaks; /* yup, pretend arglist is empty */
+- writeblanks(breaks[0], p + 1);
+- }
+- }
+- }
+- /* Put out the function name and left parenthesis. */
+- p = buf;
+- while ( p != endfn ) putc(*p, out), p++;
+- /* Put out the declaration. */
+- if ( header )
+- { fputs(");", out);
+- for ( p = breaks[0]; *p; p++ )
+- if ( *p == '\r' || *p == '\n' )
+- putc(*p, out);
+- }
+- else
+- { for ( ap = breaks+1; ap < bp; ap += 2 )
+- { p = *ap;
+- while ( isidchar(*p) )
+- putc(*p, out), p++;
+- if ( ap < bp - 1 )
+- fputs(", ", out);
+- }
+- fputs(") ", out);
+- /* Put out the argument declarations */
+- for ( ap = breaks+2; ap <= bp; ap += 2 )
+- (*ap)[-1] = ';';
+- if ( vararg != 0 )
+- { *vararg = 0;
+- fputs(breaks[0], out); /* any prior args */
+- fputs("va_dcl", out); /* the final arg */
+- fputs(bp[0], out);
+- }
+- else
+- fputs(breaks[0], out);
+- }
+- free((char *)breaks);
+- return 0;
+-}
+diff -urNd -urNd patch-2.5.4/argmatch.c patch-2.5.9/argmatch.c
+--- patch-2.5.4/argmatch.c 1999-08-09 19:09:13.000000000 -0400
++++ patch-2.5.9/argmatch.c 2003-03-10 02:31:50.000000000 -0500
+@@ -1,5 +1,7 @@
+ /* argmatch.c -- find a match for a string in an array
+- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
++
++ Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003 Free Software
++ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -18,26 +20,24 @@
+ /* Written by David MacKenzie <djm@ai.mit.edu>
+ Modified by Akim Demaille <demaille@inf.enst.fr> */
+
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++/* Specification. */
+ #include "argmatch.h"
+
+ #include <stdio.h>
+-#ifdef STDC_HEADERS
+-# include <string.h>
+-#endif
+-
+-#if HAVE_LOCALE_H
+-# include <locale.h>
+-#endif
++#include <stdlib.h>
++#include <string.h>
+
+-#if ENABLE_NLS
+-# include <libintl.h>
+-# define _(Text) gettext (Text)
+-#else
+-# define _(Text) Text
+-#endif
++#include "gettext.h"
++#define _(msgid) gettext (msgid)
+
+ #include "error.h"
+ #include "quotearg.h"
++#include "quote.h"
++#include "unlocked-io.h"
+
+ /* When reporting an invalid argument, show nonprinting characters
+ by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
+@@ -46,11 +46,7 @@
+ # define ARGMATCH_QUOTING_STYLE locale_quoting_style
+ #endif
+
+-/* The following test is to work around the gross typo in
+- systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
+- is defined to 0, not 1. */
+-#if !EXIT_FAILURE
+-# undef EXIT_FAILURE
++#ifndef EXIT_FAILURE
+ # define EXIT_FAILURE 1
+ #endif
+
+@@ -78,7 +74,6 @@
+ null-terminated array ARGLIST, return the index in ARGLIST
+ of the matched element, else -1 if it does not match any element
+ or -2 if it is ambiguous (is a prefix of more than one element).
+- If SENSITIVE, comparison is case sensitive.
+
+ If VALLIST is none null, use it to resolve ambiguities limited to
+ synonyms, i.e., for
+@@ -86,10 +81,9 @@
+ "no", "nope" -> 1
+ "y" is a valid argument, for `0', and "n" for `1'. */
+
+-static int
+-__argmatch_internal (const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize,
+- int case_sensitive)
++int
++argmatch (const char *arg, const char *const *arglist,
++ const char *vallist, size_t valsize)
+ {
+ int i; /* Temporary index in ARGLIST. */
+ size_t arglen; /* Length of ARG. */
+@@ -101,9 +95,7 @@
+ /* Test all elements for either exact match or abbreviated matches. */
+ for (i = 0; arglist[i]; i++)
+ {
+- if (case_sensitive
+- ? !strncmp (arglist[i], arg, arglen)
+- : !strncasecmp (arglist[i], arg, arglen))
++ if (!strncmp (arglist[i], arg, arglen))
+ {
+ if (strlen (arglist[i]) == arglen)
+ /* Exact match found. */
+@@ -131,22 +123,6 @@
+ return matchind;
+ }
+
+-/* argmatch - case sensitive version */
+-int
+-argmatch (const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize)
+-{
+- return __argmatch_internal (arg, arglist, vallist, valsize, 1);
+-}
+-
+-/* argcasematch - case insensitive version */
+-int
+-argcasematch (const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize)
+-{
+- return __argmatch_internal (arg, arglist, vallist, valsize, 0);
+-}
+-
+ /* Error reporting for argmatch.
+ CONTEXT is a description of the type of entity that was being matched.
+ VALUE is the invalid value that was given.
+@@ -156,10 +132,11 @@
+ argmatch_invalid (const char *context, const char *value, int problem)
+ {
+ char const *format = (problem == -1
+- ? _("invalid argument %s for `%s'")
+- : _("ambiguous argument %s for `%s'"));
++ ? _("invalid argument %s for %s")
++ : _("ambiguous argument %s for %s"));
+
+- error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
++ error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
++ quote_n (1, context));
+ }
+
+ /* List the valid arguments for argmatch.
+@@ -200,12 +177,9 @@
+ __xargmatch_internal (const char *context,
+ const char *arg, const char *const *arglist,
+ const char *vallist, size_t valsize,
+- int case_sensitive,
+ argmatch_exit_fn exit_fn)
+ {
+- int res = __argmatch_internal (arg, arglist,
+- vallist, valsize,
+- case_sensitive);
++ int res = argmatch (arg, arglist, vallist, valsize);
+ if (res >= 0)
+ /* Success. */
+ return res;
+@@ -291,12 +265,12 @@
+ }
+
+ if ((cp = getenv ("VERSION_CONTROL")))
+- backup_type = XARGCASEMATCH ("$VERSION_CONTROL", cp,
+- backup_args, backup_vals);
++ backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
++ backup_args, backup_vals);
+
+ if (argc == 2)
+- backup_type = XARGCASEMATCH (program_name, argv[1],
+- backup_args, backup_vals);
++ backup_type = XARGMATCH (program_name, argv[1],
++ backup_args, backup_vals);
+
+ printf ("The version control is `%s'\n",
+ ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
+diff -urNd -urNd patch-2.5.4/argmatch.h patch-2.5.9/argmatch.h
+--- patch-2.5.4/argmatch.h 1999-01-25 09:57:22.000000000 -0500
++++ patch-2.5.9/argmatch.h 2002-11-21 15:15:39.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* argmatch.h -- definitions and prototypes for argmatch.c
+- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
++ Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -21,109 +21,89 @@
+ #ifndef ARGMATCH_H_
+ # define ARGMATCH_H_ 1
+
+-# if HAVE_CONFIG_H
+-# include <config.h>
+-# endif
++# include <stddef.h>
+
+-# include <sys/types.h>
++# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+
+-# ifndef PARAMS
+-# if PROTOTYPES || (defined (__STDC__) && __STDC__)
+-# define PARAMS(args) args
+-# else
+-# define PARAMS(args) ()
+-# endif /* GCC. */
+-# endif /* Not PARAMS. */
++# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
++ (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+
+ /* Assert there are as many real arguments as there are values
+- (argument list ends with a NULL guard). There is no execution
+- cost, since it will be statically evalauted to `assert (0)' or
+- `assert (1)'. Unfortunately there is no -Wassert-0. */
++ (argument list ends with a NULL guard). ARGMATCH_VERIFY is
++ preferred, since it is guaranteed to be checked at compile-time.
++ ARGMATCH_ASSERT is for backward compatibility only. */
+
+-# undef ARRAY_CARDINALITY
+-# define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))
++# define ARGMATCH_VERIFY(Arglist, Vallist) \
++ struct argmatch_verify \
++ { \
++ char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
++ }
+
+-# define ARGMATCH_ASSERT(Arglist, Vallist) \
+- assert (ARRAY_CARDINALITY ((Arglist)) == ARRAY_CARDINALITY ((Vallist)) + 1)
++# define ARGMATCH_ASSERT(Arglist, Vallist) \
++ assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
+
+ /* Return the index of the element of ARGLIST (NULL terminated) that
+ matches with ARG. If VALLIST is not NULL, then use it to resolve
+ false ambiguities (i.e., different matches of ARG but corresponding
+ to the same values in VALLIST). */
+
+-int argmatch
+- PARAMS ((const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize));
+-int argcasematch
+- PARAMS ((const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize));
++int argmatch (char const *arg, char const *const *arglist,
++ char const *vallist, size_t valsize);
+
+ # define ARGMATCH(Arg, Arglist, Vallist) \
+- argmatch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
+-
+-# define ARGCASEMATCH(Arg, Arglist, Vallist) \
+- argcasematch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
++ argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
+
+ /* xargmatch calls this function when it fails. This function should not
+ return. By default, this is a function that calls ARGMATCH_DIE which
+ in turn defaults to `exit (EXIT_FAILURE)'. */
+-typedef void (*argmatch_exit_fn) PARAMS ((void));
++typedef void (*argmatch_exit_fn) (void);
+ extern argmatch_exit_fn argmatch_die;
+
+ /* Report on stderr why argmatch failed. Report correct values. */
+
+-void argmatch_invalid
+- PARAMS ((const char *context, const char *value, int problem));
++void argmatch_invalid (char const *context, char const *value, int problem);
+
+ /* Left for compatibility with the old name invalid_arg */
+
+ # define invalid_arg(Context, Value, Problem) \
+- argmatch_invalid ((Context), (Value), (Problem))
++ argmatch_invalid (Context, Value, Problem)
+
+
+
+ /* Report on stderr the list of possible arguments. */
+
+-void argmatch_valid
+- PARAMS ((const char *const *arglist,
+- const char *vallist, size_t valsize));
++void argmatch_valid (char const *const *arglist,
++ char const *vallist, size_t valsize);
+
+ # define ARGMATCH_VALID(Arglist, Vallist) \
+- argmatch_valid (Arglist, (const char *) Vallist, sizeof (*(Vallist)))
++ argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
+
+
+
+ /* Same as argmatch, but upon failure, reports a explanation on the
+ failure, and exits using the function EXIT_FN. */
+
+-int __xargmatch_internal
+- PARAMS ((const char *context,
+- const char *arg, const char *const *arglist,
+- const char *vallist, size_t valsize,
+- int case_sensitive, argmatch_exit_fn exit_fn));
++int __xargmatch_internal (char const *context,
++ char const *arg, char const *const *arglist,
++ char const *vallist, size_t valsize,
++ argmatch_exit_fn exit_fn);
+
+ /* Programmer friendly interface to __xargmatch_internal. */
+
+-# define XARGMATCH(Context, Arg, Arglist, Vallist) \
+- (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
+- (const char *) (Vallist), \
+- sizeof (*(Vallist)), \
+- 1, argmatch_die)])
+-
+-# define XARGCASEMATCH(Context, Arg, Arglist, Vallist) \
+- (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
+- (const char *) (Vallist), \
+- sizeof (*(Vallist)), \
+- 0, argmatch_die)])
++# define XARGMATCH(Context, Arg, Arglist, Vallist) \
++ ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \
++ (char const *) (Vallist), \
++ sizeof *(Vallist), \
++ argmatch_die)])
+
+ /* Convert a value into a corresponding argument. */
+
+-const char *argmatch_to_argument
+- PARAMS ((char const *value, const char *const *arglist,
+- const char *vallist, size_t valsize));
++char const *argmatch_to_argument (char const *value,
++ char const *const *arglist,
++ char const *vallist, size_t valsize);
+
+ # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \
+- argmatch_to_argument ((char const *) &(Value), (Arglist), \
+- (const char *) (Vallist), sizeof (*(Vallist)))
++ argmatch_to_argument (Value, Arglist, \
++ (char const *) (Vallist), sizeof *(Vallist))
+
+ #endif /* ARGMATCH_H_ */
+diff -urNd -urNd patch-2.5.4/backupfile.c patch-2.5.9/backupfile.c
+--- patch-2.5.4/backupfile.c 1999-01-18 12:02:28.000000000 -0500
++++ patch-2.5.9/backupfile.c 2002-01-16 17:44:24.000000000 -0500
+@@ -1,5 +1,6 @@
+ /* backupfile.c -- make Emacs style backup file names
+- Copyright (C) 1990-1997, 1998, 1999 Free Software Foundation, Inc.
++ Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
++ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -23,9 +24,6 @@
+ # include <config.h>
+ #endif
+
+-#include <argmatch.h>
+-#include <backupfile.h>
+-
+ #include <stdio.h>
+ #include <sys/types.h>
+ #if HAVE_STRING_H
+@@ -58,17 +56,23 @@
+ # define CLOSEDIR(d) closedir (d)
+ #endif
+
+-#if STDC_HEADERS
++#if HAVE_STDLIB_H
+ # include <stdlib.h>
+-#else
+-char *malloc ();
+ #endif
+
+ #ifndef HAVE_DECL_GETENV
++"this configure-time declaration test was not run"
++#endif
++#if !HAVE_DECL_GETENV
+ char *getenv ();
+ #endif
+
+-char *base_name PARAMS ((char const *));
++#ifndef HAVE_DECL_MALLOC
++"this configure-time declaration test was not run"
++#endif
++#if !HAVE_DECL_MALLOC
++char *malloc ();
++#endif
+
+ #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
+ # define HAVE_DIR 1
+@@ -91,10 +95,9 @@
+ - Its arg may be any int or unsigned int; it need not be an unsigned char.
+ - It's guaranteed to evaluate its argument exactly once.
+ - It's typically faster.
+- Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
+- only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
+- it's important to use the locale's definition of `digit' even when the
+- host does not conform to Posix. */
++ POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
++ ISDIGIT_LOCALE unless it's important to use the locale's definition
++ of `digit' even when the host does not conform to POSIX. */
+ #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
+
+ #if D_INO_IN_DIRENT
+@@ -103,6 +106,10 @@
+ # define REAL_DIR_ENTRY(dp) 1
+ #endif
+
++#include "argmatch.h"
++#include "backupfile.h"
++#include "dirname.h"
++
+ /* The extension added to file names to produce a simple (as opposed
+ to numbered) backup file name. */
+ const char *simple_backup_suffix = "~";
+@@ -129,29 +136,31 @@
+ if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
+ backup_suffix_size_max = numbered_suffix_size_max;
+
+- s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
++ s = malloc (file_len + 1
++ + backup_suffix_size_max + numbered_suffix_size_max);
+ if (s)
+ {
+- strcpy (s, file);
+-
+ #if HAVE_DIR
+ if (backup_type != simple)
+ {
+ int highest_backup;
+- size_t dir_len = base_name (s) - s;
++ size_t dirlen = dir_len (file);
+
+- strcpy (s + dir_len, ".");
+- highest_backup = max_backup_version (file + dir_len, s);
++ memcpy (s, file, dirlen);
++ if (dirlen == FILESYSTEM_PREFIX_LEN (file))
++ s[dirlen++] = '.';
++ s[dirlen] = '\0';
++ highest_backup = max_backup_version (base_name (file), s);
+ if (! (backup_type == numbered_existing && highest_backup == 0))
+ {
+ char *numbered_suffix = s + (file_len + backup_suffix_size_max);
+ sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
+ suffix = numbered_suffix;
+ }
+- strcpy (s, file);
+ }
+ #endif /* HAVE_DIR */
+
++ strcpy (s, file);
+ addext (s, suffix, '~');
+ }
+ return s;
+@@ -178,7 +187,7 @@
+ return 0;
+
+ highest_version = 0;
+- file_name_length = strlen (file);
++ file_name_length = base_len (file);
+
+ while ((dp = readdir (dirp)) != 0)
+ {
+diff -urNd -urNd patch-2.5.4/basename.c patch-2.5.9/basename.c
+--- patch-2.5.4/basename.c 1999-03-18 11:56:34.000000000 -0500
++++ patch-2.5.9/basename.c 2001-05-12 11:39:45.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* basename.c -- return the last element in a path
+- Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
++ Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -19,37 +19,61 @@
+ # include <config.h>
+ #endif
+
+-#ifndef FILESYSTEM_PREFIX_LEN
+-# define FILESYSTEM_PREFIX_LEN(Filename) 0
+-#endif
+-
+-#ifndef ISSLASH
+-# define ISSLASH(C) ((C) == '/')
++#if STDC_HEADERS || HAVE_STRING_H
++# include <string.h>
+ #endif
++#include "dirname.h"
+
+ /* In general, we can't use the builtin `basename' function if available,
+ since it has different meanings in different environments.
+ In some environments the builtin `basename' modifies its argument.
+- If NAME is all slashes, be sure to return `/'. */
++
++ Return the address of the last file name component of NAME. If
++ NAME has no file name components because it is all slashes, return
++ NAME if it is empty, the address of its last slash otherwise. */
+
+ char *
+ base_name (char const *name)
+ {
+- char const *base = name += FILESYSTEM_PREFIX_LEN (name);
+- int all_slashes = 1;
++ char const *base = name + FILESYSTEM_PREFIX_LEN (name);
+ char const *p;
+
+- for (p = name; *p; p++)
++ for (p = base; *p; p++)
+ {
+ if (ISSLASH (*p))
+- base = p + 1;
+- else
+- all_slashes = 0;
+- }
++ {
++ /* Treat multiple adjacent slashes like a single slash. */
++ do p++;
++ while (ISSLASH (*p));
+
+- /* If NAME is all slashes, arrange to return `/'. */
+- if (*base == '\0' && ISSLASH (*name) && all_slashes)
+- --base;
++ /* If the file name ends in slash, use the trailing slash as
++ the basename if no non-slashes have been found. */
++ if (! *p)
++ {
++ if (ISSLASH (*base))
++ base = p - 1;
++ break;
++ }
++
++ /* *P is a non-slash preceded by a slash. */
++ base = p;
++ }
++ }
+
+ return (char *) base;
+ }
++
++/* Return the length of of the basename NAME. Typically NAME is the
++ value returned by base_name. Act like strlen (NAME), except omit
++ redundant trailing slashes. */
++
++size_t
++base_len (char const *name)
++{
++ size_t len;
++
++ for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
++ continue;
++
++ return len;
++}
+diff -urNd -urNd patch-2.5.4/basename.h patch-2.5.9/basename.h
+--- patch-2.5.4/basename.h 1999-07-07 14:06:40.000000000 -0400
++++ patch-2.5.9/basename.h 1969-12-31 19:00:00.000000000 -0500
+@@ -1,9 +0,0 @@
+-#ifndef PARAMS
+-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+-# define PARAMS(Args) Args
+-# else
+-# define PARAMS(Args) ()
+-# endif
+-#endif
+-
+-char *base_name PARAMS ((char const *name));
+diff -urNd -urNd patch-2.5.4/ChangeLog patch-2.5.9/ChangeLog
+--- patch-2.5.4/ChangeLog 1999-08-30 02:38:49.000000000 -0400
++++ patch-2.5.9/ChangeLog 2003-05-20 12:16:31.000000000 -0400
+@@ -1,3 +1,359 @@
++2003-05-20 Paul Eggert <eggert@twinsun.com>
++
++ * NEWS, configure.ac (AC_INIT): Version 2.5.9 released.
++
++ * Makefile.in (HDRS): Add gettext.h.
++
++ Use bool, not int, for booleans.
++
++ * pch.c (pch_says_nonexistent): Returns int, not bool.
++
++ * configure.ac: Add AM_STDBOOL_H.
++
++ * Makefile.in (MISC): Add stdbool.h.in.
++ (stdbool.h): New rule.
++ (ACINCLUDE_INPUTS): Add stdbool.m4.
++ (mostlyclean): Remove stdbool.h.
++ (COMMON): New macro; use it instead of common.h for dependencies.
++
++ * common.h: Include <stdbool.h>.
++ Remove TRUE, FALSE, bool. All uses changed to standard names.
++
++ * common.h (reverse, set_time, set_utc):
++ Use bool, not int, for booleans.
++ * pch.c (p_strip_trailing_cr, p_pass_comments_through,
++ prefix_components, pget_line, re_patch,
++ there_is_another_patch, intuit_diff_type, scan_linenum,
++ another_hunk, pget_line, pch_timestamp): Likewise.
++ * inp.h (ifetch): Likewise.
++ * util.c (move_file, version_controller, version_get, ok_to_reverse,
++ set_signals): Likewise.
++ * inp.c (report_revision, get_input_file, plan_a, plan_b, ifetch):
++ Likewise.
++ * util.h (ok_to_reverse, version_controller, version_get,
++ move_file, set_signals): Likewise.
++ * pch.h (another_hunk, pch_says_nonexistent, pch_timestamp):
++ Likewise.
++ * patch.c (struct outstate, numeric_string, make_backups,
++ backup_if_mismatch, remove_empty_files,
++ reverse_flag_specified, main, reinitialize_almost_everything,
++ get_some_switches, apply_hunk, init_output, copy_till):
++ Likewise.
++
++2003-05-18 Paul Eggert <eggert@twinsun.com>
++
++ * pch.c (p_pass_comments_through): New var.
++ (pget_line): Accept new arg for pass_comments_through.
++ All callers changed.
++ (there_is_another_patch): Do not suggest -p for ed diffs.
++ (intuit_diff_type): Check ed command for correct syntax.
++ Do not set p_strip_trailing_cr merely because a -p line contains a CR.
++ (get_ed_command_letter): New function.
++ (do_ed_script): Use it. Do not treat '#' data lines as comments in ed
++ scripts.
++
++ * util.c (move_file):
++ Don't assume that when 'rename(A,B)' succeeds then A no
++ longer exists. This is not true of POSIX 1003.1-2001 rename when A
++ and B are links to the same file.
++ (fetchname): Fix test for file names with internal spaces.
++
++ * version.c: Don't include patchlevel.h.
++ (version): Use PACKAGE_NAME and PACKAGE_VERSION instead of obsolete
++ PROGRAM_NAME and PATCH_VERSION.
++ (copyright_string): Bump to 2003.
++
++ * common.h (FILESYSTEM_PREFIX_LEN, ISSLASH):
++ Remove; now done by 'configure'.
++ (PROGRAM_NAME): Remove; now done by 'configure' as PACKAGE_NAME.
++
++ * patch.c: Do not include <exitfail.h>.
++ (main): Set xalloc_exit_failure, not exit_failure.
++ Add "&& !skip_rest_of_patch" when deciding to continue ed scripts.
++ (option_help): Use PACKAGE_BUGREPORT rather than hardcoding.
++
++ * configure.ac (AC_PREREQ): Bump to 2.57.
++ (AC_GNU_SOURCE): Add, early on.
++ (gl_BACKUPFILE, gl_DIRNAME, gl_ERROR, gl_FUNC_MEMCHR, gl_FUNC_RMDIR,
++ gl_GETOPT, gl_PREREQ_XMALLOC, gl_QUOTE, gl_QUOTEARG): Add.
++ (jm_PREREQ_ADDEXT): Add, with definition.
++ (jm_PREREQ_DIRNAME, jm_PREREQ_ERROR, jm_PREREQ_MEMCHR,
++ jm_PREREQ_QUOTEARG): Remove.
++ (AC_REPLACE_FUNCS): Remove memchr, rename, rmdir).
++ (jm_FUNC_GLIBC_UNLOCKED_IO, jm_AC_DOS): Add.
++ (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Do not call directly.
++ (AC_OUTPUT): Use new style, with AC_CONFIG_FILES.
++
++ Update to current CVS gnulib.
++
++ * exitfail.c, exitfail.h, patchlevel.h, rename.c, m4/c-bs-a.m4,
++ m4/jm-glibc-io.m4, m4/prereq.m4: Remove.
++ * m4/backupfile.m4, m4/dirname.m4, m4/dos.m4, m4/getopt.m4,
++ m4/memchr.m4, m4/onceonly.m4, m4/quote.m4, m4/quotearg.m4,
++ m4/rmdir.m4, m4/unlocked-io.m4, m4/xalloc.m4: New files.
++ * Makefile.in (LIBSRCS): Move error.c here from SRCS.
++ Remove rename.c.
++ (OBJS): Remove error.$(OBJEXT).
++ (HDRS): Remove exitfail.h, patchlevel.h.
++ (ACINCLUDE_INPUTS): Remove c-bs-a.m4, jm-glibc-io.m4, prereq.m4.
++ Add backupfile.m4, dirname.m4, dos.m4, getopt.m4, memchr.m4,
++ onceonly.m4, quote.m4, quotearg.m4, rmdir.m4, unlocked-io.m4,
++ xalloc.m4.
++ (patchlevel.h): Remove. All uses removed.
++ (argmatch.$(OBJEXT), error.$(OBJEXT), quotesys.$(OBJEXT)),
++ xmalloc.$(OBJEXT)): Depend on gettext.h.
++ (dirname.$(OBJEXT), quote.$(OBJEXT), strncasecmp.$(OBJEXT)): New rules.
++ (patch.$(OBJEXT), xmalloc.$(OBJEXT)): Remove exitfail.h.
++ (rename.$(OBJEXT)): Remove.
++ (version.$(OBJEXT)): Remove util.h.
++ (xmalloc.$(OBJEXT)): Add error.h.
++
++2002-11-23 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (main): Don't check for zero-sized file after 'ed'
++ when skipping patch. From Michael Fedrowitz.
++
++2002-06-03 Paul Eggert <eggert@twinsun.com>
++
++ * configure.ac (AC_OUTPUT): Use new form, with AC_CONFIG_FILES,
++ instead of obsolescent form. Patch from Art Haas.
++
++ * pch.c (intuit_diff_type): Do not warn about trailing white space
++ after Prereq: word. Bug reported by Mike Castle.
++
++2002-06-02 Paul Eggert <eggert@twinsun.com>
++
++ * NEWS, configure.ac (AC_INIT): Version 2.5.8 released.
++
++ * README: POSIX.2 -> POSIX.
++ * inp.c (report_revision): Don't modify 'revision', since
++ it gets freed later. Bug reported by Mike Castle.
++
++2002-05-30 Paul Eggert <eggert@twinsun.com>
++
++ * NEWS, configure.ac (AC_INIT): Version 2.5.7 released.
++
++ * Makefile.in (MISC): Remove README-alpha.
++ (patchlevel.h): Depend on configure, not configure.ac.
++
++ * INSTALL: Upgrade to Autoconf 2.53 version.
++
++2002-05-28 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (end_defined, apply_hunk): Output #endif without
++ the comment, as POSIX 1003.1-2001 requires.
++
++ * pch.c (there_is_another_patch): Flush stderr after perror.
++
++ * NEWS, configure.ac (AC_INIT): Version 2.5.6 released.
++
++ * strcasecmp.c, strncasecmp.c: New files, taken from fileutils.
++ * config.guess, config.sub: Remove.
++ * Makefile.in (LIBSRCS): Add strcasecmp.c, strncasecmp.c.
++ (MISC): Remove config.guess, config.sub.
++
++ The code already assumes C89 or better, so remove K&R stuff.
++ * common.h (volatile): Remove.
++ (GENERIC_OBJECT): Remove; all uses changed to 'void'.
++ (PARAMS): Remove; all uses changed to prototypes.
++ * configure.ac (AC_PROG_CC_STDC): Add.
++ * util.c (vararg_start): Remove. All uses changed to va_start.
++ Always include <stdarg.h>.
++
++ * configure.ac (AC_CANONICAL_HOST): Remove.
++ (AC_REPLACE_FUNCS): Add strncasecmp.
++ (AC_CHECK_DECLS): Add mktemp.
++
++ * patch.c (main): Remove useless prototype decl.
++ (mktemp): Don't declare if HAVE_DECL_MKTEMP || defined mktemp.
++ (make_temp): Now accepts char, not int.
++
++2002-05-26 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (not_defined): Prepend newline. All uses changed.
++ (apply_hunk): Fix bug: -D was outputting #ifdef when it should
++ have been outputting #ifndef. Bug report and partial fix by
++ Jason Short.
++
++ * pch.c (intuit_diff_type): When reading an ed diff, don't use
++ indent and trailing-CR-ness of "." line; instead, use that of the
++ command. Bug reported by Anthony Towns; partial fix by Michael
++ Fedrowitz.
++ (intuit_diff_type): If the index line exists, don't report a
++ missing header. Fix by Chip Salzenberg.
++
++2002-05-26 Alessandro Rubini <rubini@gnu.org>
++
++ * patch.c (locate_hunk): Fixed updating of last_offset.
++
++2002-05-25 Paul Eggert <eggert@twinsun.com>
++
++ * NEWS, README: Diffutils doc is up to date now.
++ Bug reporting address is now <bug-patch@gnu.org>.
++ * README: Describe '--disable-largefile'.
++
++ * NEWS-alpha, dirname.c, dirname.h, exitfail.c, exitfail.h,
++ quote.c, quote.h, unlocked-io.h: New files, taken from diffutils
++ and fileutils.
++
++ * argmatch.c: [STDC_HEADERS]: Include stdlib.h, for 'exit'.
++
++ * addext.c, argmatch.c, argmatch.h, backupfile.c, basename.c:
++ Update from diffutils and fileutils.
++
++ * ansi2knr.1, ansi2knr.c: Remove.
++
++ * common.h: HAVE_SETMODE && O_BINARY -> HAVE_SETMODE_DOS.
++ * patch.c (usage): Likewise.
++ * pch.c (open_patch_file): Likewise.
++
++ * configure.ac: Renamed from configure.in. Add copyright notice.
++ (AC_PREREQ): Bump to 2.53.
++ (AC_INIT): Use 2.5x style.
++ (AC_CONFIG_SRCDIR): Add.
++ (PACKAGE, VERSION): Remove.
++ (AC_C_PROTOTYPES): Use this instead of AM_C_PROTOTYPES.
++ (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use this instead of jm_STRUCT_UTIMBUF.
++ (jm_PREREQ_ADDEXT, jm_PREREQ_DIRNAME, jm_PREREQ_ERROR,
++ jm_PREREQ_MEMCHR, jm_PREREQ_QUOTEARG): Add.
++ (AC_CHECK_DECLS): Add free, getenv, malloc.
++ (AC_CHECK_FUNCS): Remove setmode.
++ (AC_FUNC_SETMODE_DOS): Add.
++ (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use this instead of
++ jm_STRUCT_DIRENT_D_INO.
++
++ * Makefile.in (OBJEXT): New var.
++ (PACKAGE_NAME): Renamed from PACKAGE. All uses changed.
++ (PACKAGE_VERSION): Renamed from VERSION. All uses changed.
++ (U): Remove. All uses of "$U.o" changed to ".$(OBJEXT)".
++ (LIBSRCS): REmove getopt.c getopt1.c. Add mkdir.c, rmdir.c.
++ (SRCS): Add dirname.c, exitfail.c, getopt.c, getopt1.c, quote.c.
++ Remove mkdir.c.
++ (OBJS): Keep in sync with SRCS.
++ (HDRS): Remove basename.h.
++ Add dirname.h, exitfail.h, quote.h, unlocked-io.h.
++ (MISC, configure, config.hin, patchlevel.h):
++ configure.ac renamed from configure.in.
++ (MISC): Add README-alpha. Remove ansi2knr.1, ansi2knr.c.
++ (.c.$(OBJEXT)): Renamed from .c.o.
++ (ACINCLUDE_INPUTS): Add c-bs-a.m4, error.m4, jm-glibc-io.m4,
++ mbstate_t.m4, mkdir.m4, mbrtowc.m4, prereq.m4, setmode.m4.
++ Remove ccstdc.m4, inttypes_h.m4, largefile.m4, protos.m4.
++ (mostlyclean): Don't clean ansi2knr.
++ (ansi2knr.o, ansi2knr): Remove.
++ Redo dependencies.
++
++ * patch.c: Include <exitfail.h>.
++ (main): Initialize exit_failure.
++
++ * patch.man: Update copyright notice.
++
++ * pch.c, util.c: Include <dirname.h>, not <basename.h>.
++
++ * version.c (copyright_string): Update copyright notice.
++
++2002-02-17 Paul Eggert <eggert@twinsun.com>
++
++ * partime.c (parse_pattern_letter): Don't overrun buffer if it
++ contains only alphanumerics. Bug reported by Winni
++ <Winni470@gmx.net>.
++
++2001-07-28 Paul Eggert <eggert@sic.twinsun.com>
++
++ * util.c (fetchname), NEWS:
++ Allow file names with internal spaces, so long as they
++ don't contain tabs.
++
++ * pch.c (intuit_diff_type): Do not allow Prereq with multiple words.
++
++ * configure.in (AC_PREREQ): Bump to 2.50.
++ (AC_CHECK_FUNCS): Remove fseeko.
++ (AC_FUNC_FSEEKO): Add.
++ * Makefile.in (ACINCLUDE_INPUTS):
++ Remove largefile.m4; no longer needed with Autoconf 2.50.
++
++2001-02-07 "Tony E. Bennett" <tbennett@nvidia.com>
++
++ * util.c (PERFORCE_CO): New var.
++ (version_controller): Support Perforce.
++ * patch.man: Document this.
++
++2000-06-30 Paul Eggert <eggert@sic.twinsun.com>
++
++ * patch.man: Ignore comment lines.
++
++ * NEWS, pch.c: Ignore lines beginning with "#".
++
++1999-10-24 Paul Eggert <eggert@twinsun.com>
++
++ * pch.c (another_hunk): Report a fatal error if a regular
++ context hunk's pattern has a different number of unchanged
++ lines than the replacement.
++
++1999-10-18 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (main): If we skipped an ed patch, exit with nonzero status.
++
++1999-10-17 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (main): Apply do_ed_script even if dry_run, because
++ we need to make progress on the patch file.
++ * pch.c (do_ed_script): If skip_rest_of_patch is nonzero,
++ gobble up the patch without any other side effect.
++
++1999-10-12 Paul Eggert <eggert@twinsun.com>
++
++ * NEWS, README: New bug reporting address.
++ * NEWS: Report change in 2.5.4 that we forgot to document.
++ * README: Document `configure --disable-largefile'.
++
++ * basename.c, COPYING, getopt.c, getopt.h, getopt1.c, m4/largefile.m4:
++ Update to latest version.
++ * Makefile.in (basename$U.o): Depend on basename.h.
++ (config.hin): Depend on $(srcdir)/aclocal.m4.
++
++ * ansi2knr.c, maketime.c, mkinstalldirs, partime.c: Fix $Id.
++
++ FreeBSD has an unrelated setmode function; work around this.
++ * common.h (binary_transput): Don't declare unless O_BINARY.
++ * patch.c (option_help, get_some_switches):
++ Don't use setmode unless O_BINARY.
++ * pch.c (open_patch_file): Don't invoke setmode unless O_BINARY.
++
++ Fix incompatiblities with error.c.
++ * common.h (program_name): Now XTERN char *, for compatibility
++ with error.c. All uses changed.
++ (PROGRAM_NAME): New macro.
++ (PARAMS): Use ANSI C version only if defined PROTOTYPES
++ || (defined __STDC__ && __STDC__), for compatibilty with error.c.
++ * util.c (vararg_start): Likewise.
++ * patch.c (program_name): Remove.
++ (main): Initialize program_name.
++ * version.c (version): Print PROGRAM_NAME, not program_name.
++
++ Accommodate mingw32 port, which has one-argument mkdir (yuck!)
++ and no geteuid.
++ * m4/mkdir.m4: New file.
++ * Makefile.in (ACINCLUDE_INPUTS): Add $(M4DIR)/mkdir.m4.
++ * configure.in (AC_CHECK_FUNCS): Add geteuid, getuid.
++ (PATCH_FUNC_MKDIR_TAKES_ONE_ARG): Add.
++ * common.h (mkdir): Define if mkdir takes one arg.
++ (geteuid): New macro, if not already defined.
++
++1999-10-11 Christopher R. Gabriel <cgabriel@tin.it>
++
++ * patch.c (option_help): Updated bug report address
++ * configure.in (VERSION): Version 2.5.5 released.
++
++1999-09-01 Paul Eggert <eggert@twinsun.com>
++
++ * patch.c (main): Default simple_backup_suffix to ".orig".
++
++1999-10-08 Paul Eggert <eggert@twinsun.com>
++
++ * patch.man: Make it clear that `patch -o F' should not be
++ used if F is one of the files to be patched.
++
+ 1999-08-30 Paul Eggert <eggert@twinsun.com>
+
+ Version 2.5.4 fixes a few minor bugs, converts C sources to
+@@ -1910,9 +2266,26 @@
+
+ 1984-11-09 Larry Wall <sdcrdcf!lwall>
+ * patch.c: Initial revision
+-
+-Local Variables:
+-mode: indented-text
+-left-margin: 8
+-version-control: never
+-end:
++
++
++Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall.
++
++Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
++2002 Free Software Foundation, Inc.
++
++This file is part of GNU Patch.
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2, or (at your option)
++any later version.
++
++This program is distributed in the hope that they will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING. If not, write to
++the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
+diff -urNd -urNd patch-2.5.4/common.h patch-2.5.9/common.h
+--- patch-2.5.4/common.h 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/common.h 2003-05-19 02:57:36.000000000 -0400
+@@ -1,9 +1,11 @@
+ /* common definitions for `patch' */
+
+-/* $Id: common.h,v 1.20 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: common.h,v 1.34 2003/05/19 06:57:36 eggert Exp $ */
+
+-/* Copyright 1986, 1988 Larry Wall
+- Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1986, 1988 Larry Wall
++
++ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
++ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -24,17 +26,10 @@
+ #define DEBUGGING 1
+ #endif
+
+-/* We must define `volatile' and `const' first (the latter inside config.h),
+- so that they're used consistently in all system includes. */
+-#ifndef __STDC__
+-# ifndef volatile
+-# define volatile
+-# endif
+-#endif
+-
+ #include <config.h>
+
+ #include <assert.h>
++#include <stdbool.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <time.h>
+@@ -73,6 +68,9 @@
+ #ifndef S_IRUSR
+ #define S_IRUSR (S_IROTH << 6)
+ #endif
++#ifdef MKDIR_TAKES_ONE_ARG
++# define mkdir(name, mode) ((mkdir) (name))
++#endif
+
+ #if HAVE_LIMITS_H
+ # include <limits.h>
+@@ -123,27 +121,6 @@
+ #endif
+
+
+-#ifndef FILESYSTEM_PREFIX_LEN
+-#define FILESYSTEM_PREFIX_LEN(f) 0
+-#endif
+-
+-#ifndef ISSLASH
+-#define ISSLASH(c) ((c) == '/')
+-#endif
+-
+-
+-/* constants */
+-
+-/* AIX predefines these. */
+-#ifdef TRUE
+-#undef TRUE
+-#endif
+-#ifdef FALSE
+-#undef FALSE
+-#endif
+-#define TRUE 1
+-#define FALSE 0
+-
+ /* handy definitions */
+
+ #define strEQ(s1,s2) (!strcmp(s1, s2))
+@@ -151,12 +128,11 @@
+
+ /* typedefs */
+
+-typedef int bool; /* must promote to itself */
+ typedef off_t LINENUM; /* must be signed */
+
+ /* globals */
+
+-extern char const program_name[];
++XTERN char *program_name; /* The name this program was run with. */
+
+ XTERN char *buf; /* general purpose buffer */
+ XTERN size_t bufsize; /* allocated size of buf */
+@@ -190,14 +166,14 @@
+ XTERN bool force;
+ XTERN bool batch;
+ XTERN bool noreverse;
+-XTERN int reverse;
++XTERN bool reverse;
+ XTERN enum { DEFAULT_VERBOSITY, SILENT, VERBOSE } verbosity;
+ XTERN bool skip_rest_of_patch;
+ XTERN int strippath;
+ XTERN bool canonicalize;
+ XTERN int patch_get;
+-XTERN int set_time;
+-XTERN int set_utc;
++XTERN bool set_time;
++XTERN bool set_utc;
+
+ enum diff
+ {
+@@ -213,25 +189,11 @@
+
+ XTERN char *revision; /* prerequisite revision, if any */
+
+-#ifdef __STDC__
+-# define GENERIC_OBJECT void
+-#else
+-# define GENERIC_OBJECT char
+-#endif
+-
+ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
+ # define __attribute__(x)
+ #endif
+
+-#ifndef PARAMS
+-# ifdef __STDC__
+-# define PARAMS(args) args
+-# else
+-# define PARAMS(args) ()
+-# endif
+-#endif
+-
+-void fatal_exit PARAMS ((int)) __attribute__ ((noreturn));
++void fatal_exit (int) __attribute__ ((noreturn));
+
+ #include <errno.h>
+ #if !STDC_HEADERS && !defined errno
+@@ -244,7 +206,7 @@
+ # if !HAVE_MEMCHR
+ # define memcmp(s1, s2, n) bcmp (s1, s2, n)
+ # define memcpy(d, s, n) bcopy (s, d, n)
+-GENERIC_OBJECT *memchr ();
++void *memchr ();
+ # endif
+ #endif
+
+@@ -252,8 +214,8 @@
+ # include <stdlib.h>
+ #else
+ char *getenv ();
+-GENERIC_OBJECT *malloc ();
+-GENERIC_OBJECT *realloc ();
++void *malloc ();
++void *realloc ();
+ #endif
+
+ #if HAVE_UNISTD_H
+@@ -284,6 +246,13 @@
+ # define file_seek fseek
+ # define file_tell ftell
+ #endif
++#if ! (HAVE_GETEUID || defined geteuid)
++# if ! (HAVE_GETUID || defined getuid)
++# define geteuid() (-1)
++# else
++# define geteuid() getuid ()
++# endif
++#endif
+
+ #if HAVE_FCNTL_H
+ # include <fcntl.h>
+@@ -313,7 +282,7 @@
+ #define O_TRUNC 0
+ #endif
+
+-#if HAVE_SETMODE
++#if HAVE_SETMODE_DOS
+ XTERN int binary_transput; /* O_BINARY if binary i/o is desired */
+ #else
+ # define binary_transput 0
+diff -urNd -urNd patch-2.5.4/config.guess patch-2.5.9/config.guess
+--- patch-2.5.4/config.guess 1999-08-05 08:55:17.000000000 -0400
++++ patch-2.5.9/config.guess 1969-12-31 19:00:00.000000000 -0500
+@@ -1,1088 +0,0 @@
+-#! /bin/sh
+-# Attempt to guess a canonical system name.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+-# Free Software Foundation, Inc.
+-#
+-# This file is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful, but
+-# WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-# General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-#
+-# As a special exception to the GNU General Public License, if you
+-# distribute this file as part of a program that contains a
+-# configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-# Written by Per Bothner <bothner@cygnus.com>.
+-# The master version of this file is at the FSF in /home/gd/gnu/lib.
+-# Please send patches to <autoconf-patches@gnu.org>.
+-#
+-# This script attempts to guess a canonical system name similar to
+-# config.sub. If it succeeds, it prints the system name on stdout, and
+-# exits with 0. Otherwise, it exits with 1.
+-#
+-# The plan is that this can be called by configure scripts if you
+-# don't specify an explicit system type (host/target name).
+-#
+-# Only a few systems have been added to this list; please add others
+-# (but try to keep the structure clean).
+-#
+-
+-# Use $HOST_CC if defined. $CC may point to a cross-compiler
+-if test x"$CC_FOR_BUILD" = x; then
+- if test x"$HOST_CC" != x; then
+- CC_FOR_BUILD="$HOST_CC"
+- else
+- if test x"$CC" != x; then
+- CC_FOR_BUILD="$CC"
+- else
+- CC_FOR_BUILD=cc
+- fi
+- fi
+-fi
+-
+-
+-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+-# (ghazi@noc.rutgers.edu 8/24/94.)
+-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+- PATH=$PATH:/.attbin ; export PATH
+-fi
+-
+-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+-
+-dummy=dummy-$$
+-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+-
+-# Note: order is significant - the case branches are not exclusive.
+-
+-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+- alpha:OSF1:*:*)
+- if test $UNAME_RELEASE = "V4.0"; then
+- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+- fi
+- # A Vn.n version is a released version.
+- # A Tn.n version is a released field test version.
+- # A Xn.n version is an unreleased experimental baselevel.
+- # 1.2 uses "1.2" for uname -r.
+- cat <<EOF >$dummy.s
+- .globl main
+- .ent main
+-main:
+- .frame \$30,0,\$26,0
+- .prologue 0
+- .long 0x47e03d80 # implver $0
+- lda \$2,259
+- .long 0x47e20c21 # amask $2,$1
+- srl \$1,8,\$2
+- sll \$2,2,\$2
+- sll \$0,3,\$0
+- addl \$1,\$0,\$0
+- addl \$2,\$0,\$0
+- ret \$31,(\$26),1
+- .end main
+-EOF
+- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+- if test "$?" = 0 ; then
+- ./$dummy
+- case "$?" in
+- 7)
+- UNAME_MACHINE="alpha"
+- ;;
+- 15)
+- UNAME_MACHINE="alphaev5"
+- ;;
+- 14)
+- UNAME_MACHINE="alphaev56"
+- ;;
+- 10)
+- UNAME_MACHINE="alphapca56"
+- ;;
+- 16)
+- UNAME_MACHINE="alphaev6"
+- ;;
+- esac
+- fi
+- rm -f $dummy.s $dummy
+- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit 0 ;;
+- Alpha\ *:Windows_NT*:*)
+- # How do we know it's Interix rather than the generic POSIX subsystem?
+- # Should we change UNAME_MACHINE based on the output of uname instead
+- # of the specific Alpha model?
+- echo alpha-pc-interix
+- exit 0 ;;
+- 21064:Windows_NT:50:3)
+- echo alpha-dec-winnt3.5
+- exit 0 ;;
+- Amiga*:UNIX_System_V:4.0:*)
+- echo m68k-cbm-sysv4
+- exit 0;;
+- amiga:NetBSD:*:*)
+- echo m68k-cbm-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- amiga:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- *:[Aa]miga[Oo][Ss]:*:*)
+- echo ${UNAME_MACHINE}-unknown-amigaos
+- exit 0 ;;
+- arc64:OpenBSD:*:*)
+- echo mips64el-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- arc:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- hkmips:OpenBSD:*:*)
+- echo mips-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- pmax:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sgi:OpenBSD:*:*)
+- echo mips-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- wgrisc:OpenBSD:*:*)
+- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+- echo arm-acorn-riscix${UNAME_RELEASE}
+- exit 0;;
+- arm32:NetBSD:*:*)
+- echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+- exit 0 ;;
+- SR2?01:HI-UX/MPP:*:*)
+- echo hppa1.1-hitachi-hiuxmpp
+- exit 0;;
+- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+- if test "`(/bin/universe) 2>/dev/null`" = att ; then
+- echo pyramid-pyramid-sysv3
+- else
+- echo pyramid-pyramid-bsd
+- fi
+- exit 0 ;;
+- NILE*:*:*:dcosx)
+- echo pyramid-pyramid-svr4
+- exit 0 ;;
+- sun4H:SunOS:5.*:*)
+- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- i86pc:SunOS:5.*:*)
+- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- sun4*:SunOS:6*:*)
+- # According to config.sub, this is the proper way to canonicalize
+- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+- # it's likely to be more like Solaris than SunOS4.
+- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- sun4*:SunOS:*:*)
+- case "`/usr/bin/arch -k`" in
+- Series*|S4*)
+- UNAME_RELEASE=`uname -v`
+- ;;
+- esac
+- # Japanese Language versions have a version number like `4.1.3-JL'.
+- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+- exit 0 ;;
+- sun3*:SunOS:*:*)
+- echo m68k-sun-sunos${UNAME_RELEASE}
+- exit 0 ;;
+- sun*:*:4.2BSD:*)
+- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+- case "`/bin/arch`" in
+- sun3)
+- echo m68k-sun-sunos${UNAME_RELEASE}
+- ;;
+- sun4)
+- echo sparc-sun-sunos${UNAME_RELEASE}
+- ;;
+- esac
+- exit 0 ;;
+- aushp:SunOS:*:*)
+- echo sparc-auspex-sunos${UNAME_RELEASE}
+- exit 0 ;;
+- atari*:NetBSD:*:*)
+- echo m68k-atari-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- atari*:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- # The situation for MiNT is a little confusing. The machine name
+- # can be virtually everything (everything which is not
+- # "atarist" or "atariste" at least should have a processor
+- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+- # to the lowercase version "mint" (or "freemint"). Finally
+- # the system name "TOS" denotes a system which is actually not
+- # MiNT. But MiNT is downward compatible to TOS, so this should
+- # be no problem.
+- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
+- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
+- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+- echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
+- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+- echo m68k-milan-mint${UNAME_RELEASE}
+- exit 0 ;;
+- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+- echo m68k-hades-mint${UNAME_RELEASE}
+- exit 0 ;;
+- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+- echo m68k-unknown-mint${UNAME_RELEASE}
+- exit 0 ;;
+- sun3*:NetBSD:*:*)
+- echo m68k-sun-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sun3*:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mac68k:NetBSD:*:*)
+- echo m68k-apple-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mac68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme88k:OpenBSD:*:*)
+- echo m88k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- powerpc:machten:*:*)
+- echo powerpc-apple-machten${UNAME_RELEASE}
+- exit 0 ;;
+- macppc:NetBSD:*:*)
+- echo powerpc-apple-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- RISC*:Mach:*:*)
+- echo mips-dec-mach_bsd4.3
+- exit 0 ;;
+- RISC*:ULTRIX:*:*)
+- echo mips-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
+- VAX*:ULTRIX*:*:*)
+- echo vax-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
+- 2020:CLIX:*:* | 2430:CLIX:*:*)
+- echo clipper-intergraph-clix${UNAME_RELEASE}
+- exit 0 ;;
+- mips:*:*:UMIPS | mips:*:*:RISCos)
+- sed 's/^ //' << EOF >$dummy.c
+-#ifdef __cplusplus
+- int main (int argc, char *argv[]) {
+-#else
+- int main (argc, argv) int argc; char *argv[]; {
+-#endif
+- #if defined (host_mips) && defined (MIPSEB)
+- #if defined (SYSTYPE_SYSV)
+- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+- #endif
+- #if defined (SYSTYPE_SVR4)
+- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+- #endif
+- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+- #endif
+- #endif
+- exit (-1);
+- }
+-EOF
+- $CC_FOR_BUILD $dummy.c -o $dummy \
+- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+- && rm $dummy.c $dummy && exit 0
+- rm -f $dummy.c $dummy
+- echo mips-mips-riscos${UNAME_RELEASE}
+- exit 0 ;;
+- Night_Hawk:Power_UNIX:*:*)
+- echo powerpc-harris-powerunix
+- exit 0 ;;
+- m88k:CX/UX:7*:*)
+- echo m88k-harris-cxux7
+- exit 0 ;;
+- m88k:*:4*:R4*)
+- echo m88k-motorola-sysv4
+- exit 0 ;;
+- m88k:*:3*:R3*)
+- echo m88k-motorola-sysv3
+- exit 0 ;;
+- AViiON:dgux:*:*)
+- # DG/UX returns AViiON for all architectures
+- UNAME_PROCESSOR=`/usr/bin/uname -p`
+- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+- echo m88k-dg-dgux${UNAME_RELEASE}
+- else
+- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+- fi
+- else echo i586-dg-dgux${UNAME_RELEASE}
+- fi
+- exit 0 ;;
+- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+- echo m88k-dolphin-sysv3
+- exit 0 ;;
+- M88*:*:R3*:*)
+- # Delta 88k system running SVR3
+- echo m88k-motorola-sysv3
+- exit 0 ;;
+- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+- echo m88k-tektronix-sysv3
+- exit 0 ;;
+- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+- echo m68k-tektronix-bsd
+- exit 0 ;;
+- *:IRIX*:*:*)
+- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+- exit 0 ;;
+- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+- i?86:AIX:*:*)
+- echo i386-ibm-aix
+- exit 0 ;;
+- *:AIX:2:3)
+- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+- sed 's/^ //' << EOF >$dummy.c
+- #include <sys/systemcfg.h>
+-
+- main()
+- {
+- if (!__power_pc())
+- exit(1);
+- puts("powerpc-ibm-aix3.2.5");
+- exit(0);
+- }
+-EOF
+- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+- rm -f $dummy.c $dummy
+- echo rs6000-ibm-aix3.2.5
+- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+- echo rs6000-ibm-aix3.2.4
+- else
+- echo rs6000-ibm-aix3.2
+- fi
+- exit 0 ;;
+- *:AIX:*:4)
+- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+- IBM_ARCH=rs6000
+- else
+- IBM_ARCH=powerpc
+- fi
+- if [ -x /usr/bin/oslevel ] ; then
+- IBM_REV=`/usr/bin/oslevel`
+- else
+- IBM_REV=4.${UNAME_RELEASE}
+- fi
+- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+- exit 0 ;;
+- *:AIX:*:*)
+- echo rs6000-ibm-aix
+- exit 0 ;;
+- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+- echo romp-ibm-bsd4.4
+- exit 0 ;;
+- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+- exit 0 ;; # report: romp-ibm BSD 4.3
+- *:BOSX:*:*)
+- echo rs6000-bull-bosx
+- exit 0 ;;
+- DPX/2?00:B.O.S.:*:*)
+- echo m68k-bull-sysv3
+- exit 0 ;;
+- 9000/[34]??:4.3bsd:1.*:*)
+- echo m68k-hp-bsd
+- exit 0 ;;
+- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+- echo m68k-hp-bsd4.4
+- exit 0 ;;
+- 9000/[34678]??:HP-UX:*:*)
+- case "${UNAME_MACHINE}" in
+- 9000/31? ) HP_ARCH=m68000 ;;
+- 9000/[34]?? ) HP_ARCH=m68k ;;
+- 9000/[678][0-9][0-9])
+- sed 's/^ //' << EOF >$dummy.c
+- #include <stdlib.h>
+- #include <unistd.h>
+-
+- int main ()
+- {
+- #if defined(_SC_KERNEL_BITS)
+- long bits = sysconf(_SC_KERNEL_BITS);
+- #endif
+- long cpu = sysconf (_SC_CPU_VERSION);
+-
+- switch (cpu)
+- {
+- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+- case CPU_PA_RISC2_0:
+- #if defined(_SC_KERNEL_BITS)
+- switch (bits)
+- {
+- case 64: puts ("hppa2.0w"); break;
+- case 32: puts ("hppa2.0n"); break;
+- default: puts ("hppa2.0"); break;
+- } break;
+- #else /* !defined(_SC_KERNEL_BITS) */
+- puts ("hppa2.0"); break;
+- #endif
+- default: puts ("hppa1.0"); break;
+- }
+- exit (0);
+- }
+-EOF
+- ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+- rm -f $dummy.c $dummy
+- esac
+- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+- exit 0 ;;
+- 3050*:HI-UX:*:*)
+- sed 's/^ //' << EOF >$dummy.c
+- #include <unistd.h>
+- int
+- main ()
+- {
+- long cpu = sysconf (_SC_CPU_VERSION);
+- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+- results, however. */
+- if (CPU_IS_PA_RISC (cpu))
+- {
+- switch (cpu)
+- {
+- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+- default: puts ("hppa-hitachi-hiuxwe2"); break;
+- }
+- }
+- else if (CPU_IS_HP_MC68K (cpu))
+- puts ("m68k-hitachi-hiuxwe2");
+- else puts ("unknown-hitachi-hiuxwe2");
+- exit (0);
+- }
+-EOF
+- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+- rm -f $dummy.c $dummy
+- echo unknown-hitachi-hiuxwe2
+- exit 0 ;;
+- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+- echo hppa1.1-hp-bsd
+- exit 0 ;;
+- 9000/8??:4.3bsd:*:*)
+- echo hppa1.0-hp-bsd
+- exit 0 ;;
+- *9??*:MPE/iX:*:*)
+- echo hppa1.0-hp-mpeix
+- exit 0 ;;
+- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+- echo hppa1.1-hp-osf
+- exit 0 ;;
+- hp8??:OSF1:*:*)
+- echo hppa1.0-hp-osf
+- exit 0 ;;
+- i?86:OSF1:*:*)
+- if [ -x /usr/sbin/sysversion ] ; then
+- echo ${UNAME_MACHINE}-unknown-osf1mk
+- else
+- echo ${UNAME_MACHINE}-unknown-osf1
+- fi
+- exit 0 ;;
+- parisc*:Lites*:*:*)
+- echo hppa1.1-hp-lites
+- exit 0 ;;
+- hppa*:OpenBSD:*:*)
+- echo hppa-unknown-openbsd
+- exit 0 ;;
+- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+- echo c1-convex-bsd
+- exit 0 ;;
+- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+- if getsysinfo -f scalar_acc
+- then echo c32-convex-bsd
+- else echo c2-convex-bsd
+- fi
+- exit 0 ;;
+- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+- echo c34-convex-bsd
+- exit 0 ;;
+- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+- echo c38-convex-bsd
+- exit 0 ;;
+- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+- echo c4-convex-bsd
+- exit 0 ;;
+- CRAY*X-MP:*:*:*)
+- echo xmp-cray-unicos
+- exit 0 ;;
+- CRAY*Y-MP:*:*:*)
+- echo ymp-cray-unicos${UNAME_RELEASE}
+- exit 0 ;;
+- CRAY*[A-Z]90:*:*:*)
+- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+- exit 0 ;;
+- CRAY*TS:*:*:*)
+- echo t90-cray-unicos${UNAME_RELEASE}
+- exit 0 ;;
+- CRAY*T3E:*:*:*)
+- echo alpha-cray-unicosmk${UNAME_RELEASE}
+- exit 0 ;;
+- CRAY-2:*:*:*)
+- echo cray2-cray-unicos
+- exit 0 ;;
+- F300:UNIX_System_V:*:*)
+- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit 0 ;;
+- F301:UNIX_System_V:*:*)
+- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+- exit 0 ;;
+- hp3[0-9][05]:NetBSD:*:*)
+- echo m68k-hp-netbsd${UNAME_RELEASE}
+- exit 0 ;;
+- hp300:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+- exit 0 ;;
+- sparc*:BSD/OS:*:*)
+- echo sparc-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
+- *:BSD/OS:*:*)
+- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
+- *:FreeBSD:*:*)
+- if test -x /usr/bin/objformat; then
+- if test "elf" = "`/usr/bin/objformat`"; then
+- echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+- exit 0
+- fi
+- fi
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+- exit 0 ;;
+- *:NetBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+- exit 0 ;;
+- *:OpenBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+- exit 0 ;;
+- i*:CYGWIN*:*)
+- echo ${UNAME_MACHINE}-pc-cygwin
+- exit 0 ;;
+- i*:MINGW*:*)
+- echo ${UNAME_MACHINE}-pc-mingw32
+- exit 0 ;;
+- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+- # How do we know it's Interix rather than the generic POSIX subsystem?
+- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+- # UNAME_MACHINE based on the output of uname instead of i386?
+- echo i386-pc-interix
+- exit 0 ;;
+- i*:UWIN*:*)
+- echo ${UNAME_MACHINE}-pc-uwin
+- exit 0 ;;
+- p*:CYGWIN*:*)
+- echo powerpcle-unknown-cygwin
+- exit 0 ;;
+- prep*:SunOS:5.*:*)
+- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- *:GNU:*:*)
+- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+- exit 0 ;;
+- *:Linux:*:*)
+- # uname on the ARM produces all sorts of strangeness, and we need to
+- # filter it out.
+- case "$UNAME_MACHINE" in
+- armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
+- arm* | sa110*) UNAME_MACHINE="arm" ;;
+- esac
+-
+- # The BFD linker knows what the default object file format is, so
+- # first see if it will tell us. cd to the root directory to prevent
+- # problems with other programs or directories called `ld' in the path.
+- ld_help_string=`cd /; ld --help 2>&1`
+- ld_supported_emulations=`echo $ld_help_string \
+- | sed -ne '/supported emulations:/!d
+- s/[ ][ ]*/ /g
+- s/.*supported emulations: *//
+- s/ .*//
+- p'`
+- case "$ld_supported_emulations" in
+- *ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;;
+- i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
+- i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
+- sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+- armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+- m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+- elf32ppc | elf32ppclinux)
+- # Determine Lib Version
+- cat >$dummy.c <<EOF
+-#include <features.h>
+-#if defined(__GLIBC__)
+-extern char __libc_version[];
+-extern char __libc_release[];
+-#endif
+-main(argc, argv)
+- int argc;
+- char *argv[];
+-{
+-#if defined(__GLIBC__)
+- printf("%s %s\n", __libc_version, __libc_release);
+-#else
+- printf("unkown\n");
+-#endif
+- return 0;
+-}
+-EOF
+- LIBC=""
+- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+- if test "$?" = 0 ; then
+- ./$dummy | grep 1\.99 > /dev/null
+- if test "$?" = 0 ; then
+- LIBC="libc1"
+- fi
+- fi
+- rm -f $dummy.c $dummy
+- echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
+- esac
+-
+- if test "${UNAME_MACHINE}" = "alpha" ; then
+- sed 's/^ //' <<EOF >$dummy.s
+- .globl main
+- .ent main
+- main:
+- .frame \$30,0,\$26,0
+- .prologue 0
+- .long 0x47e03d80 # implver $0
+- lda \$2,259
+- .long 0x47e20c21 # amask $2,$1
+- srl \$1,8,\$2
+- sll \$2,2,\$2
+- sll \$0,3,\$0
+- addl \$1,\$0,\$0
+- addl \$2,\$0,\$0
+- ret \$31,(\$26),1
+- .end main
+-EOF
+- LIBC=""
+- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+- if test "$?" = 0 ; then
+- ./$dummy
+- case "$?" in
+- 7)
+- UNAME_MACHINE="alpha"
+- ;;
+- 15)
+- UNAME_MACHINE="alphaev5"
+- ;;
+- 14)
+- UNAME_MACHINE="alphaev56"
+- ;;
+- 10)
+- UNAME_MACHINE="alphapca56"
+- ;;
+- 16)
+- UNAME_MACHINE="alphaev6"
+- ;;
+- esac
+-
+- objdump --private-headers $dummy | \
+- grep ld.so.1 > /dev/null
+- if test "$?" = 0 ; then
+- LIBC="libc1"
+- fi
+- fi
+- rm -f $dummy.s $dummy
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+- elif test "${UNAME_MACHINE}" = "mips" ; then
+- cat >$dummy.c <<EOF
+-#ifdef __cplusplus
+- int main (int argc, char *argv[]) {
+-#else
+- int main (argc, argv) int argc; char *argv[]; {
+-#endif
+-#ifdef __MIPSEB__
+- printf ("%s-unknown-linux-gnu\n", argv[1]);
+-#endif
+-#ifdef __MIPSEL__
+- printf ("%sel-unknown-linux-gnu\n", argv[1]);
+-#endif
+- return 0;
+-}
+-EOF
+- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+- rm -f $dummy.c $dummy
+- else
+- # Either a pre-BFD a.out linker (linux-gnuoldld)
+- # or one that does not give us useful --help.
+- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+- # If ld does not provide *any* "supported emulations:"
+- # that means it is gnuoldld.
+- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+-
+- case "${UNAME_MACHINE}" in
+- i?86)
+- VENDOR=pc;
+- ;;
+- *)
+- VENDOR=unknown;
+- ;;
+- esac
+- # Determine whether the default compiler is a.out or elf
+- cat >$dummy.c <<EOF
+-#include <features.h>
+-#ifdef __cplusplus
+- int main (int argc, char *argv[]) {
+-#else
+- int main (argc, argv) int argc; char *argv[]; {
+-#endif
+-#ifdef __ELF__
+-# ifdef __GLIBC__
+-# if __GLIBC__ >= 2
+- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+-# else
+- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+-# endif
+-# else
+- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+-# endif
+-#else
+- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+-#endif
+- return 0;
+-}
+-EOF
+- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+- rm -f $dummy.c $dummy
+- fi ;;
+-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+-# are messed up and put the nodename in both sysname and nodename.
+- i?86:DYNIX/ptx:4*:*)
+- echo i386-sequent-sysv4
+- exit 0 ;;
+- i?86:UNIX_SV:4.2MP:2.*)
+- # Unixware is an offshoot of SVR4, but it has its own version
+- # number series starting with 2...
+- # I am not positive that other SVR4 systems won't match this,
+- # I just have to hope. -- rms.
+- # Use sysv4.2uw... so that sysv4* matches it.
+- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+- exit 0 ;;
+- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+- else
+- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+- fi
+- exit 0 ;;
+- i?86:*:5:7*)
+- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
+- (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
+- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
+- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
+- exit 0 ;;
+- i?86:*:3.2:*)
+- if test -f /usr/options/cb.name; then
+- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+- elif /bin/uname -X 2>/dev/null >/dev/null ; then
+- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+- && UNAME_MACHINE=i586
+- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+- && UNAME_MACHINE=i686
+- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+- && UNAME_MACHINE=i686
+- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+- else
+- echo ${UNAME_MACHINE}-pc-sysv32
+- fi
+- exit 0 ;;
+- pc:*:*:*)
+- # uname -m prints for DJGPP always 'pc', but it prints nothing about
+- # the processor, so we play safe by assuming i386.
+- echo i386-pc-msdosdjgpp
+- exit 0 ;;
+- Intel:Mach:3*:*)
+- echo i386-pc-mach3
+- exit 0 ;;
+- paragon:*:*:*)
+- echo i860-intel-osf1
+- exit 0 ;;
+- i860:*:4.*:*) # i860-SVR4
+- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+- else # Add other i860-SVR4 vendors below as they are discovered.
+- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+- fi
+- exit 0 ;;
+- mini*:CTIX:SYS*5:*)
+- # "miniframe"
+- echo m68010-convergent-sysv
+- exit 0 ;;
+- M68*:*:R3V[567]*:*)
+- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+- OS_REL=''
+- test -r /etc/.relid \
+- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4 && exit 0 ;;
+- m68*:LynxOS:2.*:*)
+- echo m68k-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
+- mc68030:UNIX_System_V:4.*:*)
+- echo m68k-atari-sysv4
+- exit 0 ;;
+- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+- echo i386-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
+- TSUNAMI:LynxOS:2.*:*)
+- echo sparc-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
+- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
+- SM[BE]S:UNIX_SV:*:*)
+- echo mips-dde-sysv${UNAME_RELEASE}
+- exit 0 ;;
+- RM*:ReliantUNIX-*:*:*)
+- echo mips-sni-sysv4
+- exit 0 ;;
+- RM*:SINIX-*:*:*)
+- echo mips-sni-sysv4
+- exit 0 ;;
+- *:SINIX-*:*:*)
+- if uname -p 2>/dev/null >/dev/null ; then
+- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+- echo ${UNAME_MACHINE}-sni-sysv4
+- else
+- echo ns32k-sni-sysv
+- fi
+- exit 0 ;;
+- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+- # says <Richard.M.Bartel@ccMail.Census.GOV>
+- echo i586-unisys-sysv4
+- exit 0 ;;
+- *:UNIX_System_V:4*:FTX*)
+- # From Gerald Hewes <hewes@openmarket.com>.
+- # How about differentiating between stratus architectures? -djm
+- echo hppa1.1-stratus-sysv4
+- exit 0 ;;
+- *:*:*:FTX*)
+- # From seanf@swdc.stratus.com.
+- echo i860-stratus-sysv4
+- exit 0 ;;
+- mc68*:A/UX:*:*)
+- echo m68k-apple-aux${UNAME_RELEASE}
+- exit 0 ;;
+- news*:NEWS-OS:*:6*)
+- echo mips-sony-newsos6
+- exit 0 ;;
+- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+- if [ -d /usr/nec ]; then
+- echo mips-nec-sysv${UNAME_RELEASE}
+- else
+- echo mips-unknown-sysv${UNAME_RELEASE}
+- fi
+- exit 0 ;;
+- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+- echo powerpc-be-beos
+- exit 0 ;;
+- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+- echo powerpc-apple-beos
+- exit 0 ;;
+- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+- echo i586-pc-beos
+- exit 0 ;;
+- SX-4:SUPER-UX:*:*)
+- echo sx4-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
+- SX-5:SUPER-UX:*:*)
+- echo sx5-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
+- Power*:Rhapsody:*:*)
+- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
+- *:Rhapsody:*:*)
+- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
+-esac
+-
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+-cat >$dummy.c <<EOF
+-#ifdef _SEQUENT_
+-# include <sys/types.h>
+-# include <sys/utsname.h>
+-#endif
+-main ()
+-{
+-#if defined (sony)
+-#if defined (MIPSEB)
+- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+- I don't know.... */
+- printf ("mips-sony-bsd\n"); exit (0);
+-#else
+-#include <sys/param.h>
+- printf ("m68k-sony-newsos%s\n",
+-#ifdef NEWSOS4
+- "4"
+-#else
+- ""
+-#endif
+- ); exit (0);
+-#endif
+-#endif
+-
+-#if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix"); exit (0);
+-#endif
+-
+-#if defined (hp300) && !defined (hpux)
+- printf ("m68k-hp-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (NeXT)
+-#if !defined (__ARCHITECTURE__)
+-#define __ARCHITECTURE__ "m68k"
+-#endif
+- int version;
+- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+- if (version < 4)
+- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+- else
+- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+- exit (0);
+-#endif
+-
+-#if defined (MULTIMAX) || defined (n16)
+-#if defined (UMAXV)
+- printf ("ns32k-encore-sysv\n"); exit (0);
+-#else
+-#if defined (CMU)
+- printf ("ns32k-encore-mach\n"); exit (0);
+-#else
+- printf ("ns32k-encore-bsd\n"); exit (0);
+-#endif
+-#endif
+-#endif
+-
+-#if defined (__386BSD__)
+- printf ("i386-pc-bsd\n"); exit (0);
+-#endif
+-
+-#if defined (sequent)
+-#if defined (i386)
+- printf ("i386-sequent-dynix\n"); exit (0);
+-#endif
+-#if defined (ns32000)
+- printf ("ns32k-sequent-dynix\n"); exit (0);
+-#endif
+-#endif
+-
+-#if defined (_SEQUENT_)
+- struct utsname un;
+-
+- uname(&un);
+-
+- if (strncmp(un.version, "V2", 2) == 0) {
+- printf ("i386-sequent-ptx2\n"); exit (0);
+- }
+- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+- printf ("i386-sequent-ptx1\n"); exit (0);
+- }
+- printf ("i386-sequent-ptx\n"); exit (0);
+-
+-#endif
+-
+-#if defined (vax)
+-#if !defined (ultrix)
+- printf ("vax-dec-bsd\n"); exit (0);
+-#else
+- printf ("vax-dec-ultrix\n"); exit (0);
+-#endif
+-#endif
+-
+-#if defined (alliant) && defined (i860)
+- printf ("i860-alliant-bsd\n"); exit (0);
+-#endif
+-
+- exit (1);
+-}
+-EOF
+-
+-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+-rm -f $dummy.c $dummy
+-
+-# Apollos put the system type in the environment.
+-
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+-
+-# Convex versions that predate uname can use getsysinfo(1)
+-
+-if [ -x /usr/convex/getsysinfo ]
+-then
+- case `getsysinfo -f cpu_type` in
+- c1*)
+- echo c1-convex-bsd
+- exit 0 ;;
+- c2*)
+- if getsysinfo -f scalar_acc
+- then echo c32-convex-bsd
+- else echo c2-convex-bsd
+- fi
+- exit 0 ;;
+- c34*)
+- echo c34-convex-bsd
+- exit 0 ;;
+- c38*)
+- echo c38-convex-bsd
+- exit 0 ;;
+- c4*)
+- echo c4-convex-bsd
+- exit 0 ;;
+- esac
+-fi
+-
+-#echo '(Unable to guess system type)' 1>&2
+-
+-exit 1
+diff -urNd -urNd patch-2.5.4/config.hin patch-2.5.9/config.hin
+--- patch-2.5.4/config.hin 1999-08-30 02:53:17.000000000 -0400
++++ patch-2.5.9/config.hin 2003-05-19 02:50:40.000000000 -0400
+@@ -1,169 +1,365 @@
+-/* config.hin. Generated automatically from configure.in by autoheader. */
++/* config.hin. Generated from configure.ac by autoheader. */
+
+-/* Define if on AIX 3.
+- System headers sometimes define this.
+- We just want to avoid a redefinition error message. */
+-#ifndef _ALL_SOURCE
+-#undef _ALL_SOURCE
++/* Define to 1 if the `closedir' function returns void instead of `int'. */
++#undef CLOSEDIR_VOID
++
++/* Define if there is a member named d_ino in the struct describing directory
++ headers. */
++#undef D_INO_IN_DIRENT
++
++/* Define on systems for which file names may have a so-called `drive letter'
++ prefix, define this to compute the length of that prefix, including the
++ colon. */
++#undef FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
++
++/* Define if the backslash character may also serve as a file name component
++ separator. */
++#undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
++
++#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
++# define FILESYSTEM_PREFIX_LEN(Filename) \
++ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
++#else
++# define FILESYSTEM_PREFIX_LEN(Filename) 0
+ #endif
+
+-/* Define if the closedir function returns void instead of int. */
+-#undef CLOSEDIR_VOID
++/* Define to 1 if you have the <bp-sym.h> header file. */
++#undef HAVE_BP_SYM_H
+
+-/* Define to empty if the keyword does not work. */
+-#undef const
++/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+-/* Define if you don't have vprintf but do have _doprnt. */
+-#undef HAVE_DOPRNT
++/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
++ don't. */
++#undef HAVE_DECL_FEOF_UNLOCKED
+
+-/* Define if you support file names longer than 14 characters. */
+-#undef HAVE_LONG_FILE_NAMES
++/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FERROR_UNLOCKED
+
+-/* Define if you have the vprintf function. */
+-#undef HAVE_VPRINTF
++/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+-/* Define if on MINIX. */
+-#undef _MINIX
++/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FGETS_UNLOCKED
+
+-/* Define to `int' if <sys/types.h> doesn't define. */
+-#undef mode_t
++/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FPUTC_UNLOCKED
+
+-/* Define to `long' if <sys/types.h> doesn't define. */
+-#undef off_t
++/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FPUTS_UNLOCKED
+
+-/* Define to `int' if <sys/types.h> doesn't define. */
+-#undef pid_t
++/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FREAD_UNLOCKED
+
+-/* Define if the system does not provide POSIX.1 features except
+- with this defined. */
+-#undef _POSIX_1_SOURCE
++/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
++ */
++#undef HAVE_DECL_FREE
+
+-/* Define if you need to in order for stat and other things to work. */
+-#undef _POSIX_SOURCE
++/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_FWRITE_UNLOCKED
+
+-/* Define as the return type of signal handlers (int or void). */
+-#undef RETSIGTYPE
++/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+-/* Define to `unsigned' if <sys/types.h> doesn't define. */
+-#undef size_t
++/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
++ don't. */
++#undef HAVE_DECL_GETC_UNLOCKED
+
+-/* Define if you have the ANSI C header files. */
+-#undef STDC_HEADERS
++/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
++ */
++#undef HAVE_DECL_GETENV
+
+-/* Define if you can safely include both <sys/time.h> and <time.h>. */
+-#undef TIME_WITH_SYS_TIME
++/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
++ */
++#undef HAVE_DECL_MALLOC
+
+-/* Define if you have the _doprintf function. */
+-#undef HAVE__DOPRINTF
++/* Define to 1 if you have the declaration of `mktemp', and to 0 if you don't.
++ */
++#undef HAVE_DECL_MKTEMP
+
+-/* Define if you have the fseeko function. */
++/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
++ you don't. */
++#undef HAVE_DECL_PUTCHAR_UNLOCKED
++
++/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
++ don't. */
++#undef HAVE_DECL_PUTC_UNLOCKED
++
++/* Define to 1 if you have the declaration of `strerror', and to 0 if you
++ don't. */
++#undef HAVE_DECL_STRERROR
++
++/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
++ don't. */
++#undef HAVE_DECL_STRERROR_R
++
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++ */
++#undef HAVE_DIRENT_H
++
++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
++#undef HAVE_DOPRNT
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#undef HAVE_FCNTL_H
++
++/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+ #undef HAVE_FSEEKO
+
+-/* Define if you have the isascii function. */
++/* Define to 1 if you have the `geteuid' function. */
++#undef HAVE_GETEUID
++
++/* Define to 1 if you have the `getuid' function. */
++#undef HAVE_GETUID
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#undef HAVE_INTTYPES_H
++
++/* Define to 1 if you have the `isascii' function. */
+ #undef HAVE_ISASCII
+
+-/* Define if you have the memchr function. */
++/* Define to 1 if you have the `iswprint' function. */
++#undef HAVE_ISWPRINT
++
++/* Define to 1 if you have the <limits.h> header file. */
++#undef HAVE_LIMITS_H
++
++/* Define to 1 if you support file names longer than 14 characters. */
++#undef HAVE_LONG_FILE_NAMES
++
++/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
++ to 0 otherwise. */
++#undef HAVE_MALLOC
++
++/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
++#undef HAVE_MBRTOWC
++
++/* Define to 1 if you have the `mbsinit' function. */
++#undef HAVE_MBSINIT
++
++/* Define to 1 if <wchar.h> declares mbstate_t. */
++#undef HAVE_MBSTATE_T
++
++/* Define to 1 if you have the `memchr' function. */
+ #undef HAVE_MEMCHR
+
+-/* Define if you have the memcmp function. */
++/* Define to 1 if you have the `memcmp' function. */
+ #undef HAVE_MEMCMP
+
+-/* Define if you have the mkdir function. */
++/* Define to 1 if you have the <memory.h> header file. */
++#undef HAVE_MEMORY_H
++
++/* Define to 1 if you have the `mkdir' function. */
+ #undef HAVE_MKDIR
+
+-/* Define if you have the mktemp function. */
++/* Define to 1 if you have the `mktemp' function. */
+ #undef HAVE_MKTEMP
+
+-/* Define if you have the pathconf function. */
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++#undef HAVE_NDIR_H
++
++/* Define to 1 if you have the `pathconf' function. */
+ #undef HAVE_PATHCONF
+
+-/* Define if you have the raise function. */
++/* Define to 1 if you have the `raise' function. */
+ #undef HAVE_RAISE
+
+-/* Define if you have the rename function. */
+-#undef HAVE_RENAME
++/* Define to 1 if your system has a GNU libc compatible `realloc' function,
++ and to 0 otherwise. */
++#undef HAVE_REALLOC
+
+-/* Define if you have the rmdir function. */
++/* Define to 1 if you have the `rmdir' function. */
+ #undef HAVE_RMDIR
+
+-/* Define if you have the setmode function. */
+-#undef HAVE_SETMODE
++/* Define to 1 if you have the DOS-style `setmode' function. */
++#undef HAVE_SETMODE_DOS
+
+-/* Define if you have the sigaction function. */
++/* Define to 1 if you have the `sigaction' function. */
+ #undef HAVE_SIGACTION
+
+-/* Define if you have the sigprocmask function. */
++/* Define to 1 if you have the `sigprocmask' function. */
+ #undef HAVE_SIGPROCMASK
+
+-/* Define if you have the sigsetmask function. */
++/* Define to 1 if you have the `sigsetmask' function. */
+ #undef HAVE_SIGSETMASK
+
+-/* Define if you have the strerror function. */
+-#undef HAVE_STRERROR
++/* Define to 1 if stdbool.h conforms to C99. */
++#undef HAVE_STDBOOL_H
+
+-/* Define if you have the <dirent.h> header file. */
+-#undef HAVE_DIRENT_H
++/* Define to 1 if you have the <stddef.h> header file. */
++#undef HAVE_STDDEF_H
+
+-/* Define if you have the <fcntl.h> header file. */
+-#undef HAVE_FCNTL_H
++/* Define to 1 if you have the <stdint.h> header file. */
++#undef HAVE_STDINT_H
+
+-/* Define if you have the <limits.h> header file. */
+-#undef HAVE_LIMITS_H
++/* Define to 1 if you have the <stdlib.h> header file. */
++#undef HAVE_STDLIB_H
+
+-/* Define if you have the <ndir.h> header file. */
+-#undef HAVE_NDIR_H
++/* Define to 1 if you have the `strerror' function. */
++#undef HAVE_STRERROR
+
+-/* Define if you have the <string.h> header file. */
++/* Define to 1 if you have the `strerror_r' function. */
++#undef HAVE_STRERROR_R
++
++/* Define to 1 if you have the <strings.h> header file. */
++#undef HAVE_STRINGS_H
++
++/* Define to 1 if you have the <string.h> header file. */
+ #undef HAVE_STRING_H
+
+-/* Define if you have the <sys/dir.h> header file. */
++/* Define to 1 if you have the `strncasecmp' function. */
++#undef HAVE_STRNCASECMP
++
++/* Define if struct utimbuf is declared -- usually in <utime.h>. Some systems
++ have utime.h but don't declare the struct anywhere. */
++#undef HAVE_STRUCT_UTIMBUF
++
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++ */
+ #undef HAVE_SYS_DIR_H
+
+-/* Define if you have the <sys/ndir.h> header file. */
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++ */
+ #undef HAVE_SYS_NDIR_H
+
+-/* Define if you have the <unistd.h> header file. */
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#undef HAVE_SYS_STAT_H
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#undef HAVE_SYS_TIME_H
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#undef HAVE_SYS_TYPES_H
++
++/* Define to 1 if you have the <unistd.h> header file. */
+ #undef HAVE_UNISTD_H
+
+-/* Define if you have the <utime.h> header file. */
++/* Define to 1 if you have the <utime.h> header file. */
+ #undef HAVE_UTIME_H
+
+-/* Define if you have the <varargs.h> header file. */
++/* Define to 1 if you have the <varargs.h> header file. */
+ #undef HAVE_VARARGS_H
+
++/* Define to 1 if you have the `vprintf' function. */
++#undef HAVE_VPRINTF
++
++/* Define to 1 if you have the <wchar.h> header file. */
++#undef HAVE_WCHAR_H
++
++/* Define to 1 if you have the <wctype.h> header file. */
++#undef HAVE_WCTYPE_H
++
++/* Define to 1 if the system has the type `_Bool'. */
++#undef HAVE__BOOL
++
++/* Define to 1 if you have the `_doprintf' function. */
++#undef HAVE__DOPRINTF
++
++#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
++# define ISSLASH(C) ((C) == '/' || (C) == '\\')
++#else
++# define ISSLASH(C) ((C) == '/')
++#endif
++
++/* Define if mkdir takes only one argument. */
++#undef MKDIR_TAKES_ONE_ARG
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* Define to 1 if the C compiler supports function prototypes. */
++#undef PROTOTYPES
++
++/* Define as the return type of signal handlers (`int' or `void'). */
++#undef RETSIGTYPE
++
++/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
++#undef STAT_MACROS_BROKEN
++
++/* Define to 1 if you have the ANSI C header files. */
++#undef STDC_HEADERS
++
++/* Define to 1 if strerror_r returns char *. */
++#undef STRERROR_R_CHAR_P
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#undef TIME_WITH_SYS_TIME
++
++/* Define to 1 if on AIX 3.
++ System headers sometimes define this.
++ We just want to avoid a redefinition error message. */
++#ifndef _ALL_SOURCE
++# undef _ALL_SOURCE
++#endif
++
+ /* Number of bits in a file offset, on hosts where this is settable. */
+ #undef _FILE_OFFSET_BITS
+
+-/* Define to make fseeko etc. visible, on some hosts. */
++/* Enable GNU extensions on systems that have them. */
++#ifndef _GNU_SOURCE
++# undef _GNU_SOURCE
++#endif
++
++/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+ #undef _LARGEFILE_SOURCE
+
+ /* Define for large files, on AIX-style hosts. */
+ #undef _LARGE_FILES
+
+-/* Define if compiler has function prototypes */
+-#undef PROTOTYPES
++/* Define to 1 if on MINIX. */
++#undef _MINIX
+
+-/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+- and declares uintmax_t. */
+-#undef HAVE_INTTYPES_H
++/* Define to 2 if the system does not provide POSIX.1 features except with
++ this defined. */
++#undef _POSIX_1_SOURCE
+
+-/* Define if struct utimbuf is declared -- usually in <utime.h>.
+- Some systems have utime.h but don't declare the struct anywhere. */
+-#undef HAVE_STRUCT_UTIMBUF
++/* Define to 1 if you need to in order for `stat' and other things to work. */
++#undef _POSIX_SOURCE
+
+-/* Define if the malloc check has been performed. */
+-#undef HAVE_DONE_WORKING_MALLOC_CHECK
++/* Define like PROTOTYPES; this can be used by system headers. */
++#undef __PROTOTYPES
++
++/* Define to empty if `const' does not conform to ANSI C. */
++#undef const
+
+ /* Define to rpl_malloc if the replacement function should be used. */
+ #undef malloc
+
+-/* Define if the realloc check has been performed. */
+-#undef HAVE_DONE_WORKING_REALLOC_CHECK
++/* Define to a type if <wchar.h> does not define. */
++#undef mbstate_t
++
++/* Define to `int' if <sys/types.h> does not define. */
++#undef mode_t
++
++/* Define to `long' if <sys/types.h> does not define. */
++#undef off_t
++
++/* Define to `int' if <sys/types.h> does not define. */
++#undef pid_t
+
+ /* Define to rpl_realloc if the replacement function should be used. */
+ #undef realloc
+
+-/* Define if there is a member named d_ino in the struct describing
+- directory headers. */
+-#undef D_INO_IN_DIRENT
+-
++/* Define to `unsigned' if <sys/types.h> does not define. */
++#undef size_t
+diff -urNd -urNd patch-2.5.4/config.sub patch-2.5.9/config.sub
+--- patch-2.5.4/config.sub 1999-08-05 08:55:20.000000000 -0400
++++ patch-2.5.9/config.sub 1969-12-31 19:00:00.000000000 -0500
+@@ -1,1220 +0,0 @@
+-#! /bin/sh
+-# Configuration validation subroutine script, version 1.1.
+-# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine. It does not imply ALL GNU software can.
+-#
+-# This file is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330,
+-# Boston, MA 02111-1307, USA.
+-
+-# As a special exception to the GNU General Public License, if you
+-# distribute this file as part of a program that contains a
+-# configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
+-
+-# Configuration subroutine to validate and canonicalize a configuration type.
+-# Supply the specified configuration type as an argument.
+-# If it is invalid, we print an error message on stderr and exit with code 1.
+-# Otherwise, we print the canonical config type on stdout and succeed.
+-
+-# This file is supposed to be the same for all GNU packages
+-# and recognize all the CPU types, system types and aliases
+-# that are meaningful with *any* GNU software.
+-# Each package is responsible for reporting which valid configurations
+-# it does not support. The user should be able to distinguish
+-# a failure to support a valid configuration from a meaningless
+-# configuration.
+-
+-# The goal of this file is to map all the various variations of a given
+-# machine specification into a single specification in the form:
+-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+-# or in some cases, the newer four-part form:
+-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+-# It is wrong to echo any other type of specification.
+-
+-if [ x$1 = x ]
+-then
+- echo Configuration name missing. 1>&2
+- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+- echo "or $0 ALIAS" 1>&2
+- echo where ALIAS is a recognized configuration type. 1>&2
+- exit 1
+-fi
+-
+-# First pass through any local machine types.
+-case $1 in
+- *local*)
+- echo $1
+- exit 0
+- ;;
+- *)
+- ;;
+-esac
+-
+-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+-# Here we must recognize all the valid KERNEL-OS combinations.
+-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+-case $maybe_os in
+- linux-gnu*)
+- os=-$maybe_os
+- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+- ;;
+- *)
+- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+- if [ $basic_machine != $1 ]
+- then os=`echo $1 | sed 's/.*-/-/'`
+- else os=; fi
+- ;;
+-esac
+-
+-### Let's recognize common machines as not being operating systems so
+-### that things like config.sub decstation-3100 work. We also
+-### recognize some manufacturers as not being operating systems, so we
+-### can provide default operating systems below.
+-case $os in
+- -sun*os*)
+- # Prevent following clause from handling this invalid input.
+- ;;
+- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+- -apple)
+- os=
+- basic_machine=$1
+- ;;
+- -sim | -cisco | -oki | -wec | -winbond)
+- os=
+- basic_machine=$1
+- ;;
+- -scout)
+- ;;
+- -wrs)
+- os=-vxworks
+- basic_machine=$1
+- ;;
+- -hiux*)
+- os=-hiuxwe2
+- ;;
+- -sco5)
+- os=-sco3.2v5
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -sco4)
+- os=-sco3.2v4
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -sco3.2.[4-9]*)
+- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -sco3.2v[4-9]*)
+- # Don't forget version if it is 3.2v4 or newer.
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -sco*)
+- os=-sco3.2v2
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -udk*)
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -isc)
+- os=-isc2.2
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -clix*)
+- basic_machine=clipper-intergraph
+- ;;
+- -isc*)
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+- ;;
+- -lynx*)
+- os=-lynxos
+- ;;
+- -ptx*)
+- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+- ;;
+- -windowsnt*)
+- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+- ;;
+- -psos*)
+- os=-psos
+- ;;
+- -mint | -mint[0-9]*)
+- basic_machine=m68k-atari
+- os=-mint
+- ;;
+-esac
+-
+-# Decode aliases for certain CPU-COMPANY combinations.
+-case $basic_machine in
+- # Recognize the basic CPU types without company name.
+- # Some are omitted here because they have special meanings below.
+- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+- | 580 | i960 | h8300 \
+- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+- | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+- | mips64vr5000 | miprs64vr5000el | mcore \
+- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+- | thumb | d10v)
+- basic_machine=$basic_machine-unknown
+- ;;
+- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
+- ;;
+-
+- # We use `pc' rather than `unknown'
+- # because (1) that's what they normally are, and
+- # (2) the word "unknown" tends to confuse beginning users.
+- i[34567]86)
+- basic_machine=$basic_machine-pc
+- ;;
+- # Object if more than one company name word.
+- *-*-*)
+- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+- exit 1
+- ;;
+- # Recognize the basic CPU types with company name.
+- # FIXME: clean up the formatting here.
+- vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+- | xmp-* | ymp-* \
+- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+- | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+- | clipper-* | orion-* \
+- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+- | mips64el-* | mips64orion-* | mips64orionel-* \
+- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+- | mipstx39-* | mipstx39el-* | mcore-* \
+- | f301-* | armv*-* | t3e-* \
+- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+- | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
+- ;;
+- # Recognize the various machine names and aliases which stand
+- # for a CPU type and a company and sometimes even an OS.
+- 386bsd)
+- basic_machine=i386-unknown
+- os=-bsd
+- ;;
+- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+- basic_machine=m68000-att
+- ;;
+- 3b*)
+- basic_machine=we32k-att
+- ;;
+- a29khif)
+- basic_machine=a29k-amd
+- os=-udi
+- ;;
+- adobe68k)
+- basic_machine=m68010-adobe
+- os=-scout
+- ;;
+- alliant | fx80)
+- basic_machine=fx80-alliant
+- ;;
+- altos | altos3068)
+- basic_machine=m68k-altos
+- ;;
+- am29k)
+- basic_machine=a29k-none
+- os=-bsd
+- ;;
+- amdahl)
+- basic_machine=580-amdahl
+- os=-sysv
+- ;;
+- amiga | amiga-*)
+- basic_machine=m68k-cbm
+- ;;
+- amigaos | amigados)
+- basic_machine=m68k-cbm
+- os=-amigaos
+- ;;
+- amigaunix | amix)
+- basic_machine=m68k-cbm
+- os=-sysv4
+- ;;
+- apollo68)
+- basic_machine=m68k-apollo
+- os=-sysv
+- ;;
+- apollo68bsd)
+- basic_machine=m68k-apollo
+- os=-bsd
+- ;;
+- aux)
+- basic_machine=m68k-apple
+- os=-aux
+- ;;
+- balance)
+- basic_machine=ns32k-sequent
+- os=-dynix
+- ;;
+- convex-c1)
+- basic_machine=c1-convex
+- os=-bsd
+- ;;
+- convex-c2)
+- basic_machine=c2-convex
+- os=-bsd
+- ;;
+- convex-c32)
+- basic_machine=c32-convex
+- os=-bsd
+- ;;
+- convex-c34)
+- basic_machine=c34-convex
+- os=-bsd
+- ;;
+- convex-c38)
+- basic_machine=c38-convex
+- os=-bsd
+- ;;
+- cray | ymp)
+- basic_machine=ymp-cray
+- os=-unicos
+- ;;
+- cray2)
+- basic_machine=cray2-cray
+- os=-unicos
+- ;;
+- [ctj]90-cray)
+- basic_machine=c90-cray
+- os=-unicos
+- ;;
+- crds | unos)
+- basic_machine=m68k-crds
+- ;;
+- da30 | da30-*)
+- basic_machine=m68k-da30
+- ;;
+- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+- basic_machine=mips-dec
+- ;;
+- delta | 3300 | motorola-3300 | motorola-delta \
+- | 3300-motorola | delta-motorola)
+- basic_machine=m68k-motorola
+- ;;
+- delta88)
+- basic_machine=m88k-motorola
+- os=-sysv3
+- ;;
+- dpx20 | dpx20-*)
+- basic_machine=rs6000-bull
+- os=-bosx
+- ;;
+- dpx2* | dpx2*-bull)
+- basic_machine=m68k-bull
+- os=-sysv3
+- ;;
+- ebmon29k)
+- basic_machine=a29k-amd
+- os=-ebmon
+- ;;
+- elxsi)
+- basic_machine=elxsi-elxsi
+- os=-bsd
+- ;;
+- encore | umax | mmax)
+- basic_machine=ns32k-encore
+- ;;
+- es1800 | OSE68k | ose68k | ose | OSE)
+- basic_machine=m68k-ericsson
+- os=-ose
+- ;;
+- fx2800)
+- basic_machine=i860-alliant
+- ;;
+- genix)
+- basic_machine=ns32k-ns
+- ;;
+- gmicro)
+- basic_machine=tron-gmicro
+- os=-sysv
+- ;;
+- h3050r* | hiux*)
+- basic_machine=hppa1.1-hitachi
+- os=-hiuxwe2
+- ;;
+- h8300hms)
+- basic_machine=h8300-hitachi
+- os=-hms
+- ;;
+- h8300xray)
+- basic_machine=h8300-hitachi
+- os=-xray
+- ;;
+- h8500hms)
+- basic_machine=h8500-hitachi
+- os=-hms
+- ;;
+- harris)
+- basic_machine=m88k-harris
+- os=-sysv3
+- ;;
+- hp300-*)
+- basic_machine=m68k-hp
+- ;;
+- hp300bsd)
+- basic_machine=m68k-hp
+- os=-bsd
+- ;;
+- hp300hpux)
+- basic_machine=m68k-hp
+- os=-hpux
+- ;;
+- hp3k9[0-9][0-9] | hp9[0-9][0-9])
+- basic_machine=hppa1.0-hp
+- ;;
+- hp9k2[0-9][0-9] | hp9k31[0-9])
+- basic_machine=m68000-hp
+- ;;
+- hp9k3[2-9][0-9])
+- basic_machine=m68k-hp
+- ;;
+- hp9k6[0-9][0-9] | hp6[0-9][0-9])
+- basic_machine=hppa1.0-hp
+- ;;
+- hp9k7[0-79][0-9] | hp7[0-79][0-9])
+- basic_machine=hppa1.1-hp
+- ;;
+- hp9k78[0-9] | hp78[0-9])
+- # FIXME: really hppa2.0-hp
+- basic_machine=hppa1.1-hp
+- ;;
+- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+- # FIXME: really hppa2.0-hp
+- basic_machine=hppa1.1-hp
+- ;;
+- hp9k8[0-9][13679] | hp8[0-9][13679])
+- basic_machine=hppa1.1-hp
+- ;;
+- hp9k8[0-9][0-9] | hp8[0-9][0-9])
+- basic_machine=hppa1.0-hp
+- ;;
+- hppa-next)
+- os=-nextstep3
+- ;;
+- hppaosf)
+- basic_machine=hppa1.1-hp
+- os=-osf
+- ;;
+- hppro)
+- basic_machine=hppa1.1-hp
+- os=-proelf
+- ;;
+- i370-ibm* | ibm*)
+- basic_machine=i370-ibm
+- os=-mvs
+- ;;
+-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+- i[34567]86v32)
+- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+- os=-sysv32
+- ;;
+- i[34567]86v4*)
+- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+- os=-sysv4
+- ;;
+- i[34567]86v)
+- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+- os=-sysv
+- ;;
+- i[34567]86sol2)
+- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+- os=-solaris2
+- ;;
+- i386mach)
+- basic_machine=i386-mach
+- os=-mach
+- ;;
+- i386-vsta | vsta)
+- basic_machine=i386-unknown
+- os=-vsta
+- ;;
+- i386-go32 | go32)
+- basic_machine=i386-unknown
+- os=-go32
+- ;;
+- i386-mingw32 | mingw32)
+- basic_machine=i386-unknown
+- os=-mingw32
+- ;;
+- iris | iris4d)
+- basic_machine=mips-sgi
+- case $os in
+- -irix*)
+- ;;
+- *)
+- os=-irix4
+- ;;
+- esac
+- ;;
+- isi68 | isi)
+- basic_machine=m68k-isi
+- os=-sysv
+- ;;
+- m88k-omron*)
+- basic_machine=m88k-omron
+- ;;
+- magnum | m3230)
+- basic_machine=mips-mips
+- os=-sysv
+- ;;
+- merlin)
+- basic_machine=ns32k-utek
+- os=-sysv
+- ;;
+- miniframe)
+- basic_machine=m68000-convergent
+- ;;
+- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+- basic_machine=m68k-atari
+- os=-mint
+- ;;
+- mipsel*-linux*)
+- basic_machine=mipsel-unknown
+- os=-linux-gnu
+- ;;
+- mips*-linux*)
+- basic_machine=mips-unknown
+- os=-linux-gnu
+- ;;
+- mips3*-*)
+- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+- ;;
+- mips3*)
+- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+- ;;
+- monitor)
+- basic_machine=m68k-rom68k
+- os=-coff
+- ;;
+- msdos)
+- basic_machine=i386-unknown
+- os=-msdos
+- ;;
+- ncr3000)
+- basic_machine=i486-ncr
+- os=-sysv4
+- ;;
+- netbsd386)
+- basic_machine=i386-unknown
+- os=-netbsd
+- ;;
+- netwinder)
+- basic_machine=armv4l-corel
+- os=-linux
+- ;;
+- news | news700 | news800 | news900)
+- basic_machine=m68k-sony
+- os=-newsos
+- ;;
+- news1000)
+- basic_machine=m68030-sony
+- os=-newsos
+- ;;
+- news-3600 | risc-news)
+- basic_machine=mips-sony
+- os=-newsos
+- ;;
+- necv70)
+- basic_machine=v70-nec
+- os=-sysv
+- ;;
+- next | m*-next )
+- basic_machine=m68k-next
+- case $os in
+- -nextstep* )
+- ;;
+- -ns2*)
+- os=-nextstep2
+- ;;
+- *)
+- os=-nextstep3
+- ;;
+- esac
+- ;;
+- nh3000)
+- basic_machine=m68k-harris
+- os=-cxux
+- ;;
+- nh[45]000)
+- basic_machine=m88k-harris
+- os=-cxux
+- ;;
+- nindy960)
+- basic_machine=i960-intel
+- os=-nindy
+- ;;
+- mon960)
+- basic_machine=i960-intel
+- os=-mon960
+- ;;
+- np1)
+- basic_machine=np1-gould
+- ;;
+- op50n-* | op60c-*)
+- basic_machine=hppa1.1-oki
+- os=-proelf
+- ;;
+- OSE68000 | ose68000)
+- basic_machine=m68000-ericsson
+- os=-ose
+- ;;
+- os68k)
+- basic_machine=m68k-none
+- os=-os68k
+- ;;
+- pa-hitachi)
+- basic_machine=hppa1.1-hitachi
+- os=-hiuxwe2
+- ;;
+- paragon)
+- basic_machine=i860-intel
+- os=-osf
+- ;;
+- pbd)
+- basic_machine=sparc-tti
+- ;;
+- pbb)
+- basic_machine=m68k-tti
+- ;;
+- pc532 | pc532-*)
+- basic_machine=ns32k-pc532
+- ;;
+- pentium | p5 | k5 | k6 | nexen)
+- basic_machine=i586-pc
+- ;;
+- pentiumpro | p6 | 6x86)
+- basic_machine=i686-pc
+- ;;
+- pentiumii | pentium2)
+- basic_machine=i786-pc
+- ;;
+- pentium-* | p5-* | k5-* | k6-* | nexen-*)
+- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+- ;;
+- pentiumpro-* | p6-* | 6x86-*)
+- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+- ;;
+- pentiumii-* | pentium2-*)
+- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+- ;;
+- pn)
+- basic_machine=pn-gould
+- ;;
+- power) basic_machine=rs6000-ibm
+- ;;
+- ppc) basic_machine=powerpc-unknown
+- ;;
+- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+- ;;
+- ppcle | powerpclittle | ppc-le | powerpc-little)
+- basic_machine=powerpcle-unknown
+- ;;
+- ppcle-* | powerpclittle-*)
+- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+- ;;
+- ps2)
+- basic_machine=i386-ibm
+- ;;
+- rom68k)
+- basic_machine=m68k-rom68k
+- os=-coff
+- ;;
+- rm[46]00)
+- basic_machine=mips-siemens
+- ;;
+- rtpc | rtpc-*)
+- basic_machine=romp-ibm
+- ;;
+- sa29200)
+- basic_machine=a29k-amd
+- os=-udi
+- ;;
+- sequent)
+- basic_machine=i386-sequent
+- ;;
+- sh)
+- basic_machine=sh-hitachi
+- os=-hms
+- ;;
+- sparclite-wrs)
+- basic_machine=sparclite-wrs
+- os=-vxworks
+- ;;
+- sps7)
+- basic_machine=m68k-bull
+- os=-sysv2
+- ;;
+- spur)
+- basic_machine=spur-unknown
+- ;;
+- st2000)
+- basic_machine=m68k-tandem
+- ;;
+- stratus)
+- basic_machine=i860-stratus
+- os=-sysv4
+- ;;
+- sun2)
+- basic_machine=m68000-sun
+- ;;
+- sun2os3)
+- basic_machine=m68000-sun
+- os=-sunos3
+- ;;
+- sun2os4)
+- basic_machine=m68000-sun
+- os=-sunos4
+- ;;
+- sun3os3)
+- basic_machine=m68k-sun
+- os=-sunos3
+- ;;
+- sun3os4)
+- basic_machine=m68k-sun
+- os=-sunos4
+- ;;
+- sun4os3)
+- basic_machine=sparc-sun
+- os=-sunos3
+- ;;
+- sun4os4)
+- basic_machine=sparc-sun
+- os=-sunos4
+- ;;
+- sun4sol2)
+- basic_machine=sparc-sun
+- os=-solaris2
+- ;;
+- sun3 | sun3-*)
+- basic_machine=m68k-sun
+- ;;
+- sun4)
+- basic_machine=sparc-sun
+- ;;
+- sun386 | sun386i | roadrunner)
+- basic_machine=i386-sun
+- ;;
+- symmetry)
+- basic_machine=i386-sequent
+- os=-dynix
+- ;;
+- t3e)
+- basic_machine=t3e-cray
+- os=-unicos
+- ;;
+- tx39)
+- basic_machine=mipstx39-unknown
+- ;;
+- tx39el)
+- basic_machine=mipstx39el-unknown
+- ;;
+- tower | tower-32)
+- basic_machine=m68k-ncr
+- ;;
+- udi29k)
+- basic_machine=a29k-amd
+- os=-udi
+- ;;
+- ultra3)
+- basic_machine=a29k-nyu
+- os=-sym1
+- ;;
+- v810 | necv810)
+- basic_machine=v810-nec
+- os=-none
+- ;;
+- vaxv)
+- basic_machine=vax-dec
+- os=-sysv
+- ;;
+- vms)
+- basic_machine=vax-dec
+- os=-vms
+- ;;
+- vpp*|vx|vx-*)
+- basic_machine=f301-fujitsu
+- ;;
+- vxworks960)
+- basic_machine=i960-wrs
+- os=-vxworks
+- ;;
+- vxworks68)
+- basic_machine=m68k-wrs
+- os=-vxworks
+- ;;
+- vxworks29k)
+- basic_machine=a29k-wrs
+- os=-vxworks
+- ;;
+- w65*)
+- basic_machine=w65-wdc
+- os=-none
+- ;;
+- w89k-*)
+- basic_machine=hppa1.1-winbond
+- os=-proelf
+- ;;
+- xmp)
+- basic_machine=xmp-cray
+- os=-unicos
+- ;;
+- xps | xps100)
+- basic_machine=xps100-honeywell
+- ;;
+- z8k-*-coff)
+- basic_machine=z8k-unknown
+- os=-sim
+- ;;
+- none)
+- basic_machine=none-none
+- os=-none
+- ;;
+-
+-# Here we handle the default manufacturer of certain CPU types. It is in
+-# some cases the only manufacturer, in others, it is the most popular.
+- w89k)
+- basic_machine=hppa1.1-winbond
+- ;;
+- op50n)
+- basic_machine=hppa1.1-oki
+- ;;
+- op60c)
+- basic_machine=hppa1.1-oki
+- ;;
+- mips)
+- if [ x$os = x-linux-gnu ]; then
+- basic_machine=mips-unknown
+- else
+- basic_machine=mips-mips
+- fi
+- ;;
+- romp)
+- basic_machine=romp-ibm
+- ;;
+- rs6000)
+- basic_machine=rs6000-ibm
+- ;;
+- vax)
+- basic_machine=vax-dec
+- ;;
+- pdp11)
+- basic_machine=pdp11-dec
+- ;;
+- we32k)
+- basic_machine=we32k-att
+- ;;
+- sparc | sparcv9)
+- basic_machine=sparc-sun
+- ;;
+- cydra)
+- basic_machine=cydra-cydrome
+- ;;
+- orion)
+- basic_machine=orion-highlevel
+- ;;
+- orion105)
+- basic_machine=clipper-highlevel
+- ;;
+- mac | mpw | mac-mpw)
+- basic_machine=m68k-apple
+- ;;
+- pmac | pmac-mpw)
+- basic_machine=powerpc-apple
+- ;;
+- c4x*)
+- basic_machine=c4x-none
+- os=-coff
+- ;;
+- *)
+- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+- exit 1
+- ;;
+-esac
+-
+-# Here we canonicalize certain aliases for manufacturers.
+-case $basic_machine in
+- *-digital*)
+- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+- ;;
+- *-commodore*)
+- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+- ;;
+- *)
+- ;;
+-esac
+-
+-# Decode manufacturer-specific aliases for certain operating systems.
+-
+-if [ x"$os" != x"" ]
+-then
+-case $os in
+- # First match some system type aliases
+- # that might get confused with valid system types.
+- # -solaris* is a basic system type, with this one exception.
+- -solaris1 | -solaris1.*)
+- os=`echo $os | sed -e 's|solaris1|sunos4|'`
+- ;;
+- -solaris)
+- os=-solaris2
+- ;;
+- -svr4*)
+- os=-sysv4
+- ;;
+- -unixware*)
+- os=-sysv4.2uw
+- ;;
+- -gnu/linux*)
+- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+- ;;
+- # First accept the basic system types.
+- # The portable systems comes first.
+- # Each alternative MUST END IN A *, to match a version number.
+- # -sysv* is not here because it comes later, after sysvr4.
+- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+- | -aos* \
+- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+- | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
+- # Remember, each alternative MUST END IN *, to match a version number.
+- ;;
+- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+- | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+- ;;
+- -mac*)
+- os=`echo $os | sed -e 's|mac|macos|'`
+- ;;
+- -linux*)
+- os=`echo $os | sed -e 's|linux|linux-gnu|'`
+- ;;
+- -sunos5*)
+- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+- ;;
+- -sunos6*)
+- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+- ;;
+- -osfrose*)
+- os=-osfrose
+- ;;
+- -osf*)
+- os=-osf
+- ;;
+- -utek*)
+- os=-bsd
+- ;;
+- -dynix*)
+- os=-bsd
+- ;;
+- -acis*)
+- os=-aos
+- ;;
+- -386bsd)
+- os=-bsd
+- ;;
+- -ctix* | -uts*)
+- os=-sysv
+- ;;
+- -ns2 )
+- os=-nextstep2
+- ;;
+- # Preserve the version number of sinix5.
+- -sinix5.*)
+- os=`echo $os | sed -e 's|sinix|sysv|'`
+- ;;
+- -sinix*)
+- os=-sysv4
+- ;;
+- -triton*)
+- os=-sysv3
+- ;;
+- -oss*)
+- os=-sysv3
+- ;;
+- -svr4)
+- os=-sysv4
+- ;;
+- -svr3)
+- os=-sysv3
+- ;;
+- -sysvr4)
+- os=-sysv4
+- ;;
+- # This must come after -sysvr4.
+- -sysv*)
+- ;;
+- -ose*)
+- os=-ose
+- ;;
+- -es1800*)
+- os=-ose
+- ;;
+- -xenix)
+- os=-xenix
+- ;;
+- -*mint | -*MiNT)
+- os=-mint
+- ;;
+- -none)
+- ;;
+- *)
+- # Get rid of the `-' at the beginning of $os.
+- os=`echo $os | sed 's/[^-]*-//'`
+- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+- exit 1
+- ;;
+-esac
+-else
+-
+-# Here we handle the default operating systems that come with various machines.
+-# The value should be what the vendor currently ships out the door with their
+-# machine or put another way, the most popular os provided with the machine.
+-
+-# Note that if you're going to try to match "-MANUFACTURER" here (say,
+-# "-sun"), then you have to tell the case statement up towards the top
+-# that MANUFACTURER isn't an operating system. Otherwise, code above
+-# will signal an error saying that MANUFACTURER isn't an operating
+-# system, and we'll never get to this point.
+-
+-case $basic_machine in
+- *-acorn)
+- os=-riscix1.2
+- ;;
+- arm*-corel)
+- os=-linux
+- ;;
+- arm*-semi)
+- os=-aout
+- ;;
+- pdp11-*)
+- os=-none
+- ;;
+- *-dec | vax-*)
+- os=-ultrix4.2
+- ;;
+- m68*-apollo)
+- os=-domain
+- ;;
+- i386-sun)
+- os=-sunos4.0.2
+- ;;
+- m68000-sun)
+- os=-sunos3
+- # This also exists in the configure program, but was not the
+- # default.
+- # os=-sunos4
+- ;;
+- m68*-cisco)
+- os=-aout
+- ;;
+- mips*-cisco)
+- os=-elf
+- ;;
+- mips*-*)
+- os=-elf
+- ;;
+- *-tti) # must be before sparc entry or we get the wrong os.
+- os=-sysv3
+- ;;
+- sparc-* | *-sun)
+- os=-sunos4.1.1
+- ;;
+- *-be)
+- os=-beos
+- ;;
+- *-ibm)
+- os=-aix
+- ;;
+- *-wec)
+- os=-proelf
+- ;;
+- *-winbond)
+- os=-proelf
+- ;;
+- *-oki)
+- os=-proelf
+- ;;
+- *-hp)
+- os=-hpux
+- ;;
+- *-hitachi)
+- os=-hiux
+- ;;
+- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+- os=-sysv
+- ;;
+- *-cbm)
+- os=-amigaos
+- ;;
+- *-dg)
+- os=-dgux
+- ;;
+- *-dolphin)
+- os=-sysv3
+- ;;
+- m68k-ccur)
+- os=-rtu
+- ;;
+- m88k-omron*)
+- os=-luna
+- ;;
+- *-next )
+- os=-nextstep
+- ;;
+- *-sequent)
+- os=-ptx
+- ;;
+- *-crds)
+- os=-unos
+- ;;
+- *-ns)
+- os=-genix
+- ;;
+- i370-*)
+- os=-mvs
+- ;;
+- *-next)
+- os=-nextstep3
+- ;;
+- *-gould)
+- os=-sysv
+- ;;
+- *-highlevel)
+- os=-bsd
+- ;;
+- *-encore)
+- os=-bsd
+- ;;
+- *-sgi)
+- os=-irix
+- ;;
+- *-siemens)
+- os=-sysv4
+- ;;
+- *-masscomp)
+- os=-rtu
+- ;;
+- f301-fujitsu)
+- os=-uxpv
+- ;;
+- *-rom68k)
+- os=-coff
+- ;;
+- *-*bug)
+- os=-coff
+- ;;
+- *-apple)
+- os=-macos
+- ;;
+- *-atari*)
+- os=-mint
+- ;;
+- *)
+- os=-none
+- ;;
+-esac
+-fi
+-
+-# Here we handle the case where we know the os, and the CPU type, but not the
+-# manufacturer. We pick the logical manufacturer.
+-vendor=unknown
+-case $basic_machine in
+- *-unknown)
+- case $os in
+- -riscix*)
+- vendor=acorn
+- ;;
+- -sunos*)
+- vendor=sun
+- ;;
+- -aix*)
+- vendor=ibm
+- ;;
+- -beos*)
+- vendor=be
+- ;;
+- -hpux*)
+- vendor=hp
+- ;;
+- -mpeix*)
+- vendor=hp
+- ;;
+- -hiux*)
+- vendor=hitachi
+- ;;
+- -unos*)
+- vendor=crds
+- ;;
+- -dgux*)
+- vendor=dg
+- ;;
+- -luna*)
+- vendor=omron
+- ;;
+- -genix*)
+- vendor=ns
+- ;;
+- -mvs*)
+- vendor=ibm
+- ;;
+- -ptx*)
+- vendor=sequent
+- ;;
+- -vxsim* | -vxworks*)
+- vendor=wrs
+- ;;
+- -aux*)
+- vendor=apple
+- ;;
+- -hms*)
+- vendor=hitachi
+- ;;
+- -mpw* | -macos*)
+- vendor=apple
+- ;;
+- -*mint | -*MiNT)
+- vendor=atari
+- ;;
+- esac
+- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+- ;;
+-esac
+-
+-echo $basic_machine$os
+diff -urNd -urNd patch-2.5.4/configure patch-2.5.9/configure
+--- patch-2.5.4/configure 1999-08-30 02:44:34.000000000 -0400
++++ patch-2.5.9/configure 2003-05-19 02:50:21.000000000 -0400
+@@ -1,28 +1,326 @@
+ #! /bin/sh
+-
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated automatically using autoconf version 2.13
+-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
++# Generated by GNU Autoconf 2.57 for patch 2.5.9.
+ #
++# Report bugs to <bug-patch@gnu.org>.
++#
++# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
++# Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
+
+-# Defaults:
+-ac_help=
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
++ set -o posix
++fi
++
++# Support unset when possible.
++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# Work around bugs in pre-3.0 UWIN ksh.
++$as_unset ENV MAIL MAILPATH
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ $as_unset $as_var
++ fi
++done
++
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
++
++
++# Name of the executable.
++as_me=`$as_basename "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)$' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
++ /^X\/\(\/\/\)$/{ s//\1/; q; }
++ /^X\/\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++
++
++# PATH needs CR, and LINENO needs CR and PATH.
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++
++ ;;
++ esac
++ # We did not find ourselves, most probably we were run as `sh COMMAND'
++ # in which case we are not to be found in the path.
++ if test "x$as_myself" = x; then
++ as_myself=$0
++ fi
++ if test ! -f "$as_myself"; then
++ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, and appends trailing '-' during
++ # substitution so that $LINENO is not a special case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\n,,
++ ' >$as_me.lineno &&
++ chmod +x $as_me.lineno ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ # We could just check for DJGPP; but this test a) works b) is more generic
++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
++ if test -f conf$$.exe; then
++ # Don't use ln at all; we don't have any links
++ as_ln_s='cp -p'
++ else
++ as_ln_s='ln -s'
++ fi
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.file
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ as_mkdir_p=false
++fi
++
++as_executable_p="test -f"
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.
++as_nl='
++'
++IFS=" $as_nl"
++
++# CDPATH.
++$as_unset CDPATH
++
++
++# Name of the host.
++# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# so uname gets run too.
++ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
++
++exec 6>&1
++
++#
++# Initializations.
++#
+ ac_default_prefix=/usr/local
+-# Any additions from configure.in:
+-ac_help="$ac_help
+- --disable-largefile omit support for large files"
++ac_config_libobj_dir=.
++cross_compiling=no
++subdirs=
++MFLAGS=
++MAKEFLAGS=
++SHELL=${CONFIG_SHELL-/bin/sh}
++
++# Maximum number of lines to put in a shell here document.
++# This variable seems obsolete. It should probably be removed, and
++# only ac_max_sed_lines should be used.
++: ${ac_max_here_lines=38}
++
++# Identity of this package.
++PACKAGE_NAME='patch'
++PACKAGE_TARNAME='patch'
++PACKAGE_VERSION='2.5.9'
++PACKAGE_STRING='patch 2.5.9'
++PACKAGE_BUGREPORT='bug-patch@gnu.org'
++
++ac_unique_file="patch.c"
++# Factoring default headers for most tests.
++ac_includes_default="\
++#include <stdio.h>
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++#if STDC_HEADERS
++# include <stdlib.h>
++# include <stddef.h>
++#else
++# if HAVE_STDLIB_H
++# include <stdlib.h>
++# endif
++#endif
++#if HAVE_STRING_H
++# if !STDC_HEADERS && HAVE_MEMORY_H
++# include <memory.h>
++# endif
++# include <string.h>
++#endif
++#if HAVE_STRINGS_H
++# include <strings.h>
++#endif
++#if HAVE_INTTYPES_H
++# include <inttypes.h>
++#else
++# if HAVE_STDINT_H
++# include <stdint.h>
++# endif
++#endif
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif"
++
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 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'
++ac_subst_files=''
+
+ # Initialize some variables set by options.
++ac_init_help=
++ac_init_version=false
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+-build=NONE
+-cache_file=./config.cache
++cache_file=/dev/null
+ exec_prefix=NONE
+-host=NONE
+ no_create=
+-nonopt=NONE
+ no_recursion=
+ prefix=NONE
+ program_prefix=NONE
+@@ -31,10 +329,15 @@
+ silent=
+ site=
+ srcdir=
+-target=NONE
+ verbose=
+ x_includes=NONE
+ x_libraries=NONE
++
++# Installation directory options.
++# These are left unexpanded so users can "make install exec_prefix=/foo"
++# and all the variables that are supposed to be based on exec_prefix
++# by default will actually change.
++# Use braces instead of parens because sh, perl, etc. also accept them.
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+@@ -48,17 +351,9 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
+-# Initialize some other variables.
+-subdirs=
+-MFLAGS= MAKEFLAGS=
+-SHELL=${CONFIG_SHELL-/bin/sh}
+-# Maximum number of lines to put in a shell here document.
+-ac_max_here_lines=12
+-
+ ac_prev=
+ for ac_option
+ do
+-
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+@@ -66,59 +361,59 @@
+ continue
+ fi
+
+- case "$ac_option" in
+- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+- *) ac_optarg= ;;
+- esac
++ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+- case "$ac_option" in
++ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+- bindir="$ac_optarg" ;;
++ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+- ac_prev=build ;;
++ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+- build="$ac_optarg" ;;
++ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+- cache_file="$ac_optarg" ;;
++ cache_file=$ac_optarg ;;
++
++ --config-cache | -C)
++ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+- datadir="$ac_optarg" ;;
++ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
++ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+- fi
+- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+- eval "enable_${ac_feature}=no" ;;
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
++ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+- fi
+- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+- case "$ac_option" in
+- *=*) ;;
++ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
++ { (exit 1); exit 1; }; }
++ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
++ case $ac_option in
++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+- eval "enable_${ac_feature}='$ac_optarg'" ;;
++ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+@@ -127,95 +422,47 @@
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+- exec_prefix="$ac_optarg" ;;
++ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+- -help | --help | --hel | --he)
+- # Omit some internal or obsolete options to make the list less imposing.
+- # This message is too long to be a string in the A/UX 3.1 sh.
+- cat << EOF
+-Usage: configure [options] [host]
+-Options: [defaults in brackets after descriptions]
+-Configuration:
+- --cache-file=FILE cache test results in FILE
+- --help print this message
+- --no-create do not create output files
+- --quiet, --silent do not print \`checking...' messages
+- --version print the version of autoconf that created configure
+-Directory and file names:
+- --prefix=PREFIX install architecture-independent files in PREFIX
+- [$ac_default_prefix]
+- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+- [same as prefix]
+- --bindir=DIR user executables in DIR [EPREFIX/bin]
+- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+- --datadir=DIR read-only architecture-independent data in DIR
+- [PREFIX/share]
+- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+- --sharedstatedir=DIR modifiable architecture-independent data in DIR
+- [PREFIX/com]
+- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+- --includedir=DIR C header files in DIR [PREFIX/include]
+- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+- --infodir=DIR info documentation in DIR [PREFIX/info]
+- --mandir=DIR man documentation in DIR [PREFIX/man]
+- --srcdir=DIR find the sources in DIR [configure dir or ..]
+- --program-prefix=PREFIX prepend PREFIX to installed program names
+- --program-suffix=SUFFIX append SUFFIX to installed program names
+- --program-transform-name=PROGRAM
+- run sed PROGRAM on installed program names
+-EOF
+- cat << EOF
+-Host type:
+- --build=BUILD configure for building on BUILD [BUILD=HOST]
+- --host=HOST configure for HOST [guessed]
+- --target=TARGET configure for TARGET [TARGET=HOST]
+-Features and packages:
+- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+- --x-includes=DIR X include files are in DIR
+- --x-libraries=DIR X library files are in DIR
+-EOF
+- if test -n "$ac_help"; then
+- echo "--enable and --with options recognized:$ac_help"
+- fi
+- exit 0 ;;
++ -help | --help | --hel | --he | -h)
++ ac_init_help=long ;;
++ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
++ ac_init_help=recursive ;;
++ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
++ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+- ac_prev=host ;;
++ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+- host="$ac_optarg" ;;
++ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+- includedir="$ac_optarg" ;;
++ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+- infodir="$ac_optarg" ;;
++ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+- libdir="$ac_optarg" ;;
++ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+- libexecdir="$ac_optarg" ;;
++ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+@@ -224,19 +471,19 @@
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+- localstatedir="$ac_optarg" ;;
++ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+- mandir="$ac_optarg" ;;
++ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+- | --no-cr | --no-c)
++ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+@@ -250,26 +497,26 @@
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+- oldincludedir="$ac_optarg" ;;
++ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+- prefix="$ac_optarg" ;;
++ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+- program_prefix="$ac_optarg" ;;
++ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+- program_suffix="$ac_optarg" ;;
++ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+@@ -286,7 +533,7 @@
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+- program_transform_name="$ac_optarg" ;;
++ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+@@ -296,7 +543,7 @@
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+- sbindir="$ac_optarg" ;;
++ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+@@ -307,58 +554,57 @@
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+- sharedstatedir="$ac_optarg" ;;
++ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+- site="$ac_optarg" ;;
++ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+- srcdir="$ac_optarg" ;;
++ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+- sysconfdir="$ac_optarg" ;;
++ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+- ac_prev=target ;;
++ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+- target="$ac_optarg" ;;
++ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+- -version | --version | --versio | --versi | --vers)
+- echo "configure generated by autoconf version 2.13"
+- exit 0 ;;
++ -version | --version | --versio | --versi | --vers | -V)
++ ac_init_version=: ;;
+
+ -with-* | --with-*)
+- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
++ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+- fi
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+- case "$ac_option" in
+- *=*) ;;
++ case $ac_option in
++ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+- eval "with_${ac_package}='$ac_optarg'" ;;
++ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
++ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+- fi
+- ac_package=`echo $ac_package| sed 's/-/_/g'`
+- eval "with_${ac_package}=no" ;;
++ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid package name: $ac_package" >&2
++ { (exit 1); exit 1; }; }
++ ac_package=`echo $ac_package | sed 's/-/_/g'`
++ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+@@ -369,99 +615,110 @@
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+- x_includes="$ac_optarg" ;;
++ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+- x_libraries="$ac_optarg" ;;
++ x_libraries=$ac_optarg ;;
+
+- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
++ -*) { echo "$as_me: error: unrecognized option: $ac_option
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; }
+ ;;
+
++ *=*)
++ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
++ # Reject names that are not valid shell variable names.
++ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
++ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
++ { (exit 1); exit 1; }; }
++ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
++ eval "$ac_envvar='$ac_optarg'"
++ export $ac_envvar ;;
++
+ *)
+- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+- echo "configure: warning: $ac_option: invalid host type" 1>&2
+- fi
+- if test "x$nonopt" != xNONE; then
+- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+- fi
+- nonopt="$ac_option"
++ # FIXME: should be removed in autoconf 3.0.
++ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
++ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+ done
+
+ if test -n "$ac_prev"; then
+- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+-fi
+-
+-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+-
+-# File descriptor usage:
+-# 0 standard input
+-# 1 file creation
+-# 2 errors and warnings
+-# 3 some systems may open it to /dev/tty
+-# 4 used on the Kubota Titan
+-# 6 checking for... messages and results
+-# 5 compiler messages saved in config.log
+-if test "$silent" = yes; then
+- exec 6>/dev/null
+-else
+- exec 6>&1
++ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
++ { echo "$as_me: error: missing argument to $ac_option" >&2
++ { (exit 1); exit 1; }; }
+ fi
+-exec 5>./config.log
+
+-echo "\
+-This file contains any messages produced by compilers while
+-running configure, to aid debugging if configure makes a mistake.
+-" 1>&5
++# Be sure to have absolute paths.
++for ac_var in exec_prefix prefix
++do
++ eval ac_val=$`echo $ac_var`
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; };;
++ esac
++done
+
+-# Strip out --no-create and --no-recursion so they do not pile up.
+-# Also quote any args containing shell metacharacters.
+-ac_configure_args=
+-for ac_arg
++# Be sure to have absolute paths.
++for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
++ localstatedir libdir includedir oldincludedir infodir mandir
+ do
+- case "$ac_arg" in
+- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+- | --no-cr | --no-c) ;;
+- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
++ eval ac_val=$`echo $ac_var`
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* ) ;;
++ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; };;
+ esac
+ done
+
+-# NLS nuisances.
+-# Only set these to C if already set. These must not be set unconditionally
+-# because not all systems understand e.g. LANG=C (notably SCO).
+-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+-# Non-C LC_CTYPE values break the ctype check.
+-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
++# There might be people who depend on the old broken behavior: `$host'
++# used to hold the argument of --host etc.
++# FIXME: To remove some day.
++build=$build_alias
++host=$host_alias
++target=$target_alias
+
+-# confdefs.h avoids OS command line length limits that DEFS can exceed.
+-rm -rf conftest* confdefs.h
+-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+-echo > confdefs.h
++# FIXME: To remove some day.
++if test "x$host_alias" != x; then
++ if test "x$build_alias" = x; then
++ cross_compiling=maybe
++ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
++ If a cross compiler is detected then cross compile mode will be used." >&2
++ elif test "x$build_alias" != "x$host_alias"; then
++ cross_compiling=yes
++ fi
++fi
++
++ac_tool_prefix=
++test -n "$host_alias" && ac_tool_prefix=$host_alias-
++
++test "$silent" = yes && exec 6>/dev/null
+
+-# A filename unique to this package, relative to the directory that
+-# configure is in, which we can look for to find out if srcdir is correct.
+-ac_unique_file=patch.c
+
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+- ac_prog=$0
+- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
++ ac_confdir=`(dirname "$0") 2>/dev/null ||
++$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$0" : 'X\(//\)[^/]' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$0" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+@@ -471,13 +728,437 @@
+ fi
+ if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
++ { (exit 1); exit 1; }; }
+ else
+- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
++ { (exit 1); exit 1; }; }
+ fi
+ fi
+-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
++(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
++ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
++ { (exit 1); exit 1; }; }
++srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
++ac_env_build_alias_set=${build_alias+set}
++ac_env_build_alias_value=$build_alias
++ac_cv_env_build_alias_set=${build_alias+set}
++ac_cv_env_build_alias_value=$build_alias
++ac_env_host_alias_set=${host_alias+set}
++ac_env_host_alias_value=$host_alias
++ac_cv_env_host_alias_set=${host_alias+set}
++ac_cv_env_host_alias_value=$host_alias
++ac_env_target_alias_set=${target_alias+set}
++ac_env_target_alias_value=$target_alias
++ac_cv_env_target_alias_set=${target_alias+set}
++ac_cv_env_target_alias_value=$target_alias
++ac_env_CC_set=${CC+set}
++ac_env_CC_value=$CC
++ac_cv_env_CC_set=${CC+set}
++ac_cv_env_CC_value=$CC
++ac_env_CFLAGS_set=${CFLAGS+set}
++ac_env_CFLAGS_value=$CFLAGS
++ac_cv_env_CFLAGS_set=${CFLAGS+set}
++ac_cv_env_CFLAGS_value=$CFLAGS
++ac_env_LDFLAGS_set=${LDFLAGS+set}
++ac_env_LDFLAGS_value=$LDFLAGS
++ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
++ac_cv_env_LDFLAGS_value=$LDFLAGS
++ac_env_CPPFLAGS_set=${CPPFLAGS+set}
++ac_env_CPPFLAGS_value=$CPPFLAGS
++ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
++ac_cv_env_CPPFLAGS_value=$CPPFLAGS
++ac_env_CPP_set=${CPP+set}
++ac_env_CPP_value=$CPP
++ac_cv_env_CPP_set=${CPP+set}
++ac_cv_env_CPP_value=$CPP
++
++#
++# Report the --help message.
++#
++if test "$ac_init_help" = "long"; then
++ # Omit some internal or obsolete options to make the list less imposing.
++ # This message is too long to be a string in the A/UX 3.1 sh.
++ cat <<_ACEOF
++\`configure' configures patch 2.5.9 to adapt to many kinds of systems.
++
++Usage: $0 [OPTION]... [VAR=VALUE]...
++
++To assign environment variables (e.g., CC, CFLAGS...), specify them as
++VAR=VALUE. See below for descriptions of some of the useful variables.
++
++Defaults for the options are specified in brackets.
++
++Configuration:
++ -h, --help display this help and exit
++ --help=short display options specific to this package
++ --help=recursive display the short help of all the included packages
++ -V, --version display version information and exit
++ -q, --quiet, --silent do not print \`checking...' messages
++ --cache-file=FILE cache test results in FILE [disabled]
++ -C, --config-cache alias for \`--cache-file=config.cache'
++ -n, --no-create do not create output files
++ --srcdir=DIR find the sources in DIR [configure dir or \`..']
++
++_ACEOF
++
++ cat <<_ACEOF
++Installation directories:
++ --prefix=PREFIX install architecture-independent files in PREFIX
++ [$ac_default_prefix]
++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
++ [PREFIX]
++
++By default, \`make install' will install all the files in
++\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
++an installation prefix other than \`$ac_default_prefix' using \`--prefix',
++for instance \`--prefix=\$HOME'.
++
++For better control, use the options below.
++
++Fine tuning of the installation directories:
++ --bindir=DIR user executables [EPREFIX/bin]
++ --sbindir=DIR system admin executables [EPREFIX/sbin]
++ --libexecdir=DIR program executables [EPREFIX/libexec]
++ --datadir=DIR read-only architecture-independent data [PREFIX/share]
++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
++ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --libdir=DIR object code libraries [EPREFIX/lib]
++ --includedir=DIR C header files [PREFIX/include]
++ --oldincludedir=DIR C header files for non-gcc [/usr/include]
++ --infodir=DIR info documentation [PREFIX/info]
++ --mandir=DIR man documentation [PREFIX/man]
++_ACEOF
++
++ cat <<\_ACEOF
++
++Program names:
++ --program-prefix=PREFIX prepend PREFIX to installed program names
++ --program-suffix=SUFFIX append SUFFIX to installed program names
++ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
++_ACEOF
++fi
++
++if test -n "$ac_init_help"; then
++ case $ac_init_help in
++ short | recursive ) echo "Configuration of patch 2.5.9:";;
++ esac
++ cat <<\_ACEOF
++
++Optional Features:
++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
++ --disable-largefile omit support for large files
++
++Some influential environment variables:
++ CC C compiler command
++ CFLAGS C compiler flags
++ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
++ nonstandard directory <lib dir>
++ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
++ headers in a nonstandard directory <include dir>
++ CPP C preprocessor
++
++Use these variables to override the choices made by `configure' or to help
++it to find libraries and programs with nonstandard names/locations.
++
++Report bugs to <bug-patch@gnu.org>.
++_ACEOF
++fi
++
++if test "$ac_init_help" = "recursive"; then
++ # If there are subdirs, report their specific --help.
++ ac_popdir=`pwd`
++ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
++ test -d $ac_dir || continue
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A "../" for each directory in $ac_dir_suffix.
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
++else
++ ac_dir_suffix= ac_top_builddir=
++fi
++
++case $srcdir in
++ .) # No --srcdir option. We are building in place.
++ ac_srcdir=.
++ if test -z "$ac_top_builddir"; then
++ ac_top_srcdir=.
++ else
++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
++ fi ;;
++ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir ;;
++ *) # Relative path.
++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++esac
++# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
++# absolute.
++ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
++ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
++ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
++ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
++
++ cd $ac_dir
++ # Check for guested configure; otherwise get Cygnus style configure.
++ if test -f $ac_srcdir/configure.gnu; then
++ echo
++ $SHELL $ac_srcdir/configure.gnu --help=recursive
++ elif test -f $ac_srcdir/configure; then
++ echo
++ $SHELL $ac_srcdir/configure --help=recursive
++ elif test -f $ac_srcdir/configure.ac ||
++ test -f $ac_srcdir/configure.in; then
++ echo
++ $ac_configure --help
++ else
++ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++ fi
++ cd $ac_popdir
++ done
++fi
++
++test -n "$ac_init_help" && exit 0
++if $ac_init_version; then
++ cat <<\_ACEOF
++patch configure 2.5.9
++generated by GNU Autoconf 2.57
++
++Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
++Free Software Foundation, Inc.
++This configure script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it.
++_ACEOF
++ exit 0
++fi
++exec 5>config.log
++cat >&5 <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
++
++It was created by patch $as_me 2.5.9, which was
++generated by GNU Autoconf 2.57. Invocation command line was
++
++ $ $0 $@
++
++_ACEOF
++{
++cat <<_ASUNAME
++## --------- ##
++## Platform. ##
++## --------- ##
++
++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
++
++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
++hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
++
++_ASUNAME
++
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ echo "PATH: $as_dir"
++done
++
++} >&5
++
++cat >&5 <<_ACEOF
++
++
++## ----------- ##
++## Core tests. ##
++## ----------- ##
++
++_ACEOF
++
++
++# Keep a trace of the command line.
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Strip out --silent because we don't want to record it for future runs.
++# Also quote any args containing shell meta-characters.
++# Make two passes to allow for proper duplicate-argument suppression.
++ac_configure_args=
++ac_configure_args0=
++ac_configure_args1=
++ac_sep=
++ac_must_keep_next=false
++for ac_pass in 1 2
++do
++ for ac_arg
++ do
++ case $ac_arg in
++ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil)
++ continue ;;
++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
++ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ esac
++ case $ac_pass in
++ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++ 2)
++ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++ if test $ac_must_keep_next = true; then
++ ac_must_keep_next=false # Got value, back to normal.
++ else
++ case $ac_arg in
++ *=* | --config-cache | -C | -disable-* | --disable-* \
++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
++ | -with-* | --with-* | -without-* | --without-* | --x)
++ case "$ac_configure_args0 " in
++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
++ esac
++ ;;
++ -* ) ac_must_keep_next=true ;;
++ esac
++ fi
++ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
++ # Get rid of the leading space.
++ ac_sep=" "
++ ;;
++ esac
++ done
++done
++$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
++$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
++
++# When interrupted or exit'd, cleanup temporary files, and complete
++# config.log. We remove comments because anyway the quotes in there
++# would cause problems or look ugly.
++# WARNING: Be sure not to use single quotes in there, as some shells,
++# such as our DU 5.0 friend, will then `close' the trap.
++trap 'exit_status=$?
++ # Save into config.log some information that might help in debugging.
++ {
++ echo
++
++ cat <<\_ASBOX
++## ---------------- ##
++## Cache variables. ##
++## ---------------- ##
++_ASBOX
++ echo
++ # The following way of writing the cache mishandles newlines in values,
++{
++ (set) 2>&1 |
++ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
++ *ac_space=\ *)
++ sed -n \
++ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
++ ;;
++ *)
++ sed -n \
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ ;;
++ esac;
++}
++ echo
++
++ cat <<\_ASBOX
++## ----------------- ##
++## Output variables. ##
++## ----------------- ##
++_ASBOX
++ echo
++ for ac_var in $ac_subst_vars
++ do
++ eval ac_val=$`echo $ac_var`
++ echo "$ac_var='"'"'$ac_val'"'"'"
++ done | sort
++ echo
++
++ if test -n "$ac_subst_files"; then
++ cat <<\_ASBOX
++## ------------- ##
++## Output files. ##
++## ------------- ##
++_ASBOX
++ echo
++ for ac_var in $ac_subst_files
++ do
++ eval ac_val=$`echo $ac_var`
++ echo "$ac_var='"'"'$ac_val'"'"'"
++ done | sort
++ echo
++ fi
++
++ if test -s confdefs.h; then
++ cat <<\_ASBOX
++## ----------- ##
++## confdefs.h. ##
++## ----------- ##
++_ASBOX
++ echo
++ sed "/^$/d" confdefs.h | sort
++ echo
++ fi
++ test "$ac_signal" != 0 &&
++ echo "$as_me: caught signal $ac_signal"
++ echo "$as_me: exit $exit_status"
++ } >&5
++ rm -f core core.* *.core &&
++ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++ exit $exit_status
++ ' 0
++for ac_signal in 1 2 13 15; do
++ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++done
++ac_signal=0
++
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -rf conftest* confdefs.h
++# AIX cpp loses on an empty file, so make sure it contains at least a newline.
++echo >confdefs.h
++
++# Predefined preprocessor variables.
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_NAME "$PACKAGE_NAME"
++_ACEOF
+
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_VERSION "$PACKAGE_VERSION"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_STRING "$PACKAGE_STRING"
++_ACEOF
++
++
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
++_ACEOF
++
++
++# Let the site file select an alternate cache file if it wants to.
+ # Prefer explicitly selected file to automatically selected ones.
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+@@ -488,321 +1169,767 @@
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+- echo "loading site script $ac_site_file"
++ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
++echo "$as_me: loading site script $ac_site_file" >&6;}
++ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+ done
+
+ if test -r "$cache_file"; then
+- echo "loading cache $cache_file"
+- . $cache_file
++ # Some versions of bash will fail to source /dev/null (special
++ # files actually), so we avoid doing that.
++ if test -f "$cache_file"; then
++ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
++echo "$as_me: loading cache $cache_file" >&6;}
++ case $cache_file in
++ [\\/]* | ?:[\\/]* ) . $cache_file;;
++ *) . ./$cache_file;;
++ esac
++ fi
+ else
+- echo "creating cache $cache_file"
+- > $cache_file
++ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
++echo "$as_me: creating cache $cache_file" >&6;}
++ >$cache_file
++fi
++
++# Check that the precious variables saved in the cache have kept the same
++# value.
++ac_cache_corrupted=false
++for ac_var in `(set) 2>&1 |
++ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++ eval ac_old_set=\$ac_cv_env_${ac_var}_set
++ eval ac_new_set=\$ac_env_${ac_var}_set
++ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
++ eval ac_new_val="\$ac_env_${ac_var}_value"
++ case $ac_old_set,$ac_new_set in
++ set,)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,set)
++ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
++echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++ ac_cache_corrupted=: ;;
++ ,);;
++ *)
++ if test "x$ac_old_val" != "x$ac_new_val"; then
++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
++echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
++echo "$as_me: former value: $ac_old_val" >&2;}
++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
++echo "$as_me: current value: $ac_new_val" >&2;}
++ ac_cache_corrupted=:
++ fi;;
++ esac
++ # Pass precious variables to config.status.
++ if test "$ac_new_set" = set; then
++ case $ac_new_val in
++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
++ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *) ac_arg=$ac_var=$ac_new_val ;;
++ esac
++ case " $ac_configure_args " in
++ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
++ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++ esac
++ fi
++done
++if $ac_cache_corrupted; then
++ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
++echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
++echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+
+ ac_ext=c
+-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cc_cross
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+-ac_exeext=
+-ac_objext=o
+-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+- ac_n= ac_c='
+-' ac_t=' '
+- else
+- ac_n=-n ac_c= ac_t=
+- fi
+-else
+- ac_n= ac_c='\c' ac_t=
+-fi
+
+
+
+-if test "$program_transform_name" = s,x,x,; then
+- program_transform_name=
+-else
+- # Double any \ or $. echo might interpret backslashes.
+- cat <<\EOF_SED > conftestsed
+-s,\\,\\\\,g; s,\$,$$,g
+-EOF_SED
+- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+- rm -f conftestsed
+-fi
+-test "$program_prefix" != NONE &&
+- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+-# Use a double $ so make ignores it.
+-test "$program_suffix" != NONE &&
+- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+-# sed with no file args requires a program.
+-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+-ac_aux_dir=
+-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+- if test -f $ac_dir/install-sh; then
+- ac_aux_dir=$ac_dir
+- ac_install_sh="$ac_aux_dir/install-sh -c"
+- break
+- elif test -f $ac_dir/install.sh; then
+- ac_aux_dir=$ac_dir
+- ac_install_sh="$ac_aux_dir/install.sh -c"
+- break
+- fi
+-done
+-if test -z "$ac_aux_dir"; then
+- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+-fi
+-ac_config_guess=$ac_aux_dir/config.guess
+-ac_config_sub=$ac_aux_dir/config.sub
+-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+-# Make sure we can run config.sub.
+-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+-fi
+
+-echo $ac_n "checking host system type""... $ac_c" 1>&6
+-echo "configure:573: checking host system type" >&5
+
+-host_alias=$host
+-case "$host_alias" in
+-NONE)
+- case $nonopt in
+- NONE)
+- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+- fi ;;
+- *) host_alias=$nonopt ;;
+- esac ;;
+-esac
+
+-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+-echo "$ac_t""$host" 1>&6
+
+
+-PACKAGE=patch
+-VERSION=2.5.4
+
+
+
+-# Extract the first word of "gcc", so it can be a program name with args.
++
++
++
++
++
++
++
++
++
++
++
++
++ ac_config_headers="$ac_config_headers config.h:config.hin"
++
++test "$program_prefix" != NONE &&
++ program_transform_name="s,^,$program_prefix,;$program_transform_name"
++# Use a double $ so make ignores it.
++test "$program_suffix" != NONE &&
++ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
++# Double any \ or $. echo might interpret backslashes.
++# By default was `s,x,x', remove it if useless.
++cat <<\_ACEOF >conftest.sed
++s/[\\$]/&&/g;s/;s,x,x,$//
++_ACEOF
++program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
++rm conftest.sed
++
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}gcc; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$CC"; then
++ ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_CC="${ac_tool_prefix}gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++fi
++if test -z "$ac_cv_prog_CC"; then
++ ac_ct_CC=$CC
++ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:602: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_CC="gcc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ CC=$ac_ct_CC
++else
++ CC="$ac_cv_prog_CC"
++fi
++
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++set dummy ${ac_tool_prefix}cc; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_prog_CC="gcc"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_CC="${ac_tool_prefix}cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
+ fi
+ fi
+-CC="$ac_cv_prog_CC"
++CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$ac_t""$CC" 1>&6
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
+
++fi
++if test -z "$ac_cv_prog_CC"; then
++ ac_ct_CC=$CC
++ # Extract the first word of "cc", so it can be a program name with args.
++set dummy cc; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_CC="cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ CC=$ac_ct_CC
++else
++ CC="$ac_cv_prog_CC"
++fi
++
++fi
+ if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:632: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+- ac_prog_rejected=yes
+- continue
+- fi
+- ac_cv_prog_CC="cc"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
++ ac_prog_rejected=yes
++ continue
++ fi
++ ac_cv_prog_CC="cc"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
+ if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+- if test $# -gt 0; then
++ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+- set dummy "$ac_dir/$ac_word" "$@"
+- shift
+- ac_cv_prog_CC="$@"
++ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+ fi
+ fi
+ fi
+-CC="$ac_cv_prog_CC"
++CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$ac_t""$CC" 1>&6
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
+
+- if test -z "$CC"; then
+- case "`uname -s`" in
+- *win32* | *WIN32*)
+- # Extract the first word of "cl", so it can be a program name with args.
+-set dummy cl; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:683: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++if test -z "$CC"; then
++ if test -n "$ac_tool_prefix"; then
++ for ac_prog in cl
++ do
++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_prog_CC="cl"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
+ fi
+ fi
+-CC="$ac_cv_prog_CC"
++CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$ac_t""$CC" 1>&6
++ echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
+- ;;
+- esac
++
++ test -n "$CC" && break
++ done
++fi
++if test -z "$CC"; then
++ ac_ct_CC=$CC
++ for ac_prog in cl
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_CC"; then
++ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_CC="$ac_prog"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
+ fi
+- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
++done
++done
++
++fi
++fi
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
+
+-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++ test -n "$ac_ct_CC" && break
++done
+
+-ac_ext=c
+-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cc_cross
++ CC=$ac_ct_CC
++fi
+
+-cat > conftest.$ac_ext << EOF
++fi
+
+-#line 726 "configure"
+-#include "confdefs.h"
+
+-main(){return(0);}
+-EOF
+-if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- ac_cv_prog_cc_works=yes
+- # If we can't run a trivial program, we are probably using a cross compiler.
+- if (./conftest; exit) 2>/dev/null; then
+- ac_cv_prog_cc_cross=no
++test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&5
++echo "$as_me: error: no acceptable C compiler found in \$PATH
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++
++# Provide some information about the compiler.
++echo "$as_me:$LINENO:" \
++ "checking for C compiler version" >&5
++ac_compiler=`set X $ac_compile; echo $2`
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
++ (eval $ac_compiler --version </dev/null >&5) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
++ (eval $ac_compiler -v </dev/null >&5) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
++ (eval $ac_compiler -V </dev/null >&5) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }
++
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files a.out a.exe b.out"
++# Try to create an executable without -o first, disregard a.out.
++# It will help us diagnose broken compilers, and finding out an intuition
++# of exeext.
++echo "$as_me:$LINENO: checking for C compiler default output" >&5
++echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
++ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
++ (eval $ac_link_default) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # Find the output, starting from the most likely. This scheme is
++# not robust to junk in `.', hence go to wildcards (a.*) only as a last
++# resort.
++
++# Be careful to initialize this variable, since it used to be cached.
++# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
++ac_cv_exeext=
++# b.out is created by i960 compilers.
++for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
++do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
++ ;;
++ conftest.$ac_ext )
++ # This is the source file.
++ ;;
++ [ab].out )
++ # We found the default executable, but exeext='' is most
++ # certainly right.
++ break;;
++ *.* )
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ # FIXME: I believe we export ac_cv_exeext for Libtool,
++ # but it would be cool to find out if it's true. Does anybody
++ # maintain Libtool? --akim.
++ export ac_cv_exeext
++ break;;
++ * )
++ break;;
++ esac
++done
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
++See \`config.log' for more details." >&5
++echo "$as_me: error: C compiler cannot create executables
++See \`config.log' for more details." >&2;}
++ { (exit 77); exit 77; }; }
++fi
++
++ac_exeext=$ac_cv_exeext
++echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6
++
++# Check the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++echo "$as_me:$LINENO: checking whether the C compiler works" >&5
++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
++# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
++# If not cross compiling, check that we can run a simple program.
++if test "$cross_compiling" != yes; then
++ if { ac_try='./$ac_file'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ cross_compiling=no
+ else
+- ac_cv_prog_cc_cross=yes
++ if test "$cross_compiling" = maybe; then
++ cross_compiling=yes
++ else
++ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++ fi
+ fi
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- ac_cv_prog_cc_works=no
+ fi
+-rm -fr conftest*
+-ac_ext=c
+-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-cross_compiling=$ac_cv_prog_cc_cross
++echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
+
+-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+-if test $ac_cv_prog_cc_works = no; then
+- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
++rm -f a.out a.exe conftest$ac_cv_exeext b.out
++ac_clean_files=$ac_clean_files_save
++# Check the compiler produces executables we can run. If not, either
++# the compiler is broken, or we cross compile.
++echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
++echo "$as_me:$LINENO: result: $cross_compiling" >&5
++echo "${ECHO_T}$cross_compiling" >&6
++
++echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ # If both `conftest.exe' and `conftest' are `present' (well, observable)
++# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
++# work properly (i.e., refer to `conftest.exe'), while it won't with
++# `rm'.
++for ac_file in conftest.exe conftest conftest.*; do
++ test -f "$ac_file" || continue
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
++ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ export ac_cv_exeext
++ break;;
++ * ) break;;
++ esac
++done
++else
++ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
+ fi
+-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+-cross_compiling=$ac_cv_prog_cc_cross
+
+-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+-echo "configure:762: checking whether we are using GNU C" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++rm -f conftest$ac_cv_exeext
++echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++echo "${ECHO_T}$ac_cv_exeext" >&6
++
++rm -f conftest.$ac_ext
++EXEEXT=$ac_cv_exeext
++ac_exeext=$EXEEXT
++echo "$as_me:$LINENO: checking for suffix of object files" >&5
++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
++if test "${ac_cv_objext+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.c <<EOF
+-#ifdef __GNUC__
+- yes;
+-#endif
+-EOF
+-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
+- ac_cv_prog_gcc=yes
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.o conftest.obj
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
++ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
++ break;;
++ esac
++done
+ else
+- ac_cv_prog_gcc=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&5
++echo "$as_me: error: cannot compute suffix of object files: cannot compile
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
+ fi
++
++rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
++echo "${ECHO_T}$ac_cv_objext" >&6
++OBJEXT=$ac_cv_objext
++ac_objext=$OBJEXT
++echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
++if test "${ac_cv_c_compiler_gnu+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+
+-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
++int
++main ()
++{
++#ifndef __GNUC__
++ choke me
++#endif
+
+-if test $ac_cv_prog_gcc = yes; then
+- GCC=yes
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_compiler_gnu=yes
+ else
+- GCC=
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_compiler_gnu=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+-ac_test_CFLAGS="${CFLAGS+set}"
+-ac_save_CFLAGS="$CFLAGS"
+-CFLAGS=
+-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+-echo "configure:790: checking whether ${CC-cc} accepts -g" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
++GCC=`test $ac_compiler_gnu = yes && echo yes`
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++CFLAGS="-g"
++echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
++if test "${ac_cv_prog_cc_g+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo 'void f(){}' > conftest.c
+-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+ else
+- ac_cv_prog_cc_g=no
+-fi
+-rm -f conftest*
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++ac_cv_prog_cc_g=no
+ fi
+-
+-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+ if test "$ac_test_CFLAGS" = set; then
+- CFLAGS="$ac_save_CFLAGS"
++ CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+@@ -816,86 +1943,482 @@
+ CFLAGS=
+ fi
+ fi
++echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
++echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
++if test "${ac_cv_prog_cc_stdc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_prog_cc_stdc=no
++ac_save_CC=$CC
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdarg.h>
++#include <stdio.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
++struct buf { int x; };
++FILE * (*rcsopen) (struct buf *, struct stat *, int);
++static char *e (p, i)
++ char **p;
++ int i;
++{
++ return p[i];
++}
++static char *f (char * (*g) (char **, int), char **p, ...)
++{
++ char *s;
++ va_list v;
++ va_start (v,p);
++ s = g (p, va_arg (v,int));
++ va_end (v);
++ return s;
++}
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
++int
++main ()
++{
++return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
++ ;
++ return 0;
++}
++_ACEOF
++# Don't try gcc -ansi; that turns off useful extensions and
++# breaks some systems' header files.
++# AIX -qlanglvl=ansi
++# Ultrix and OSF/1 -std1
++# HP-UX 10.20 and later -Ae
++# HP-UX older versions -Aa -D_HPUX_SOURCE
++# SVR4 -Xc -D__EXTENSIONS__
++for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++ CC="$ac_save_CC $ac_arg"
++ rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_prog_cc_stdc=$ac_arg
++break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:822: checking how to run the C preprocessor" >&5
++fi
++rm -f conftest.$ac_objext
++done
++rm -f conftest.$ac_ext conftest.$ac_objext
++CC=$ac_save_CC
++
++fi
++
++case "x$ac_cv_prog_cc_stdc" in
++ x|xno)
++ echo "$as_me:$LINENO: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6 ;;
++ *)
++ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
++ CC="$CC $ac_cv_prog_cc_stdc" ;;
++esac
++
++# Some people use a C++ compiler to compile C. Since we use `exit',
++# in C++ we need to declare it. In case someone uses the same compiler
++# for both compiling C and C++ we need to have the C++ compiler decide
++# the declaration of exit, since it's the most demanding environment.
++cat >conftest.$ac_ext <<_ACEOF
++#ifndef __cplusplus
++ choke me
++#endif
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ for ac_declaration in \
++ ''\
++ '#include <stdlib.h>' \
++ 'extern "C" void std::exit (int) throw (); using std::exit;' \
++ 'extern "C" void std::exit (int); using std::exit;' \
++ 'extern "C" void exit (int) throw ();' \
++ 'extern "C" void exit (int);' \
++ 'void exit (int);'
++do
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++$ac_declaration
++int
++main ()
++{
++exit (42);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++continue
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_declaration
++int
++main ()
++{
++exit (42);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++done
++rm -f conftest*
++if test -n "$ac_declaration"; then
++ echo '#ifdef __cplusplus' >>confdefs.h
++ echo $ac_declaration >>confdefs.h
++ echo '#endif' >>confdefs.h
++fi
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+ fi
+ if test -z "$CPP"; then
+-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++ if test "${ac_cv_prog_CPP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- # This must be in double quotes, not single quotes, because CPP may get
+- # substituted into the Makefile and "${CC-cc}" will confuse make.
+- CPP="${CC-cc} -E"
++ # Double quotes because CPP needs to be expanded
++ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
++ do
++ ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+- # not just through cpp.
+- cat > conftest.$ac_ext <<EOF
+-#line 837 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- :
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++ Syntax error
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- CPP="${CC-cc} -E -traditional-cpp"
+- cat > conftest.$ac_ext <<EOF
+-#line 854 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
+ :
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- CPP="${CC-cc} -nologo -E"
+- cat > conftest.$ac_ext <<EOF
+-#line 871 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- :
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether non-existent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <ac_nonexistent.h>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- CPP=/lib/cpp
++ ac_cpp_err=yes
+ fi
+-rm -f conftest*
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
+ fi
+-rm -f conftest*
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ break
+ fi
+-rm -f conftest*
+- ac_cv_prog_CPP="$CPP"
++
++ done
++ ac_cv_prog_CPP=$CPP
++
+ fi
+- CPP="$ac_cv_prog_CPP"
++ CPP=$ac_cv_prog_CPP
+ else
+- ac_cv_prog_CPP="$CPP"
++ ac_cv_prog_CPP=$CPP
+ fi
+-echo "$ac_t""$CPP" 1>&6
++echo "$as_me:$LINENO: result: $CPP" >&5
++echo "${ECHO_T}$CPP" >&6
++ac_preproc_ok=false
++for ac_c_preproc_warn_flag in '' yes
++do
++ # Use a header file that comes with gcc, so configuring glibc
++ # with a fresh cross-compiler works.
++ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ # <limits.h> exists even on freestanding compilers.
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp. "Syntax error" is here to catch this case.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++ Syntax error
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.$ac_ext
++
++ # OK, works on sane cases. Now check whether non-existent headers
++ # can be detected and how.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <ac_nonexistent.h>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ # Broken: success on invalid input.
++continue
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++rm -f conftest.err conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then
++ :
++else
++ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&5
++echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++ac_aux_dir=
++for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
++ if test -f $ac_dir/install-sh; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install-sh -c"
++ break
++ elif test -f $ac_dir/install.sh; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/install.sh -c"
++ break
++ elif test -f $ac_dir/shtool; then
++ ac_aux_dir=$ac_dir
++ ac_install_sh="$ac_aux_dir/shtool install -c"
++ break
++ fi
++done
++if test -z "$ac_aux_dir"; then
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
++echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
++ { (exit 1); exit 1; }; }
++fi
++ac_config_guess="$SHELL $ac_aux_dir/config.guess"
++ac_config_sub="$SHELL $ac_aux_dir/config.sub"
++ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+ # Find a good install program. We prefer a C program (faster),
+ # so one script is as good as another. But avoid the broken or
+@@ -904,87 +2427,102 @@
+ # SunOS /usr/etc/install
+ # IRIX /sbin/install
+ # AIX /bin/install
++# AmigaOS /C/install, which installs bootblocks on floppy discs
+ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+ # AFS /usr/afsws/bin/install, which mishandles nonexistent args
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # ./install, which can be erroneously created by make from ./install.sh.
+-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+-echo "configure:913: checking for a BSD compatible install" >&5
++echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+ if test -z "$INSTALL"; then
+-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++if test "${ac_cv_path_install+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+- for ac_dir in $PATH; do
+- # Account for people who put trailing slashes in PATH elements.
+- case "$ac_dir/" in
+- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+- *)
+- # OSF1 and SCO ODT 3.0 have their own names for install.
+- # Don't use installbsd from OSF since it installs stuff as root
+- # by default.
+- for ac_prog in ginstall scoinst install; do
+- if test -f $ac_dir/$ac_prog; then
+- if test $ac_prog = install &&
+- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+- # AIX install. It has an incompatible calling convention.
+- :
+- else
+- ac_cv_path_install="$ac_dir/$ac_prog -c"
+- break 2
+- fi
+- fi
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in
++ ./ | .// | /cC/* | \
++ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++ /usr/ucb/* ) ;;
++ *)
++ # OSF1 and SCO ODT 3.0 have their own names for install.
++ # Don't use installbsd from OSF since it installs stuff as root
++ # by default.
++ for ac_prog in ginstall scoinst install; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if test $ac_prog = install &&
++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # AIX install. It has an incompatible calling convention.
++ :
++ elif test $ac_prog = install &&
++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # program-specific install script used by HP pwplus--don't use.
++ :
++ else
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
++ fi
+ done
+- ;;
+- esac
+- done
+- IFS="$ac_save_IFS"
++ done
++ ;;
++esac
++done
++
+
+ fi
+ if test "${ac_cv_path_install+set}" = set; then
+- INSTALL="$ac_cv_path_install"
++ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+- INSTALL="$ac_install_sh"
++ INSTALL=$ac_install_sh
+ fi
+ fi
+-echo "$ac_t""$INSTALL" 1>&6
++echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6
+
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+-echo "configure:966: checking whether ${MAKE-make} sets \${MAKE}" >&5
+-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftestmake <<\EOF
++ cat >conftest.make <<\_ACEOF
+ all:
+- @echo 'ac_maketemp="${MAKE}"'
+-EOF
++ @echo 'ac_maketemp="$(MAKE)"'
++_ACEOF
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
++eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+ if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+ else
+ eval ac_cv_prog_make_${ac_make}_set=no
+ fi
+-rm -f conftestmake
++rm -f conftest.make
+ fi
+ if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
++ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+ fi
+
+@@ -992,625 +2530,1355 @@
+ # because <errno.h> reserves symbols starting with `E'.
+ # Extract the first word of "ed", so it can be a program name with args.
+ set dummy ed; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:997: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_path_ed_PROGRAM'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_path_ed_PROGRAM+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- case "$ed_PROGRAM" in
+- /*)
++ case $ed_PROGRAM in
++ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a path.
+ ;;
+- ?:/*)
+- ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a dos path.
+- ;;
+ *)
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_path_ed_PROGRAM="$ac_dir/$ac_word"
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_ed_PROGRAM="$as_dir/$ac_word$ac_exec_ext"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
+ test -z "$ac_cv_path_ed_PROGRAM" && ac_cv_path_ed_PROGRAM="ed"
+ ;;
+ esac
+ fi
+-ed_PROGRAM="$ac_cv_path_ed_PROGRAM"
++ed_PROGRAM=$ac_cv_path_ed_PROGRAM
++
+ if test -n "$ed_PROGRAM"; then
+- echo "$ac_t""$ed_PROGRAM" 1>&6
++ echo "$as_me:$LINENO: result: $ed_PROGRAM" >&5
++echo "${ECHO_T}$ed_PROGRAM" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
+
+
+-echo $ac_n "checking build system type""... $ac_c" 1>&6
+-echo "configure:1032: checking build system type" >&5
+
+-build_alias=$build
+-case "$build_alias" in
+-NONE)
+- case $nonopt in
+- NONE) build_alias=$host_alias ;;
+- *) build_alias=$nonopt ;;
+- esac ;;
+-esac
++cat >>confdefs.h <<\_ACEOF
++#define _GNU_SOURCE 1
++_ACEOF
+
+-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+-echo "$ac_t""$build" 1>&6
+
+-if test $host != $build; then
+- ac_tool_prefix=${host_alias}-
+-else
+- ac_tool_prefix=
+-fi
+
+
+- # Check whether --enable-largefile or --disable-largefile was given.
+-if test "${enable_largefile+set}" = set; then
+- enableval="$enable_largefile"
+- :
+-fi
+-
+- if test "$enable_largefile" != no; then
+- # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}getconf; ac_word=$2
+-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:1066: checking for $ac_word" >&5
+-if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- if test -n "$GETCONF"; then
+- ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
++echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6
++if test "${ac_cv_prog_egrep+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH"
+- for ac_dir in $ac_dummy; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/$ac_word; then
+- ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
+- break
++ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
++ then ac_cv_prog_egrep='grep -E'
++ else ac_cv_prog_egrep='egrep'
+ fi
+- done
+- IFS="$ac_save_ifs"
+- test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
+ fi
+-fi
+-GETCONF="$ac_cv_prog_GETCONF"
+-if test -n "$GETCONF"; then
+- echo "$ac_t""$GETCONF" 1>&6
++echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
++echo "${ECHO_T}$ac_cv_prog_egrep" >&6
++ EGREP=$ac_cv_prog_egrep
++
++
++
++echo "$as_me:$LINENO: checking for AIX" >&5
++echo $ECHO_N "checking for AIX... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#ifdef _AIX
++ yes
++#endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "yes" >/dev/null 2>&1; then
++ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++cat >>confdefs.h <<\_ACEOF
++#define _ALL_SOURCE 1
++_ACEOF
++
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
+ fi
++rm -f conftest*
+
+
++echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
++if test "${ac_cv_header_stdc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
+
+- echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
+-echo "configure:1096: checking for CFLAGS value to request large file support" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_stdc=yes
+ else
+- ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
+- ac_cv_sys_largefile_CFLAGS=no
+- case "$host_os" in
+- # IRIX 6.2 and later require cc -n32.
+- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
+- if test "$GCC" != yes; then
+- ac_cv_sys_largefile_CFLAGS=-n32
+- fi
+- ac_save_CC="$CC"
+- CC="$CC $ac_cv_sys_largefile_CFLAGS"
+- cat > conftest.$ac_ext <<EOF
+-#line 1111 "configure"
+-#include "confdefs.h"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-int main() {
++ac_cv_header_stdc=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <string.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_sys_largefile_CFLAGS=no
++ ac_cv_header_stdc=no
+ fi
+ rm -f conftest*
+- CC="$ac_save_CC"
+- esac
+- }
++
+ fi
+
+-echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
+- echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
+-echo "configure:1134: checking for LDFLAGS value to request large file support" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdlib.h>
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "free" >/dev/null 2>&1; then
++ :
+ else
+- ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
+- ac_cv_sys_largefile_LDFLAGS=no
+-
+- }
++ ac_cv_header_stdc=no
+ fi
++rm -f conftest*
+
+-echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
+- echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
+-echo "configure:1146: checking for LIBS value to request large file support" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
+- ac_cv_sys_largefile_LIBS=no
+-
+- }
+ fi
+
+-echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
++if test $ac_cv_header_stdc = yes; then
++ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
++ if test "$cross_compiling" = yes; then
++ :
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <ctype.h>
++#if ((' ' & 0x0FF) == 0x020)
++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
++#else
++# define ISLOWER(c) \
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
++#endif
+
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- no) ;;
+- -D_FILE_OFFSET_BITS=*) ;;
+- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
+- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
+- -D?* | -I?*)
+- case "$ac_flag" in
+- no) ;;
+- ?*)
+- case "$CPPFLAGS" in
+- '') CPPFLAGS="$ac_flag" ;;
+- *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
+- esac ;;
+- esac ;;
+- *)
+- case "$ac_flag" in
+- no) ;;
+- ?*)
+- case "$CFLAGS" in
+- '') CFLAGS="$ac_flag" ;;
+- *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
+- esac ;;
+- esac ;;
+- esac
+- done
+- case "$ac_cv_sys_largefile_LDFLAGS" in
+- no) ;;
+- ?*)
+- case "$LDFLAGS" in
+- '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
+- *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
+- esac ;;
+- esac
+- case "$ac_cv_sys_largefile_LIBS" in
+- no) ;;
+- ?*)
+- case "$LIBS" in
+- '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
+- *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
+- esac ;;
+- esac
+- echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
+-echo "configure:1201: checking for _FILE_OFFSET_BITS" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++ int i;
++ for (i = 0; i < 256; i++)
++ if (XOR (islower (i), ISLOWER (i))
++ || toupper (i) != TOUPPER (i))
++ exit(2);
++ exit (0);
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
+ else
+- ac_cv_sys_file_offset_bits=no
+- case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_file_offset_bits=64 ;;
+- esac
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- -D_FILE_OFFSET_BITS)
+- ac_cv_sys_file_offset_bits=1 ;;
+- -D_FILE_OFFSET_BITS=*)
+- ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+- esac
+- done
+-
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_header_stdc=no
+ fi
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6
++if test $ac_cv_header_stdc = yes; then
+
+-echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
+- if test "$ac_cv_sys_file_offset_bits" != no; then
+- cat >> confdefs.h <<EOF
+-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+-EOF
++cat >>confdefs.h <<\_ACEOF
++#define STDC_HEADERS 1
++_ACEOF
+
+- fi
+- echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
+-echo "configure:1230: checking for _LARGEFILE_SOURCE" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- ac_cv_sys_largefile_source=no
+- case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_largefile_source=1 ;;
+- esac
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- -D_LARGEFILE_SOURCE)
+- ac_cv_sys_largefile_source=1 ;;
+- -D_LARGEFILE_SOURCE=*)
+- ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+- esac
+- done
+-
+ fi
+
+-echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
+- if test "$ac_cv_sys_largefile_source" != no; then
+- cat >> confdefs.h <<EOF
+-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+-EOF
++# On IRIX 5.3, sys/types and inttypes.h are conflicting.
++
+
+- fi
+- echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
+-echo "configure:1259: checking for _LARGE_FILES" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- ac_cv_sys_large_files=no
+- case "$host_os" in
+- # AIX 4.2 and later
+- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+- ac_cv_sys_large_files=1 ;;
+- esac
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- -D_LARGE_FILES)
+- ac_cv_sys_large_files=1 ;;
+- -D_LARGE_FILES=*)
+- ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+- esac
+- done
+-
+-fi
+
+-echo "$ac_t""$ac_cv_sys_large_files" 1>&6
+- if test "$ac_cv_sys_large_files" != no; then
+- cat >> confdefs.h <<EOF
+-#define _LARGE_FILES $ac_cv_sys_large_files
+-EOF
+
+- fi
+- fi
+-
+
+-echo $ac_n "checking for AIX""... $ac_c" 1>&6
+-echo "configure:1291: checking for AIX" >&5
+-cat > conftest.$ac_ext <<EOF
+-#line 1293 "configure"
+-#include "confdefs.h"
+-#ifdef _AIX
+- yes
+-#endif
+
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "yes" >/dev/null 2>&1; then
+- rm -rf conftest*
+- echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
+-#define _ALL_SOURCE 1
+-EOF
+
++
++
++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++ inttypes.h stdint.h unistd.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- rm -rf conftest*
+- echo "$ac_t""no" 1>&6
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_Header=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+
++fi
+
+-ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
+-echo "configure:1316: checking for minix/config.h" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++done
++
++
++if test "${ac_cv_header_minix_config_h+set}" = set; then
++ echo "$as_me:$LINENO: checking for minix/config.h" >&5
++echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
++if test "${ac_cv_header_minix_config_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
++echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1321 "configure"
+-#include "confdefs.h"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking minix/config.h usability" >&5
++echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
+ #include <minix/config.h>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=yes"
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking minix/config.h presence" >&5
++echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <minix/config.h>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
+ fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for minix/config.h" >&5
++echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
++if test "${ac_cv_header_minix_config_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_minix_config_h=$ac_header_preproc
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
++echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
++
++fi
++if test $ac_cv_header_minix_config_h = yes; then
+ MINIX=yes
+ else
+- echo "$ac_t""no" 1>&6
+-MINIX=
++ MINIX=
+ fi
+
++
+ if test "$MINIX" = yes; then
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define _POSIX_SOURCE 1
+-EOF
++_ACEOF
+
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define _POSIX_1_SOURCE 2
+-EOF
++_ACEOF
+
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define _MINIX 1
+-EOF
++_ACEOF
+
+ fi
+
+-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+-echo "configure:1364: checking for POSIXized ISC" >&5
+-if test -d /etc/conf/kconfig.d &&
+- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+-then
+- echo "$ac_t""yes" 1>&6
+- ISC=yes # If later tests want to check for ISC.
+- cat >> confdefs.h <<\EOF
+-#define _POSIX_SOURCE 1
+-EOF
+
+- if test "$GCC" = yes; then
+- CC="$CC -posix"
+- else
+- CC="$CC -Xp"
+- fi
++echo "$as_me:$LINENO: checking for library containing strerror" >&5
++echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
++if test "${ac_cv_search_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo "$ac_t""no" 1>&6
+- ISC=
+-fi
++ ac_func_search_save_LIBS=$LIBS
++ac_cv_search_strerror=no
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+
+-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+-echo "configure:1385: checking for Cygwin environment" >&5
+-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char strerror ();
++int
++main ()
++{
++strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_strerror="none required"
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1390 "configure"
+-#include "confdefs.h"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-int main() {
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_strerror" = no; then
++ for ac_lib in cposix; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+
+-#ifndef __CYGWIN__
+-#define __CYGWIN__ __CYGWIN32__
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
+ #endif
+-return __CYGWIN__;
+-; return 0; }
+-EOF
+-if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- ac_cv_cygwin=yes
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char strerror ();
++int
++main ()
++{
++strerror ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_strerror="-l$ac_lib"
++break
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_cygwin=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
+ fi
+-rm -f conftest*
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
+ fi
++LIBS=$ac_func_search_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
++echo "${ECHO_T}$ac_cv_search_strerror" >&6
++if test "$ac_cv_search_strerror" != no; then
++ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+-echo "$ac_t""$ac_cv_cygwin" 1>&6
+-CYGWIN=
+-test "$ac_cv_cygwin" = yes && CYGWIN=yes
+-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+-echo "configure:1418: checking for mingw32 environment" >&5
+-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++
++# Check whether --enable-largefile or --disable-largefile was given.
++if test "${enable_largefile+set}" = set; then
++ enableval="$enable_largefile"
++
++fi;
++if test "$enable_largefile" != no; then
++
++ echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
++echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
++if test "${ac_cv_sys_largefile_CC+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1423 "configure"
+-#include "confdefs.h"
++ ac_cv_sys_largefile_CC=no
++ if test "$GCC" != yes; then
++ ac_save_CC=$CC
++ while :; do
++ # IRIX 6.2 and later do not support large files by default,
++ # so use the C compiler's -n32 option if that helps.
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++ We can't simply define LARGE_OFF_T to be 9223372036854775807,
++ since some C++ compilers masquerading as C compilers
++ incorrectly reject 9223372036854775807. */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++ && LARGE_OFF_T % 2147483647 == 1)
++ ? 1 : -1];
++int
++main ()
++{
+
+-int main() {
+-return __MINGW32__;
+-; return 0; }
+-EOF
+-if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- ac_cv_mingw32=yes
++ ;
++ return 0;
++}
++_ACEOF
++ rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ break
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_mingw32=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext
++ CC="$CC -n32"
++ rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sys_largefile_CC=' -n32'; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext
++ break
++ done
++ CC=$ac_save_CC
++ rm -f conftest.$ac_ext
++ fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
++echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
++ if test "$ac_cv_sys_largefile_CC" != no; then
++ CC=$CC$ac_cv_sys_largefile_CC
++ fi
++
++ echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
++echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
++if test "${ac_cv_sys_file_offset_bits+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ while :; do
++ ac_cv_sys_file_offset_bits=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++ We can't simply define LARGE_OFF_T to be 9223372036854775807,
++ since some C++ compilers masquerading as C compilers
++ incorrectly reject 9223372036854775807. */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++ && LARGE_OFF_T % 2147483647 == 1)
++ ? 1 : -1];
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#define _FILE_OFFSET_BITS 64
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++ We can't simply define LARGE_OFF_T to be 9223372036854775807,
++ since some C++ compilers masquerading as C compilers
++ incorrectly reject 9223372036854775807. */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++ && LARGE_OFF_T % 2147483647 == 1)
++ ? 1 : -1];
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sys_file_offset_bits=64; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ break
++done
++fi
++echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
++echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
++if test "$ac_cv_sys_file_offset_bits" != no; then
++
++cat >>confdefs.h <<_ACEOF
++#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
++_ACEOF
++
+ fi
+ rm -f conftest*
++ echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
++echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
++if test "${ac_cv_sys_large_files+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ while :; do
++ ac_cv_sys_large_files=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++ We can't simply define LARGE_OFF_T to be 9223372036854775807,
++ since some C++ compilers masquerading as C compilers
++ incorrectly reject 9223372036854775807. */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++ && LARGE_OFF_T % 2147483647 == 1)
++ ? 1 : -1];
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#define _LARGE_FILES 1
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++ We can't simply define LARGE_OFF_T to be 9223372036854775807,
++ since some C++ compilers masquerading as C compilers
++ incorrectly reject 9223372036854775807. */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++ && LARGE_OFF_T % 2147483647 == 1)
++ ? 1 : -1];
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sys_large_files=1; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ break
++done
++fi
++echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
++echo "${ECHO_T}$ac_cv_sys_large_files" >&6
++if test "$ac_cv_sys_large_files" != no; then
++
++cat >>confdefs.h <<_ACEOF
++#define _LARGE_FILES $ac_cv_sys_large_files
++_ACEOF
++
++fi
+ rm -f conftest*
+ fi
+
+-echo "$ac_t""$ac_cv_mingw32" 1>&6
+-MINGW32=
+-test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+-echo "configure:1449: checking for executable suffix" >&5
+-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking for function prototypes" >&5
++echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
++if test "$ac_cv_prog_cc_stdc" != no; then
++ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++
++cat >>confdefs.h <<\_ACEOF
++#define PROTOTYPES 1
++_ACEOF
++
++
++cat >>confdefs.h <<\_ACEOF
++#define __PROTOTYPES 1
++_ACEOF
++
+ else
+- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+- ac_cv_exeext=.exe
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
++if test "${ac_cv_c_const+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- rm -f conftest*
+- echo 'int main () { return 0; }' > conftest.$ac_ext
+- ac_cv_exeext=
+- if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+- for file in conftest.*; do
+- case $file in
+- *.c | *.o | *.obj) ;;
+- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+- esac
+- done
+- else
+- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+- fi
+- rm -f conftest*
+- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++ /* Ultrix mips cc rejects this. */
++ typedef int charset[2];
++ const charset x;
++ /* SunOS 4.1.1 cc rejects this. */
++ char const *const *ccp;
++ char **p;
++ /* NEC SVR4.0.2 mips cc rejects this. */
++ struct point {int x, y;};
++ static struct point const zero = {0,0};
++ /* AIX XL C 1.02.0.0 rejects this.
++ It does not let you subtract one const X* pointer from another in
++ an arm of an if-expression whose if-part is not a constant
++ expression */
++ const char *g = "string";
++ ccp = &g + (g ? g-g : 0);
++ /* HPUX 7.0 cc rejects these. */
++ ++ccp;
++ p = (char**) ccp;
++ ccp = (char const *const *) p;
++ { /* SCO 3.2v4 cc rejects this. */
++ char *t;
++ char const *s = 0 ? (char *) 0 : (char const *) 0;
++
++ *t++ = 0;
++ }
++ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
++ int x[] = {25, 17};
++ const int *foo = &x[0];
++ ++foo;
++ }
++ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++ typedef const int *iptr;
++ iptr p = 0;
++ ++p;
++ }
++ { /* AIX XL C 1.02.0.0 rejects this saying
++ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++ struct s { int j; const int *ap[3]; };
++ struct s *b; b->j = 5;
++ }
++ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++ const int foo = 10;
++ }
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_c_const=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_c_const=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
++echo "${ECHO_T}$ac_cv_c_const" >&6
++if test $ac_cv_c_const = no; then
+
+-EXEEXT=""
+-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+-echo "$ac_t""${ac_cv_exeext}" 1>&6
+-ac_exeext=$EXEEXT
++cat >>confdefs.h <<\_ACEOF
++#define const
++_ACEOF
+
++fi
+
+
+
+
+-echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+-echo "configure:1484: checking for ${CC-cc} option to accept ANSI C" >&5
+-if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++
++ac_header_dirent=no
++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
++ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- am_cv_prog_cc_stdc=no
+-ac_save_CC="$CC"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX -qlanglvl=ansi
+-# Ultrix and OSF/1 -std1
+-# HP-UX -Aa -D_HPUX_SOURCE
+-# SVR4 -Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+-do
+- CC="$ac_save_CC $ac_arg"
+- cat > conftest.$ac_ext <<EOF
+-#line 1500 "configure"
+-#include "confdefs.h"
+-#include <stdarg.h>
+-#include <stdio.h>
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <sys/types.h>
+-#include <sys/stat.h>
+-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+-struct buf { int x; };
+-FILE * (*rcsopen) (struct buf *, struct stat *, int);
+-static char *e (p, i)
+- char **p;
+- int i;
++#include <$ac_hdr>
++
++int
++main ()
+ {
+- return p[i];
++if ((DIR *) 0)
++return 0;
++ ;
++ return 0;
+ }
+-static char *f (char * (*g) (char **, int), char **p, ...)
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_Header=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_Header=no"
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
++_ACEOF
++
++ac_header_dirent=$ac_hdr; break
++fi
++
++done
++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
++if test $ac_header_dirent = dirent.h; then
++ echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++ac_cv_search_opendir=no
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++int
++main ()
+ {
+- char *s;
+- va_list v;
+- va_start (v,p);
+- s = g (p, va_arg (v,int));
+- va_end (v);
+- return s;
++opendir ();
++ ;
++ return 0;
+ }
+-int test (int i, double x);
+-struct s1 {int (*f) (int a);};
+-struct s2 {int (*f) (double a);};
+-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+-int argc;
+-char **argv;
+-
+-int main() {
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="none required"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_opendir" = no; then
++ for ac_lib in dir; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- am_cv_prog_cc_stdc="$ac_arg"; break
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++int
++main ()
++{
++opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="-l$ac_lib"
++break
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
+ fi
+-rm -f conftest*
+-done
+-CC="$ac_save_CC"
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
++fi
++LIBS=$ac_func_search_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6
++if test "$ac_cv_search_opendir" != no; then
++ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+ fi
+
+-if test -z "$am_cv_prog_cc_stdc"; then
+- echo "$ac_t""none needed" 1>&6
+ else
+- echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
++ echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++if test "${ac_cv_search_opendir+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++ac_cv_search_opendir=no
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++int
++main ()
++{
++opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="none required"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
+ fi
+-case "x$am_cv_prog_cc_stdc" in
+- x|xno) ;;
+- *) CC="$CC $am_cv_prog_cc_stdc" ;;
+-esac
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++if test "$ac_cv_search_opendir" = no; then
++ for ac_lib in x; do
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char opendir ();
++int
++main ()
++{
++opendir ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_search_opendir="-l$ac_lib"
++break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++ done
++fi
++LIBS=$ac_func_search_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6
++if test "$ac_cv_search_opendir" != no; then
++ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+-echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
+-echo "configure:1563: checking for function prototypes" >&5
+-if test "$am_cv_prog_cc_stdc" != no; then
+- echo "$ac_t""yes" 1>&6
+- cat >> confdefs.h <<\EOF
+-#define PROTOTYPES 1
+-EOF
++fi
+
+- U= ANSI2KNR=
+-else
+- echo "$ac_t""no" 1>&6
+- U=_ ANSI2KNR=./ansi2knr
+- # Ensure some checks needed by ansi2knr itself.
+- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:1576: checking for ANSI C header files" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++
++echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
++if test "${ac_cv_header_stdc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1581 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <float.h>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_header_stdc=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_header_stdc=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
+
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+-cat > conftest.$ac_ext <<EOF
+-#line 1606 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <string.h>
+-EOF
++
++_ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "memchr" >/dev/null 2>&1; then
++ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+ else
+- rm -rf conftest*
+ ac_cv_header_stdc=no
+ fi
+ rm -f conftest*
+@@ -1619,16 +3887,20 @@
+
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+-cat > conftest.$ac_ext <<EOF
+-#line 1624 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <stdlib.h>
+-EOF
++
++_ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "free" >/dev/null 2>&1; then
++ $EGREP "free" >/dev/null 2>&1; then
+ :
+ else
+- rm -rf conftest*
+ ac_cv_header_stdc=no
+ fi
+ rm -f conftest*
+@@ -1637,1179 +3909,6855 @@
+
+ if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+-if test "$cross_compiling" = yes; then
++ if test "$cross_compiling" = yes; then
+ :
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1645 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <ctype.h>
+-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+-int main () { int i; for (i = 0; i < 256; i++)
+-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+-exit (0); }
++#if ((' ' & 0x0FF) == 0x020)
++# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
++#else
++# define ISLOWER(c) \
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
++#endif
+
+-EOF
+-if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+-then
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++ int i;
++ for (i = 0; i < 256; i++)
++ if (XOR (islower (i), ISLOWER (i))
++ || toupper (i) != TOUPPER (i))
++ exit(2);
++ exit (0);
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
+ :
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -fr conftest*
+- ac_cv_header_stdc=no
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_header_stdc=no
+ fi
+-rm -fr conftest*
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+-
+ fi
+ fi
+-
+-echo "$ac_t""$ac_cv_header_stdc" 1>&6
++echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6
+ if test $ac_cv_header_stdc = yes; then
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define STDC_HEADERS 1
+-EOF
++_ACEOF
+
+ fi
+
+- for ac_hdr in string.h
++
++
++
++
++
++
++for ac_header in fcntl.h limits.h string.h unistd.h utime.h varargs.h
+ do
+-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:1683: checking for $ac_hdr" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1688 "configure"
+-#include "confdefs.h"
+-#include <$ac_hdr>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=yes"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
+ fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_hdr 1
+-EOF
+-
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
+ fi
++
+ done
+
++
++echo "$as_me:$LINENO: checking for mode_t" >&5
++echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
++if test "${ac_cv_type_mode_t+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((mode_t *) 0)
++ return 0;
++if (sizeof (mode_t))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_mode_t=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type_mode_t=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
++echo "${ECHO_T}$ac_cv_type_mode_t" >&6
++if test $ac_cv_type_mode_t = yes; then
++ :
++else
+
+-echo $ac_n "checking for working const""... $ac_c" 1>&6
+-echo "configure:1722: checking for working const" >&5
+-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++cat >>confdefs.h <<_ACEOF
++#define mode_t int
++_ACEOF
++
++fi
++
++echo "$as_me:$LINENO: checking for off_t" >&5
++echo $ECHO_N "checking for off_t... $ECHO_C" >&6
++if test "${ac_cv_type_off_t+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1727 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((off_t *) 0)
++ return 0;
++if (sizeof (off_t))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_off_t=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-int main() {
++ac_cv_type_off_t=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
++echo "${ECHO_T}$ac_cv_type_off_t" >&6
++if test $ac_cv_type_off_t = yes; then
++ :
++else
+
+-/* Ultrix mips cc rejects this. */
+-typedef int charset[2]; const charset x;
+-/* SunOS 4.1.1 cc rejects this. */
+-char const *const *ccp;
+-char **p;
+-/* NEC SVR4.0.2 mips cc rejects this. */
+-struct point {int x, y;};
+-static struct point const zero = {0,0};
+-/* AIX XL C 1.02.0.0 rejects this.
+- It does not let you subtract one const X* pointer from another in an arm
+- of an if-expression whose if-part is not a constant expression */
+-const char *g = "string";
+-ccp = &g + (g ? g-g : 0);
+-/* HPUX 7.0 cc rejects these. */
+-++ccp;
+-p = (char**) ccp;
+-ccp = (char const *const *) p;
+-{ /* SCO 3.2v4 cc rejects this. */
+- char *t;
+- char const *s = 0 ? (char *) 0 : (char const *) 0;
++cat >>confdefs.h <<_ACEOF
++#define off_t long
++_ACEOF
+
+- *t++ = 0;
++fi
++
++echo "$as_me:$LINENO: checking for pid_t" >&5
++echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
++if test "${ac_cv_type_pid_t+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((pid_t *) 0)
++ return 0;
++if (sizeof (pid_t))
++ return 0;
++ ;
++ return 0;
+ }
+-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+- int x[] = {25, 17};
+- const int *foo = &x[0];
+- ++foo;
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_pid_t=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type_pid_t=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
++echo "${ECHO_T}$ac_cv_type_pid_t" >&6
++if test $ac_cv_type_pid_t = yes; then
++ :
++else
++
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
++_ACEOF
++
++fi
++
++echo "$as_me:$LINENO: checking return type of signal handlers" >&5
++echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
++if test "${ac_cv_type_signal+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <signal.h>
++#ifdef signal
++# undef signal
++#endif
++#ifdef __cplusplus
++extern "C" void (*signal (int, void (*)(int)))(int);
++#else
++void (*signal ()) ();
++#endif
++
++int
++main ()
++{
++int i;
++ ;
++ return 0;
+ }
+-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+- typedef const int *iptr;
+- iptr p = 0;
+- ++p;
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_signal=void
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type_signal=int
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
++echo "${ECHO_T}$ac_cv_type_signal" >&6
++
++cat >>confdefs.h <<_ACEOF
++#define RETSIGTYPE $ac_cv_type_signal
++_ACEOF
++
++
++echo "$as_me:$LINENO: checking for size_t" >&5
++echo $ECHO_N "checking for size_t... $ECHO_C" >&6
++if test "${ac_cv_type_size_t+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((size_t *) 0)
++ return 0;
++if (sizeof (size_t))
++ return 0;
++ ;
++ return 0;
+ }
+-{ /* AIX XL C 1.02.0.0 rejects this saying
+- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+- struct s { int j; const int *ap[3]; };
+- struct s *b; b->j = 5;
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_size_t=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type_size_t=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
++echo "${ECHO_T}$ac_cv_type_size_t" >&6
++if test $ac_cv_type_size_t = yes; then
++ :
++else
++
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned
++_ACEOF
++
++fi
++
++echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
++echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
++if test "${ac_cv_header_stdbool_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++ #include <stdbool.h>
++ #ifndef bool
++ "error: bool is not defined"
++ #endif
++ #ifndef false
++ "error: false is not defined"
++ #endif
++ #if false
++ "error: false is not 0"
++ #endif
++ #ifndef true
++ "error: false is not defined"
++ #endif
++ #if true != 1
++ "error: true is not 1"
++ #endif
++ #ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++ #endif
++
++ struct s { _Bool s: 1; _Bool t; } s;
++
++ char a[true == 1 ? 1 : -1];
++ char b[false == 0 ? 1 : -1];
++ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++ char d[(bool) -0.5 == true ? 1 : -1];
++ bool e = &s;
++ char f[(_Bool) -0.0 == false ? 1 : -1];
++ char g[true];
++ char h[sizeof (_Bool)];
++ char i[sizeof s.t];
++
++int
++main ()
++{
++ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
++ ;
++ return 0;
+ }
+-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+- const int foo = 10;
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_stdbool_h=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_header_stdbool_h=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
++echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
++ echo "$as_me:$LINENO: checking for _Bool" >&5
++echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
++if test "${ac_cv_type__Bool+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((_Bool *) 0)
++ return 0;
++if (sizeof (_Bool))
++ return 0;
++ ;
++ return 0;
+ }
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type__Bool=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- ac_cv_c_const=yes
++ac_cv_type__Bool=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
++echo "${ECHO_T}$ac_cv_type__Bool" >&6
++if test $ac_cv_type__Bool = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE__BOOL 1
++_ACEOF
++
++
++fi
++
++ if test $ac_cv_header_stdbool_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_STDBOOL_H 1
++_ACEOF
++
++ fi
++
++
++
++ # Define two additional variables used in the Makefile substitution.
++
++ if test "$ac_cv_header_stdbool_h" = yes; then
++ STDBOOL_H=''
++ else
++ STDBOOL_H='stdbool.h'
++ fi
++
++
++ if test "$ac_cv_type__Bool" = yes; then
++ HAVE__BOOL=1
++ else
++ HAVE__BOOL=0
++ fi
++
++
++
++
++for ac_header in sys/time.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_c_const=no
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
+ fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-echo "$ac_t""$ac_cv_c_const" 1>&6
+-if test $ac_cv_c_const = no; then
+- cat >> confdefs.h <<\EOF
+-#define const
+-EOF
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+
+ fi
+
++done
+
+-ac_header_dirent=no
+-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
++
++
++
++for ac_header in utime.h
+ do
+-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+-echo "configure:1802: checking for $ac_hdr that defines DIR" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1807 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#include <$ac_hdr>
+-int main() {
+-DIR *dirp = 0;
+-; return 0; }
+-EOF
+-if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- eval "ac_cv_header_dirent_$ac_safe=yes"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_header_dirent_$ac_safe=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
+ fi
+-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_hdr 1
+-EOF
+- ac_header_dirent=$ac_hdr; break
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
+ done
+-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+-if test $ac_header_dirent = dirent.h; then
+-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+-echo "configure:1840: checking for opendir in -ldir" >&5
+-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
++echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
++if test "${ac_cv_header_time+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_save_LIBS="$LIBS"
+-LIBS="-ldir $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 1848 "configure"
+-#include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error. */
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir();
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <sys/types.h>
++#include <sys/time.h>
++#include <time.h>
+
+-int main() {
+-opendir()
+-; return 0; }
+-EOF
+-if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=yes"
++int
++main ()
++{
++if ((struct tm *) 0)
++return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_time=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_header_time=no
+ fi
+-rm -f conftest*
+-LIBS="$ac_save_LIBS"
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
++echo "${ECHO_T}$ac_cv_header_time" >&6
++if test $ac_cv_header_time = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define TIME_WITH_SYS_TIME 1
++_ACEOF
+
+ fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- LIBS="$LIBS -ldir"
++
++
++
++ :
++
++
++
++
++
++
++
++
++
++ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
++echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
++if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#ifdef TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# ifdef HAVE_SYS_TIME_H
++# include <sys/time.h>
++# else
++# include <time.h>
++# endif
++#endif
++#ifdef HAVE_UTIME_H
++# include <utime.h>
++#endif
++
++int
++main ()
++{
++static struct utimbuf x; x.actime = x.modtime;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ fu_cv_sys_struct_utimbuf=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fu_cv_sys_struct_utimbuf=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
+ fi
++echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
++echo "${ECHO_T}$fu_cv_sys_struct_utimbuf" >&6
+
++ if test $fu_cv_sys_struct_utimbuf = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_STRUCT_UTIMBUF 1
++_ACEOF
++
++ fi
++
++
++echo "$as_me:$LINENO: checking whether closedir returns void" >&5
++echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
++if test "${ac_cv_func_closedir_void+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+-echo "configure:1881: checking for opendir in -lx" >&5
+-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
+-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++ if test "$cross_compiling" = yes; then
++ ac_cv_func_closedir_void=yes
+ else
+- ac_save_LIBS="$LIBS"
+-LIBS="-lx $LIBS"
+-cat > conftest.$ac_ext <<EOF
+-#line 1889 "configure"
+-#include "confdefs.h"
+-/* Override any gcc2 internal prototype to avoid an error. */
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir();
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header_dirent>
++#ifndef __cplusplus
++int closedir ();
++#endif
+
+-int main() {
+-opendir()
+-; return 0; }
+-EOF
+-if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=yes"
++int
++main ()
++{
++exit (closedir (opendir (".")) != 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_closedir_void=no
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_lib_$ac_lib_var=no"
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_func_closedir_void=yes
+ fi
+-rm -f conftest*
+-LIBS="$ac_save_LIBS"
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
++echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
++if test $ac_cv_func_closedir_void = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define CLOSEDIR_VOID 1
++_ACEOF
+
+ fi
+-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- LIBS="$LIBS -lx"
++
++
++
++for ac_header in limits.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++ ac_header_preproc=no
+ fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
+
+-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:1923: checking for ANSI C header files" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1928 "configure"
+-#include "confdefs.h"
+-#include <stdlib.h>
+-#include <stdarg.h>
+-#include <string.h>
+-#include <float.h>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
+- ac_cv_header_stdc=yes
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++for ac_header in stdlib.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_header_stdc=no
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
+
+-if test $ac_cv_header_stdc = yes; then
+- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+-cat > conftest.$ac_ext <<EOF
+-#line 1953 "configure"
+-#include "confdefs.h"
+-#include <string.h>
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "memchr" >/dev/null 2>&1; then
+- :
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
+ else
+- rm -rf conftest*
+- ac_cv_header_stdc=no
++ ac_cpp_err=yes
+ fi
+-rm -f conftest*
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++ ac_header_preproc=no
+ fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
+
+-if test $ac_cv_header_stdc = yes; then
+- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+-cat > conftest.$ac_ext <<EOF
+-#line 1971 "configure"
+-#include "confdefs.h"
+-#include <stdlib.h>
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "free" >/dev/null 2>&1; then
+- :
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- rm -rf conftest*
+- ac_cv_header_stdc=no
++ eval "$as_ac_Header=$ac_header_preproc"
+ fi
+-rm -f conftest*
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+ fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+
+-if test $ac_cv_header_stdc = yes; then
+- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+-if test "$cross_compiling" = yes; then
+- :
++fi
++
++done
++
++
++
++
++for ac_header in string.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 1992 "configure"
+-#include "confdefs.h"
+-#include <ctype.h>
+-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+-int main () { int i; for (i = 0; i < 256; i++)
+-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+-exit (0); }
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-EOF
+-if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+-then
+- :
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -fr conftest*
+- ac_cv_header_stdc=no
++ ac_cpp_err=yes
+ fi
+-rm -fr conftest*
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
+ fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
+
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
+ fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
+
+-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+-if test $ac_cv_header_stdc = yes; then
+- cat >> confdefs.h <<\EOF
+-#define STDC_HEADERS 1
+-EOF
+
++ echo "$as_me:$LINENO: checking whether getenv is declared" >&5
++echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_getenv+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef getenv
++ char *p = (char *) getenv;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_getenv=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_getenv=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
++echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
++if test $ac_cv_have_decl_getenv = yes; then
+
+-for ac_hdr in fcntl.h limits.h string.h unistd.h utime.h varargs.h
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETENV 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETENV 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether malloc is declared" >&5
++echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_malloc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef malloc
++ char *p = (char *) malloc;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_malloc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_malloc=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
++echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
++if test $ac_cv_have_decl_malloc = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MALLOC 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MALLOC 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
++echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
++if test "${ac_cv_win_or_dos+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
++neither MSDOS nor Windows
++#endif
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_win_or_dos=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_win_or_dos=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
++echo "${ECHO_T}$ac_cv_win_or_dos" >&6
++
++ if test x"$ac_cv_win_or_dos" = xyes; then
++ ac_fs_accepts_drive_letter_prefix=1
++ ac_fs_backslash_is_file_name_separator=1
++ else
++ ac_fs_accepts_drive_letter_prefix=0
++ ac_fs_backslash_is_file_name_separator=0
++ fi
++
++
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
++_ACEOF
++
++
++
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
++_ACEOF
++
++
++
++
++for ac_header in unistd.h
+ do
+-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:2030: checking for $ac_hdr" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2035 "configure"
+-#include "confdefs.h"
+-#include <$ac_hdr>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:2040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=yes"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
+ fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_hdr 1
+-EOF
+-
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
+ else
+- echo "$ac_t""no" 1>&6
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
+ fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
+ done
+
+
+- echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
+-echo "configure:2068: checking for inttypes.h" >&5
+-if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++ echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5
++echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" >&6
++if test "${jm_cv_struct_dirent_d_ino+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2073 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
+ #include <sys/types.h>
+-#include <inttypes.h>
+-int main() {
+-uintmax_t i = (uintmax_t) -1;
+-; return 0; }
+-EOF
+-if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- jm_ac_cv_header_inttypes_h=yes
++#ifdef HAVE_DIRENT_H
++# include <dirent.h>
++#else /* not HAVE_DIRENT_H */
++# define dirent direct
++# ifdef HAVE_SYS_NDIR_H
++# include <sys/ndir.h>
++# endif /* HAVE_SYS_NDIR_H */
++# ifdef HAVE_SYS_DIR_H
++# include <sys/dir.h>
++# endif /* HAVE_SYS_DIR_H */
++# ifdef HAVE_NDIR_H
++# include <ndir.h>
++# endif /* HAVE_NDIR_H */
++#endif /* HAVE_DIRENT_H */
++
++int
++main ()
++{
++struct dirent dp; dp.d_ino = 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ jm_cv_struct_dirent_d_ino=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- jm_ac_cv_header_inttypes_h=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++jm_cv_struct_dirent_d_ino=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++
++
+ fi
++echo "$as_me:$LINENO: result: $jm_cv_struct_dirent_d_ino" >&5
++echo "${ECHO_T}$jm_cv_struct_dirent_d_ino" >&6
++ if test $jm_cv_struct_dirent_d_ino = yes; then
+
+-echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
+- if test $jm_ac_cv_header_inttypes_h = yes; then
+- cat >> confdefs.h <<EOF
+-#define HAVE_INTTYPES_H 1
+-EOF
++cat >>confdefs.h <<\_ACEOF
++#define D_INO_IN_DIRENT 1
++_ACEOF
+
++ fi
++
++
++
++
++ echo "$as_me:$LINENO: checking for long file names" >&5
++echo $ECHO_N "checking for long file names... $ECHO_C" >&6
++if test "${ac_cv_sys_long_file_names+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_sys_long_file_names=yes
++# Test for long file names in all the places we know might matter:
++# . the current directory, where building will happen
++# $prefix/lib where we will be installing things
++# $exec_prefix/lib likewise
++# eval it to expand exec_prefix.
++# $TMPDIR if set, where it might want to write temporary files
++# if $TMPDIR is not set:
++# /tmp where it might want to write temporary files
++# /var/tmp likewise
++# /usr/tmp likewise
++if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
++ ac_tmpdirs=$TMPDIR
++else
++ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
++fi
++for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
++ test -d $ac_dir || continue
++ test -w $ac_dir || continue # It is less confusing to not echo anything here.
++ ac_xdir=$ac_dir/cf$$
++ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
++ ac_tf1=$ac_xdir/conftest9012345
++ ac_tf2=$ac_xdir/conftest9012346
++ (echo 1 >$ac_tf1) 2>/dev/null
++ (echo 2 >$ac_tf2) 2>/dev/null
++ ac_val=`cat $ac_tf1 2>/dev/null`
++ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
++ ac_cv_sys_long_file_names=no
++ rm -rf $ac_xdir 2>/dev/null
++ break
+ fi
++ rm -rf $ac_xdir 2>/dev/null
++done
++fi
++echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
++echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
++if test $ac_cv_sys_long_file_names = yes; then
+
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_LONG_FILE_NAMES 1
++_ACEOF
+
+-echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+-echo "configure:2103: checking for mode_t" >&5
+-if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++
++
++ :
++
++
++
++
++
++
++
++
++
++
++
++
++for ac_func in pathconf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2108 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#if STDC_HEADERS
+-#include <stdlib.h>
+-#include <stddef.h>
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+- rm -rf conftest*
+- ac_cv_type_mode_t=yes
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- rm -rf conftest*
+- ac_cv_type_mode_t=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+ fi
+-echo "$ac_t""$ac_cv_type_mode_t" 1>&6
+-if test $ac_cv_type_mode_t = no; then
+- cat >> confdefs.h <<\EOF
+-#define mode_t int
+-EOF
++done
++
++
++
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++ :
++
++
++
++
++
++
+
++for ac_func in vprintf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+-echo $ac_n "checking for off_t""... $ac_c" 1>&6
+-echo "configure:2136: checking for off_t" >&5
+-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++echo "$as_me:$LINENO: checking for _doprnt" >&5
++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
++if test "${ac_cv_func__doprnt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2141 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#if STDC_HEADERS
+-#include <stdlib.h>
+-#include <stddef.h>
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char _doprnt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+- rm -rf conftest*
+- ac_cv_type_off_t=yes
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char _doprnt ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub__doprnt) || defined (__stub____doprnt)
++choke me
++#else
++char (*f) () = _doprnt;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != _doprnt;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func__doprnt=yes
+ else
+- rm -rf conftest*
+- ac_cv_type_off_t=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_func__doprnt=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
++echo "${ECHO_T}$ac_cv_func__doprnt" >&6
++if test $ac_cv_func__doprnt = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_DOPRNT 1
++_ACEOF
+
+ fi
+-echo "$ac_t""$ac_cv_type_off_t" 1>&6
+-if test $ac_cv_type_off_t = no; then
+- cat >> confdefs.h <<\EOF
+-#define off_t long
+-EOF
+
+ fi
++done
+
+-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+-echo "configure:2169: checking for pid_t" >&5
+-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++ echo "$as_me:$LINENO: checking for error_at_line" >&5
++echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
++if test "${ac_cv_lib_error_at_line+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2174 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#if STDC_HEADERS
+-#include <stdlib.h>
+-#include <stddef.h>
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++error_at_line (0, 0, "", 0, "");
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_error_at_line=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_error_at_line=no
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
++echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
++if test $ac_cv_lib_error_at_line = no; then
++ LIBOBJS="$LIBOBJS error.$ac_objext"
++fi
++
++
++
++
++
++for ac_func in strerror
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+- rm -rf conftest*
+- ac_cv_type_pid_t=yes
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- rm -rf conftest*
+- ac_cv_type_pid_t=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+ fi
+-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+-if test $ac_cv_type_pid_t = no; then
+- cat >> confdefs.h <<\EOF
+-#define pid_t int
+-EOF
++done
+
++ echo "$as_me:$LINENO: checking whether strerror is declared" >&5
++echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_strerror+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef strerror
++ char *p = (char *) strerror;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_strerror=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_strerror=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
++echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
++if test $ac_cv_have_decl_strerror = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRERROR 1
++_ACEOF
++
+
+-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+-echo "configure:2202: checking return type of signal handlers" >&5
+-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2207 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#include <signal.h>
+-#ifdef signal
+-#undef signal
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRERROR 0
++_ACEOF
++
++
++fi
++
++
++ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
++echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_strerror_r+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef strerror_r
++ char *p = (char *) strerror_r;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_strerror_r=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_strerror_r=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
++echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
++if test $ac_cv_have_decl_strerror_r = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRERROR_R 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRERROR_R 0
++_ACEOF
++
++
++fi
++
++
++
++for ac_func in strerror_r
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
++/* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+-extern "C" void (*signal (int, void (*)(int)))(int);
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
+ #else
+-void (*signal ()) ();
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-int main() {
+-int i;
+-; return 0; }
+-EOF
+-if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- ac_cv_type_signal=void
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_type_signal=int
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+-echo "$ac_t""$ac_cv_type_signal" 1>&6
+-cat >> confdefs.h <<EOF
+-#define RETSIGTYPE $ac_cv_type_signal
+-EOF
++fi
++done
++
++echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
++echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
++if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ ac_cv_func_strerror_r_char_p=no
++ if test $ac_cv_have_decl_strerror_r = yes; then
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
+
++ char buf[100];
++ char x = *strerror_r (0, buf, sizeof buf);
++ char *p = strerror_r (0, buf, sizeof buf);
+
+-echo $ac_n "checking for size_t""... $ac_c" 1>&6
+-echo "configure:2243: checking for size_t" >&5
+-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_strerror_r_char_p=yes
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2248 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
+-#if STDC_HEADERS
+-#include <stdlib.h>
+-#include <stddef.h>
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ else
++ # strerror_r is not declared. Choose between
++ # systems that have relatively inaccessible declarations for the
++ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
++ # former has a strerror_r that returns char*, while the latter
++ # has a strerror_r that returns `int'.
++ # This test should segfault on the DEC system.
++ if test "$cross_compiling" = yes; then
++ :
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++ extern char *strerror_r ();
++int
++main ()
++{
++char buf[100];
++ char x = *strerror_r (0, buf, sizeof buf);
++ exit (!isalpha (x));
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_strerror_r_char_p=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++fi
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++ fi
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
++echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
++if test $ac_cv_func_strerror_r_char_p = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define STRERROR_R_CHAR_P 1
++_ACEOF
++
++fi
++
++
++
++
++
++for ac_func in memchr
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
+-EOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+- rm -rf conftest*
+- ac_cv_type_size_t=yes
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- rm -rf conftest*
+- ac_cv_type_size_t=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
++else
++ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ fi
+-echo "$ac_t""$ac_cv_type_size_t" 1>&6
+-if test $ac_cv_type_size_t = no; then
+- cat >> confdefs.h <<\EOF
+-#define size_t unsigned
+-EOF
++done
++
++
++ if test $ac_cv_func_memchr = no; then
++
++
++ :
++
++
++
++
++
++
++
++
++
++for ac_header in bp-sym.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++ac_header_compiler=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
+
+-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+-echo "configure:2276: checking whether time.h and sys/time.h may both be included" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2281 "configure"
+-#include "confdefs.h"
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++ fi
++
++echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
++echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
++if test "${ac_cv_header_stat_broken+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ #include <sys/types.h>
+-#include <sys/time.h>
+-#include <time.h>
+-int main() {
+-struct tm *tp;
+-; return 0; }
+-EOF
+-if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- ac_cv_header_time=yes
++#include <sys/stat.h>
++
++#if defined(S_ISBLK) && defined(S_IFDIR)
++# if S_ISBLK (S_IFDIR)
++You lose.
++# endif
++#endif
++
++#if defined(S_ISBLK) && defined(S_IFCHR)
++# if S_ISBLK (S_IFCHR)
++You lose.
++# endif
++#endif
++
++#if defined(S_ISLNK) && defined(S_IFREG)
++# if S_ISLNK (S_IFREG)
++You lose.
++# endif
++#endif
++
++#if defined(S_ISSOCK) && defined(S_IFREG)
++# if S_ISSOCK (S_IFREG)
++You lose.
++# endif
++#endif
++
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++ $EGREP "You lose" >/dev/null 2>&1; then
++ ac_cv_header_stat_broken=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- ac_cv_header_time=no
++ ac_cv_header_stat_broken=no
+ fi
+ rm -f conftest*
++
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
++echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
++if test $ac_cv_header_stat_broken = yes; then
+
+-echo "$ac_t""$ac_cv_header_time" 1>&6
+-if test $ac_cv_header_time = yes; then
+- cat >> confdefs.h <<\EOF
+-#define TIME_WITH_SYS_TIME 1
+-EOF
++cat >>confdefs.h <<\_ACEOF
++#define STAT_MACROS_BROKEN 1
++_ACEOF
+
+ fi
+
+
+- for ac_hdr in utime.h
++
++for ac_func in rmdir
+ do
+-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:2315: checking for $ac_hdr" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2320 "configure"
+-#include "confdefs.h"
+-#include <$ac_hdr>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=yes"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "$ac_err" >&5
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_header_$ac_safe=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_hdr 1
+-EOF
+-
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
+ else
+- echo "$ac_t""no" 1>&6
++ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ fi
+ done
+
+-
+- echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
+-echo "configure:2353: checking for struct utimbuf" >&5
+-if eval "test \"`echo '$''{'fu_cv_sys_struct_utimbuf'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++ if test $ac_cv_func_rmdir = no; then
++
++
++ :
++
++ fi
++
++
++
++ :
++
++
++
++
++
++
++
++for ac_header in stdlib.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2358 "configure"
+-#include "confdefs.h"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+-#ifdef TIME_WITH_SYS_TIME
+-# include <sys/time.h>
+-# include <time.h>
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
++echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
++if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ ac_cv_func_malloc_0_nonnull=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#if STDC_HEADERS || HAVE_STDLIB_H
++# include <stdlib.h>
+ #else
+-# ifdef HAVE_SYS_TIME_H
+-# include <sys/time.h>
+-# else
+-# include <time.h>
+-# endif
++char *malloc ();
+ #endif
+-#ifdef HAVE_UTIME_H
+-# include <utime.h>
++
++int
++main ()
++{
++exit (malloc (0) ? 0 : 1);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_malloc_0_nonnull=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_func_malloc_0_nonnull=no
++fi
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
++echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
++if test $ac_cv_func_malloc_0_nonnull = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_MALLOC 1
++_ACEOF
++
++else
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_MALLOC 0
++_ACEOF
++
++ LIBOBJS="$LIBOBJS malloc.$ac_objext"
++
++cat >>confdefs.h <<\_ACEOF
++#define malloc rpl_malloc
++_ACEOF
++
++fi
++
++
++
++
++
++ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
++
++ :
++
++ fi
++
++
++for ac_header in stdlib.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
++echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
++if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test "$cross_compiling" = yes; then
++ ac_cv_func_realloc_0_nonnull=no
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#if STDC_HEADERS || HAVE_STDLIB_H
++# include <stdlib.h>
++#else
++char *realloc ();
+ #endif
+-
+-int main() {
+-static struct utimbuf x; x.actime = x.modtime;
+-; return 0; }
+-EOF
+-if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+- rm -rf conftest*
+- fu_cv_sys_struct_utimbuf=yes
++
++int
++main ()
++{
++exit (realloc (0, 0) ? 0 : 1);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_realloc_0_nonnull=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- fu_cv_sys_struct_utimbuf=no
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_func_realloc_0_nonnull=no
+ fi
+-rm -f conftest*
+-
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
++echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
++if test $ac_cv_func_realloc_0_nonnull = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_REALLOC 1
++_ACEOF
++
++else
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_REALLOC 0
++_ACEOF
++
++ LIBOBJS="$LIBOBJS realloc.$ac_objext"
++
++cat >>confdefs.h <<\_ACEOF
++#define realloc rpl_realloc
++_ACEOF
++
+ fi
+
+-echo "$ac_t""$fu_cv_sys_struct_utimbuf" 1>&6
+
+- if test $fu_cv_sys_struct_utimbuf = yes; then
+- cat >> confdefs.h <<EOF
+-#define HAVE_STRUCT_UTIMBUF 1
+-EOF
++
++
++
++ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
++
++ :
+
+ fi
+
+
+-echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
+-echo "configure:2403: checking for getopt_long" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++
++
++
++
++for ac_header in stddef.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2408 "configure"
+-#include "confdefs.h"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++for ac_header in wchar.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++for ac_header in wctype.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++
++
++
++for ac_func in iswprint
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char getopt_long(); below. */
+-#include <assert.h>
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
+ /* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
+ /* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char getopt_long();
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
+
+-int main() {
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++eval "$as_ac_var=no"
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++for ac_func in mbsinit
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-getopt_long();
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_func_getopt_long=yes"
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_func_getopt_long=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++
++ :
++
++
++
++
++
++
++
++
+
+-if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+ :
++
++
++
++
++
++
++
++
++ echo "$as_me:$LINENO: checking for mbstate_t" >&5
++echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
++if test "${ac_cv_type_mbstate_t+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo "$ac_t""no" 1>&6
+-LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++# include <wchar.h>
++int
++main ()
++{
++mbstate_t x; return sizeof x;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type_mbstate_t=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type_mbstate_t=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
++echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
++ if test $ac_cv_type_mbstate_t = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_MBSTATE_T 1
++_ACEOF
+
++ else
+
+-for ac_func in _doprintf isascii fseeko memcmp mktemp \
+- pathconf raise setmode sigaction sigprocmask sigsetmask strerror
++cat >>confdefs.h <<\_ACEOF
++#define mbstate_t int
++_ACEOF
++
++ fi
++
++ echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
++echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
++if test "${jm_cv_func_mbrtowc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <wchar.h>
++int
++main ()
++{
++mbstate_t state; return ! (sizeof state && mbrtowc);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ jm_cv_func_mbrtowc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++jm_cv_func_mbrtowc=no
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
++echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
++ if test $jm_cv_func_mbrtowc = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_MBRTOWC 1
++_ACEOF
++
++ fi
++
++
++
++
++
++
++
++for ac_func in pathconf
+ do
+-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:2456: checking for $ac_func" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2461 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char $ac_func(); below. */
+-#include <assert.h>
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
+ /* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
+ /* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char $ac_func();
+-
+-int main() {
+-
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-$ac_func();
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=yes"
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_func 1
+-EOF
+-
++fi
++done
++
++
++
++
++for ac_header in limits.h string.h unistd.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
+ done
+
+-for ac_func in memchr mkdir rename rmdir
++
++
++echo "$as_me:$LINENO: checking whether free is declared" >&5
++echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_free+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef free
++ char *p = (char *) free;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_free=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_free=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
++echo "${ECHO_T}$ac_cv_have_decl_free" >&6
++if test $ac_cv_have_decl_free = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREE 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREE 0
++_ACEOF
++
++
++fi
++echo "$as_me:$LINENO: checking whether getenv is declared" >&5
++echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_getenv+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef getenv
++ char *p = (char *) getenv;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_getenv=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_getenv=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
++echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
++if test $ac_cv_have_decl_getenv = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETENV 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETENV 0
++_ACEOF
++
++
++fi
++echo "$as_me:$LINENO: checking whether malloc is declared" >&5
++echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_malloc+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef malloc
++ char *p = (char *) malloc;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_malloc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_malloc=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
++echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
++if test $ac_cv_have_decl_malloc = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MALLOC 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MALLOC 0
++_ACEOF
++
++
++fi
++echo "$as_me:$LINENO: checking whether mktemp is declared" >&5
++echo $ECHO_N "checking whether mktemp is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_mktemp+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef mktemp
++ char *p = (char *) mktemp;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_mktemp=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_mktemp=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
++echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
++if test $ac_cv_have_decl_mktemp = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MKTEMP 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_MKTEMP 0
++_ACEOF
++
++
++fi
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++for ac_func in _doprintf geteuid getuid isascii memcmp mktemp \
++ pathconf raise sigaction sigprocmask sigsetmask strerror
+ do
+-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:2511: checking for $ac_func" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2516 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char $ac_func(); below. */
+-#include <assert.h>
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
+ /* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
+ /* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char $ac_func();
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
+
+-int main() {
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++eval "$as_ac_var=no"
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
++
++
++
++for ac_func in mkdir strncasecmp
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-$ac_func();
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=yes"
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_func 1
+-EOF
+-
+ else
+- echo "$ac_t""no" 1>&6
+-LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
++ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ fi
+ done
+
+
++echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
++echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
++if test "${ac_cv_sys_largefile_source+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ while :; do
++ ac_cv_sys_largefile_source=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdio.h>
++int
++main ()
++{
++return !fseeko;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+- cat >> confdefs.h <<EOF
+-#define HAVE_DONE_WORKING_MALLOC_CHECK 1
+-EOF
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#define _LARGEFILE_SOURCE 1
++#include <stdio.h>
++int
++main ()
++{
++return !fseeko;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_sys_largefile_source=1; break
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ break
++done
++fi
++echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
++echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
++if test "$ac_cv_sys_largefile_source" != no; then
+
+- echo $ac_n "checking for working malloc""... $ac_c" 1>&6
+-echo "configure:2572: checking for working malloc" >&5
+-if eval "test \"`echo '$''{'jm_cv_func_working_malloc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++cat >>confdefs.h <<_ACEOF
++#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
++_ACEOF
++
++fi
++rm -f conftest*
++
++# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
++# in glibc 2.1.3, but that breaks too many other things.
++# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
++echo "$as_me:$LINENO: checking for fseeko" >&5
++echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
++if test "${ac_cv_func_fseeko+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- if test "$cross_compiling" = yes; then
+- jm_cv_func_working_malloc=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <stdio.h>
++int
++main ()
++{
++return fseeko && fseeko (stdin, 0, 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_fseeko=yes
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2580 "configure"
+-#include "confdefs.h"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
+- char *malloc ();
+- int
+- main ()
+- {
+- exit (malloc (0) ? 0 : 1);
+- }
+-
+-EOF
+-if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+-then
+- jm_cv_func_working_malloc=yes
++ac_cv_func_fseeko=no
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
++echo "${ECHO_T}$ac_cv_func_fseeko" >&6
++if test $ac_cv_func_fseeko = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_FSEEKO 1
++_ACEOF
++
++fi
++
++
++ echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
++echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -fr conftest*
+- jm_cv_func_working_malloc=no
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef clearerr_unlocked
++ char *p = (char *) clearerr_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_clearerr_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_clearerr_unlocked=no
+ fi
+-rm -fr conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
++if test $ac_cv_have_decl_clearerr_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_CLEARERR_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_CLEARERR_UNLOCKED 0
++_ACEOF
++
+
+-
+ fi
+
+-echo "$ac_t""$jm_cv_func_working_malloc" 1>&6
+- if test $jm_cv_func_working_malloc = no; then
+-
+- LIBOBJS="$LIBOBJS malloc.$ac_objext"
+- cat >> confdefs.h <<EOF
+-#define malloc rpl_malloc
+-EOF
+
+- fi
+
+
+- cat >> confdefs.h <<EOF
+-#define HAVE_DONE_WORKING_REALLOC_CHECK 1
+-EOF
++ echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
++echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef feof_unlocked
++ char *p = (char *) feof_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_feof_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_feof_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
++if test $ac_cv_have_decl_feof_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FEOF_UNLOCKED 1
++_ACEOF
+
+
+- echo $ac_n "checking for working realloc""... $ac_c" 1>&6
+-echo "configure:2623: checking for working realloc" >&5
+-if eval "test \"`echo '$''{'jm_cv_func_working_realloc'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+ else
+- if test "$cross_compiling" = yes; then
+- jm_cv_func_working_realloc=no
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FEOF_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
++echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2631 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef ferror_unlocked
++ char *p = (char *) ferror_unlocked;
++#endif
+
+- char *realloc ();
+- int
+- main ()
+- {
+- exit (realloc (0, 0) ? 0 : 1);
+- }
+-
+-EOF
+-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+-then
+- jm_cv_func_working_realloc=yes
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_ferror_unlocked=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -fr conftest*
+- jm_cv_func_working_realloc=no
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_ferror_unlocked=no
+ fi
+-rm -fr conftest*
++rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
++if test $ac_cv_have_decl_ferror_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FERROR_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FERROR_UNLOCKED 0
++_ACEOF
++
+
+-
+ fi
+
+-echo "$ac_t""$jm_cv_func_working_realloc" 1>&6
+- if test $jm_cv_func_working_realloc = no; then
+-
+- LIBOBJS="$LIBOBJS realloc.$ac_objext"
+- cat >> confdefs.h <<EOF
+-#define realloc rpl_realloc
+-EOF
++
++
++
++ echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
++echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fflush_unlocked
++ char *p = (char *) fflush_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fflush_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fflush_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
++if test $ac_cv_have_decl_fflush_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FFLUSH_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FFLUSH_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
++echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fgets_unlocked
++ char *p = (char *) fgets_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fgets_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fgets_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
++if test $ac_cv_have_decl_fgets_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FGETS_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FGETS_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
++echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fputc_unlocked
++ char *p = (char *) fputc_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fputc_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fputc_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
++if test $ac_cv_have_decl_fputc_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FPUTC_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FPUTC_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
++echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fputs_unlocked
++ char *p = (char *) fputs_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fputs_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fputs_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
++if test $ac_cv_have_decl_fputs_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FPUTS_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FPUTS_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
++echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fread_unlocked
++ char *p = (char *) fread_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fread_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fread_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
++if test $ac_cv_have_decl_fread_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREAD_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREAD_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
++echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef fwrite_unlocked
++ char *p = (char *) fwrite_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_fwrite_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_fwrite_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
++if test $ac_cv_have_decl_fwrite_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FWRITE_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FWRITE_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
++echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef getc_unlocked
++ char *p = (char *) getc_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_getc_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_getc_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
++if test $ac_cv_have_decl_getc_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETC_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETC_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
++echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef getchar_unlocked
++ char *p = (char *) getchar_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_getchar_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_getchar_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
++if test $ac_cv_have_decl_getchar_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETCHAR_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_GETCHAR_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
++echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef putc_unlocked
++ char *p = (char *) putc_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_putc_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_putc_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
++if test $ac_cv_have_decl_putc_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_PUTC_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_PUTC_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
++echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++#ifndef putchar_unlocked
++ char *p = (char *) putchar_unlocked;
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_putchar_unlocked=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_putchar_unlocked=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
++echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
++if test $ac_cv_have_decl_putchar_unlocked = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_PUTCHAR_UNLOCKED 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_PUTCHAR_UNLOCKED 0
++_ACEOF
++
++
++fi
++
++
++
++
++
++
++
++ :
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
++
++ :
+
+ fi
+
+-echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
+-echo "configure:2668: checking whether closedir returns void" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
++
++ :
++
++ fi
++
++echo "$as_me:$LINENO: checking whether closedir returns void" >&5
++echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
++if test "${ac_cv_func_closedir_void+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_closedir_void=yes
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2676 "configure"
+-#include "confdefs.h"
+-#include <sys/types.h>
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
+ #include <$ac_header_dirent>
+-int closedir(); main() { exit(closedir(opendir(".")) != 0); }
+-EOF
+-if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+-then
++#ifndef __cplusplus
++int closedir ();
++#endif
++
++int
++main ()
++{
++exit (closedir (opendir (".")) != 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
+ ac_cv_func_closedir_void=no
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -fr conftest*
+- ac_cv_func_closedir_void=yes
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++ac_cv_func_closedir_void=yes
+ fi
+-rm -fr conftest*
++rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+-
+ fi
+-
+-echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
++echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
++echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
+ if test $ac_cv_func_closedir_void = yes; then
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define CLOSEDIR_VOID 1
+-EOF
++_ACEOF
+
+ fi
+
+-echo $ac_n "checking for vprintf""... $ac_c" 1>&6
+-echo "configure:2705: checking for vprintf" >&5
+-if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++
++
++for ac_header in fcntl.h unistd.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2710 "configure"
+-#include "confdefs.h"
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++
++done
++
++ echo "$as_me:$LINENO: checking for DOS-style setmode" >&5
++echo $ECHO_N "checking for DOS-style setmode... $ECHO_C" >&6
++if test "${ac_cv_func_setmode_dos+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <io.h>
++ #if HAVE_FCNTL_H
++ # include <fcntl.h>
++ #endif
++ #if HAVE_UNISTD_H
++ # include <unistd.h>
++ #endif
++int
++main ()
++{
++int ret = setmode && setmode (1, O_BINARY);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_setmode_dos=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_func_setmode_dos=no
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
++echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
++ if test $ac_cv_func_setmode_dos = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_SETMODE_DOS 1
++_ACEOF
++
++ fi
++
++for ac_func in vprintf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char vprintf(); below. */
+-#include <assert.h>
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
+ /* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
+ /* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char vprintf();
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
+
+-int main() {
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+
++eval "$as_ac_var=no"
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++echo "$as_me:$LINENO: checking for _doprnt" >&5
++echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
++if test "${ac_cv_func__doprnt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char _doprnt (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char _doprnt ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_vprintf) || defined (__stub___vprintf)
++#if defined (__stub__doprnt) || defined (__stub____doprnt)
+ choke me
+ #else
+-vprintf();
++char (*f) () = _doprnt;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_func_vprintf=yes"
++int
++main ()
++{
++return f != _doprnt;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func__doprnt=yes
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_func_vprintf=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_func__doprnt=no
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
++echo "${ECHO_T}$ac_cv_func__doprnt" >&6
++if test $ac_cv_func__doprnt = yes; then
+
+-if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- cat >> confdefs.h <<\EOF
+-#define HAVE_VPRINTF 1
+-EOF
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_DOPRNT 1
++_ACEOF
+
+-else
+- echo "$ac_t""no" 1>&6
+ fi
+
+-if test "$ac_cv_func_vprintf" != yes; then
+-echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+-echo "configure:2757: checking for _doprnt" >&5
+-if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++done
++
++
++
++for ac_func in mkdir
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat > conftest.$ac_ext <<EOF
+-#line 2762 "configure"
+-#include "confdefs.h"
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char _doprnt(); below. */
+-#include <assert.h>
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
+ /* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
+ /* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char _doprnt();
+-
+-int main() {
+-
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub__doprnt) || defined (__stub____doprnt)
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+ choke me
+ #else
+-_doprnt();
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
+ #endif
+
+-; return 0; }
+-EOF
+-if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- eval "ac_cv_func__doprnt=yes"
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ eval "$as_ac_var=yes"
+ else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- eval "ac_cv_func__doprnt=no"
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++eval "$as_ac_var=no"
+ fi
+-rm -f conftest*
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++if test `eval echo '${'$as_ac_var'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+
+-if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+- echo "$ac_t""yes" 1>&6
+- cat >> confdefs.h <<\EOF
+-#define HAVE_DOPRNT 1
+-EOF
++fi
++done
+
++ echo "$as_me:$LINENO: checking whether mkdir takes only one argument" >&5
++echo $ECHO_N "checking whether mkdir takes only one argument... $ECHO_C" >&6
++if test "${patch_cv_mkdir_takes_one_arg+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- echo "$ac_t""no" 1>&6
++ patch_cv_mkdir_takes_one_arg=no
++ if test $ac_cv_func_mkdir = yes; then
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int
++main ()
++{
++mkdir (".", 0);
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int
++main ()
++{
++mkdir (".");
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ patch_cv_mkdir_takes_one_arg=yes
++
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
+
+ fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++ fi
+
+
+-echo $ac_n "checking for long file names""... $ac_c" 1>&6
+-echo "configure:2811: checking for long file names" >&5
+-if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
++fi
++echo "$as_me:$LINENO: result: $patch_cv_mkdir_takes_one_arg" >&5
++echo "${ECHO_T}$patch_cv_mkdir_takes_one_arg" >&6
++ if test $patch_cv_mkdir_takes_one_arg = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define MKDIR_TAKES_ONE_ARG 1
++_ACEOF
++
++ fi
++
++
++
++
++ echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
++echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
++if test "${ac_cv_win_or_dos+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++ cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
++neither MSDOS nor Windows
++#endif
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_win_or_dos=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_win_or_dos=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
++echo "${ECHO_T}$ac_cv_win_or_dos" >&6
++
++ if test x"$ac_cv_win_or_dos" = xyes; then
++ ac_fs_accepts_drive_letter_prefix=1
++ ac_fs_backslash_is_file_name_separator=1
++ else
++ ac_fs_accepts_drive_letter_prefix=0
++ ac_fs_backslash_is_file_name_separator=0
++ fi
++
++
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
++_ACEOF
++
++
++
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
++_ACEOF
++
++
++echo "$as_me:$LINENO: checking for long file names" >&5
++echo $ECHO_N "checking for long file names... $ECHO_C" >&6
++if test "${ac_cv_sys_long_file_names+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_sys_long_file_names=yes
+ # Test for long file names in all the places we know might matter:
+@@ -2823,459 +10771,1123 @@
+ # /var/tmp likewise
+ # /usr/tmp likewise
+ if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+- ac_tmpdirs="$TMPDIR"
++ ac_tmpdirs=$TMPDIR
+ else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+ fi
+ for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+- (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
+- (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
+- val=`cat $ac_dir/conftest9012345 2>/dev/null`
+- if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
++ ac_xdir=$ac_dir/cf$$
++ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
++ ac_tf1=$ac_xdir/conftest9012345
++ ac_tf2=$ac_xdir/conftest9012346
++ (echo 1 >$ac_tf1) 2>/dev/null
++ (echo 2 >$ac_tf2) 2>/dev/null
++ ac_val=`cat $ac_tf1 2>/dev/null`
++ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+- rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
++ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+- rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
++ rm -rf $ac_xdir 2>/dev/null
+ done
+ fi
+-
+-echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
++echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
++echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+ if test $ac_cv_sys_long_file_names = yes; then
+- cat >> confdefs.h <<\EOF
++
++cat >>confdefs.h <<\_ACEOF
+ #define HAVE_LONG_FILE_NAMES 1
+-EOF
++_ACEOF
+
+ fi
+
+- echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6
+-echo "configure:2855: checking for d_ino member in directory struct" >&5
+-if eval "test \"`echo '$''{'jm_cv_struct_dirent_d_ino'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&6
+-else
+- cat > conftest.$ac_ext <<EOF
+-#line 2860 "configure"
+-#include "confdefs.h"
+-
+-#include <sys/types.h>
+-#ifdef HAVE_DIRENT_H
+-# include <dirent.h>
+-#else /* not HAVE_DIRENT_H */
+-# define dirent direct
+-# ifdef HAVE_SYS_NDIR_H
+-# include <sys/ndir.h>
+-# endif /* HAVE_SYS_NDIR_H */
+-# ifdef HAVE_SYS_DIR_H
+-# include <sys/dir.h>
+-# endif /* HAVE_SYS_DIR_H */
+-# ifdef HAVE_NDIR_H
+-# include <ndir.h>
+-# endif /* HAVE_NDIR_H */
+-#endif /* HAVE_DIRENT_H */
+-
+-int main() {
+-struct dirent dp; dp.d_ino = 0;
+-; return 0; }
+-EOF
+-if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- jm_cv_struct_dirent_d_ino=yes
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- jm_cv_struct_dirent_d_ino=no
+-fi
+-rm -f conftest*
+-
+-
+-fi
+-
+-echo "$ac_t""$jm_cv_struct_dirent_d_ino" 1>&6
+- if test $jm_cv_struct_dirent_d_ino = yes; then
+- cat >> confdefs.h <<\EOF
+-#define D_INO_IN_DIRENT 1
+-EOF
+-
+- fi
+-
+
++ ac_config_files="$ac_config_files Makefile"
+
+-trap '' 1 2 15
+-cat > confcache <<\EOF
++cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+-# scripts and configure runs. It is not useful on other systems.
+-# If it contains results you don't want to keep, you may remove or edit it.
++# scripts and configure runs, see configure's option --config-cache.
++# It is not useful on other systems. If it contains results you don't
++# want to keep, you may remove or edit it.
+ #
+-# By default, configure uses ./config.cache as the cache file,
+-# creating it if it does not exist already. You can give configure
+-# the --cache-file=FILE option to use a different cache file; that is
+-# what configure does when it calls configure scripts in
+-# subdirectories, so they share the cache.
+-# Giving --cache-file=/dev/null disables caching, for debugging configure.
+-# config.status only pays attention to the cache file if you give it the
+-# --recheck option to rerun configure.
++# config.status only pays attention to the cache file if you give it
++# the --recheck option to rerun configure.
+ #
+-EOF
++# `ac_cv_env_foo' variables (set or unset) will be overridden when
++# loading this file, other *unset* `ac_cv_foo' will be assigned the
++# following values.
++
++_ACEOF
++
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+-(set) 2>&1 |
+- case `(ac_space=' '; set | grep ac_space) 2>&1` in
+- *ac_space=\ *)
+- # `set' does not quote correctly, so add quotes (double-quote substitution
+- # turns \\\\ into \\, and sed turns \\ into \).
+- sed -n \
+- -e "s/'/'\\\\''/g" \
+- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+- ;;
+- *)
+- # `set' quotes correctly as required by POSIX, so do not add quotes.
+- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+- ;;
+- esac >> confcache
+-if cmp -s $cache_file confcache; then
+- :
+-else
++{
++ (set) 2>&1 |
++ case `(ac_space=' '; set | grep ac_space) 2>&1` in
++ *ac_space=\ *)
++ # `set' does not quote correctly, so add quotes (double-quote
++ # substitution turns \\\\ into \\, and sed turns \\ into \).
++ sed -n \
++ "s/'/'\\\\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++ ;;
++ *)
++ # `set' quotes correctly as required by POSIX, so do not add quotes.
++ sed -n \
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ ;;
++ esac;
++} |
++ sed '
++ t clear
++ : clear
++ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++ t end
++ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ : end' >>confcache
++if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+- echo "updating cache $cache_file"
+- cat confcache > $cache_file
++ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
++ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+ fi
+ rm -f confcache
+
+-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+-
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+-# Any assignment to VPATH causes Sun make to only execute
+-# the first set of double-colon rules, so remove it if not needed.
+-# If there is a colon in the path, we need to keep it.
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
++s/:*\$(srcdir):*/:/;
++s/:*\${srcdir}:*/:/;
++s/:*@srcdir@:*/:/;
++s/^\([^=]*=[ ]*\):*/\1/;
++s/:*$//;
++s/^[^=]*=[ ]*$//;
++}'
+ fi
+
+-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+-
+ DEFS=-DHAVE_CONFIG_H
+
+-# Without the "./", some shells look in PATH for config.status.
+-: ${CONFIG_STATUS=./config.status}
++ac_libobjs=
++ac_ltlibobjs=
++for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
++ # 1. Remove the extension, and $U if already installed.
++ ac_i=`echo "$ac_i" |
++ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
++ # 2. Add them.
++ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++done
++LIBOBJS=$ac_libobjs
+
+-echo creating $CONFIG_STATUS
+-rm -f $CONFIG_STATUS
+-cat > $CONFIG_STATUS <<EOF
+-#! /bin/sh
+-# Generated automatically by configure.
++LTLIBOBJS=$ac_ltlibobjs
++
++
++
++: ${CONFIG_STATUS=./config.status}
++ac_clean_files_save=$ac_clean_files
++ac_clean_files="$ac_clean_files $CONFIG_STATUS"
++{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
++echo "$as_me: creating $CONFIG_STATUS" >&6;}
++cat >$CONFIG_STATUS <<_ACEOF
++#! $SHELL
++# Generated by $as_me.
+ # Run this file to recreate the current configuration.
+-# This directory was configured as follows,
+-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+-#
+-# $0 $ac_configure_args
+-#
+ # Compiler output produced by configure, useful for debugging
+-# configure, is in ./config.log if it exists.
++# configure, is in config.log if it exists.
+
+-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+-for ac_option
++debug=false
++ac_cs_recheck=false
++ac_cs_silent=false
++SHELL=\${CONFIG_SHELL-$SHELL}
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++## --------------------- ##
++## M4sh Initialization. ##
++## --------------------- ##
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
++ set -o posix
++fi
++
++# Support unset when possible.
++if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++ as_unset=unset
++else
++ as_unset=false
++fi
++
++
++# Work around bugs in pre-3.0 UWIN ksh.
++$as_unset ENV MAIL MAILPATH
++PS1='$ '
++PS2='> '
++PS4='+ '
++
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
+ do
+- case "\$ac_option" in
+- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+- echo "$CONFIG_STATUS generated by autoconf version 2.13"
+- exit 0 ;;
+- -help | --help | --hel | --he | --h)
+- echo "\$ac_cs_usage"; exit 0 ;;
+- *) echo "\$ac_cs_usage"; exit 1 ;;
+- esac
++ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ $as_unset $as_var
++ fi
+ done
+
+-ac_given_srcdir=$srcdir
+-ac_given_INSTALL="$INSTALL"
++# Required to use basename.
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
+
+-trap 'rm -fr `echo "Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+-EOF
+-cat >> $CONFIG_STATUS <<EOF
++if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++ as_basename=basename
++else
++ as_basename=false
++fi
+
+-# Protect against being on the right side of a sed subst in config.status.
+-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+-$ac_vpsub
+-$extrasub
+-s%@SHELL@%$SHELL%g
+-s%@CFLAGS@%$CFLAGS%g
+-s%@CPPFLAGS@%$CPPFLAGS%g
+-s%@CXXFLAGS@%$CXXFLAGS%g
+-s%@FFLAGS@%$FFLAGS%g
+-s%@DEFS@%$DEFS%g
+-s%@LDFLAGS@%$LDFLAGS%g
+-s%@LIBS@%$LIBS%g
+-s%@exec_prefix@%$exec_prefix%g
+-s%@prefix@%$prefix%g
+-s%@program_transform_name@%$program_transform_name%g
+-s%@bindir@%$bindir%g
+-s%@sbindir@%$sbindir%g
+-s%@libexecdir@%$libexecdir%g
+-s%@datadir@%$datadir%g
+-s%@sysconfdir@%$sysconfdir%g
+-s%@sharedstatedir@%$sharedstatedir%g
+-s%@localstatedir@%$localstatedir%g
+-s%@libdir@%$libdir%g
+-s%@includedir@%$includedir%g
+-s%@oldincludedir@%$oldincludedir%g
+-s%@infodir@%$infodir%g
+-s%@mandir@%$mandir%g
+-s%@host@%$host%g
+-s%@host_alias@%$host_alias%g
+-s%@host_cpu@%$host_cpu%g
+-s%@host_vendor@%$host_vendor%g
+-s%@host_os@%$host_os%g
+-s%@PACKAGE@%$PACKAGE%g
+-s%@VERSION@%$VERSION%g
+-s%@CC@%$CC%g
+-s%@CPP@%$CPP%g
+-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+-s%@INSTALL_DATA@%$INSTALL_DATA%g
+-s%@SET_MAKE@%$SET_MAKE%g
+-s%@ed_PROGRAM@%$ed_PROGRAM%g
+-s%@build@%$build%g
+-s%@build_alias@%$build_alias%g
+-s%@build_cpu@%$build_cpu%g
+-s%@build_vendor@%$build_vendor%g
+-s%@build_os@%$build_os%g
+-s%@GETCONF@%$GETCONF%g
+-s%@EXEEXT@%$EXEEXT%g
+-s%@U@%$U%g
+-s%@ANSI2KNR@%$ANSI2KNR%g
+-s%@LIBOBJS@%$LIBOBJS%g
+
+-CEOF
+-EOF
++# Name of the executable.
++as_me=`$as_basename "$0" ||
++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)$' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
++ /^X\/\(\/\/\)$/{ s//\1/; q; }
++ /^X\/\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
+
+-cat >> $CONFIG_STATUS <<\EOF
+
+-# Split the substitutions into bite-sized pieces for seds with
+-# small command number limits, like on Digital OSF/1 and HP-UX.
+-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+-ac_file=1 # Number of current file.
+-ac_beg=1 # First line for current file.
+-ac_end=$ac_max_sed_cmds # Line after last line for current file.
+-ac_more_lines=:
+-ac_sed_cmds=""
+-while $ac_more_lines; do
+- if test $ac_beg -gt 1; then
+- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
++# PATH needs CR, and LINENO needs CR and PATH.
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
+ else
+- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
++ PATH_SEPARATOR=:
+ fi
+- if test ! -s conftest.s$ac_file; then
+- ac_more_lines=false
+- rm -f conftest.s$ac_file
++ rm -f conf$$.sh
++fi
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" || {
++ # Find who we are. Look in the path if we contain no path at all
++ # relative or not.
++ case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++
++ ;;
++ esac
++ # We did not find ourselves, most probably we were run as `sh COMMAND'
++ # in which case we are not to be found in the path.
++ if test "x$as_myself" = x; then
++ as_myself=$0
++ fi
++ if test ! -f "$as_myself"; then
++ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
++echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
++ { (exit 1); exit 1; }; }
++ fi
++ case $CONFIG_SHELL in
++ '')
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for as_base in sh bash ksh sh5; do
++ case $as_dir in
++ /*)
++ if ("$as_dir/$as_base" -c '
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
++ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
++ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
++ CONFIG_SHELL=$as_dir/$as_base
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
++ fi;;
++ esac
++ done
++done
++;;
++ esac
++
++ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
++ # uniformly replaced by the line number. The first 'sed' inserts a
++ # line-number line before each line; the second 'sed' does the real
++ # work. The second script uses 'N' to pair each line-number line
++ # with the numbered line, and appends trailing '-' during
++ # substitution so that $LINENO is not a special case at line end.
++ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
++ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
++ sed '=' <$as_myself |
++ sed '
++ N
++ s,$,-,
++ : loop
++ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ t loop
++ s,-$,,
++ s,^['$as_cr_digits']*\n,,
++ ' >$as_me.lineno &&
++ chmod +x $as_me.lineno ||
++ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
++echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
++ { (exit 1); exit 1; }; }
++
++ # Don't try to exec as it changes $[0], causing all sort of problems
++ # (the dirname of $[0] is not the place where we might find the
++ # original and so on. Autoconf is especially sensible to this).
++ . ./$as_me.lineno
++ # Exit status is that of the last command.
++ exit
++}
++
++
++case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
++ *c*,-n*) ECHO_N= ECHO_C='
++' ECHO_T=' ' ;;
++ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
++ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++esac
++
++if expr a : '\(a\)' >/dev/null 2>&1; then
++ as_expr=expr
++else
++ as_expr=false
++fi
++
++rm -f conf$$ conf$$.exe conf$$.file
++echo >conf$$.file
++if ln -s conf$$.file conf$$ 2>/dev/null; then
++ # We could just check for DJGPP; but this test a) works b) is more generic
++ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
++ if test -f conf$$.exe; then
++ # Don't use ln at all; we don't have any links
++ as_ln_s='cp -p'
+ else
+- if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds="sed -f conftest.s$ac_file"
+- else
+- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+- fi
+- ac_file=`expr $ac_file + 1`
+- ac_beg=$ac_end
+- ac_end=`expr $ac_end + $ac_max_sed_cmds`
++ as_ln_s='ln -s'
+ fi
++elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++else
++ as_ln_s='cp -p'
++fi
++rm -f conf$$ conf$$.exe conf$$.file
++
++if mkdir -p . 2>/dev/null; then
++ as_mkdir_p=:
++else
++ as_mkdir_p=false
++fi
++
++as_executable_p="test -f"
++
++# Sed expression to map a string onto a valid CPP name.
++as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
++
++# Sed expression to map a string onto a valid variable name.
++as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
++
++
++# IFS
++# We need space, tab and new line, in precisely that order.
++as_nl='
++'
++IFS=" $as_nl"
++
++# CDPATH.
++$as_unset CDPATH
++
++exec 6>&1
++
++# Open the log real soon, to keep \$[0] and so on meaningful, and to
++# report actual input values of CONFIG_FILES etc. instead of their
++# values after options handling. Logging --version etc. is OK.
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++} >&5
++cat >&5 <<_CSEOF
++
++This file was extended by patch $as_me 2.5.9, which was
++generated by GNU Autoconf 2.57. Invocation command line was
++
++ CONFIG_FILES = $CONFIG_FILES
++ CONFIG_HEADERS = $CONFIG_HEADERS
++ CONFIG_LINKS = $CONFIG_LINKS
++ CONFIG_COMMANDS = $CONFIG_COMMANDS
++ $ $0 $@
++
++_CSEOF
++echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
++echo >&5
++_ACEOF
++
++# Files that config.status was made for.
++if test -n "$ac_config_files"; then
++ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_headers"; then
++ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_links"; then
++ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
++fi
++
++if test -n "$ac_config_commands"; then
++ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++ac_cs_usage="\
++\`$as_me' instantiates files from templates according to the
++current configuration.
++
++Usage: $0 [OPTIONS] [FILE]...
++
++ -h, --help print this help, then exit
++ -V, --version print version number, then exit
++ -q, --quiet do not print progress messages
++ -d, --debug don't remove temporary files
++ --recheck update $as_me by reconfiguring in the same conditions
++ --file=FILE[:TEMPLATE]
++ instantiate the configuration file FILE
++ --header=FILE[:TEMPLATE]
++ instantiate the configuration header FILE
++
++Configuration files:
++$config_files
++
++Configuration headers:
++$config_headers
++
++Report bugs to <bug-autoconf@gnu.org>."
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++ac_cs_version="\\
++patch config.status 2.5.9
++configured by $0, generated by GNU Autoconf 2.57,
++ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++
++Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
++Free Software Foundation, Inc.
++This config.status script is free software; the Free Software Foundation
++gives unlimited permission to copy, distribute and modify it."
++srcdir=$srcdir
++INSTALL="$INSTALL"
++_ACEOF
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If no file are specified by the user, then we need to provide default
++# value. By we need to know if files were specified by the user.
++ac_need_defaults=:
++while test $# != 0
++do
++ case $1 in
++ --*=*)
++ ac_option=`expr "x$1" : 'x\([^=]*\)='`
++ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
++ ac_shift=:
++ ;;
++ -*)
++ ac_option=$1
++ ac_optarg=$2
++ ac_shift=shift
++ ;;
++ *) # This is not an option, so the user has probably given explicit
++ # arguments.
++ ac_option=$1
++ ac_need_defaults=false;;
++ esac
++
++ case $ac_option in
++ # Handling of the options.
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++ ac_cs_recheck=: ;;
++ --version | --vers* | -V )
++ echo "$ac_cs_version"; exit 0 ;;
++ --he | --h)
++ # Conflict between --help and --header
++ { { echo "$as_me:$LINENO: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&5
++echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2;}
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit 0 ;;
++ --debug | --d* | -d )
++ debug=: ;;
++ --file | --fil | --fi | --f )
++ $ac_shift
++ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
++ ac_need_defaults=false;;
++ --header | --heade | --head | --hea )
++ $ac_shift
++ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++ ac_need_defaults=false;;
++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++ | -silent | --silent | --silen | --sile | --sil | --si | --s)
++ ac_cs_silent=: ;;
++
++ # This is an error.
++ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&5
++echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2;}
++ { (exit 1); exit 1; }; } ;;
++
++ *) ac_config_targets="$ac_config_targets $1" ;;
++
++ esac
++ shift
+ done
+-if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds=cat
++
++ac_configure_extra_args=
++
++if $ac_cs_silent; then
++ exec 6>/dev/null
++ ac_configure_extra_args="$ac_configure_extra_args --silent"
+ fi
+-EOF
+
+-cat >> $CONFIG_STATUS <<EOF
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++if \$ac_cs_recheck; then
++ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++fi
+
+-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+-EOF
+-cat >> $CONFIG_STATUS <<\EOF
+-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+- case "$ac_file" in
+- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+- *) ac_file_in="${ac_file}.in" ;;
++_ACEOF
++
++
++
++
++
++cat >>$CONFIG_STATUS <<\_ACEOF
++for ac_config_target in $ac_config_targets
++do
++ case "$ac_config_target" in
++ # Handling of arguments.
++ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
++ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
++echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
++ { (exit 1); exit 1; }; };;
+ esac
++done
+
+- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
++# If the user did not use the arguments to specify the items to instantiate,
++# then the envvar interface is used. Set only those that are not.
++# We use the long form for the default assignment because of an extremely
++# bizarre bug on SunOS 4.1.3.
++if $ac_need_defaults; then
++ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
++ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
++fi
+
+- # Remove last slash and all that follows it. Not all systems have dirname.
+- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+- # The file is in a subdirectory.
+- test ! -d "$ac_dir" && mkdir "$ac_dir"
+- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+- else
+- ac_dir_suffix= ac_dots=
++# Have a temporary directory for convenience. Make it in the build tree
++# simply because there is no reason to put it here, and in addition,
++# creating and moving files from /tmp can sometimes cause problems.
++# Create a temporary directory, and hook for its removal unless debugging.
++$debug ||
++{
++ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
++ trap '{ (exit 1); exit 1; }' 1 2 13 15
++}
++
++# Create a (secure) tmp directory for tmp files.
++
++{
++ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
++ test -n "$tmp" && test -d "$tmp"
++} ||
++{
++ tmp=./confstat$$-$RANDOM
++ (umask 077 && mkdir $tmp)
++} ||
++{
++ echo "$me: cannot create a temporary directory in ." >&2
++ { (exit 1); exit 1; }
++}
++
++_ACEOF
++
++cat >>$CONFIG_STATUS <<_ACEOF
++
++#
++# CONFIG_FILES section.
++#
++
++# No need to generate the scripts if there are no CONFIG_FILES.
++# This happens for instance when ./config.status config.h
++if test -n "\$CONFIG_FILES"; then
++ # Protect against being on the right side of a sed subst in config.status.
++ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
++ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
++s,@SHELL@,$SHELL,;t t
++s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
++s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
++s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
++s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
++s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
++s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
++s,@exec_prefix@,$exec_prefix,;t t
++s,@prefix@,$prefix,;t t
++s,@program_transform_name@,$program_transform_name,;t t
++s,@bindir@,$bindir,;t t
++s,@sbindir@,$sbindir,;t t
++s,@libexecdir@,$libexecdir,;t t
++s,@datadir@,$datadir,;t t
++s,@sysconfdir@,$sysconfdir,;t t
++s,@sharedstatedir@,$sharedstatedir,;t t
++s,@localstatedir@,$localstatedir,;t t
++s,@libdir@,$libdir,;t t
++s,@includedir@,$includedir,;t t
++s,@oldincludedir@,$oldincludedir,;t t
++s,@infodir@,$infodir,;t t
++s,@mandir@,$mandir,;t t
++s,@build_alias@,$build_alias,;t t
++s,@host_alias@,$host_alias,;t t
++s,@target_alias@,$target_alias,;t t
++s,@DEFS@,$DEFS,;t t
++s,@ECHO_C@,$ECHO_C,;t t
++s,@ECHO_N@,$ECHO_N,;t t
++s,@ECHO_T@,$ECHO_T,;t t
++s,@LIBS@,$LIBS,;t t
++s,@CC@,$CC,;t t
++s,@CFLAGS@,$CFLAGS,;t t
++s,@LDFLAGS@,$LDFLAGS,;t t
++s,@CPPFLAGS@,$CPPFLAGS,;t t
++s,@ac_ct_CC@,$ac_ct_CC,;t t
++s,@EXEEXT@,$EXEEXT,;t t
++s,@OBJEXT@,$OBJEXT,;t t
++s,@CPP@,$CPP,;t t
++s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
++s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
++s,@INSTALL_DATA@,$INSTALL_DATA,;t t
++s,@SET_MAKE@,$SET_MAKE,;t t
++s,@ed_PROGRAM@,$ed_PROGRAM,;t t
++s,@EGREP@,$EGREP,;t t
++s,@STDBOOL_H@,$STDBOOL_H,;t t
++s,@HAVE__BOOL@,$HAVE__BOOL,;t t
++s,@LIBOBJS@,$LIBOBJS,;t t
++s,@LTLIBOBJS@,$LTLIBOBJS,;t t
++CEOF
++
++_ACEOF
++
++ cat >>$CONFIG_STATUS <<\_ACEOF
++ # Split the substitutions into bite-sized pieces for seds with
++ # small command number limits, like on Digital OSF/1 and HP-UX.
++ ac_max_sed_lines=48
++ ac_sed_frag=1 # Number of current file.
++ ac_beg=1 # First line for current file.
++ ac_end=$ac_max_sed_lines # Line after last line for current file.
++ ac_more_lines=:
++ ac_sed_cmds=
++ while $ac_more_lines; do
++ if test $ac_beg -gt 1; then
++ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
++ else
++ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
++ fi
++ if test ! -s $tmp/subs.frag; then
++ ac_more_lines=false
++ else
++ # The purpose of the label and of the branching condition is to
++ # speed up the sed processing (if there are no `@' at all, there
++ # is no need to browse any of the substitutions).
++ # These are the two extra sed commands mentioned above.
++ (echo ':t
++ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
++ if test -z "$ac_sed_cmds"; then
++ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
++ else
++ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
++ fi
++ ac_sed_frag=`expr $ac_sed_frag + 1`
++ ac_beg=$ac_end
++ ac_end=`expr $ac_end + $ac_max_sed_lines`
++ fi
++ done
++ if test -z "$ac_sed_cmds"; then
++ ac_sed_cmds=cat
+ fi
++fi # test -n "$CONFIG_FILES"
+
+- case "$ac_given_srcdir" in
+- .) srcdir=.
+- if test -z "$ac_dots"; then top_srcdir=.
+- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+- *) # Relative path.
+- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+- top_srcdir="$ac_dots$ac_given_srcdir" ;;
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++ case $ac_file in
++ - | *:- | *:-:* ) # input from stdin
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+- case "$ac_given_INSTALL" in
+- [/$]*) INSTALL="$ac_given_INSTALL" ;;
+- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+- esac
++ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p "$ac_dir"
++ else
++ as_dir="$ac_dir"
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ { (exit 1); exit 1; }; }; }
+
+- echo creating "$ac_file"
+- rm -f "$ac_file"
+- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+- case "$ac_file" in
+- *Makefile*) ac_comsub="1i\\
+-# $configure_input" ;;
+- *) ac_comsub= ;;
++ ac_builddir=.
++
++if test "$ac_dir" != .; then
++ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
++ # A "../" for each directory in $ac_dir_suffix.
++ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
++else
++ ac_dir_suffix= ac_top_builddir=
++fi
++
++case $srcdir in
++ .) # No --srcdir option. We are building in place.
++ ac_srcdir=.
++ if test -z "$ac_top_builddir"; then
++ ac_top_srcdir=.
++ else
++ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
++ fi ;;
++ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_srcdir=$srcdir$ac_dir_suffix;
++ ac_top_srcdir=$srcdir ;;
++ *) # Relative path.
++ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++esac
++# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
++# absolute.
++ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
++ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
++ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
++ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
++
++
++ case $INSTALL in
++ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
++ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+- sed -e "$ac_comsub
+-s%@configure_input@%$configure_input%g
+-s%@srcdir@%$srcdir%g
+-s%@top_srcdir@%$top_srcdir%g
+-s%@INSTALL@%$INSTALL%g
+-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+-fi; done
+-rm -f conftest.s*
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ if test x"$ac_file" = x-; then
++ configure_input=
++ else
++ configure_input="$ac_file. "
++ fi
++ configure_input=$configure_input"Generated from `echo $ac_file_in |
++ sed 's,.*/,,'` by configure."
++
++ # First look for the input files in the build tree, otherwise in the
++ # src tree.
++ ac_file_inputs=`IFS=:
++ for f in $ac_file_in; do
++ case $f in
++ -) echo $tmp/stdin ;;
++ [\\/$]*)
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ echo $f;;
++ *) # Relative
++ if test -f "$f"; then
++ # Build tree
++ echo $f
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo $srcdir/$f
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ fi;;
++ esac
++ done` || { (exit 1); exit 1; }
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ sed "$ac_vpsub
++$extrasub
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++:t
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++s,@configure_input@,$configure_input,;t t
++s,@srcdir@,$ac_srcdir,;t t
++s,@abs_srcdir@,$ac_abs_srcdir,;t t
++s,@top_srcdir@,$ac_top_srcdir,;t t
++s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
++s,@builddir@,$ac_builddir,;t t
++s,@abs_builddir@,$ac_abs_builddir,;t t
++s,@top_builddir@,$ac_top_builddir,;t t
++s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
++s,@INSTALL@,$ac_INSTALL,;t t
++" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
++ rm -f $tmp/stdin
++ if test x"$ac_file" != x-; then
++ mv $tmp/out $ac_file
++ else
++ cat $tmp/out
++ rm -f $tmp/out
++ fi
++
++done
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++
++#
++# CONFIG_HEADER section.
++#
+
+ # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+ # NAME is the cpp macro being defined and VALUE is the value it is being given.
+ #
+ # ac_d sets the value in "#define NAME VALUE" lines.
+-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+-ac_dC='\3'
+-ac_dD='%g'
+-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+-ac_uB='\([ ]\)%\1#\2define\3'
++ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
++ac_dB='[ ].*$,\1#\2'
++ac_dC=' '
++ac_dD=',;t'
++# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
++ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
++ac_uB='$,\1#\2define\3'
+ ac_uC=' '
+-ac_uD='\4%g'
+-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+-ac_eB='$%\1#\2define\3'
+-ac_eC=' '
+-ac_eD='%g'
++ac_uD=',;t'
+
+-if test "${CONFIG_HEADERS+set}" != set; then
+-EOF
+-cat >> $CONFIG_STATUS <<EOF
+- CONFIG_HEADERS="config.h:config.hin"
+-EOF
+-cat >> $CONFIG_STATUS <<\EOF
+-fi
+-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
++for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+- case "$ac_file" in
+- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+- *) ac_file_in="${ac_file}.in" ;;
++ case $ac_file in
++ - | *:- | *:-:* ) # input from stdin
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+- echo creating $ac_file
++ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
+
+- rm -f conftest.frag conftest.in conftest.out
+- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+- cat $ac_file_inputs > conftest.in
++ # First look for the input files in the build tree, otherwise in the
++ # src tree.
++ ac_file_inputs=`IFS=:
++ for f in $ac_file_in; do
++ case $f in
++ -) echo $tmp/stdin ;;
++ [\\/$]*)
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ echo $f;;
++ *) # Relative
++ if test -f "$f"; then
++ # Build tree
++ echo $f
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo $srcdir/$f
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++echo "$as_me: error: cannot find input file: $f" >&2;}
++ { (exit 1); exit 1; }; }
++ fi;;
++ esac
++ done` || { (exit 1); exit 1; }
++ # Remove the trailing spaces.
++ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+-EOF
++_ACEOF
+
+-# Transform confdefs.h into a sed script conftest.vals that substitutes
+-# the proper values into config.h.in to produce config.h. And first:
+-# Protect against being on the right side of a sed subst in config.status.
+-# Protect against being in an unquoted here document in config.status.
+-rm -f conftest.vals
+-cat > conftest.hdr <<\EOF
+-s/[\\&%]/\\&/g
+-s%[\\$`]%\\&%g
+-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+-s%ac_d%ac_u%gp
+-s%ac_u%ac_e%gp
+-EOF
+-sed -n -f conftest.hdr confdefs.h > conftest.vals
+-rm -f conftest.hdr
++# Transform confdefs.h into two sed scripts, `conftest.defines' and
++# `conftest.undefs', that substitutes the proper values into
++# config.h.in to produce config.h. The first handles `#define'
++# templates, and the second `#undef' templates.
++# And first: Protect against being on the right side of a sed subst in
++# config.status. Protect against being in an unquoted here document
++# in config.status.
++rm -f conftest.defines conftest.undefs
++# Using a here document instead of a string reduces the quoting nightmare.
++# Putting comments in sed scripts is not portable.
++#
++# `end' is used to avoid that the second main sed command (meant for
++# 0-ary CPP macros) applies to n-ary macro definitions.
++# See the Autoconf documentation for `clear'.
++cat >confdef2sed.sed <<\_ACEOF
++s/[\\&,]/\\&/g
++s,[\\$`],\\&,g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
++t end
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
++: end
++_ACEOF
++# If some macros were called several times there might be several times
++# the same #defines, which is useless. Nevertheless, we may not want to
++# sort them, since we want the *last* AC-DEFINE to be honored.
++uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
++sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
++rm -f confdef2sed.sed
+
+ # This sed command replaces #undef with comments. This is necessary, for
+ # example, in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+-cat >> conftest.vals <<\EOF
+-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+-EOF
++cat >>conftest.undefs <<\_ACEOF
++s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
++_ACEOF
+
+-# Break up conftest.vals because some shells have a limit on
+-# the size of here documents, and old seds have small limits too.
++# Break up conftest.defines because some shells have a limit on the size
++# of here documents, and old seds have small limits too (100 cmds).
++echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
++echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
++echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
++echo ' :' >>$CONFIG_STATUS
++rm -f conftest.tail
++while grep . conftest.defines >/dev/null
++do
++ # Write a limited-size here document to $tmp/defines.sed.
++ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
++ # Speed up: don't consider the non `#define' lines.
++ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
++ # Work around the forget-to-reset-the-flag bug.
++ echo 't clr' >>$CONFIG_STATUS
++ echo ': clr' >>$CONFIG_STATUS
++ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
++ echo 'CEOF
++ sed -f $tmp/defines.sed $tmp/in >$tmp/out
++ rm -f $tmp/in
++ mv $tmp/out $tmp/in
++' >>$CONFIG_STATUS
++ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
++ rm -f conftest.defines
++ mv conftest.tail conftest.defines
++done
++rm -f conftest.defines
++echo ' fi # grep' >>$CONFIG_STATUS
++echo >>$CONFIG_STATUS
+
++# Break up conftest.undefs because some shells have a limit on the size
++# of here documents, and old seds have small limits too (100 cmds).
++echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+ rm -f conftest.tail
+-while :
++while grep . conftest.undefs >/dev/null
+ do
+- ac_lines=`grep -c . conftest.vals`
+- # grep -c gives empty output for an empty file on some AIX systems.
+- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+- # Write a limited-size here document to conftest.frag.
+- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
++ # Write a limited-size here document to $tmp/undefs.sed.
++ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
++ # Speed up: don't consider the non `#undef'
++ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
++ # Work around the forget-to-reset-the-flag bug.
++ echo 't clr' >>$CONFIG_STATUS
++ echo ': clr' >>$CONFIG_STATUS
++ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+- sed -f conftest.frag conftest.in > conftest.out
+- rm -f conftest.in
+- mv conftest.out conftest.in
+-' >> $CONFIG_STATUS
+- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+- rm -f conftest.vals
+- mv conftest.tail conftest.vals
++ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
++ rm -f $tmp/in
++ mv $tmp/out $tmp/in
++' >>$CONFIG_STATUS
++ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
++ rm -f conftest.undefs
++ mv conftest.tail conftest.undefs
+ done
+-rm -f conftest.vals
++rm -f conftest.undefs
+
+-cat >> $CONFIG_STATUS <<\EOF
+- rm -f conftest.frag conftest.h
+- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+- cat conftest.in >> conftest.h
+- rm -f conftest.in
+- if cmp -s $ac_file conftest.h 2>/dev/null; then
+- echo "$ac_file is unchanged"
+- rm -f conftest.h
++cat >>$CONFIG_STATUS <<\_ACEOF
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ if test x"$ac_file" = x-; then
++ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+- # Remove last slash and all that follows it. Not all systems have dirname.
+- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+- # The file is in a subdirectory.
+- test ! -d "$ac_dir" && mkdir "$ac_dir"
+- fi
+- rm -f $ac_file
+- mv conftest.h $ac_file
++ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+-fi; done
++ cat $tmp/in >>$tmp/config.h
++ rm -f $tmp/in
++ if test x"$ac_file" != x-; then
++ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
++ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
++echo "$as_me: $ac_file is unchanged" >&6;}
++ else
++ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ { if $as_mkdir_p; then
++ mkdir -p "$ac_dir"
++ else
++ as_dir="$ac_dir"
++ as_dirs=
++ while test ! -d "$as_dir"; do
++ as_dirs="$as_dir $as_dirs"
++ as_dir=`(dirname "$as_dir") 2>/dev/null ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
++echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
++ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
++ /^X\(\/\/\)$/{ s//\1/; q; }
++ /^X\(\/\).*/{ s//\1/; q; }
++ s/.*/./; q'`
++ done
++ test ! -n "$as_dirs" || mkdir $as_dirs
++ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
++echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ { (exit 1); exit 1; }; }; }
+
+-EOF
+-cat >> $CONFIG_STATUS <<EOF
++ rm -f $ac_file
++ mv $tmp/config.h $ac_file
++ fi
++ else
++ cat $tmp/config.h
++ rm -f $tmp/config.h
++ fi
++done
++_ACEOF
+
+-EOF
+-cat >> $CONFIG_STATUS <<\EOF
++cat >>$CONFIG_STATUS <<\_ACEOF
+
+-exit 0
+-EOF
++{ (exit 0); exit 0; }
++_ACEOF
+ chmod +x $CONFIG_STATUS
+-rm -fr confdefs* $ac_clean_files
+-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
++ac_clean_files=$ac_clean_files_save
++
++
++# configure is writing to config.log, and then calls config.status.
++# config.status does its own redirection, appending to config.log.
++# Unfortunately, on DOS this fails, as config.log is still kept open
++# by configure, so config.status won't be able to write to it; its
++# output is simply discarded. So we exec the FD to /dev/null,
++# effectively closing config.log, so it can be properly (re)opened and
++# appended to by config.status. When coming back to configure, we
++# need to make the FD available again.
++if test "$no_create" != yes; then
++ ac_cs_success=:
++ ac_config_status_args=
++ test "$silent" = yes &&
++ ac_config_status_args="$ac_config_status_args --quiet"
++ exec 5>/dev/null
++ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
++ exec 5>>config.log
++ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
++ # would make configure fail if this is the last instruction.
++ $ac_cs_success || { (exit 1); exit 1; }
++fi
+
+diff -urNd -urNd patch-2.5.4/configure.ac patch-2.5.9/configure.ac
+--- patch-2.5.4/configure.ac 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/configure.ac 2003-05-19 02:44:57.000000000 -0400
+@@ -0,0 +1,95 @@
++# Configure `patch'.
++
++# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003 Free Software
++# Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++AC_PREREQ(2.57)
++AC_INIT(patch, 2.5.9, bug-patch@gnu.org)
++AC_CONFIG_SRCDIR(patch.c)
++AC_CONFIG_HEADER(config.h:config.hin)
++AC_ARG_PROGRAM
++
++AC_PROG_CC
++AC_PROG_CPP
++AC_PROG_INSTALL
++AC_PROG_MAKE_SET
++# Use ed_PROGRAM, not ED_PROGRAM,
++# because <errno.h> reserves symbols starting with `E'.
++AC_PATH_PROG(ed_PROGRAM, ed, ed)
++
++AC_GNU_SOURCE
++AC_AIX
++AC_MINIX
++AC_PROG_CC_STDC
++AC_ISC_POSIX
++AC_SYS_LARGEFILE
++AC_EXEEXT
++
++AC_C_PROTOTYPES
++AC_C_CONST
++
++AC_HEADER_DIRENT
++AC_HEADER_STDC
++AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
++
++AC_TYPE_MODE_T
++AC_TYPE_OFF_T
++AC_TYPE_PID_T
++AC_TYPE_SIGNAL
++AC_TYPE_SIZE_T
++AM_STDBOOL_H
++jm_CHECK_TYPE_STRUCT_UTIMBUF
++
++gl_BACKUPFILE
++gl_DIRNAME
++gl_ERROR
++gl_FUNC_MEMCHR
++gl_FUNC_RMDIR
++gl_GETOPT
++gl_PREREQ_XMALLOC
++gl_QUOTE
++gl_QUOTEARG
++
++dnl This should be in gnulib, but isn't for some reason.
++AC_DEFUN([jm_PREREQ_ADDEXT],
++[
++ dnl For addext.c.
++ AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
++ AC_CHECK_FUNCS(pathconf)
++ AC_CHECK_HEADERS(limits.h string.h unistd.h)
++])
++jm_PREREQ_ADDEXT
++
++AC_CHECK_DECLS([free, getenv, malloc, mktemp])
++AC_CHECK_FUNCS(_doprintf geteuid getuid isascii memcmp mktemp \
++ pathconf raise sigaction sigprocmask sigsetmask strerror)
++AC_REPLACE_FUNCS(mkdir strncasecmp)
++AC_FUNC_FSEEKO
++jm_FUNC_GLIBC_UNLOCKED_IO
++jm_FUNC_MALLOC
++jm_FUNC_REALLOC
++AC_FUNC_CLOSEDIR_VOID
++AC_FUNC_SETMODE_DOS
++AC_FUNC_VPRINTF
++PATCH_FUNC_MKDIR_TAKES_ONE_ARG
++
++jm_AC_DOS
++AC_SYS_LONG_FILE_NAMES
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+diff -urNd -urNd patch-2.5.4/configure.in patch-2.5.9/configure.in
+--- patch-2.5.4/configure.in 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/configure.in 1969-12-31 19:00:00.000000000 -0500
+@@ -1,59 +0,0 @@
+-# Configure `patch'.
+-# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
+-dnl Process this file with autoconf to produce a configure script.
+-
+-AC_PREREQ(2.12)
+-AC_INIT(patch.c)
+-AC_CONFIG_HEADER(config.h:config.hin)
+-AC_ARG_PROGRAM
+-AC_CANONICAL_HOST
+-
+-PACKAGE=patch
+-VERSION=2.5.4
+-AC_SUBST(PACKAGE)
+-AC_SUBST(VERSION)
+-
+-AC_PROG_CC
+-AC_PROG_CPP
+-AC_PROG_INSTALL
+-AC_PROG_MAKE_SET
+-# Use ed_PROGRAM, not ED_PROGRAM,
+-# because <errno.h> reserves symbols starting with `E'.
+-AC_PATH_PROG(ed_PROGRAM, ed, ed)
+-
+-AC_SYS_LARGEFILE
+-
+-AC_AIX
+-AC_MINIX
+-AC_ISC_POSIX
+-AC_EXEEXT
+-
+-AM_C_PROTOTYPES
+-AC_C_CONST
+-
+-AC_HEADER_DIRENT
+-AC_HEADER_STDC
+-AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
+-jm_AC_HEADER_INTTYPES_H
+-
+-AC_TYPE_MODE_T
+-AC_TYPE_OFF_T
+-AC_TYPE_PID_T
+-AC_TYPE_SIGNAL
+-AC_TYPE_SIZE_T
+-jm_STRUCT_UTIMBUF
+-
+-AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"])
+-AC_SUBST(LIBOBJS)
+-AC_CHECK_FUNCS(_doprintf isascii fseeko memcmp mktemp \
+- pathconf raise setmode sigaction sigprocmask sigsetmask strerror)
+-AC_REPLACE_FUNCS(memchr mkdir rename rmdir)
+-jm_FUNC_MALLOC
+-jm_FUNC_REALLOC
+-AC_FUNC_CLOSEDIR_VOID
+-AC_FUNC_VPRINTF
+-
+-AC_SYS_LONG_FILE_NAMES
+-jm_STRUCT_DIRENT_D_INO
+-
+-AC_OUTPUT(Makefile)
+diff -urNd -urNd patch-2.5.4/COPYING patch-2.5.9/COPYING
+--- patch-2.5.4/COPYING 1998-02-28 20:21:09.000000000 -0500
++++ patch-2.5.9/COPYING 1999-02-10 00:47:30.000000000 -0500
+@@ -2,7 +2,7 @@
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+@@ -291,7 +291,7 @@
+ the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+- Copyright (C) 19yy <name of author>
++ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -313,7 +313,7 @@
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+- Gnomovision version 69, Copyright (C) 19yy name of author
++ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+diff -urNd -urNd patch-2.5.4/debian.patch patch-2.5.9/debian.patch
+diff -urNd -urNd patch-2.5.4/dirname.c patch-2.5.9/dirname.c
+--- patch-2.5.4/dirname.c 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/dirname.c 2003-04-05 01:49:44.000000000 -0500
+@@ -0,0 +1,121 @@
++/* dirname.c -- return all but the last element in a path
++ Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#if STDC_HEADERS || HAVE_STRING_H
++# include <string.h>
++#endif
++
++#include "dirname.h"
++#include "xalloc.h"
++
++/* Return the length of `dirname (PATH)', or zero if PATH is
++ in the working directory. Works properly even if
++ there are trailing slashes (by effectively ignoring them). */
++size_t
++dir_len (char const *path)
++{
++ size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
++ size_t length;
++
++ /* Strip the basename and any redundant slashes before it. */
++ for (length = base_name (path) - path; prefix_length < length; length--)
++ if (! ISSLASH (path[length - 1]))
++ return length;
++
++ /* But don't strip the only slash from "/". */
++ return prefix_length + ISSLASH (path[prefix_length]);
++}
++
++/* Return the leading directories part of PATH,
++ allocated with xmalloc.
++ Works properly even if there are trailing slashes
++ (by effectively ignoring them). */
++
++char *
++dir_name (char const *path)
++{
++ size_t length = dir_len (path);
++ int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
++ char *newpath = xmalloc (length + append_dot + 1);
++ memcpy (newpath, path, length);
++ if (append_dot)
++ newpath[length++] = '.';
++ newpath[length] = 0;
++ return newpath;
++}
++
++#ifdef TEST_DIRNAME
++/*
++
++Run the test like this (expect no output):
++ gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
++ basename.c dirname.c xmalloc.c error.c
++ sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
++
++If it's been built on a DOS or Windows platforms, run another test like
++this (again, expect no output):
++ sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
++
++BEGIN-DATA
++foo//// .
++bar/foo//// bar
++foo/ .
++/ /
++. .
++a .
++END-DATA
++
++BEGIN-DOS-DATA
++c:///// c:/
++c:/ c:/
++c:/. c:/
++c:foo c:.
++c:foo/bar c:foo
++END-DOS-DATA
++
++*/
++
++# define MAX_BUFF_LEN 1024
++# include <stdio.h>
++
++char *program_name;
++
++int
++main (int argc, char *argv[])
++{
++ char buff[MAX_BUFF_LEN + 1];
++
++ program_name = argv[0];
++
++ buff[MAX_BUFF_LEN] = 0;
++ while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
++ {
++ char path[MAX_BUFF_LEN];
++ char expected_result[MAX_BUFF_LEN];
++ char const *result;
++ sscanf (buff, "%s %s", path, expected_result);
++ result = dir_name (path);
++ if (strcmp (result, expected_result))
++ printf ("%s: got %s, expected %s\n", path, result, expected_result);
++ }
++ return 0;
++}
++#endif
+diff -urNd -urNd patch-2.5.4/dirname.h patch-2.5.9/dirname.h
+--- patch-2.5.4/dirname.h 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/dirname.h 2001-05-12 11:46:36.000000000 -0400
+@@ -0,0 +1,47 @@
++/* Copyright (C) 1998, 2001 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#ifndef DIRNAME_H_
++# define DIRNAME_H_ 1
++
++# ifndef PARAMS
++# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
++# define PARAMS(Args) Args
++# else
++# define PARAMS(Args) ()
++# endif
++# endif
++
++# ifndef DIRECTORY_SEPARATOR
++# define DIRECTORY_SEPARATOR '/'
++# endif
++
++# ifndef ISSLASH
++# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
++# endif
++
++# ifndef FILESYSTEM_PREFIX_LEN
++# define FILESYSTEM_PREFIX_LEN(Filename) 0
++# endif
++
++char *base_name PARAMS ((char const *path));
++char *dir_name PARAMS ((char const *path));
++size_t base_len PARAMS ((char const *path));
++size_t dir_len PARAMS ((char const *path));
++
++int strip_trailing_slashes PARAMS ((char *path));
++
++#endif /* not DIRNAME_H_ */
+diff -urNd -urNd patch-2.5.4/error.c patch-2.5.9/error.c
+--- patch-2.5.4/error.c 1998-11-15 12:35:34.000000000 -0500
++++ patch-2.5.9/error.c 2002-12-06 03:08:13.000000000 -0500
+@@ -1,23 +1,18 @@
+ /* Error handler for noninteractive utilities
+- Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
+-
+- This file is part of the GNU C Library. Its master source is NOT part of
+- the C library, however. The master source lives in /gd/gnu/lib.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public License as
+- published by the Free Software Foundation; either version 2 of the
+- License, or (at your option) any later version.
++ Copyright (C) 1990-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
+
+- The GNU C Library is distributed in the hope that it will be useful,
++ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+@@ -27,6 +22,17 @@
+
+ #include <stdio.h>
+
++#ifdef _LIBC
++# include <libintl.h>
++#else
++# include "gettext.h"
++#endif
++
++#ifdef _LIBC
++# include <wchar.h>
++# define mbsrtowcs __mbsrtowcs
++#endif
++
+ #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
+ # if __STDC__
+ # include <stdarg.h>
+@@ -49,6 +55,10 @@
+
+ #include "error.h"
+
++#if !_LIBC
++# include "unlocked-io.h"
++#endif
++
+ #ifndef _
+ # define _(String) String
+ #endif
+@@ -70,29 +80,52 @@
+
+ # define program_name program_invocation_name
+ # include <errno.h>
++# include <libio/libioP.h>
+
+ /* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
++extern void __error (int status, int errnum, const char *message, ...)
++ __attribute__ ((__format__ (__printf__, 3, 4)));
++extern void __error_at_line (int status, int errnum, const char *file_name,
++ unsigned int line_number, const char *message,
++ ...)
++ __attribute__ ((__format__ (__printf__, 5, 6)));;
+ # define error __error
+ # define error_at_line __error_at_line
+
++# ifdef USE_IN_LIBIO
++# include <libio/iolibio.h>
++# define fflush(s) INTUSE(_IO_fflush) (s)
++# undef putc
++# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
++# endif
++
+ #else /* not _LIBC */
+
++# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
++# ifndef HAVE_DECL_STRERROR_R
++"this configure-time declaration test was not run"
++# endif
++char *strerror_r ();
++# endif
++
+ /* The calling program should define program_name and set it to the
+ name of the executing program. */
+ extern char *program_name;
+
+-# ifdef HAVE_STRERROR_R
++# if HAVE_STRERROR_R || defined strerror_r
+ # define __strerror_r strerror_r
+ # else
+ # if HAVE_STRERROR
+-# ifndef strerror /* On some systems, strerror is a macro */
++# ifndef HAVE_DECL_STRERROR
++"this configure-time declaration test was not run"
++# endif
++# if !HAVE_DECL_STRERROR
+ char *strerror ();
+ # endif
+ # else
+ static char *
+-private_strerror (errnum)
+- int errnum;
++private_strerror (int errnum)
+ {
+ extern char *sys_errlist[];
+ extern int sys_nerr;
+@@ -103,15 +136,118 @@
+ }
+ # define strerror private_strerror
+ # endif /* HAVE_STRERROR */
+-# endif /* HAVE_STRERROR_R */
++# endif /* HAVE_STRERROR_R || defined strerror_r */
+ #endif /* not _LIBC */
+
++static void
++print_errno_message (int errnum)
++{
++ char const *s;
++
++#if defined HAVE_STRERROR_R || _LIBC
++ char errbuf[1024];
++# if STRERROR_R_CHAR_P || _LIBC
++ s = __strerror_r (errnum, errbuf, sizeof errbuf);
++# else
++ if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
++ s = errbuf;
++ else
++ s = 0;
++# endif
++#else
++ s = strerror (errnum);
++#endif
++
++#if !_LIBC
++ if (! s)
++ s = _("Unknown system error");
++#endif
++
++#if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ {
++ __fwprintf (stderr, L": %s", s);
++ return;
++ }
++#endif
++
++ fprintf (stderr, ": %s", s);
++}
++
++#ifdef VA_START
++static void
++error_tail (int status, int errnum, const char *message, va_list args)
++{
++# if HAVE_VPRINTF || _LIBC
++# if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ {
++# define ALLOCA_LIMIT 2000
++ size_t len = strlen (message) + 1;
++ wchar_t *wmessage = NULL;
++ mbstate_t st;
++ size_t res;
++ const char *tmp;
++
++ do
++ {
++ if (len < ALLOCA_LIMIT)
++ wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
++ else
++ {
++ if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
++ wmessage = NULL;
++
++ wmessage = (wchar_t *) realloc (wmessage,
++ len * sizeof (wchar_t));
++
++ if (wmessage == NULL)
++ {
++ fputws_unlocked (L"out of memory\n", stderr);
++ return;
++ }
++ }
++
++ memset (&st, '\0', sizeof (st));
++ tmp =message;
++ }
++ while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
++
++ if (res == (size_t) -1)
++ /* The string cannot be converted. */
++ wmessage = (wchar_t *) L"???";
++
++ __vfwprintf (stderr, wmessage, args);
++ }
++ else
++# endif
++ vfprintf (stderr, message, args);
++# else
++ _doprnt (message, args, stderr);
++# endif
++ va_end (args);
++
++ ++error_message_count;
++ if (errnum)
++ print_errno_message (errnum);
++# if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ putwc (L'\n', stderr);
++ else
++# endif
++ putc ('\n', stderr);
++ fflush (stderr);
++ if (status)
++ exit (status);
++}
++#endif
++
++
+ /* Print the program name and error message MESSAGE, which is a printf-style
+ format string with optional args.
+ If ERRNUM is nonzero, print its corresponding system error message.
+ Exit with status STATUS if it is nonzero. */
+ /* VARARGS */
+-
+ void
+ #if defined VA_START && __STDC__
+ error (int status, int errnum, const char *message, ...)
+@@ -127,43 +263,48 @@
+ va_list args;
+ #endif
+
++ fflush (stdout);
++#ifdef _LIBC
++# ifdef USE_IN_LIBIO
++ _IO_flockfile (stderr);
++# else
++ __flockfile (stderr);
++# endif
++#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+- fflush (stdout);
+- fprintf (stderr, "%s: ", program_name);
++#if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s: ", program_name);
++ else
++#endif
++ fprintf (stderr, "%s: ", program_name);
+ }
+
+ #ifdef VA_START
+ VA_START (args, message);
+-# if HAVE_VPRINTF || _LIBC
+- vfprintf (stderr, message, args);
+-# else
+- _doprnt (message, args, stderr);
+-# endif
+- va_end (args);
++ error_tail (status, errnum, message, args);
+ #else
+ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+-#endif
+
+ ++error_message_count;
+ if (errnum)
+- {
+-#if defined HAVE_STRERROR_R || defined _LIBC
+- char errbuf[1024];
+- /* Don't use __strerror_r's return value because on some systems
+- (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
+- __strerror_r (errnum, errbuf, sizeof errbuf);
+- fprintf (stderr, ": %s", errbuf);
+-#else
+- fprintf (stderr, ": %s", strerror (errnum));
+-#endif
+- }
++ print_errno_message (errnum);
+ putc ('\n', stderr);
+ fflush (stderr);
+ if (status)
+ exit (status);
++#endif
++
++#ifdef _LIBC
++# ifdef USE_IN_LIBIO
++ _IO_funlockfile (stderr);
++# else
++ __funlockfile (stderr);
++# endif
++#endif
+ }
+
+ /* Sometimes we want to have at most one error per line. This
+@@ -193,8 +334,9 @@
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+- if (old_line_number == line_number &&
+- (file_name == old_file_name || !strcmp (old_file_name, file_name)))
++ if (old_line_number == line_number
++ && (file_name == old_file_name
++ || strcmp (old_file_name, file_name) == 0))
+ /* Simply return and print nothing. */
+ return;
+
+@@ -202,43 +344,58 @@
+ old_line_number = line_number;
+ }
+
++ fflush (stdout);
++#ifdef _LIBC
++# ifdef USE_IN_LIBIO
++ _IO_flockfile (stderr);
++# else
++ __flockfile (stderr);
++# endif
++#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+- fflush (stdout);
+- fprintf (stderr, "%s:", program_name);
++#if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s: ", program_name);
++ else
++#endif
++ fprintf (stderr, "%s:", program_name);
+ }
+
+ if (file_name != NULL)
+- fprintf (stderr, "%s:%d: ", file_name, line_number);
++ {
++#if _LIBC && USE_IN_LIBIO
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s:%d: ", file_name, line_number);
++ else
++#endif
++ fprintf (stderr, "%s:%d: ", file_name, line_number);
++ }
+
+ #ifdef VA_START
+ VA_START (args, message);
+-# if HAVE_VPRINTF || _LIBC
+- vfprintf (stderr, message, args);
+-# else
+- _doprnt (message, args, stderr);
+-# endif
+- va_end (args);
++ error_tail (status, errnum, message, args);
+ #else
+ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
+-#endif
+
+ ++error_message_count;
+ if (errnum)
+- {
+-#if defined HAVE_STRERROR_R || defined _LIBC
+- char errbuf[1024];
+- fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+-#else
+- fprintf (stderr, ": %s", strerror (errnum));
+-#endif
+- }
++ print_errno_message (errnum);
+ putc ('\n', stderr);
+ fflush (stderr);
+ if (status)
+ exit (status);
++#endif
++
++#ifdef _LIBC
++# ifdef USE_IN_LIBIO
++ _IO_funlockfile (stderr);
++# else
++ __funlockfile (stderr);
++# endif
++#endif
+ }
+
+ #ifdef _LIBC
+diff -urNd -urNd patch-2.5.4/error.h patch-2.5.9/error.h
+--- patch-2.5.4/error.h 1997-06-21 00:29:28.000000000 -0400
++++ patch-2.5.9/error.h 2001-08-23 13:25:08.000000000 -0400
+@@ -25,7 +25,7 @@
+
+ #ifndef __attribute__
+ /* This feature is available in gcc versions 2.5 and later. */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
++# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+ # define __attribute__(Spec) /* empty */
+ # endif
+ /* The __-protected variants of `format' and `printf' attributes
+diff -urNd -urNd patch-2.5.4/getopt1.c patch-2.5.9/getopt1.c
+--- patch-2.5.4/getopt1.c 1999-01-13 00:36:45.000000000 -0500
++++ patch-2.5.9/getopt1.c 2002-11-24 19:17:33.000000000 -0500
+@@ -3,26 +3,29 @@
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public License as
+- published by the Free Software Foundation; either version 2 of the
+- License, or (at your option) any later version.
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
+
+- The GNU C Library is distributed in the hope that it will be useful,
++ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+
+-#include "getopt.h"
++#ifdef _LIBC
++# include <getopt.h>
++#else
++# include "getopt.h"
++#endif
+
+ #if !defined __STDC__ || !__STDC__
+ /* This is a separate conditional since some stdc systems
+@@ -90,6 +93,10 @@
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+ }
+
++# ifdef _LIBC
++libc_hidden_def (getopt_long)
++libc_hidden_def (getopt_long_only)
++# endif
+
+ #endif /* Not ELIDE_CODE. */
+
+diff -urNd -urNd patch-2.5.4/getopt.c patch-2.5.9/getopt.c
+--- patch-2.5.4/getopt.c 1999-01-13 00:36:45.000000000 -0500
++++ patch-2.5.9/getopt.c 2002-11-24 19:17:33.000000000 -0500
+@@ -2,24 +2,23 @@
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+-
+- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
++ Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
+ Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
+
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public License as
+- published by the Free Software Foundation; either version 2 of the
+- License, or (at your option) any later version.
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
+
+- The GNU C Library is distributed in the hope that it will be useful,
++ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+ Ditto for AIX 3.2 and <stdlib.h>. */
+@@ -76,15 +75,20 @@
+ # endif
+ #endif
+
+-#ifndef _
+-/* This is for other GNU distributions with internationalized messages.
+- When compiling libc, the _ macro is predefined. */
+-# ifdef HAVE_LIBINTL_H
+-# include <libintl.h>
+-# define _(msgid) gettext (msgid)
+-# else
+-# define _(msgid) (msgid)
+-# endif
++#ifdef _LIBC
++# include <libintl.h>
++#else
++/* This is for other GNU distributions with internationalized messages. */
++# include "gettext.h"
++#endif
++#define _(msgid) gettext (msgid)
++
++#if defined _LIBC && defined USE_IN_LIBIO
++# include <wchar.h>
++#endif
++
++#ifndef attribute_hidden
++# define attribute_hidden
+ #endif
+
+ /* This version of `getopt' appears to the caller like standard Unix `getopt'
+@@ -109,7 +113,7 @@
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+-char *optarg = NULL;
++char *optarg;
+
+ /* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+@@ -130,7 +134,7 @@
+ causes problems with re-calling getopt as programs generally don't
+ know that. */
+
+-int __getopt_initialized = 0;
++int __getopt_initialized attribute_hidden;
+
+ /* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+@@ -249,41 +253,34 @@
+ static int last_nonopt;
+
+ #ifdef _LIBC
++/* Stored original parameters.
++ XXX This is no good solution. We should rather copy the args so
++ that we can compare them later. But we must not use malloc(3). */
++extern int __libc_argc;
++extern char **__libc_argv;
++
+ /* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
++# ifdef USE_NONOPTION_FLAGS
+ /* Defined in getopt_init.c */
+ extern char *__getopt_nonoption_flags;
+
+ static int nonoption_flags_max_len;
+ static int nonoption_flags_len;
++# endif
+
+-static int original_argc;
+-static char *const *original_argv;
+-
+-/* Make sure the environment variable bash 2.0 puts in the environment
+- is valid for the getopt call we must make sure that the ARGV passed
+- to getopt is that one passed to the process. */
+-static void
+-__attribute__ ((unused))
+-store_args_and_env (int argc, char *const *argv)
+-{
+- /* XXX This is no good solution. We should rather copy the args so
+- that we can compare them later. But we must not use malloc(3). */
+- original_argc = argc;
+- original_argv = argv;
+-}
+-# ifdef text_set_element
+-text_set_element (__libc_subinit, store_args_and_env);
+-# endif /* text_set_element */
+-
+-# define SWAP_FLAGS(ch1, ch2) \
++# ifdef USE_NONOPTION_FLAGS
++# define SWAP_FLAGS(ch1, ch2) \
+ if (nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
++# else
++# define SWAP_FLAGS(ch1, ch2)
++# endif
+ #else /* !_LIBC */
+ # define SWAP_FLAGS(ch1, ch2)
+ #endif /* _LIBC */
+@@ -315,7 +312,7 @@
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+-#ifdef _LIBC
++#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+@@ -419,9 +416,9 @@
+ else
+ ordering = PERMUTE;
+
+-#ifdef _LIBC
++#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (posixly_correct == NULL
+- && argc == original_argc && argv == original_argv)
++ && argc == __libc_argc && argv == __libc_argv)
+ {
+ if (nonoption_flags_max_len == 0)
+ {
+@@ -517,6 +514,13 @@
+ int *longind;
+ int long_only;
+ {
++ int print_errors = opterr;
++ if (optstring[0] == ':')
++ print_errors = 0;
++
++ if (argc < 1)
++ return -1;
++
+ optarg = NULL;
+
+ if (optind == 0 || !__getopt_initialized)
+@@ -531,7 +535,7 @@
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+-#ifdef _LIBC
++#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && __getopt_nonoption_flags[optind] == '1'))
+@@ -666,16 +670,37 @@
+ pfound = p;
+ indfound = option_index;
+ }
+- else
++ else if (long_only
++ || pfound->has_arg != p->has_arg
++ || pfound->flag != p->flag
++ || pfound->val != p->val)
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+- if (opterr)
+- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+- argv[0], argv[optind]);
++ if (print_errors)
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
++ argv[0], argv[optind]) >= 0)
++ {
++
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
++ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
++ argv[0], argv[optind]);
++#endif
++ }
+ nextchar += strlen (nextchar);
+ optind++;
+ optopt = 0;
+@@ -694,18 +719,52 @@
+ optarg = nameend + 1;
+ else
+ {
+- if (opterr)
++ if (print_errors)
+ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++ int n;
++#endif
++
+ if (argv[optind - 1][1] == '-')
+- /* --option */
+- fprintf (stderr,
+- _("%s: option `--%s' doesn't allow an argument\n"),
+- argv[0], pfound->name);
++ {
++ /* --option */
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("\
++%s: option `--%s' doesn't allow an argument\n"),
++ argv[0], pfound->name);
++#else
++ fprintf (stderr, _("\
++%s: option `--%s' doesn't allow an argument\n"),
++ argv[0], pfound->name);
++#endif
++ }
+ else
+- /* +option or -option */
+- fprintf (stderr,
+- _("%s: option `%c%s' doesn't allow an argument\n"),
+- argv[0], argv[optind - 1][0], pfound->name);
++ {
++ /* +option or -option */
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("\
++%s: option `%c%s' doesn't allow an argument\n"),
++ argv[0], argv[optind - 1][0],
++ pfound->name);
++#else
++ fprintf (stderr, _("\
++%s: option `%c%s' doesn't allow an argument\n"),
++ argv[0], argv[optind - 1][0], pfound->name);
++#endif
++ }
++
++#if defined _LIBC && defined USE_IN_LIBIO
++ if (n >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#endif
+ }
+
+ nextchar += strlen (nextchar);
+@@ -720,10 +779,28 @@
+ optarg = argv[optind++];
+ else
+ {
+- if (opterr)
+- fprintf (stderr,
+- _("%s: option `%s' requires an argument\n"),
+- argv[0], argv[optind - 1]);
++ if (print_errors)
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("\
++%s: option `%s' requires an argument\n"),
++ argv[0], argv[optind - 1]) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
++ fprintf (stderr,
++ _("%s: option `%s' requires an argument\n"),
++ argv[0], argv[optind - 1]);
++#endif
++ }
+ nextchar += strlen (nextchar);
+ optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+@@ -747,16 +824,47 @@
+ if (!long_only || argv[optind][1] == '-'
+ || my_index (optstring, *nextchar) == NULL)
+ {
+- if (opterr)
++ if (print_errors)
+ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++ int n;
++#endif
++
+ if (argv[optind][1] == '-')
+- /* --option */
+- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+- argv[0], nextchar);
++ {
++ /* --option */
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
++ argv[0], nextchar);
++#else
++ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
++ argv[0], nextchar);
++#endif
++ }
+ else
+- /* +option or -option */
+- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+- argv[0], argv[optind][0], nextchar);
++ {
++ /* +option or -option */
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
++ argv[0], argv[optind][0], nextchar);
++#else
++ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
++ argv[0], argv[optind][0], nextchar);
++#endif
++ }
++
++#if defined _LIBC && defined USE_IN_LIBIO
++ if (n >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#endif
+ }
+ nextchar = (char *) "";
+ optind++;
+@@ -777,15 +885,44 @@
+
+ if (temp == NULL || c == ':')
+ {
+- if (opterr)
++ if (print_errors)
+ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++ int n;
++#endif
++
+ if (posixly_correct)
+- /* 1003.2 specifies the format of this message. */
+- fprintf (stderr, _("%s: illegal option -- %c\n"),
+- argv[0], c);
++ {
++ /* 1003.2 specifies the format of this message. */
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
++ argv[0], c);
++#else
++ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
++#endif
++ }
+ else
+- fprintf (stderr, _("%s: invalid option -- %c\n"),
+- argv[0], c);
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
++ argv[0], c);
++#else
++ fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
++#endif
++ }
++
++#if defined _LIBC && defined USE_IN_LIBIO
++ if (n >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#endif
+ }
+ optopt = c;
+ return '?';
+@@ -811,11 +948,27 @@
+ }
+ else if (optind == argc)
+ {
+- if (opterr)
++ if (print_errors)
+ {
+ /* 1003.2 specifies the format of this message. */
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf,
++ _("%s: option requires an argument -- %c\n"),
++ argv[0], c) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
++#endif
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+@@ -860,9 +1013,26 @@
+ }
+ if (ambig && !exact)
+ {
+- if (opterr)
+- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+- argv[0], argv[optind]);
++ if (print_errors)
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
++ argv[0], argv[optind]) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
++ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
++ argv[0], argv[optind]);
++#endif
++ }
+ nextchar += strlen (nextchar);
+ optind++;
+ return '?';
+@@ -878,10 +1048,28 @@
+ optarg = nameend + 1;
+ else
+ {
+- if (opterr)
+- fprintf (stderr, _("\
++ if (print_errors)
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("\
+ %s: option `-W %s' doesn't allow an argument\n"),
+- argv[0], pfound->name);
++ argv[0], pfound->name) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
++ fprintf (stderr, _("\
++%s: option `-W %s' doesn't allow an argument\n"),
++ argv[0], pfound->name);
++#endif
++ }
+
+ nextchar += strlen (nextchar);
+ return '?';
+@@ -893,10 +1081,28 @@
+ optarg = argv[optind++];
+ else
+ {
+- if (opterr)
+- fprintf (stderr,
+- _("%s: option `%s' requires an argument\n"),
+- argv[0], argv[optind - 1]);
++ if (print_errors)
++ {
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("\
++%s: option `%s' requires an argument\n"),
++ argv[0], argv[optind - 1]) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
++ fprintf (stderr,
++ _("%s: option `%s' requires an argument\n"),
++ argv[0], argv[optind - 1]);
++#endif
++ }
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+@@ -940,12 +1146,28 @@
+ }
+ else if (optind == argc)
+ {
+- if (opterr)
++ if (print_errors)
+ {
+ /* 1003.2 specifies the format of this message. */
++#if defined _LIBC && defined USE_IN_LIBIO
++ char *buf;
++
++ if (__asprintf (&buf, _("\
++%s: option requires an argument -- %c\n"),
++ argv[0], c) >= 0)
++ {
++ if (_IO_fwide (stderr, 0) > 0)
++ __fwprintf (stderr, L"%s", buf);
++ else
++ fputs (buf, stderr);
++
++ free (buf);
++ }
++#else
+ fprintf (stderr,
+- _("%s: option requires an argument -- %c\n"),
+- argv[0], c);
++ _("%s: option requires an argument -- %c\n"),
++ argv[0], c);
++#endif
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+diff -urNd -urNd patch-2.5.4/getopt.h patch-2.5.9/getopt.h
+--- patch-2.5.4/getopt.h 1999-01-13 00:36:45.000000000 -0500
++++ patch-2.5.9/getopt.h 2002-11-24 19:17:33.000000000 -0500
+@@ -1,21 +1,20 @@
+ /* Declarations for getopt.
+- Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
++ Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public License as
+- published by the Free Software Foundation; either version 2 of the
+- License, or (at your option) any later version.
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
+
+- The GNU C Library is distributed in the hope that it will be useful,
++ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
+
+- You should have received a copy of the GNU Library General Public
+- License along with the GNU C Library; see the file COPYING.LIB. If not,
+- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+- Boston, MA 02111-1307, USA. */
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ #ifndef _GETOPT_H
+
+@@ -23,6 +22,17 @@
+ # define _GETOPT_H 1
+ #endif
+
++/* If __GNU_LIBRARY__ is not already defined, either we are being used
++ standalone, or this is the first header included in the source file.
++ If we are being used with glibc, we need to include <features.h>, but
++ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
++ not defined, include <ctype.h>, which will pull in <features.h> for us
++ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
++ doesn't flood the namespace with stuff the way some other headers do.) */
++#if !defined __GNU_LIBRARY__
++# include <ctype.h>
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -82,7 +92,7 @@
+
+ struct option
+ {
+-# if defined __STDC__ && __STDC__
++# if (defined __STDC__ && __STDC__) || defined __cplusplus
+ const char *name;
+ # else
+ char *name;
+@@ -126,25 +136,26 @@
+ arguments to the option '\0'. This behavior is specific to the GNU
+ `getopt'. */
+
+-#if defined __STDC__ && __STDC__
++#if (defined __STDC__ && __STDC__) || defined __cplusplus
+ # ifdef __GNU_LIBRARY__
+ /* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+-extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
++extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
+ # else /* not __GNU_LIBRARY__ */
+ extern int getopt ();
+ # endif /* __GNU_LIBRARY__ */
+
+ # ifndef __need_getopt
+-extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
++extern int getopt_long (int ___argc, char *const *___argv,
++ const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+-extern int getopt_long_only (int __argc, char *const *__argv,
++extern int getopt_long_only (int ___argc, char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind);
+
+ /* Internal only. Users should not call this directly. */
+-extern int _getopt_internal (int __argc, char *const *__argv,
++extern int _getopt_internal (int ___argc, char *const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only);
+diff -urNd -urNd patch-2.5.4/gettext.h patch-2.5.9/gettext.h
+--- patch-2.5.4/gettext.h 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/gettext.h 2002-05-10 07:20:06.000000000 -0400
+@@ -0,0 +1,69 @@
++/* Convenience header for conditional use of GNU <libintl.h>.
++ Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Library General Public License as published
++ by the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this program; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++ USA. */
++
++#ifndef _LIBGETTEXT_H
++#define _LIBGETTEXT_H 1
++
++/* NLS can be disabled through the configure --disable-nls option. */
++#if ENABLE_NLS
++
++/* Get declarations of GNU message catalog functions. */
++# include <libintl.h>
++
++#else
++
++/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
++ chokes if dcgettext is defined as a macro. So include it now, to make
++ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
++ as well because people using "gettext.h" will not include <libintl.h>,
++ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
++ is OK. */
++#if defined(__sun)
++# include <locale.h>
++#endif
++
++/* Disabled NLS.
++ The casts to 'const char *' serve the purpose of producing warnings
++ for invalid uses of the value returned from these functions.
++ On pre-ANSI systems without 'const', the config.h file is supposed to
++ contain "#define const". */
++# define gettext(Msgid) ((const char *) (Msgid))
++# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
++# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
++# define ngettext(Msgid1, Msgid2, N) \
++ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
++# define dngettext(Domainname, Msgid1, Msgid2, N) \
++ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
++# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
++ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
++# define textdomain(Domainname) ((const char *) (Domainname))
++# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
++# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
++
++#endif
++
++/* A pseudo function call that serves as a marker for the automated
++ extraction of messages, but does not call gettext(). The run-time
++ translation is done at a different place in the code.
++ The argument, String, should be a literal string. Concatenated strings
++ and other string expressions won't work.
++ The macro's expansion is not parenthesized, so that it is suitable as
++ initializer for static 'char[]' or 'const char[]' variables. */
++#define gettext_noop(String) String
++
++#endif /* _LIBGETTEXT_H */
+diff -urNd -urNd patch-2.5.4/inp.c patch-2.5.9/inp.c
+--- patch-2.5.4/inp.c 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/inp.c 2003-05-20 09:58:02.000000000 -0400
+@@ -1,9 +1,10 @@
+ /* inputting files to be patched */
+
+-/* $Id: inp.c,v 1.21 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: inp.c,v 1.25 2003/05/20 13:58:02 eggert Exp $ */
+
+-/* Copyright 1986, 1988 Larry Wall
+- Copyright 1991, 1992-1993, 1997-1998, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1986, 1988 Larry Wall
++ Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003 Free
++ Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -47,10 +48,10 @@
+ static size_t tireclen; /* length of records in tmp file */
+ static size_t last_line_size; /* size of last input line */
+
+-static bool plan_a PARAMS ((char const *));/* yield FALSE if memory runs out */
+-static void plan_b PARAMS ((char const *));
+-static void report_revision PARAMS ((int));
+-static void too_many_lines PARAMS ((char const *)) __attribute__((noreturn));
++static bool plan_a (char const *); /* yield false if memory runs out */
++static void plan_b (char const *);
++static void report_revision (bool);
++static void too_many_lines (char const *) __attribute__((noreturn));
+
+ /* New patch--prepare to edit another file. */
+
+@@ -102,28 +103,28 @@
+ /* Report whether a desired revision was found. */
+
+ static void
+-report_revision (int found_revision)
++report_revision (bool found_revision)
+ {
+- revision = quotearg (revision);
++ char const *rev = quotearg (revision);
+
+ if (found_revision)
+ {
+ if (verbosity == VERBOSE)
+- say ("Good. This file appears to be the %s version.\n", revision);
++ say ("Good. This file appears to be the %s version.\n", rev);
+ }
+ else if (force)
+ {
+ if (verbosity != SILENT)
+ say ("Warning: this file doesn't appear to be the %s version -- patching anyway.\n",
+- revision);
++ rev);
+ }
+ else if (batch)
+ fatal ("This file doesn't appear to be the %s version -- aborting.",
+- revision);
++ rev);
+ else
+ {
+ ask ("This file doesn't appear to be the %s version -- patch anyway? [n] ",
+- revision);
++ rev);
+ if (*buf != 'y')
+ fatal ("aborted");
+ }
+@@ -140,7 +141,7 @@
+ void
+ get_input_file (char const *filename, char const *outname)
+ {
+- int elsewhere = strcmp (filename, outname);
++ bool elsewhere = strcmp (filename, outname) != 0;
+ char const *cs;
+ char *diffbuf;
+ char *getbuf;
+@@ -228,7 +229,7 @@
+ or if storage isn't available. */
+ if (! (size == instat.st_size
+ && (buffer = malloc (size ? size : (size_t) 1))))
+- return FALSE;
++ return false;
+
+ /* Read the input file, but don't bother reading it if it's empty.
+ When creating files, the files do not actually exist. */
+@@ -254,7 +255,7 @@
+ /* Perhaps size is too large for this host. */
+ close (ifd);
+ free (buffer);
+- return FALSE;
++ return false;
+ }
+ buffered += n;
+ }
+@@ -274,7 +275,7 @@
+ && (ptr = (char const **) malloc ((size_t) iline * sizeof *ptr))))
+ {
+ free (buffer);
+- return FALSE;
++ return false;
+ }
+ iline = 0;
+ for (s = buffer; ; s++)
+@@ -291,7 +292,7 @@
+ {
+ char const *rev = revision;
+ int rev0 = rev[0];
+- int found_revision = 0;
++ bool found_revision = false;
+ size_t revlen = strlen (rev);
+
+ if (revlen <= size)
+@@ -303,7 +304,7 @@
+ && (s == buffer || ISSPACE ((unsigned char) s[-1]))
+ && (s + 1 == limrev || ISSPACE ((unsigned char) s[revlen])))
+ {
+- found_revision = 1;
++ found_revision = true;
+ break;
+ }
+ }
+@@ -314,7 +315,7 @@
+ /* Plan A will work. */
+ i_buffer = buffer;
+ i_ptr = ptr;
+- return TRUE;
++ return true;
+ }
+
+ /* Keep (virtually) nothing in memory. */
+@@ -326,7 +327,7 @@
+ register int c;
+ register size_t len;
+ register size_t maxlen;
+- register int found_revision;
++ register bool found_revision;
+ register size_t i;
+ register char const *rev;
+ register size_t revlen;
+@@ -426,7 +427,7 @@
+ WHICHBUF is ignored when the file is in memory. */
+
+ char const *
+-ifetch (LINENUM line, int whichbuf, size_t *psize)
++ifetch (LINENUM line, bool whichbuf, size_t *psize)
+ {
+ register char const *q;
+ register char const *p;
+@@ -444,9 +445,9 @@
+ LINENUM baseline = line - offline;
+
+ if (tiline[0] == baseline)
+- whichbuf = 0;
++ whichbuf = false;
+ else if (tiline[1] == baseline)
+- whichbuf = 1;
++ whichbuf = true;
+ else {
+ tiline[whichbuf] = baseline;
+ if (lseek (tifd, (off_t) (baseline/lines_per_buf * tibufsize),
+diff -urNd -urNd patch-2.5.4/inp.h patch-2.5.9/inp.h
+--- patch-2.5.4/inp.h 1997-04-06 21:07:00.000000000 -0400
++++ patch-2.5.9/inp.h 2003-05-20 10:05:22.000000000 -0400
+@@ -1,10 +1,29 @@
+ /* inputting files to be patched */
+
+-/* $Id: inp.h,v 1.4 1997/04/07 01:07:00 eggert Exp $ */
++/* $Id: inp.h,v 1.7 2003/05/20 14:05:22 eggert Exp $ */
++
++/* Copyright (C) 1986, 1988 Larry Wall
++ Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
++ Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; see the file COPYING.
++ If not, write to the Free Software Foundation,
++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ XTERN LINENUM input_lines; /* how long is input file in lines */
+
+-char const *ifetch PARAMS ((LINENUM, int, size_t *));
+-void get_input_file PARAMS ((char const *, char const *));
+-void re_input PARAMS ((void));
+-void scan_input PARAMS ((char *));
++char const *ifetch (LINENUM, bool, size_t *);
++void get_input_file (char const *, char const *);
++void re_input (void);
++void scan_input (char *);
+diff -urNd -urNd patch-2.5.4/INSTALL patch-2.5.9/INSTALL
+--- patch-2.5.4/INSTALL 1997-06-23 07:40:27.000000000 -0400
++++ patch-2.5.9/INSTALL 2002-03-08 07:48:54.000000000 -0500
+@@ -1,3 +1,9 @@
++Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
++Foundation, Inc.
++
++ This file is free documentation; the Free Software Foundation gives
++unlimited permission to copy, distribute and modify it.
++
+ Basic Installation
+ ==================
+
+@@ -8,20 +14,27 @@
+ those values to create a `Makefile' in each directory of the package.
+ It may also create one or more `.h' files containing system-dependent
+ definitions. Finally, it creates a shell script `config.status' that
+-you can run in the future to recreate the current configuration, a file
+-`config.cache' that saves the results of its tests to speed up
+-reconfiguring, and a file `config.log' containing compiler output
+-(useful mainly for debugging `configure').
++you can run in the future to recreate the current configuration, and a
++file `config.log' containing compiler output (useful mainly for
++debugging `configure').
++
++ It can also use an optional file (typically called `config.cache'
++and enabled with `--cache-file=config.cache' or simply `-C') that saves
++the results of its tests to speed up reconfiguring. (Caching is
++disabled by default to prevent problems with accidental use of stale
++cache files.)
+
+ If you need to do unusual things to compile the package, please try
+ to figure out how `configure' could check whether to do them, and mail
+ diffs or instructions to the address given in the `README' so they can
+-be considered for the next release. If at some point `config.cache'
+-contains results you don't want to keep, you may remove or edit it.
++be considered for the next release. If you are using the cache, and at
++some point `config.cache' contains results you don't want to keep, you
++may remove or edit it.
+
+- The file `configure.in' is used to create `configure' by a program
+-called `autoconf'. You only need `configure.in' if you want to change
+-it or regenerate `configure' using a newer version of `autoconf'.
++ The file `configure.ac' (or `configure.in') is used to create
++`configure' by a program called `autoconf'. You only need
++`configure.ac' if you want to change it or regenerate `configure' using
++a newer version of `autoconf'.
+
+ The simplest way to compile this package is:
+
+@@ -55,14 +68,15 @@
+ =====================
+
+ Some systems require unusual options for compilation or linking that
+-the `configure' script does not know about. You can give `configure'
+-initial values for variables by setting them in the environment. Using
+-a Bourne-compatible shell, you can do that on the command line like
+-this:
+- CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
++the `configure' script does not know about. Run `./configure --help'
++for details on some of the pertinent environment variables.
+
+-Or on systems that have the `env' program, you can do it like this:
+- env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
++ You can give `configure' initial values for variables by setting
++them in the environment. You can do that on the command line like this:
++
++ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
++
++ *Note Defining Variables::, for more details.
+
+ Compiling For Multiple Architectures
+ ====================================
+@@ -75,11 +89,11 @@
+ the `configure' script. `configure' automatically checks for the
+ source code in the directory that `configure' is in and in `..'.
+
+- If you have to use a `make' that does not supports the `VPATH'
+-variable, you have to compile the package for one architecture at a time
+-in the source code directory. After you have installed the package for
+-one architecture, use `make distclean' before reconfiguring for another
+-architecture.
++ If you have to use a `make' that does not support the `VPATH'
++variable, you have to compile the package for one architecture at a
++time in the source code directory. After you have installed the
++package for one architecture, use `make distclean' before reconfiguring
++for another architecture.
+
+ Installation Names
+ ==================
+@@ -122,22 +136,32 @@
+ Specifying the System Type
+ ==========================
+
+- There may be some features `configure' can not figure out
+-automatically, but needs to determine by the type of host the package
+-will run on. Usually `configure' can figure that out, but if it prints
+-a message saying it can not guess the host type, give it the
+-`--host=TYPE' option. TYPE can either be a short name for the system
+-type, such as `sun4', or a canonical name with three fields:
++ There may be some features `configure' cannot figure out
++automatically, but needs to determine by the type of machine the package
++will run on. Usually, assuming the package is built to be run on the
++_same_ architectures, `configure' can figure that out, but if it prints
++a message saying it cannot guess the machine type, give it the
++`--build=TYPE' option. TYPE can either be a short name for the system
++type, such as `sun4', or a canonical name which has the form:
++
+ CPU-COMPANY-SYSTEM
+
+-See the file `config.sub' for the possible values of each field. If
++where SYSTEM can have one of these forms:
++
++ OS KERNEL-OS
++
++ See the file `config.sub' for the possible values of each field. If
+ `config.sub' isn't included in this package, then this package doesn't
+-need to know the host type.
++need to know the machine type.
+
+- If you are building compiler tools for cross-compiling, you can also
++ If you are _building_ compiler tools for cross-compiling, you should
+ use the `--target=TYPE' option to select the type of system they will
+-produce code for and the `--build=TYPE' option to select the type of
+-system on which you are compiling the package.
++produce code for.
++
++ If you want to _use_ a cross compiler, that generates code for a
++platform different from the build platform, you should specify the
++"host" platform (i.e., that on which the generated programs will
++eventually be run) with `--host=TYPE'.
+
+ Sharing Defaults
+ ================
+@@ -150,20 +174,44 @@
+ `CONFIG_SITE' environment variable to the location of the site script.
+ A warning: not all `configure' scripts look for a site script.
+
+-Operation Controls
++Defining Variables
+ ==================
+
++ Variables not defined in a site shell script can be set in the
++environment passed to `configure'. However, some packages may run
++configure again during the build, and the customized values of these
++variables may be lost. In order to avoid this problem, you should set
++them in the `configure' command line, using `VAR=value'. For example:
++
++ ./configure CC=/usr/local2/bin/gcc
++
++will cause the specified gcc to be used as the C compiler (unless it is
++overridden in the site shell script).
++
++`configure' Invocation
++======================
++
+ `configure' recognizes the following options to control how it
+ operates.
+
+-`--cache-file=FILE'
+- Use and save the results of the tests in FILE instead of
+- `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+- debugging `configure'.
+-
+ `--help'
++`-h'
+ Print a summary of the options to `configure', and exit.
+
++`--version'
++`-V'
++ Print the version of Autoconf used to generate the `configure'
++ script, and exit.
++
++`--cache-file=FILE'
++ Enable the cache: use and save the results of the tests in FILE,
++ traditionally `config.cache'. FILE defaults to `/dev/null' to
++ disable caching.
++
++`--config-cache'
++`-C'
++ Alias for `--cache-file=config.cache'.
++
+ `--quiet'
+ `--silent'
+ `-q'
+@@ -175,8 +223,6 @@
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+-`--version'
+- Print the version of Autoconf used to generate the `configure'
+- script, and exit.
++`configure' also accepts some other, not widely useful, options. Run
++`configure --help' for more details.
+
+-`configure' also accepts some other, not widely useful, options.
+diff -urNd -urNd patch-2.5.4/install-sh patch-2.5.9/install-sh
+--- patch-2.5.4/install-sh 1999-03-02 08:44:48.000000000 -0500
++++ patch-2.5.9/install-sh 2003-05-09 13:22:21.000000000 -0400
+@@ -1,19 +1,37 @@
+ #!/bin/sh
+ #
+ # install - install a program, script, or datafile
+-# This comes from X11R5 (mit/util/scripts/install.sh).
+ #
+-# Copyright 1991 by the Massachusetts Institute of Technology
++# This originates from X11R5 (mit/util/scripts/install.sh), which was
++# later released in X11R6 (xc/config/util/install.sh) with the
++# following copyright and license.
+ #
+-# Permission to use, copy, modify, distribute, and sell this software and its
+-# documentation for any purpose is hereby granted without fee, provided that
+-# the above copyright notice appear in all copies and that both that
+-# copyright notice and this permission notice appear in supporting
+-# documentation, and that the name of M.I.T. not be used in advertising or
+-# publicity pertaining to distribution of the software without specific,
+-# written prior permission. M.I.T. makes no representations about the
+-# suitability of this software for any purpose. It is provided "as is"
+-# without express or implied warranty.
++# Copyright (C) 1994 X Consortium
++#
++# Permission is hereby granted, free of charge, to any person obtaining a copy
++# of this software and associated documentation files (the "Software"), to
++# deal in the Software without restriction, including without limitation the
++# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++# sell copies of the Software, and to permit persons to whom the Software is
++# furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice shall be included in
++# all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
++# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#
++# Except as contained in this notice, the name of the X Consortium shall not
++# be used in advertising or otherwise to promote the sale, use or other deal-
++# ings in this Software without prior written authorization from the X Consor-
++# tium.
++#
++#
++# FSF changes to this file are in the public domain.
+ #
+ # Calling this script install-sh is preferred over install.sh, to prevent
+ # `make' implicit rules from creating a file called install from it
+@@ -56,7 +74,7 @@
+
+ while [ x"$1" != x ]; do
+ case $1 in
+- -c) instcmd="$cpprog"
++ -c) instcmd=$cpprog
+ shift
+ continue;;
+
+@@ -79,7 +97,7 @@
+ shift
+ continue;;
+
+- -s) stripcmd="$stripprog"
++ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+@@ -106,17 +124,17 @@
+
+ if [ x"$src" = x ]
+ then
+- echo "install: no input file specified"
++ echo "$0: no input file specified" >&2
+ exit 1
+ else
+- true
++ :
+ fi
+
+ if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+-
+- if [ -d $dst ]; then
++
++ if [ -d "$dst" ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+@@ -125,38 +143,38 @@
+ else
+
+ # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+-# might cause directories to be created, which would be especially bad
++# might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+
+- if [ -f $src -o -d $src ]
++ if [ -f "$src" ] || [ -d "$src" ]
+ then
+- true
++ :
+ else
+- echo "install: $src does not exist"
++ echo "$0: $src does not exist" >&2
+ exit 1
+ fi
+-
++
+ if [ x"$dst" = x ]
+ then
+- echo "install: no destination specified"
++ echo "$0: no destination specified" >&2
+ exit 1
+ else
+- true
++ :
+ fi
+
+ # If destination is a directory, append the input filename; if your system
+ # does not like double slashes in filenames, you may need to add some logic
+
+- if [ -d $dst ]
++ if [ -d "$dst" ]
+ then
+- dst="$dst"/`basename $src`
++ dst=$dst/`basename "$src"`
+ else
+- true
++ :
+ fi
+ fi
+
+ ## this sed command emulates the dirname command
+-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
++dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+ # this part is taken from Noah Friedman's mkinstalldirs script
+@@ -165,69 +183,73 @@
+ if [ ! -d "$dstdir" ]; then
+ defaultIFS='
+ '
+-IFS="${IFS-${defaultIFS}}"
++IFS="${IFS-$defaultIFS}"
+
+-oIFS="${IFS}"
++oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+-IFS="${oIFS}"
++set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
++IFS=$oIFS
+
+ pathcomp=''
+
+ while [ $# -ne 0 ] ; do
+- pathcomp="${pathcomp}${1}"
++ pathcomp=$pathcomp$1
+ shift
+
+- if [ ! -d "${pathcomp}" ] ;
++ if [ ! -d "$pathcomp" ] ;
+ then
+- $mkdirprog "${pathcomp}"
++ $mkdirprog "$pathcomp"
+ else
+- true
++ :
+ fi
+
+- pathcomp="${pathcomp}/"
++ pathcomp=$pathcomp/
+ done
+ fi
+
+ if [ x"$dir_arg" != x ]
+ then
+- $doit $instcmd $dst &&
++ $doit $instcmd "$dst" &&
+
+- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
++ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
++ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+ else
+
+ # If we're going to rename the final executable, determine the name now.
+
+- if [ x"$transformarg" = x ]
++ if [ x"$transformarg" = x ]
+ then
+- dstfile=`basename $dst`
++ dstfile=`basename "$dst"`
+ else
+- dstfile=`basename $dst $transformbasename |
++ dstfile=`basename "$dst" $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+ # don't allow the sed command to completely eliminate the filename
+
+- if [ x"$dstfile" = x ]
++ if [ x"$dstfile" = x ]
+ then
+- dstfile=`basename $dst`
++ dstfile=`basename "$dst"`
+ else
+- true
++ :
+ fi
+
+-# Make a temp file name in the proper directory.
++# Make a couple of temp file names in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
++ rmtmp=$dstdir/#rm.$$#
+
+-# Move or copy the file name to the temp name
++# Trap to clean up temp files at exit.
+
+- $doit $instcmd $src $dsttmp &&
++ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
++ trap '(exit $?); exit' 1 2 13 15
+
+- trap "rm -f ${dsttmp}" 0 &&
++# Move or copy the file name to the temp name
++
++ $doit $instcmd "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits
+
+@@ -235,17 +257,38 @@
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $instcmd $src $dsttmp" command.
+
+- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
++ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
++ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
++ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
++ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
++
++# Now remove or move aside any old file at destination location. We try this
++# two ways since rm can't unlink itself on some systems and the destination
++# file might be busy for other reasons. In this case, the final cleanup
++# might fail but the new file should still install successfully.
++
++{
++ if [ -f "$dstdir/$dstfile" ]
++ then
++ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
++ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
++ {
++ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
++ (exit 1); exit
++ }
++ else
++ :
++ fi
++} &&
+
+ # Now rename the file to the real destination.
+
+- $doit $rmcmd -f $dstdir/$dstfile &&
+- $doit $mvcmd $dsttmp $dstdir/$dstfile
++ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+ fi &&
+
++# The final little trick to "correctly" pass the exit status to the exit trap.
+
+-exit 0
++{
++ (exit 0); exit
++}
+diff -urNd -urNd patch-2.5.4/m4/backupfile.m4 patch-2.5.9/m4/backupfile.m4
+--- patch-2.5.4/m4/backupfile.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/backupfile.m4 2002-12-31 08:42:06.000000000 -0500
+@@ -0,0 +1,23 @@
++# backupfile.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_BACKUPFILE],
++[
++ dnl Prerequisites of lib/backupfile.c.
++ AC_REQUIRE([AC_HEADER_DIRENT])
++ AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
++ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
++ AC_CHECK_DECLS_ONCE(getenv malloc)
++ jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
++
++ dnl Prerequisites of lib/addext.c.
++ AC_REQUIRE([jm_AC_DOS])
++ AC_SYS_LONG_FILE_NAMES
++ AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
++ AC_CHECK_FUNCS(pathconf)
++])
+diff -urNd -urNd patch-2.5.4/m4/ccstdc.m4 patch-2.5.9/m4/ccstdc.m4
+--- patch-2.5.4/m4/ccstdc.m4 1999-06-16 07:11:07.000000000 -0400
++++ patch-2.5.9/m4/ccstdc.m4 1969-12-31 19:00:00.000000000 -0500
+@@ -1,95 +0,0 @@
+-# The following is taken from automake 1.4,
+-# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
+-# because only the former supports 64-bit integral types on HP-UX 10.20.
+-
+-## ----------------------------------------- ##
+-## ANSIfy the C compiler whenever possible. ##
+-## From Franc,ois Pinard ##
+-## ----------------------------------------- ##
+-
+-# serial 2
+-
+-# @defmac AC_PROG_CC_STDC
+-# @maindex PROG_CC_STDC
+-# @ovindex CC
+-# If the C compiler in not in ANSI C mode by default, try to add an option
+-# to output variable @code{CC} to make it so. This macro tries various
+-# options that select ANSI C on some system or another. It considers the
+-# compiler to be in ANSI C mode if it handles function prototypes correctly.
+-#
+-# If you use this macro, you should check after calling it whether the C
+-# compiler has been set to accept ANSI C; if not, the shell variable
+-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+-# program @code{ansi2knr}, which comes with Ghostscript.
+-# @end defmac
+-
+-AC_DEFUN(AM_PROG_CC_STDC,
+-[AC_REQUIRE([AC_PROG_CC])
+-AC_BEFORE([$0], [AC_C_INLINE])
+-AC_BEFORE([$0], [AC_C_CONST])
+-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+-dnl a magic option to avoid problems with ANSI preprocessor commands
+-dnl like #elif.
+-dnl FIXME: can't do this because then AC_AIX won't work due to a
+-dnl circular dependency.
+-dnl AC_BEFORE([$0], [AC_PROG_CPP])
+-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+-AC_CACHE_VAL(am_cv_prog_cc_stdc,
+-[am_cv_prog_cc_stdc=no
+-ac_save_CC="$CC"
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX -qlanglvl=ansi
+-# Ultrix and OSF/1 -std1
+-# HP-UX -Aa -D_HPUX_SOURCE
+-# SVR4 -Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+-do
+- CC="$ac_save_CC $ac_arg"
+- AC_TRY_COMPILE(
+-[#include <stdarg.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+-struct buf { int x; };
+-FILE * (*rcsopen) (struct buf *, struct stat *, int);
+-static char *e (p, i)
+- char **p;
+- int i;
+-{
+- return p[i];
+-}
+-static char *f (char * (*g) (char **, int), char **p, ...)
+-{
+- char *s;
+- va_list v;
+- va_start (v,p);
+- s = g (p, va_arg (v,int));
+- va_end (v);
+- return s;
+-}
+-int test (int i, double x);
+-struct s1 {int (*f) (int a);};
+-struct s2 {int (*f) (double a);};
+-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+-int argc;
+-char **argv;
+-], [
+-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+-],
+-[am_cv_prog_cc_stdc="$ac_arg"; break])
+-done
+-CC="$ac_save_CC"
+-])
+-if test -z "$am_cv_prog_cc_stdc"; then
+- AC_MSG_RESULT([none needed])
+-else
+- AC_MSG_RESULT($am_cv_prog_cc_stdc)
+-fi
+-case "x$am_cv_prog_cc_stdc" in
+- x|xno) ;;
+- *) CC="$CC $am_cv_prog_cc_stdc" ;;
+-esac
+-])
+diff -urNd -urNd patch-2.5.4/m4/d-ino.m4 patch-2.5.9/m4/d-ino.m4
+--- patch-2.5.4/m4/d-ino.m4 1999-01-26 23:51:43.000000000 -0500
++++ patch-2.5.9/m4/d-ino.m4 2002-12-31 08:43:06.000000000 -0500
+@@ -1,11 +1,11 @@
+-#serial 2
++#serial 5
+
+ dnl From Jim Meyering.
+ dnl
+ dnl Check whether struct dirent has a member named d_ino.
+ dnl
+
+-AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
++AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
+ [AC_REQUIRE([AC_HEADER_DIRENT])dnl
+ AC_CACHE_CHECK([for d_ino member in directory struct],
+ jm_cv_struct_dirent_d_ino,
+@@ -35,8 +35,8 @@
+ )
+ if test $jm_cv_struct_dirent_d_ino = yes; then
+ AC_DEFINE(D_INO_IN_DIRENT, 1,
+- [Define if there is a member named d_ino in the struct describing
+- directory headers.])
++ [Define if there is a member named d_ino in the struct describing
++ directory headers.])
+ fi
+ ]
+ )
+diff -urNd -urNd patch-2.5.4/m4/dirname.m4 patch-2.5.9/m4/dirname.m4
+--- patch-2.5.4/m4/dirname.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/dirname.m4 2002-12-31 08:42:06.000000000 -0500
+@@ -0,0 +1,25 @@
++# dirname.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_DIRNAME],
++[
++ dnl Prerequisites of lib/dirname.h.
++ AC_REQUIRE([jm_AC_DOS])
++
++ dnl Prerequisites of lib/dirname.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++
++ dnl Prerequisites of lib/basename.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++
++ dnl Prerequisites of lib/stripslash.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
+diff -urNd -urNd patch-2.5.4/m4/dos.m4 patch-2.5.9/m4/dos.m4
+--- patch-2.5.4/m4/dos.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/dos.m4 2001-08-12 09:26:00.000000000 -0400
+@@ -0,0 +1,53 @@
++#serial 5
++
++# Define some macros required for proper operation of code in lib/*.c
++# on MSDOS/Windows systems.
++
++# From Jim Meyering.
++
++AC_DEFUN([jm_AC_DOS],
++ [
++ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
++ [
++ AC_TRY_COMPILE([],
++ [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
++neither MSDOS nor Windows
++#endif],
++ [ac_cv_win_or_dos=yes],
++ [ac_cv_win_or_dos=no])
++ ])
++
++ if test x"$ac_cv_win_or_dos" = xyes; then
++ ac_fs_accepts_drive_letter_prefix=1
++ ac_fs_backslash_is_file_name_separator=1
++ else
++ ac_fs_accepts_drive_letter_prefix=0
++ ac_fs_backslash_is_file_name_separator=0
++ fi
++
++ AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
++ [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
++# define FILESYSTEM_PREFIX_LEN(Filename) \
++ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
++#else
++# define FILESYSTEM_PREFIX_LEN(Filename) 0
++#endif])
++
++ AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
++ $ac_fs_accepts_drive_letter_prefix,
++ [Define on systems for which file names may have a so-called
++ `drive letter' prefix, define this to compute the length of that
++ prefix, including the colon.])
++
++ AH_VERBATIM(ISSLASH,
++ [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
++# define ISSLASH(C) ((C) == '/' || (C) == '\\')
++#else
++# define ISSLASH(C) ((C) == '/')
++#endif])
++
++ AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
++ $ac_fs_backslash_is_file_name_separator,
++ [Define if the backslash character may also serve as a file name
++ component separator.])
++ ])
+diff -urNd -urNd patch-2.5.4/m4/error.m4 patch-2.5.9/m4/error.m4
+--- patch-2.5.4/m4/error.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/error.m4 2003-04-21 23:28:22.000000000 -0400
+@@ -0,0 +1,18 @@
++#serial 7
++
++AC_DEFUN([gl_ERROR],
++[
++ AC_FUNC_ERROR_AT_LINE
++ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
++ jm_PREREQ_ERROR
++])
++
++# Prerequisites of lib/error.c.
++AC_DEFUN([jm_PREREQ_ERROR],
++[
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_REQUIRE([AC_FUNC_VPRINTF])
++ AC_CHECK_FUNCS(strerror)
++ AC_CHECK_DECLS([strerror])
++ AC_FUNC_STRERROR_R
++])
+diff -urNd -urNd patch-2.5.4/m4/getopt.m4 patch-2.5.9/m4/getopt.m4
+--- patch-2.5.4/m4/getopt.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/getopt.m4 2002-12-31 08:42:06.000000000 -0500
+@@ -0,0 +1,13 @@
++# getopt.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_GETOPT],
++[
++ dnl Prerequisites of lib/getopt.c.
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
+diff -urNd -urNd patch-2.5.4/m4/inttypes_h.m4 patch-2.5.9/m4/inttypes_h.m4
+--- patch-2.5.4/m4/inttypes_h.m4 1999-01-10 17:47:01.000000000 -0500
++++ patch-2.5.9/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
+@@ -1,22 +0,0 @@
+-#serial 3
+-
+-dnl From Paul Eggert.
+-
+-# Define HAVE_INTTYPES_H if <inttypes.h> exists,
+-# doesn't clash with <sys/types.h>, and declares uintmax_t.
+-
+-AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
+-[
+- AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+- [AC_TRY_COMPILE(
+- [#include <sys/types.h>
+-#include <inttypes.h>],
+- [uintmax_t i = (uintmax_t) -1;],
+- jm_ac_cv_header_inttypes_h=yes,
+- jm_ac_cv_header_inttypes_h=no)])
+- if test $jm_ac_cv_header_inttypes_h = yes; then
+- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+-[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+- and declares uintmax_t. ])
+- fi
+-])
+diff -urNd -urNd patch-2.5.4/m4/largefile.m4 patch-2.5.9/m4/largefile.m4
+--- patch-2.5.4/m4/largefile.m4 1999-08-17 15:56:44.000000000 -0400
++++ patch-2.5.9/m4/largefile.m4 1969-12-31 19:00:00.000000000 -0500
+@@ -1,115 +0,0 @@
+-#serial 5
+-
+-dnl By default, many hosts won't let programs access large files;
+-dnl one must use special compiler options to get large-file access to work.
+-dnl For more details about this brain damage please see:
+-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
+-
+-dnl Written by Paul Eggert <eggert@twinsun.com>.
+-
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
+-AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
+- [AC_CACHE_CHECK([for $1 value to request large file support],
+- ac_cv_sys_largefile_$1,
+- [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
+- ac_cv_sys_largefile_$1=no
+- ifelse($1, CFLAGS,
+- [case "$host_os" in
+- # IRIX 6.2 and later require cc -n32.
+-changequote(, )dnl
+- irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
+-changequote([, ])dnl
+- if test "$GCC" != yes; then
+- ac_cv_sys_largefile_CFLAGS=-n32
+- fi
+- ac_save_CC="$CC"
+- CC="$CC $ac_cv_sys_largefile_CFLAGS"
+- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
+- CC="$ac_save_CC"
+- esac])
+- }])])
+-
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
+-AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
+- [case $2 in
+- no) ;;
+- ?*)
+- case "[$]$1" in
+- '') $1=$2 ;;
+- *) $1=[$]$1' '$2 ;;
+- esac ;;
+- esac])
+-
+-dnl Internal subroutine of AC_SYS_LARGEFILE.
+-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
+-AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
+- [AC_CACHE_CHECK([for $1], $2,
+- [$2=no
+-changequote(, )dnl
+- $4
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- -D$1)
+- $2=1 ;;
+- -D$1=*)
+- $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+- esac
+- done
+-changequote([, ])dnl
+- ])
+- if test "[$]$2" != no; then
+- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
+- fi])
+-
+-AC_DEFUN(AC_SYS_LARGEFILE,
+- [AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_ENABLE(largefile,
+- [ --disable-largefile omit support for large files])
+- if test "$enable_largefile" != no; then
+- AC_CHECK_TOOL(GETCONF, getconf)
+- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
+- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
+- AC_SYS_LARGEFILE_FLAGS(LIBS)
+-
+- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+- case "$ac_flag" in
+- no) ;;
+- -D_FILE_OFFSET_BITS=*) ;;
+- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
+- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
+- -D?* | -I?*)
+- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
+- *)
+- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
+- esac
+- done
+- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
+- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
+- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
+- ac_cv_sys_file_offset_bits,
+- [Number of bits in a file offset, on hosts where this is settable.],
+- [case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_file_offset_bits=64 ;;
+- esac])
+- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
+- ac_cv_sys_largefile_source,
+- [Define to make fseeko etc. visible, on some hosts.],
+- [case "$host_os" in
+- # HP-UX 10.20 and later
+- hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+- ac_cv_sys_largefile_source=1 ;;
+- esac])
+- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
+- ac_cv_sys_large_files,
+- [Define for large files, on AIX-style hosts.],
+- [case "$host_os" in
+- # AIX 4.2 and later
+- aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+- ac_cv_sys_large_files=1 ;;
+- esac])
+- fi
+- ])
+diff -urNd -urNd patch-2.5.4/m4/malloc.m4 patch-2.5.9/m4/malloc.m4
+--- patch-2.5.4/m4/malloc.m4 1999-02-07 00:35:28.000000000 -0500
++++ patch-2.5.9/m4/malloc.m4 2002-12-31 08:43:06.000000000 -0500
+@@ -1,35 +1,25 @@
+-#serial 3
++# malloc.m4 serial 7
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+ dnl From Jim Meyering.
+ dnl Determine whether malloc accepts 0 as its argument.
+ dnl If it doesn't, arrange to use the replacement function.
+-dnl
+
+-AC_DEFUN(jm_FUNC_MALLOC,
++AC_DEFUN([jm_FUNC_MALLOC],
+ [
+- dnl xmalloc.c requires that this symbol be defined so it doesn't
+- dnl mistakenly use a broken malloc -- as it might if this test were omitted.
+- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
+- [Define if the malloc check has been performed. ])
+-
+- AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
+- [AC_TRY_RUN([
+- char *malloc ();
+- int
+- main ()
+- {
+- exit (malloc (0) ? 0 : 1);
+- }
+- ],
+- jm_cv_func_working_malloc=yes,
+- jm_cv_func_working_malloc=no,
+- dnl When crosscompiling, assume malloc is broken.
+- jm_cv_func_working_malloc=no)
+- ])
+- if test $jm_cv_func_working_malloc = no; then
+- AC_SUBST(LIBOBJS)
+- LIBOBJS="$LIBOBJS malloc.$ac_objext"
+- AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
+- [Define to rpl_malloc if the replacement function should be used.])
++ AC_REQUIRE([AC_FUNC_MALLOC])
++ dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
++ if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
++ gl_PREREQ_MALLOC
+ fi
+ ])
++
++# Prerequisites of lib/malloc.c.
++AC_DEFUN([gl_PREREQ_MALLOC], [
++ :
++])
+diff -urNd -urNd patch-2.5.4/m4/mbrtowc.m4 patch-2.5.9/m4/mbrtowc.m4
+--- patch-2.5.4/m4/mbrtowc.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/mbrtowc.m4 2002-12-31 08:43:06.000000000 -0500
+@@ -0,0 +1,27 @@
++# mbrtowc.m4 serial 5
++dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert
++
++dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
++dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
++
++AC_DEFUN([jm_FUNC_MBRTOWC],
++[
++ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
++ jm_cv_func_mbrtowc,
++ [AC_TRY_LINK(
++ [#include <wchar.h>],
++ [mbstate_t state; return ! (sizeof state && mbrtowc);],
++ jm_cv_func_mbrtowc=yes,
++ jm_cv_func_mbrtowc=no)])
++ if test $jm_cv_func_mbrtowc = yes; then
++ AC_DEFINE(HAVE_MBRTOWC, 1,
++ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
++ fi
++])
+diff -urNd -urNd patch-2.5.4/m4/mbstate_t.m4 patch-2.5.9/m4/mbstate_t.m4
+--- patch-2.5.4/m4/mbstate_t.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/mbstate_t.m4 2002-06-21 13:38:30.000000000 -0400
+@@ -0,0 +1,32 @@
++# mbstate_t.m4 serial 9
++dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++# From Paul Eggert.
++
++# BeOS 5 has <wchar.h> but does not define mbstate_t,
++# so you can't declare an object of that type.
++# Check for this incompatibility with Standard C.
++
++# AC_TYPE_MBSTATE_T
++# -----------------
++AC_DEFUN([AC_TYPE_MBSTATE_T],
++ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [AC_INCLUDES_DEFAULT
++# include <wchar.h>],
++ [mbstate_t x; return sizeof x;])],
++ [ac_cv_type_mbstate_t=yes],
++ [ac_cv_type_mbstate_t=no])])
++ if test $ac_cv_type_mbstate_t = yes; then
++ AC_DEFINE([HAVE_MBSTATE_T], 1,
++ [Define to 1 if <wchar.h> declares mbstate_t.])
++ else
++ AC_DEFINE([mbstate_t], int,
++ [Define to a type if <wchar.h> does not define.])
++ fi])
+diff -urNd -urNd patch-2.5.4/m4/memchr.m4 patch-2.5.9/m4/memchr.m4
+--- patch-2.5.4/m4/memchr.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/memchr.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,21 @@
++# memchr.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_MEMCHR],
++[
++ AC_REPLACE_FUNCS(memchr)
++ if test $ac_cv_func_memchr = no; then
++ jm_PREREQ_MEMCHR
++ fi
++])
++
++# Prerequisites of lib/memchr.c.
++AC_DEFUN([jm_PREREQ_MEMCHR], [
++ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
++ AC_CHECK_HEADERS(bp-sym.h)
++])
+diff -urNd -urNd patch-2.5.4/m4/mkdir.m4 patch-2.5.9/m4/mkdir.m4
+--- patch-2.5.4/m4/mkdir.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/mkdir.m4 2002-05-24 14:47:37.000000000 -0400
+@@ -0,0 +1,34 @@
++#serial 1
++
++dnl From Mumit Khan and Paul Eggert
++dnl Determine whether mkdir accepts only one argument instead of the usual two.
++
++AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
++ [AC_CHECK_FUNCS(mkdir)
++ AC_CACHE_CHECK([whether mkdir takes only one argument],
++ patch_cv_mkdir_takes_one_arg,
++ [patch_cv_mkdir_takes_one_arg=no
++ if test $ac_cv_func_mkdir = yes; then
++ AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
++ ],
++ [mkdir (".", 0);],
++ ,
++ [AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
++ ],
++ [mkdir (".");],
++ patch_cv_mkdir_takes_one_arg=yes
++ )]
++ )
++ fi
++ ]
++ )
++ if test $patch_cv_mkdir_takes_one_arg = yes; then
++ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
++ [Define if mkdir takes only one argument.])
++ fi
++ ]
++)
+diff -urNd -urNd patch-2.5.4/m4/onceonly.m4 patch-2.5.9/m4/onceonly.m4
+--- patch-2.5.4/m4/onceonly.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/onceonly.m4 2003-03-18 05:08:34.000000000 -0500
+@@ -0,0 +1,63 @@
++# onceonly.m4 serial 3
++dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl This file defines some "once only" variants of standard autoconf macros.
++dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
++dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
++dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
++dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
++dnl The advantage is that the check for each of the headers/functions/decls
++dnl will be put only once into the 'configure' file. It keeps the size of
++dnl the 'configure' file down, and avoids redundant output when 'configure'
++dnl is run.
++dnl The drawback is that the checks cannot be conditionalized. If you write
++dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
++dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
++dnl empty, and the check will be inserted before the body of the AC_DEFUNed
++dnl function.
++
++dnl Autoconf version 2.57 or newer is recommended.
++AC_PREREQ(2.54)
++
++# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
++# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
++AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
++ :
++ AC_FOREACH([gl_HEADER_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
++ [-./], [___])), [
++ AC_CHECK_HEADERS(gl_HEADER_NAME)
++ ])
++ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
++ [-./], [___])))
++ ])
++])
++
++# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
++# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
++AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
++ :
++ AC_FOREACH([gl_FUNC_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
++ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
++ ])
++])
++
++# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
++# AC_CHECK_DECLS(DECL1, DECL2, ...).
++AC_DEFUN([AC_CHECK_DECLS_ONCE], [
++ :
++ AC_FOREACH([gl_DECL_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
++ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
++ ])
++])
+diff -urNd -urNd patch-2.5.4/m4/protos.m4 patch-2.5.9/m4/protos.m4
+--- patch-2.5.4/m4/protos.m4 1998-10-05 00:29:36.000000000 -0400
++++ patch-2.5.9/m4/protos.m4 1969-12-31 19:00:00.000000000 -0500
+@@ -1,25 +0,0 @@
+-## ------------------------------- ##
+-## Check for function prototypes. ##
+-## From Franc,ois Pinard ##
+-## ------------------------------- ##
+-
+-# serial 1
+-
+-AC_DEFUN(AM_C_PROTOTYPES,
+-[AC_REQUIRE([AM_PROG_CC_STDC])
+-AC_REQUIRE([AC_PROG_CPP])
+-AC_MSG_CHECKING([for function prototypes])
+-if test "$am_cv_prog_cc_stdc" != no; then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
+- U= ANSI2KNR=
+-else
+- AC_MSG_RESULT(no)
+- U=_ ANSI2KNR=./ansi2knr
+- # Ensure some checks needed by ansi2knr itself.
+- AC_HEADER_STDC
+- AC_CHECK_HEADERS(string.h)
+-fi
+-AC_SUBST(U)dnl
+-AC_SUBST(ANSI2KNR)dnl
+-])
+diff -urNd -urNd patch-2.5.4/m4/quotearg.m4 patch-2.5.9/m4/quotearg.m4
+--- patch-2.5.4/m4/quotearg.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/quotearg.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,16 @@
++# quotearg.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_QUOTEARG],
++[
++ dnl Prerequisites of lib/quotearg.c.
++ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
++ AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
++ AC_TYPE_MBSTATE_T
++ jm_FUNC_MBRTOWC
++])
+diff -urNd -urNd patch-2.5.4/m4/quote.m4 patch-2.5.9/m4/quote.m4
+--- patch-2.5.4/m4/quote.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/quote.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,13 @@
++# quote.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_QUOTE],
++[
++ dnl Prerequisites of lib/quote.c.
++ AC_CHECK_HEADERS_ONCE(stddef.h)
++])
+diff -urNd -urNd patch-2.5.4/m4/realloc.m4 patch-2.5.9/m4/realloc.m4
+--- patch-2.5.4/m4/realloc.m4 1999-02-07 00:36:21.000000000 -0500
++++ patch-2.5.9/m4/realloc.m4 2002-12-31 08:43:06.000000000 -0500
+@@ -1,35 +1,25 @@
+-#serial 3
++# realloc.m4 serial 7
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
+
+ dnl From Jim Meyering.
+ dnl Determine whether realloc works when both arguments are 0.
+ dnl If it doesn't, arrange to use the replacement function.
+-dnl
+
+-AC_DEFUN(jm_FUNC_REALLOC,
++AC_DEFUN([jm_FUNC_REALLOC],
+ [
+- dnl xmalloc.c requires that this symbol be defined so it doesn't
+- dnl mistakenly use a broken realloc -- as it might if this test were omitted.
+- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
+- [Define if the realloc check has been performed. ])
+-
+- AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
+- [AC_TRY_RUN([
+- char *realloc ();
+- int
+- main ()
+- {
+- exit (realloc (0, 0) ? 0 : 1);
+- }
+- ],
+- jm_cv_func_working_realloc=yes,
+- jm_cv_func_working_realloc=no,
+- dnl When crosscompiling, assume realloc is broken.
+- jm_cv_func_working_realloc=no)
+- ])
+- if test $jm_cv_func_working_realloc = no; then
+- AC_SUBST(LIBOBJS)
+- LIBOBJS="$LIBOBJS realloc.$ac_objext"
+- AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
+- [Define to rpl_realloc if the replacement function should be used.])
++ AC_REQUIRE([AC_FUNC_REALLOC])
++ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
++ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
++ gl_PREREQ_REALLOC
+ fi
+ ])
++
++# Prerequisites of lib/realloc.c.
++AC_DEFUN([gl_PREREQ_REALLOC], [
++ :
++])
+diff -urNd -urNd patch-2.5.4/m4/rmdir.m4 patch-2.5.9/m4/rmdir.m4
+--- patch-2.5.4/m4/rmdir.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/rmdir.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,22 @@
++# rmdir.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_RMDIR],
++[
++ AC_REPLACE_FUNCS(rmdir)
++ if test $ac_cv_func_rmdir = no; then
++ gl_PREREQ_RMDIR
++ fi
++])
++
++# Prerequisites of lib/rmdir.c.
++AC_DEFUN([gl_PREREQ_RMDIR], [
++ AC_REQUIRE([AC_HEADER_STAT])
++ :
++])
++
+diff -urNd -urNd patch-2.5.4/m4/setmode.m4 patch-2.5.9/m4/setmode.m4
+--- patch-2.5.4/m4/setmode.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/setmode.m4 2002-02-27 23:22:13.000000000 -0500
+@@ -0,0 +1,38 @@
++# Check for setmode, DOS style.
++
++# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++AC_DEFUN([AC_FUNC_SETMODE_DOS],
++ [AC_CHECK_HEADERS(fcntl.h unistd.h)
++ AC_CACHE_CHECK([for DOS-style setmode],
++ [ac_cv_func_setmode_dos],
++ [AC_TRY_LINK(
++ [#include <io.h>
++ #if HAVE_FCNTL_H
++ # include <fcntl.h>
++ #endif
++ #if HAVE_UNISTD_H
++ # include <unistd.h>
++ #endif],
++ [int ret = setmode && setmode (1, O_BINARY);],
++ [ac_cv_func_setmode_dos=yes],
++ [ac_cv_func_setmode_dos=no])])
++ if test $ac_cv_func_setmode_dos = yes; then
++ AC_DEFINE(HAVE_SETMODE_DOS, 1,
++ [Define to 1 if you have the DOS-style `setmode' function.])
++ fi])
+diff -urNd -urNd patch-2.5.4/m4/stdbool.m4 patch-2.5.9/m4/stdbool.m4
+--- patch-2.5.4/m4/stdbool.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/stdbool.m4 2003-01-09 08:35:14.000000000 -0500
+@@ -0,0 +1,89 @@
++# Check for stdbool.h that conforms to C99.
++
++# Copyright (C) 2002-2003 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++# Prepare for substituting <stdbool.h> if it is not supported.
++
++AC_DEFUN([AM_STDBOOL_H],
++[
++ AC_REQUIRE([AC_HEADER_STDBOOL])
++
++ # Define two additional variables used in the Makefile substitution.
++
++ if test "$ac_cv_header_stdbool_h" = yes; then
++ STDBOOL_H=''
++ else
++ STDBOOL_H='stdbool.h'
++ fi
++ AC_SUBST([STDBOOL_H])
++
++ if test "$ac_cv_type__Bool" = yes; then
++ HAVE__BOOL=1
++ else
++ HAVE__BOOL=0
++ fi
++ AC_SUBST([HAVE__BOOL])
++])
++
++# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
++# have this macro built-in.
++
++AC_DEFUN([AC_HEADER_STDBOOL],
++ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
++ [ac_cv_header_stdbool_h],
++ [AC_TRY_COMPILE(
++ [
++ #include <stdbool.h>
++ #ifndef bool
++ "error: bool is not defined"
++ #endif
++ #ifndef false
++ "error: false is not defined"
++ #endif
++ #if false
++ "error: false is not 0"
++ #endif
++ #ifndef true
++ "error: false is not defined"
++ #endif
++ #if true != 1
++ "error: true is not 1"
++ #endif
++ #ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++ #endif
++
++ struct s { _Bool s: 1; _Bool t; } s;
++
++ char a[true == 1 ? 1 : -1];
++ char b[false == 0 ? 1 : -1];
++ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++ char d[(bool) -0.5 == true ? 1 : -1];
++ bool e = &s;
++ char f[(_Bool) -0.0 == false ? 1 : -1];
++ char g[true];
++ char h[sizeof (_Bool)];
++ char i[sizeof s.t];
++ ],
++ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
++ [ac_cv_header_stdbool_h=yes],
++ [ac_cv_header_stdbool_h=no])])
++ AC_CHECK_TYPES([_Bool])
++ if test $ac_cv_header_stdbool_h = yes; then
++ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
++ fi])
+diff -urNd -urNd patch-2.5.4/m4/unlocked-io.m4 patch-2.5.9/m4/unlocked-io.m4
+--- patch-2.5.4/m4/unlocked-io.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/unlocked-io.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,22 @@
++#serial 7 -*- autoconf -*-
++
++dnl From Jim Meyering.
++dnl
++dnl See if the glibc *_unlocked I/O macros or functions are available.
++dnl Use only those *_unlocked macros or functions that are declared
++dnl (because some of them were declared in Solaris 2.5.1 but were removed
++dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
++dnl on Solaris 2.6).
++
++AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
++[
++ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
++ dnl etc.
++ AC_REQUIRE([AC_GNU_SOURCE])
++
++ AC_CHECK_DECLS_ONCE(
++ [clearerr_unlocked feof_unlocked ferror_unlocked
++ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
++ fread_unlocked fwrite_unlocked getc_unlocked
++ getchar_unlocked putc_unlocked putchar_unlocked])
++])
+diff -urNd -urNd patch-2.5.4/m4/utimbuf.m4 patch-2.5.9/m4/utimbuf.m4
+--- patch-2.5.4/m4/utimbuf.m4 1999-01-10 17:51:01.000000000 -0500
++++ patch-2.5.9/m4/utimbuf.m4 2002-12-31 08:43:06.000000000 -0500
+@@ -1,4 +1,4 @@
+-#serial 2
++#serial 5
+
+ dnl From Jim Meyering
+
+@@ -6,9 +6,9 @@
+ dnl usually in <utime.h>.
+ dnl Some systems have utime.h but don't declare the struct anywhere.
+
+-AC_DEFUN(jm_STRUCT_UTIMBUF,
++AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
+ [
+- AC_CHECK_HEADERS(utime.h)
++ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
+ AC_REQUIRE([AC_HEADER_TIME])
+ AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
+ [AC_TRY_COMPILE(
+@@ -33,8 +33,8 @@
+ ])
+
+ if test $fu_cv_sys_struct_utimbuf = yes; then
+- AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
+-[Define if struct utimbuf is declared -- usually in <utime.h>.
+- Some systems have utime.h but don't declare the struct anywhere. ])
++ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
++ [Define if struct utimbuf is declared -- usually in <utime.h>.
++ Some systems have utime.h but don't declare the struct anywhere. ])
+ fi
+ ])
+diff -urNd -urNd patch-2.5.4/m4/xalloc.m4 patch-2.5.9/m4/xalloc.m4
+--- patch-2.5.4/m4/xalloc.m4 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/m4/xalloc.m4 2002-12-31 08:42:07.000000000 -0500
+@@ -0,0 +1,26 @@
++# xalloc.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_XALLOC],
++[
++ gl_PREREQ_XMALLOC
++ gl_PREREQ_XSTRDUP
++])
++
++# Prerequisites of lib/xmalloc.c.
++AC_DEFUN([gl_PREREQ_XMALLOC], [
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_REQUIRE([jm_FUNC_MALLOC])
++ AC_REQUIRE([jm_FUNC_REALLOC])
++])
++
++# Prerequisites of lib/xstrdup.c.
++AC_DEFUN([gl_PREREQ_XSTRDUP], [
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
+diff -urNd -urNd patch-2.5.4/Makefile.in patch-2.5.9/Makefile.in
+--- patch-2.5.4/Makefile.in 1999-08-30 02:37:54.000000000 -0400
++++ patch-2.5.9/Makefile.in 2003-05-20 12:15:48.000000000 -0400
+@@ -1,5 +1,7 @@
+ # Makefile for GNU patch.
+-# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
++
++# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
++# Foundation, Inc.
+
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -37,9 +39,9 @@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+-PACKAGE = @PACKAGE@
+-U = @U@
+-VERSION = @VERSION@
++OBJEXT = @OBJEXT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_VERSION = @PACKAGE_VERSION@
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -59,20 +61,33 @@
+
+ SHELL = /bin/sh
+
+-LIBSRCS = getopt.c getopt1.c malloc.c memchr.c realloc.c rename.c
+-SRCS = addext.c argmatch.c backupfile.c basename.c error.c inp.c maketime.c \
+- mkdir.c partime.c patch.c pch.c quotearg.c quotesys.c \
+- rmdir.c util.c version.c xmalloc.c $(LIBSRCS)
+-OBJS = addext$U.o argmatch$U.o backupfile$U.o basename$U.o error$U.o inp$U.o \
+- maketime.o partime.o patch$U.o pch$U.o quotearg$U.o quotesys.o \
+- util$U.o version$U.o xmalloc$U.o $(LIBOBJS)
+-HDRS = argmatch.h backupfile.h basename.h common.h error.h getopt.h \
+- inp.h maketime.h partime.h patchlevel.h pch.h quotearg.h quotesys.h \
+- util.h version.h xalloc.h
++LIBSRCS = error.c malloc.c memchr.c mkdir.c \
++ realloc.c rmdir.c strcasecmp.c strncasecmp.c
++SRCS = $(LIBSRCS) \
++ addext.c argmatch.c backupfile.c \
++ basename.c dirname.c \
++ getopt.c getopt1.c inp.c \
++ maketime.c partime.c \
++ patch.c pch.c \
++ quote.c quotearg.c quotesys.c \
++ util.c version.c xmalloc.c
++OBJS = $(LIBOBJS) \
++ addext.$(OBJEXT) argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
++ basename.$(OBJEXT) dirname.$(OBJEXT) \
++ getopt.$(OBJEXT) getopt1.$(OBJEXT) inp.$(OBJEXT) \
++ maketime.$(OBJEXT) partime.$(OBJEXT) \
++ patch.$(OBJEXT) pch.$(OBJEXT) \
++ quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
++ util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
++HDRS = argmatch.h backupfile.h common.h dirname.h \
++ error.h getopt.h gettext.h \
++ inp.h maketime.h partime.h pch.h \
++ quote.h quotearg.h quotesys.h \
++ unlocked-io.h util.h version.h xalloc.h
+ MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
+- aclocal.m4 ansi2knr.1 ansi2knr.c \
+- config.guess config.hin config.sub configure configure.in \
+- install-sh mkinstalldirs patch.man
++ aclocal.m4 \
++ config.hin configure configure.ac \
++ install-sh mkinstalldirs patch.man stdbool.h.in
+ DISTFILES = $(MISC) $(SRCS) $(HDRS)
+ DISTFILES_M4 = $(ACINCLUDE_INPUTS)
+ DISTFILES_PC = pc/chdirsaf.c
+@@ -90,7 +105,7 @@
+ COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
+ -I. -I$(srcdir) $(CFLAGS)
+
+-.c.o:
++.c.$(OBJEXT):
+ $(COMPILE) $<
+
+ patch$(EXEEXT): $(OBJS)
+@@ -114,27 +129,46 @@
+ $(SHELL) $(CONFIG_STATUS)
+ config.status: configure
+ $(SHELL) $(CONFIG_STATUS) --recheck
+-configure: configure.in $(srcdir)/aclocal.m4
++configure: configure.ac $(srcdir)/aclocal.m4
+ cd $(srcdir) && autoconf
+-config.hin: configure.in
++config.hin: configure.ac $(srcdir)/aclocal.m4
+ cd $(srcdir) && rm -f config.hin && autoheader
++stdbool.h: stdbool.h.in
++ sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' \
++ <$(srcdir)/stdbool.h.in >stdbool.h
+
+ M4DIR = $(srcdir)/m4
+-ACINCLUDE_INPUTS = $(M4DIR)/ccstdc.m4 $(M4DIR)/d-ino.m4 \
+- $(M4DIR)/inttypes_h.m4 $(M4DIR)/largefile.m4 $(M4DIR)/malloc.m4 \
+- $(M4DIR)/protos.m4 $(M4DIR)/realloc.m4 $(M4DIR)/utimbuf.m4
++ACINCLUDE_INPUTS = \
++ $(M4DIR)/backupfile.m4 \
++ $(M4DIR)/d-ino.m4 \
++ $(M4DIR)/dirname.m4 \
++ $(M4DIR)/dos.m4 \
++ $(M4DIR)/error.m4 \
++ $(M4DIR)/getopt.m4 \
++ $(M4DIR)/malloc.m4 \
++ $(M4DIR)/mbrtowc.m4 \
++ $(M4DIR)/mbstate_t.m4 \
++ $(M4DIR)/memchr.m4 \
++ $(M4DIR)/mkdir.m4 \
++ $(M4DIR)/onceonly.m4 \
++ $(M4DIR)/quote.m4 \
++ $(M4DIR)/quotearg.m4 \
++ $(M4DIR)/realloc.m4 \
++ $(M4DIR)/rmdir.m4 \
++ $(M4DIR)/setmode.m4 \
++ $(M4DIR)/stdbool.m4 \
++ $(M4DIR)/unlocked-io.m4 \
++ $(M4DIR)/utimbuf.m4 \
++ $(M4DIR)/xalloc.m4
+
+ $(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
+ cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
+
+-patchlevel.h: configure.in
+- echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
+-
+-TAGS: $(HDRS) patchlevel.h $(SRCS)
+- etags $(HDRS) patchlevel.h $(SRCS)
++TAGS: $(HDRS) $(SRCS)
++ etags $(HDRS) $(SRCS)
+
+ mostlyclean::
+- rm -f ansi2knr core* *core *.o *_.c
++ rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
+
+ clean:: mostlyclean
+ rm -f patch$(EXEEXT)
+@@ -148,7 +182,7 @@
+ $(MAKE) distclean
+ rm -f TAGS
+
+-PV = $(PACKAGE)-$(VERSION)
++PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
+
+ dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
+ rm -rf $(PV)
+@@ -160,31 +194,28 @@
+ tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
+ rm -rf $(PV)
+
+-ansi2knr.o: config.h
+-ansi2knr: ansi2knr.o
+- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) ansi2knr.o $(LIBS)
+-addext_.c argmatch_.c backupfile_.c basename_.c error_.c \
+-getopt_.c getopt1_.c inp_.c malloc_.c mkdir_.c patch_.c pch_.c quotearg_.c \
+-rename_.c util_.c version_.c xmalloc_.c: ansi2knr
+-.SUFFIXES: _.c
+-.c_.c:
+- ./ansi2knr $< $@
+-
+ $(OBJS): config.h
+-addext$U.o: backupfile.h
+-argmatch$U.o: argmatch.h error.h quotearg.h
+-backupfile$U.o: argmatch.h backupfile.h
+-error$U.o: error.h
+-getopt$U.o getopt1$U.o: getopt.h
+-inp$U.o: backupfile.h common.h inp.h pch.h quotearg.h util.h xalloc.h
+-maketime.o: maketime.h partime.h
+-partime.o: partime.h
+-patch$U.o: argmatch.h backupfile.h common.h getopt.h inp.h \
++COMMON = common.h @STDBOOL_H@
++addext.$(OBJEXT): backupfile.h dirname.h
++argmatch.$(OBJEXT): argmatch.h gettext.h error.h \
++ quote.h quotearg.h unlocked-io.h
++backupfile.$(OBJEXT): argmatch.h backupfile.h dirname.h
++basename.$(OBJEXT): dirname.h
++dirname.$(OBJEXT): dirname.h xalloc.h
++error.$(OBJEXT): error.h gettext.h unlocked-io.h
++getopt.$(OBJEXT) getopt1.$(OBJEXT): getopt.h
++inp.$(OBJEXT): backupfile.h $(COMMON) inp.h pch.h quotearg.h util.h xalloc.h
++maketime.$(OBJEXT): maketime.h partime.h
++mkdir.$(OBJEXT): dirname.h xalloc.h
++partime.$(OBJEXT): partime.h
++patch.$(OBJEXT): argmatch.h backupfile.h $(COMMON) getopt.h inp.h \
+ pch.h quotearg.h util.h version.h xalloc.h
+-pch$U.o: backupfile.h basename.h common.h inp.h pch.h quotearg.h util.h
+-quotearg$U.o: quotearg.h xalloc.h
+-quotesys.o: quotesys.h
+-util$U.o: backupfile.h basename.h common.h maketime.h \
++pch.$(OBJEXT): backupfile.h $(COMMON) dirname.h inp.h pch.h quotearg.h util.h
++quote.$(OBJECT): quote.h quotearg.h
++quotearg.$(OBJEXT): gettext.h quotearg.h xalloc.h
++quotesys.$(OBJEXT): quotesys.h
++strncasecmp.$(OBJEXT): strcasecmp.c
++util.$(OBJEXT): backupfile.h $(COMMON) dirname.h maketime.h \
+ partime.h quotearg.h quotesys.h util.h version.h xalloc.h
+-version$U.o: common.h patchlevel.h util.h version.h
+-xmalloc$U.o: xalloc.h
++version.$(OBJEXT): $(COMMON) version.h
++xmalloc.$(OBJEXT): error.h gettext.h xalloc.h
+diff -urNd -urNd patch-2.5.4/memchr.c patch-2.5.9/memchr.c
+--- patch-2.5.4/memchr.c 1999-07-10 12:44:10.000000000 -0400
++++ patch-2.5.9/memchr.c 2000-10-28 04:22:11.000000000 -0400
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1991, 1993, 1997, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1991,93,96,97,99,2000 Free Software Foundation, Inc.
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+@@ -34,11 +34,18 @@
+ # define __ptr_t char *
+ #endif /* C++ or ANSI C. */
+
+-#if defined (_LIBC)
++#if defined _LIBC
+ # include <string.h>
++# include <memcopy.h>
++#else
++# define reg_char char
+ #endif
+
+-#if defined (HAVE_LIMITS_H) || defined (_LIBC)
++#if HAVE_STDLIB_H || defined _LIBC
++# include <stdlib.h>
++#endif
++
++#if HAVE_LIMITS_H || defined _LIBC
+ # include <limits.h>
+ #endif
+
+@@ -49,21 +56,28 @@
+ #endif
+
+ #include <sys/types.h>
++#if HAVE_BP_SYM_H || defined _LIBC
++# include <bp-sym.h>
++#else
++# define BP_SYM(sym) sym
++#endif
+
++#undef memchr
++#undef __memchr
+
+ /* Search no more than N bytes of S for C. */
+-
+ __ptr_t
+-memchr (s, c, n)
++__memchr (s, c_in, n)
+ const __ptr_t s;
+- int c;
++ int c_in;
+ size_t n;
+ {
+ const unsigned char *char_ptr;
+ const unsigned long int *longword_ptr;
+ unsigned long int longword, magic_bits, charmask;
++ unsigned reg_char c;
+
+- c = (unsigned char) c;
++ c = (unsigned char) c_in;
+
+ /* Handle the first few characters by reading one character at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+@@ -197,3 +211,6 @@
+
+ return 0;
+ }
++#ifdef weak_alias
++weak_alias (__memchr, BP_SYM (memchr))
++#endif
+diff -urNd -urNd patch-2.5.4/mkdir.c patch-2.5.9/mkdir.c
+--- patch-2.5.4/mkdir.c 1999-04-26 08:16:14.000000000 -0400
++++ patch-2.5.9/mkdir.c 2001-09-16 08:42:14.000000000 -0400
+@@ -1,5 +1,6 @@
+-/* BSD compatible make directory function for System V
+- Copyright (C) 1988, 1990, 1998 Free Software Foundation, Inc.
++/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
++ slash. On those systems, this wrapper removes the trailing slash.
++ Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -15,94 +16,61 @@
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+-#if HAVE_CONFIG_H
+-# include <config.h>
+-#endif
++/* written by Jim Meyering */
++
++#include <config.h>
++
++/* Disable the definition of mkdir to rpl_mkdir (from config.h) in this
++ file. Otherwise, we'd get conflicting prototypes for rpl_mkdir on
++ most systems. */
++#undef mkdir
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <errno.h>
+-#ifndef errno
+-extern int errno;
++#include <stdio.h>
++#if HAVE_STDLIB_H
++# include <stdlib.h>
+ #endif
+
+-#if STAT_MACROS_BROKEN
+-# undef S_ISDIR
++#if HAVE_STRING_H
++# include <string.h>
++#else
++# include <strings.h>
+ #endif
+
+-#if !defined(S_ISDIR) && defined(S_IFDIR)
+-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+-#endif
++#include "dirname.h"
++#include "xalloc.h"
+
+-#ifndef S_IRWXU
+-# define S_IRWXU 0700
+-#endif
+-#ifndef S_IRWXG
+-# define S_IRWXG 0070
++#ifndef HAVE_DECL_FREE
++"this configure-time declaration test was not run"
+ #endif
+-#ifndef S_IRWXO
+-# define S_IRWXO 0007
++#if !HAVE_DECL_FREE
++void free ();
+ #endif
+
+-/* mkdir adapted from GNU tar. */
+-
+-/* Make directory DPATH, with permission mode DMODE.
+-
+- Written by Robert Rother, Mariah Corporation, August 1985
+- (sdcsvax!rmr or rmr@uscd). If you want it, it's yours.
+-
+- Severely hacked over by John Gilmore to make a 4.2BSD compatible
+- subroutine. 11Mar86; hoptoad!gnu
+-
+- Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir,
+- subroutine didn't return EEXIST. It does now. */
++/* This function is required at least for NetBSD 1.5.2. */
+
+ int
+-mkdir (const char *dpath, mode_t dmode)
++rpl_mkdir (char const *dir, mode_t mode)
+ {
+- pid_t cpid;
+- mode_t mode;
+- int status;
+- struct stat statbuf;
++ int ret_val;
++ char *tmp_dir;
++ size_t len = strlen (dir);
+
+- if (stat (dpath, &statbuf) == 0)
++ if (len && dir[len - 1] == '/')
+ {
+- errno = EEXIST; /* stat worked, so it already exists. */
+- return -1;
++ tmp_dir = xstrdup (dir);
++ strip_trailing_slashes (tmp_dir);
+ }
+-
+- /* If stat fails for a reason other than non-existence, return error. */
+- if (errno != ENOENT)
+- return -1;
+-
+- cpid = fork ();
+- switch (cpid)
++ else
+ {
+- case -1: /* Cannot fork. */
+- return -1; /* errno is already set. */
++ tmp_dir = (char *) dir;
++ }
+
+- case 0: /* Child process. */
+- /* Cheap hack to set mode of new directory. Since this child
+- process is going away anyway, we zap its umask.
+- This won't suffice to set SUID, SGID, etc. on this
+- directory, so the parent process calls chmod afterward. */
+- mode = umask (0); /* Get current umask. */
+- /* Set for mkdir. */
+- umask (mode | ((S_IRWXU | S_IRWXG | S_IRWXO) & ~dmode));
+- execl ("/bin/mkdir", "mkdir", dpath, (char *) 0);
+- _exit (1);
++ ret_val = mkdir (tmp_dir, mode);
+
+- default: /* Parent process. */
+- /* Wait for kid to finish. */
+- while (wait (&status) != cpid)
+- /* Do nothing. */ ;
++ if (tmp_dir != dir)
++ free (tmp_dir);
+
+- if (status)
+- {
+- /* /bin/mkdir failed. */
+- errno = EIO;
+- return -1;
+- }
+- return chmod (dpath, dmode);
+- }
++ return ret_val;
+ }
+diff -urNd -urNd patch-2.5.4/mkinstalldirs patch-2.5.9/mkinstalldirs
+--- patch-2.5.4/mkinstalldirs 1999-01-05 08:29:06.000000000 -0500
++++ patch-2.5.9/mkinstalldirs 2002-09-02 11:10:52.000000000 -0400
+@@ -4,9 +4,53 @@
+ # Created: 1993-05-16
+ # Public domain
+
+-# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
+-
+ errstatus=0
++dirmode=""
++
++usage="\
++Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
++
++# process command line arguments
++while test $# -gt 0 ; do
++ case "${1}" in
++ -h | --help | --h* ) # -h for help
++ echo "${usage}" 1>&2; exit 0 ;;
++ -m ) # -m PERM arg
++ shift
++ test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ dirmode="${1}"
++ shift ;;
++ -- ) shift; break ;; # stop option processing
++ -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
++ * ) break ;; # first non-opt arg
++ esac
++done
++
++for file
++do
++ if test -d "$file"; then
++ shift
++ else
++ break
++ fi
++done
++
++case $# in
++0) exit 0 ;;
++esac
++
++case $dirmode in
++'')
++ if mkdir -p -- . 2>/dev/null; then
++ echo "mkdir -p -- $*"
++ exec mkdir -p -- "$@"
++ fi ;;
++*)
++ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
++ echo "mkdir -m $dirmode -p -- $*"
++ exec mkdir -m "$dirmode" -p -- "$@"
++ fi ;;
++esac
+
+ for file
+ do
+@@ -22,13 +66,24 @@
+ esac
+
+ if test ! -d "$pathcomp"; then
+- echo "mkdir $pathcomp"
++ echo "mkdir $pathcomp"
+
+- mkdir "$pathcomp" || lasterr=$?
++ mkdir "$pathcomp" || lasterr=$?
+
+- if test ! -d "$pathcomp"; then
+- errstatus=$lasterr
+- fi
++ if test ! -d "$pathcomp"; then
++ errstatus=$lasterr
++ else
++ if test ! -z "$dirmode"; then
++ echo "chmod $dirmode $pathcomp"
++
++ lasterr=""
++ chmod "$dirmode" "$pathcomp" || lasterr=$?
++
++ if test ! -z "$lasterr"; then
++ errstatus=$lasterr
++ fi
++ fi
++ fi
+ fi
+
+ pathcomp="$pathcomp/"
+@@ -37,4 +92,8 @@
+
+ exit $errstatus
+
++# Local Variables:
++# mode: shell-script
++# sh-indentation: 3
++# End:
+ # mkinstalldirs ends here
+diff -urNd -urNd patch-2.5.4/NEWS patch-2.5.9/NEWS
+--- patch-2.5.4/NEWS 1998-03-20 21:51:32.000000000 -0500
++++ patch-2.5.9/NEWS 2003-05-18 04:40:54.000000000 -0400
+@@ -1,9 +1,23 @@
+-Known problems:
++Changes in versions 2.5.8 and 2.5.9: bug fixes only.
+
+-* The diffutils 2.7 documentation for `patch' is obsolete; this should be
+- fixed in diffutils 2.8. Until then, see `patch --help' or `man patch'.
+-
+-Changes since version 2.5:
++Changes in version 2.5.7:
++
++* patch -D now outputs preprocessor lines without comments, as required
++ by POSIX 1003.1-2001.
++
++Changes in version 2.5.6:
++
++* File names in context patches may now contain spaces, so long
++ as the context patch headers use a tab to separate the file name
++ from the time stamp.
++* Perforce is now supported.
++* Patch lines beginning with "#" are comments and are ignored.
++
++Changes in version 2.5.5:
++
++* The bug reporting address is now <bug-patch@gnu.org>.
++
++Changes in version 2.5.4:
+
+ * A security hole has been closed.
+ It involved race conditions with temporary files.
+@@ -19,6 +33,9 @@
+ * `patch' now ignores trailing carriage returns in lines of context diffs
+ if the context diff headers end in carriage return.
+
++* `patch' now ignores context diff header file names that have fewer slashes
++ than the count specified by the -p or --strip option.
++
+ * New options:
+ --posix
+ --quoting-style=WORD
+@@ -196,3 +213,25 @@
+ being patched.
+ * Print the system error message when system calls fail.
+ * Fixed various bugs and portability problems.
++
++
++
++Copyright (C) 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003
++Free Software Foundation, Inc.
++
++This file is part of GNU Patch.
++
++This program is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2, or (at your option)
++any later version.
++
++This program is distributed in the hope that they will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING. If not, write to
++the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
+diff -urNd -urNd patch-2.5.4/partime.c patch-2.5.9/partime.c
+--- patch-2.5.4/partime.c 1998-03-15 10:48:53.000000000 -0500
++++ patch-2.5.9/partime.c 2002-02-18 02:42:58.000000000 -0500
+@@ -1,6 +1,6 @@
+ /* Parse a string, yielding a struct partime that describes it. */
+
+-/* Copyright 1993, 1994, 1995, 1997 Paul Eggert
++/* Copyright (C) 1993, 1994, 1995, 1997, 2002 Paul Eggert
+ Distributed under license by the Free Software Foundation, Inc.
+
+ This file is part of RCS.
+@@ -75,7 +75,7 @@
+ #include <partime.h>
+
+ char const partime_id[] =
+- "$Id: partime.c,v 5.18 1998/03/15 15:48:53 eggert Exp $";
++ "$Id: partime.c,v 1.2 2002/02/18 07:42:58 eggert Exp $";
+
+
+ /* Lookup tables for names of months, weekdays, time zones. */
+@@ -791,7 +791,7 @@
+ return 0;
+ if (negative)
+ n = -n;
+- while (!ISALNUM ((unsigned char) *s))
++ while (! ISALNUM ((unsigned char) *s) && *s)
+ s++;
+ i = lookup (s, relative_units);
+ if (!TM_DEFINED (i))
+diff -urNd -urNd patch-2.5.4/patch.c patch-2.5.9/patch.c
+--- patch-2.5.4/patch.c 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/patch.c 2003-05-20 09:55:03.000000000 -0400
+@@ -1,9 +1,11 @@
+ /* patch - a program to apply diffs to original files */
+
+-/* $Id: patch.c,v 1.28 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: patch.c,v 1.44 2003/05/20 13:55:03 eggert Exp $ */
+
+-/* Copyright 1984, 1985-1987, 1988 Larry Wall
+- Copyright 1989, 1990-1993, 1997-1998, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
++
++ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002,
++ 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -50,47 +52,47 @@
+ struct outstate
+ {
+ FILE *ofp;
+- int after_newline;
+- int zero_output;
++ bool after_newline;
++ bool zero_output;
+ };
+
+ /* procedures */
+
+-static FILE *create_output_file PARAMS ((char const *, int));
+-static LINENUM locate_hunk PARAMS ((LINENUM));
+-static bool apply_hunk PARAMS ((struct outstate *, LINENUM));
+-static bool copy_till PARAMS ((struct outstate *, LINENUM));
+-static bool patch_match PARAMS ((LINENUM, LINENUM, LINENUM, LINENUM));
+-static bool similar PARAMS ((char const *, size_t, char const *, size_t));
+-static bool spew_output PARAMS ((struct outstate *));
+-static char const *make_temp PARAMS ((int));
+-static int numeric_string PARAMS ((char const *, int, char const *));
+-static void abort_hunk PARAMS ((void));
+-static void cleanup PARAMS ((void));
+-static void get_some_switches PARAMS ((void));
+-static void init_output PARAMS ((char const *, int, struct outstate *));
+-static void init_reject PARAMS ((void));
+-static void reinitialize_almost_everything PARAMS ((void));
+-static void remove_if_needed PARAMS ((char const *, int volatile *));
+-static void usage PARAMS ((FILE *, int)) __attribute__((noreturn));
++static FILE *create_output_file (char const *, int);
++static LINENUM locate_hunk (LINENUM);
++static bool apply_hunk (struct outstate *, LINENUM);
++static bool copy_till (struct outstate *, LINENUM);
++static bool patch_match (LINENUM, LINENUM, LINENUM, LINENUM);
++static bool similar (char const *, size_t, char const *, size_t);
++static bool spew_output (struct outstate *);
++static char const *make_temp (char);
++static int numeric_string (char const *, bool, char const *);
++static void abort_hunk (void);
++static void cleanup (void);
++static void get_some_switches (void);
++static void init_output (char const *, int, struct outstate *);
++static void init_reject (void);
++static void reinitialize_almost_everything (void);
++static void remove_if_needed (char const *, int volatile *);
++static void usage (FILE *, int) __attribute__((noreturn));
+
+-static int make_backups;
+-static int backup_if_mismatch;
++static bool make_backups;
++static bool backup_if_mismatch;
+ static char const *version_control;
+ static char const *version_control_context;
+-static int remove_empty_files;
++static bool remove_empty_files;
+
+-/* TRUE if -R was specified on command line. */
+-static int reverse_flag_specified;
++/* true if -R was specified on command line. */
++static bool reverse_flag_specified;
+
+ /* how many input lines have been irretractably output */
+ static LINENUM last_frozen_line;
+
+ static char const *do_defines; /* symbol to patch using ifdef, ifndef, etc. */
+ static char const if_defined[] = "\n#ifdef %s\n";
+-static char const not_defined[] = "#ifndef %s\n";
++static char const not_defined[] = "\n#ifndef %s\n";
+ static char const else_defined[] = "\n#else\n";
+-static char const end_defined[] = "\n#endif /* %s */\n";
++static char const end_defined[] = "\n#endif\n";
+
+ static int Argc;
+ static char * const *Argv;
+@@ -107,20 +109,18 @@
+
+ static char serrbuf[BUFSIZ];
+
+-char const program_name[] = "patch";
+-
+ /* Apply a set of diffs as appropriate. */
+
+-int main PARAMS ((int, char **));
+-
+ int
+ main (int argc, char **argv)
+ {
+ char const *val;
+- bool somefailed = FALSE;
++ bool somefailed = false;
+ struct outstate outstate;
+ char numbuf[LINENUM_LENGTH_BOUND + 1];
+
++ xalloc_exit_failure = 2;
++ program_name = argv[0];
+ init_time ();
+
+ setbuf(stderr, serrbuf);
+@@ -141,12 +141,11 @@
+ posixly_correct = getenv ("POSIXLY_CORRECT") != 0;
+ backup_if_mismatch = ! posixly_correct;
+ patch_get = ((val = getenv ("PATCH_GET"))
+- ? numeric_string (val, 1, "PATCH_GET value")
++ ? numeric_string (val, true, "PATCH_GET value")
+ : posixly_correct - 1);
+
+ val = getenv ("SIMPLE_BACKUP_SUFFIX");
+- if (val && *val)
+- simple_backup_suffix = val;
++ simple_backup_suffix = val && *val ? val : ".orig";
+
+ if ((version_control = getenv ("PATCH_VERSION_CONTROL")))
+ version_control_context = "$PATCH_VERSION_CONTROL";
+@@ -171,7 +170,7 @@
+ init_output (outfile, 0, &outstate);
+
+ /* Make sure we clean up in case of disaster. */
+- set_signals(0);
++ set_signals (false);
+
+ for (
+ open_patch_file (patchname);
+@@ -180,28 +179,26 @@
+ ) { /* for each patch in patch file */
+ int hunk = 0;
+ int failed = 0;
+- int mismatch = 0;
++ bool mismatch = false;
+ char *outname = outfile ? outfile : inname;
+
+ if (!skip_rest_of_patch)
+ get_input_file (inname, outname);
+
+ if (diff_type == ED_DIFF) {
+- outstate.zero_output = 0;
+- if (! dry_run)
++ outstate.zero_output = false;
++ somefailed |= skip_rest_of_patch;
++ do_ed_script (outstate.ofp);
++ if (! dry_run && ! outfile && ! skip_rest_of_patch)
+ {
+- do_ed_script (outstate.ofp);
+- if (! outfile)
+- {
+- struct stat statbuf;
+- if (stat (TMPOUTNAME, &statbuf) != 0)
+- pfatal ("%s", TMPOUTNAME);
+- outstate.zero_output = statbuf.st_size == 0;
+- }
++ struct stat statbuf;
++ if (stat (TMPOUTNAME, &statbuf) != 0)
++ pfatal ("%s", TMPOUTNAME);
++ outstate.zero_output = statbuf.st_size == 0;
+ }
+ } else {
+ int got_hunk;
+- int apply_anyway = 0;
++ bool apply_anyway = false;
+
+ /* initialize the patched file */
+ if (! skip_rest_of_patch && ! outfile)
+@@ -236,7 +233,7 @@
+ do {
+ where = locate_hunk(fuzz);
+ if (! where || fuzz || last_offset)
+- mismatch = 1;
++ mismatch = true;
+ if (hunk == 1 && ! where && ! (force | apply_anyway)
+ && reverse == reverse_flag_specified) {
+ /* dwim for reversed patch? */
+@@ -253,7 +250,7 @@
+ (reverse
+ ? "Unreversed"
+ : "Reversed (or previously applied)"))))
+- reverse ^= 1;
++ reverse = ! reverse;
+ else
+ {
+ /* Put it back to normal. */
+@@ -261,7 +258,7 @@
+ fatal ("lost hunk on alloc error!");
+ if (where)
+ {
+- apply_anyway = 1;
++ apply_anyway = true;
+ fuzz--; /* Undo `++fuzz' below. */
+ where = 0;
+ }
+@@ -344,7 +341,7 @@
+ if (! spew_output (&outstate))
+ {
+ say ("Skipping patch.\n");
+- skip_rest_of_patch = TRUE;
++ skip_rest_of_patch = true;
+ }
+ }
+ }
+@@ -354,7 +351,7 @@
+ if (! skip_rest_of_patch && ! outfile) {
+ if (outstate.zero_output
+ && (remove_empty_files
+- || (pch_says_nonexistent (reverse ^ 1) == 2
++ || (pch_says_nonexistent (! reverse) == 2
+ && ! posixly_correct)))
+ {
+ if (verbosity == VERBOSE)
+@@ -371,9 +368,9 @@
+ else
+ {
+ if (! outstate.zero_output
+- && pch_says_nonexistent (reverse ^ 1))
++ && pch_says_nonexistent (! reverse))
+ {
+- mismatch = 1;
++ mismatch = true;
+ if (verbosity != SILENT)
+ say ("File %s is not empty after patch, as expected\n",
+ quotearg (outname));
+@@ -389,7 +386,7 @@
+ || (backup_if_mismatch && (mismatch | failed))));
+
+ if ((set_time | set_utc)
+- && (t = pch_timestamp (reverse ^ 1)) != (time_t) -1)
++ && (t = pch_timestamp (! reverse)) != (time_t) -1)
+ {
+ struct utimbuf utimbuf;
+ utimbuf.actime = utimbuf.modtime = t;
+@@ -418,7 +415,7 @@
+ if (fclose (rejfp) != 0)
+ write_fatal ();
+ if (failed) {
+- somefailed = TRUE;
++ somefailed = true;
+ say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
+ skip_rest_of_patch ? "ignored" : "FAILED");
+ if (outname) {
+@@ -432,7 +429,7 @@
+ if (! dry_run)
+ {
+ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
+- rej, instat.st_mode, FALSE);
++ rej, instat.st_mode, false);
+ if (! inerrno
+ && (chmod (rej, (instat.st_mode
+ & ~(S_IXUSR|S_IXGRP|S_IXOTH)))
+@@ -446,7 +443,7 @@
+ say ("\n");
+ }
+ }
+- set_signals (1);
++ set_signals (true);
+ }
+ if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
+ write_fatal ();
+@@ -482,7 +479,7 @@
+ }
+
+ reverse = reverse_flag_specified;
+- skip_rest_of_patch = FALSE;
++ skip_rest_of_patch = false;
+ }
+
+ static char const shortopts[] = "bB:cd:D:eEfF:g:i:lnNo:p:r:RstTuvV:x:Y:z:Z";
+@@ -585,7 +582,7 @@
+ " --posix Conform to the POSIX standard.",
+ "",
+ " -d DIR --directory=DIR Change the working directory to DIR first.",
+-#if HAVE_SETMODE
++#if HAVE_SETMODE_DOS
+ " --binary Read and write data in binary mode.",
+ #else
+ " --binary Read and write data in binary mode (no effect on this platform).",
+@@ -594,7 +591,7 @@
+ " -v --version Output version info.",
+ " --help Output this help.",
+ "",
+-"Report bugs to <bug-gnu-utils@gnu.org>.",
++"Report bugs to <" PACKAGE_BUGREPORT ">.",
+ 0
+ };
+
+@@ -635,7 +632,7 @@
+ != -1) {
+ switch (optc) {
+ case 'b':
+- make_backups = 1;
++ make_backups = true;
+ /* Special hack for backward compatibility with CVS 1.9.
+ If the last 4 args are `-b SUFFIX ORIGFILE PATCHFILE',
+ treat `-b' as if it were `-b -z'. */
+@@ -671,28 +668,28 @@
+ diff_type = ED_DIFF;
+ break;
+ case 'E':
+- remove_empty_files = TRUE;
++ remove_empty_files = true;
+ break;
+ case 'f':
+- force = TRUE;
++ force = true;
+ break;
+ case 'F':
+- maxfuzz = numeric_string (optarg, 0, "fuzz factor");
++ maxfuzz = numeric_string (optarg, false, "fuzz factor");
+ break;
+ case 'g':
+- patch_get = numeric_string (optarg, 1, "get option value");
++ patch_get = numeric_string (optarg, true, "get option value");
+ break;
+ case 'i':
+ patchname = savestr (optarg);
+ break;
+ case 'l':
+- canonicalize = TRUE;
++ canonicalize = true;
+ break;
+ case 'n':
+ diff_type = NORMAL_DIFF;
+ break;
+ case 'N':
+- noreverse = TRUE;
++ noreverse = true;
+ break;
+ case 'o':
+ if (strcmp (optarg, "-") == 0)
+@@ -700,23 +697,23 @@
+ outfile = savestr (optarg);
+ break;
+ case 'p':
+- strippath = numeric_string (optarg, 0, "strip count");
++ strippath = numeric_string (optarg, false, "strip count");
+ break;
+ case 'r':
+ rejname = savestr (optarg);
+ break;
+ case 'R':
+- reverse = 1;
+- reverse_flag_specified = 1;
++ reverse = true;
++ reverse_flag_specified = true;
+ break;
+ case 's':
+ verbosity = SILENT;
+ break;
+ case 't':
+- batch = TRUE;
++ batch = true;
+ break;
+ case 'T':
+- set_time = 1;
++ set_time = true;
+ break;
+ case 'u':
+ diff_type = UNI_DIFF;
+@@ -731,7 +728,7 @@
+ break;
+ #if DEBUGGING
+ case 'x':
+- debug = numeric_string (optarg, 1, "debugging option");
++ debug = numeric_string (optarg, true, "debugging option");
+ break;
+ #endif
+ case 'Y':
+@@ -746,29 +743,29 @@
+ simple_backup_suffix = savestr (optarg);
+ break;
+ case 'Z':
+- set_utc = 1;
++ set_utc = true;
+ break;
+ case CHAR_MAX + 1:
+- dry_run = TRUE;
++ dry_run = true;
+ break;
+ case CHAR_MAX + 2:
+ verbosity = VERBOSE;
+ break;
+ case CHAR_MAX + 3:
+-#if HAVE_SETMODE
++#if HAVE_SETMODE_DOS
+ binary_transput = O_BINARY;
+ #endif
+ break;
+ case CHAR_MAX + 4:
+ usage (stdout, 0);
+ case CHAR_MAX + 5:
+- backup_if_mismatch = 1;
++ backup_if_mismatch = true;
+ break;
+ case CHAR_MAX + 6:
+- backup_if_mismatch = 0;
++ backup_if_mismatch = false;
+ break;
+ case CHAR_MAX + 7:
+- posixly_correct = 1;
++ posixly_correct = true;
+ break;
+ case CHAR_MAX + 8:
+ {
+@@ -810,7 +807,7 @@
+ returning the result. */
+ static int
+ numeric_string (char const *string,
+- int negative_allowed,
++ bool negative_allowed,
+ char const *argtype_msgid)
+ {
+ int value = 0;
+@@ -884,7 +881,7 @@
+ && offset <= max_pos_offset
+ && patch_match (first_guess, offset, (LINENUM) 0, suffix_fuzz))
+ {
+- last_offset = offset;
++ last_offset += offset;
+ return first_guess + offset;
+ }
+ else
+@@ -898,7 +895,7 @@
+ if (offset <= max_neg_offset
+ && patch_match (first_guess, -offset, prefix_fuzz, (LINENUM) 0))
+ {
+- last_offset = - offset;
++ last_offset -= offset;
+ return first_guess - offset;
+ }
+ else
+@@ -913,8 +910,8 @@
+ if (debug & 1)
+ say ("Offset changing from %s to %s\n",
+ format_linenum (numbuf0, last_offset),
+- format_linenum (numbuf1, offset));
+- last_offset = offset;
++ format_linenum (numbuf1, last_offset + offset));
++ last_offset += offset;
+ return first_guess+offset;
+ }
+ if (0 < offset && offset <= max_neg_offset
+@@ -922,8 +919,8 @@
+ if (debug & 1)
+ say ("Offset changing from %s to %s\n",
+ format_linenum (numbuf0, last_offset),
+- format_linenum (numbuf1, -offset));
+- last_offset = -offset;
++ format_linenum (numbuf1, last_offset - offset));
++ last_offset -= offset;
+ return first_guess-offset;
+ }
+ }
+@@ -1009,10 +1006,10 @@
+ if (pch_char(old) == '-') {
+ assert (outstate->after_newline);
+ if (! copy_till (outstate, where + old - 1))
+- return FALSE;
++ return false;
+ if (R_do_defines) {
+ if (def_state == OUTSIDE) {
+- fprintf (fp, outstate->after_newline + if_defined,
++ fprintf (fp, outstate->after_newline + not_defined,
+ R_do_defines);
+ def_state = IN_IFNDEF;
+ }
+@@ -1023,7 +1020,7 @@
+ if (ferror (fp))
+ write_fatal ();
+ outstate->after_newline = pch_write_line (old, fp);
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ }
+ last_frozen_line++;
+ old++;
+@@ -1033,7 +1030,7 @@
+ }
+ else if (pch_char(new) == '+') {
+ if (! copy_till (outstate, where + old - 1))
+- return FALSE;
++ return false;
+ if (R_do_defines) {
+ if (def_state == IN_IFNDEF) {
+ fprintf (fp, outstate->after_newline + else_defined);
+@@ -1048,7 +1045,7 @@
+ write_fatal ();
+ }
+ outstate->after_newline = pch_write_line (new, fp);
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ new++;
+ }
+ else if (pch_char(new) != pch_char(old)) {
+@@ -1064,10 +1061,10 @@
+ else if (pch_char(new) == '!') {
+ assert (outstate->after_newline);
+ if (! copy_till (outstate, where + old - 1))
+- return FALSE;
++ return false;
+ assert (outstate->after_newline);
+ if (R_do_defines) {
+- fprintf (fp, not_defined, R_do_defines);
++ fprintf (fp, 1 + not_defined, R_do_defines);
+ if (ferror (fp))
+ write_fatal ();
+ def_state = IN_IFNDEF;
+@@ -1096,25 +1093,24 @@
+ new++;
+ }
+ while (pch_char (new) == '!');
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ }
+ else {
+ assert(pch_char(new) == ' ');
+ old++;
+ new++;
+ if (R_do_defines && def_state != OUTSIDE) {
+- fprintf (fp, outstate->after_newline + end_defined,
+- R_do_defines);
++ fprintf (fp, outstate->after_newline + end_defined);
+ if (ferror (fp))
+ write_fatal ();
+- outstate->after_newline = 1;
++ outstate->after_newline = true;
+ def_state = OUTSIDE;
+ }
+ }
+ }
+ if (new <= pat_end && pch_char(new) == '+') {
+ if (! copy_till (outstate, where + old - 1))
+- return FALSE;
++ return false;
+ if (R_do_defines) {
+ if (def_state == OUTSIDE) {
+ fprintf (fp, outstate->after_newline + if_defined,
+@@ -1127,7 +1123,7 @@
+ }
+ if (ferror (fp))
+ write_fatal ();
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ }
+
+ do
+@@ -1135,18 +1131,18 @@
+ if (! outstate->after_newline && putc ('\n', fp) == EOF)
+ write_fatal ();
+ outstate->after_newline = pch_write_line (new, fp);
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ new++;
+ }
+ while (new <= pat_end && pch_char (new) == '+');
+ }
+ if (R_do_defines && def_state != OUTSIDE) {
+- fprintf (fp, outstate->after_newline + end_defined, R_do_defines);
++ fprintf (fp, outstate->after_newline + end_defined);
+ if (ferror (fp))
+ write_fatal ();
+- outstate->after_newline = 1;
++ outstate->after_newline = true;
+ }
+- return TRUE;
++ return true;
+ }
+
+ /* Create an output file. */
+@@ -1168,8 +1164,8 @@
+ init_output (char const *name, int open_flags, struct outstate *outstate)
+ {
+ outstate->ofp = name ? create_output_file (name, open_flags) : (FILE *) 0;
+- outstate->after_newline = 1;
+- outstate->zero_output = 1;
++ outstate->after_newline = true;
++ outstate->zero_output = true;
+ }
+
+ /* Open a file to put hunks we can't locate. */
+@@ -1195,22 +1191,22 @@
+ if (R_last_frozen_line > lastline)
+ {
+ say ("misordered hunks! output would be garbled\n");
+- return FALSE;
++ return false;
+ }
+ while (R_last_frozen_line < lastline)
+ {
+- s = ifetch (++R_last_frozen_line, 0, &size);
++ s = ifetch (++R_last_frozen_line, false, &size);
+ if (size)
+ {
+ if ((! outstate->after_newline && putc ('\n', fp) == EOF)
+ || ! fwrite (s, sizeof *s, size, fp))
+ write_fatal ();
+ outstate->after_newline = s[size - 1] == '\n';
+- outstate->zero_output = 0;
++ outstate->zero_output = false;
+ }
+ }
+ last_frozen_line = R_last_frozen_line;
+- return TRUE;
++ return true;
+ }
+
+ /* Finish copying the input file to the output file. */
+@@ -1229,7 +1225,7 @@
+
+ if (last_frozen_line < input_lines)
+ if (! copy_till (outstate, input_lines))
+- return FALSE;
++ return false;
+
+ if (outstate->ofp && ! outfile)
+ {
+@@ -1238,7 +1234,7 @@
+ outstate->ofp = 0;
+ }
+
+- return TRUE;
++ return true;
+ }
+
+ /* Does the patch pattern match at line base+offset? */
+@@ -1259,13 +1255,13 @@
+ if (!similar(p, size,
+ pfetch(pline),
+ pch_line_len(pline) ))
+- return FALSE;
++ return false;
+ }
+ else if (size != pch_line_len (pline)
+ || memcmp (p, pfetch (pline), size) != 0)
+- return FALSE;
++ return false;
+ }
+- return TRUE;
++ return true;
+ }
+
+ /* Do two lines match with canonicalized white space? */
+@@ -1287,7 +1283,7 @@
+ if (alen)
+ {
+ if (!(*a == ' ' || *a == '\t'))
+- return FALSE;
++ return false;
+ do a++, alen--;
+ while (alen && (*a == ' ' || *a == '\t'));
+ }
+@@ -1295,7 +1291,7 @@
+ return alen == blen;
+ }
+ else if (!alen || *a++ != *b++)
+- return FALSE;
++ return false;
+ else
+ alen--, blen--;
+ }
+@@ -1303,8 +1299,8 @@
+
+ /* Make a temporary file. */
+
+-#if HAVE_MKTEMP
+-char *mktemp PARAMS ((char *));
++#if HAVE_MKTEMP && ! HAVE_DECL_MKTEMP && ! defined mktemp
++char *mktemp (char *);
+ #endif
+
+ #ifndef TMPDIR
+@@ -1312,7 +1308,7 @@
+ #endif
+
+ static char const *
+-make_temp (int letter)
++make_temp (char letter)
+ {
+ char *r;
+ #if HAVE_MKTEMP
+@@ -1322,7 +1318,14 @@
+ if (!tmpdir) tmpdir = TMPDIR;
+ r = xmalloc (strlen (tmpdir) + 10);
+ sprintf (r, "%s/p%cXXXXXX", tmpdir, letter);
++
++ /* It is OK to use mktemp here, since the rest of the code always
++ opens temp files with O_EXCL. It might be better to use mkstemp
++ to avoid some DoS problems, but simply substituting mkstemp for
++ mktemp here will not fix the DoS problems; a more extensive
++ change would be needed. */
+ mktemp (r);
++
+ if (!*r)
+ pfatal ("mktemp");
+ #else
+diff -urNd -urNd patch-2.5.4/patchlevel.h patch-2.5.9/patchlevel.h
+--- patch-2.5.4/patchlevel.h 1999-08-30 02:48:14.000000000 -0400
++++ patch-2.5.9/patchlevel.h 1969-12-31 19:00:00.000000000 -0500
+@@ -1 +0,0 @@
+-#define PATCH_VERSION "2.5.4"
+diff -urNd -urNd patch-2.5.4/patch.man patch-2.5.9/patch.man
+--- patch-2.5.4/patch.man 1998-03-21 10:48:43.000000000 -0500
++++ patch-2.5.9/patch.man 2002-05-25 06:36:44.000000000 -0400
+@@ -2,7 +2,7 @@
+ .de Id
+ .ds Dt \\$4
+ ..
+-.Id $Id: patch.man,v 1.26 1998/03/21 15:48:43 eggert Exp $
++.Id $Id: patch.man,v 1.31 2002/05/25 10:36:44 eggert Exp $
+ .ds = \-\^\-
+ .de Sp
+ .if t .sp .3
+@@ -70,6 +70,10 @@
+ or is encapsulated one or more times by prepending
+ "\fB\- \fP" to lines starting with "\fB\-\fP" as specified by Internet RFC 934,
+ this is taken into account.
++After removing indenting or encapsulation,
++lines beginning with
++.B #
++are ignored, as they are considered to be comments.
+ .PP
+ With context diffs, and to a lesser extent with normal diffs,
+ .B patch
+@@ -185,19 +189,19 @@
+ .B " \(bu"
+ If
+ .B patch
+-is not ignoring \s-1RCS\s0, ClearCase, and \s-1SCCS\s0 (see the
++is not ignoring \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0 (see the
+ .BI "\-g\ " num
+ or
+ .BI \*=get= num
+ option), and no named files exist
+-but an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master is found,
++but an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master is found,
+ .B patch
+ selects the first named file
+-with an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master.
++with an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master.
+ .TP
+ .B " \(bu"
+ If no named files exist,
+-no \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master was found,
++no \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master was found,
+ some names are given,
+ .B patch
+ is not conforming to \s-1POSIX\s0,
+@@ -362,14 +366,14 @@
+ .BR patch 's
+ actions when a file is under \s-1RCS\s0 or \s-1SCCS\s0 control,
+ and does not exist or is read-only and matches the default version,
+-or when a file is under ClearCase control and does not exist.
++or when a file is under ClearCase or Perforce control and does not exist.
+ If
+ .I num
+ is positive,
+ .B patch
+ gets (or checks out) the file from the revision control system; if zero,
+ .B patch
+-ignores \s-1RCS\s0, ClearCase, and \s-1SCCS\s0
++ignores \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0
+ and does not get the file; and if negative,
+ .B patch
+ asks the user whether to get the file.
+@@ -411,6 +415,9 @@
+ Send output to
+ .I outfile
+ instead of patching files in place.
++Do not use this option if
++.I outfile
++is one of the files to be patched.
+ .TP
+ \fB\-p\fP\fInum\fP or \fB\*=strip\fP\fB=\fP\fInum\fP
+ Strip the smallest prefix containing
+@@ -458,7 +465,8 @@
+ Do not remove files that are empty after patching.
+ .TP
+ .B " \(bu"
+-Do not ask whether to get files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0.
++Do not ask whether to get files from \s-1RCS\s0, ClearCase, Perforce,
++or \s-1SCCS\s0.
+ .TP
+ .B " \(bu"
+ Require that all options precede the files in the command line.
+@@ -715,7 +723,8 @@
+ .B PATCH_GET
+ This specifies whether
+ .B patch
+-gets missing or read-only files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0
++gets missing or read-only files from \s-1RCS\s0, ClearCase, Perforce,
++or \s-1SCCS\s0
+ by default; see the
+ .B \-g
+ or
+@@ -1097,7 +1106,7 @@
+ .fi
+ .SH BUGS
+ Please report bugs via email to
+-.BR <bug-gnu-utils@gnu.org> .
++.BR <bug-patch@gnu.org> .
+ .PP
+ .B patch
+ could be smarter about partial matches, excessively deviant offsets and
+@@ -1115,13 +1124,15 @@
+ This could be construed as a feature.
+ .SH COPYING
+ Copyright
+-.if t \(co
++.ie t \(co
++.el (C)
+ 1984, 1985, 1986, 1988 Larry Wall.
+ .br
+ Copyright
+-.if t \(co
+-1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
+-Free Software Foundation, Inc.
++.ie t \(co
++.el (C)
++1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
++2000, 2001, 2002 Free Software Foundation, Inc.
+ .PP
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+diff -urNd -urNd patch-2.5.4/pch.c patch-2.5.9/pch.c
+--- patch-2.5.4/pch.c 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/pch.c 2003-05-20 10:03:17.000000000 -0400
+@@ -1,9 +1,11 @@
+ /* reading patches */
+
+-/* $Id: pch.c,v 1.29 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
+
+-/* Copyright 1986, 1987, 1988 Larry Wall
+- Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1986, 1987, 1988 Larry Wall
++
++ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
++ 2002, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -23,7 +25,7 @@
+ #define XTERN extern
+ #include <common.h>
+ #include <backupfile.h>
+-#include <basename.h>
++#include <dirname.h>
+ #include <inp.h>
+ #include <quotearg.h>
+ #include <util.h>
+@@ -57,7 +59,8 @@
+ static char *p_Char; /* +, -, and ! */
+ static LINENUM hunkmax = INITHUNKMAX; /* size of above arrays */
+ static int p_indent; /* indent to patch */
+-static int p_strip_trailing_cr; /* nonzero if stripping trailing \r */
++static bool p_strip_trailing_cr; /* true if stripping trailing \r */
++static bool p_pass_comments_through; /* true if not ignoring # lines */
+ static file_offset p_base; /* where to intuit this time */
+ static LINENUM p_bline; /* line # of p_base */
+ static file_offset p_start; /* where intuit found a patch */
+@@ -68,17 +71,18 @@
+
+ enum nametype { OLD, NEW, INDEX, NONE };
+
+-static char *scan_linenum PARAMS ((char *, LINENUM *));
+-static enum diff intuit_diff_type PARAMS ((void));
+-static enum nametype best_name PARAMS ((char * const *, int const *));
+-static int prefix_components PARAMS ((char *, int));
+-static size_t pget_line PARAMS ((int, int, int));
+-static size_t get_line PARAMS ((void));
+-static bool incomplete_line PARAMS ((void));
+-static bool grow_hunkmax PARAMS ((void));
+-static void malformed PARAMS ((void)) __attribute__ ((noreturn));
+-static void next_intuit_at PARAMS ((file_offset, LINENUM));
+-static void skip_to PARAMS ((file_offset, LINENUM));
++static char *scan_linenum (char *, LINENUM *);
++static enum diff intuit_diff_type (void);
++static enum nametype best_name (char * const *, int const *);
++static int prefix_components (char *, bool);
++static size_t pget_line (int, int, bool, bool);
++static size_t get_line (void);
++static bool incomplete_line (void);
++static bool grow_hunkmax (void);
++static void malformed (void) __attribute__ ((noreturn));
++static void next_intuit_at (file_offset, LINENUM);
++static void skip_to (file_offset, LINENUM);
++static char get_ed_command_letter (char const *);
+
+ /* Prepare to look for the next patch in the patch file. */
+
+@@ -92,7 +96,7 @@
+ p_end = -1;
+ p_max = 0;
+ p_indent = 0;
+- p_strip_trailing_cr = 0;
++ p_strip_trailing_cr = false;
+ }
+
+ /* Open the patch file at the beginning of time. */
+@@ -105,7 +109,7 @@
+ if (!filename || !*filename || strEQ (filename, "-"))
+ {
+ file_offset stdin_pos;
+-#if HAVE_SETMODE
++#if HAVE_SETMODE_DOS
+ if (binary_transput)
+ {
+ if (isatty (STDIN_FILENO))
+@@ -181,14 +185,14 @@
+ if ((p_line = (char **) realloc (p_line, hunkmax * sizeof (*p_line)))
+ && (p_len = (size_t *) realloc (p_len, hunkmax * sizeof (*p_len)))
+ && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char))))
+- return TRUE;
++ return true;
+ if (!using_plan_a)
+ memory_fatal ();
+ /* Don't free previous values of p_line etc.,
+ since some broken implementations free them for us.
+ Whatever is null will be allocated again from within plan_a (),
+ of all places. */
+- return FALSE;
++ return false;
+ }
+
+ /* True if the remainder of the patch file contains a diff of some sort. */
+@@ -199,7 +203,7 @@
+ if (p_base != 0 && p_base >= p_filesize) {
+ if (verbosity == VERBOSE)
+ say ("done\n");
+- return FALSE;
++ return false;
+ }
+ if (verbosity == VERBOSE)
+ say ("Hmm...");
+@@ -211,13 +215,13 @@
+ : " I can't seem to find a patch in there anywhere.\n");
+ if (! p_base && p_filesize)
+ fatal ("Only garbage was found in the patch input.");
+- return FALSE;
++ return false;
+ }
+ if (skip_rest_of_patch)
+ {
+ Fseek (pfp, p_start, SEEK_SET);
+ p_input_line = p_sline - 1;
+- return TRUE;
++ return true;
+ }
+ if (verbosity == VERBOSE)
+ say (" %sooks like %s to me...\n",
+@@ -239,18 +243,19 @@
+ char numbuf[LINENUM_LENGTH_BOUND + 1];
+ say ("can't find file to patch at input line %s\n",
+ format_linenum (numbuf, p_sline));
+- say (strippath == -1
+- ? "Perhaps you should have used the -p or --strip option?\n"
+- : "Perhaps you used the wrong -p or --strip option?\n");
++ if (diff_type != ED_DIFF)
++ say (strippath == -1
++ ? "Perhaps you should have used the -p or --strip option?\n"
++ : "Perhaps you used the wrong -p or --strip option?\n");
+ }
+ }
+
+ skip_to(p_start,p_sline);
+ while (!inname) {
+- if (force || batch) {
++ if (force | batch) {
+ say ("No file to patch. Skipping patch.\n");
+- skip_rest_of_patch = TRUE;
+- return TRUE;
++ skip_rest_of_patch = true;
++ return true;
+ }
+ ask ("File to patch: ");
+ inname = fetchname (buf, 0, (time_t *) 0);
+@@ -264,6 +269,7 @@
+ else
+ {
+ perror (inname);
++ fflush (stderr);
+ free (inname);
+ inname = 0;
+ }
+@@ -273,12 +279,12 @@
+ if (*buf != 'n') {
+ if (verbosity != SILENT)
+ say ("Skipping patch.\n");
+- skip_rest_of_patch = TRUE;
+- return TRUE;
++ skip_rest_of_patch = true;
++ return true;
+ }
+ }
+ }
+- return TRUE;
++ return true;
+ }
+
+ /* Determine what kind of diff is in the remaining part of the patch file. */
+@@ -288,9 +294,10 @@
+ {
+ register file_offset this_line = 0;
+ register file_offset first_command_line = -1;
++ char first_ed_command_letter = 0;
+ LINENUM fcl_line = 0; /* Pacify `gcc -W'. */
+- register bool this_is_a_command = FALSE;
+- register bool stars_this_line = FALSE;
++ register bool this_is_a_command = false;
++ register bool stars_this_line = false;
+ enum nametype i;
+ char *name[3];
+ struct stat st[3];
+@@ -314,15 +321,16 @@
+ register bool last_line_was_command = this_is_a_command;
+ register bool stars_last_line = stars_this_line;
+ register int indent = 0;
+- int strip_trailing_cr;
++ char ed_command_letter;
++ bool strip_trailing_cr;
+ size_t chars_read;
+
+ this_line = file_tell (pfp);
+- chars_read = pget_line (0, 0, 0);
++ chars_read = pget_line (0, 0, false, false);
+ if (chars_read == (size_t) -1)
+ memory_fatal ();
+ if (! chars_read) {
+- if (first_command_line >= 0) {
++ if (first_ed_command_letter) {
+ /* nothing but deletes!? */
+ p_start = first_command_line;
+ p_sline = fcl_line;
+@@ -346,8 +354,11 @@
+ continue;
+ this_is_a_command = (ISDIGIT (*s) &&
+ (*t == 'd' || *t == 'c' || *t == 'a') );
+- if (first_command_line < 0 && this_is_a_command) {
++ if (first_command_line < 0
++ && ((ed_command_letter = get_ed_command_letter (s))
++ || this_is_a_command)) {
+ first_command_line = this_line;
++ first_ed_command_letter = ed_command_letter;
+ fcl_line = p_input_line;
+ p_indent = indent; /* assume this for now */
+ p_strip_trailing_cr = strip_trailing_cr;
+@@ -363,8 +374,20 @@
+ for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
+ continue;
+ revision = t;
+- for (t = revision; *t && !ISSPACE ((unsigned char) *t); t++)
+- continue;
++ for (t = revision; *t; t++)
++ if (ISSPACE ((unsigned char) *t))
++ {
++ char const *u;
++ for (u = t + 1; ISSPACE ((unsigned char) *u); u++)
++ continue;
++ if (*u)
++ {
++ char numbuf[LINENUM_LENGTH_BOUND + 1];
++ say ("Prereq: with multiple words at line %s of patch\n",
++ format_linenum (numbuf, this_line));
++ }
++ break;
++ }
+ if (t == revision)
+ revision = 0;
+ else {
+@@ -391,8 +414,6 @@
+ if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
+ first_command_line >= 0 &&
+ strEQ(s, ".\n") ) {
+- p_indent = indent;
+- p_strip_trailing_cr = strip_trailing_cr;
+ p_start = first_command_line;
+ p_sline = fcl_line;
+ retval = ED_DIFF;
+@@ -419,12 +440,12 @@
+ if (s[0] == '+' && s[1] == '0' && !ISDIGIT (s[2]))
+ p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
+ p_indent = indent;
+- p_strip_trailing_cr = strip_trailing_cr;
+ p_start = this_line;
+ p_sline = p_input_line;
+ retval = UNI_DIFF;
+ if (! ((name[OLD] || ! p_timestamp[OLD])
+- && (name[NEW] || ! p_timestamp[NEW])))
++ && (name[NEW] || ! p_timestamp[NEW]))
++ && ! name[INDEX])
+ {
+ char numbuf[LINENUM_LENGTH_BOUND + 1];
+ say ("missing header for unified diff at line %s of patch\n",
+@@ -457,14 +478,15 @@
+ LINENUM saved_p_bline = p_bline;
+ Fseek (pfp, previous_line, SEEK_SET);
+ p_input_line -= 2;
+- if (another_hunk (retval, 0)
++ if (another_hunk (retval, false)
+ && ! p_repl_lines && p_newfirst == 1)
+ p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
+ next_intuit_at (saved_p_base, saved_p_bline);
+ }
+
+ if (! ((name[OLD] || ! p_timestamp[OLD])
+- && (name[NEW] || ! p_timestamp[NEW])))
++ && (name[NEW] || ! p_timestamp[NEW]))
++ && ! name[INDEX])
+ {
+ char numbuf[LINENUM_LENGTH_BOUND + 1];
+ say ("missing header for context diff at line %s of patch\n",
+@@ -487,7 +509,7 @@
+ scan_exit:
+
+ /* To intuit `inname', the name of the file to patch,
+- use the algorithm specified by POSIX 1003.2b/D11 section 5.22.7.2
++ use the algorithm specified by POSIX 1003.1-2001 XCU lines 25680-26599
+ (with some modifications if posixly_correct is zero):
+
+ - Take the old and new names from the context header if present,
+@@ -542,7 +564,7 @@
+
+ if (! posixly_correct)
+ {
+- int is_empty;
++ bool is_empty;
+
+ i = best_name (name, stat_errno);
+
+@@ -556,7 +578,8 @@
+ char const *cs;
+ char *getbuf;
+ char *diffbuf;
+- int readonly = outfile && strcmp (outfile, name[i]) != 0;
++ bool readonly = (outfile
++ && strcmp (outfile, name[i]) != 0);
+
+ if (nope == NONE || strcmp (name[nope], name[i]) != 0)
+ {
+@@ -566,7 +589,7 @@
+ version_controlled[i] = !! cs;
+ if (cs)
+ {
+- if (version_get (name[i], cs, 0, readonly,
++ if (version_get (name[i], cs, false, readonly,
+ getbuf, &st[i]))
+ stat_errno[i] = 0;
+ else
+@@ -589,7 +612,8 @@
+ if ((! is_empty) < p_says_nonexistent[reverse ^ is_empty])
+ {
+ assert (i0 != NONE);
+- if (ok_to_reverse
++ reverse ^=
++ ok_to_reverse
+ ("The next patch%s would %s the file %s,\nwhich %s!",
+ reverse ? ", when reversed," : "",
+ (i == NONE ? "delete"
+@@ -598,8 +622,7 @@
+ quotearg (name[i == NONE || st[i].st_size == 0 ? i0 : i]),
+ (i == NONE ? "does not exist"
+ : st[i].st_size == 0 ? "is already empty"
+- : "already exists")))
+- reverse ^= 1;
++ : "already exists"));
+ }
+
+ if (i == NONE && p_says_nonexistent[reverse])
+@@ -611,8 +634,8 @@
+ for (i = OLD; i <= INDEX; i++)
+ if (name[i])
+ {
+- newdirs[i] = (prefix_components (name[i], 0)
+- - prefix_components (name[i], 1));
++ newdirs[i] = (prefix_components (name[i], false)
++ - prefix_components (name[i], true));
+ if (newdirs[i] < newdirs_min)
+ newdirs_min = newdirs[i];
+ }
+@@ -645,9 +668,9 @@
+ }
+
+ /* Count the path name components in FILENAME's prefix.
+- If CHECKDIRS is nonzero, count only existing directories. */
++ If CHECKDIRS is true, count only existing directories. */
+ static int
+-prefix_components (char *filename, int checkdirs)
++prefix_components (char *filename, bool checkdirs)
+ {
+ int count = 0;
+ struct stat stat_buf;
+@@ -691,7 +714,7 @@
+ if (name[i] && !ignore[i])
+ {
+ /* Take the names with the fewest prefix components. */
+- components[i] = prefix_components (name[i], 0);
++ components[i] = prefix_components (name[i], false);
+ if (components_min < components[i])
+ continue;
+ components_min = components[i];
+@@ -779,7 +802,7 @@
+ {
+ char *s;
+ LINENUM n = 0;
+- int overflow = 0;
++ bool overflow = false;
+ char numbuf[LINENUM_LENGTH_BOUND + 1];
+
+ for (s = s0; ISDIGIT (*s); s++)
+@@ -788,11 +811,11 @@
+ overflow |= new_n / 10 != n;
+ n = new_n;
+ }
+-
++
+ if (s == s0)
+ fatal ("missing line number at line %s: %s",
+ format_linenum (numbuf, p_input_line), buf);
+-
++
+ if (overflow)
+ fatal ("line number %.*s is too large at line %s: %s",
+ (int) (s - s0), s0, format_linenum (numbuf, p_input_line), buf);
+@@ -805,7 +828,7 @@
+ 0 if not; -1 if ran out of memory. */
+
+ int
+-another_hunk (enum diff difftype, int rev)
++another_hunk (enum diff difftype, bool rev)
+ {
+ register char *s;
+ register LINENUM context = 0;
+@@ -833,10 +856,11 @@
+ register LINENUM fillcnt = 0; /* #lines of missing ptrn or repl */
+ register LINENUM fillsrc; /* index of first line to copy */
+ register LINENUM filldst; /* index of first missing line */
+- bool ptrn_spaces_eaten = FALSE; /* ptrn was slightly misformed */
+- bool some_context = FALSE; /* (perhaps internal) context seen */
+- register bool repl_could_be_missing = TRUE;
+- bool repl_missing = FALSE; /* we are now backtracking */
++ bool ptrn_spaces_eaten = false; /* ptrn was slightly misformed */
++ bool some_context = false; /* (perhaps internal) context seen */
++ register bool repl_could_be_missing = true;
++ bool ptrn_missing = false; /* The pattern was missing. */
++ bool repl_missing = false; /* Likewise for replacement. */
+ file_offset repl_backtrack_position = 0;
+ /* file pos of first repl line */
+ LINENUM repl_patch_line; /* input line number for same */
+@@ -844,8 +868,8 @@
+ LINENUM ptrn_prefix_context = -1; /* lines in pattern prefix context */
+ LINENUM ptrn_suffix_context = -1; /* lines in pattern suffix context */
+ LINENUM repl_prefix_context = -1; /* lines in replac. prefix context */
+- register LINENUM ptrn_copiable = 0;
+- /* # of copiable lines in ptrn */
++ LINENUM ptrn_copiable = 0; /* # of copiable lines in ptrn */
++ LINENUM repl_copiable = 0; /* Likewise for replacement. */
+
+ /* Pacify `gcc -Wall'. */
+ fillsrc = filldst = repl_patch_line = repl_context = 0;
+@@ -864,7 +888,7 @@
+ return -1;
+ if (!chars_read) {
+ if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ if (p_max - p_end < 4) {
+@@ -887,7 +911,7 @@
+ case '*':
+ if (strnEQ(buf, "********", 8)) {
+ if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ else
+@@ -896,7 +920,7 @@
+ }
+ if (p_end != 0) {
+ if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ fatal ("unexpected `***' at line %s: %s",
+@@ -945,6 +969,7 @@
+ {
+ /* `Old' lines were omitted. Set up to fill
+ them in from `new' context lines. */
++ ptrn_missing = true;
+ p_end = p_ptrn_lines + 1;
+ ptrn_prefix_context = ptrn_suffix_context = -1;
+ fillsrc = p_end + 1;
+@@ -965,7 +990,7 @@
+ p_hunk_beg + repl_beginning));
+ else
+ {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ }
+@@ -1009,11 +1034,11 @@
+ && (p_prefix_context != 0
+ || context != 0
+ || p_repl_lines != 1))
+- repl_could_be_missing = FALSE;
++ repl_could_be_missing = false;
+ context = 0;
+ break;
+ case '+': case '!':
+- repl_could_be_missing = FALSE;
++ repl_could_be_missing = false;
+ change_line:
+ s = buf + 1;
+ chars_read--;
+@@ -1025,7 +1050,7 @@
+ s++;
+ chars_read--;
+ } else if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ if (! repl_beginning)
+@@ -1057,7 +1082,7 @@
+ }
+ if (repl_beginning && repl_could_be_missing &&
+ (!ptrn_spaces_eaten || difftype == NEW_CONTEXT_DIFF) ) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ chars_read -=
+@@ -1071,9 +1096,11 @@
+ }
+ if (p_end != p_ptrn_lines + 1) {
+ ptrn_spaces_eaten |= (repl_beginning != 0);
+- some_context = TRUE;
++ some_context = true;
+ context++;
+- if (!repl_beginning)
++ if (repl_beginning)
++ repl_copiable++;
++ else
+ ptrn_copiable++;
+ p_Char[p_end] = ' ';
+ }
+@@ -1089,12 +1116,14 @@
+ s++;
+ chars_read--;
+ } else if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+- some_context = TRUE;
++ some_context = true;
+ context++;
+- if (!repl_beginning)
++ if (repl_beginning)
++ repl_copiable++;
++ else
+ ptrn_copiable++;
+ chars_read -=
+ (1 < chars_read
+@@ -1108,7 +1137,7 @@
+ break;
+ default:
+ if (repl_beginning && repl_could_be_missing) {
+- repl_missing = TRUE;
++ repl_missing = true;
+ goto hunk_done;
+ }
+ malformed ();
+@@ -1136,6 +1165,9 @@
+ fillcnt = p_repl_lines;
+ p_end = p_max;
+ }
++ else if (! ptrn_missing && ptrn_copiable != repl_copiable)
++ fatal ("context mangled in hunk at line %s",
++ format_linenum (numbuf0, p_hunk_beg));
+ else if (!some_context && fillcnt == 1) {
+ /* the first hunk was a null hunk with no context */
+ /* and we were expecting one line -- fix it up. */
+@@ -1499,94 +1531,104 @@
+ static size_t
+ get_line (void)
+ {
+- return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr);
++ return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr,
++ p_pass_comments_through);
+ }
+
+ /* Input a line from the patch file, worrying about indentation.
+ Strip up to INDENT characters' worth of leading indentation.
+ Then remove up to RFC934_NESTING instances of leading "- ".
+- If STRIP_TRAILING_CR is nonzero, remove any trailing carriage-return.
++ If STRIP_TRAILING_CR is true, remove any trailing carriage-return.
++ Unless PASS_COMMENTS_THROUGH is true, ignore any resulting lines
++ that begin with '#'; they're comments.
+ Ignore any partial lines at end of input, but warn about them.
+ Succeed if a line was read; it is terminated by "\n\0" for convenience.
+ Return the number of characters read, including '\n' but not '\0'.
+ Return -1 if we ran out of memory. */
+
+ static size_t
+-pget_line (int indent, int rfc934_nesting, int strip_trailing_cr)
++pget_line (int indent, int rfc934_nesting, bool strip_trailing_cr,
++ bool pass_comments_through)
+ {
+ register FILE *fp = pfp;
+ register int c;
+- register int i = 0;
++ register int i;
+ register char *b;
+ register size_t s;
+
+- for (;;)
++ do
+ {
+- c = getc (fp);
+- if (c == EOF)
++ i = 0;
++ for (;;)
+ {
+- if (ferror (fp))
+- read_fatal ();
+- return 0;
++ c = getc (fp);
++ if (c == EOF)
++ {
++ if (ferror (fp))
++ read_fatal ();
++ return 0;
++ }
++ if (indent <= i)
++ break;
++ if (c == ' ' || c == 'X')
++ i++;
++ else if (c == '\t')
++ i = (i + 8) & ~7;
++ else
++ break;
+ }
+- if (indent <= i)
+- break;
+- if (c == ' ' || c == 'X')
+- i++;
+- else if (c == '\t')
+- i = (i + 8) & ~7;
+- else
+- break;
+- }
+
+- i = 0;
+- b = buf;
++ i = 0;
++ b = buf;
+
+- while (c == '-' && 0 <= --rfc934_nesting)
+- {
+- c = getc (fp);
+- if (c == EOF)
+- goto patch_ends_in_middle_of_line;
+- if (c != ' ')
++ while (c == '-' && 0 <= --rfc934_nesting)
+ {
+- i = 1;
+- b[0] = '-';
+- break;
++ c = getc (fp);
++ if (c == EOF)
++ goto patch_ends_in_middle_of_line;
++ if (c != ' ')
++ {
++ i = 1;
++ b[0] = '-';
++ break;
++ }
++ c = getc (fp);
++ if (c == EOF)
++ goto patch_ends_in_middle_of_line;
+ }
+- c = getc (fp);
+- if (c == EOF)
+- goto patch_ends_in_middle_of_line;
+- }
+
+- s = bufsize;
++ s = bufsize;
+
+- for (;;)
+- {
+- if (i == s - 1)
++ for (;;)
+ {
+- s *= 2;
+- b = realloc (b, s);
+- if (!b)
++ if (i == s - 1)
+ {
+- if (!using_plan_a)
+- memory_fatal ();
+- return (size_t) -1;
++ s *= 2;
++ b = realloc (b, s);
++ if (!b)
++ {
++ if (!using_plan_a)
++ memory_fatal ();
++ return (size_t) -1;
++ }
++ buf = b;
++ bufsize = s;
+ }
+- buf = b;
+- bufsize = s;
++ b[i++] = c;
++ if (c == '\n')
++ break;
++ c = getc (fp);
++ if (c == EOF)
++ goto patch_ends_in_middle_of_line;
+ }
+- b[i++] = c;
+- if (c == '\n')
+- break;
+- c = getc (fp);
+- if (c == EOF)
+- goto patch_ends_in_middle_of_line;
++
++ p_input_line++;
+ }
++ while (*b == '#' && !pass_comments_through);
+
+ if (strip_trailing_cr && 2 <= i && b[i - 2] == '\r')
+ b[i-- - 2] = '\n';
+ b[i] = '\0';
+- p_input_line++;
+ return i;
+
+ patch_ends_in_middle_of_line:
+@@ -1607,13 +1649,13 @@
+ {
+ while ((c = getc (fp)) != '\n' && c != EOF)
+ continue;
+- return TRUE;
++ return true;
+ }
+ else
+ {
+ /* We don't trust ungetc. */
+ Fseek (pfp, line_beginning, SEEK_SET);
+- return FALSE;
++ return false;
+ }
+ }
+
+@@ -1627,7 +1669,7 @@
+ char *tp_char; /* +, -, and ! */
+ register LINENUM i;
+ register LINENUM n;
+- bool blankline = FALSE;
++ bool blankline = false;
+ register char *s;
+
+ i = p_first;
+@@ -1653,14 +1695,14 @@
+ if (p_Char)
+ free (p_Char);
+ p_Char = tp_char;
+- return FALSE; /* not enough memory to swap hunk! */
++ return false; /* not enough memory to swap hunk! */
+ }
+
+ /* now turn the new into the old */
+
+ i = p_ptrn_lines + 1;
+ if (tp_char[i] == '\n') { /* account for possible blank line */
+- blankline = TRUE;
++ blankline = true;
+ i++;
+ }
+ if (p_efake >= 0) { /* fix non-freeable ptr range */
+@@ -1715,23 +1757,23 @@
+ free (tp_len);
+ if (tp_char)
+ free (tp_char);
+- return TRUE;
++ return true;
+ }
+
+-/* Return whether file WHICH (0 = old, 1 = new) appears to nonexistent.
++/* Return whether file WHICH (false = old, true = new) appears to nonexistent.
+ Return 1 for empty, 2 for nonexistent. */
+
+-bool
+-pch_says_nonexistent (int which)
++int
++pch_says_nonexistent (bool which)
+ {
+ return p_says_nonexistent[which];
+ }
+
+-/* Return timestamp of patch header for file WHICH (0 = old, 1 = new),
++/* Return timestamp of patch header for file WHICH (false = old, true = new),
+ or -1 if there was no timestamp or an error in the timestamp. */
+
+ time_t
+-pch_timestamp (int which)
++pch_timestamp (bool which)
+ {
+ return p_timestamp[which];
+ }
+@@ -1835,6 +1877,60 @@
+ return p_hunk_beg;
+ }
+
++/* Is the newline-terminated line a valid `ed' command for patch
++ input? If so, return the command character; if not, return 0.
++ This accepts accepts just a subset of the valid commands, but it's
++ good enough in practice. */
++
++static char
++get_ed_command_letter (char const *line)
++{
++ char const *p = line;
++ char letter;
++ bool pair = false;
++ if (! ISDIGIT (*p))
++ return 0;
++ while (ISDIGIT (*++p))
++ continue;
++ if (*p == ',')
++ {
++ if (! ISDIGIT (*++p))
++ return 0;
++ while (ISDIGIT (*++p))
++ continue;
++ pair = true;
++ }
++ letter = *p++;
++
++ switch (letter)
++ {
++ case 'a':
++ case 'i':
++ if (pair)
++ return 0;
++ break;
++
++ case 'c':
++ case 'd':
++ break;
++
++ case 's':
++ if (strncmp (p, "/.//", 4) != 0)
++ return 0;
++ p += 4;
++ break;
++
++ default:
++ return 0;
++ }
++
++ while (*p == ' ' || *p == '\t')
++ p++;
++ if (*p == '\n')
++ return letter;
++ return 0;
++}
++
+ /* Apply an ed script by feeding ed itself. */
+
+ void
+@@ -1842,13 +1938,11 @@
+ {
+ static char const ed_program[] = ed_PROGRAM;
+
+- register char *t;
+ register file_offset beginning_of_this_line;
+- register bool this_line_is_command = FALSE;
+ register FILE *pipefp = 0;
+ register size_t chars_read;
+
+- if (!skip_rest_of_patch) {
++ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = TMPOUTNAME_needs_removal ? 0 : O_EXCL;
+ assert (! inerrno);
+ TMPOUTNAME_needs_removal = 1;
+@@ -1861,21 +1955,20 @@
+ pfatal ("Can't open pipe to %s", quotearg (buf));
+ }
+ for (;;) {
++ char ed_command_letter;
+ beginning_of_this_line = file_tell (pfp);
+ chars_read = get_line ();
+ if (! chars_read) {
+ next_intuit_at(beginning_of_this_line,p_input_line);
+ break;
+ }
+- for (t = buf; ISDIGIT (*t) || *t == ','; t++)
+- continue;
+- this_line_is_command = (ISDIGIT (*buf) &&
+- (*t == 'd' || *t == 'c' || *t == 'a' || *t == 'i' || *t == 's') );
+- if (this_line_is_command) {
++ ed_command_letter = get_ed_command_letter (buf);
++ if (ed_command_letter) {
+ if (pipefp)
+ if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
+ write_fatal ();
+- if (*t != 'd' && *t != 's') {
++ if (ed_command_letter != 'd' && ed_command_letter != 's') {
++ p_pass_comments_through = true;
+ while ((chars_read = get_line ()) != 0) {
+ if (pipefp)
+ if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
+@@ -1883,6 +1976,7 @@
+ if (chars_read == 2 && strEQ (buf, ".\n"))
+ break;
+ }
++ p_pass_comments_through = false;
+ }
+ }
+ else {
+diff -urNd -urNd patch-2.5.4/pch.h patch-2.5.9/pch.h
+--- patch-2.5.4/pch.h 1997-06-13 02:28:37.000000000 -0400
++++ patch-2.5.9/pch.h 2003-05-20 09:56:02.000000000 -0400
+@@ -1,25 +1,45 @@
+ /* reading patches */
+
+-/* $Id: pch.h,v 1.8 1997/06/13 06:28:37 eggert Exp $ */
++/* $Id: pch.h,v 1.11 2003/05/20 13:56:03 eggert Exp $ */
+
+-LINENUM pch_end PARAMS ((void));
+-LINENUM pch_first PARAMS ((void));
+-LINENUM pch_hunk_beg PARAMS ((void));
+-LINENUM pch_newfirst PARAMS ((void));
+-LINENUM pch_prefix_context PARAMS ((void));
+-LINENUM pch_ptrn_lines PARAMS ((void));
+-LINENUM pch_repl_lines PARAMS ((void));
+-LINENUM pch_suffix_context PARAMS ((void));
+-bool pch_swap PARAMS ((void));
+-bool pch_write_line PARAMS ((LINENUM, FILE *));
+-bool there_is_another_patch PARAMS ((void));
+-char *pfetch PARAMS ((LINENUM));
+-char pch_char PARAMS ((LINENUM));
+-int another_hunk PARAMS ((enum diff, int));
+-int pch_says_nonexistent PARAMS ((int));
+-size_t pch_line_len PARAMS ((LINENUM));
+-time_t pch_timestamp PARAMS ((int));
+-void do_ed_script PARAMS ((FILE *));
+-void open_patch_file PARAMS ((char const *));
+-void re_patch PARAMS ((void));
+-void set_hunkmax PARAMS ((void));
++/* Copyright (C) 1986, 1987, 1988 Larry Wall
++
++ Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
++ 2002, 2003 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; see the file COPYING.
++ If not, write to the Free Software Foundation,
++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++LINENUM pch_end (void);
++LINENUM pch_first (void);
++LINENUM pch_hunk_beg (void);
++LINENUM pch_newfirst (void);
++LINENUM pch_prefix_context (void);
++LINENUM pch_ptrn_lines (void);
++LINENUM pch_repl_lines (void);
++LINENUM pch_suffix_context (void);
++bool pch_swap (void);
++bool pch_write_line (LINENUM, FILE *);
++bool there_is_another_patch (void);
++char *pfetch (LINENUM);
++char pch_char (LINENUM);
++int another_hunk (enum diff, bool);
++int pch_says_nonexistent (bool);
++size_t pch_line_len (LINENUM);
++time_t pch_timestamp (bool);
++void do_ed_script (FILE *);
++void open_patch_file (char const *);
++void re_patch (void);
++void set_hunkmax (void);
+diff -urNd -urNd patch-2.5.4/quotearg.c patch-2.5.9/quotearg.c
+--- patch-2.5.4/quotearg.c 1999-08-23 05:55:55.000000000 -0400
++++ patch-2.5.9/quotearg.c 2002-11-23 01:45:49.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* quotearg.c - quote arguments for output
+- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
++ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -17,51 +17,59 @@
+
+ /* Written by Paul Eggert <eggert@twinsun.com> */
+
+-/* FIXME: Multibyte characters are not supported yet. */
+-
+ #if HAVE_CONFIG_H
+ # include <config.h>
+ #endif
+
+-#include <sys/types.h>
+-#include <quotearg.h>
+-#include <xalloc.h>
++#include "quotearg.h"
++
++#include "xalloc.h"
+
+ #include <ctype.h>
+-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
+-# define ISASCII(c) 1
+-#else
+-# define ISASCII(c) isascii (c)
+-#endif
+-#ifdef isgraph
+-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
+-#else
+-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+-#endif
++#include <errno.h>
++#include <limits.h>
++#include <stdlib.h>
++#include <string.h>
+
+-#if ENABLE_NLS
+-# include <libintl.h>
+-# define _(text) gettext (text)
+-#else
+-# define _(text) text
+-#endif
++#include "gettext.h"
++#define _(msgid) gettext (msgid)
++#define N_(msgid) msgid
+
+-#if HAVE_LIMITS_H
+-# include <limits.h>
++#if HAVE_WCHAR_H
++
++/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
++# include <stdio.h>
++# include <time.h>
++
++# include <wchar.h>
+ #endif
+-#ifndef CHAR_BIT
+-# define CHAR_BIT 8
++
++#if !HAVE_MBRTOWC
++/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
++ other macros are defined only for documentation and to satisfy C
++ syntax. */
++# undef MB_CUR_MAX
++# define MB_CUR_MAX 1
++# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
++# define iswprint(wc) isprint ((unsigned char) (wc))
++# undef HAVE_MBSINIT
+ #endif
+-#ifndef UCHAR_MAX
+-# define UCHAR_MAX ((unsigned char) -1)
++
++#if !defined mbsinit && !HAVE_MBSINIT
++# define mbsinit(ps) 1
+ #endif
+
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
++#ifndef iswprint
++# if HAVE_WCTYPE_H
++# include <wctype.h>
++# endif
++# if !defined iswprint && !HAVE_ISWPRINT
++# define iswprint(wc) 1
++# endif
+ #endif
+
+-#if HAVE_STRING_H
+-# include <string.h>
++#ifndef SIZE_MAX
++# define SIZE_MAX ((size_t) -1)
+ #endif
+
+ #define INT_BITS (sizeof (int) * CHAR_BIT)
+@@ -73,8 +81,7 @@
+
+ /* Quote the characters indicated by this bit vector even if the
+ quoting style would not normally require them to be quoted. */
+- int quote_these_too[((UCHAR_MAX + 1) / INT_BITS
+- + ((UCHAR_MAX + 1) % INT_BITS != 0))];
++ int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
+ };
+
+ /* Names of quoting styles. */
+@@ -86,6 +93,7 @@
+ "c",
+ "escape",
+ "locale",
++ "clocale",
+ 0
+ };
+
+@@ -97,7 +105,8 @@
+ shell_always_quoting_style,
+ c_quoting_style,
+ escape_quoting_style,
+- locale_quoting_style
++ locale_quoting_style,
++ clocale_quoting_style
+ };
+
+ /* The default quoting options. */
+@@ -109,9 +118,10 @@
+ struct quoting_options *
+ clone_quoting_options (struct quoting_options *o)
+ {
+- struct quoting_options *p
+- = (struct quoting_options *) xmalloc (sizeof (struct quoting_options));
++ int e = errno;
++ struct quoting_options *p = xmalloc (sizeof *p);
+ *p = *(o ? o : &default_quoting_options);
++ errno = e;
+ return p;
+ }
+
+@@ -146,77 +156,92 @@
+ return r;
+ }
+
++/* MSGID approximates a quotation mark. Return its translation if it
++ has one; otherwise, return either it or "\"", depending on S. */
++static char const *
++gettext_quote (char const *msgid, enum quoting_style s)
++{
++ char const *translation = _(msgid);
++ if (translation == msgid && s == clocale_quoting_style)
++ translation = "\"";
++ return translation;
++}
++
+ /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+- argument ARG (of size ARGSIZE), using O to control quoting.
+- If O is null, use the default.
++ argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
++ non-quoting-style part of O to control quoting.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+- If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
+-size_t
+-quotearg_buffer (char *buffer, size_t buffersize,
+- char const *arg, size_t argsize,
+- struct quoting_options const *o)
++ If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
++
++ This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
++ ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
++ style specified by O, and O may not be null. */
++
++static size_t
++quotearg_buffer_restyled (char *buffer, size_t buffersize,
++ char const *arg, size_t argsize,
++ enum quoting_style quoting_style,
++ struct quoting_options const *o)
+ {
+- unsigned char c;
+ size_t i;
+ size_t len = 0;
+- char const *quote_string;
+- size_t quote_string_len;
+- struct quoting_options const *p = o ? o : &default_quoting_options;
+- enum quoting_style quoting_style = p->style;
++ char const *quote_string = 0;
++ size_t quote_string_len = 0;
++ int backslash_escapes = 0;
++ int unibyte_locale = MB_CUR_MAX == 1;
++
+ #define STORE(c) \
+ do \
+ { \
+ if (len < buffersize) \
+ buffer[len] = (c); \
+- len++; \
++ len++; \
+ } \
+ while (0)
+
+ switch (quoting_style)
+ {
+- case shell_quoting_style:
+- if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
+- {
+- switch (arg[0])
+- {
+- case '#': case '~':
+- break;
+-
+- default:
+- for (i = 0; ; i++)
+- {
+- if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
+- goto done;
++ case c_quoting_style:
++ STORE ('"');
++ backslash_escapes = 1;
++ quote_string = "\"";
++ quote_string_len = 1;
++ break;
+
+- c = arg[i];
++ case escape_quoting_style:
++ backslash_escapes = 1;
++ break;
+
+- switch (c)
+- {
+- case '\t': case '\n': case ' ':
+- case '!': /* special in csh */
+- case '"': case '$': case '&': case '\'':
+- case '(': case ')': case '*': case ';':
+- case '<': case '>': case '?': case '[': case '\\':
+- case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
+- case '`': case '|':
+- goto needs_quoting;
+- }
++ case locale_quoting_style:
++ case clocale_quoting_style:
++ {
++ /* Get translations for open and closing quotation marks.
+
+- if (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
+- goto needs_quoting;
++ The message catalog should translate "`" to a left
++ quotation mark suitable for the locale, and similarly for
++ "'". If the catalog has no translation,
++ locale_quoting_style quotes `like this', and
++ clocale_quoting_style quotes "like this".
+
+- STORE (c);
+- }
+- needs_quoting:;
++ For example, an American English Unicode locale should
++ translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
++ should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
++ MARK). A British English Unicode locale should instead
++ translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
++ U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. */
+
+- len = 0;
+- break;
+- }
+- }
+- /* Fall through. */
++ char const *left = gettext_quote (N_("`"), quoting_style);
++ char const *right = gettext_quote (N_("'"), quoting_style);
++ for (quote_string = left; *quote_string; quote_string++)
++ STORE (*quote_string);
++ backslash_escapes = 1;
++ quote_string = right;
++ quote_string_len = strlen (quote_string);
++ }
++ break;
+
+ case shell_always_quoting_style:
+ STORE ('\'');
+@@ -224,84 +249,225 @@
+ quote_string_len = 1;
+ break;
+
+- case c_quoting_style:
+- STORE ('"');
+- quote_string = "\"";
+- quote_string_len = 1;
+- break;
+-
+- case locale_quoting_style:
+- for (quote_string = _("`"); *quote_string; quote_string++)
+- STORE (*quote_string);
+- quote_string = _("'");
+- quote_string_len = strlen (quote_string);
+- break;
+-
+ default:
+- quote_string = 0;
+- quote_string_len = 0;
+ break;
+ }
+
+- for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
++ for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++)
+ {
+- c = arg[i];
++ unsigned char c;
++ unsigned char esc;
+
+- switch (quoting_style)
++ if (backslash_escapes
++ && quote_string_len
++ && i + quote_string_len <= argsize
++ && memcmp (arg + i, quote_string, quote_string_len) == 0)
++ STORE ('\\');
++
++ c = arg[i];
++ switch (c)
+ {
+- case literal_quoting_style:
++ case '\0':
++ if (backslash_escapes)
++ {
++ STORE ('\\');
++ STORE ('0');
++ STORE ('0');
++ c = '0';
++ }
+ break;
+
+- case shell_quoting_style:
+- case shell_always_quoting_style:
+- if (c == '\'')
++ case '?':
++ switch (quoting_style)
+ {
+- STORE ('\'');
+- STORE ('\\');
+- STORE ('\'');
++ case shell_quoting_style:
++ goto use_shell_always_quoting_style;
++
++ case c_quoting_style:
++ if (i + 2 < argsize && arg[i + 1] == '?')
++ switch (arg[i + 2])
++ {
++ case '!': case '\'':
++ case '(': case ')': case '-': case '/':
++ case '<': case '=': case '>':
++ /* Escape the second '?' in what would otherwise be
++ a trigraph. */
++ c = arg[i + 2];
++ i += 2;
++ STORE ('?');
++ STORE ('\\');
++ STORE ('?');
++ break;
++ }
++ break;
++
++ default:
++ break;
+ }
+ break;
+
+- case c_quoting_style:
+- case escape_quoting_style:
+- case locale_quoting_style:
+- switch (c)
++ case '\a': esc = 'a'; goto c_escape;
++ case '\b': esc = 'b'; goto c_escape;
++ case '\f': esc = 'f'; goto c_escape;
++ case '\n': esc = 'n'; goto c_and_shell_escape;
++ case '\r': esc = 'r'; goto c_and_shell_escape;
++ case '\t': esc = 't'; goto c_and_shell_escape;
++ case '\v': esc = 'v'; goto c_escape;
++ case '\\': esc = c; goto c_and_shell_escape;
++
++ c_and_shell_escape:
++ if (quoting_style == shell_quoting_style)
++ goto use_shell_always_quoting_style;
++ c_escape:
++ if (backslash_escapes)
+ {
+- case '?': /* Do not generate trigraphs. */
+- case '\\': goto store_escape;
+- /* Not all C compilers know what \a means. */
+- case 7 : c = 'a'; goto store_escape;
+- case '\b': c = 'b'; goto store_escape;
+- case '\f': c = 'f'; goto store_escape;
+- case '\n': c = 'n'; goto store_escape;
+- case '\r': c = 'r'; goto store_escape;
+- case '\t': c = 't'; goto store_escape;
+- case '\v': c = 'v'; goto store_escape;
++ c = esc;
++ goto store_escape;
++ }
++ break;
+
+- case ' ': break;
++ case '#': case '~':
++ if (i != 0)
++ break;
++ /* Fall through. */
++ case ' ':
++ case '!': /* special in bash */
++ case '"': case '$': case '&':
++ case '(': case ')': case '*': case ';':
++ case '<': case '>': case '[':
++ case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
++ case '`': case '|':
++ /* A shell special character. In theory, '$' and '`' could
++ be the first bytes of multibyte characters, which means
++ we should check them with mbrtowc, but in practice this
++ doesn't happen so it's not worth worrying about. */
++ if (quoting_style == shell_quoting_style)
++ goto use_shell_always_quoting_style;
++ break;
++
++ case '\'':
++ switch (quoting_style)
++ {
++ case shell_quoting_style:
++ goto use_shell_always_quoting_style;
++
++ case shell_always_quoting_style:
++ STORE ('\'');
++ STORE ('\\');
++ STORE ('\'');
++ break;
+
+ default:
+- if (quote_string_len
+- && strncmp (arg + i, quote_string, quote_string_len) == 0)
+- goto store_escape;
+- if (!ISGRAPH (c))
+- {
+- STORE ('\\');
+- STORE ('0' + (c >> 6));
+- STORE ('0' + ((c >> 3) & 7));
+- c = '0' + (c & 7);
+- goto store_c;
+- }
+ break;
+ }
++ break;
+
+- if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
+- goto store_c;
++ case '%': case '+': case ',': case '-': case '.': case '/':
++ case '0': case '1': case '2': case '3': case '4': case '5':
++ case '6': case '7': case '8': case '9': case ':': case '=':
++ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
++ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
++ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
++ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
++ case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
++ case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
++ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
++ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
++ case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
++ case '{': case '}':
++ /* These characters don't cause problems, no matter what the
++ quoting style is. They cannot start multibyte sequences. */
++ break;
+
+- store_escape:
+- STORE ('\\');
++ default:
++ /* If we have a multibyte sequence, copy it until we reach
++ its end, find an error, or come back to the initial shift
++ state. For C-like styles, if the sequence has
++ unprintable characters, escape the whole sequence, since
++ we can't easily escape single characters within it. */
++ {
++ /* Length of multibyte sequence found so far. */
++ size_t m;
++
++ int printable;
++
++ if (unibyte_locale)
++ {
++ m = 1;
++ printable = isprint (c);
++ }
++ else
++ {
++ mbstate_t mbstate;
++ memset (&mbstate, 0, sizeof mbstate);
++
++ m = 0;
++ printable = 1;
++ if (argsize == SIZE_MAX)
++ argsize = strlen (arg);
++
++ do
++ {
++ wchar_t w;
++ size_t bytes = mbrtowc (&w, &arg[i + m],
++ argsize - (i + m), &mbstate);
++ if (bytes == 0)
++ break;
++ else if (bytes == (size_t) -1)
++ {
++ printable = 0;
++ break;
++ }
++ else if (bytes == (size_t) -2)
++ {
++ printable = 0;
++ while (i + m < argsize && arg[i + m])
++ m++;
++ break;
++ }
++ else
++ {
++ if (! iswprint (w))
++ printable = 0;
++ m += bytes;
++ }
++ }
++ while (! mbsinit (&mbstate));
++ }
++
++ if (1 < m || (backslash_escapes && ! printable))
++ {
++ /* Output a multibyte sequence, or an escaped
++ unprintable unibyte character. */
++ size_t ilim = i + m;
++
++ for (;;)
++ {
++ if (backslash_escapes && ! printable)
++ {
++ STORE ('\\');
++ STORE ('0' + (c >> 6));
++ STORE ('0' + ((c >> 3) & 7));
++ c = '0' + (c & 7);
++ }
++ if (ilim <= i + 1)
++ break;
++ STORE (c);
++ c = arg[++i];
++ }
++
++ goto store_c;
++ }
++ }
+ }
+
++ if (! (backslash_escapes
++ && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
++ goto store_c;
++
++ store_escape:
++ STORE ('\\');
++
+ store_c:
+ STORE (c);
+ }
+@@ -310,60 +476,105 @@
+ for (; *quote_string; quote_string++)
+ STORE (*quote_string);
+
+- done:
+ if (len < buffersize)
+ buffer[len] = '\0';
+ return len;
++
++ use_shell_always_quoting_style:
++ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
++ shell_always_quoting_style, o);
+ }
+
+-/* Use storage slot N to return a quoted version of the string ARG.
++/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
++ argument ARG (of size ARGSIZE), using O to control quoting.
++ If O is null, use the default.
++ Terminate the output with a null character, and return the written
++ size of the output, not counting the terminating null.
++ If BUFFERSIZE is too small to store the output string, return the
++ value that would have been returned had BUFFERSIZE been large enough.
++ If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
++size_t
++quotearg_buffer (char *buffer, size_t buffersize,
++ char const *arg, size_t argsize,
++ struct quoting_options const *o)
++{
++ struct quoting_options const *p = o ? o : &default_quoting_options;
++ int e = errno;
++ size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
++ p->style, p);
++ errno = e;
++ return r;
++}
++
++/* Use storage slot N to return a quoted version of argument ARG.
++ ARG is of size ARGSIZE, but if that is -1, ARG is a null-terminated string.
+ OPTIONS specifies the quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+- N must be nonnegative. N is deliberately declared with type `int'
++ N must be nonnegative. N is deliberately declared with type "int"
+ to allow for future extensions (using negative values). */
+ static char *
+-quotearg_n_options (int n, char const *arg,
++quotearg_n_options (int n, char const *arg, size_t argsize,
+ struct quoting_options const *options)
+ {
+- static unsigned int nslots;
+- static struct slotvec
++ int e = errno;
++
++ /* Preallocate a slot 0 buffer, so that the caller can always quote
++ one small component of a "memory exhausted" message in slot 0. */
++ static char slot0[256];
++ static unsigned int nslots = 1;
++ unsigned int n0 = n;
++ struct slotvec
+ {
+ size_t size;
+ char *val;
+- } *slotvec;
++ };
++ static struct slotvec slotvec0 = {sizeof slot0, slot0};
++ static struct slotvec *slotvec = &slotvec0;
+
+- if (nslots <= n)
++ if (n < 0)
++ abort ();
++
++ if (nslots <= n0)
+ {
+- int n1 = n + 1;
+- size_t s = n1 * sizeof (struct slotvec);
+- if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
+- abort ();
+- slotvec = (struct slotvec *) xrealloc (slotvec, s);
+- memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
+- nslots = n;
++ unsigned int n1 = n0 + 1;
++ size_t s = n1 * sizeof *slotvec;
++
++ if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
++ && n1 != s / sizeof *slotvec)
++ xalloc_die ();
++
++ if (slotvec == &slotvec0)
++ {
++ slotvec = xmalloc (sizeof *slotvec);
++ *slotvec = slotvec0;
++ }
++ slotvec = xrealloc (slotvec, s);
++ memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
++ nslots = n1;
+ }
+
+ {
+ size_t size = slotvec[n].size;
+ char *val = slotvec[n].val;
+- size_t qsize = quotearg_buffer (val, size, arg, (size_t) -1, options);
++ size_t qsize = quotearg_buffer (val, size, arg, argsize, options);
+
+ if (size <= qsize)
+ {
+ slotvec[n].size = size = qsize + 1;
+- slotvec[n].val = val = xrealloc (val, size);
+- quotearg_buffer (val, size, arg, (size_t) -1, options);
++ slotvec[n].val = val = xrealloc (val == slot0 ? 0 : val, size);
++ quotearg_buffer (val, size, arg, argsize, options);
+ }
+
++ errno = e;
+ return val;
+ }
+ }
+
+ char *
+-quotearg_n (unsigned int n, char const *arg)
++quotearg_n (int n, char const *arg)
+ {
+- return quotearg_n_options (n, arg, &default_quoting_options);
++ return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
+ }
+
+ char *
+@@ -372,13 +583,29 @@
+ return quotearg_n (0, arg);
+ }
+
+-char *
+-quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
++/* Return quoting options for STYLE, with no extra quoting. */
++static struct quoting_options
++quoting_options_from_style (enum quoting_style style)
+ {
+ struct quoting_options o;
+- o.style = s;
++ o.style = style;
+ memset (o.quote_these_too, 0, sizeof o.quote_these_too);
+- return quotearg_n_options (n, arg, &o);
++ return o;
++}
++
++char *
++quotearg_n_style (int n, enum quoting_style s, char const *arg)
++{
++ struct quoting_options const o = quoting_options_from_style (s);
++ return quotearg_n_options (n, arg, SIZE_MAX, &o);
++}
++
++char *
++quotearg_n_style_mem (int n, enum quoting_style s,
++ char const *arg, size_t argsize)
++{
++ struct quoting_options const o = quoting_options_from_style (s);
++ return quotearg_n_options (n, arg, argsize, &o);
+ }
+
+ char *
+@@ -393,7 +620,7 @@
+ struct quoting_options options;
+ options = default_quoting_options;
+ set_char_quoting (&options, ch, 1);
+- return quotearg_n_options (0, arg, &options);
++ return quotearg_n_options (0, arg, SIZE_MAX, &options);
+ }
+
+ char *
+diff -urNd -urNd patch-2.5.4/quotearg.h patch-2.5.9/quotearg.h
+--- patch-2.5.4/quotearg.h 1999-08-09 19:09:13.000000000 -0400
++++ patch-2.5.9/quotearg.h 2002-11-23 01:45:22.000000000 -0500
+@@ -1,5 +1,7 @@
+ /* quotearg.h - quote arguments for output
+- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
++
++ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software
++ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -17,6 +19,11 @@
+
+ /* Written by Paul Eggert <eggert@twinsun.com> */
+
++#ifndef QUOTEARG_H_
++# define QUOTEARG_H_ 1
++
++# include <stddef.h>
++
+ /* Basic quoting styles. */
+ enum quoting_style
+ {
+@@ -25,13 +32,14 @@
+ shell_always_quoting_style, /* --quoting-style=shell-always */
+ c_quoting_style, /* --quoting-style=c */
+ escape_quoting_style, /* --quoting-style=escape */
+- locale_quoting_style /* --quoting-style=locale */
++ locale_quoting_style, /* --quoting-style=locale */
++ clocale_quoting_style /* --quoting-style=clocale */
+ };
+
+ /* For now, --quoting-style=literal is the default, but this may change. */
+-#ifndef DEFAULT_QUOTING_STYLE
+-# define DEFAULT_QUOTING_STYLE literal_quoting_style
+-#endif
++# ifndef DEFAULT_QUOTING_STYLE
++# define DEFAULT_QUOTING_STYLE literal_quoting_style
++# endif
+
+ /* Names of quoting styles and their corresponding values. */
+ extern char const *const quoting_style_args[];
+@@ -39,37 +47,27 @@
+
+ struct quoting_options;
+
+-#ifndef PARAMS
+-# if defined PROTOTYPES || defined __STDC__
+-# define PARAMS(Args) Args
+-# else
+-# define PARAMS(Args) ()
+-# endif
+-#endif
+-
+ /* The functions listed below set and use a hidden variable
+ that contains the default quoting style options. */
+
+ /* Allocate a new set of quoting options, with contents initially identical
+ to O if O is not null, or to the default if O is null.
+ It is the caller's responsibility to free the result. */
+-struct quoting_options *clone_quoting_options
+- PARAMS ((struct quoting_options *o));
++struct quoting_options *clone_quoting_options (struct quoting_options *o);
+
+ /* Get the value of O's quoting style. If O is null, use the default. */
+-enum quoting_style get_quoting_style PARAMS ((struct quoting_options *o));
++enum quoting_style get_quoting_style (struct quoting_options *o);
+
+ /* In O (or in the default if O is null),
+ set the value of the quoting style to S. */
+-void set_quoting_style PARAMS ((struct quoting_options *o,
+- enum quoting_style s));
++void set_quoting_style (struct quoting_options *o, enum quoting_style s);
+
+ /* In O (or in the default if O is null),
+ set the value of the quoting options for character C to I.
+ Return the old value. Currently, the only values defined for I are
+ 0 (the default) and 1 (which means to quote the character even if
+ it would not otherwise be quoted). */
+-int set_char_quoting PARAMS ((struct quoting_options *o, char c, int i));
++int set_char_quoting (struct quoting_options *o, char c, int i);
+
+ /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using O to control quoting.
+@@ -79,31 +77,38 @@
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is -1, use the string length of the argument for ARGSIZE. */
+-size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
+- char const *arg, size_t argsize,
+- struct quoting_options const *o));
++size_t quotearg_buffer (char *buffer, size_t buffersize,
++ char const *arg, size_t argsize,
++ struct quoting_options const *o);
+
+ /* Use storage slot N to return a quoted version of the string ARG.
+ Use the default quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+ N must be nonnegative. */
+-char *quotearg_n PARAMS ((unsigned int n, char const *arg));
++char *quotearg_n (int n, char const *arg);
+
+ /* Equivalent to quotearg_n (0, ARG). */
+-char *quotearg PARAMS ((char const *arg));
++char *quotearg (char const *arg);
+
+ /* Use style S and storage slot N to return a quoted version of the string ARG.
+ This is like quotearg_n (N, ARG), except that it uses S with no other
+ options to specify the quoting method. */
+-char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
+- char const *arg));
++char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
++
++/* Use style S and storage slot N to return a quoted version of the
++ argument ARG of size ARGSIZE. This is like quotearg_n_style
++ (N, S, ARG), except it can quote null bytes. */
++char *quotearg_n_style_mem (int n, enum quoting_style s,
++ char const *arg, size_t argsize);
+
+ /* Equivalent to quotearg_n_style (0, S, ARG). */
+-char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
++char *quotearg_style (enum quoting_style s, char const *arg);
+
+ /* Like quotearg (ARG), except also quote any instances of CH. */
+-char *quotearg_char PARAMS ((char const *arg, char ch));
++char *quotearg_char (char const *arg, char ch);
+
+ /* Equivalent to quotearg_char (ARG, ':'). */
+-char *quotearg_colon PARAMS ((char const *arg));
++char *quotearg_colon (char const *arg);
++
++#endif /* !QUOTEARG_H_ */
+diff -urNd -urNd patch-2.5.4/quote.c patch-2.5.9/quote.c
+--- patch-2.5.4/quote.c 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/quote.c 2003-03-18 03:50:56.000000000 -0500
+@@ -0,0 +1,45 @@
++/* quote.c - quote arguments for output
++ Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++/* Written by Paul Eggert <eggert@twinsun.com> */
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#if HAVE_STDDEF_H
++# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
++#endif
++#include <sys/types.h>
++#include "quotearg.h"
++#include "quote.h"
++
++/* Return an unambiguous printable representation of NAME,
++ allocated in slot N, suitable for diagnostics. */
++char const *
++quote_n (int n, char const *name)
++{
++ return quotearg_n_style (n, locale_quoting_style, name);
++}
++
++/* Return an unambiguous printable representation of NAME,
++ suitable for diagnostics. */
++char const *
++quote (char const *name)
++{
++ return quote_n (0, name);
++}
+diff -urNd -urNd patch-2.5.4/quote.h patch-2.5.9/quote.h
+--- patch-2.5.4/quote.h 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/quote.h 2002-11-23 02:23:50.000000000 -0500
+@@ -0,0 +1,28 @@
++/* quote.h - prototypes for quote.c
++ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++
++#ifndef PARAMS
++# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
++# define PARAMS(Args) Args
++# else
++# define PARAMS(Args) ()
++# endif
++#endif
++
++char const *quote_n PARAMS ((int n, char const *name));
++char const *quote PARAMS ((char const *name));
+diff -urNd -urNd patch-2.5.4/README patch-2.5.9/README
+--- patch-2.5.4/README 1997-05-26 01:34:43.000000000 -0400
++++ patch-2.5.9/README 2002-06-03 00:51:09.000000000 -0400
+@@ -5,16 +5,16 @@
+ * making GNU Emacs-style backup files
+ * improved interaction with RCS and SCCS
+ * the GNU conventions for option parsing and configuring and compilation.
+- * better POSIX.2 compliance
++ * better POSIX compliance
+ They also fix some bugs. See the NEWS and ChangeLog files for details.
+
+ Tutorial-style documentation for patch is included in the GNU
+-diffutils package. Unfortunately, the diffutils 2.7 documentation
+-for `patch' is obsolete; this should be fixed in diffutils 2.8.
+-In the mean time, see `patch --help', or consult the man page
+-in this distribution.
++Diffutils package; get GNU Diffutils 2.8 or later for up-to-date
++documentation for patch.
+
+ For GNU and Unix build and installation instructions, see the file INSTALL.
++Use `configure --disable-largefile' to disable large file support;
++this is reportedly necessary on Red Hat GNU/Linux 6.0 to avoid a C library bug.
+ For MS-DOS using DJGPP tools, see the file pc/djgpp/README.
+ For other systems, copy config.hin to config.h and change
+ #undef statements in it to #define as appropriate for your system,
+@@ -22,7 +22,7 @@
+ enclosed in @ signs as appropriate for your system.
+
+ Please send bug reports for this version of patch to
+-bug-gnu-utils@prep.ai.mit.edu.
++<bug-patch@gnu.org>.
+
+ The Free Software Foundation is distributing this version of patch
+ independently because as of this writing, Larry Wall has not released a
+@@ -33,8 +33,10 @@
+
+ ------
+
+-Copyright 1984, 1985, 1986, 1987, 1988 Larry Wall
+-Copyright 1989, 1990, 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
++Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
++
++Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1999, 2002 Free
++Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+diff -urNd -urNd patch-2.5.4/rename.c patch-2.5.9/rename.c
+--- patch-2.5.4/rename.c 1999-03-29 18:56:19.000000000 -0500
++++ patch-2.5.9/rename.c 1969-12-31 19:00:00.000000000 -0500
+@@ -1,113 +0,0 @@
+-/* BSD compatible rename and directory rename function for System V.
+- Copyright (C) 1988, 1990 Free Software Foundation, Inc.
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2, or (at your option)
+- any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software Foundation,
+- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+-
+-#if HAVE_CONFIG_H
+-# include <config.h>
+-#endif
+-
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <errno.h>
+-#ifndef errno
+-extern int errno;
+-#endif
+-
+-#if STAT_MACROS_BROKEN
+-# undef S_ISDIR
+-#endif
+-
+-#if !defined(S_ISDIR) && defined(S_IFDIR)
+-# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+-#endif
+-
+-/* Rename file FROM to file TO.
+- Return 0 if successful, -1 if not. */
+-
+-int
+-rename (char *from, char *to)
+-{
+- struct stat from_stats, to_stats;
+-
+- if (stat (from, &from_stats))
+- return -1;
+-
+- /* Be careful not to unlink `from' if it happens to be equal to `to' or
+- (on filesystems that silently truncate filenames after 14 characters)
+- if `from' and `to' share the significant characters. */
+- if (stat (to, &to_stats))
+- {
+- if (errno != ENOENT)
+- return -1;
+- }
+- else
+- {
+- if ((from_stats.st_dev == to_stats.st_dev)
+- && (from_stats.st_ino == to_stats.st_ino))
+- /* `from' and `to' designate the same file on that filesystem. */
+- return 0;
+-
+- if (unlink (to) && errno != ENOENT)
+- return -1;
+- }
+-
+-#ifdef MVDIR
+-
+-/* If MVDIR is defined, it should be the full filename of a setuid root
+- program able to link and unlink directories. If MVDIR is not defined,
+- then the capability of renaming directories may be missing. */
+-
+- if (S_ISDIR (from_stats.st_mode))
+- {
+- /* Need a setuid root process to link and unlink directories. */
+- int status;
+- pid_t pid = fork ();
+- switch (pid)
+- {
+- case -1: /* Error. */
+- return -1; /* errno already set */
+-
+- case 0: /* Child. */
+- execl (MVDIR, "mvdir", from, to, (char *) 0);
+- _exit (1);
+-
+- default: /* Parent. */
+- while (wait (&status) != pid)
+- /* Do nothing. */ ;
+-
+- if (status)
+- {
+- /* MVDIR failed. */
+- errno = EIO;
+- return -1;
+- }
+- }
+- }
+- else
+-
+-#endif /* MVDIR */
+-
+- {
+- if (link (from, to))
+- return -1;
+- if (unlink (from) && errno != ENOENT)
+- {
+- unlink (to);
+- return -1;
+- }
+- }
+- return 0;
+-}
+diff -urNd -urNd patch-2.5.4/stdbool.h.in patch-2.5.9/stdbool.h.in
+--- patch-2.5.4/stdbool.h.in 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/stdbool.h.in 2003-01-09 08:35:14.000000000 -0500
+@@ -0,0 +1,47 @@
++/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
++ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#ifndef _STDBOOL_H
++#define _STDBOOL_H
++
++/* ISO C 99 <stdbool.h> for platforms that lack it. */
++
++/* 7.16. Boolean type and values */
++
++/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
++ definitions below, but temporarily we have to #undef them. */
++#ifdef __BEOS__
++# undef false
++# undef true
++#endif
++
++/* For the sake of symbolic names in gdb, define _Bool as an enum type. */
++#ifndef __cplusplus
++# if !@HAVE__BOOL@
++typedef enum { false = 0, true = 1 } _Bool;
++# endif
++#else
++typedef bool _Bool;
++#endif
++#define bool _Bool
++
++/* The other macros must be usable in preprocessor directives. */
++#define false 0
++#define true 1
++#define __bool_true_false_are_defined 1
++
++#endif /* _STDBOOL_H */
+diff -urNd -urNd patch-2.5.4/strcasecmp.c patch-2.5.9/strcasecmp.c
+--- patch-2.5.4/strcasecmp.c 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/strcasecmp.c 2000-08-07 11:48:18.000000000 -0400
+@@ -0,0 +1,66 @@
++/* strcasecmp.c -- case insensitive string comparator
++ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#ifdef LENGTH_LIMIT
++# define STRXCASECMP_FUNCTION strncasecmp
++# define STRXCASECMP_DECLARE_N , size_t n
++# define LENGTH_LIMIT_EXPR(Expr) Expr
++#else
++# define STRXCASECMP_FUNCTION strcasecmp
++# define STRXCASECMP_DECLARE_N /* empty */
++# define LENGTH_LIMIT_EXPR(Expr) 0
++#endif
++
++#include <sys/types.h>
++#include <ctype.h>
++
++#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
++
++/* Compare {{no more than N characters of }}strings S1 and S2,
++ ignoring case, returning less than, equal to or
++ greater than zero if S1 is lexicographically less
++ than, equal to or greater than S2. */
++
++int
++STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
++{
++ register const unsigned char *p1 = (const unsigned char *) s1;
++ register const unsigned char *p2 = (const unsigned char *) s2;
++ unsigned char c1, c2;
++
++ if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
++ return 0;
++
++ do
++ {
++ c1 = TOLOWER (*p1);
++ c2 = TOLOWER (*p2);
++
++ if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
++ break;
++
++ ++p1;
++ ++p2;
++ }
++ while (c1 == c2);
++
++ return c1 - c2;
++}
+diff -urNd -urNd patch-2.5.4/strncasecmp.c patch-2.5.9/strncasecmp.c
+--- patch-2.5.4/strncasecmp.c 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/strncasecmp.c 1999-01-02 10:55:44.000000000 -0500
+@@ -0,0 +1,2 @@
++#define LENGTH_LIMIT
++#include "strcasecmp.c"
+diff -urNd -urNd patch-2.5.4/unlocked-io.h patch-2.5.9/unlocked-io.h
+--- patch-2.5.4/unlocked-io.h 1969-12-31 19:00:00.000000000 -0500
++++ patch-2.5.9/unlocked-io.h 2002-12-04 15:51:07.000000000 -0500
+@@ -0,0 +1,90 @@
++/* Prefer faster, non-thread-safe stdio functions if available.
++
++ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify it
++ under the terms of the GNU Library General Public License as published
++ by the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this program; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++ USA. */
++
++/* Written by Jim Meyering. */
++
++#ifndef UNLOCKED_IO_H
++# define UNLOCKED_IO_H 1
++
++# ifndef USE_UNLOCKED_IO
++# define USE_UNLOCKED_IO 1
++# endif
++
++# if USE_UNLOCKED_IO
++
++/* These are wrappers for functions/macros from GNU libc.
++ The standard I/O functions are thread-safe. These *_unlocked ones are
++ more efficient but not thread-safe. That they're not thread-safe is
++ fine since all of the applications in this package are single threaded. */
++
++# if HAVE_DECL_CLEARERR_UNLOCKED
++# undef clearerr
++# define clearerr(x) clearerr_unlocked (x)
++# endif
++# if HAVE_DECL_FEOF_UNLOCKED
++# undef feof
++# define feof(x) feof_unlocked (x)
++# endif
++# if HAVE_DECL_FERROR_UNLOCKED
++# undef ferror
++# define ferror(x) ferror_unlocked (x)
++# endif
++# if HAVE_DECL_FFLUSH_UNLOCKED
++# undef fflush
++# define fflush(x) fflush_unlocked (x)
++# endif
++# if HAVE_DECL_FGETS_UNLOCKED
++# undef fgets
++# define fgets(x,y,z) fgets_unlocked (x,y,z)
++# endif
++# if HAVE_DECL_FPUTC_UNLOCKED
++# undef fputc
++# define fputc(x,y) fputc_unlocked (x,y)
++# endif
++# if HAVE_DECL_FPUTS_UNLOCKED
++# undef fputs
++# define fputs(x,y) fputs_unlocked (x,y)
++# endif
++# if HAVE_DECL_FREAD_UNLOCKED
++# undef fread
++# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
++# endif
++# if HAVE_DECL_FWRITE_UNLOCKED
++# undef fwrite
++# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
++# endif
++# if HAVE_DECL_GETC_UNLOCKED
++# undef getc
++# define getc(x) getc_unlocked (x)
++# endif
++# if HAVE_DECL_GETCHAR_UNLOCKED
++# undef getchar
++# define getchar() getchar_unlocked ()
++# endif
++# if HAVE_DECL_PUTC_UNLOCKED
++# undef putc
++# define putc(x,y) putc_unlocked (x,y)
++# endif
++# if HAVE_DECL_PUTCHAR_UNLOCKED
++# undef putchar
++# define putchar(x) putchar_unlocked (x)
++# endif
++
++# endif /* USE_UNLOCKED_IO */
++#endif /* UNLOCKED_IO_H */
+diff -urNd -urNd patch-2.5.4/util.c patch-2.5.9/util.c
+--- patch-2.5.4/util.c 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/util.c 2003-05-20 10:04:53.000000000 -0400
+@@ -1,9 +1,11 @@
+ /* utility functions for `patch' */
+
+-/* $Id: util.c,v 1.27 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: util.c,v 1.36 2003/05/20 14:04:53 eggert Exp $ */
+
+-/* Copyright 1986 Larry Wall
+- Copyright 1992, 1993, 1997-1998, 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1986 Larry Wall
++
++ Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
++ Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -23,7 +25,7 @@
+ #define XTERN extern
+ #include <common.h>
+ #include <backupfile.h>
+-#include <basename.h>
++#include <dirname.h>
+ #include <quotearg.h>
+ #include <quotesys.h>
+ #include <version.h>
+@@ -43,23 +45,9 @@
+ # define raise(sig) kill (getpid (), sig)
+ #endif
+
+-#ifdef __STDC__
+-# include <stdarg.h>
+-# define vararg_start va_start
+-#else
+-# define vararg_start(ap,p) va_start (ap)
+-# if HAVE_VARARGS_H
+-# include <varargs.h>
+-# else
+- typedef char *va_list;
+-# define va_dcl int va_alist;
+-# define va_start(ap) ((ap) = (va_list) &va_alist)
+-# define va_arg(ap, t) (((t *) ((ap) += sizeof (t))) [-1])
+-# define va_end(ap)
+-# endif
+-#endif
++#include <stdarg.h>
+
+-static void makedirs PARAMS ((char *));
++static void makedirs (char *);
+
+ /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
+ needs removal when cleaning up at the end of execution)
+@@ -67,11 +55,11 @@
+ If we must create TO, use MODE to create it.
+ If FROM is null, remove TO (ignoring FROMSTAT).
+ FROM_NEEDS_REMOVAL must be nonnull if FROM is nonnull.
+- Back up TO if BACKUP is nonzero. */
++ Back up TO if BACKUP is true. */
+
+ void
+ move_file (char const *from, int volatile *from_needs_removal,
+- char *to, mode_t mode, int backup)
++ char *to, mode_t mode, bool backup)
+ {
+ struct stat to_st;
+ int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
+@@ -152,11 +140,9 @@
+ say ("Renaming file %s to %s\n",
+ quotearg_n (0, from), quotearg_n (1, to));
+
+- if (rename (from, to) == 0)
+- *from_needs_removal = 0;
+- else
++ if (rename (from, to) != 0)
+ {
+- int to_dir_known_to_exist = 0;
++ bool to_dir_known_to_exist = false;
+
+ if (errno == ENOENT
+ && (to_errno == -1 || to_errno == ENOENT))
+@@ -164,10 +150,7 @@
+ makedirs (to);
+ to_dir_known_to_exist = 1;
+ if (rename (from, to) == 0)
+- {
+- *from_needs_removal = 0;
+- return;
+- }
++ goto rename_succeeded;
+ }
+
+ if (errno == EXDEV)
+@@ -175,7 +158,7 @@
+ if (! backup)
+ {
+ if (unlink (to) == 0)
+- to_dir_known_to_exist = 1;
++ to_dir_known_to_exist = true;
+ else if (errno != ENOENT)
+ pfatal ("Can't remove file %s", quotearg (to));
+ }
+@@ -188,6 +171,14 @@
+ pfatal ("Can't rename file %s to %s",
+ quotearg_n (0, from), quotearg_n (1, to));
+ }
++
++ rename_succeeded:
++ /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
++ rename returned zero because FROM and TO are hard links to
++ the same file. */
++ if (0 < to_errno
++ || (to_errno == 0 && to_st.st_nlink <= 1))
++ *from_needs_removal = 0;
+ }
+ else if (! backup)
+ {
+@@ -255,23 +246,27 @@
+
+ static char const CLEARTOOL_CO[] = "cleartool co -unr -nc ";
+
++static char const PERFORCE_CO[] = "p4 edit ";
++
+ /* Return "RCS" if FILENAME is controlled by RCS,
+ "SCCS" if it is controlled by SCCS,
+- "ClearCase" if it is controlled by Clearcase, and 0 otherwise.
+- READONLY is nonzero if we desire only readonly access to FILENAME.
++ "ClearCase" if it is controlled by Clearcase,
++ "Perforce" if it is controlled by Perforce,
++ and 0 otherwise.
++ READONLY is true if we desire only readonly access to FILENAME.
+ FILESTAT describes FILENAME's status or is 0 if FILENAME does not exist.
+ If successful and if GETBUF is nonzero, set *GETBUF to a command
+ that gets the file; similarly for DIFFBUF and a command to diff the file
+ (but set *DIFFBUF to 0 if the diff operation is meaningless).
+ *GETBUF and *DIFFBUF must be freed by the caller. */
+ char const *
+-version_controller (char const *filename, int readonly,
++version_controller (char const *filename, bool readonly,
+ struct stat const *filestat, char **getbuf, char **diffbuf)
+ {
+ struct stat cstat;
+ char const *filebase = base_name (filename);
+ char const *dotslash = *filename == '-' ? "./" : "";
+- size_t dir_len = filebase - filename;
++ size_t dirlen = filebase - filename;
+ size_t filenamelen = strlen (filename);
+ size_t maxfixlen = sizeof "SCCS/" - 1 + sizeof SCCSPREFIX - 1;
+ size_t maxtrysize = filenamelen + maxfixlen + 1;
+@@ -285,8 +280,8 @@
+
+ strcpy (trybuf, filename);
+
+-#define try1(f,a1) (sprintf (trybuf + dir_len, f, a1), stat (trybuf, &cstat) == 0)
+-#define try2(f,a1,a2) (sprintf (trybuf + dir_len, f, a1,a2), stat (trybuf, &cstat) == 0)
++#define try1(f,a1) (sprintf (trybuf + dirlen, f, a1), stat (trybuf, &cstat) == 0)
++#define try2(f,a1,a2) (sprintf (trybuf + dirlen, f, a1,a2), stat (trybuf, &cstat) == 0)
+
+ /* Check that RCS file is not working file.
+ Some hosts don't report file name length errors. */
+@@ -362,6 +357,23 @@
+ *diffbuf = 0;
+
+ r = "ClearCase";
++ }
++ else if (!readonly && filestat &&
++ (getenv("P4PORT") || getenv("P4USER") || getenv("P4CONFIG")))
++ {
++ if (getbuf)
++ {
++ char *p = *getbuf = xmalloc (maxgetsize);
++ strcpy (p, PERFORCE_CO);
++ p += sizeof PERFORCE_CO - 1;
++ p += quote_system_arg (p, filename);
++ *p = '\0';
++ }
++
++ if (diffbuf)
++ *diffbuf = 0;
++
++ r = "Perforce";
+ }
+
+ free (trybuf);
+@@ -369,12 +381,12 @@
+ }
+
+ /* Get FILENAME from version control system CS. The file already exists if
+- EXISTS is nonzero. Only readonly access is needed if READONLY is nonzero.
++ EXISTS. Only readonly access is needed if READONLY.
+ Use the command GETBUF to actually get the named file.
+ Store the resulting file status into *FILESTAT.
+- Return nonzero if successful. */
+-int
+-version_get (char const *filename, char const *cs, int exists, int readonly,
++ Return true if successful. */
++bool
++version_get (char const *filename, char const *cs, bool exists, bool readonly,
+ char const *getbuf, struct stat *filestat)
+ {
+ if (patch_get < 0)
+@@ -460,7 +472,7 @@
+ *--p = '0' + (int) (n % 10);
+ while ((n /= 10) != 0);
+ }
+-
++
+ return p;
+ }
+
+@@ -490,7 +502,7 @@
+ {
+ va_list args;
+ fprintf (stderr, "%s: **** ", program_name);
+- vararg_start (args, format);
++ va_start (args, format);
+ vfprintf (stderr, format, args);
+ va_end (args);
+ putc ('\n', stderr);
+@@ -524,7 +536,7 @@
+ int errnum = errno;
+ va_list args;
+ fprintf (stderr, "%s: **** ", program_name);
+- vararg_start (args, format);
++ va_start (args, format);
+ vfprintf (stderr, format, args);
+ va_end (args);
+ fflush (stderr); /* perror bypasses stdio on some hosts. */
+@@ -540,7 +552,7 @@
+ say (char const *format, ...)
+ {
+ va_list args;
+- vararg_start (args, format);
++ va_start (args, format);
+ vfprintf (stdout, format, args);
+ va_end (args);
+ fflush (stdout);
+@@ -555,7 +567,7 @@
+ int r;
+ va_list args;
+
+- vararg_start (args, format);
++ va_start (args, format);
+ vfprintf (stdout, format, args);
+ va_end (args);
+ fflush (stdout);
+@@ -566,7 +578,8 @@
+ since it's unlikely that stdout will be seen by the tty user.
+ The isatty test also works around a bug in GNU Emacs 19.34 under Linux
+ which makes a call-process `patch' hang when it reads from /dev/tty.
+- POSIX.2 requires that we read /dev/tty, though. */
++ POSIX.1-2001 XCU line 26599 requires that we read /dev/tty,
++ though. */
+ ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
+ ? open (TTY_DEVICE, O_RDONLY)
+ : -1);
+@@ -607,15 +620,15 @@
+
+ /* Return nonzero if it OK to reverse a patch. */
+
+-int
++bool
+ ok_to_reverse (char const *format, ...)
+ {
+- int r = 0;
++ bool r = false;
+
+ if (noreverse || ! (force && verbosity == SILENT))
+ {
+ va_list args;
+- vararg_start (args, format);
++ va_start (args, format);
+ vfprintf (stdout, format, args);
+ va_end (args);
+ }
+@@ -623,19 +636,17 @@
+ if (noreverse)
+ {
+ printf (" Skipping patch.\n");
+- skip_rest_of_patch = TRUE;
+- r = 0;
++ skip_rest_of_patch = true;
+ }
+ else if (force)
+ {
+ if (verbosity != SILENT)
+ printf (" Applying it anyway.\n");
+- r = 0;
+ }
+ else if (batch)
+ {
+ say (reverse ? " Ignoring -R.\n" : " Assuming -R.\n");
+- r = 1;
++ r = true;
+ }
+ else
+ {
+@@ -648,7 +659,7 @@
+ {
+ if (verbosity != SILENT)
+ say ("Skipping patch.\n");
+- skip_rest_of_patch = TRUE;
++ skip_rest_of_patch = true;
+ }
+ }
+ }
+@@ -711,7 +722,7 @@
+ static sigset_t signals_to_block;
+
+ #if ! HAVE_SIGACTION
+-static RETSIGTYPE fatal_exit_handler PARAMS ((int)) __attribute__ ((noreturn));
++static RETSIGTYPE fatal_exit_handler (int) __attribute__ ((noreturn));
+ static RETSIGTYPE
+ fatal_exit_handler (int sig)
+ {
+@@ -721,7 +732,7 @@
+ #endif
+
+ void
+-set_signals (int reset)
++set_signals (bool reset)
+ {
+ int i;
+ #if HAVE_SIGACTION
+@@ -743,7 +754,7 @@
+ sigemptyset (&signals_to_block);
+ for (i = 0; i < NUM_SIGS; i++)
+ {
+- int ignoring_signal;
++ bool ignoring_signal;
+ #if HAVE_SIGACTION
+ if (sigaction (sigs[i], (struct sigaction *) 0, &initial_act) != 0)
+ continue;
+@@ -939,7 +950,13 @@
+ }
+ else if (ISSPACE ((unsigned char) *t))
+ {
++ /* Allow file names with internal spaces,
++ but only if a tab separates the file name from the date. */
+ char const *u = t;
++ while (*u != '\t' && ISSPACE ((unsigned char) u[1]))
++ u++;
++ if (*u != '\t' && strchr (u + 1, '\t'))
++ continue;
+
+ if (set_time | set_utc)
+ stamp = str2time (&u, initial_time,
+diff -urNd -urNd patch-2.5.4/util.h patch-2.5.9/util.h
+--- patch-2.5.4/util.h 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/util.h 2003-05-20 09:56:48.000000000 -0400
+@@ -1,6 +1,26 @@
+ /* utility functions for `patch' */
+
+-/* $Id: util.h,v 1.17 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: util.h,v 1.20 2003/05/20 13:56:48 eggert Exp $ */
++
++/* Copyright (C) 1986 Larry Wall
++
++ Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
++ Software Foundation, Inc.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; see the file COPYING.
++ If not, write to the Free Software Foundation,
++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ /* An upper bound on the print length of a signed decimal line number.
+ Add one for the sign. */
+@@ -8,32 +28,32 @@
+
+ XTERN enum backup_type backup_type;
+
+-int ok_to_reverse PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
+-void ask PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
+-void say PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
++bool ok_to_reverse (char const *, ...) __attribute__ ((format (printf, 1, 2)));
++void ask (char const *, ...) __attribute__ ((format (printf, 1, 2)));
++void say (char const *, ...) __attribute__ ((format (printf, 1, 2)));
+
+-void fatal PARAMS ((char const *, ...))
++void fatal (char const *, ...)
+ __attribute__ ((noreturn, format (printf, 1, 2)));
+-void pfatal PARAMS ((char const *, ...))
++void pfatal (char const *, ...)
+ __attribute__ ((noreturn, format (printf, 1, 2)));
+
+-char *fetchname PARAMS ((char *, int, time_t *));
+-char *savebuf PARAMS ((char const *, size_t));
+-char *savestr PARAMS ((char const *));
+-char const *version_controller PARAMS ((char const *, int, struct stat const *, char **, char **));
+-int version_get PARAMS ((char const *, char const *, int, int, char const *, struct stat *));
+-int create_file PARAMS ((char const *, int, mode_t));
+-int systemic PARAMS ((char const *));
+-char *format_linenum PARAMS ((char[LINENUM_LENGTH_BOUND + 1], LINENUM));
+-void Fseek PARAMS ((FILE *, file_offset, int));
+-void copy_file PARAMS ((char const *, char const *, int, mode_t));
+-void exit_with_signal PARAMS ((int)) __attribute__ ((noreturn));
+-void ignore_signals PARAMS ((void));
+-void init_time PARAMS ((void));
+-void memory_fatal PARAMS ((void)) __attribute__ ((noreturn));
+-void move_file PARAMS ((char const *, int volatile *, char *, mode_t, int));
+-void read_fatal PARAMS ((void)) __attribute__ ((noreturn));
+-void remove_prefix PARAMS ((char *, size_t));
+-void removedirs PARAMS ((char *));
+-void set_signals PARAMS ((int));
+-void write_fatal PARAMS ((void)) __attribute__ ((noreturn));
++char *fetchname (char *, int, time_t *);
++char *savebuf (char const *, size_t);
++char *savestr (char const *);
++char const *version_controller (char const *, bool, struct stat const *, char **, char **);
++bool version_get (char const *, char const *, bool, bool, char const *, struct stat *);
++int create_file (char const *, int, mode_t);
++int systemic (char const *);
++char *format_linenum (char[LINENUM_LENGTH_BOUND + 1], LINENUM);
++void Fseek (FILE *, file_offset, int);
++void copy_file (char const *, char const *, int, mode_t);
++void exit_with_signal (int) __attribute__ ((noreturn));
++void ignore_signals (void);
++void init_time (void);
++void memory_fatal (void) __attribute__ ((noreturn));
++void move_file (char const *, int volatile *, char *, mode_t, bool);
++void read_fatal (void) __attribute__ ((noreturn));
++void remove_prefix (char *, size_t);
++void removedirs (char *);
++void set_signals (bool);
++void write_fatal (void) __attribute__ ((noreturn));
+diff -urNd -urNd patch-2.5.4/version.c patch-2.5.9/version.c
+--- patch-2.5.4/version.c 1999-08-30 02:20:08.000000000 -0400
++++ patch-2.5.9/version.c 2003-05-18 04:25:17.000000000 -0400
+@@ -1,17 +1,16 @@
+ /* Print the version number. */
+
+-/* $Id: version.c,v 1.7 1999/08/30 06:20:08 eggert Exp $ */
++/* $Id: version.c,v 1.13 2003/05/18 08:25:17 eggert Exp $ */
+
+ #define XTERN extern
+ #include <common.h>
+ #undef XTERN
+ #define XTERN
+-#include <patchlevel.h>
+ #include <version.h>
+
+ static char const copyright_string[] = "\
+-Copyright 1984-1988 Larry Wall\n\
+-Copyright 1989-1999 Free Software Foundation, Inc.";
++Copyright (C) 1988 Larry Wall\n\
++Copyright (C) 2003 Free Software Foundation, Inc.";
+
+ static char const free_software_msgid[] = "\
+ This program comes with NO WARRANTY, to the extent permitted by law.\n\
+@@ -25,6 +24,6 @@
+ void
+ version (void)
+ {
+- printf ("%s %s\n%s\n\n%s\n\n%s\n", program_name, PATCH_VERSION,
++ printf ("%s %s\n%s\n\n%s\n\n%s\n", PACKAGE_NAME, PACKAGE_VERSION,
+ copyright_string, free_software_msgid, authorship_msgid);
+ }
+diff -urNd -urNd patch-2.5.4/version.h patch-2.5.9/version.h
+--- patch-2.5.4/version.h 1997-04-06 21:07:00.000000000 -0400
++++ patch-2.5.9/version.h 2002-05-28 03:24:05.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* Print the version number. */
+
+-/* $Id: version.h,v 1.3 1997/04/07 01:07:00 eggert Exp $ */
++/* $Id: version.h,v 1.5 2002/05/28 07:24:05 eggert Exp $ */
+
+-void version PARAMS ((void));
++void version (void);
+diff -urNd -urNd patch-2.5.4/xalloc.h patch-2.5.9/xalloc.h
+--- patch-2.5.4/xalloc.h 1999-01-01 12:36:43.000000000 -0500
++++ patch-2.5.9/xalloc.h 2000-10-31 02:09:56.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* xalloc.h -- malloc with out-of-memory checking
+- Copyright (C) 1990-1998, 1999 Free Software Foundation, Inc.
++ Copyright (C) 1990-1998, 1999, 2000 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -26,6 +26,16 @@
+ # endif
+ # endif
+
++# ifndef __attribute__
++# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
++# define __attribute__(x)
++# endif
++# endif
++
++# ifndef ATTRIBUTE_NORETURN
++# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
++# endif
++
+ /* Exit value when the requested amount of memory is not available.
+ It is initialized to EXIT_FAILURE, but the caller may set it to
+ some other value. */
+@@ -33,20 +43,45 @@
+
+ /* If this pointer is non-zero, run the specified function upon each
+ allocation failure. It is initialized to zero. */
+-extern void (*xalloc_fail_func) ();
++extern void (*xalloc_fail_func) PARAMS ((void));
+
+ /* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
+- message must be non-NULL. It is translated via gettext.
+- The default value is "Memory exhausted". */
+-extern char *const xalloc_msg_memory_exhausted;
++ message is output. It is translated via gettext.
++ Its value is "memory exhausted". */
++extern char const xalloc_msg_memory_exhausted[];
++
++/* This function is always triggered when memory is exhausted. It is
++ in charge of honoring the three previous items. This is the
++ function to call when one wants the program to die because of a
++ memory allocation failure. */
++extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
+
+ void *xmalloc PARAMS ((size_t n));
+ void *xcalloc PARAMS ((size_t n, size_t s));
+ void *xrealloc PARAMS ((void *p, size_t n));
++char *xstrdup PARAMS ((const char *str));
++
++# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
++# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
++# define XREALLOC(Ptr, Type, N_items) \
++ ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
++
++/* Declare and alloc memory for VAR of type TYPE. */
++# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
++
++/* Free VAR only if non NULL. */
++# define XFREE(Var) \
++ do { \
++ if (Var) \
++ free (Var); \
++ } while (0)
++
++/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
++# define CCLONE(Src, Num) \
++ (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
++
++/* Return a malloc'ed copy of SRC. */
++# define CLONE(Src) CCLONE (Src, 1)
+
+-# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
+-# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
+-# define XREALLOC(Ptr, Type, N_bytes) \
+- ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
+
+ #endif /* !XALLOC_H_ */
+diff -urNd -urNd patch-2.5.4/xmalloc.c patch-2.5.9/xmalloc.c
+--- patch-2.5.4/xmalloc.c 1999-04-18 22:43:16.000000000 -0400
++++ patch-2.5.9/xmalloc.c 2002-11-21 14:16:29.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* xmalloc.c -- malloc with out of memory checking
+- Copyright (C) 1990-1997, 98, 99 Free Software Foundation, Inc.
++ Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -30,14 +30,9 @@
+ void free ();
+ #endif
+
+-#if ENABLE_NLS
+-# include <libintl.h>
+-# define _(Text) gettext (Text)
+-#else
+-# define textdomain(Domain)
+-# define _(Text) Text
+-#endif
+-#define N_(Text) Text
++#include "gettext.h"
++#define _(msgid) gettext (msgid)
++#define N_(msgid) msgid
+
+ #include "error.h"
+ #include "xalloc.h"
+@@ -46,12 +41,14 @@
+ # define EXIT_FAILURE 1
+ #endif
+
+-#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
+-you must run the autoconf test for a properly working malloc -- see malloc.m4
++/* The following tests require AC_PREREQ(2.54). */
++
++#ifndef HAVE_MALLOC
++"you must run the autoconf test for a GNU libc compatible malloc"
+ #endif
+
+-#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
+-you must run the autoconf test for a properly working realloc -- see realloc.m4
++#ifndef HAVE_REALLOC
++"you must run the autoconf test for a GNU libc compatible realloc"
+ #endif
+
+ /* Exit value when the requested amount of memory is not available.
+@@ -59,18 +56,22 @@
+ int xalloc_exit_failure = EXIT_FAILURE;
+
+ /* If non NULL, call this function when memory is exhausted. */
+-void (*xalloc_fail_func) () = 0;
++void (*xalloc_fail_func) PARAMS ((void)) = 0;
+
+ /* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
+ before exiting when memory is exhausted. Goes through gettext. */
+-char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
++char const xalloc_msg_memory_exhausted[] = N_("memory exhausted");
+
+-static void
+-xalloc_fail (void)
++void
++xalloc_die (void)
+ {
+ if (xalloc_fail_func)
+ (*xalloc_fail_func) ();
+ error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
++ /* The `noreturn' cannot be given to error, since it may return if
++ its first argument is 0. To help compilers understand the
++ xalloc_die does terminate, call exit. */
++ exit (EXIT_FAILURE);
+ }
+
+ /* Allocate N bytes of memory dynamically, with error checking. */
+@@ -82,20 +83,19 @@
+
+ p = malloc (n);
+ if (p == 0)
+- xalloc_fail ();
++ xalloc_die ();
+ return p;
+ }
+
+ /* Change the size of an allocated block of memory P to N bytes,
+- with error checking.
+- If P is NULL, run xmalloc. */
++ with error checking. */
+
+ void *
+ xrealloc (void *p, size_t n)
+ {
+ p = realloc (p, n);
+ if (p == 0)
+- xalloc_fail ();
++ xalloc_die ();
+ return p;
+ }
+
+@@ -108,6 +108,6 @@
+
+ p = calloc (n, s);
+ if (p == 0)
+- xalloc_fail ();
++ xalloc_die ();
+ return p;
+ }
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 0000000..4601858
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/debian.patch
@@ -0,0 +1,10424 @@
+--- patch-2.5.9.orig/m4/hash.m4
++++ patch-2.5.9/m4/hash.m4
+@@ -0,0 +1,15 @@
++# hash.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_HASH],
++[
++ dnl Prerequisites of lib/hash.c.
++ AC_CHECK_HEADERS_ONCE(stdlib.h)
++ AC_HEADER_STDBOOL
++ AC_CHECK_DECLS_ONCE(free malloc)
++])
+--- patch-2.5.9.orig/m4/nanosecond_stat.m4
++++ patch-2.5.9/m4/nanosecond_stat.m4
+@@ -0,0 +1,35 @@
++AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
++ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
++ [ac_cv_stat_nsec],
++ [AC_TRY_COMPILE(
++ [
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++ ],
++ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
++ [ac_cv_stat_nsec=yes],
++ [ac_cv_stat_nsec=no])
++ ])
++ if test $ac_cv_stat_nsec = yes; then
++ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
++ fi
++
++ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
++ [ac_cv_stat_timeval],
++ [AC_TRY_COMPILE(
++ [
++ #include <time.h>
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++ ],
++ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
++ [ac_cv_stat_timeval=yes],
++ [ac_cv_stat_timeval=no])
++ ])
++ if test $ac_cv_stat_timeval = yes; then
++ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
++ fi])
+--- patch-2.5.9.orig/Makefile.in
++++ patch-2.5.9/Makefile.in
+@@ -62,7 +62,7 @@
+ SHELL = /bin/sh
+
+ LIBSRCS = error.c malloc.c memchr.c mkdir.c \
+- realloc.c rmdir.c strcasecmp.c strncasecmp.c
++ realloc.c rmdir.c strcasecmp.c strncasecmp.c hash.c
+ SRCS = $(LIBSRCS) \
+ addext.c argmatch.c backupfile.c \
+ basename.c dirname.c \
+@@ -78,12 +78,12 @@
+ maketime.$(OBJEXT) partime.$(OBJEXT) \
+ patch.$(OBJEXT) pch.$(OBJEXT) \
+ quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
+- util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
++ util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT) hash.$(OBJEXT)
+ HDRS = argmatch.h backupfile.h common.h dirname.h \
+ error.h getopt.h gettext.h \
+ inp.h maketime.h partime.h pch.h \
+ quote.h quotearg.h quotesys.h \
+- unlocked-io.h util.h version.h xalloc.h
++ unlocked-io.h util.h version.h xalloc.h hash.h
+ MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
+ aclocal.m4 \
+ config.hin configure configure.ac \
+--- patch-2.5.9.orig/aclocal.m4
++++ patch-2.5.9/aclocal.m4
+@@ -1,3 +1,1058 @@
++dnl aclocal.m4 generated automatically by aclocal 1.4-p6
++
++dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++
++dnl This program is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++dnl PARTICULAR PURPOSE.
++
++# lib-prefix.m4 serial 3 (gettext-0.13)
++dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Bruno Haible.
++
++dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
++dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
++dnl require excessive bracketing.
++ifdef([AC_HELP_STRING],
++[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
++[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
++
++dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
++dnl to access previously installed libraries. The basic assumption is that
++dnl a user will want packages to use other packages he previously installed
++dnl with the same --prefix option.
++dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
++dnl libraries, but is otherwise very convenient.
++AC_DEFUN([AC_LIB_PREFIX],
++[
++ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
++ AC_REQUIRE([AC_PROG_CC])
++ AC_REQUIRE([AC_CANONICAL_HOST])
++ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
++ dnl By default, look in $includedir and $libdir.
++ use_additional=yes
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ AC_LIB_ARG_WITH([lib-prefix],
++[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
++ --without-lib-prefix don't search for libraries in includedir and libdir],
++[
++ if test "X$withval" = "Xno"; then
++ use_additional=no
++ else
++ if test "X$withval" = "X"; then
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ else
++ additional_includedir="$withval/include"
++ additional_libdir="$withval/lib"
++ fi
++ fi
++])
++ if test $use_additional = yes; then
++ dnl Potentially add $additional_includedir to $CPPFLAGS.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/include,
++ dnl 2. if it's already present in $CPPFLAGS,
++ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_includedir" != "X/usr/include"; then
++ haveit=
++ for x in $CPPFLAGS; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-I$additional_includedir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test "X$additional_includedir" = "X/usr/local/include"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux*) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ if test -d "$additional_includedir"; then
++ dnl Really add $additional_includedir to $CPPFLAGS.
++ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
++ fi
++ fi
++ fi
++ fi
++ dnl Potentially add $additional_libdir to $LDFLAGS.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/lib,
++ dnl 2. if it's already present in $LDFLAGS,
++ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_libdir" != "X/usr/lib"; then
++ haveit=
++ for x in $LDFLAGS; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$additional_libdir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test "X$additional_libdir" = "X/usr/local/lib"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux*) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ if test -d "$additional_libdir"; then
++ dnl Really add $additional_libdir to $LDFLAGS.
++ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
++ fi
++ fi
++ fi
++ fi
++ fi
++])
++
++dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
++dnl acl_final_exec_prefix, containing the values to which $prefix and
++dnl $exec_prefix will expand at the end of the configure script.
++AC_DEFUN([AC_LIB_PREPARE_PREFIX],
++[
++ dnl Unfortunately, prefix and exec_prefix get only finally determined
++ dnl at the end of configure.
++ if test "X$prefix" = "XNONE"; then
++ acl_final_prefix="$ac_default_prefix"
++ else
++ acl_final_prefix="$prefix"
++ fi
++ if test "X$exec_prefix" = "XNONE"; then
++ acl_final_exec_prefix='${prefix}'
++ else
++ acl_final_exec_prefix="$exec_prefix"
++ fi
++ acl_save_prefix="$prefix"
++ prefix="$acl_final_prefix"
++ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
++ prefix="$acl_save_prefix"
++])
++
++dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
++dnl variables prefix and exec_prefix bound to the values they will have
++dnl at the end of the configure script.
++AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
++[
++ acl_save_prefix="$prefix"
++ prefix="$acl_final_prefix"
++ acl_save_exec_prefix="$exec_prefix"
++ exec_prefix="$acl_final_exec_prefix"
++ $1
++ exec_prefix="$acl_save_exec_prefix"
++ prefix="$acl_save_prefix"
++])
++
++# lib-link.m4 serial 4 (gettext-0.12)
++dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Bruno Haible.
++
++dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
++dnl the libraries corresponding to explicit and implicit dependencies.
++dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
++dnl augments the CPPFLAGS variable.
++AC_DEFUN([AC_LIB_LINKFLAGS],
++[
++ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
++ AC_REQUIRE([AC_LIB_RPATH])
++ define([Name],[translit([$1],[./-], [___])])
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
++ AC_LIB_LINKFLAGS_BODY([$1], [$2])
++ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
++ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
++ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
++ ])
++ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
++ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
++ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
++ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
++ AC_SUBST([LIB]NAME)
++ AC_SUBST([LTLIB]NAME)
++ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
++ dnl results of this search when this library appears as a dependency.
++ HAVE_LIB[]NAME=yes
++ undefine([Name])
++ undefine([NAME])
++])
++
++dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
++dnl searches for libname and the libraries corresponding to explicit and
++dnl implicit dependencies, together with the specified include files and
++dnl the ability to compile and link the specified testcode. If found, it
++dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
++dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
++dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
++dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
++AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
++[
++ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
++ AC_REQUIRE([AC_LIB_RPATH])
++ define([Name],[translit([$1],[./-], [___])])
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++
++ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
++ dnl accordingly.
++ AC_LIB_LINKFLAGS_BODY([$1], [$2])
++
++ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
++ dnl because if the user has installed lib[]Name and not disabled its use
++ dnl via --without-lib[]Name-prefix, he wants to use it.
++ ac_save_CPPFLAGS="$CPPFLAGS"
++ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
++
++ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
++ ac_save_LIBS="$LIBS"
++ LIBS="$LIBS $LIB[]NAME"
++ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
++ LIBS="$ac_save_LIBS"
++ ])
++ if test "$ac_cv_lib[]Name" = yes; then
++ HAVE_LIB[]NAME=yes
++ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
++ AC_MSG_CHECKING([how to link with lib[]$1])
++ AC_MSG_RESULT([$LIB[]NAME])
++ else
++ HAVE_LIB[]NAME=no
++ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
++ dnl $INC[]NAME either.
++ CPPFLAGS="$ac_save_CPPFLAGS"
++ LIB[]NAME=
++ LTLIB[]NAME=
++ fi
++ AC_SUBST([HAVE_LIB]NAME)
++ AC_SUBST([LIB]NAME)
++ AC_SUBST([LTLIB]NAME)
++ undefine([Name])
++ undefine([NAME])
++])
++
++dnl Determine the platform dependent parameters needed to use rpath:
++dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
++dnl hardcode_direct, hardcode_minus_L.
++AC_DEFUN([AC_LIB_RPATH],
++[
++ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
++ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
++ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
++ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
++ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
++ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
++ . ./conftest.sh
++ rm -f ./conftest.sh
++ acl_cv_rpath=done
++ ])
++ wl="$acl_cv_wl"
++ libext="$acl_cv_libext"
++ shlibext="$acl_cv_shlibext"
++ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
++ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
++ hardcode_direct="$acl_cv_hardcode_direct"
++ hardcode_minus_L="$acl_cv_hardcode_minus_L"
++ dnl Determine whether the user wants rpath handling at all.
++ AC_ARG_ENABLE(rpath,
++ [ --disable-rpath do not hardcode runtime library paths],
++ :, enable_rpath=yes)
++])
++
++dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
++dnl the libraries corresponding to explicit and implicit dependencies.
++dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
++AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
++[
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++ dnl By default, look in $includedir and $libdir.
++ use_additional=yes
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ AC_LIB_ARG_WITH([lib$1-prefix],
++[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
++ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
++[
++ if test "X$withval" = "Xno"; then
++ use_additional=no
++ else
++ if test "X$withval" = "X"; then
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ else
++ additional_includedir="$withval/include"
++ additional_libdir="$withval/lib"
++ fi
++ fi
++])
++ dnl Search the library and its dependencies in $additional_libdir and
++ dnl $LDFLAGS. Using breadth-first-seach.
++ LIB[]NAME=
++ LTLIB[]NAME=
++ INC[]NAME=
++ rpathdirs=
++ ltrpathdirs=
++ names_already_handled=
++ names_next_round='$1 $2'
++ while test -n "$names_next_round"; do
++ names_this_round="$names_next_round"
++ names_next_round=
++ for name in $names_this_round; do
++ already_handled=
++ for n in $names_already_handled; do
++ if test "$n" = "$name"; then
++ already_handled=yes
++ break
++ fi
++ done
++ if test -z "$already_handled"; then
++ names_already_handled="$names_already_handled $name"
++ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
++ dnl or AC_LIB_HAVE_LINKFLAGS call.
++ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
++ eval value=\"\$HAVE_LIB$uppername\"
++ if test -n "$value"; then
++ if test "$value" = yes; then
++ eval value=\"\$LIB$uppername\"
++ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
++ eval value=\"\$LTLIB$uppername\"
++ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
++ else
++ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
++ dnl that this library doesn't exist. So just drop it.
++ :
++ fi
++ else
++ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
++ dnl and the already constructed $LIBNAME/$LTLIBNAME.
++ found_dir=
++ found_la=
++ found_so=
++ found_a=
++ if test $use_additional = yes; then
++ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
++ found_dir="$additional_libdir"
++ found_so="$additional_libdir/lib$name.$shlibext"
++ if test -f "$additional_libdir/lib$name.la"; then
++ found_la="$additional_libdir/lib$name.la"
++ fi
++ else
++ if test -f "$additional_libdir/lib$name.$libext"; then
++ found_dir="$additional_libdir"
++ found_a="$additional_libdir/lib$name.$libext"
++ if test -f "$additional_libdir/lib$name.la"; then
++ found_la="$additional_libdir/lib$name.la"
++ fi
++ fi
++ fi
++ fi
++ if test "X$found_dir" = "X"; then
++ for x in $LDFLAGS $LTLIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ case "$x" in
++ -L*)
++ dir=`echo "X$x" | sed -e 's/^X-L//'`
++ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
++ found_dir="$dir"
++ found_so="$dir/lib$name.$shlibext"
++ if test -f "$dir/lib$name.la"; then
++ found_la="$dir/lib$name.la"
++ fi
++ else
++ if test -f "$dir/lib$name.$libext"; then
++ found_dir="$dir"
++ found_a="$dir/lib$name.$libext"
++ if test -f "$dir/lib$name.la"; then
++ found_la="$dir/lib$name.la"
++ fi
++ fi
++ fi
++ ;;
++ esac
++ if test "X$found_dir" != "X"; then
++ break
++ fi
++ done
++ fi
++ if test "X$found_dir" != "X"; then
++ dnl Found the library.
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
++ if test "X$found_so" != "X"; then
++ dnl Linking with a shared library. We attempt to hardcode its
++ dnl directory into the executable's runpath, unless it's the
++ dnl standard /usr/lib.
++ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
++ dnl No hardcoding is needed.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ dnl Use an explicit option to hardcode DIR into the resulting
++ dnl binary.
++ dnl Potentially add DIR to ltrpathdirs.
++ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
++ haveit=
++ for x in $ltrpathdirs; do
++ if test "X$x" = "X$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ ltrpathdirs="$ltrpathdirs $found_dir"
++ fi
++ dnl The hardcoding into $LIBNAME is system dependent.
++ if test "$hardcode_direct" = yes; then
++ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
++ dnl resulting binary.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
++ dnl Use an explicit option to hardcode DIR into the resulting
++ dnl binary.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ dnl Potentially add DIR to rpathdirs.
++ dnl The rpathdirs will be appended to $LIBNAME at the end.
++ haveit=
++ for x in $rpathdirs; do
++ if test "X$x" = "X$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ rpathdirs="$rpathdirs $found_dir"
++ fi
++ else
++ dnl Rely on "-L$found_dir".
++ dnl But don't add it if it's already contained in the LDFLAGS
++ dnl or the already constructed $LIBNAME
++ haveit=
++ for x in $LDFLAGS $LIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
++ fi
++ if test "$hardcode_minus_L" != no; then
++ dnl FIXME: Not sure whether we should use
++ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
++ dnl here.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
++ dnl here, because this doesn't fit in flags passed to the
++ dnl compiler. So give up. No hardcoding. This affects only
++ dnl very old systems.
++ dnl FIXME: Not sure whether we should use
++ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
++ dnl here.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
++ fi
++ fi
++ fi
++ fi
++ else
++ if test "X$found_a" != "X"; then
++ dnl Linking with a static library.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
++ else
++ dnl We shouldn't come here, but anyway it's good to have a
++ dnl fallback.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
++ fi
++ fi
++ dnl Assume the include files are nearby.
++ additional_includedir=
++ case "$found_dir" in
++ */lib | */lib/)
++ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
++ additional_includedir="$basedir/include"
++ ;;
++ esac
++ if test "X$additional_includedir" != "X"; then
++ dnl Potentially add $additional_includedir to $INCNAME.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/include,
++ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
++ dnl 3. if it's already present in $CPPFLAGS or the already
++ dnl constructed $INCNAME,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_includedir" != "X/usr/include"; then
++ haveit=
++ if test "X$additional_includedir" = "X/usr/local/include"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux*) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ for x in $CPPFLAGS $INC[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-I$additional_includedir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_includedir"; then
++ dnl Really add $additional_includedir to $INCNAME.
++ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
++ fi
++ fi
++ fi
++ fi
++ fi
++ dnl Look for dependencies.
++ if test -n "$found_la"; then
++ dnl Read the .la file. It defines the variables
++ dnl dlname, library_names, old_library, dependency_libs, current,
++ dnl age, revision, installed, dlopen, dlpreopen, libdir.
++ save_libdir="$libdir"
++ case "$found_la" in
++ */* | *\\*) . "$found_la" ;;
++ *) . "./$found_la" ;;
++ esac
++ libdir="$save_libdir"
++ dnl We use only dependency_libs.
++ for dep in $dependency_libs; do
++ case "$dep" in
++ -L*)
++ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
++ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/lib,
++ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
++ dnl 3. if it's already present in $LDFLAGS or the already
++ dnl constructed $LIBNAME,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_libdir" != "X/usr/lib"; then
++ haveit=
++ if test "X$additional_libdir" = "X/usr/local/lib"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux*) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ haveit=
++ for x in $LDFLAGS $LIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$additional_libdir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_libdir"; then
++ dnl Really add $additional_libdir to $LIBNAME.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
++ fi
++ fi
++ haveit=
++ for x in $LDFLAGS $LTLIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$additional_libdir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_libdir"; then
++ dnl Really add $additional_libdir to $LTLIBNAME.
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
++ fi
++ fi
++ fi
++ fi
++ ;;
++ -R*)
++ dir=`echo "X$dep" | sed -e 's/^X-R//'`
++ if test "$enable_rpath" != no; then
++ dnl Potentially add DIR to rpathdirs.
++ dnl The rpathdirs will be appended to $LIBNAME at the end.
++ haveit=
++ for x in $rpathdirs; do
++ if test "X$x" = "X$dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ rpathdirs="$rpathdirs $dir"
++ fi
++ dnl Potentially add DIR to ltrpathdirs.
++ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
++ haveit=
++ for x in $ltrpathdirs; do
++ if test "X$x" = "X$dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ ltrpathdirs="$ltrpathdirs $dir"
++ fi
++ fi
++ ;;
++ -l*)
++ dnl Handle this in the next round.
++ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
++ ;;
++ *.la)
++ dnl Handle this in the next round. Throw away the .la's
++ dnl directory; it is already contained in a preceding -L
++ dnl option.
++ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
++ ;;
++ *)
++ dnl Most likely an immediate library name.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
++ ;;
++ esac
++ done
++ fi
++ else
++ dnl Didn't find the library; assume it is in the system directories
++ dnl known to the linker and runtime loader. (All the system
++ dnl directories known to the linker should also be known to the
++ dnl runtime loader, otherwise the system is severely misconfigured.)
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
++ fi
++ fi
++ fi
++ done
++ done
++ if test "X$rpathdirs" != "X"; then
++ if test -n "$hardcode_libdir_separator"; then
++ dnl Weird platform: only the last -rpath option counts, the user must
++ dnl pass all path elements in one option. We can arrange that for a
++ dnl single library, but not when more than one $LIBNAMEs are used.
++ alldirs=
++ for found_dir in $rpathdirs; do
++ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
++ done
++ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
++ acl_save_libdir="$libdir"
++ libdir="$alldirs"
++ eval flag=\"$hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
++ else
++ dnl The -rpath options are cumulative.
++ for found_dir in $rpathdirs; do
++ acl_save_libdir="$libdir"
++ libdir="$found_dir"
++ eval flag=\"$hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
++ done
++ fi
++ fi
++ if test "X$ltrpathdirs" != "X"; then
++ dnl When using libtool, the option that works for both libraries and
++ dnl executables is -R. The -R options are cumulative.
++ for found_dir in $ltrpathdirs; do
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
++ done
++ fi
++])
++
++dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
++dnl unless already present in VAR.
++dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
++dnl contains two or three consecutive elements that belong together.
++AC_DEFUN([AC_LIB_APPENDTOVAR],
++[
++ for element in [$2]; do
++ haveit=
++ for x in $[$1]; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X$element"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ [$1]="${[$1]}${[$1]:+ }$element"
++ fi
++ done
++])
++
++# lib-ld.m4 serial 3 (gettext-0.13)
++dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl Subroutines of libtool.m4,
++dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
++dnl with libtool.m4.
++
++dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
++AC_DEFUN([AC_LIB_PROG_LD_GNU],
++[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
++[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
++case `$LD -v 2>&1 </dev/null` in
++*GNU* | *'with BFD'*)
++ acl_cv_prog_gnu_ld=yes ;;
++*)
++ acl_cv_prog_gnu_ld=no ;;
++esac])
++with_gnu_ld=$acl_cv_prog_gnu_ld
++])
++
++dnl From libtool-1.4. Sets the variable LD.
++AC_DEFUN([AC_LIB_PROG_LD],
++[AC_ARG_WITH(gnu-ld,
++[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
++test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
++AC_REQUIRE([AC_PROG_CC])dnl
++AC_REQUIRE([AC_CANONICAL_HOST])dnl
++# Prepare PATH_SEPARATOR.
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
++fi
++ac_prog=ld
++if test "$GCC" = yes; then
++ # Check if gcc -print-prog-name=ld gives a path.
++ AC_MSG_CHECKING([for ld used by GCC])
++ case $host in
++ *-*-mingw*)
++ # gcc leaves a trailing carriage return which upsets mingw
++ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
++ *)
++ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
++ esac
++ case $ac_prog in
++ # Accept absolute paths.
++ [[\\/]* | [A-Za-z]:[\\/]*)]
++ [re_direlt='/[^/][^/]*/\.\./']
++ # Canonicalize the path of ld
++ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
++ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
++ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
++ done
++ test -z "$LD" && LD="$ac_prog"
++ ;;
++ "")
++ # If it fails, then pretend we aren't using GCC.
++ ac_prog=ld
++ ;;
++ *)
++ # If it is relative, then search for the first ld in PATH.
++ with_gnu_ld=unknown
++ ;;
++ esac
++elif test "$with_gnu_ld" = yes; then
++ AC_MSG_CHECKING([for GNU ld])
++else
++ AC_MSG_CHECKING([for non-GNU ld])
++fi
++AC_CACHE_VAL(acl_cv_path_LD,
++[if test -z "$LD"; then
++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
++ for ac_dir in $PATH; do
++ test -z "$ac_dir" && ac_dir=.
++ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
++ acl_cv_path_LD="$ac_dir/$ac_prog"
++ # Check to see if the program is GNU ld. I'd rather use --version,
++ # but apparently some GNU ld's only accept -v.
++ # Break only if it was the GNU/non-GNU ld that we prefer.
++ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
++ *GNU* | *'with BFD'*)
++ test "$with_gnu_ld" != no && break ;;
++ *)
++ test "$with_gnu_ld" != yes && break ;;
++ esac
++ fi
++ done
++ IFS="$ac_save_ifs"
++else
++ acl_cv_path_LD="$LD" # Let the user override the test with a path.
++fi])
++LD="$acl_cv_path_LD"
++if test -n "$LD"; then
++ AC_MSG_RESULT($LD)
++else
++ AC_MSG_RESULT(no)
++fi
++test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
++AC_LIB_PROG_LD_GNU
++])
++
++# isc-posix.m4 serial 2 (gettext-0.11.2)
++dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
++
++# This test replaces the one in autoconf.
++# Currently this macro should have the same name as the autoconf macro
++# because gettext's gettext.m4 (distributed in the automake package)
++# still uses it. Otherwise, the use in gettext.m4 makes autoheader
++# give these diagnostics:
++# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
++# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
++
++undefine([AC_ISC_POSIX])
++
++AC_DEFUN([AC_ISC_POSIX],
++ [
++ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
++ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
++ ]
++)
++
++# Check for stdbool.h that conforms to C99.
++
++# Copyright (C) 2002-2003 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++# Prepare for substituting <stdbool.h> if it is not supported.
++
++AC_DEFUN([AM_STDBOOL_H],
++[
++ AC_REQUIRE([AC_HEADER_STDBOOL])
++
++ # Define two additional variables used in the Makefile substitution.
++
++ if test "$ac_cv_header_stdbool_h" = yes; then
++ STDBOOL_H=''
++ else
++ STDBOOL_H='stdbool.h'
++ fi
++ AC_SUBST([STDBOOL_H])
++
++ if test "$ac_cv_type__Bool" = yes; then
++ HAVE__BOOL=1
++ else
++ HAVE__BOOL=0
++ fi
++ AC_SUBST([HAVE__BOOL])
++])
++
++# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
++# have this macro built-in.
++
++AC_DEFUN([AC_HEADER_STDBOOL],
++ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
++ [ac_cv_header_stdbool_h],
++ [AC_TRY_COMPILE(
++ [
++ #include <stdbool.h>
++ #ifndef bool
++ "error: bool is not defined"
++ #endif
++ #ifndef false
++ "error: false is not defined"
++ #endif
++ #if false
++ "error: false is not 0"
++ #endif
++ #ifndef true
++ "error: false is not defined"
++ #endif
++ #if true != 1
++ "error: true is not 1"
++ #endif
++ #ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++ #endif
++
++ struct s { _Bool s: 1; _Bool t; } s;
++
++ char a[true == 1 ? 1 : -1];
++ char b[false == 0 ? 1 : -1];
++ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++ char d[(bool) -0.5 == true ? 1 : -1];
++ bool e = &s;
++ char f[(_Bool) -0.0 == false ? 1 : -1];
++ char g[true];
++ char h[sizeof (_Bool)];
++ char i[sizeof s.t];
++ ],
++ [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
++ [ac_cv_header_stdbool_h=yes],
++ [ac_cv_header_stdbool_h=no])])
++ AC_CHECK_TYPES([_Bool])
++ if test $ac_cv_header_stdbool_h = yes; then
++ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
++ fi])
++
++#serial 5
++
++dnl From Jim Meyering
++
++dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
++dnl usually in <utime.h>.
++dnl Some systems have utime.h but don't declare the struct anywhere.
++
++AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
++[
++ AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
++ AC_REQUIRE([AC_HEADER_TIME])
++ AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
++ [AC_TRY_COMPILE(
++ [
++#ifdef TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# ifdef HAVE_SYS_TIME_H
++# include <sys/time.h>
++# else
++# include <time.h>
++# endif
++#endif
++#ifdef HAVE_UTIME_H
++# include <utime.h>
++#endif
++ ],
++ [static struct utimbuf x; x.actime = x.modtime;],
++ fu_cv_sys_struct_utimbuf=yes,
++ fu_cv_sys_struct_utimbuf=no)
++ ])
++
++ if test $fu_cv_sys_struct_utimbuf = yes; then
++ AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
++ [Define if struct utimbuf is declared -- usually in <utime.h>.
++ Some systems have utime.h but don't declare the struct anywhere. ])
++ fi
++])
++
++# onceonly.m4 serial 3
++dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl This file defines some "once only" variants of standard autoconf macros.
++dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
++dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
++dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
++dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
++dnl The advantage is that the check for each of the headers/functions/decls
++dnl will be put only once into the 'configure' file. It keeps the size of
++dnl the 'configure' file down, and avoids redundant output when 'configure'
++dnl is run.
++dnl The drawback is that the checks cannot be conditionalized. If you write
++dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
++dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
++dnl empty, and the check will be inserted before the body of the AC_DEFUNed
++dnl function.
++
++dnl Autoconf version 2.57 or newer is recommended.
++AC_PREREQ(2.54)
++
++# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
++# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
++AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
++ :
++ AC_FOREACH([gl_HEADER_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
++ [-./], [___])), [
++ AC_CHECK_HEADERS(gl_HEADER_NAME)
++ ])
++ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
++ [-./], [___])))
++ ])
++])
++
++# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
++# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
++AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
++ :
++ AC_FOREACH([gl_FUNC_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
++ AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
++ ])
++])
++
++# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
++# AC_CHECK_DECLS(DECL1, DECL2, ...).
++AC_DEFUN([AC_CHECK_DECLS_ONCE], [
++ :
++ AC_FOREACH([gl_DECL_NAME], [$1], [
++ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
++ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
++ ])
++ AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
++ ])
++])
++
+ # backupfile.m4 serial 1
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+@@ -21,6 +1076,7 @@
+ AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
+ AC_CHECK_FUNCS(pathconf)
+ ])
++
+ #serial 5
+
+ dnl From Jim Meyering.
+@@ -63,31 +1119,7 @@
+ fi
+ ]
+ )
+-# dirname.m4 serial 1
+-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+-dnl This file is free software, distributed under the terms of the GNU
+-dnl General Public License. As a special exception to the GNU General
+-dnl Public License, this file may be distributed as part of a program
+-dnl that contains a configuration script generated by Autoconf, under
+-dnl the same distribution terms as the rest of that program.
+
+-AC_DEFUN([gl_DIRNAME],
+-[
+- dnl Prerequisites of lib/dirname.h.
+- AC_REQUIRE([jm_AC_DOS])
+-
+- dnl Prerequisites of lib/dirname.c.
+- AC_REQUIRE([AC_HEADER_STDC])
+- AC_CHECK_HEADERS_ONCE(string.h)
+-
+- dnl Prerequisites of lib/basename.c.
+- AC_REQUIRE([AC_HEADER_STDC])
+- AC_CHECK_HEADERS_ONCE(string.h)
+-
+- dnl Prerequisites of lib/stripslash.c.
+- AC_REQUIRE([AC_HEADER_STDC])
+- AC_CHECK_HEADERS_ONCE(string.h)
+-])
+ #serial 5
+
+ # Define some macros required for proper operation of code in lib/*.c
+@@ -141,6 +1173,33 @@
+ [Define if the backslash character may also serve as a file name
+ component separator.])
+ ])
++
++# dirname.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_DIRNAME],
++[
++ dnl Prerequisites of lib/dirname.h.
++ AC_REQUIRE([jm_AC_DOS])
++
++ dnl Prerequisites of lib/dirname.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++
++ dnl Prerequisites of lib/basename.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++
++ dnl Prerequisites of lib/stripslash.c.
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
++
+ #serial 7
+
+ AC_DEFUN([gl_ERROR],
+@@ -159,7 +1218,67 @@
+ AC_CHECK_DECLS([strerror])
+ AC_FUNC_STRERROR_R
+ ])
+-# getopt.m4 serial 1
++
++# memchr.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_MEMCHR],
++[
++ AC_REPLACE_FUNCS(memchr)
++ if test $ac_cv_func_memchr = no; then
++ jm_PREREQ_MEMCHR
++ fi
++])
++
++# Prerequisites of lib/memchr.c.
++AC_DEFUN([jm_PREREQ_MEMCHR], [
++ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
++ AC_CHECK_HEADERS(bp-sym.h)
++])
++
++# rmdir.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_FUNC_RMDIR],
++[
++ AC_REPLACE_FUNCS(rmdir)
++ if test $ac_cv_func_rmdir = no; then
++ gl_PREREQ_RMDIR
++ fi
++])
++
++# Prerequisites of lib/rmdir.c.
++AC_DEFUN([gl_PREREQ_RMDIR], [
++ AC_REQUIRE([AC_HEADER_STAT])
++ :
++])
++
++
++# getopt.m4 serial 1
++dnl Copyright (C) 2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++AC_DEFUN([gl_GETOPT],
++[
++ dnl Prerequisites of lib/getopt.c.
++ AC_CHECK_HEADERS_ONCE(string.h)
++])
++
++# xalloc.m4 serial 1
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License. As a special exception to the GNU General
+@@ -167,11 +1286,25 @@
+ dnl that contains a configuration script generated by Autoconf, under
+ dnl the same distribution terms as the rest of that program.
+
+-AC_DEFUN([gl_GETOPT],
++AC_DEFUN([gl_XALLOC],
+ [
+- dnl Prerequisites of lib/getopt.c.
++ gl_PREREQ_XMALLOC
++ gl_PREREQ_XSTRDUP
++])
++
++# Prerequisites of lib/xmalloc.c.
++AC_DEFUN([gl_PREREQ_XMALLOC], [
++ AC_REQUIRE([AC_HEADER_STDC])
++ AC_REQUIRE([jm_FUNC_MALLOC])
++ AC_REQUIRE([jm_FUNC_REALLOC])
++])
++
++# Prerequisites of lib/xstrdup.c.
++AC_DEFUN([gl_PREREQ_XSTRDUP], [
++ AC_REQUIRE([AC_HEADER_STDC])
+ AC_CHECK_HEADERS_ONCE(string.h)
+ ])
++
+ # malloc.m4 serial 7
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+@@ -197,66 +1330,8 @@
+ AC_DEFUN([gl_PREREQ_MALLOC], [
+ :
+ ])
+-# mbrtowc.m4 serial 5
+-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+-dnl This file is free software, distributed under the terms of the GNU
+-dnl General Public License. As a special exception to the GNU General
+-dnl Public License, this file may be distributed as part of a program
+-dnl that contains a configuration script generated by Autoconf, under
+-dnl the same distribution terms as the rest of that program.
+-
+-dnl From Paul Eggert
+-
+-dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
+-dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
+-
+-AC_DEFUN([jm_FUNC_MBRTOWC],
+-[
+- AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+- jm_cv_func_mbrtowc,
+- [AC_TRY_LINK(
+- [#include <wchar.h>],
+- [mbstate_t state; return ! (sizeof state && mbrtowc);],
+- jm_cv_func_mbrtowc=yes,
+- jm_cv_func_mbrtowc=no)])
+- if test $jm_cv_func_mbrtowc = yes; then
+- AC_DEFINE(HAVE_MBRTOWC, 1,
+- [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+- fi
+-])
+-# mbstate_t.m4 serial 9
+-dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+-dnl This file is free software, distributed under the terms of the GNU
+-dnl General Public License. As a special exception to the GNU General
+-dnl Public License, this file may be distributed as part of a program
+-dnl that contains a configuration script generated by Autoconf, under
+-dnl the same distribution terms as the rest of that program.
+-
+-# From Paul Eggert.
+-
+-# BeOS 5 has <wchar.h> but does not define mbstate_t,
+-# so you can't declare an object of that type.
+-# Check for this incompatibility with Standard C.
+
+-# AC_TYPE_MBSTATE_T
+-# -----------------
+-AC_DEFUN([AC_TYPE_MBSTATE_T],
+- [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
+- [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [AC_INCLUDES_DEFAULT
+-# include <wchar.h>],
+- [mbstate_t x; return sizeof x;])],
+- [ac_cv_type_mbstate_t=yes],
+- [ac_cv_type_mbstate_t=no])])
+- if test $ac_cv_type_mbstate_t = yes; then
+- AC_DEFINE([HAVE_MBSTATE_T], 1,
+- [Define to 1 if <wchar.h> declares mbstate_t.])
+- else
+- AC_DEFINE([mbstate_t], int,
+- [Define to a type if <wchar.h> does not define.])
+- fi])
+-# memchr.m4 serial 1
++# realloc.m4 serial 7
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License. As a special exception to the GNU General
+@@ -264,116 +1339,24 @@
+ dnl that contains a configuration script generated by Autoconf, under
+ dnl the same distribution terms as the rest of that program.
+
+-AC_DEFUN([gl_FUNC_MEMCHR],
++dnl From Jim Meyering.
++dnl Determine whether realloc works when both arguments are 0.
++dnl If it doesn't, arrange to use the replacement function.
++
++AC_DEFUN([jm_FUNC_REALLOC],
+ [
+- AC_REPLACE_FUNCS(memchr)
+- if test $ac_cv_func_memchr = no; then
+- jm_PREREQ_MEMCHR
++ AC_REQUIRE([AC_FUNC_REALLOC])
++ dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
++ if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
++ gl_PREREQ_REALLOC
+ fi
+ ])
+
+-# Prerequisites of lib/memchr.c.
+-AC_DEFUN([jm_PREREQ_MEMCHR], [
+- AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
+- AC_CHECK_HEADERS(bp-sym.h)
+-])
+-#serial 1
+-
+-dnl From Mumit Khan and Paul Eggert
+-dnl Determine whether mkdir accepts only one argument instead of the usual two.
+-
+-AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
+- [AC_CHECK_FUNCS(mkdir)
+- AC_CACHE_CHECK([whether mkdir takes only one argument],
+- patch_cv_mkdir_takes_one_arg,
+- [patch_cv_mkdir_takes_one_arg=no
+- if test $ac_cv_func_mkdir = yes; then
+- AC_TRY_COMPILE([
+-#include <sys/types.h>
+-#include <sys/stat.h>
+- ],
+- [mkdir (".", 0);],
+- ,
+- [AC_TRY_COMPILE([
+-#include <sys/types.h>
+-#include <sys/stat.h>
+- ],
+- [mkdir (".");],
+- patch_cv_mkdir_takes_one_arg=yes
+- )]
+- )
+- fi
+- ]
+- )
+- if test $patch_cv_mkdir_takes_one_arg = yes; then
+- AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
+- [Define if mkdir takes only one argument.])
+- fi
+- ]
+-)
+-# onceonly.m4 serial 3
+-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+-dnl This file is free software, distributed under the terms of the GNU
+-dnl General Public License. As a special exception to the GNU General
+-dnl Public License, this file may be distributed as part of a program
+-dnl that contains a configuration script generated by Autoconf, under
+-dnl the same distribution terms as the rest of that program.
+-
+-dnl This file defines some "once only" variants of standard autoconf macros.
+-dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
+-dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
+-dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
+-dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
+-dnl The advantage is that the check for each of the headers/functions/decls
+-dnl will be put only once into the 'configure' file. It keeps the size of
+-dnl the 'configure' file down, and avoids redundant output when 'configure'
+-dnl is run.
+-dnl The drawback is that the checks cannot be conditionalized. If you write
+-dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
+-dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
+-dnl empty, and the check will be inserted before the body of the AC_DEFUNed
+-dnl function.
+-
+-dnl Autoconf version 2.57 or newer is recommended.
+-AC_PREREQ(2.54)
+-
+-# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
+-# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
+-AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
+- :
+- AC_FOREACH([gl_HEADER_NAME], [$1], [
+- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
+- [-./], [___])), [
+- AC_CHECK_HEADERS(gl_HEADER_NAME)
+- ])
+- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
+- [-./], [___])))
+- ])
+-])
+-
+-# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
+-# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
+-AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
++# Prerequisites of lib/realloc.c.
++AC_DEFUN([gl_PREREQ_REALLOC], [
+ :
+- AC_FOREACH([gl_FUNC_NAME], [$1], [
+- AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
+- AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
+- ])
+- AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
+- ])
+ ])
+
+-# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
+-# AC_CHECK_DECLS(DECL1, DECL2, ...).
+-AC_DEFUN([AC_CHECK_DECLS_ONCE], [
+- :
+- AC_FOREACH([gl_DECL_NAME], [$1], [
+- AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
+- AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
+- ])
+- AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
+- ])
+-])
+ # quote.m4 serial 1
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+@@ -387,6 +1370,7 @@
+ dnl Prerequisites of lib/quote.c.
+ AC_CHECK_HEADERS_ONCE(stddef.h)
+ ])
++
+ # quotearg.m4 serial 1
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+@@ -403,32 +1387,69 @@
+ AC_TYPE_MBSTATE_T
+ jm_FUNC_MBRTOWC
+ ])
+-# realloc.m4 serial 7
+-dnl Copyright (C) 2002 Free Software Foundation, Inc.
++
++# mbstate_t.m4 serial 9
++dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License. As a special exception to the GNU General
+ dnl Public License, this file may be distributed as part of a program
+ dnl that contains a configuration script generated by Autoconf, under
+ dnl the same distribution terms as the rest of that program.
+
+-dnl From Jim Meyering.
+-dnl Determine whether realloc works when both arguments are 0.
+-dnl If it doesn't, arrange to use the replacement function.
++# From Paul Eggert.
+
+-AC_DEFUN([jm_FUNC_REALLOC],
++# BeOS 5 has <wchar.h> but does not define mbstate_t,
++# so you can't declare an object of that type.
++# Check for this incompatibility with Standard C.
++
++# AC_TYPE_MBSTATE_T
++# -----------------
++AC_DEFUN([AC_TYPE_MBSTATE_T],
++ [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [AC_INCLUDES_DEFAULT
++# include <wchar.h>],
++ [mbstate_t x; return sizeof x;])],
++ [ac_cv_type_mbstate_t=yes],
++ [ac_cv_type_mbstate_t=no])])
++ if test $ac_cv_type_mbstate_t = yes; then
++ AC_DEFINE([HAVE_MBSTATE_T], 1,
++ [Define to 1 if <wchar.h> declares mbstate_t.])
++ else
++ AC_DEFINE([mbstate_t], int,
++ [Define to a type if <wchar.h> does not define.])
++ fi])
++
++# mbrtowc.m4 serial 5
++dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
++dnl This file is free software, distributed under the terms of the GNU
++dnl General Public License. As a special exception to the GNU General
++dnl Public License, this file may be distributed as part of a program
++dnl that contains a configuration script generated by Autoconf, under
++dnl the same distribution terms as the rest of that program.
++
++dnl From Paul Eggert
++
++dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
++dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
++
++AC_DEFUN([jm_FUNC_MBRTOWC],
+ [
+- AC_REQUIRE([AC_FUNC_REALLOC])
+- dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
+- if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
+- gl_PREREQ_REALLOC
++ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
++ jm_cv_func_mbrtowc,
++ [AC_TRY_LINK(
++ [#include <wchar.h>],
++ [mbstate_t state; return ! (sizeof state && mbrtowc);],
++ jm_cv_func_mbrtowc=yes,
++ jm_cv_func_mbrtowc=no)])
++ if test $jm_cv_func_mbrtowc = yes; then
++ AC_DEFINE(HAVE_MBRTOWC, 1,
++ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+ ])
+
+-# Prerequisites of lib/realloc.c.
+-AC_DEFUN([gl_PREREQ_REALLOC], [
+- :
+-])
+-# rmdir.m4 serial 1
++# hash.m4 serial 1
+ dnl Copyright (C) 2002 Free Software Foundation, Inc.
+ dnl This file is free software, distributed under the terms of the GNU
+ dnl General Public License. As a special exception to the GNU General
+@@ -436,18 +1457,71 @@
+ dnl that contains a configuration script generated by Autoconf, under
+ dnl the same distribution terms as the rest of that program.
+
+-AC_DEFUN([gl_FUNC_RMDIR],
++AC_DEFUN([gl_HASH],
+ [
+- AC_REPLACE_FUNCS(rmdir)
+- if test $ac_cv_func_rmdir = no; then
+- gl_PREREQ_RMDIR
+- fi
++ dnl Prerequisites of lib/hash.c.
++ AC_CHECK_HEADERS_ONCE(stdlib.h)
++ AC_HEADER_STDBOOL
++ AC_CHECK_DECLS_ONCE(free malloc)
+ ])
+
+-# Prerequisites of lib/rmdir.c.
+-AC_DEFUN([gl_PREREQ_RMDIR], [
+- AC_REQUIRE([AC_HEADER_STAT])
+- :
++AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
++ [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
++ [ac_cv_stat_nsec],
++ [AC_TRY_COMPILE(
++ [
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++ ],
++ [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
++ [ac_cv_stat_nsec=yes],
++ [ac_cv_stat_nsec=no])
++ ])
++ if test $ac_cv_stat_nsec = yes; then
++ AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
++ fi
++
++ AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
++ [ac_cv_stat_timeval],
++ [AC_TRY_COMPILE(
++ [
++ #include <time.h>
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++ ],
++ [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
++ [ac_cv_stat_timeval=yes],
++ [ac_cv_stat_timeval=no])
++ ])
++ if test $ac_cv_stat_timeval = yes; then
++ AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
++ fi])
++
++#serial 7 -*- autoconf -*-
++
++dnl From Jim Meyering.
++dnl
++dnl See if the glibc *_unlocked I/O macros or functions are available.
++dnl Use only those *_unlocked macros or functions that are declared
++dnl (because some of them were declared in Solaris 2.5.1 but were removed
++dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
++dnl on Solaris 2.6).
++
++AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
++[
++ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
++ dnl etc.
++ AC_REQUIRE([AC_GNU_SOURCE])
++
++ AC_CHECK_DECLS_ONCE(
++ [clearerr_unlocked feof_unlocked ferror_unlocked
++ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
++ fread_unlocked fwrite_unlocked getc_unlocked
++ getchar_unlocked putc_unlocked putchar_unlocked])
+ ])
+
+ # Check for setmode, DOS style.
+@@ -488,180 +1562,39 @@
+ AC_DEFINE(HAVE_SETMODE_DOS, 1,
+ [Define to 1 if you have the DOS-style `setmode' function.])
+ fi])
+-# Check for stdbool.h that conforms to C99.
+-
+-# Copyright (C) 2002-2003 Free Software Foundation, Inc.
+-
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2, or (at your option)
+-# any later version.
+-
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-# 02111-1307, USA.
+-
+-# Prepare for substituting <stdbool.h> if it is not supported.
+-
+-AC_DEFUN([AM_STDBOOL_H],
+-[
+- AC_REQUIRE([AC_HEADER_STDBOOL])
+-
+- # Define two additional variables used in the Makefile substitution.
+-
+- if test "$ac_cv_header_stdbool_h" = yes; then
+- STDBOOL_H=''
+- else
+- STDBOOL_H='stdbool.h'
+- fi
+- AC_SUBST([STDBOOL_H])
+-
+- if test "$ac_cv_type__Bool" = yes; then
+- HAVE__BOOL=1
+- else
+- HAVE__BOOL=0
+- fi
+- AC_SUBST([HAVE__BOOL])
+-])
+-
+-# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
+-# have this macro built-in.
+-
+-AC_DEFUN([AC_HEADER_STDBOOL],
+- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+- [ac_cv_header_stdbool_h],
+- [AC_TRY_COMPILE(
+- [
+- #include <stdbool.h>
+- #ifndef bool
+- "error: bool is not defined"
+- #endif
+- #ifndef false
+- "error: false is not defined"
+- #endif
+- #if false
+- "error: false is not 0"
+- #endif
+- #ifndef true
+- "error: false is not defined"
+- #endif
+- #if true != 1
+- "error: true is not 1"
+- #endif
+- #ifndef __bool_true_false_are_defined
+- "error: __bool_true_false_are_defined is not defined"
+- #endif
+-
+- struct s { _Bool s: 1; _Bool t; } s;
+-
+- char a[true == 1 ? 1 : -1];
+- char b[false == 0 ? 1 : -1];
+- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+- char d[(bool) -0.5 == true ? 1 : -1];
+- bool e = &s;
+- char f[(_Bool) -0.0 == false ? 1 : -1];
+- char g[true];
+- char h[sizeof (_Bool)];
+- char i[sizeof s.t];
+- ],
+- [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
+- [ac_cv_header_stdbool_h=yes],
+- [ac_cv_header_stdbool_h=no])])
+- AC_CHECK_TYPES([_Bool])
+- if test $ac_cv_header_stdbool_h = yes; then
+- AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
+- fi])
+-#serial 7 -*- autoconf -*-
+-
+-dnl From Jim Meyering.
+-dnl
+-dnl See if the glibc *_unlocked I/O macros or functions are available.
+-dnl Use only those *_unlocked macros or functions that are declared
+-dnl (because some of them were declared in Solaris 2.5.1 but were removed
+-dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
+-dnl on Solaris 2.6).
+-
+-AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
+-[
+- dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
+- dnl etc.
+- AC_REQUIRE([AC_GNU_SOURCE])
+-
+- AC_CHECK_DECLS_ONCE(
+- [clearerr_unlocked feof_unlocked ferror_unlocked
+- fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
+- fread_unlocked fwrite_unlocked getc_unlocked
+- getchar_unlocked putc_unlocked putchar_unlocked])
+-])
+-#serial 5
+-
+-dnl From Jim Meyering
+-
+-dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
+-dnl usually in <utime.h>.
+-dnl Some systems have utime.h but don't declare the struct anywhere.
+-
+-AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
+-[
+- AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
+- AC_REQUIRE([AC_HEADER_TIME])
+- AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
+- [AC_TRY_COMPILE(
+- [
+-#ifdef TIME_WITH_SYS_TIME
+-# include <sys/time.h>
+-# include <time.h>
+-#else
+-# ifdef HAVE_SYS_TIME_H
+-# include <sys/time.h>
+-# else
+-# include <time.h>
+-# endif
+-#endif
+-#ifdef HAVE_UTIME_H
+-# include <utime.h>
+-#endif
+- ],
+- [static struct utimbuf x; x.actime = x.modtime;],
+- fu_cv_sys_struct_utimbuf=yes,
+- fu_cv_sys_struct_utimbuf=no)
+- ])
+
+- if test $fu_cv_sys_struct_utimbuf = yes; then
+- AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
+- [Define if struct utimbuf is declared -- usually in <utime.h>.
+- Some systems have utime.h but don't declare the struct anywhere. ])
+- fi
+-])
+-# xalloc.m4 serial 1
+-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+-dnl This file is free software, distributed under the terms of the GNU
+-dnl General Public License. As a special exception to the GNU General
+-dnl Public License, this file may be distributed as part of a program
+-dnl that contains a configuration script generated by Autoconf, under
+-dnl the same distribution terms as the rest of that program.
++#serial 1
+
+-AC_DEFUN([gl_XALLOC],
+-[
+- gl_PREREQ_XMALLOC
+- gl_PREREQ_XSTRDUP
+-])
++dnl From Mumit Khan and Paul Eggert
++dnl Determine whether mkdir accepts only one argument instead of the usual two.
+
+-# Prerequisites of lib/xmalloc.c.
+-AC_DEFUN([gl_PREREQ_XMALLOC], [
+- AC_REQUIRE([AC_HEADER_STDC])
+- AC_REQUIRE([jm_FUNC_MALLOC])
+- AC_REQUIRE([jm_FUNC_REALLOC])
+-])
++AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
++ [AC_CHECK_FUNCS(mkdir)
++ AC_CACHE_CHECK([whether mkdir takes only one argument],
++ patch_cv_mkdir_takes_one_arg,
++ [patch_cv_mkdir_takes_one_arg=no
++ if test $ac_cv_func_mkdir = yes; then
++ AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
++ ],
++ [mkdir (".", 0);],
++ ,
++ [AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/stat.h>
++ ],
++ [mkdir (".");],
++ patch_cv_mkdir_takes_one_arg=yes
++ )]
++ )
++ fi
++ ]
++ )
++ if test $patch_cv_mkdir_takes_one_arg = yes; then
++ AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
++ [Define if mkdir takes only one argument.])
++ fi
++ ]
++)
+
+-# Prerequisites of lib/xstrdup.c.
+-AC_DEFUN([gl_PREREQ_XSTRDUP], [
+- AC_REQUIRE([AC_HEADER_STDC])
+- AC_CHECK_HEADERS_ONCE(string.h)
+-])
+--- patch-2.5.9.orig/configure
++++ patch-2.5.9/configure
+@@ -1,11 +1,10 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.57 for patch 2.5.9.
++# Generated by GNU Autoconf 2.59 for patch 2.5.9.
+ #
+ # Report bugs to <bug-patch@gnu.org>.
+ #
+-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+-# Free Software Foundation, Inc.
++# Copyright (C) 2003 Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ ## --------------------- ##
+@@ -22,9 +21,10 @@
+ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+ fi
++DUALCASE=1; export DUALCASE # for MKS sh
+
+ # Support unset when possible.
+-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+ else
+ as_unset=false
+@@ -43,7 +43,7 @@
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+ do
+- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+@@ -220,16 +220,17 @@
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+ else
++ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+ fi
+
+ as_executable_p="test -f"
+
+ # Sed expression to map a string onto a valid CPP name.
+-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+ # Sed expression to map a string onto a valid variable name.
+-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+ # IFS
+@@ -669,7 +670,7 @@
+
+ # Be sure to have absolute paths.
+ for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+- localstatedir libdir includedir oldincludedir infodir mandir
++ localstatedir libdir includedir oldincludedir infodir mandir
+ do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+@@ -709,10 +710,10 @@
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+ $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$0" : 'X\(//\)[^/]' \| \
+- X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(//\)[^/]' \| \
++ X"$0" : 'X\(//\)$' \| \
++ X"$0" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
+ echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+@@ -804,9 +805,9 @@
+ cat <<_ACEOF
+ Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+- [$ac_default_prefix]
++ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+- [PREFIX]
++ [PREFIX]
+
+ By default, \`make install' will install all the files in
+ \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+@@ -896,12 +897,45 @@
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ esac
+-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+-# absolute.
+-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
++
++# Do not use `cd foo && pwd` to compute absolute paths, because
++# the directories may not exist.
++case `pwd` in
++.) ac_abs_builddir="$ac_dir";;
++*)
++ case "$ac_dir" in
++ .) ac_abs_builddir=`pwd`;;
++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
++ *) ac_abs_builddir=`pwd`/"$ac_dir";;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_builddir=${ac_top_builddir}.;;
++*)
++ case ${ac_top_builddir}. in
++ .) ac_abs_top_builddir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_srcdir=$ac_srcdir;;
++*)
++ case $ac_srcdir in
++ .) ac_abs_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_srcdir=$ac_top_srcdir;;
++*)
++ case $ac_top_srcdir in
++ .) ac_abs_top_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
++ esac;;
++esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+@@ -912,13 +946,13 @@
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+- test -f $ac_srcdir/configure.in; then
++ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+- cd $ac_popdir
++ cd "$ac_popdir"
+ done
+ fi
+
+@@ -926,10 +960,9 @@
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ patch configure 2.5.9
+-generated by GNU Autoconf 2.57
++generated by GNU Autoconf 2.59
+
+-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+-Free Software Foundation, Inc.
++Copyright (C) 2003 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -941,7 +974,7 @@
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by patch $as_me 2.5.9, which was
+-generated by GNU Autoconf 2.57. Invocation command line was
++generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+@@ -1018,19 +1051,19 @@
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+- ac_must_keep_next=false # Got value, back to normal.
++ ac_must_keep_next=false # Got value, back to normal.
+ else
+- case $ac_arg in
+- *=* | --config-cache | -C | -disable-* | --disable-* \
+- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+- | -with-* | --with-* | -without-* | --without-* | --x)
+- case "$ac_configure_args0 " in
+- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+- esac
+- ;;
+- -* ) ac_must_keep_next=true ;;
+- esac
++ case $ac_arg in
++ *=* | --config-cache | -C | -disable-* | --disable-* \
++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
++ | -with-* | --with-* | -without-* | --without-* | --x)
++ case "$ac_configure_args0 " in
++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
++ esac
++ ;;
++ -* ) ac_must_keep_next=true ;;
++ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+@@ -1064,12 +1097,12 @@
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
++ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+ }
+@@ -1098,7 +1131,7 @@
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+- echo "$ac_var='"'"'$ac_val'"'"'"
++ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+@@ -1117,7 +1150,7 @@
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+- rm -f core core.* *.core &&
++ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+@@ -1197,7 +1230,7 @@
+ # value.
+ ac_cache_corrupted=false
+ for ac_var in `(set) 2>&1 |
+- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+@@ -1214,13 +1247,13 @@
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
++ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
++ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ echo "$as_me: former value: $ac_old_val" >&2;}
+- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
++ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ echo "$as_me: current value: $ac_new_val" >&2;}
+- ac_cache_corrupted=:
++ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+@@ -1629,7 +1662,6 @@
+ (exit $ac_status); }
+
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -1649,8 +1681,8 @@
+ # Try to create an executable without -o first, disregard a.out.
+ # It will help us diagnose broken compilers, and finding out an intuition
+ # of exeext.
+-echo "$as_me:$LINENO: checking for C compiler default output" >&5
+-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+@@ -1670,23 +1702,23 @@
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+- ;;
++ ;;
+ conftest.$ac_ext )
+- # This is the source file.
+- ;;
++ # This is the source file.
++ ;;
+ [ab].out )
+- # We found the default executable, but exeext='' is most
+- # certainly right.
+- break;;
++ # We found the default executable, but exeext='' is most
++ # certainly right.
++ break;;
+ *.* )
+- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- # FIXME: I believe we export ac_cv_exeext for Libtool,
+- # but it would be cool to find out if it's true. Does anybody
+- # maintain Libtool? --akim.
+- export ac_cv_exeext
+- break;;
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ # FIXME: I believe we export ac_cv_exeext for Libtool,
++ # but it would be cool to find out if it's true. Does anybody
++ # maintain Libtool? --akim.
++ export ac_cv_exeext
++ break;;
+ * )
+- break;;
++ break;;
+ esac
+ done
+ else
+@@ -1760,8 +1792,8 @@
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- export ac_cv_exeext
+- break;;
++ export ac_cv_exeext
++ break;;
+ * ) break;;
+ esac
+ done
+@@ -1786,7 +1818,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -1837,7 +1868,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -1857,11 +1887,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -1874,7 +1913,7 @@
+
+ ac_compiler_gnu=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+ fi
+@@ -1890,7 +1929,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -1907,11 +1945,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -1924,7 +1971,7 @@
+
+ ac_cv_prog_cc_g=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+ echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+@@ -1951,7 +1998,6 @@
+ ac_cv_prog_cc_stdc=no
+ ac_save_CC=$CC
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -1979,6 +2025,16 @@
+ va_end (v);
+ return s;
+ }
++
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
++ function prototypes and stuff, but not '\xHH' hex character constants.
++ These don't provoke an error unfortunately, instead are silently treated
++ as 'x'. The following induces an error, until -std1 is added to get
++ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
++ array size at least. It's necessary to write '\x00'==0 to get something
++ that's true only with -std1. */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
++
+ int test (int i, double x);
+ struct s1 {int (*f) (int a);};
+ struct s2 {int (*f) (double a);};
+@@ -2005,11 +2061,20 @@
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2022,7 +2087,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext
++rm -f conftest.err conftest.$ac_objext
+ done
+ rm -f conftest.$ac_ext conftest.$ac_objext
+ CC=$ac_save_CC
+@@ -2050,19 +2115,27 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+- ''\
+- '#include <stdlib.h>' \
++ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+@@ -2070,14 +2143,13 @@
+ 'void exit (int);'
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <stdlib.h>
+ $ac_declaration
++#include <stdlib.h>
+ int
+ main ()
+ {
+@@ -2088,11 +2160,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2105,9 +2186,8 @@
+
+ continue
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2124,11 +2204,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2140,7 +2229,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ rm -f conftest*
+ if test -n "$ac_declaration"; then
+@@ -2154,7 +2243,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -2189,7 +2278,6 @@
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2200,7 +2288,7 @@
+ #else
+ # include <assert.h>
+ #endif
+- Syntax error
++ Syntax error
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+@@ -2212,6 +2300,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -2232,7 +2321,6 @@
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2250,6 +2338,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -2296,7 +2385,6 @@
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2307,7 +2395,7 @@
+ #else
+ # include <assert.h>
+ #endif
+- Syntax error
++ Syntax error
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+@@ -2319,6 +2407,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -2339,7 +2428,6 @@
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2357,6 +2445,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -2431,6 +2520,7 @@
+ # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+ # AFS /usr/afsws/bin/install, which mishandles nonexistent args
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# OS/2's system install, which has a completely different semantic
+ # ./install, which can be erroneously created by make from ./install.sh.
+ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+ echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+@@ -2447,6 +2537,7 @@
+ case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+@@ -2454,20 +2545,20 @@
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+- if test $ac_prog = install &&
+- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+- # AIX install. It has an incompatible calling convention.
+- :
+- elif test $ac_prog = install &&
+- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+- # program-specific install script used by HP pwplus--don't use.
+- :
+- else
+- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+- break 3
+- fi
+- fi
++ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if test $ac_prog = install &&
++ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # AIX install. It has an incompatible calling convention.
++ :
++ elif test $ac_prog = install &&
++ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++ # program-specific install script used by HP pwplus--don't use.
++ :
++ else
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
++ fi
+ done
+ done
+ ;;
+@@ -2499,7 +2590,7 @@
+
+ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+ echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+ if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2596,7 +2687,6 @@
+ echo "$as_me:$LINENO: checking for AIX" >&5
+ echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2628,7 +2718,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2649,11 +2738,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2666,12 +2764,11 @@
+
+ ac_cv_header_stdc=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2693,7 +2790,6 @@
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2718,7 +2814,6 @@
+ :
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2730,9 +2825,9 @@
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+ #else
+ # define ISLOWER(c) \
+- (('a' <= (c) && (c) <= 'i') \
+- || ('j' <= (c) && (c) <= 'r') \
+- || ('s' <= (c) && (c) <= 'z'))
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
+ # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+ #endif
+
+@@ -2743,7 +2838,7 @@
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+- || toupper (i) != TOUPPER (i))
++ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+ }
+@@ -2768,7 +2863,7 @@
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ fi
+@@ -2793,7 +2888,7 @@
+
+
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+- inttypes.h stdint.h unistd.h
++ inttypes.h stdint.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+@@ -2802,7 +2897,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2814,11 +2908,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2831,7 +2934,7 @@
+
+ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -2858,7 +2961,6 @@
+ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+ echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2869,11 +2971,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2886,7 +2997,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -2894,7 +3005,6 @@
+ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+ echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2912,6 +3022,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -2931,33 +3042,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -3000,15 +3110,15 @@
+ fi
+
+
+-echo "$as_me:$LINENO: checking for library containing strerror" >&5
+-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+-if test "${ac_cv_search_strerror+set}" = set; then
++
++ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
++echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
++if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_strerror=no
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcposix $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3032,79 +3142,43 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_strerror="none required"
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_strerror" = no; then
+- for ac_lib in cposix; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char strerror ();
+-int
+-main ()
+-{
+-strerror ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_search_strerror="-l$ac_lib"
+-break
++ ac_cv_lib_cposix_strerror=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++ac_cv_lib_cposix_strerror=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+- done
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
+-LIBS=$ac_func_search_save_LIBS
++echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
++echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
++if test $ac_cv_lib_cposix_strerror = yes; then
++ LIBS="$LIBS -lcposix"
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+-echo "${ECHO_T}$ac_cv_search_strerror" >&6
+-if test "$ac_cv_search_strerror" != no; then
+- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+-fi
++
+
+ # Check whether --enable-largefile or --disable-largefile was given.
+ if test "${enable_largefile+set}" = set; then
+@@ -3124,8 +3198,7 @@
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+- cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3150,11 +3223,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3166,15 +3248,24 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext
++rm -f conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3186,8 +3277,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext
+- break
++rm -f conftest.err conftest.$ac_objext
++ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+@@ -3207,7 +3298,6 @@
+ while :; do
+ ac_cv_sys_file_offset_bits=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3232,11 +3322,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3248,9 +3347,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3276,11 +3374,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3292,7 +3399,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ break
+ done
+ fi
+@@ -3314,7 +3421,6 @@
+ while :; do
+ ac_cv_sys_large_files=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3339,11 +3445,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3355,9 +3470,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3383,11 +3497,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3399,7 +3522,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ break
+ done
+ fi
+@@ -3443,7 +3566,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3506,11 +3628,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3523,7 +3654,7 @@
+
+ ac_cv_c_const=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+ echo "${ECHO_T}$ac_cv_c_const" >&6
+@@ -3550,7 +3681,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3570,11 +3700,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3587,7 +3726,7 @@
+
+ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -3610,7 +3749,6 @@
+ ac_func_search_save_LIBS=$LIBS
+ ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3634,11 +3772,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3650,12 +3797,12 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3679,11 +3826,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3696,7 +3852,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ done
+ fi
+ LIBS=$ac_func_search_save_LIBS
+@@ -3717,7 +3874,6 @@
+ ac_func_search_save_LIBS=$LIBS
+ ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3741,11 +3897,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3757,12 +3922,12 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3786,11 +3951,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3803,7 +3977,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ done
+ fi
+ LIBS=$ac_func_search_save_LIBS
+@@ -3823,7 +3998,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3844,11 +4018,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3861,12 +4044,11 @@
+
+ ac_cv_header_stdc=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3888,7 +4070,6 @@
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3913,7 +4094,6 @@
+ :
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -3925,9 +4105,9 @@
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+ #else
+ # define ISLOWER(c) \
+- (('a' <= (c) && (c) <= 'i') \
+- || ('j' <= (c) && (c) <= 'r') \
+- || ('s' <= (c) && (c) <= 'z'))
++ (('a' <= (c) && (c) <= 'i') \
++ || ('j' <= (c) && (c) <= 'r') \
++ || ('s' <= (c) && (c) <= 'z'))
+ # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+ #endif
+
+@@ -3938,7 +4118,7 @@
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+- || toupper (i) != TOUPPER (i))
++ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+ }
+@@ -3963,7 +4143,7 @@
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ fi
+@@ -3999,7 +4179,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4010,11 +4189,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4027,7 +4215,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -4035,7 +4223,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4053,6 +4240,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -4072,33 +4260,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
+- ;;
+- no:yes )
+- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -4109,7 +4296,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -4131,7 +4318,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4151,11 +4337,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4168,7 +4363,7 @@
+
+ ac_cv_type_mode_t=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
+ echo "${ECHO_T}$ac_cv_type_mode_t" >&6
+@@ -4188,7 +4383,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4208,11 +4402,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4225,7 +4428,7 @@
+
+ ac_cv_type_off_t=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+ echo "${ECHO_T}$ac_cv_type_off_t" >&6
+@@ -4245,7 +4448,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4265,11 +4467,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4282,7 +4493,7 @@
+
+ ac_cv_type_pid_t=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+ echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+@@ -4302,7 +4513,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4329,11 +4539,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4346,7 +4565,7 @@
+
+ ac_cv_type_signal=int
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+ echo "${ECHO_T}$ac_cv_type_signal" >&6
+@@ -4362,7 +4581,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4382,11 +4600,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4399,7 +4626,7 @@
+
+ ac_cv_type_size_t=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+ echo "${ECHO_T}$ac_cv_type_size_t" >&6
+@@ -4419,7 +4646,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4468,11 +4694,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4485,7 +4720,7 @@
+
+ ac_cv_header_stdbool_h=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+ echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
+@@ -4495,7 +4730,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4515,11 +4749,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4532,7 +4775,7 @@
+
+ ac_cv_type__Bool=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+ echo "${ECHO_T}$ac_cv_type__Bool" >&6
+@@ -4589,7 +4832,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4600,11 +4842,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4617,7 +4868,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -4625,7 +4876,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4643,6 +4893,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -4662,33 +4913,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -4699,7 +4949,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -4733,7 +4983,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4744,11 +4993,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4761,7 +5019,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -4769,7 +5027,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4787,6 +5044,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -4806,33 +5064,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -4843,7 +5100,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -4865,7 +5122,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4886,11 +5142,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4903,7 +5168,7 @@
+
+ ac_cv_header_time=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+ echo "${ECHO_T}$ac_cv_header_time" >&6
+@@ -4933,7 +5198,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4964,11 +5228,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4981,7 +5254,7 @@
+
+ fu_cv_sys_struct_utimbuf=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ fi
+ echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
+@@ -5005,7 +5278,6 @@
+ ac_cv_func_closedir_void=yes
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5045,7 +5317,7 @@
+ ( exit $ac_status )
+ ac_cv_func_closedir_void=yes
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
+@@ -5076,7 +5348,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5087,11 +5358,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5104,7 +5384,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -5112,7 +5392,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5130,6 +5409,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -5149,33 +5429,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -5186,7 +5465,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -5220,7 +5499,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5231,11 +5509,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5248,7 +5535,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -5256,7 +5543,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5274,6 +5560,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -5293,33 +5580,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -5330,7 +5616,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -5364,7 +5650,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5375,11 +5660,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5392,7 +5686,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -5400,7 +5694,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5418,6 +5711,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -5437,33 +5731,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -5474,7 +5767,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -5497,7 +5790,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5517,11 +5809,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5534,7 +5835,7 @@
+
+ ac_cv_have_decl_getenv=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+@@ -5562,7 +5863,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5582,11 +5882,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5599,7 +5908,7 @@
+
+ ac_cv_have_decl_malloc=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
+@@ -5628,7 +5937,6 @@
+ else
+
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5647,11 +5955,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5664,7 +5981,7 @@
+
+ ac_cv_win_or_dos=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
+@@ -5714,7 +6031,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5725,11 +6041,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5742,7 +6067,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -5750,7 +6075,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5768,6 +6092,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -5787,33 +6112,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -5824,7 +6148,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -5872,7 +6196,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5905,11 +6228,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5922,7 +6254,8 @@
+
+ jm_cv_struct_dirent_d_ino=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+
+
+ fi
+@@ -6011,21 +6344,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6056,11 +6396,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6073,7 +6422,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -6126,21 +6476,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6171,11 +6528,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6188,7 +6554,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -6203,21 +6570,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define _doprnt innocuous__doprnt
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef _doprnt
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6248,11 +6622,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6265,7 +6648,8 @@
+
+ ac_cv_func__doprnt=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+ echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+@@ -6288,13 +6672,12 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-
++$ac_includes_default
+ int
+ main ()
+ {
+@@ -6305,11 +6688,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6322,12 +6714,20 @@
+
+ ac_cv_lib_error_at_line=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+ echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
+ if test $ac_cv_lib_error_at_line = no; then
+- LIBOBJS="$LIBOBJS error.$ac_objext"
++ case $LIBOBJS in
++ "error.$ac_objext" | \
++ *" error.$ac_objext" | \
++ "error.$ac_objext "* | \
++ *" error.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS error.$ac_objext" ;;
++esac
++
+ fi
+
+
+@@ -6343,21 +6743,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6388,11 +6795,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6405,7 +6821,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -6423,7 +6840,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6443,11 +6859,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6460,7 +6885,7 @@
+
+ ac_cv_have_decl_strerror=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
+@@ -6486,7 +6911,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6506,11 +6930,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6523,7 +6956,7 @@
+
+ ac_cv_have_decl_strerror_r=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
+@@ -6553,21 +6986,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6598,11 +7038,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6615,7 +7064,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -6636,7 +7086,6 @@
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6657,11 +7106,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6673,7 +7131,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+@@ -6685,7 +7143,6 @@
+ :
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6721,7 +7178,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+
+@@ -6749,21 +7206,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -6794,11 +7258,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6811,7 +7284,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -6821,7 +7295,14 @@
+ _ACEOF
+
+ else
+- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
++ case $LIBOBJS in
++ "$ac_func.$ac_objext" | \
++ *" $ac_func.$ac_objext" | \
++ "$ac_func.$ac_objext "* | \
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
++esac
++
+ fi
+ done
+
+@@ -6855,7 +7336,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6866,11 +7346,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6883,7 +7372,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -6891,7 +7380,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6909,6 +7397,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -6928,33 +7417,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -6965,7 +7453,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -6989,7 +7477,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7053,21 +7540,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -7098,11 +7592,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7115,7 +7618,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -7125,7 +7629,14 @@
+ _ACEOF
+
+ else
+- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
++ case $LIBOBJS in
++ "$ac_func.$ac_objext" | \
++ *" $ac_func.$ac_objext" | \
++ "$ac_func.$ac_objext "* | \
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
++esac
++
+ fi
+ done
+
+@@ -7163,7 +7674,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7174,11 +7684,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7191,7 +7710,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -7199,7 +7718,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7217,6 +7735,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -7236,33 +7755,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -7273,7 +7791,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -7297,7 +7815,6 @@
+ ac_cv_func_malloc_0_nonnull=no
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7337,7 +7854,7 @@
+ ( exit $ac_status )
+ ac_cv_func_malloc_0_nonnull=no
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+@@ -7353,7 +7870,14 @@
+ #define HAVE_MALLOC 0
+ _ACEOF
+
+- LIBOBJS="$LIBOBJS malloc.$ac_objext"
++ case $LIBOBJS in
++ "malloc.$ac_objext" | \
++ *" malloc.$ac_objext" | \
++ "malloc.$ac_objext "* | \
++ *" malloc.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
++esac
++
+
+ cat >>confdefs.h <<\_ACEOF
+ #define malloc rpl_malloc
+@@ -7388,7 +7912,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7399,11 +7922,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7416,7 +7948,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -7424,7 +7956,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7442,6 +7973,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -7461,33 +7993,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -7498,7 +8029,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -7522,7 +8053,6 @@
+ ac_cv_func_realloc_0_nonnull=no
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7562,7 +8092,7 @@
+ ( exit $ac_status )
+ ac_cv_func_realloc_0_nonnull=no
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
+@@ -7578,7 +8108,14 @@
+ #define HAVE_REALLOC 0
+ _ACEOF
+
+- LIBOBJS="$LIBOBJS realloc.$ac_objext"
++ case $LIBOBJS in
++ "realloc.$ac_objext" | \
++ *" realloc.$ac_objext" | \
++ "realloc.$ac_objext "* | \
++ *" realloc.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
++esac
++
+
+ cat >>confdefs.h <<\_ACEOF
+ #define realloc rpl_realloc
+@@ -7619,7 +8156,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7630,11 +8166,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7647,7 +8192,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -7655,7 +8200,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7673,6 +8217,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -7692,33 +8237,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -7729,7 +8273,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -7772,7 +8316,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7783,11 +8326,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7800,7 +8352,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -7808,7 +8360,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7826,6 +8377,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -7845,33 +8397,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -7882,7 +8433,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -7916,7 +8467,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7927,11 +8477,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7944,7 +8503,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -7952,7 +8511,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7970,6 +8528,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -7989,33 +8548,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -8026,7 +8584,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -8053,21 +8611,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -8098,11 +8663,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8115,7 +8689,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -8139,21 +8714,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -8184,11 +8766,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8201,7 +8792,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -8241,7 +8833,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8259,11 +8850,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8276,7 +8876,7 @@
+
+ ac_cv_type_mbstate_t=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+ echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
+@@ -8300,7 +8900,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8317,11 +8916,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8334,7 +8942,8 @@
+
+ jm_cv_func_mbrtowc=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
+ echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
+@@ -8348,69 +8957,465 @@
+
+
+
+-
+-
+-
+-
+-for ac_func in pathconf
+-do
+-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo "$as_me:$LINENO: checking whether free is declared" >&5
++echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
++if test "${ac_cv_have_decl_free+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-/* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char $ac_func (); below.
+- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+- <limits.h> exists even on freestanding compilers. */
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char $ac_func ();
+-/* The GNU C library defines this for functions which it implements
+- to always fail with ENOSYS. Some functions are actually named
+- something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+-choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
++$ac_includes_default
+ int
+ main ()
+ {
+-return f != $ac_func;
++#ifndef free
++ char *p = (char *) free;
++#endif
++
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_have_decl_free=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_have_decl_free=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
++echo "${ECHO_T}$ac_cv_have_decl_free" >&6
++if test $ac_cv_have_decl_free = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREE 1
++_ACEOF
++
++
++else
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_FREE 0
++_ACEOF
++
++
++fi
++
++
++
++
++
++ :
++
++
++
++
++
++ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
++echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
++if test "${ac_cv_header_stdbool_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++ #include <stdbool.h>
++ #ifndef bool
++ "error: bool is not defined"
++ #endif
++ #ifndef false
++ "error: false is not defined"
++ #endif
++ #if false
++ "error: false is not 0"
++ #endif
++ #ifndef true
++ "error: false is not defined"
++ #endif
++ #if true != 1
++ "error: true is not 1"
++ #endif
++ #ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++ #endif
++
++ struct s { _Bool s: 1; _Bool t; } s;
++
++ char a[true == 1 ? 1 : -1];
++ char b[false == 0 ? 1 : -1];
++ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++ char d[(bool) -0.5 == true ? 1 : -1];
++ bool e = &s;
++ char f[(_Bool) -0.0 == false ? 1 : -1];
++ char g[true];
++ char h[sizeof (_Bool)];
++ char i[sizeof s.t];
++
++int
++main ()
++{
++ return !a + !b + !c + !d + !e + !f + !g + !h + !i;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_header_stdbool_h=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_header_stdbool_h=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
++echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
++ echo "$as_me:$LINENO: checking for _Bool" >&5
++echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
++if test "${ac_cv_type__Bool+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++int
++main ()
++{
++if ((_Bool *) 0)
++ return 0;
++if (sizeof (_Bool))
++ return 0;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_type__Bool=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_type__Bool=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
++echo "${ECHO_T}$ac_cv_type__Bool" >&6
++if test $ac_cv_type__Bool = yes; then
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE__BOOL 1
++_ACEOF
++
++
++fi
++
++ if test $ac_cv_header_stdbool_h = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_STDBOOL_H 1
++_ACEOF
++
++ fi
++
++ :
++
++
++
++
++
++
++
++
++
++
++echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
++echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
++if test "${ac_cv_stat_nsec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++
++int
++main ()
++{
++ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_stat_nsec=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_stat_nsec=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_stat_nsec" >&5
++echo "${ECHO_T}$ac_cv_stat_nsec" >&6
++ if test $ac_cv_stat_nsec = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_STAT_NSEC 1
++_ACEOF
++
++ fi
++
++ echo "$as_me:$LINENO: checking for nanosecond timestamps in struct stat" >&5
++echo $ECHO_N "checking for nanosecond timestamps in struct stat... $ECHO_C" >&6
++if test "${ac_cv_stat_timeval+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++ #include <time.h>
++ #include <sys/types.h>
++ #include <sys/stat.h>
++ #include <unistd.h>
++ struct stat st;
++
++int
++main ()
++{
++ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_stat_timeval=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_stat_timeval=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_stat_timeval" >&5
++echo "${ECHO_T}$ac_cv_stat_timeval" >&6
++ if test $ac_cv_stat_timeval = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_STAT_TIMEVAL 1
++_ACEOF
++
++ fi
++
++
++
++
++
++for ac_func in pathconf
++do
++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
++echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
++if eval "test \"\${$as_ac_var+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef $ac_func
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++char (*f) () = $ac_func;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != $ac_func;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8423,7 +9428,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -8454,7 +9460,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8465,11 +9470,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8482,7 +9496,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -8490,7 +9504,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8508,6 +9521,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -8527,33 +9541,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -8564,7 +9577,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -8587,7 +9600,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8607,11 +9619,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8624,7 +9645,7 @@
+
+ ac_cv_have_decl_free=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_free" >&6
+@@ -8648,7 +9669,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8668,11 +9688,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8685,7 +9714,7 @@
+
+ ac_cv_have_decl_getenv=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+@@ -8709,7 +9738,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8729,11 +9757,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8746,7 +9783,7 @@
+
+ ac_cv_have_decl_malloc=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
+@@ -8770,7 +9807,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8790,11 +9826,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8807,7 +9852,7 @@
+
+ ac_cv_have_decl_mktemp=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
+@@ -8849,21 +9894,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -8894,11 +9946,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8911,7 +9972,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -8934,21 +9996,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -8979,11 +10048,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8996,7 +10074,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -9006,7 +10085,14 @@
+ _ACEOF
+
+ else
+- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
++ case $LIBOBJS in
++ "$ac_func.$ac_objext" | \
++ *" $ac_func.$ac_objext" | \
++ "$ac_func.$ac_objext "* | \
++ *" $ac_func.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
++esac
++
+ fi
+ done
+
+@@ -9019,7 +10105,6 @@
+ while :; do
+ ac_cv_sys_largefile_source=no
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9036,11 +10121,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9052,9 +10146,8 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9072,11 +10165,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9088,7 +10190,7 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ break
+ done
+ fi
+@@ -9112,7 +10214,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9129,11 +10230,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9146,7 +10256,8 @@
+
+ ac_cv_func_fseeko=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
+ echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+@@ -9165,7 +10276,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9185,11 +10295,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9202,7 +10321,7 @@
+
+ ac_cv_have_decl_clearerr_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
+@@ -9230,7 +10349,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9250,11 +10368,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9267,7 +10394,7 @@
+
+ ac_cv_have_decl_feof_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
+@@ -9295,7 +10422,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9315,11 +10441,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9332,7 +10467,7 @@
+
+ ac_cv_have_decl_ferror_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
+@@ -9360,7 +10495,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9380,11 +10514,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9397,7 +10540,7 @@
+
+ ac_cv_have_decl_fflush_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
+@@ -9425,7 +10568,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9445,11 +10587,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9462,7 +10613,7 @@
+
+ ac_cv_have_decl_fgets_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
+@@ -9490,7 +10641,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9510,11 +10660,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9527,7 +10686,7 @@
+
+ ac_cv_have_decl_fputc_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
+@@ -9555,7 +10714,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9575,11 +10733,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9592,7 +10759,7 @@
+
+ ac_cv_have_decl_fputs_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
+@@ -9620,7 +10787,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9640,11 +10806,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9657,7 +10832,7 @@
+
+ ac_cv_have_decl_fread_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
+@@ -9685,7 +10860,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9705,11 +10879,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9722,7 +10905,7 @@
+
+ ac_cv_have_decl_fwrite_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
+@@ -9750,7 +10933,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9770,11 +10952,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9787,7 +10978,7 @@
+
+ ac_cv_have_decl_getc_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
+@@ -9815,7 +11006,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9835,11 +11025,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9852,7 +11051,7 @@
+
+ ac_cv_have_decl_getchar_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
+@@ -9880,7 +11079,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9900,11 +11098,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9917,7 +11124,7 @@
+
+ ac_cv_have_decl_putc_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
+@@ -9945,7 +11152,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -9965,11 +11171,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9982,7 +11197,7 @@
+
+ ac_cv_have_decl_putchar_unlocked=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
+ echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
+@@ -10075,7 +11290,6 @@
+ ac_cv_func_closedir_void=yes
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10115,7 +11329,7 @@
+ ( exit $ac_status )
+ ac_cv_func_closedir_void=yes
+ fi
+-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
+@@ -10146,7 +11360,6 @@
+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10157,11 +11370,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10174,7 +11396,7 @@
+
+ ac_header_compiler=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+@@ -10182,7 +11404,6 @@
+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10200,6 +11421,7 @@
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+@@ -10219,33 +11441,32 @@
+ echo "${ECHO_T}$ac_header_preproc" >&6
+
+ # So? What about this header?
+-case $ac_header_compiler:$ac_header_preproc in
+- yes:no )
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+- (
+- cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
+ ;;
+- no:yes )
++ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+-## ------------------------------------ ##
+-## Report this to bug-autoconf@gnu.org. ##
+-## ------------------------------------ ##
++## -------------------------------- ##
++## Report this to bug-patch@gnu.org ##
++## -------------------------------- ##
+ _ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+@@ -10256,7 +11477,7 @@
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- eval "$as_ac_Header=$ac_header_preproc"
++ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+@@ -10277,7 +11498,6 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10300,11 +11520,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10317,7 +11546,8 @@
+
+ ac_cv_func_setmode_dos=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
+ echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
+@@ -10338,21 +11568,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -10383,11 +11620,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10400,7 +11646,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -10415,21 +11662,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define _doprnt innocuous__doprnt
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef _doprnt
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -10460,11 +11714,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10477,7 +11740,8 @@
+
+ ac_cv_func__doprnt=no
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+ echo "${ECHO_T}$ac_cv_func__doprnt" >&6
+@@ -10503,21 +11767,28 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define $ac_func innocuous_$ac_func
++
+ /* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
++
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++
++#undef $ac_func
++
+ /* Override any gcc2 internal prototype to avoid an error. */
+ #ifdef __cplusplus
+ extern "C"
+@@ -10548,11 +11819,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest$ac_exeext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10565,7 +11845,8 @@
+
+ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
+ fi
+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+@@ -10585,7 +11866,6 @@
+ patch_cv_mkdir_takes_one_arg=no
+ if test $ac_cv_func_mkdir = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10605,11 +11885,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10621,7 +11910,6 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10641,11 +11929,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10658,10 +11955,10 @@
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+
+@@ -10686,7 +11983,6 @@
+ else
+
+ cat >conftest.$ac_ext <<_ACEOF
+-#line $LINENO "configure"
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -10705,11 +12001,20 @@
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -s conftest.$ac_objext'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -10722,7 +12027,7 @@
+
+ ac_cv_win_or_dos=no
+ fi
+-rm -f conftest.$ac_objext conftest.$ac_ext
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
+@@ -10834,13 +12139,13 @@
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+- "s/'/'\\\\''/g;
+- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++ "s/'/'\\\\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+ } |
+@@ -10870,13 +12175,13 @@
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+- ac_vpsub='/^[ ]*VPATH[ ]*=/{
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+ s/:*\$(srcdir):*/:/;
+ s/:*\${srcdir}:*/:/;
+ s/:*@srcdir@:*/:/;
+-s/^\([^=]*=[ ]*\):*/\1/;
++s/^\([^=]*=[ ]*\):*/\1/;
+ s/:*$//;
+-s/^[^=]*=[ ]*$//;
++s/^[^=]*=[ ]*$//;
+ }'
+ fi
+
+@@ -10887,7 +12192,7 @@
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
++ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+@@ -10931,9 +12236,10 @@
+ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+ fi
++DUALCASE=1; export DUALCASE # for MKS sh
+
+ # Support unset when possible.
+-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+ else
+ as_unset=false
+@@ -10952,7 +12258,7 @@
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+ do
+- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+@@ -11131,16 +12437,17 @@
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+ else
++ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+ fi
+
+ as_executable_p="test -f"
+
+ # Sed expression to map a string onto a valid CPP name.
+-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
++as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+ # Sed expression to map a string onto a valid variable name.
+-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
++as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+ # IFS
+@@ -11167,7 +12474,7 @@
+ cat >&5 <<_CSEOF
+
+ This file was extended by patch $as_me 2.5.9, which was
+-generated by GNU Autoconf 2.57. Invocation command line was
++generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+@@ -11211,9 +12518,9 @@
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+- instantiate the configuration file FILE
++ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+- instantiate the configuration header FILE
++ instantiate the configuration header FILE
+
+ Configuration files:
+ $config_files
+@@ -11227,11 +12534,10 @@
+ cat >>$CONFIG_STATUS <<_ACEOF
+ ac_cs_version="\\
+ patch config.status 2.5.9
+-configured by $0, generated by GNU Autoconf 2.57,
++configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+-Free Software Foundation, Inc.
++Copyright (C) 2003 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+ srcdir=$srcdir
+@@ -11463,9 +12769,9 @@
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
++ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
++ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+@@ -11483,21 +12789,21 @@
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$ac_file" : 'X\(//\)[^/]' \| \
+- X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
+ echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+@@ -11513,10 +12819,10 @@
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$as_dir" : 'X\(//\)[^/]' \| \
+- X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
+ echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+@@ -11554,12 +12860,45 @@
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ esac
+-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+-# absolute.
+-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
++
++# Do not use `cd foo && pwd` to compute absolute paths, because
++# the directories may not exist.
++case `pwd` in
++.) ac_abs_builddir="$ac_dir";;
++*)
++ case "$ac_dir" in
++ .) ac_abs_builddir=`pwd`;;
++ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
++ *) ac_abs_builddir=`pwd`/"$ac_dir";;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_builddir=${ac_top_builddir}.;;
++*)
++ case ${ac_top_builddir}. in
++ .) ac_abs_top_builddir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
++ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_srcdir=$ac_srcdir;;
++*)
++ case $ac_srcdir in
++ .) ac_abs_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
++ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
++ esac;;
++esac
++case $ac_abs_builddir in
++.) ac_abs_top_srcdir=$ac_top_srcdir;;
++*)
++ case $ac_top_srcdir in
++ .) ac_abs_top_srcdir=$ac_abs_builddir;;
++ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
++ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
++ esac;;
++esac
+
+
+ case $INSTALL in
+@@ -11567,11 +12906,6 @@
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+@@ -11581,7 +12915,7 @@
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+- sed 's,.*/,,'` by configure."
++ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+@@ -11590,26 +12924,32 @@
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+- echo $f;;
++ echo "$f";;
+ *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo $f
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo $srcdir/$f
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++ if test -f "$f"; then
++ # Build tree
++ echo "$f"
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo "$srcdir/$f"
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+- fi;;
++ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
++
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+@@ -11649,12 +12989,12 @@
+ # NAME is the cpp macro being defined and VALUE is the value it is being given.
+ #
+ # ac_d sets the value in "#define NAME VALUE" lines.
+-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+-ac_dB='[ ].*$,\1#\2'
++ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
++ac_dB='[ ].*$,\1#\2'
+ ac_dC=' '
+ ac_dD=',;t'
+ # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
++ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ ac_uB='$,\1#\2define\3'
+ ac_uC=' '
+ ac_uD=',;t'
+@@ -11663,11 +13003,11 @@
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ cat >$tmp/stdin
++ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
++ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+@@ -11681,28 +13021,29 @@
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++ # Absolute (can't be DOS-style, as IFS=:)
++ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+- echo $f;;
++ # Do quote $f, to prevent DOS paths from being IFS'd.
++ echo "$f";;
+ *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo $f
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo $srcdir/$f
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
++ if test -f "$f"; then
++ # Build tree
++ echo "$f"
++ elif test -f "$srcdir/$f"; then
++ # Source tree
++ echo "$srcdir/$f"
++ else
++ # /dev/null tree
++ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+- fi;;
++ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
++ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+ _ACEOF
+
+@@ -11725,9 +13066,9 @@
+ s,[\\$`],\\&,g
+ t clear
+ : clear
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+ t end
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+ : end
+ _ACEOF
+ # If some macros were called several times there might be several times
+@@ -11741,13 +13082,13 @@
+ # example, in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ cat >>conftest.undefs <<\_ACEOF
+-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
++s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+ _ACEOF
+
+ # Break up conftest.defines because some shells have a limit on the size
+ # of here documents, and old seds have small limits too (100 cmds).
+ echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
++echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+ echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+ echo ' :' >>$CONFIG_STATUS
+ rm -f conftest.tail
+@@ -11756,7 +13097,7 @@
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
++ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+@@ -11783,7 +13124,7 @@
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
++ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+@@ -11817,10 +13158,10 @@
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$ac_file" : 'X\(//\)[^/]' \| \
+- X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$ac_file" : 'X\(//\)[^/]' \| \
++ X"$ac_file" : 'X\(//\)$' \| \
++ X"$ac_file" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
+ echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+@@ -11836,10 +13177,10 @@
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$as_dir" : 'X\(//\)[^/]' \| \
+- X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| \
++ . : '\(.\)' 2>/dev/null ||
+ echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+--- patch-2.5.9.orig/configure.ac
++++ patch-2.5.9/configure.ac
+@@ -64,6 +64,9 @@
+ gl_PREREQ_XMALLOC
+ gl_QUOTE
+ gl_QUOTEARG
++gl_HASH
++
++ag_CHECK_NANOSECOND_STAT
+
+ dnl This should be in gnulib, but isn't for some reason.
+ AC_DEFUN([jm_PREREQ_ADDEXT],
+--- patch-2.5.9.orig/pch.c
++++ patch-2.5.9/pch.c
+@@ -1,6 +1,6 @@
+ /* reading patches */
+
+-/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
++/* $Id: pch.c,v 1.45 2003/07/02 22:19:21 eggert Exp $ */
+
+ /* Copyright (C) 1986, 1987, 1988 Larry Wall
+
+@@ -366,10 +366,16 @@
+ if (!stars_last_line && strnEQ(s, "*** ", 4))
+ name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
+ else if (strnEQ(s, "+++ ", 4))
++ {
+ /* Swap with NEW below. */
+ name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
++ p_strip_trailing_cr = strip_trailing_cr;
++ }
+ else if (strnEQ(s, "Index:", 6))
++ {
+ name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
++ p_strip_trailing_cr = strip_trailing_cr;
++ }
+ else if (strnEQ(s, "Prereq:", 7)) {
+ for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
+ continue;
+@@ -409,6 +415,7 @@
+ p_timestamp[NEW] = timestamp;
+ p_rfc934_nesting = (t - s) >> 1;
+ }
++ p_strip_trailing_cr = strip_trailing_cr;
+ }
+ }
+ if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
+--- patch-2.5.9.orig/util.c
++++ patch-2.5.9/util.c
+@@ -45,9 +45,17 @@
+ # define raise(sig) kill (getpid (), sig)
+ #endif
+
++#if defined(HAVE_STAT_TIMEVAL)
++#include <time.h>
++#endif
++
+ #include <stdarg.h>
++#include <hash.h>
+
+ static void makedirs (char *);
++static bool fid_search (const char *, const struct stat *, bool);
++# define fid_exists(name, pst) fid_search (name, pst, false)
++# define insert_fid(name) fid_search (name, NULL, true)
+
+ /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
+ needs removal when cleaning up at the end of execution)
+@@ -64,7 +72,7 @@
+ struct stat to_st;
+ int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
+
+- if (backup)
++ if (backup && (to_errno || ! fid_exists (to, &to_st)))
+ {
+ int try_makedirs_errno = 0;
+ char *bakname;
+@@ -165,6 +173,7 @@
+ if (! to_dir_known_to_exist)
+ makedirs (to);
+ copy_file (from, to, 0, mode);
++ insert_fid (to);
+ return;
+ }
+
+@@ -173,6 +182,7 @@
+ }
+
+ rename_succeeded:
++ insert_fid (to);
+ /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
+ rename returned zero because FROM and TO are hard links to
+ the same file. */
+@@ -1011,3 +1021,105 @@
+ if (file_seek (stream, offset, ptrname) != 0)
+ pfatal ("fseek");
+ }
++
++typedef struct
++{
++ dev_t fid_dev;
++ ino_t fid_ino;
++ time_t fid_mtime;
++ unsigned long fid_mtimensec;
++} file_id;
++
++unsigned
++file_id_hasher (file_id *entry, unsigned table_size)
++{
++ return ((unsigned long) entry->fid_ino +
++ (unsigned long) entry->fid_dev +
++ (unsigned long) entry->fid_mtime +
++ (unsigned long) entry->fid_mtimensec) % table_size;
++}
++
++bool
++file_id_comparator (file_id *entry1, file_id *entry2)
++{
++ return (entry1->fid_dev == entry2->fid_dev &&
++ entry1->fid_ino == entry2->fid_ino &&
++ entry1->fid_mtime == entry2->fid_mtime &&
++ entry1->fid_mtimensec == entry2->fid_mtimensec);
++}
++
++void
++file_id_freer (file_id *entry)
++{
++ free (entry);
++}
++
++Hash_table *file_id_hash;
++
++/* Check if the file identified by FILENAME and PST was already seen. If the
++ file was already seen, returns TRUE. If the file has not yet been seen
++ and INSERT is TRUE, it is inserted. PST or FILENAME may be NULL (but not
++ both of them). */
++
++static bool
++fid_search (const char *filename, const struct stat *pst, bool insert)
++{
++ struct stat st;
++
++ if (!file_id_hash)
++ {
++ file_id_hash = hash_initialize (0, NULL, (Hash_hasher) file_id_hasher,
++ (Hash_comparator) file_id_comparator,
++ (Hash_data_freer) file_id_freer);
++ if (!file_id_hash)
++ pfatal ("hash_initialize");
++ }
++
++ if (!pst)
++ {
++ if (stat (filename, &st) != 0)
++ pfatal ("%s", quotearg (filename));
++ pst = &st;
++ }
++
++ if (insert)
++ {
++ file_id *pfid = xmalloc (sizeof (file_id)), *old_pfid;
++ pfid->fid_dev = pst->st_dev;
++ pfid->fid_ino = pst->st_ino;
++ pfid->fid_mtime = pst->st_mtime;
++#if defined(HAVE_STAT_NSEC)
++ pfid->fid_mtimensec = pst->st_mtimensec;
++#elif defined(HAVE_STAT_TIMEVAL)
++ pfid->fid_mtimensec = pst->st_mtim.tv_nsec;
++#else
++ pfid->fid_mtimensec = 0;
++#endif
++ old_pfid = hash_insert (file_id_hash, pfid);
++ if (!old_pfid)
++ pfatal ("hash_insert");
++ else if (old_pfid != pfid)
++ {
++ free (pfid);
++ return true;
++ }
++ else
++ return false;
++ }
++ else
++ {
++ file_id fid;
++ fid.fid_dev = pst->st_dev;
++ fid.fid_ino = pst->st_ino;
++ fid.fid_mtime = pst->st_mtime;
++#if defined(HAVE_STAT_NSEC)
++ fid.fid_mtimensec = pst->st_mtimensec;
++#elif defined(HAVE_STAT_TIMEVAL)
++ fid.fid_mtimensec = pst->st_mtim.tv_nsec;
++#else
++ fid.fid_mtimensec = 0;
++#endif
++ return hash_lookup (file_id_hash, &fid) != 0;
++ }
++}
++
+--- patch-2.5.9.orig/hash.c
++++ patch-2.5.9/hash.c
+@@ -0,0 +1,1051 @@
++/* hash - hashing table processing.
++
++ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
++ Foundation, Inc.
++
++ Written by Jim Meyering, 1992.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++/* A generic hash table package. */
++
++/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
++ of malloc. If you change USE_OBSTACK, you have to recompile! */
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#include <limits.h>
++#include <stdbool.h>
++#include <stdio.h>
++
++#ifndef HAVE_DECL_FREE
++"this configure-time declaration test was not run"
++#endif
++#if !HAVE_DECL_FREE
++void free ();
++#endif
++
++#ifndef HAVE_DECL_MALLOC
++"this configure-time declaration test was not run"
++#endif
++#if !HAVE_DECL_MALLOC
++char *malloc ();
++#endif
++
++#if USE_OBSTACK
++# include "obstack.h"
++# ifndef obstack_chunk_alloc
++# define obstack_chunk_alloc malloc
++# endif
++# ifndef obstack_chunk_free
++# define obstack_chunk_free free
++# endif
++#endif
++
++#include "hash.h"
++
++struct hash_table
++ {
++ /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1,
++ for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets
++ are not empty, there are N_ENTRIES active entries in the table. */
++ struct hash_entry *bucket;
++ struct hash_entry *bucket_limit;
++ unsigned n_buckets;
++ unsigned n_buckets_used;
++ unsigned n_entries;
++
++ /* Tuning arguments, kept in a physicaly separate structure. */
++ const Hash_tuning *tuning;
++
++ /* Three functions are given to `hash_initialize', see the documentation
++ block for this function. In a word, HASHER randomizes a user entry
++ into a number up from 0 up to some maximum minus 1; COMPARATOR returns
++ true if two user entries compare equally; and DATA_FREER is the cleanup
++ function for a user entry. */
++ Hash_hasher hasher;
++ Hash_comparator comparator;
++ Hash_data_freer data_freer;
++
++ /* A linked list of freed struct hash_entry structs. */
++ struct hash_entry *free_entry_list;
++
++#if USE_OBSTACK
++ /* Whenever obstacks are used, it is possible to allocate all overflowed
++ entries into a single stack, so they all can be freed in a single
++ operation. It is not clear if the speedup is worth the trouble. */
++ struct obstack entry_stack;
++#endif
++ };
++
++/* A hash table contains many internal entries, each holding a pointer to
++ some user provided data (also called a user entry). An entry indistinctly
++ refers to both the internal entry and its associated user entry. A user
++ entry contents may be hashed by a randomization function (the hashing
++ function, or just `hasher' for short) into a number (or `slot') between 0
++ and the current table size. At each slot position in the hash table,
++ starts a linked chain of entries for which the user data all hash to this
++ slot. A bucket is the collection of all entries hashing to the same slot.
++
++ A good `hasher' function will distribute entries rather evenly in buckets.
++ In the ideal case, the length of each bucket is roughly the number of
++ entries divided by the table size. Finding the slot for a data is usually
++ done in constant time by the `hasher', and the later finding of a precise
++ entry is linear in time with the size of the bucket. Consequently, a
++ larger hash table size (that is, a larger number of buckets) is prone to
++ yielding shorter chains, *given* the `hasher' function behaves properly.
++
++ Long buckets slow down the lookup algorithm. One might use big hash table
++ sizes in hope to reduce the average length of buckets, but this might
++ become inordinate, as unused slots in the hash table take some space. The
++ best bet is to make sure you are using a good `hasher' function (beware
++ that those are not that easy to write! :-), and to use a table size
++ larger than the actual number of entries. */
++
++/* If an insertion makes the ratio of nonempty buckets to table size larger
++ than the growth threshold (a number between 0.0 and 1.0), then increase
++ the table size by multiplying by the growth factor (a number greater than
++ 1.0). The growth threshold defaults to 0.8, and the growth factor
++ defaults to 1.414, meaning that the table will have doubled its size
++ every second time 80% of the buckets get used. */
++#define DEFAULT_GROWTH_THRESHOLD 0.8
++#define DEFAULT_GROWTH_FACTOR 1.414
++
++/* If a deletion empties a bucket and causes the ratio of used buckets to
++ table size to become smaller than the shrink threshold (a number between
++ 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a
++ number greater than the shrink threshold but smaller than 1.0). The shrink
++ threshold and factor default to 0.0 and 1.0, meaning that the table never
++ shrinks. */
++#define DEFAULT_SHRINK_THRESHOLD 0.0
++#define DEFAULT_SHRINK_FACTOR 1.0
++
++/* Use this to initialize or reset a TUNING structure to
++ some sensible values. */
++static const Hash_tuning default_tuning =
++ {
++ DEFAULT_SHRINK_THRESHOLD,
++ DEFAULT_SHRINK_FACTOR,
++ DEFAULT_GROWTH_THRESHOLD,
++ DEFAULT_GROWTH_FACTOR,
++ false
++ };
++
++/* Information and lookup. */
++
++/* The following few functions provide information about the overall hash
++ table organization: the number of entries, number of buckets and maximum
++ length of buckets. */
++
++/* Return the number of buckets in the hash table. The table size, the total
++ number of buckets (used plus unused), or the maximum number of slots, are
++ the same quantity. */
++
++unsigned
++hash_get_n_buckets (const Hash_table *table)
++{
++ return table->n_buckets;
++}
++
++/* Return the number of slots in use (non-empty buckets). */
++
++unsigned
++hash_get_n_buckets_used (const Hash_table *table)
++{
++ return table->n_buckets_used;
++}
++
++/* Return the number of active entries. */
++
++unsigned
++hash_get_n_entries (const Hash_table *table)
++{
++ return table->n_entries;
++}
++
++/* Return the length of the longest chain (bucket). */
++
++unsigned
++hash_get_max_bucket_length (const Hash_table *table)
++{
++ struct hash_entry *bucket;
++ unsigned max_bucket_length = 0;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ struct hash_entry *cursor = bucket;
++ unsigned bucket_length = 1;
++
++ while (cursor = cursor->next, cursor)
++ bucket_length++;
++
++ if (bucket_length > max_bucket_length)
++ max_bucket_length = bucket_length;
++ }
++ }
++
++ return max_bucket_length;
++}
++
++/* Do a mild validation of a hash table, by traversing it and checking two
++ statistics. */
++
++bool
++hash_table_ok (const Hash_table *table)
++{
++ struct hash_entry *bucket;
++ unsigned n_buckets_used = 0;
++ unsigned n_entries = 0;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ struct hash_entry *cursor = bucket;
++
++ /* Count bucket head. */
++ n_buckets_used++;
++ n_entries++;
++
++ /* Count bucket overflow. */
++ while (cursor = cursor->next, cursor)
++ n_entries++;
++ }
++ }
++
++ if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
++ return true;
++
++ return false;
++}
++
++void
++hash_print_statistics (const Hash_table *table, FILE *stream)
++{
++ unsigned n_entries = hash_get_n_entries (table);
++ unsigned n_buckets = hash_get_n_buckets (table);
++ unsigned n_buckets_used = hash_get_n_buckets_used (table);
++ unsigned max_bucket_length = hash_get_max_bucket_length (table);
++
++ fprintf (stream, "# entries: %u\n", n_entries);
++ fprintf (stream, "# buckets: %u\n", n_buckets);
++ fprintf (stream, "# buckets used: %u (%.2f%%)\n", n_buckets_used,
++ (100.0 * n_buckets_used) / n_buckets);
++ fprintf (stream, "max bucket length: %u\n", max_bucket_length);
++}
++
++/* If ENTRY matches an entry already in the hash table, return the
++ entry from the table. Otherwise, return NULL. */
++
++void *
++hash_lookup (const Hash_table *table, const void *entry)
++{
++ struct hash_entry *bucket
++ = table->bucket + table->hasher (entry, table->n_buckets);
++ struct hash_entry *cursor;
++
++ if (! (bucket < table->bucket_limit))
++ abort ();
++
++ if (bucket->data == NULL)
++ return NULL;
++
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ if (table->comparator (entry, cursor->data))
++ return cursor->data;
++
++ return NULL;
++}
++
++/* Walking. */
++
++/* The functions in this page traverse the hash table and process the
++ contained entries. For the traversal to work properly, the hash table
++ should not be resized nor modified while any particular entry is being
++ processed. In particular, entries should not be added or removed. */
++
++/* Return the first data in the table, or NULL if the table is empty. */
++
++void *
++hash_get_first (const Hash_table *table)
++{
++ struct hash_entry *bucket;
++
++ if (table->n_entries == 0)
++ return NULL;
++
++ for (bucket = table->bucket; ; bucket++)
++ if (! (bucket < table->bucket_limit))
++ abort ();
++ else if (bucket->data)
++ return bucket->data;
++}
++
++/* Return the user data for the entry following ENTRY, where ENTRY has been
++ returned by a previous call to either `hash_get_first' or `hash_get_next'.
++ Return NULL if there are no more entries. */
++
++void *
++hash_get_next (const Hash_table *table, const void *entry)
++{
++ struct hash_entry *bucket
++ = table->bucket + table->hasher (entry, table->n_buckets);
++ struct hash_entry *cursor;
++
++ if (! (bucket < table->bucket_limit))
++ abort ();
++
++ /* Find next entry in the same bucket. */
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ if (cursor->data == entry && cursor->next)
++ return cursor->next->data;
++
++ /* Find first entry in any subsequent bucket. */
++ while (++bucket < table->bucket_limit)
++ if (bucket->data)
++ return bucket->data;
++
++ /* None found. */
++ return NULL;
++}
++
++/* Fill BUFFER with pointers to active user entries in the hash table, then
++ return the number of pointers copied. Do not copy more than BUFFER_SIZE
++ pointers. */
++
++unsigned
++hash_get_entries (const Hash_table *table, void **buffer,
++ unsigned buffer_size)
++{
++ unsigned counter = 0;
++ struct hash_entry *bucket;
++ struct hash_entry *cursor;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ {
++ if (counter >= buffer_size)
++ return counter;
++ buffer[counter++] = cursor->data;
++ }
++ }
++ }
++
++ return counter;
++}
++
++/* Call a PROCESSOR function for each entry of a hash table, and return the
++ number of entries for which the processor function returned success. A
++ pointer to some PROCESSOR_DATA which will be made available to each call to
++ the processor function. The PROCESSOR accepts two arguments: the first is
++ the user entry being walked into, the second is the value of PROCESSOR_DATA
++ as received. The walking continue for as long as the PROCESSOR function
++ returns nonzero. When it returns zero, the walking is interrupted. */
++
++unsigned
++hash_do_for_each (const Hash_table *table, Hash_processor processor,
++ void *processor_data)
++{
++ unsigned counter = 0;
++ struct hash_entry *bucket;
++ struct hash_entry *cursor;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ {
++ if (!(*processor) (cursor->data, processor_data))
++ return counter;
++ counter++;
++ }
++ }
++ }
++
++ return counter;
++}
++
++/* Allocation and clean-up. */
++
++/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
++ This is a convenience routine for constructing other hashing functions. */
++
++#if USE_DIFF_HASH
++
++/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
++ B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm,
++ Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash
++ algorithms tend to be domain-specific, so what's good for [diffutils'] io.c
++ may not be good for your application." */
++
++unsigned
++hash_string (const char *string, unsigned n_buckets)
++{
++# define ROTATE_LEFT(Value, Shift) \
++ ((Value) << (Shift) | (Value) >> ((sizeof (unsigned) * CHAR_BIT) - (Shift)))
++# define HASH_ONE_CHAR(Value, Byte) \
++ ((Byte) + ROTATE_LEFT (Value, 7))
++
++ unsigned value = 0;
++
++ for (; *string; string++)
++ value = HASH_ONE_CHAR (value, *(const unsigned char *) string);
++ return value % n_buckets;
++
++# undef ROTATE_LEFT
++# undef HASH_ONE_CHAR
++}
++
++#else /* not USE_DIFF_HASH */
++
++/* This one comes from `recode', and performs a bit better than the above as
++ per a few experiments. It is inspired from a hashing routine found in the
++ very old Cyber `snoop', itself written in typical Greg Mansfield style.
++ (By the way, what happened to this excellent man? Is he still alive?) */
++
++unsigned
++hash_string (const char *string, unsigned n_buckets)
++{
++ unsigned value = 0;
++
++ while (*string)
++ value = ((value * 31 + (int) *(const unsigned char *) string++)
++ % n_buckets);
++ return value;
++}
++
++#endif /* not USE_DIFF_HASH */
++
++/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd
++ number at least equal to 11. */
++
++static bool
++is_prime (unsigned long candidate)
++{
++ unsigned long divisor = 3;
++ unsigned long square = divisor * divisor;
++
++ while (square < candidate && (candidate % divisor))
++ {
++ divisor++;
++ square += 4 * divisor;
++ divisor++;
++ }
++
++ return (candidate % divisor ? true : false);
++}
++
++/* Round a given CANDIDATE number up to the nearest prime, and return that
++ prime. Primes lower than 10 are merely skipped. */
++
++static unsigned long
++next_prime (unsigned long candidate)
++{
++ /* Skip small primes. */
++ if (candidate < 10)
++ candidate = 10;
++
++ /* Make it definitely odd. */
++ candidate |= 1;
++
++ while (!is_prime (candidate))
++ candidate += 2;
++
++ return candidate;
++}
++
++void
++hash_reset_tuning (Hash_tuning *tuning)
++{
++ *tuning = default_tuning;
++}
++
++/* For the given hash TABLE, check the user supplied tuning structure for
++ reasonable values, and return true if there is no gross error with it.
++ Otherwise, definitively reset the TUNING field to some acceptable default
++ in the hash table (that is, the user loses the right of further modifying
++ tuning arguments), and return false. */
++
++static bool
++check_tuning (Hash_table *table)
++{
++ const Hash_tuning *tuning = table->tuning;
++
++ if (tuning->growth_threshold > 0.0
++ && tuning->growth_threshold < 1.0
++ && tuning->growth_factor > 1.0
++ && tuning->shrink_threshold >= 0.0
++ && tuning->shrink_threshold < 1.0
++ && tuning->shrink_factor > tuning->shrink_threshold
++ && tuning->shrink_factor <= 1.0
++ && tuning->shrink_threshold < tuning->growth_threshold)
++ return true;
++
++ table->tuning = &default_tuning;
++ return false;
++}
++
++/* Allocate and return a new hash table, or NULL upon failure. The initial
++ number of buckets is automatically selected so as to _guarantee_ that you
++ may insert at least CANDIDATE different user entries before any growth of
++ the hash table size occurs. So, if have a reasonably tight a-priori upper
++ bound on the number of entries you intend to insert in the hash table, you
++ may save some table memory and insertion time, by specifying it here. If
++ the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
++ argument has its meaning changed to the wanted number of buckets.
++
++ TUNING points to a structure of user-supplied values, in case some fine
++ tuning is wanted over the default behavior of the hasher. If TUNING is
++ NULL, the default tuning parameters are used instead.
++
++ The user-supplied HASHER function should be provided. It accepts two
++ arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a
++ slot number for that entry which should be in the range 0..TABLE_SIZE-1.
++ This slot number is then returned.
++
++ The user-supplied COMPARATOR function should be provided. It accepts two
++ arguments pointing to user data, it then returns true for a pair of entries
++ that compare equal, or false otherwise. This function is internally called
++ on entries which are already known to hash to the same bucket index.
++
++ The user-supplied DATA_FREER function, when not NULL, may be later called
++ with the user data as an argument, just before the entry containing the
++ data gets freed. This happens from within `hash_free' or `hash_clear'.
++ You should specify this function only if you want these functions to free
++ all of your `data' data. This is typically the case when your data is
++ simply an auxiliary struct that you have malloc'd to aggregate several
++ values. */
++
++Hash_table *
++hash_initialize (unsigned candidate, const Hash_tuning *tuning,
++ Hash_hasher hasher, Hash_comparator comparator,
++ Hash_data_freer data_freer)
++{
++ Hash_table *table;
++ struct hash_entry *bucket;
++
++ if (hasher == NULL || comparator == NULL)
++ return NULL;
++
++ table = (Hash_table *) malloc (sizeof (Hash_table));
++ if (table == NULL)
++ return NULL;
++
++ if (!tuning)
++ tuning = &default_tuning;
++ table->tuning = tuning;
++ if (!check_tuning (table))
++ {
++ /* Fail if the tuning options are invalid. This is the only occasion
++ when the user gets some feedback about it. Once the table is created,
++ if the user provides invalid tuning options, we silently revert to
++ using the defaults, and ignore further request to change the tuning
++ options. */
++ free (table);
++ return NULL;
++ }
++
++ table->n_buckets
++ = next_prime (tuning->is_n_buckets ? candidate
++ : (unsigned) (candidate / tuning->growth_threshold));
++
++ table->bucket = (struct hash_entry *)
++ malloc (table->n_buckets * sizeof (struct hash_entry));
++ if (table->bucket == NULL)
++ {
++ free (table);
++ return NULL;
++ }
++ table->bucket_limit = table->bucket + table->n_buckets;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ bucket->data = NULL;
++ bucket->next = NULL;
++ }
++ table->n_buckets_used = 0;
++ table->n_entries = 0;
++
++ table->hasher = hasher;
++ table->comparator = comparator;
++ table->data_freer = data_freer;
++
++ table->free_entry_list = NULL;
++#if USE_OBSTACK
++ obstack_init (&table->entry_stack);
++#endif
++ return table;
++}
++
++/* Make all buckets empty, placing any chained entries on the free list.
++ Apply the user-specified function data_freer (if any) to the datas of any
++ affected entries. */
++
++void
++hash_clear (Hash_table *table)
++{
++ struct hash_entry *bucket;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ struct hash_entry *cursor;
++ struct hash_entry *next;
++
++ /* Free the bucket overflow. */
++ for (cursor = bucket->next; cursor; cursor = next)
++ {
++ if (table->data_freer)
++ (*table->data_freer) (cursor->data);
++ cursor->data = NULL;
++
++ next = cursor->next;
++ /* Relinking is done one entry at a time, as it is to be expected
++ that overflows are either rare or short. */
++ cursor->next = table->free_entry_list;
++ table->free_entry_list = cursor;
++ }
++
++ /* Free the bucket head. */
++ if (table->data_freer)
++ (*table->data_freer) (bucket->data);
++ bucket->data = NULL;
++ bucket->next = NULL;
++ }
++ }
++
++ table->n_buckets_used = 0;
++ table->n_entries = 0;
++}
++
++/* Reclaim all storage associated with a hash table. If a data_freer
++ function has been supplied by the user when the hash table was created,
++ this function applies it to the data of each entry before freeing that
++ entry. */
++
++void
++hash_free (Hash_table *table)
++{
++ struct hash_entry *bucket;
++ struct hash_entry *cursor;
++ struct hash_entry *next;
++
++ /* Call the user data_freer function. */
++ if (table->data_freer && table->n_entries)
++ {
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ if (bucket->data)
++ {
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ {
++ (*table->data_freer) (cursor->data);
++ }
++ }
++ }
++ }
++
++#if USE_OBSTACK
++
++ obstack_free (&table->entry_stack, NULL);
++
++#else
++
++ /* Free all bucket overflowed entries. */
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ for (cursor = bucket->next; cursor; cursor = next)
++ {
++ next = cursor->next;
++ free (cursor);
++ }
++ }
++
++ /* Also reclaim the internal list of previously freed entries. */
++ for (cursor = table->free_entry_list; cursor; cursor = next)
++ {
++ next = cursor->next;
++ free (cursor);
++ }
++
++#endif
++
++ /* Free the remainder of the hash table structure. */
++ free (table->bucket);
++ free (table);
++}
++
++/* Insertion and deletion. */
++
++/* Get a new hash entry for a bucket overflow, possibly by reclying a
++ previously freed one. If this is not possible, allocate a new one. */
++
++static struct hash_entry *
++allocate_entry (Hash_table *table)
++{
++ struct hash_entry *new;
++
++ if (table->free_entry_list)
++ {
++ new = table->free_entry_list;
++ table->free_entry_list = new->next;
++ }
++ else
++ {
++#if USE_OBSTACK
++ new = (struct hash_entry *)
++ obstack_alloc (&table->entry_stack, sizeof (struct hash_entry));
++#else
++ new = (struct hash_entry *) malloc (sizeof (struct hash_entry));
++#endif
++ }
++
++ return new;
++}
++
++/* Free a hash entry which was part of some bucket overflow,
++ saving it for later recycling. */
++
++static void
++free_entry (Hash_table *table, struct hash_entry *entry)
++{
++ entry->data = NULL;
++ entry->next = table->free_entry_list;
++ table->free_entry_list = entry;
++}
++
++/* This private function is used to help with insertion and deletion. When
++ ENTRY matches an entry in the table, return a pointer to the corresponding
++ user data and set *BUCKET_HEAD to the head of the selected bucket.
++ Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in
++ the table, unlink the matching entry. */
++
++static void *
++hash_find_entry (Hash_table *table, const void *entry,
++ struct hash_entry **bucket_head, bool delete)
++{
++ struct hash_entry *bucket
++ = table->bucket + table->hasher (entry, table->n_buckets);
++ struct hash_entry *cursor;
++
++ if (! (bucket < table->bucket_limit))
++ abort ();
++
++ *bucket_head = bucket;
++
++ /* Test for empty bucket. */
++ if (bucket->data == NULL)
++ return NULL;
++
++ /* See if the entry is the first in the bucket. */
++ if ((*table->comparator) (entry, bucket->data))
++ {
++ void *data = bucket->data;
++
++ if (delete)
++ {
++ if (bucket->next)
++ {
++ struct hash_entry *next = bucket->next;
++
++ /* Bump the first overflow entry into the bucket head, then save
++ the previous first overflow entry for later recycling. */
++ *bucket = *next;
++ free_entry (table, next);
++ }
++ else
++ {
++ bucket->data = NULL;
++ }
++ }
++
++ return data;
++ }
++
++ /* Scan the bucket overflow. */
++ for (cursor = bucket; cursor->next; cursor = cursor->next)
++ {
++ if ((*table->comparator) (entry, cursor->next->data))
++ {
++ void *data = cursor->next->data;
++
++ if (delete)
++ {
++ struct hash_entry *next = cursor->next;
++
++ /* Unlink the entry to delete, then save the freed entry for later
++ recycling. */
++ cursor->next = next->next;
++ free_entry (table, next);
++ }
++
++ return data;
++ }
++ }
++
++ /* No entry found. */
++ return NULL;
++}
++
++/* For an already existing hash table, change the number of buckets through
++ specifying CANDIDATE. The contents of the hash table are preserved. The
++ new number of buckets is automatically selected so as to _guarantee_ that
++ the table may receive at least CANDIDATE different user entries, including
++ those already in the table, before any other growth of the hash table size
++ occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
++ exact number of buckets desired. */
++
++bool
++hash_rehash (Hash_table *table, unsigned candidate)
++{
++ Hash_table *new_table;
++ struct hash_entry *bucket;
++ struct hash_entry *cursor;
++ struct hash_entry *next;
++
++ new_table = hash_initialize (candidate, table->tuning, table->hasher,
++ table->comparator, table->data_freer);
++ if (new_table == NULL)
++ return false;
++
++ /* Merely reuse the extra old space into the new table. */
++#if USE_OBSTACK
++ obstack_free (&new_table->entry_stack, NULL);
++ new_table->entry_stack = table->entry_stack;
++#endif
++ new_table->free_entry_list = table->free_entry_list;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ if (bucket->data)
++ for (cursor = bucket; cursor; cursor = next)
++ {
++ void *data = cursor->data;
++ struct hash_entry *new_bucket
++ = (new_table->bucket
++ + new_table->hasher (data, new_table->n_buckets));
++
++ if (! (new_bucket < new_table->bucket_limit))
++ abort ();
++
++ next = cursor->next;
++
++ if (new_bucket->data)
++ {
++ if (cursor == bucket)
++ {
++ /* Allocate or recycle an entry, when moving from a bucket
++ header into a bucket overflow. */
++ struct hash_entry *new_entry = allocate_entry (new_table);
++
++ if (new_entry == NULL)
++ return false;
++
++ new_entry->data = data;
++ new_entry->next = new_bucket->next;
++ new_bucket->next = new_entry;
++ }
++ else
++ {
++ /* Merely relink an existing entry, when moving from a
++ bucket overflow into a bucket overflow. */
++ cursor->next = new_bucket->next;
++ new_bucket->next = cursor;
++ }
++ }
++ else
++ {
++ /* Free an existing entry, when moving from a bucket
++ overflow into a bucket header. Also take care of the
++ simple case of moving from a bucket header into a bucket
++ header. */
++ new_bucket->data = data;
++ new_table->n_buckets_used++;
++ if (cursor != bucket)
++ free_entry (new_table, cursor);
++ }
++ }
++
++ free (table->bucket);
++ table->bucket = new_table->bucket;
++ table->bucket_limit = new_table->bucket_limit;
++ table->n_buckets = new_table->n_buckets;
++ table->n_buckets_used = new_table->n_buckets_used;
++ table->free_entry_list = new_table->free_entry_list;
++ /* table->n_entries already holds its value. */
++#if USE_OBSTACK
++ table->entry_stack = new_table->entry_stack;
++#endif
++ free (new_table);
++
++ return true;
++}
++
++/* If ENTRY matches an entry already in the hash table, return the pointer
++ to the entry from the table. Otherwise, insert ENTRY and return ENTRY.
++ Return NULL if the storage required for insertion cannot be allocated. */
++
++void *
++hash_insert (Hash_table *table, const void *entry)
++{
++ void *data;
++ struct hash_entry *bucket;
++
++ /* The caller cannot insert a NULL entry. */
++ if (! entry)
++ abort ();
++
++ /* If there's a matching entry already in the table, return that. */
++ if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL)
++ return data;
++
++ /* ENTRY is not matched, it should be inserted. */
++
++ if (bucket->data)
++ {
++ struct hash_entry *new_entry = allocate_entry (table);
++
++ if (new_entry == NULL)
++ return NULL;
++
++ /* Add ENTRY in the overflow of the bucket. */
++
++ new_entry->data = (void *) entry;
++ new_entry->next = bucket->next;
++ bucket->next = new_entry;
++ table->n_entries++;
++ return (void *) entry;
++ }
++
++ /* Add ENTRY right in the bucket head. */
++
++ bucket->data = (void *) entry;
++ table->n_entries++;
++ table->n_buckets_used++;
++
++ /* If the growth threshold of the buckets in use has been reached, increase
++ the table size and rehash. There's no point in checking the number of
++ entries: if the hashing function is ill-conditioned, rehashing is not
++ likely to improve it. */
++
++ if (table->n_buckets_used
++ > table->tuning->growth_threshold * table->n_buckets)
++ {
++ /* Check more fully, before starting real work. If tuning arguments
++ became invalid, the second check will rely on proper defaults. */
++ check_tuning (table);
++ if (table->n_buckets_used
++ > table->tuning->growth_threshold * table->n_buckets)
++ {
++ const Hash_tuning *tuning = table->tuning;
++ unsigned candidate
++ = (unsigned) (tuning->is_n_buckets
++ ? (table->n_buckets * tuning->growth_factor)
++ : (table->n_buckets * tuning->growth_factor
++ * tuning->growth_threshold));
++
++ /* If the rehash fails, arrange to return NULL. */
++ if (!hash_rehash (table, candidate))
++ entry = NULL;
++ }
++ }
++
++ return (void *) entry;
++}
++
++/* If ENTRY is already in the table, remove it and return the just-deleted
++ data (the user may want to deallocate its storage). If ENTRY is not in the
++ table, don't modify the table and return NULL. */
++
++void *
++hash_delete (Hash_table *table, const void *entry)
++{
++ void *data;
++ struct hash_entry *bucket;
++
++ data = hash_find_entry (table, entry, &bucket, true);
++ if (!data)
++ return NULL;
++
++ table->n_entries--;
++ if (!bucket->data)
++ {
++ table->n_buckets_used--;
++
++ /* If the shrink threshold of the buckets in use has been reached,
++ rehash into a smaller table. */
++
++ if (table->n_buckets_used
++ < table->tuning->shrink_threshold * table->n_buckets)
++ {
++ /* Check more fully, before starting real work. If tuning arguments
++ became invalid, the second check will rely on proper defaults. */
++ check_tuning (table);
++ if (table->n_buckets_used
++ < table->tuning->shrink_threshold * table->n_buckets)
++ {
++ const Hash_tuning *tuning = table->tuning;
++ unsigned candidate
++ = (unsigned) (tuning->is_n_buckets
++ ? table->n_buckets * tuning->shrink_factor
++ : (table->n_buckets * tuning->shrink_factor
++ * tuning->growth_threshold));
++
++ hash_rehash (table, candidate);
++ }
++ }
++ }
++
++ return data;
++}
++
++/* Testing. */
++
++#if TESTING
++
++void
++hash_print (const Hash_table *table)
++{
++ struct hash_entry *bucket;
++
++ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
++ {
++ struct hash_entry *cursor;
++
++ if (bucket)
++ printf ("%d:\n", bucket - table->bucket);
++
++ for (cursor = bucket; cursor; cursor = cursor->next)
++ {
++ char *s = (char *) cursor->data;
++ /* FIXME */
++ if (s)
++ printf (" %s\n", s);
++ }
++ }
++}
++
++#endif /* TESTING */
+--- patch-2.5.9.orig/hash.h
++++ patch-2.5.9/hash.h
+@@ -0,0 +1,93 @@
++/* hash - hashing table processing.
++ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
++ Written by Jim Meyering <meyering@ascend.com>, 1998.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software Foundation,
++ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++/* A generic hash table package. */
++
++/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
++ obstacks instead of malloc, and recompile `hash.c' with same setting. */
++
++#ifndef HASH_H_
++# define HASH_H_
++
++# ifndef PARAMS
++# if PROTOTYPES || __STDC__
++# define PARAMS(Args) Args
++# else
++# define PARAMS(Args) ()
++# endif
++# endif
++
++typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
++typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
++typedef void (*Hash_data_freer) PARAMS ((void *));
++typedef bool (*Hash_processor) PARAMS ((void *, void *));
++
++struct hash_entry
++ {
++ void *data;
++ struct hash_entry *next;
++ };
++
++struct hash_tuning
++ {
++ /* This structure is mainly used for `hash_initialize', see the block
++ documentation of `hash_reset_tuning' for more complete comments. */
++
++ float shrink_threshold; /* ratio of used buckets to trigger a shrink */
++ float shrink_factor; /* ratio of new smaller size to original size */
++ float growth_threshold; /* ratio of used buckets to trigger a growth */
++ float growth_factor; /* ratio of new bigger size to original size */
++ bool is_n_buckets; /* if CANDIDATE really means table size */
++ };
++
++typedef struct hash_tuning Hash_tuning;
++
++struct hash_table;
++
++typedef struct hash_table Hash_table;
++
++/* Information and lookup. */
++unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
++unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
++unsigned hash_get_n_entries PARAMS ((const Hash_table *));
++unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
++bool hash_table_ok PARAMS ((const Hash_table *));
++void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
++void *hash_lookup PARAMS ((const Hash_table *, const void *));
++
++/* Walking. */
++void *hash_get_first PARAMS ((const Hash_table *));
++void *hash_get_next PARAMS ((const Hash_table *, const void *));
++unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
++unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
++
++/* Allocation and clean-up. */
++unsigned hash_string PARAMS ((const char *, unsigned));
++void hash_reset_tuning PARAMS ((Hash_tuning *));
++Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
++ Hash_hasher, Hash_comparator,
++ Hash_data_freer));
++void hash_clear PARAMS ((Hash_table *));
++void hash_free PARAMS ((Hash_table *));
++
++/* Insertion and deletion. */
++bool hash_rehash PARAMS ((Hash_table *, unsigned));
++void *hash_insert PARAMS ((Hash_table *, const void *));
++void *hash_delete PARAMS ((Hash_table *, const void *));
++
++#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 0000000..66065fc
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/global-reject-file.diff
@@ -0,0 +1,201 @@
+Index: patch-2.5.9/patch.man
+===================================================================
+--- patch-2.5.9.orig/patch.man
++++ patch-2.5.9/patch.man
+@@ -520,6 +520,15 @@ file.
+ \fB\*=reject\-unified\fP
+ Produce unified reject files. The default is to produce context type reject files.
+ .TP
++.BI \*=global\-reject\-file= rejectfile
++Put all rejects into
++.I rejectfile
++instead of creating separate reject files for all files that have rejects. The
++.I rejectfile
++will contain headers that identify which file each reject refers to. Note that
++the global reject file is created even if \-\-dry\-run is specified (while
++non-global reject files will only be created without \-\-dry\-run).
++.TP
+ \fB\-R\fP or \fB\*=reverse\fP
+ Assume that this patch was created with the old and new files swapped.
+ (Yes, I'm afraid that does happen occasionally, human nature being what it
+Index: patch-2.5.9/patch.c
+===================================================================
+--- patch-2.5.9.orig/patch.c
++++ patch-2.5.9/patch.c
+@@ -67,6 +67,7 @@ static bool similar (char const *, size_
+ static bool spew_output (struct outstate *);
+ static char const *make_temp (char);
+ static int numeric_string (char const *, bool, char const *);
++static void reject_header (const char *filename);
+ static void abort_hunk (void);
+ static void cleanup (void);
+ static void get_some_switches (void);
+@@ -98,6 +99,7 @@ static int Argc;
+ static char * const *Argv;
+
+ static FILE *rejfp; /* reject file pointer */
++static char *global_reject;
+
+ static char const *patchname;
+ static char *rejname;
+@@ -172,6 +174,10 @@ main (int argc, char **argv)
+ /* Make sure we clean up in case of disaster. */
+ set_signals (false);
+
++ /* initialize global reject file */
++ if (global_reject)
++ init_reject ();
++
+ for (
+ open_patch_file (patchname);
+ there_is_another_patch();
+@@ -208,8 +214,9 @@ main (int argc, char **argv)
+ init_output (TMPOUTNAME, exclusive, &outstate);
+ }
+
+- /* initialize reject file */
+- init_reject ();
++ /* initialize per-patch reject file */
++ if (!global_reject)
++ init_reject ();
+
+ /* find out where all the lines are */
+ if (!skip_rest_of_patch)
+@@ -278,6 +285,8 @@ main (int argc, char **argv)
+
+ newwhere = pch_newfirst() + last_offset;
+ if (skip_rest_of_patch) {
++ if (!failed)
++ reject_header(outname);
+ abort_hunk();
+ failed++;
+ if (verbosity == VERBOSE)
+@@ -292,6 +301,8 @@ main (int argc, char **argv)
+ say ("Patch attempted to create file %s, which already exists.\n",
+ quotearg (inname));
+
++ if (!failed)
++ reject_header(outname);
+ abort_hunk();
+ failed++;
+ if (verbosity != SILENT)
+@@ -299,6 +310,8 @@ main (int argc, char **argv)
+ format_linenum (numbuf, newwhere));
+ }
+ else if (! apply_hunk (&outstate, where)) {
++ if (!failed)
++ reject_header(outname);
+ abort_hunk ();
+ failed++;
+ if (verbosity != SILENT)
+@@ -332,7 +345,8 @@ main (int argc, char **argv)
+ fclose (outstate.ofp);
+ outstate.ofp = 0;
+ }
+- fclose (rejfp);
++ if (!global_reject)
++ fclose (rejfp);
+ continue;
+ }
+
+@@ -412,13 +426,13 @@ main (int argc, char **argv)
+ }
+ }
+ if (diff_type != ED_DIFF) {
+- if (fclose (rejfp) != 0)
++ if (!global_reject && fclose (rejfp) != 0)
+ write_fatal ();
+ if (failed) {
+ somefailed = true;
+ say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
+ skip_rest_of_patch ? "ignored" : "FAILED");
+- if (outname) {
++ if (!global_reject && outname) {
+ char *rej = rejname;
+ if (!rejname) {
+ rej = xmalloc (strlen (outname) + 5);
+@@ -445,6 +459,20 @@ main (int argc, char **argv)
+ }
+ set_signals (true);
+ }
++ if (global_reject)
++ {
++ if (fclose (rejfp) != 0)
++ write_fatal ();
++ if (somefailed)
++ {
++ say (" -- saving rejects to file %s\n", quotearg (global_reject));
++ /*if (! dry_run)
++ {*/
++ move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
++ global_reject, 0644, false);
++ /*}*/
++ }
++ }
+ if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
+ write_fatal ();
+ cleanup ();
+@@ -523,6 +551,7 @@ static struct option const longopts[] =
+ {"posix", no_argument, NULL, CHAR_MAX + 7},
+ {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
++ {"global-reject-file", required_argument, NULL, CHAR_MAX + 10},
+ {NULL, no_argument, NULL, 0}
+ };
+
+@@ -582,6 +611,7 @@ static char const *const option_help[] =
+ " --dry-run Do not actually change any files; just print what would happen.",
+ " --posix Conform to the POSIX standard.",
+ " --unified-reject-files Create unified reject files.",
++" --global-reject-file=file Put all rejects into one file.",
+ "",
+ " -d DIR --directory=DIR Change the working directory to DIR first.",
+ #if HAVE_SETMODE_DOS
+@@ -784,6 +814,9 @@ get_some_switches (void)
+ case CHAR_MAX + 9:
+ unified_reject_files = true;
+ break;
++ case CHAR_MAX + 10:
++ global_reject = savestr (optarg);
++ break;
+ default:
+ usage (stderr, 2);
+ }
+@@ -933,6 +966,37 @@ locate_hunk (LINENUM fuzz)
+ }
+
+ static char *
++format_timestamp (char timebuf[37], bool which)
++{
++ time_t ts = pch_timestamp(which);
++ if (ts != -1)
++ {
++ struct tm *tm = localtime(&ts);
++ strftime(timebuf, 37, "\t%Y-%m-%d %H:%M:%S.000000000 %z", tm);
++ }
++ else
++ timebuf[0] = 0;
++ return timebuf;
++}
++
++/* Write a header in a reject file that combines multiple hunks. */
++static void
++reject_header (const char *outname)
++{
++ char timebuf0[37], timebuf1[37];
++ if (!global_reject)
++ return;
++ if (diff_type == UNI_DIFF)
++ fprintf(rejfp, "--- %s.orig%s\n+++ %s%s\n",
++ outname, format_timestamp(timebuf0, reverse),
++ outname, format_timestamp(timebuf1, !reverse));
++ else
++ fprintf(rejfp, "*** %s.orig%s\n--- %s%s\n",
++ outname, format_timestamp(timebuf0, reverse),
++ outname, format_timestamp(timebuf1, !reverse));
++}
++
++static char *
+ format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
+ LINENUM first, LINENUM lines)
+ {
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 0000000..c959189
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/install.patch
@@ -0,0 +1,41 @@
+Index: patch-2.5.4/Makefile.in
+===================================================================
+--- patch-2.5.4.orig/Makefile.in 2005-03-09 07:23:54.779311824 -0500
++++ patch-2.5.4/Makefile.in 2005-03-09 07:26:09.616813408 -0500
+@@ -43,10 +43,11 @@
+ PACKAGE_NAME = @PACKAGE_NAME@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+
++DESTDIR =
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+
+-bindir = $(exec_prefix)/bin
++bindir = @bindir@
+
+ # Where to put the manual pages.
+ mandir = @mandir@
+@@ -112,18 +113,18 @@
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ install:: all installdirs
+- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
+- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
++ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
++ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
+
+ installdirs::
+- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
++ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+
+ install-strip::
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+
+ uninstall::
+- rm -f $(bindir)/$(patch_name)$(EXEEXT)
+- rm -f $(man1dir)/$(patch_name)$(man1ext)
++ rm -f $(DESTDIR)$(bindir)/$(patch_name)$(EXEEXT)
++ rm -f $(DESTDIR)$(man1dir)/$(patch_name)$(man1ext)
+
+ Makefile: Makefile.in $(CONFIG_STATUS)
+ $(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 0000000..6bfa00d
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch-2.5.9/unified-reject-files.diff
@@ -0,0 +1,305 @@
+Generate unified diff style reject files. Also include the C function names
+in reject files whenever possible.
+
+ $ cat > f.orig
+ < a() {
+ < 2
+ < 3
+ <
+ < 5
+ < 6
+ < }
+
+ $ sed -e 's/5/5a/' f.orig > f
+ $ diff -U2 -p f.orig f > f.diff
+ $ sed -e 's/5/5a/' -e 's/6/6x/' f.orig > f
+ $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f.diff
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > @@ -3,5 +3,5 @@ a() {
+ > 3
+ >
+ > -5
+ > +5a
+ > 6
+ > }
+
+ $ ./patch -F0 -s --no-backup-if-mismatch f < f.diff
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > *************** a() {
+ > *** 3,7 ****
+ > 3
+ >
+ > - 5
+ > 6
+ > }
+ > --- 3,7 ----
+ > 3
+ >
+ > + 5a
+ > 6
+ > }
+
+ $ diff -Nu -p /dev/null f.orig > f2.diff
+ $ ./patch -F0 -s --no-backup-if-mismatch f --reject-unified < f2.diff
+ > Patch attempted to create file f, which already exists.
+ > 1 out of 1 hunk FAILED -- saving rejects to file f.rej
+
+ $ cat f.rej
+ > @@ -0,0 +1,7 @@
+ > +a() {
+ > +2
+ > +3
+ > +
+ > +5
+ > +6
+ > +}
+
+ $ rm -f f f.orig f.rej f.diff f2.diff
+
+Index: patch-2.5.9/pch.c
+===================================================================
+--- patch-2.5.9.orig/pch.c
++++ patch-2.5.9/pch.c
+@@ -68,6 +68,7 @@ static LINENUM p_sline; /* and the lin
+ static LINENUM p_hunk_beg; /* line number of current hunk */
+ static LINENUM p_efake = -1; /* end of faked up lines--don't free */
+ static LINENUM p_bfake = -1; /* beg of faked up lines */
++static char *p_c_function; /* the C function a hunk is in */
+
+ enum nametype { OLD, NEW, INDEX, NONE };
+
+@@ -888,6 +889,19 @@ another_hunk (enum diff difftype, bool r
+ next_intuit_at(line_beginning,p_input_line);
+ return chars_read == (size_t) -1 ? -1 : 0;
+ }
++ s = buf;
++ while (*s == '*')
++ s++;
++ if (*s == ' ')
++ {
++ p_c_function = s;
++ while (*s != '\n')
++ s++;
++ *s = '\0';
++ p_c_function = savestr (p_c_function);
++ }
++ else
++ p_c_function = NULL;
+ p_hunk_beg = p_input_line + 1;
+ while (p_end < p_max) {
+ chars_read = get_line ();
+@@ -1277,8 +1291,18 @@ another_hunk (enum diff difftype, bool r
+ else
+ p_repl_lines = 1;
+ if (*s == ' ') s++;
+- if (*s != '@')
++ if (*s++ != '@')
+ malformed ();
++ if (*s++ == '@' && *s == ' ' && *s != '\0')
++ {
++ p_c_function = s;
++ while (*s != '\n')
++ s++;
++ *s = '\0';
++ p_c_function = savestr (p_c_function);
++ }
++ else
++ p_c_function = NULL;
+ if (!p_ptrn_lines)
+ p_first++; /* do append rather than insert */
+ if (!p_repl_lines)
+@@ -1884,6 +1908,12 @@ pch_hunk_beg (void)
+ return p_hunk_beg;
+ }
+
++char const *
++pch_c_function (void)
++{
++ return p_c_function;
++}
++
+ /* Is the newline-terminated line a valid `ed' command for patch
+ input? If so, return the command character; if not, return 0.
+ This accepts accepts just a subset of the valid commands, but it's
+Index: patch-2.5.9/pch.h
+===================================================================
+--- patch-2.5.9.orig/pch.h
++++ patch-2.5.9/pch.h
+@@ -25,6 +25,7 @@
+ LINENUM pch_end (void);
+ LINENUM pch_first (void);
+ LINENUM pch_hunk_beg (void);
++char const *pch_c_function (void);
+ LINENUM pch_newfirst (void);
+ LINENUM pch_prefix_context (void);
+ LINENUM pch_ptrn_lines (void);
+Index: patch-2.5.9/patch.man
+===================================================================
+--- patch-2.5.9.orig/patch.man
++++ patch-2.5.9/patch.man
+@@ -517,6 +517,9 @@ instead of the default
+ .B \&.rej
+ file.
+ .TP
++\fB\*=reject\-unified\fP
++Produce unified reject files. The default is to produce context type reject files.
++.TP
+ \fB\-R\fP or \fB\*=reverse\fP
+ Assume that this patch was created with the old and new files swapped.
+ (Yes, I'm afraid that does happen occasionally, human nature being what it
+Index: patch-2.5.9/common.h
+===================================================================
+--- patch-2.5.9.orig/common.h
++++ patch-2.5.9/common.h
+@@ -146,6 +146,7 @@ XTERN int invc;
+ XTERN struct stat instat;
+ XTERN bool dry_run;
+ XTERN bool posixly_correct;
++XTERN bool unified_reject_files;
+
+ XTERN char const *origprae;
+ XTERN char const *origbase;
+Index: patch-2.5.9/patch.c
+===================================================================
+--- patch-2.5.9.orig/patch.c
++++ patch-2.5.9/patch.c
+@@ -522,6 +522,7 @@ static struct option const longopts[] =
+ {"no-backup-if-mismatch", no_argument, NULL, CHAR_MAX + 6},
+ {"posix", no_argument, NULL, CHAR_MAX + 7},
+ {"quoting-style", required_argument, NULL, CHAR_MAX + 8},
++ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 9},
+ {NULL, no_argument, NULL, 0}
+ };
+
+@@ -580,6 +581,7 @@ static char const *const option_help[] =
+ " --verbose Output extra information about the work being done.",
+ " --dry-run Do not actually change any files; just print what would happen.",
+ " --posix Conform to the POSIX standard.",
++" --unified-reject-files Create unified reject files.",
+ "",
+ " -d DIR --directory=DIR Change the working directory to DIR first.",
+ #if HAVE_SETMODE_DOS
+@@ -779,6 +781,9 @@ get_some_switches (void)
+ (enum quoting_style) i);
+ }
+ break;
++ case CHAR_MAX + 9:
++ unified_reject_files = true;
++ break;
+ default:
+ usage (stderr, 2);
+ }
+@@ -927,6 +932,24 @@ locate_hunk (LINENUM fuzz)
+ return 0;
+ }
+
++static char *
++format_linerange (char rangebuf[LINENUM_LENGTH_BOUND*2 + 2],
++ LINENUM first, LINENUM lines)
++{
++ if (lines == 1)
++ rangebuf = format_linenum (rangebuf, first);
++ else
++ {
++ char *rb;
++ rangebuf = format_linenum (rangebuf + LINENUM_LENGTH_BOUND + 1, lines);
++ rb = rangebuf-1;
++ rangebuf = format_linenum (rangebuf - LINENUM_LENGTH_BOUND - 1,
++ (lines > 0) ? first : 0);
++ *rb = ',';
++ }
++ return rangebuf;
++}
++
+ /* We did not find the pattern, dump out the hunk so they can handle it. */
+
+ static void
+@@ -943,8 +966,83 @@ abort_hunk (void)
+ (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ****" : "";
+ char const *minuses =
+ (int) NEW_CONTEXT_DIFF <= (int) diff_type ? " ----" : " -----";
++ char const *function = pch_c_function();
++ if (function == NULL)
++ function = "";
++
++ if (unified_reject_files)
++ {
++ /* produce unified reject files */
++ char rangebuf0[LINENUM_LENGTH_BOUND*2 + 2];
++ char rangebuf1[LINENUM_LENGTH_BOUND*2 + 2];
++ LINENUM j;
++
++ /* Find the beginning of the remove and insert section. */
++ for (j = 0; j <= pat_end; j++)
++ if (pch_char (j) == '=')
++ break;
++ for (i = j+1; i <= pat_end; i++)
++ if (pch_char (i) == '^')
++ break;
++ if (pch_char (0) != '*' || j > pat_end || i > pat_end+1)
++ fatal ("internal error in abort_hunk");
++ i = 1; j++;
++
++ /* @@ -from,lines +to,lines @@ */
++ fprintf (rejfp, "@@ -%s +%s @@%s\n",
++ format_linerange (rangebuf0, oldfirst, pch_ptrn_lines()),
++ format_linerange (rangebuf1, newfirst, pch_repl_lines()),
++ function);
++
++ while ( (i <= pat_end && pch_char (i) != '=')
++ || (j <= pat_end && pch_char (j) != '^'))
++ {
++ if (i <= pat_end
++ && (pch_char (i) == '-' || pch_char (i) == '!'))
++ {
++ fputc('-', rejfp);
++ pch_write_line (i++, rejfp);
++ }
++ else if (j <= pat_end
++ && (pch_char (j) == '+' || pch_char (j) == '!'))
++ {
++ fputc('+', rejfp);
++ pch_write_line (j++, rejfp);
++ }
++ else if ((i <= pat_end
++ && (pch_char (i) == ' ' || pch_char (i) == '\n')) &&
++ (j > pat_end
++ || (pch_char (j) == ' ' || pch_char (j) == '\n')))
++ {
++ /* Unless j is already past the end, lines i and j
++ must be equal here. */
++
++ if (pch_char (i) == ' ')
++ fputc(' ', rejfp);
++ pch_write_line (i++, rejfp);
++ if (j <= pat_end)
++ j++;
++ }
++ else if ((j <= pat_end &&
++ (pch_char (j) == ' ' || pch_char (j) == '\n')) &&
++ (pch_char (i) == '='))
++ {
++ if (pch_char (j) == ' ')
++ fputc(' ', rejfp);
++ pch_write_line (j++, rejfp);
++ }
++ else
++ fatal ("internal error in abort_hunk");
++ }
++
++ if (ferror (rejfp))
++ write_fatal ();
++ return;
++ }
+
+- fprintf(rejfp, "***************\n");
++ /* produce context type reject files */
++
++ fprintf(rejfp, "***************%s\n", function);
+ for (i=0; i<=pat_end; i++) {
+ char numbuf0[LINENUM_LENGTH_BOUND + 1];
+ 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 0000000..4ce5170
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch.inc
@@ -0,0 +1,19 @@
+DESCRIPTION = "patch takes a patch file containing a difference listing \
+produced by the diff program and applies those differences to one or more \
+original files, producing patched versions."
+LICENSE = "GPL"
+PRIORITY = "standard"
+SECTION = "utils"
+
+SRC_URI = "${GNU_MIRROR}/patch/patch-${PV}.tar.gz"
+S = "${WORKDIR}/patch-${PV}"
+
+inherit autotools update-alternatives
+
+do_install_append () {
+ mv ${D}${bindir}/patch ${D}${bindir}/patch.${PN}
+}
+
+ALTERNATIVE_NAME = "patch"
+ALTERNATIVE_PATH = "patch.${PN}"
+ALTERNATIVE_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 0000000..ff48554
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch_2.5.9.bb
@@ -0,0 +1,10 @@
+require patch.inc
+
+SRC_URI = "${GNU_MIRROR}/patch/patch-2.5.4.tar.gz \
+ file://2.5.9.patch;patch=1 \
+ file://debian.patch;patch=1 \
+ file://install.patch;patch=1 \
+ file://unified-reject-files.diff;patch=1 \
+ file://global-reject-file.diff;patch=1 "
+S = "${WORKDIR}/patch-2.5.4"
+PR = "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 0000000..f450f32
--- /dev/null
+++ b/meta/recipes-devtools/pax-utils/pax-utils_0.2.1.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "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"
+HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
+LICENSE = "GPLv2+"
+
+SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.bz2"
+
+PR = "r0"
+
+do_install() {
+ oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
+}
+
+BBCLASSEXTEND = "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 0000000..d3948a9
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/Configure-multilib.patch
@@ -0,0 +1,11 @@
+--- perl-5.8.7/Configure.orig 2006-01-30 10:50:04.000000000 +0000
++++ perl-5.8.7/Configure 2006-01-30 10:51:18.000000000 +0000
+@@ -1240,7 +1240,7 @@
+ loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+ : general looking path for locating libraries
+-glibpth="/lib /usr/lib $xlibpth"
++glibpth="/lib /usr/lib /lib64 /usr/lib64 $xlibpth"
+ glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+ test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+ 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 0000000..24722ee
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/letgcc-find-errno.patch
@@ -0,0 +1,42 @@
+This removes all the logic that perl uses to locate an appropriate
+errno.h for the target. Instead we simple create a file that does
+
+ #include "errno.h"
+
+and use that as the file to parse. This is needed when using an
+external toolchain since perl will search in ${STAGING_INCDIR} for
+errno.h (when using gcc) and that isn't where it's located - its
+wherever the external toolchain keeps it's headers.
+
+--- perl-5.8.8/ext/Errno/Errno_pm.PL 2007/04/30 14:10:10 1.1
++++ perl-5.8.8/ext/Errno/Errno_pm.PL 2007/04/30 14:21:35
+@@ -11,8 +11,18 @@
+ open OUT, ">Errno.pm" or die "Cannot open Errno.pm: $!";
+ select OUT;
+ my $file;
+-my @files = get_files();
+-if ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
++#my @files = get_files();
++my @files = ("errno.h");
++
++if (1) {
++ open INCS, '>includes.c' or
++ die "Cannot open includes.c";
++ print INCS qq[#include "errno.h"\n];
++ close INCS;
++ process_file('includes.c');
++ unlink 'includes.c';
++}
++elsif ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
+ # MinGW complains "warning: #pragma system_header ignored outside include
+ # file" if the header files are processed individually, so include them
+ # all in .c file and process that instead.
+@@ -44,7 +54,7 @@
+ chomp($file = `cygpath -w "$file"`);
+ }
+
+- return unless defined $file and -f $file;
++# return unless defined $file and -f $file;
+ # warn "Processing $file\n";
+
+ 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 0000000..6b34ec2
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/libperl-5.8.3-create-libperl-soname.patch
@@ -0,0 +1,11 @@
+--- Makefile.SH.orig 2003-07-10 14:59:04.000000000 -0700
++++ Makefile.SH 2003-07-10 15:14:08.000000000 -0700
+@@ -494,7 +494,7 @@
+ case "$useshrplib" in
+ true)
+ $spitshell >>Makefile <<'!NO!SUBS!'
+- $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
++ $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs) -soname libperl.so.5
+ !NO!SUBS!
+ case "$osname" in
+ 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 0000000..653a475
--- /dev/null
+++ b/meta/recipes-devtools/perl/files/perl-5.8.8-gcc-4.2.patch
@@ -0,0 +1,13 @@
+See http://bugs.openembedded.net/show_bug.cgi?id=2168
+Fix for gcc 4.2
+
+--- perl-5.8.8/makedepend.SH.ark 2006-11-01 16:32:05.000000000 +0100
++++ perl-5.8.8/makedepend.SH 2006-11-01 16:32:15.000000000 +0100
+@@ -167,6 +167,7 @@
+ -e '/^#.*<builtin>/d' \
+ -e '/^#.*<built-in>/d' \
+ -e '/^#.*<command line>/d' \
++ -e '/^#.*<command-line>/d' \
+ -e '/^#.*"-"/d' \
+ -e '/: file path prefix .* never used$/d' \
+ -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 0000000..6ba56b3
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-parser-perl-native_2.36.bb
@@ -0,0 +1,7 @@
+SECTION = "libs"
+
+require libxml-parser-perl_${PV}.bb
+
+inherit native
+
+DEPENDS = "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 0000000..8188405
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
@@ -0,0 +1,21 @@
+SECTION = "libs"
+LICENSE = "Artistic"
+DEPENDS += "expat expat-native"
+
+SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
+
+S = "${WORKDIR}/XML-Parser-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan
+
+do_compile() {
+ export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
+ cpan_do_compile
+}
+
+
+
+FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
+ ${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 0000000..bfdfc3d
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-simple-perl-native_2.18.bb
@@ -0,0 +1,7 @@
+SECTION = "libs"
+
+inherit native
+
+require libxml-simple-perl_${PV}.bb
+
+DEPENDS = "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 0000000..6cab76b
--- /dev/null
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.18.bb
@@ -0,0 +1,10 @@
+SECTION = "libs"
+LICENSE = "Artistic"
+DEPENDS += "libxml-parser-perl"
+PR = "r0"
+
+SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
+
+S = "${WORKDIR}/XML-Simple-${PV}"
+
+inherit 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 0000000..f550537
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/09_fix_installperl.patch
@@ -0,0 +1,32 @@
+Correctly identify arch-specific modules in ext/ where the .pm files
+are under lib.
+
+Ensure that POSIX/SigAction is kept with the rest of the POSIX module
+under archlib.
+
+diff --exclude=debian -Naur perl-5.8.8.orig/installperl perl-5.8.8/installperl
+--- perl-5.8.8.orig/installperl 2006-01-29 02:35:28.000000000 +1100
++++ perl-5.8.8/installperl 2006-05-31 22:54:41.000000000 +1000
+@@ -156,11 +156,8 @@
+ if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
+ my($path, $modname) = ($1,$2);
+
+- # strip trailing component first
+- $path =~ s{/[^/]*$}{};
+-
+- # strip optional "/lib";
+- $path =~ s{/lib\b}{};
++ # strip to optional "/lib", or remove trailing component
++ $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
+
+ # strip any leading /
+ $path =~ s{^/}{};
+@@ -851,7 +848,7 @@
+ }
+
+ if (-f $_) {
+- if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$] && $archpms{$1})) {
++ if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$])) {
+ $installlib = $installprivlib;
+ #We're installing *.al and *.ix files into $installprivlib,
+ #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 0000000..8a964f9
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/52_debian_extutils_hacks.patch
@@ -0,0 +1,234 @@
+Various debian-specific ExtUtils changes:
+
+ * Respect umask during installation, and set as appropriate for each of
+ perl, vendor and site (policy requires group writable site dirs).
+
+ * Don't install .packlist or perllocal.pod for perl or vendor.
+ * Fiddle with *PREFIX and variables written to the makefile so that
+ install directories may be changed when make is run by passing
+ PREFIX= to the "make install" command (used when packaging
+ modules).
+
+ * Set location of libperl.a to /usr/lib.
+ * Note that libperl-dev package is required for embedded linking.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Embed.pm perl-5.8.8/lib/ExtUtils/Embed.pm
+--- perl-5.8.8.orig/lib/ExtUtils/Embed.pm 2004-08-03 20:41:49.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/Embed.pm 2006-02-05 10:42:11.000000000 +1100
+@@ -300,6 +300,9 @@
+ Typically, an application B<Makefile> will invoke ExtUtils::Embed
+ functions while building your application.
+
++Note that on Debian systems the B<libperl-dev> package is required for
++compiling applications which embed an interpreter.
++
+ =head1 @EXPORT
+
+ ExtUtils::Embed exports the following functions:
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/Install.pm perl-5.8.8/lib/ExtUtils/Install.pm
+--- perl-5.8.8.orig/lib/ExtUtils/Install.pm 2005-10-21 22:00:01.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/Install.pm 2006-02-05 10:42:11.000000000 +1100
+@@ -173,8 +173,8 @@
+ if (-f $targetfile){
+ forceunlink($targetfile) unless $nonono;
+ } else {
+- mkpath($targetdir,0,0755) unless $nonono;
+- print "mkpath($targetdir,0,0755)\n" if $verbose>1;
++ mkpath($targetdir) unless $nonono;
++ print "mkpath($targetdir)\n" if $verbose>1;
+ }
+ copy($sourcefile, $targetfile) unless $nonono;
+ print "Installing $targetfile\n";
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm perl-5.8.8/lib/ExtUtils/MM_Any.pm
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Any.pm 2005-04-13 17:49:53.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/MM_Any.pm 2006-02-05 11:17:52.000000000 +1100
+@@ -645,8 +645,6 @@
+ sub manifypods_target {
+ my($self) = shift;
+
+- my $man1pods = '';
+- my $man3pods = '';
+ my $dependencies = '';
+
+ # populate manXpods & dependencies:
+@@ -666,7 +664,7 @@
+ foreach my $section (qw(1 3)) {
+ my $pods = $self->{"MAN${section}PODS"};
+ push @man_cmds, $self->split_command(<<CMD, %$pods);
+- \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW)
++ \$(NOECHO) \$(POD2MAN) --section=\$(MAN${section}EXT) --perm_rw=\$(PERM_RW)
+ CMD
+ }
+
+@@ -1080,9 +1078,11 @@
+ $self->{SITEPREFIX} ||= $sprefix;
+ $self->{VENDORPREFIX} ||= $vprefix;
+
+- # Lots of MM extension authors like to use $(PREFIX) so we
+- # put something sensible in there no matter what.
+- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
++ my $p = $self->{PREFIX} = $self->{PERLPREFIX};
++ for my $t (qw/PERL SITE VENDOR/)
++ {
++ $self->{"${t}PREFIX"} =~ s!^\Q$p\E(?=/|$)!\$(PREFIX)!;
++ }
+ }
+
+ my $arch = $Config{archname};
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
+@@ -2054,9 +2054,7 @@
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+ pure_perl_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+@@ -2068,7 +2066,7 @@
+
+
+ pure_site_install ::
+- $(NOECHO) $(MOD_INSTALL) \
++ $(NOECHO) umask 02; $(MOD_INSTALL) \
+ read }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+ write }.$self->catfile('$(DESTINSTALLSITEARCH)','auto','$(FULLEXT)','.packlist').q{ \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+@@ -2081,9 +2079,7 @@
+ }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
+
+ pure_vendor_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+@@ -2092,37 +2088,19 @@
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+ doc_perl_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLPRIVLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ doc_site_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
++ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
++ -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
++ -$(NOECHO) umask 02; $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
++ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
+
+ doc_vendor_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLVENDORLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ };
+
+@@ -2131,13 +2109,12 @@
+ $(NOECHO) $(NOOP)
+
+ uninstall_from_perldirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_vendordirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
++
+ };
+
+ join("",@m);
+@@ -2415,7 +2392,7 @@
+ ($lperl = $libperl) =~ s/\$\(A\)/$self->{LIB_EXT}/;
+ }
+ unless ($libperl && -f $lperl) { # Ilya's code...
+- my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
++ my $dir = $self->{PERL_SRC} || "/usr/lib";
+ $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
+ $libperl ||= "libperl$self->{LIB_EXT}";
+ $libperl = "$dir/$libperl";
+@@ -3007,8 +2984,7 @@
+ print STDERR " prefixify $var => $path\n" if $Verbose >= 2;
+ print STDERR " from $sprefix to $rprefix\n" if $Verbose >= 2;
+
+- if( $self->{ARGS}{PREFIX} && $self->file_name_is_absolute($path) &&
+- $path !~ s{^\Q$sprefix\E\b}{$rprefix}s )
++ if( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s && $self->{ARGS}{PREFIX} )
+ {
+
+ print STDERR " cannot prefix, using default.\n" if $Verbose >= 2;
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST.t perl-5.8.8/lib/ExtUtils/t/INST.t
+--- perl-5.8.8.orig/lib/ExtUtils/t/INST.t 2005-10-21 19:12:39.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/t/INST.t 2006-02-05 17:48:56.000000000 +1100
+@@ -65,9 +65,7 @@
+ is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
+ is( $mm->{VERSION}, 0.01, 'VERSION' );
+
+-my $config_prefix = $Config{installprefixexp} || $Config{installprefix} ||
+- $Config{prefixexp} || $Config{prefix};
+-is( $mm->{PERLPREFIX}, $config_prefix, 'PERLPREFIX' );
++is( $mm->{PERLPREFIX}, '$(PREFIX)', 'PERLPREFIX' );
+
+ is( !!$mm->{PERL_CORE}, !!$ENV{PERL_CORE}, 'PERL_CORE' );
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t
+--- perl-5.8.8.orig/lib/ExtUtils/t/INST_PREFIX.t 2005-10-21 22:00:19.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/t/INST_PREFIX.t 2006-02-05 17:48:06.000000000 +1100
+@@ -16,7 +16,7 @@
+ }
+
+ use strict;
+-use Test::More tests => 52;
++use Test::More tests => 47;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+ use ExtUtils::MakeMaker;
+@@ -62,16 +62,16 @@
+ Writing\ $Makefile\ for\ Big::Dummy\n
+ }x );
+
+-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
++#is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
+
+ isa_ok( $mm, 'ExtUtils::MakeMaker' );
+
+ is( $mm->{NAME}, 'Big::Dummy', 'NAME' );
+ is( $mm->{VERSION}, 0.01, 'VERSION' );
+
+-foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
+- unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
+-}
++#foreach my $prefix (qw(PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX)) {
++# unlike( $mm->{$prefix}, qr/\$\(PREFIX\)/ );
++#}
+
+
+ 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 0000000..df74bc5
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/53_debian_mod_paths.patch
@@ -0,0 +1,107 @@
+Tweak @INC so that the ordering is:
+
+ etc (for config files)
+ site (5.8.1)
+ vendor (all)
+ core (5.8.1)
+ site (version-indep)
+ site (pre-5.8.1)
+
+The rationale being that an admin (via site), or module packager
+(vendor) can chose to shadow core modules when there is a newer
+version than is included in core.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/perl.c perl-5.8.8/perl.c
+--- perl-5.8.8.orig/perl.c 2006-01-31 23:34:47.000000000 +1100
++++ perl-5.8.8/perl.c 2006-02-02 23:36:38.000000000 +1100
+@@ -4776,9 +4776,14 @@
+ incpush(APPLLIB_EXP, TRUE, TRUE, TRUE);
+ #endif
+
++#if 1
++ /* for configuration where /usr is mounted ro (CPAN::Config, Net::Config) */
++ incpush("/etc/perl", FALSE, FALSE, FALSE);
++#else
+ #ifdef ARCHLIB_EXP
+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
+ #endif
++#endif
+ #ifdef MACOS_TRADITIONAL
+ {
+ Stat_t tmpstatbuf;
+@@ -4803,11 +4808,13 @@
+ #ifndef PRIVLIB_EXP
+ # define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
+ #endif
++#if 0
+ #if defined(WIN32)
+ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE);
+ #else
+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
+ #endif
++#endif
+
+ #ifdef SITEARCH_EXP
+ /* sitearch is always relative to sitelib on Windows for
+@@ -4850,6 +4857,61 @@
+ incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE);
+ #endif
+
++#if 1
++ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
++ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
++
++ /* Non-versioned site directory for local modules and for
++ compatability with the previous packages' site dirs */
++ incpush("/usr/local/lib/site_perl", TRUE, FALSE, FALSE);
++
++#ifdef PERL_INC_VERSION_LIST
++ {
++ struct stat s;
++
++ /* add small buffer in case old versions are longer than the
++ current version */
++ char sitearch[sizeof(SITEARCH_EXP)+16] = SITEARCH_EXP;
++ char sitelib[sizeof(SITELIB_EXP)+16] = SITELIB_EXP;
++ char const *vers[] = { PERL_INC_VERSION_LIST };
++ char const **p;
++
++ char *arch_vers = strrchr(sitearch, '/');
++ char *lib_vers = strrchr(sitelib, '/');
++
++ if (arch_vers && isdigit(*++arch_vers))
++ *arch_vers = 0;
++ else
++ arch_vers = 0;
++
++ if (lib_vers && isdigit(*++lib_vers))
++ *lib_vers = 0;
++ else
++ lib_vers = 0;
++
++ /* there is some duplication here as incpush does something
++ similar internally, but required as sitearch is not a
++ subdirectory of sitelib */
++ for (p = vers; *p; p++)
++ {
++ if (arch_vers)
++ {
++ strcpy(arch_vers, *p);
++ if (PerlLIO_stat(sitearch, &s) >= 0 && S_ISDIR(s.st_mode))
++ incpush(sitearch, FALSE, FALSE, FALSE);
++ }
++
++ if (lib_vers)
++ {
++ strcpy(lib_vers, *p);
++ if (PerlLIO_stat(sitelib, &s) >= 0 && S_ISDIR(s.st_mode))
++ incpush(sitelib, FALSE, FALSE, FALSE);
++ }
++ }
++ }
++#endif
++#endif
++
+ #ifdef PERL_OTHERLIBDIRS
+ incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE);
+ #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 0000000..432cd85
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/54_debian_perldoc-r.patch
@@ -0,0 +1,16 @@
+In a Debian installation, not all directories in @INC need exist (the
+site directories for example are created on demand).
+
+Suggested by Joey Hess <joeyh@debian.org>.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/Pod/Perldoc.pm perl-5.8.8/lib/Pod/Perldoc.pm
+--- perl-5.8.8.orig/lib/Pod/Perldoc.pm 2004-12-29 23:15:33.000000000 +1100
++++ perl-5.8.8/lib/Pod/Perldoc.pm 2006-02-02 23:38:49.000000000 +1100
+@@ -1533,6 +1533,7 @@
+ $self->{'target'} = (splitdir $s)[-1]; # XXX: why not use File::Basename?
+ for ($i=0; $i<@dirs; $i++) {
+ $dir = $dirs[$i];
++ next unless -d $dir; # some dirs in @INC are optional
+ ($dir = VMS::Filespec::unixpath($dir)) =~ s!/\z!! if IS_VMS;
+ if ( (! $self->opt_m && ( $ret = $self->check_file($dir,"$s.pod")))
+ 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 0000000..b38c70c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/58_debian_cpan_config_path.patch
@@ -0,0 +1,14 @@
+Set location of CPAN::Config to /etc/perl as /usr may not be writable.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/CPAN.pm perl-5.8.8/lib/CPAN.pm
+--- perl-5.8.8.orig/lib/CPAN.pm 2006-02-01 01:11:22.000000000 +1100
++++ perl-5.8.8/lib/CPAN.pm 2006-02-02 23:49:26.000000000 +1100
+@@ -1246,7 +1246,7 @@
+ $configpm = $INC{"CPAN/MyConfig.pm"};
+ $redo++;
+ } else {
+- my($path_to_cpan) = File::Basename::dirname($INC{"CPAN.pm"});
++ my($path_to_cpan) = '/etc/perl';
+ my($configpmdir) = File::Spec->catdir($path_to_cpan,"CPAN");
+ my($configpmtest) = File::Spec->catfile($configpmdir,"Config.pm");
+ 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 0000000..7842ce1
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/60_debian_libnet_config_path.patch
@@ -0,0 +1,16 @@
+Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/Net/Config.pm perl-5.8.8/lib/Net/Config.pm
+--- perl-5.8.8.orig/lib/Net/Config.pm 2002-03-01 01:04:31.000000000 +1100
++++ perl-5.8.8/lib/Net/Config.pm 2006-02-03 00:00:55.000000000 +1100
+@@ -57,9 +57,8 @@
+ }
+ TRY_INTERNET_CONFIG
+
+-my $file = __FILE__;
++my $file = '/etc/perl/Net/libnet.cfg';
+ my $ref;
+-$file =~ s/Config.pm/libnet.cfg/;
+ if ( -f $file ) {
+ $ref = eval { local $SIG{__DIE__}; do $file };
+ 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 0000000..682061d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/62_debian_cpan_definstalldirs.patch
@@ -0,0 +1,16 @@
+Some modules which are included in core set INSTALLDIRS => 'perl'
+explicitly in Makefile.PL. This makes sense for the normal @INC
+ordering, but not ours. Provide a sensible default.
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/CPAN/FirstTime.pm perl-5.8.8/lib/CPAN/FirstTime.pm
+--- perl-5.8.8.orig/lib/CPAN/FirstTime.pm 2006-01-31 08:08:57.000000000 +1100
++++ perl-5.8.8/lib/CPAN/FirstTime.pm 2006-02-03 00:05:24.000000000 +1100
+@@ -358,7 +358,7 @@
+
+ };
+
+- $default = $CPAN::Config->{makepl_arg} || "";
++ $default = $CPAN::Config->{makepl_arg} || "INSTALLDIRS=site";
+ $CPAN::Config->{makepl_arg} =
+ prompt("Parameters for the 'perl Makefile.PL' command?
+ 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 0000000..c207a93
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/64_debian_enc2xs_inc.patch
@@ -0,0 +1,28 @@
+Tweak enc2xs to handle Debian @INC: ignore missing directories,
+follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
+
+diff -Naur --exclude=debian perl-5.8.8.orig/ext/Encode/bin/enc2xs perl-5.8.8/ext/Encode/bin/enc2xs
+--- perl-5.8.8.orig/ext/Encode/bin/enc2xs 2004-09-03 01:53:51.000000000 +1000
++++ perl-5.8.8/ext/Encode/bin/enc2xs 2006-02-03 00:21:32.000000000 +1100
+@@ -909,10 +909,11 @@
+ eval { require File::Find; };
+ my (@inc, %e2x_dir);
+ for my $inc (@INC){
++ next unless -d $inc; # skip non-existent directories
+ push @inc, $inc unless $inc eq '.'; #skip current dir
+ }
+ File::Find::find(
+- sub {
++ { wanted => sub {
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks)
+ = lstat($_) or return;
+@@ -922,7 +923,7 @@
+ $e2x_dir{$File::Find::dir} ||= $mtime;
+ }
+ return;
+- }, @inc);
++ }, follow => 1}, @inc);
+ warn join("\n", keys %e2x_dir), "\n";
+ for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
+ $_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 0000000..ab9c4b7
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.SH.patch
@@ -0,0 +1,253 @@
+Index: perl-5.8.8/Makefile.SH
+===================================================================
+--- perl-5.8.8.orig/Makefile.SH 2006-01-24 23:49:44.000000000 +1100
++++ perl-5.8.8/Makefile.SH 2007-06-14 13:29:37.000000000 +1000
+@@ -43,12 +43,12 @@
+ true)
+ # Prefix all runs of 'miniperl' and 'perl' with
+ # $ldlibpth so that ./perl finds *this* shared libperl.
+- case "$LD_LIBRARY_PATH" in
+- '')
+- ldlibpth="LD_LIBRARY_PATH=`pwd`";;
+- *)
+- ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
+- esac
++# case "$LD_LIBRARY_PATH" in
++# '')
++# ldlibpth="LD_LIBRARY_PATH=`pwd`";;
++# *)
++# ldlibpth="LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}";;
++# esac
+
+ pldlflags="$cccdlflags"
+ static_target='static_pic'
+@@ -108,7 +108,8 @@
+ ldlibpth=''
+ ;;
+ *)
+- eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
++# We compile in the library path in OE from cross-compile, so lets not do this
++# eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
+ ;;
+ esac
+ # Strip off any trailing :'s
+@@ -129,18 +130,7 @@
+ # INSTALL file, under "Building a shared perl library".
+ # If there is no pre-existing $libperl, we don't need
+ # to do anything further.
+- if test -f $archlib/CORE/$libperl; then
+- rm -f preload
+- cat <<'EOT' > preload
+-#! /bin/sh
+-lib=$1
+-shift
+-test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
+-exec "$@"
+-EOT
+- chmod 755 preload
+- ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl"
+- fi
++ echo linux libraries overwritten by cross-compile patches
+ ;;
+ os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth"
+ ;;
+@@ -401,9 +391,19 @@
+ .c.s:
+ $(CCCMDSRC) -S $*.c
+
+-all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+- @echo " ";
+- @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
++#all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) extra.pods $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
++# @echo " ";
++# @echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
++
++all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) $(unidatafiles)
++
++more: extra.pods $(private) $(public)
++
++more2: $(dynamic_ext)
++
++more3: $(nonxs_ext)
++
++more4: extras.make
+
+ .PHONY: all compile translators utilities
+
+@@ -413,10 +413,10 @@
+ cd x2p; $(MAKE) compile;
+ cd pod; $(MAKE) compile;
+
+-translators: miniperl$(EXE_EXT) $(CONFIGPM) FORCE
++translators: $(CONFIGPM) FORCE
+ @echo " "; echo " Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
+
+-utilities: miniperl$(EXE_EXT) $(CONFIGPM) $(plextract) lib/lib.pm FORCE
++utilities: $(CONFIGPM) $(plextract) lib/lib.pm FORCE
+ @echo " "; echo " Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
+
+
+@@ -550,7 +550,7 @@
+ case "$useshrplib" in
+ true)
+ $spitshell >>Makefile <<'!NO!SUBS!'
+- $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs)
++ $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) $(libs) -Wl,-soname,libperl.so.5
+ !NO!SUBS!
+ case "$osname" in
+ aix)
+@@ -591,7 +591,9 @@
+ $(CC) -o miniperl $(CLDFLAGS) \
+ `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
+- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++ mv -f miniperl miniperl-target
++ ln -s hostperl miniperl
++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ !NO!SUBS!
+ ;;
+ next4*)
+@@ -599,7 +601,9 @@
+ miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL) opmini$(OBJ_EXT)
+ $(CC) -o miniperl `echo $(obj) | sed 's/ op$(OBJ_EXT) / /'` \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perl$(OBJ_EXT) $(libs)
+- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++ mv -f miniperl miniperl-target
++ ln -s hostperl miniperl
++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ !NO!SUBS!
+ ;;
+ darwin*)
+@@ -620,7 +624,9 @@
+ -@rm -f miniperl.xok
+ $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o miniperl \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
+- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++ mv -f miniperl miniperl-target
++ ln -s hostperl miniperl
++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ !NO!SUBS!
+ ;;
+ *)
+@@ -629,7 +635,9 @@
+ -@rm -f miniperl.xok
+ $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl \
+ miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
+- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++ mv -f miniperl miniperl-target
++ ln -s hostperl miniperl
++# $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+ !NO!SUBS!
+ ;;
+ esac
+@@ -766,7 +774,7 @@
+ # We need to autosplit in two steps because VOS can't handle so many args
+ #
+ .PHONY: preplibrary
+-preplibrary: miniperl$(EXE_EXT) $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
++preplibrary: $(CONFIGPM) lib/lib.pm $(PREPLIBRARY_LIBPERL)
+ @sh ./makedir lib/auto
+ @echo " AutoSplitting perl library"
+ $(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
+@@ -775,35 +783,35 @@
+ autosplit_lib_modules(@ARGV)' lib/*/*.pm
+ $(MAKE) lib/re.pm
+
+-lib/Config.pod: config.sh miniperl$(EXE_EXT) configpm Porting/Glossary
++lib/Config.pod: config.sh configpm Porting/Glossary
+ $(LDLIBPTH) ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm
+
+ $(CONFIGPM): lib/Config.pod
+
+-lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl $(CONFIGPM)
++lib/ExtUtils/Miniperl.pm: miniperlmain.c minimod.pl $(CONFIGPM)
+ $(LDLIBPTH) ./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
+
+ lib/re.pm: ext/re/re.pm
+ cp ext/re/re.pm lib/re.pm
+
+-$(plextract): miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p
++$(plextract): $(CONFIGPM) x2p/s2p
+ @-rm -f $@
+ $(LDLIBPTH) ./miniperl -I`pwd`/lib $@.PL
+
+-x2p/s2p: miniperl$(EXE_EXT) $(CONFIGPM) x2p/s2p.PL
++x2p/s2p: $(CONFIGPM) x2p/s2p.PL
+ cd x2p; $(LDLIBPTH) $(MAKE) s2p
+
+-lib/lib.pm: miniperl$(EXE_EXT) $(CONFIGPM)
++lib/lib.pm: $(CONFIGPM)
+ @-rm -f $@
+ $(LDLIBPTH) ./miniperl -Ilib lib/lib_pm.PL
+
+ unidatafiles $(unidatafiles): uni.data
+
+-uni.data: miniperl$(EXE_EXT) $(CONFIGPM) lib/unicore/mktables
++uni.data: $(CONFIGPM) lib/unicore/mktables
+ cd lib/unicore && $(LDLIBPTH) ../../miniperl -I../../lib mktables -w
+ touch uni.data
+
+-extra.pods: miniperl$(EXE_EXT)
++extra.pods:
+ -@test -f extra.pods && rm -f `cat extra.pods`
+ -@rm -f extra.pods
+ -@for x in `grep -l '^=[a-z]' README.* | grep -v README.vms` ; do \
+@@ -850,18 +858,7 @@
+ INSTALL_DEPENDENCE = all
+
+ install.perl: $(INSTALL_DEPENDENCE) installperl
+- if [ -n "$(COMPILE)" ]; \
+- then \
+- cd utils; $(MAKE) compile; \
+- cd ../x2p; $(MAKE) compile; \
+- cd ../pod; $(MAKE) compile; \
+- else :; \
+- fi
+- $(LDLIBPTH) ./perl installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+- $(MAKE) extras.install
+-
+-install.man: all installman
+- $(LDLIBPTH) ./perl installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
++ ./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+
+ # XXX Experimental. Hardwired values, but useful for testing.
+ # Eventually Configure could ask for some of these values.
+@@ -978,16 +975,16 @@
+ #
+ # DynaLoader may be needed for extensions that use Makefile.PL.
+
+-$(DYNALOADER): miniperl$(EXE_EXT) preplibrary FORCE
++$(DYNALOADER): preplibrary FORCE
+ @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
+-d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
++d_dummy $(dynamic_ext): preplibrary $(DYNALOADER) FORCE
+ @$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
+-s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
++s_dummy $(static_ext): preplibrary $(DYNALOADER) FORCE
+ @$(LDLIBPTH) sh ext/util/make_ext $(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
+-n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary $(DYNALOADER) FORCE
++n_dummy $(nonxs_ext): preplibrary $(DYNALOADER) FORCE
+ @$(LDLIBPTH) sh ext/util/make_ext nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+
+ .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
+@@ -1125,7 +1122,7 @@
+
+ test_prep_pre: preplibrary utilities $(nonxs_ext)
+
+-test_prep: test_prep_pre miniperl$(EXE_EXT) $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
++test_prep: test_prep_pre $(unidatafiles) perl$(EXE_EXT) $(dynamic_ext) $(TEST_PERL_DLL)
+ PERL=./perl $(MAKE) _test_prep
+
+ _test_tty:
+@@ -1238,7 +1235,7 @@
+
+ # Can't depend on lib/Config.pm because that might be where miniperl
+ # is crashing.
+-minitest: miniperl$(EXE_EXT) lib/re.pm minitest.prep
++minitest: lib/re.pm minitest.prep
+ - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
+ && $(LDLIBPTH) ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
+
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 0000000..ed494b3
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/Makefile.patch
@@ -0,0 +1,61 @@
+Index: perl-5.8.8/Cross/Makefile
+===================================================================
+--- perl-5.8.8.orig/Cross/Makefile 2004-01-12 21:44:01.000000000 +0100
++++ perl-5.8.8/Cross/Makefile 2007-08-15 00:15:18.000000000 +0200
+@@ -2,7 +2,8 @@
+ #
+ ## $Id: Makefile,v 1.7 2004/01/12 15:41:02 red Exp red $
+
+-export TOPDIR=${shell pwd}
++override TOPDIR=${shell pwd}
++export TOPDIR
+ include $(TOPDIR)/config
+ export CFLAGS
+ export SYS=$(ARCH)-$(OS)
+@@ -12,7 +13,7 @@
+
+ export CC = $(CROSS)gcc
+ export CXX = $(CROSS)g++
+-export LD = $(CROSS)ld
++export LD = $(CC)
+ export STRIP = $(CROSS)strip
+ export AR = $(CROSS)ar
+ export RANLIB = $(CROSS)ranlib
+@@ -34,21 +35,6 @@
+ all:
+ @echo Please read the README file before doing anything else.
+
+-gen_patch:
+- diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
+- diff -Bbur ../installperl installperl > installperl.patch
+-
+-patch:
+- cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
+- patch -p1 < Cross/Makefile.SH.patch; \
+- patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
+- sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
+- touch CROSS_PATCHED ; fi
+-
+-dry_patch:
+- cd .. ; patch --dry-run -p1 < Cross/Makefile.SH.patch; \
+- patch --dry-run -p1 < Cross/installperl.patch; \
+-
+ perl:
+ @echo Perl cross-build directory is $(TOPDIR)
+ @echo Target arch is $(SYS)
+@@ -58,11 +44,11 @@
+ $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
+ cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
+ cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm fake_config_library
+- cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
+- cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
+- cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
++ cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
++ cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
++ cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=hostperl -I$(TOPDIR)/../fake_config_library -MConfig"
+ cd $(TOPDIR)/.. ; rm -rf install_me_here
+- cd $(TOPDIR)/.. ; make install-strip
++# cd $(TOPDIR)/.. ; make install-strip
+ cd $(TOPDIR)/.. ; sh -x Cross/warp
+
+
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 0000000..41f3b1d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/asm-pageh-fix.patch
@@ -0,0 +1,19 @@
+Perl inclues asm/page.h in order to get the definition for getpagesize which
+has been definied in unistd.h since glibc 2.1. Some recent version of linux
+libc headers removed the asm/page.h resulting in failures here for some
+people.
+
+Index: perl-5.8.8/ext/IPC/SysV/SysV.xs
+===================================================================
+--- perl-5.8.8.orig/ext/IPC/SysV/SysV.xs 2001-07-01 04:46:07.000000000 +1000
++++ perl-5.8.8/ext/IPC/SysV/SysV.xs 2007-07-06 11:40:21.000000000 +1000
+@@ -3,9 +3,6 @@
+ #include "XSUB.h"
+
+ #include <sys/types.h>
+-#ifdef __linux__
+-# include <asm/page.h>
+-#endif
+ #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
+ #ifndef HAS_SEM
+ # 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 0000000..8d1f904
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh
@@ -0,0 +1,1020 @@
+#!/bin/sh
+#
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
+#
+
+# Package name : perl5
+# Source directory : .
+# Configuration time: Thu Apr 5 19:20:23 EST 2007
+# Configured by : Open Embedded
+# Target system : linux birgitte 2.6.21-rc5 #63 tue mar 27 14:41:54 est 2007 i686 gnulinux
+
+Author=''
+Date='$Date'
+Header=''
+Id='$Id'
+Locker=''
+Log='$Log'
+Mcc='Mcc'
+RCSfile='$RCSfile'
+Revision='$Revision'
+Source=''
+State=''
+_a='.a'
+_exe=''
+_o='.o'
+afs='false'
+afsroot='/afs'
+ansi2knr=''
+aphostname=''
+api_revision='5'
+api_subversion='0'
+api_version='8'
+api_versionstring='5.8.0'
+ar='ar'
+archlib='/usr/lib/perl/5.8'
+archlibexp='/usr/lib/perl/5.8'
+archname64=''
+archname='@ARCH@-thread-multi'
+archobjs=''
+asctime_r_proto='REENTRANT_PROTO_B_SB'
+awk='awk'
+baserev='5.0'
+bash=''
+bin='/usr/bin'
+binexp='/usr/bin'
+bison='bison'
+byacc='byacc'
+c=''
+castflags='0'
+cat='cat'
+cc='gcc'
+cccdlflags='-fPIC'
+ccdlflags='-Wl,-E'
+ccname='gcc'
+ccversion=''
+cf_by='Open Embedded'
+cf_email='Open Embedded@localhost.localdomain'
+cf_time='Thu Apr 5 23:06:39 EST 2007'
+charsize='1'
+chgrp=''
+chmod='chmod'
+chown=''
+clocktype='clock_t'
+comm='comm'
+compress=''
+contains='grep'
+cp='cp'
+cpio=''
+cpp='cpp'
+cpp_stuff='42'
+cpplast='-'
+cppminus='-'
+cpprun='gcc -E'
+cppstdin='gcc -E'
+crypt_r_proto='REENTRANT_PROTO_B_CCS'
+cryptlib=''
+csh='csh'
+ctermid_r_proto='0'
+ctime_r_proto='REENTRANT_PROTO_B_SB'
+d_Gconvert='gcvt((x),(n),(b))'
+d_PRIEUldbl='define'
+d_PRIFUldbl='define'
+d_PRIGUldbl='define'
+d_PRIXU64='define'
+d_PRId64='define'
+d_PRIeldbl='define'
+d_PRIfldbl='define'
+d_PRIgldbl='define'
+d_PRIi64='define'
+d_PRIo64='define'
+d_PRIu64='define'
+d_PRIx64='define'
+d_SCNfldbl='define'
+d__fwalk='undef'
+d_access='define'
+d_accessx='undef'
+d_aintl='undef'
+d_alarm='define'
+d_archlib='define'
+d_asctime_r='define'
+d_atolf='undef'
+d_atoll='define'
+d_attribute_format='define'
+d_attribute_malloc='define'
+d_attribute_nonnull='define'
+d_attribute_noreturn='define'
+d_attribute_pure='define'
+d_attribute_unused='define'
+d_attribute_warn_unused_result='undef'
+d_bcmp='define'
+d_bcopy='define'
+d_bsd='undef'
+d_bsdgetpgrp='undef'
+d_bsdsetpgrp='undef'
+d_bzero='define'
+d_casti32='undef'
+d_castneg='define'
+d_charvspr='define'
+d_chown='define'
+d_chroot='define'
+d_chsize='undef'
+d_class='undef'
+d_clearenv='define'
+d_closedir='define'
+d_cmsghdr_s='define'
+d_const='define'
+d_copysignl='define'
+d_crypt='define'
+d_crypt_r='define'
+d_csh='undef'
+d_ctermid_r='undef'
+d_ctime_r='define'
+d_cuserid='define'
+d_dbl_dig='define'
+d_dbminitproto='undef'
+d_difftime='define'
+d_dirfd='define'
+d_dirnamlen='undef'
+d_dlerror='define'
+d_dlopen='define'
+d_dlsymun='undef'
+d_dosuid='undef'
+d_drand48_r='define'
+d_drand48proto='define'
+d_dup2='define'
+d_eaccess='undef'
+d_endgrent='define'
+d_endgrent_r='undef'
+d_endhent='define'
+d_endhostent_r='undef'
+d_endnent='define'
+d_endnetent_r='undef'
+d_endpent='define'
+d_endprotoent_r='undef'
+d_endpwent='define'
+d_endpwent_r='undef'
+d_endsent='define'
+d_endservent_r='undef'
+d_eofnblk='define'
+d_eunice='undef'
+d_faststdio='undef'
+d_fchdir='define'
+d_fchmod='define'
+d_fchown='define'
+d_fcntl='define'
+d_fcntl_can_lock='define'
+d_fd_macros='define'
+d_fd_set='define'
+d_fds_bits='define'
+d_fgetpos='define'
+d_finite='define'
+d_finitel='define'
+d_flexfnam='define'
+d_flock='define'
+d_flockproto='define'
+d_fork='define'
+d_fp_class='undef'
+d_fpathconf='define'
+d_fpclass='undef'
+d_fpclassify='undef'
+d_fpclassl='undef'
+d_fpos64_t='undef'
+d_frexpl='define'
+d_fs_data_s='undef'
+d_fseeko='define'
+d_fsetpos='define'
+d_fstatfs='define'
+d_fstatvfs='define'
+d_fsync='define'
+d_ftello='define'
+d_ftime='undef'
+d_futimes='define'
+d_getcwd='define'
+d_getespwnam='undef'
+d_getfsstat='undef'
+d_getgrent='define'
+d_getgrent_r='define'
+d_getgrgid_r='define'
+d_getgrnam_r='define'
+d_getgrps='define'
+d_gethbyaddr='define'
+d_gethbyname='define'
+d_gethent='define'
+d_gethname='define'
+d_gethostbyaddr_r='define'
+d_gethostbyname_r='define'
+d_gethostent_r='define'
+d_gethostprotos='define'
+d_getitimer='define'
+d_getlogin='define'
+d_getlogin_r='define'
+d_getmnt='undef'
+d_getmntent='define'
+d_getnbyaddr='define'
+d_getnbyname='define'
+d_getnent='define'
+d_getnetbyaddr_r='define'
+d_getnetbyname_r='define'
+d_getnetent_r='define'
+d_getnetprotos='define'
+d_getpagsz='define'
+d_getpbyname='define'
+d_getpbynumber='define'
+d_getpent='define'
+d_getpgid='define'
+d_getpgrp2='undef'
+d_getpgrp='define'
+d_getppid='define'
+d_getprior='define'
+d_getprotobyname_r='define'
+d_getprotobynumber_r='define'
+d_getprotoent_r='define'
+d_getprotoprotos='define'
+d_getprpwnam='undef'
+d_getpwent='define'
+d_getpwent_r='define'
+d_getpwnam_r='define'
+d_getpwuid_r='define'
+d_getsbyname='define'
+d_getsbyport='define'
+d_getsent='define'
+d_getservbyname_r='define'
+d_getservbyport_r='define'
+d_getservent_r='define'
+d_getservprotos='define'
+d_getspnam='define'
+d_getspnam_r='undef'
+d_gettimeod='define'
+d_gmtime_r='define'
+d_gnulibc='define'
+d_grpasswd='define'
+d_hasmntopt='define'
+d_htonl='define'
+d_ilogbl='define'
+d_index='undef'
+d_inetaton='define'
+d_int64_t='define'
+d_isascii='define'
+d_isfinite='undef'
+d_isinf='define'
+d_isnan='define'
+d_isnanl='define'
+d_killpg='define'
+d_lchown='define'
+d_ldbl_dig='define'
+d_libm_lib_version='define'
+d_link='define'
+d_localtime_r='define'
+d_locconv='define'
+d_lockf='define'
+d_longdbl='define'
+d_longlong='define'
+d_lseekproto='define'
+d_lstat='define'
+d_madvise='define'
+d_malloc_good_size='undef'
+d_malloc_size='undef'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memchr='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_mkdir='define'
+d_mkdtemp='define'
+d_mkfifo='define'
+d_mkstemp='define'
+d_mkstemps='undef'
+d_mktime='define'
+d_mmap='define'
+d_modfl='define'
+d_modfl_pow32_bug='undef'
+d_modflproto='define'
+d_mprotect='define'
+d_msg='define'
+d_msg_ctrunc='define'
+d_msg_dontroute='define'
+d_msg_oob='define'
+d_msg_peek='define'
+d_msg_proxy='define'
+d_msgctl='define'
+d_msgget='define'
+d_msghdr_s='define'
+d_msgrcv='define'
+d_msgsnd='define'
+d_msync='define'
+d_munmap='define'
+d_mymalloc='undef'
+d_nice='define'
+d_nl_langinfo='define'
+d_nv_zero_is_allbits_zero='define'
+d_off64_t='define'
+d_old_pthread_create_joinable='undef'
+d_oldpthreads='undef'
+d_oldsock='undef'
+d_open3='define'
+d_pathconf='define'
+d_pause='define'
+d_perl_otherlibdirs='define'
+d_phostname='undef'
+d_pipe='define'
+d_poll='define'
+d_portable='define'
+d_procselfexe='define'
+d_pthread_atfork='define'
+d_pthread_attr_setscope='define'
+d_pthread_yield='define'
+d_pwage='undef'
+d_pwchange='undef'
+d_pwclass='undef'
+d_pwcomment='undef'
+d_pwexpire='undef'
+d_pwgecos='define'
+d_pwpasswd='define'
+d_pwquota='undef'
+d_qgcvt='define'
+d_quad='define'
+d_random_r='define'
+d_readdir64_r='define'
+d_readdir='define'
+d_readdir_r='define'
+d_readlink='define'
+d_readv='define'
+d_recvmsg='define'
+d_rename='define'
+d_rewinddir='define'
+d_rmdir='define'
+d_safebcpy='undef'
+d_safemcpy='undef'
+d_sanemcmp='define'
+d_sbrkproto='define'
+d_scalbnl='define'
+d_sched_yield='define'
+d_scm_rights='define'
+d_seekdir='define'
+d_select='define'
+d_sem='define'
+d_semctl='define'
+d_semctl_semid_ds='define'
+d_semctl_semun='define'
+d_semget='define'
+d_semop='define'
+d_sendmsg='define'
+d_setegid='define'
+d_seteuid='define'
+d_setgrent='define'
+d_setgrent_r='undef'
+d_setgrps='define'
+d_sethent='define'
+d_sethostent_r='undef'
+d_setitimer='define'
+d_setlinebuf='define'
+d_setlocale='define'
+d_setlocale_r='undef'
+d_setnent='define'
+d_setnetent_r='undef'
+d_setpent='define'
+d_setpgid='define'
+d_setpgrp2='undef'
+d_setpgrp='define'
+d_setprior='define'
+d_setproctitle='undef'
+d_setprotoent_r='undef'
+d_setpwent='define'
+d_setpwent_r='undef'
+d_setregid='define'
+d_setresgid='define'
+d_setresuid='define'
+d_setreuid='define'
+d_setrgid='undef'
+d_setruid='undef'
+d_setsent='define'
+d_setservent_r='undef'
+d_setsid='define'
+d_setvbuf='define'
+d_sfio='undef'
+d_shm='define'
+d_shmat='define'
+d_shmatprototype='define'
+d_shmctl='define'
+d_shmdt='define'
+d_shmget='define'
+d_sigaction='define'
+d_sigprocmask='define'
+d_sigsetjmp='define'
+d_sockatmark='define'
+d_sockatmarkproto='define'
+d_socket='define'
+d_socklen_t='define'
+d_sockpair='define'
+d_socks5_init='undef'
+d_sprintf_returns_strlen='define'
+d_sqrtl='define'
+d_srand48_r='define'
+d_srandom_r='define'
+d_sresgproto='define'
+d_sresuproto='define'
+d_statblks='define'
+d_statfs_f_flags='undef'
+d_statfs_s='define'
+d_statvfs='define'
+d_stdio_cnt_lval='undef'
+d_stdio_ptr_lval='undef'
+d_stdio_ptr_lval_nochange_cnt='undef'
+d_stdio_ptr_lval_sets_cnt='undef'
+d_stdio_stream_array='undef'
+d_stdiobase='undef'
+d_stdstdio='undef'
+d_strchr='define'
+d_strcoll='define'
+d_strctcpy='define'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strerror_r='define'
+d_strftime='define'
+d_strlcat='undef'
+d_strlcpy='undef'
+d_strtod='define'
+d_strtol='define'
+d_strtold='define'
+d_strtoll='define'
+d_strtoq='define'
+d_strtoul='define'
+d_strtoull='define'
+d_strtouq='define'
+d_strxfrm='define'
+d_suidsafe='undef'
+d_symlink='define'
+d_syscall='define'
+d_syscallproto='define'
+d_sysconf='define'
+d_sysernlst=''
+d_syserrlst='define'
+d_system='define'
+d_tcgetpgrp='define'
+d_tcsetpgrp='define'
+d_telldir='define'
+d_telldirproto='define'
+d_time='define'
+d_times='define'
+d_tm_tm_gmtoff='define'
+d_tm_tm_zone='define'
+d_tmpnam_r='define'
+d_truncate='define'
+d_ttyname_r='define'
+d_tzname='define'
+d_ualarm='define'
+d_umask='define'
+d_uname='define'
+d_union_semun='undef'
+d_unordered='undef'
+d_unsetenv='define'
+d_usleep='define'
+d_usleepproto='define'
+d_ustat='define'
+d_vendorarch='define'
+d_vendorbin='define'
+d_vendorlib='define'
+d_vendorscript='define'
+d_vfork='undef'
+d_void_closedir='undef'
+d_voidsig='define'
+d_voidtty=''
+d_volatile='define'
+d_vprintf='define'
+d_wait4='define'
+d_waitpid='define'
+d_wcstombs='define'
+d_wctomb='define'
+d_writev='define'
+d_xenix='undef'
+date='date'
+db_hashtype='u_int32_t'
+db_prefixtype='size_t'
+db_version_major=''
+db_version_minor=''
+db_version_patch=''
+defvoidused='15'
+direntrytype='struct dirent'
+dlext='so'
+dlsrc='dl_dlopen.xs'
+doublesize='8'
+drand01='drand48()'
+drand48_r_proto='REENTRANT_PROTO_I_ST'
+dynamic_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'
+eagain='EAGAIN'
+ebcdic='undef'
+echo='echo'
+egrep='egrep'
+emacs=''
+endgrent_r_proto='0'
+endhostent_r_proto='0'
+endnetent_r_proto='0'
+endprotoent_r_proto='0'
+endpwent_r_proto='0'
+endservent_r_proto='0'
+eunicefix=':'
+exe_ext=''
+expr='expr'
+extensions='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'
+extras=''
+fflushNULL='define'
+fflushall='undef'
+find=''
+firstmakefile='makefile'
+flex=''
+fpossize='16'
+fpostype='fpos_t'
+freetype='void'
+from=':'
+full_ar='/usr/bin/ar'
+full_csh='/bin/csh'
+full_sed='/bin/sed'
+gccansipedantic=''
+gccosandvers=''
+getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
+getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
+getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
+gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
+gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
+gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
+getlogin_r_proto='REENTRANT_PROTO_I_BW'
+getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
+getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
+getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
+getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
+getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
+getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
+getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
+getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
+getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
+getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
+getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
+getservent_r_proto='REENTRANT_PROTO_I_SBWR'
+gidsign='1'
+gidsize='4'
+gidtype='gid_t'
+glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
+gmake='gmake'
+gmtime_r_proto='REENTRANT_PROTO_S_TS'
+grep='grep'
+groupcat='cat /etc/group'
+groupstype='gid_t'
+gzip='gzip'
+h_fcntl='false'
+h_sysfile='true'
+hint='recommended'
+hostcat='cat /etc/hosts'
+html1dir=' '
+html1direxp=''
+html3dir=' '
+html3direxp=''
+i16size='2'
+i16type='short'
+i32size='4'
+i64size='8'
+i8size='1'
+i8type='char'
+i_arpainet='define'
+i_bsdioctl=''
+i_crypt='define'
+i_db='undef'
+i_dbm='undef'
+i_dirent='define'
+i_dld='undef'
+i_dlfcn='define'
+i_fcntl='undef'
+i_float='define'
+i_fp='undef'
+i_fp_class='undef'
+i_gdbm='undef'
+i_grp='define'
+i_ieeefp='undef'
+i_inttypes='define'
+i_langinfo='define'
+i_libutil='undef'
+i_limits='define'
+i_locale='define'
+i_machcthr='undef'
+i_malloc='define'
+i_math='define'
+i_memory='undef'
+i_mntent='define'
+i_ndbm='undef'
+i_netdb='define'
+i_neterrno='undef'
+i_netinettcp='define'
+i_niin='define'
+i_poll='define'
+i_prot='undef'
+i_pthread='define'
+i_pwd='define'
+i_rpcsvcdbm='undef'
+i_sfio='undef'
+i_sgtty='undef'
+i_shadow='define'
+i_socks='undef'
+i_stdarg='define'
+i_stddef='define'
+i_stdlib='define'
+i_string='define'
+i_sunmath='undef'
+i_sysaccess='undef'
+i_sysdir='define'
+i_sysfile='define'
+i_sysfilio='undef'
+i_sysin='undef'
+i_sysioctl='define'
+i_syslog='define'
+i_sysmman='define'
+i_sysmode='undef'
+i_sysmount='define'
+i_sysndir='undef'
+i_sysparam='define'
+i_sysresrc='define'
+i_syssecrt='undef'
+i_sysselct='define'
+i_syssockio='undef'
+i_sysstat='define'
+i_sysstatfs='define'
+i_sysstatvfs='define'
+i_systime='define'
+i_systimek='undef'
+i_systimes='define'
+i_systypes='define'
+i_sysuio='define'
+i_sysun='define'
+i_sysutsname='define'
+i_sysvfs='define'
+i_syswait='define'
+i_termio='undef'
+i_termios='define'
+i_time='define'
+i_unistd='define'
+i_ustat='define'
+i_utime='define'
+i_values='define'
+i_varargs='undef'
+i_varhdr='stdarg.h'
+i_vfork='undef'
+ignore_versioned_solibs='y'
+inc_version_list=' '
+inc_version_list_init='0'
+incpath=''
+inews=''
+installarchlib='@LIBDIR@/perl/5.8'
+installbin='@BINDIR@'
+installhtml1dir=''
+installhtml3dir=''
+installman1dir='@MANDIR@/man1'
+installman3dir='@MANDIR@/man3'
+installprefix='@PREFIX@'
+installprefixexp='@PREFIX@/usr'
+installprivlib='@DATADIR@/perl/5.8'
+installscript='@BINDIR@'
+installsitearch='@PREFIX@/local/lib/perl/5.8.8'
+installsitebin='@PREFIX@/local/bin'
+installsitehtml1dir=''
+installsitehtml3dir=''
+installsitelib='@PREFIX@/local/share/perl/5.8.8'
+installsiteman1dir='@PREFIX@/local/man/man1'
+installsiteman3dir='@PREFIX@/local/man/man3'
+installsitescript='@PREFIX@/local/bin'
+installstyle='lib/perl5'
+installusrbinperl='define'
+installvendorarch='@LIBDIR@/perl5'
+installvendorbin='@BINDIR@'
+installvendorhtml1dir=''
+installvendorhtml3dir=''
+installvendorlib='@DATADIR@/perl5'
+installvendorman1dir='@MANDIR@/man1'
+installvendorman3dir='@MANDIR@/man3'
+installvendorscript='@BINDIR@'
+intsize='4'
+issymlink='test -h'
+ivdformat='"ld"'
+ivtype='long'
+known_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'
+ksh=''
+ld='gcc'
+lddlflags='-shared -L/usr/local/lib'
+ldflags=' -L/usr/local/lib'
+ldflags_uselargefiles=''
+ldlibpthname='LD_LIBRARY_PATH'
+less='less'
+lib_ext='.a'
+libperl='libperl.so'
+libpth='/usr/local/lib /lib /usr/lib'
+line=''
+lint=''
+lkflags=''
+ln='ln'
+lns='/bin/ln -s'
+localtime_r_proto='REENTRANT_PROTO_S_TS'
+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
+longlongsize='8'
+lp=''
+lpr=''
+ls='ls'
+lseeksize='8'
+lseektype='off_t'
+mail=''
+mailx=''
+make='make'
+make_set_make='#'
+mallocobj=''
+mallocsrc=''
+malloctype='void *'
+man1dir='/usr/share/man/man1'
+man1direxp='/usr/share/man/man1'
+man1ext='1'
+man3dir='/usr/share/man/man3'
+man3direxp='/usr/share/man/man3'
+man3ext='3pm'
+mips_type=''
+mistrustnm=''
+mkdir='mkdir'
+mmaptype='void *'
+modetype='mode_t'
+more='more'
+multiarch='undef'
+mv=''
+myarchname='@ARCH@'
+mydomain='.localdomain'
+myhostname='localhost'
+n='-n'
+need_va_copy='undef'
+netdb_hlen_type='size_t'
+netdb_host_type='const void *'
+netdb_name_type='const char *'
+netdb_net_type='in_addr_t'
+nm='nm'
+nm_opt=''
+nm_so_opt='--dynamic'
+nonxs_ext='Errno'
+nroff='nroff'
+nvEUformat='"E"'
+nvFUformat='"F"'
+nvGUformat='"G"'
+nveformat='"e"'
+nvfformat='"f"'
+nvgformat='"g"'
+nvsize='8'
+nvtype='double'
+o_nonblock='O_NONBLOCK'
+obj_ext='.o'
+old_pthread_create_joinable=''
+optimize='-O2'
+orderlib='false'
+osname='linux'
+otherlibdirs=' '
+package='perl5'
+pager='/usr/bin/less -isr'
+passcat='cat /etc/passwd'
+patchlevel='8'
+path_sep=':'
+perl5='hostperl'
+perl=''
+perl_patchlevel=''
+perladmin='root@localhost'
+perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
+perlpath='hostperl'
+pg='pg'
+phostname=''
+pidtype='pid_t'
+plibpth=''
+pmake=''
+pr=''
+prefix='/usr'
+prefixexp='/usr'
+privlib='/usr/share/perl/5.8'
+privlibexp='/usr/share/perl/5.8'
+procselfexe='"/proc/self/exe"'
+prototype='define'
+randbits='48'
+randfunc='drand48'
+random_r_proto='REENTRANT_PROTO_I_St'
+randseedtype='long'
+ranlib=':'
+rd_nodata='-1'
+readdir64_r_proto='REENTRANT_PROTO_I_TSR'
+readdir_r_proto='REENTRANT_PROTO_I_TSR'
+revision='5'
+rm='rm'
+rmail=''
+run=''
+runnm='false'
+sPRIEUldbl='"LE"'
+sPRIFUldbl='"LF"'
+sPRIGUldbl='"LG"'
+sPRIeldbl='"Le"'
+sPRIfldbl='"Lf"'
+sPRIgldbl='"Lg"'
+sSCNfldbl='"Lf"'
+sched_yield='sched_yield()'
+scriptdir='/usr/bin'
+scriptdirexp='/usr/bin'
+sed='sed'
+seedfunc='srand48'
+selecttype='fd_set *'
+sendmail=''
+setgrent_r_proto='0'
+sethostent_r_proto='0'
+setlocale_r_proto='0'
+setnetent_r_proto='0'
+setprotoent_r_proto='0'
+setpwent_r_proto='0'
+setservent_r_proto='0'
+sh='/bin/sh'
+shar=''
+sharpbang='#!'
+shmattype='void *'
+shortsize='2'
+shrpenv=''
+shsharp='true'
+sig_count='65'
+sig_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 '
+sig_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'
+sig_size='69'
+sig_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 '
+sig_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'
+signal_t='void'
+sitearch='/usr/local/lib/perl/5.8.8'
+sitearchexp='/usr/local/lib/perl/5.8.8'
+sitebin='/usr/local/bin'
+sitebinexp='/usr/local/bin'
+sitehtml1dir=''
+sitehtml1direxp=''
+sitehtml3dir=''
+sitehtml3direxp=''
+sitelib='/usr/local/share/perl/5.8.8'
+sitelib_stem=''
+sitelibexp='/usr/local/share/perl/5.8.8'
+siteman1dir='/usr/local/man/man1'
+siteman1direxp='/usr/local/man/man1'
+siteman3dir='/usr/local/man/man3'
+siteman3direxp='/usr/local/man/man3'
+siteprefix='/usr/local'
+siteprefixexp='/usr/local'
+sitescript='/usr/local/bin'
+sitescriptexp='/usr/local/bin'
+sizetype='size_t'
+sleep=''
+smail=''
+so='so'
+sockethdr=''
+socketlib=''
+socksizetype='socklen_t'
+sort='sort'
+spackage='Perl5'
+spitshell='cat'
+srand48_r_proto='REENTRANT_PROTO_I_LS'
+srandom_r_proto='REENTRANT_PROTO_I_TS'
+src='.'
+ssizetype='ssize_t'
+startperl='#!/usr/bin/perl'
+startsh='#!/bin/sh'
+static_ext=' '
+stdchar='char'
+stdio_base='((fp)->_IO_read_base)'
+stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
+stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
+stdio_filbuf=''
+stdio_ptr='((fp)->_IO_read_ptr)'
+stdio_stream_array=''
+strerror_r_proto='REENTRANT_PROTO_B_IBW'
+strings='/usr/include/string.h'
+submit=''
+subversion='8'
+sysman='/usr/share/man/man1'
+tail=''
+tar=''
+targetarch=''
+tbl=''
+tee=''
+test='test'
+timeincl='/usr/include/sys/time.h /usr/include/time.h '
+timetype='time_t'
+tmpnam_r_proto='REENTRANT_PROTO_B_B'
+to=':'
+touch='touch'
+tr='tr'
+trnl='\n'
+troff=''
+ttyname_r_proto='REENTRANT_PROTO_I_IBW'
+u16size='2'
+u16type='unsigned short'
+u32size='4'
+u64size='8'
+u8size='1'
+u8type='unsigned char'
+uidsign='1'
+uidsize='4'
+uidtype='uid_t'
+uname='uname'
+uniq='uniq'
+use5005threads='undef'
+usecrosscompile='undef'
+usedl='define'
+usefaststdio='define'
+useithreads='define'
+uselargefiles='define'
+uselongdouble='undef'
+usemallocwrap='define'
+usemorebits='undef'
+usemultiplicity='define'
+usemymalloc='n'
+usenm='false'
+useopcode='true'
+useperlio='define'
+useposix='true'
+usereentrant='undef'
+usesfio='false'
+useshrplib='true'
+usesitecustomize='undef'
+usesocks='undef'
+usethreads='define'
+usevendorprefix='define'
+usevfork='false'
+usrinc='/usr/include'
+uuname=''
+uvXUformat='"lX"'
+uvoformat='"lo"'
+uvtype='unsigned long'
+uvuformat='"lu"'
+uvxformat='"lx"'
+vendorarch='/usr/lib/perl5'
+vendorarchexp='/usr/lib/perl5'
+vendorbin='/usr/bin'
+vendorbinexp='/usr/bin'
+vendorhtml1dir=' '
+vendorhtml1direxp=''
+vendorhtml3dir=' '
+vendorhtml3direxp=''
+vendorlib='/usr/share/perl5'
+vendorlib_stem=''
+vendorlibexp='/usr/share/perl5'
+vendorman1dir='/usr/share/man/man1'
+vendorman1direxp='/usr/share/man/man1'
+vendorman3dir='/usr/share/man/man3'
+vendorman3direxp='/usr/share/man/man3'
+vendorprefix='/usr'
+vendorprefixexp='/usr'
+vendorscript='/usr/bin'
+vendorscriptexp='/usr/bin'
+version='5.8.8'
+version_patchlevel_string='version 8 subversion 8'
+versiononly='undef'
+vi=''
+voidflags='15'
+xlibpth='/usr/lib/386 /lib/386'
+yacc='yacc'
+yaccflags=''
+zcat=''
+zip='zip'
+# Configure command line arguments.
+config_arg0='Configure'
+config_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'
+config_argc=27
+config_arg1='-des'
+config_arg2='-Doptimize=-O2'
+config_arg3='-Dmyhostname=localhost'
+config_arg4='-Dperladmin=root@localhost'
+config_arg5='-Dcc=gcc'
+config_arg6='-Dcf_by=Open Embedded'
+config_arg7='-Dprefix=/usr'
+config_arg8='-Dvendorprefix=/usr'
+config_arg9='-Dsiteprefix=/usr'
+config_arg10='-Dotherlibdirs=/usr/lib/perl5/5.8.8'
+config_arg11='-Duseshrplib'
+config_arg12='-Dusethreads'
+config_arg13='-Duseithreads'
+config_arg14='-Duselargefiles'
+config_arg15='-Ud_dosuid'
+config_arg16='-Dd_semctl_semun'
+config_arg17='-Ui_db'
+config_arg18='-Ui_ndbm'
+config_arg19='-Ui_gdbm'
+config_arg20='-Di_shadow'
+config_arg21='-Di_syslog'
+config_arg22='-Dman3ext=3pm'
+config_arg23='-Duseperlio'
+config_arg24='-Dinstallusrbinperl'
+config_arg25='-Ubincompat5005'
+config_arg26='-Uversiononly'
+config_arg27='-Dpager=/usr/bin/less -isr'
+PERL_REVISION=5
+PERL_VERSION=8
+PERL_SUBVERSION=8
+PERL_API_REVISION=5
+PERL_API_VERSION=8
+PERL_API_SUBVERSION=0
+PERL_PATCHLEVEL=
+PERL_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 0000000..e22d71d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-32
@@ -0,0 +1,58 @@
+alignbytes='4'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+yaccflags=''
+ccsymbols='__GNUC_PATCHLEVEL__=5'
+cppccsymbols='__GNUC__=3 __GNUC_MINOR__=3'
+cppccsymbols='__GNUC__=3 __GNUC_MINOR__=3'
+cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/usr/local/include'
+cppsymbols='__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'
+d_nv_preserves_uv='define'
+d_u32align='undef'
+gccversion='3.3.5 (Debian 1:3.3.5-13)'
+getspnam_r_proto='0'
+gidformat='"lu"'
+gnulibc_version='2.3.2'
+i32type='long'
+i64type='long long'
+ivsize='4'
+gnulibc_version='2.3.2'
+libc='/lib/libc-2.3.2.so'
+libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+ignore_versioned_solibs='y'
+libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
+libsdirs=' /usr/lib'
+libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+libspath=' /usr/local/lib /lib /usr/lib'
+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
+libswanted_uselargefiles=''
+perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
+libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+longdblsize='12'
+longlongsize='8'
+longsize='4'
+myuname='linux birgitte 2.6.21-rc5 #63 tue mar 27 14:41:54 est 2007 i686 gnulinux '
+nv_preserves_uv_bits='32'
+osvers='2.6.21-rc5'
+ptrsize='4'
+quadkind='3'
+quadtype='long long'
+uquadtype='unsigned long long'
+sPRIXU64='"LX"'
+sPRId64='"Ld"'
+sPRIi64='"Li"'
+sPRIo64='"Lo"'
+sPRIu64='"Lu"'
+sPRIx64='"Lx"'
+selectminbits='32'
+sizesize='4'
+u32type='unsigned long'
+u64type='unsigned long long'
+uidformat='"lu"'
+uquadtype='unsigned long long'
+use64bitall='undef'
+use64bitint='undef'
+uvsize='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 0000000..a59a9ab
--- /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 0000000..10e4226
--- /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 0000000..6e58fa7
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/config.sh-64
@@ -0,0 +1,58 @@
+alignbytes='8'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+yaccflags=''
+ccsymbols=''
+cppccsymbols=''
+cppccsymbols=''
+cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
+cppsymbols='__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'
+d_nv_preserves_uv='undef'
+d_u32align='define'
+gccversion='4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)'
+getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
+gidformat='"u"'
+gnulibc_version='2.4'
+i32type='int'
+i64type='long'
+ivsize='8'
+gnulibc_version='2.4'
+libc='/lib/libc-2.4.so'
+libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+ignore_versioned_solibs='y'
+libs='-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc'
+libsdirs=' /usr/lib'
+libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+libspath=' /usr/local/lib /lib /usr/lib'
+libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util pthread c cposix posix ucb BSD'
+libswanted_uselargefiles=''
+perllibs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc'
+libsfiles=' libnsl.so libdb.so libdl.so libm.so libcrypt.so libutil.so libpthread.so libc.so'
+libsfound=' /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'
+longdblsize='16'
+longlongsize='8'
+longsize='8'
+myuname='linux nynaeve 2.6.20.4 #29 smp thu mar 29 15:35:30 est 2007 x86_64 gnulinux '
+nv_preserves_uv_bits='53'
+osvers='2.6.20.4'
+ptrsize='8'
+quadkind='2'
+quadtype='long'
+uquadtype='unsigned long'
+sPRIXU64='"lX"'
+sPRId64='"ld"'
+sPRIi64='"li"'
+sPRIo64='"lo"'
+sPRIu64='"lu"'
+sPRIx64='"lx"'
+selectminbits='64'
+sizesize='8'
+u32type='unsigned int'
+u64type='unsigned long'
+uidformat='"u"'
+uquadtype='unsigned long'
+use64bitall='define'
+use64bitint='define'
+uvsize='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 0000000..c08ce3c
--- /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 0000000..277d2a9
--- /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 0000000..ceb7419
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch
@@ -0,0 +1,46 @@
+Use the ld flags from the supplied configuration file. For sh we need the
+flags that specify to build PIC code so that the shared libraries work.
+
+Index: perl-5.8.8/Cross/generate_config_sh
+===================================================================
+--- perl-5.8.8.orig/Cross/generate_config_sh 2003-09-05 18:31:08.000000000 +1000
++++ perl-5.8.8/Cross/generate_config_sh 2007-05-30 09:12:50.000000000 +1000
+@@ -19,10 +19,10 @@
+ $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]];
+ $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
+ $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
+-$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
+-$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
+-$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
+-$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
++#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
++#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
++$callbacks->{'ccflags'} = [\&simple_process_insert, ["CFLAGS", "-fno-strict-aliasing -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
++$callbacks->{'ccflags_uselargefiles'} = [\&simple_process_insert, ["CFLAGS", "-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
+ $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
+ $callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]];
+ $callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]];
+@@ -105,6 +105,23 @@
+
+ }
+
++# Insert env var into the variables value
++sub simple_process_insert {
++ my $key = shift;
++ my $value = shift;
++ my $envvar = $callbacks->{$key}->[1][0];
++
++ if ($ENV{$envvar}) {
++ # Strip quotes from value
++ $value =~ s/^\'//;
++ $value =~ s/\'$//;
++ # Remove -I/usr/local/... from the value
++ $value =~ s#\W-I/usr/local/\w+\W# #g;
++ # Prepend env var (OE setting) to value
++ print("$key=\'$ENV{$envvar} $value\'\n");
++ }
++}
++
+ sub library_munge {
+ my $key = shift;
+ 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 0000000..ff52bc3
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/installperl.patch
@@ -0,0 +1,15 @@
+Index: perl-5.8.8/installperl
+===================================================================
+--- perl-5.8.8.orig/installperl 2007-06-14 12:36:23.000000000 +1000
++++ perl-5.8.8/installperl 2007-06-14 12:38:39.000000000 +1000
+@@ -3,8 +3,8 @@
+ BEGIN {
+ require 5.004;
+ chdir '..' if !-d 'lib' and -d '../lib';
+- @INC = 'lib';
+- $ENV{PERL5LIB} = 'lib';
++# @INC = 'lib';
++# $ENV{PERL5LIB} = 'lib';
+ }
+
+ 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 0000000..1f15474
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/makedepend-dash.patch
@@ -0,0 +1,13 @@
+Index: perl-5.8.8/makedepend.SH
+===================================================================
+--- perl-5.8.8.orig/makedepend.SH 2007-05-24 12:06:52.000000000 +1000
++++ perl-5.8.8/makedepend.SH 2007-05-24 12:27:33.000000000 +1000
+@@ -128,7 +128,7 @@
+ *.y) filebase=`basename $file .y` ;;
+ esac
+ case "$file" in
+- */*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
++ */*) finc="-I`echo $file | sed 's#/[^/]*$##'`" ;;
+ *) finc= ;;
+ esac
+ $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 0000000..f00fa2c
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-no-gdbminc.patch
@@ -0,0 +1,18 @@
+If you have a /usr/include/gdbm/ndbm.h host on the header then the configure
+script adds -I/usr/include/gdbm to the ccflags even though gdbm support is
+disabled. Prevent perl from doing this so we don't get cross compile badness
+errors while building perl.
+
+--- perl-5.8.8/Configure 2007/05/06 23:42:18 1.1
++++ perl-5.8.8/Configure 2007/05/06 23:42:48
+@@ -20033,8 +20033,8 @@
+ # ndbm.h header in /usr/include/gdbm/ndbm.h.
+ if $test -f /usr/include/gdbm/ndbm.h; then
+ echo '<gdbm/ndbm.h> found.'
+- ccflags="$ccflags -I/usr/include/gdbm"
+- cppflags="$cppflags -I/usr/include/gdbm"
++# ccflags="$ccflags -I/usr/include/gdbm"
++# cppflags="$cppflags -I/usr/include/gdbm"
+ t_ndbm=$define
+ fi
+ ;;
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 0000000..a0ba269
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-nopacklist.patch
@@ -0,0 +1,84 @@
+Part of 52_debian_extutils_hacks.patch just to exclude the installation of .packlist files
+
+diff -Naur --exclude=debian perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm perl-5.8.8/lib/ExtUtils/MM_Unix.pm
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2005-05-21 19:42:56.000000000 +1000
++++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2006-02-05 17:40:19.000000000 +1100
+@@ -2054,9 +2054,7 @@
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+ pure_perl_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLARCHLIB)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+@@ -2081,9 +2079,7 @@
+ }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
+
+ pure_vendor_install ::
+- $(NOECHO) $(MOD_INSTALL) \
+- read }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{ \
+- write }.$self->catfile('$(DESTINSTALLVENDORARCH)','auto','$(FULLEXT)','.packlist').q{ \
++ $(NOECHO) $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+@@ -2092,37 +2088,19 @@
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+ doc_perl_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLPRIVLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ doc_site_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
++ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
++ -$(NOECHO) $(MKPATH) $(DESTINSTALLSITEARCH)
++ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
++ >> }.$self->catfile('$(DESTINSTALLSITEARCH)','perllocal.pod').q{
+
+ doc_vendor_install ::
+- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+- -$(NOECHO) $(DOC_INSTALL) \
+- "Module" "$(NAME)" \
+- "installed into" "$(INSTALLVENDORLIB)" \
+- LINKTYPE "$(LINKTYPE)" \
+- VERSION "$(VERSION)" \
+- EXE_FILES "$(EXE_FILES)" \
+- >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
+
+ };
+
+@@ -2131,13 +2109,12 @@
+ $(NOECHO) $(NOOP)
+
+ uninstall_from_perldirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) }.$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist').q{
+
+ uninstall_from_vendordirs ::
+- $(NOECHO) $(UNINSTALL) }.$self->catfile('$(VENDORARCHEXP)','auto','$(FULLEXT)','.packlist').q{
++
+ };
+
+ 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 0000000..6dc4b95
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-perlinc.patch
@@ -0,0 +1,24 @@
+Index: perl-5.8.8/lib/ExtUtils/MM_Unix.pm
+===================================================================
+--- perl-5.8.8.orig/lib/ExtUtils/MM_Unix.pm 2008-10-31 22:01:35.000000000 +0000
++++ perl-5.8.8/lib/ExtUtils/MM_Unix.pm 2008-11-08 16:01:12.000000000 +0000
+@@ -1597,6 +1597,19 @@
+ $self->{PERL_LIB} ||= $Config{privlibexp};
+ $self->{PERL_ARCHLIB} ||= $Config{archlibexp};
+ $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now
++ # Check for environment override so we'll find the headers in the correct place
++ if (defined $ENV{PERL_LIB})
++ {
++ $self->{PERL_LIB} = $ENV{PERL_LIB};
++ }
++ if (defined $ENV{PERL_ARCHLIB})
++ {
++ $self->{PERL_ARCHLIB} = $ENV{PERL_ARCHLIB};
++ }
++ if (defined $ENV{PERL_INC})
++ {
++ $self->{PERL_INC} = $ENV{PERL_INC};
++ }
+ my $perl_h;
+
+ 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 0000000..1c825f5
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/native-ssp.patch
@@ -0,0 +1,14 @@
+Fix for compiling with ssp enabled gcc:
+See http://bugs.openembedded.net/show_bug.cgi?id=1980
+
+diff -Naur perl-5.8.7.orig/cflags.SH perl-5.8.7/cflags.SH
+--- perl-5.8.7.orig/cflags.SH 2002-09-30 10:59:07.000000000 +0000
++++ perl-5.8.7/cflags.SH 2005-10-02 04:08:39.000000000 +0000
+@@ -165,6 +165,8 @@
+ esac
+
+ : Can we perhaps use $ansi2knr here
++ [[ $file == regcomp ]] && export ccflags="${ccflags} -fno-stack-protector"
++ [[ $file == regexec ]] && export ccflags="${ccflags} -fno-stack-protector"
+ echo "$cc -c -DPERL_CORE $ccflags $optimize $warn"
+ 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 0000000..ac519a0
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-configpm-switch.patch
@@ -0,0 +1,43 @@
+This patch is used for perl-native only. It enables the switching of
+configuration files between Config_heavy.pl and
+Config_heavy-target.pl by setting the environment variables
+PERLCONFIGTARGET - the later containing settings for the target while
+the former contains those for the host. This will allow cpan.bbclass
+to use the settings appropriate for the native and/or target builds
+as required. This also disables the use of the cache since the cached
+values would be valid for the host only.
+
+--- perl-5.8.8/configpm 2007/04/30 03:10:43 1.1
++++ perl-5.8.8/configpm 2007/04/30 03:11:56
+@@ -374,7 +374,7 @@
+ my($self, $key) = @_;
+
+ # check for cached value (which may be undef so we use exists not defined)
+- return $self->{$key} if exists $self->{$key};
++ #return $self->{$key} if exists $self->{$key};
+
+ return $self->fetch_string($key);
+ }
+@@ -530,7 +530,21 @@
+ sub DESTROY { }
+
+ sub AUTOLOAD {
+- require 'Config_heavy.pl';
++ my $cfgfile = 'Config_heavy.pl';
++ if (defined $ENV{PERLCONFIGTARGET} and $ENV{PERLCONFIGTARGET} eq "yes")
++ {
++ $cfgfile = 'Config_heavy-target.pl';
++ }
++ if (defined $ENV{PERL_ARCHLIB})
++ {
++ push @INC, $ENV{PERL_ARCHLIB};
++ require $cfgfile;
++ pop @INC;
++ }
++ else
++ {
++ require $cfgfile;
++ }
+ goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
+ die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
+ }
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 0000000..9800394
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-configure.sh
@@ -0,0 +1,43 @@
+ls#! /bin/sh
+
+#
+# Generate the common perl configuration
+# Needs to be run on a host that matches the bitsize of the target platform
+#
+
+echo sh Configure -des \
+ -Doptimize=-O2 \
+ -Dmyhostname=localhost \
+ -Dperladmin=root@localhost \
+ -Dcc=gcc \
+ -Dcf_by='Open Embedded' \
+ -Dinstallprefix=@DESTDIR@ \
+ -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'
+
+cp -f config.sh config.sh.COMMON
+
+TARGETOS=$(grep myarchname config.sh.COMMON | sed "s#.*'\(.*\)'.*#\1#")
+
+sed -r -i config.sh.COMMON \
+ -e "s#(install.*=')(/usr)/local(.*')#\1@DESTDIR@\2\3#g" \
+ -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 0000000..e2dc774
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-dynloader.patch
@@ -0,0 +1,23 @@
+Allow the location that .so files are searched for for dynamic
+loading to be changed via an environment variable. This is to allow
+us to load .so's from the host system while building for the target
+system.
+
+--- perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:03:08 1.1
++++ perl-5.8.8/ext/DynaLoader/XSLoader_pm.PL 2007/04/20 09:41:28
+@@ -65,6 +65,15 @@
+ print OUT <<'EOT';
+ my $modpname = join('/',@modparts);
+ my $modlibname = (caller())[1];
++ # OE: Allow env to form dynamic loader to look in a different place
++ # This is so it finds the host .so files, not the targets
++ if (defined $ENV{PERLHOSTLIB})
++ {
++ my $hostlib = $ENV{PERLHOSTLIB};
++ print STDERR "*** Module name IN: $modlibname\n";
++ $modlibname =~ s#(?<!/)(\.\./)*lib/#$hostlib#g;
++ print STDERR "*** Module name OUT: $modlibname\n";
++ }
+ my $c = @modparts;
+ $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
+ 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 0000000..590c725
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.8.8/perl-moreconfig.patch
@@ -0,0 +1,16 @@
+We need ld in the fake config library, but it's not included by default. So
+expand the number of items included. While this works it indicates that the
+rest of the config items are not being picked up and/or are being picked up
+from the host. More investigation needed.
+
+--- perl-5.8.8/configpm 2007/04/20 09:48:05 1.1
++++ perl-5.8.8/configpm 2007/04/20 09:57:12
+@@ -2,7 +2,7 @@
+ use strict;
+ use vars qw(%Config $Config_SH_expanded);
+
+-my $how_many_common = 22;
++my $how_many_common = 50;
+
+ # commonly used names to precache (and hence lookup fastest)
+ 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 0000000..534b670
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-native_5.8.8.bb
@@ -0,0 +1,93 @@
+DESCRIPTION = "Perl is a popular scripting language."
+HOMEPAGE = "http://www.perl.org/"
+SECTION = "libs"
+LICENSE = "Artistic|GPL"
+DEPENDS = "virtual/db-native gdbm-native"
+PR = "r14"
+
+SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
+ file://perl-5.8.8-gcc-4.2.patch;patch=1 \
+ file://Configure-multilib.patch;patch=1 \
+ file://perl-configpm-switch.patch;patch=1 \
+ file://native-nopacklist.patch;patch=1 \
+ file://native-no-gdbminc.patch;patch=1 \
+ file://native-perlinc.patch;patch=1 \
+ file://makedepend-dash.patch;patch=1 \
+ file://asm-pageh-fix.patch;patch=1"
+
+S = "${WORKDIR}/perl-${PV}"
+
+inherit native
+
+do_configure () {
+ ./Configure \
+ -Dcc="${CC}" \
+ -Dcflags="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dcf_by="Open Embedded" \
+ -Dprefix=${prefix} \
+ -Dvendorprefix=${prefix} \
+ -Dvendorprefix=${prefix} \
+ -Dsiteprefix=${prefix} \
+ \
+ -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
+ -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
+ -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
+ -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
+ -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
+ -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
+ \
+ -Duseshrplib \
+ -Dusethreads \
+ -Duseithreads \
+ -Duselargefiles \
+ -Dnoextensions=ODBM_File \
+ -Ud_dosuid \
+ -Ui_db \
+ -Ui_ndbm \
+ -Ui_gdbm \
+ -Di_shadow \
+ -Di_syslog \
+ -Duseperlio \
+ -Dman3ext=3pm \
+ -Uafs \
+ -Ud_csh \
+ -Uusesfio \
+ -Uusenm -des
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # We need a hostperl link for building perl
+ ln -sf perl${PV} ${D}${bindir}/hostperl
+
+ install -d ${D}${libdir}/perl/${PV}/CORE \
+ ${D}${datadir}/perl/${PV}/ExtUtils
+
+ # Save native config
+ install config.sh ${D}${libdir}/perl
+ install lib/Config.pm ${D}${libdir}/perl/${PV}/
+ install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
+
+ # perl shared library headers
+ for i in av.h embed.h gv.h keywords.h op.h perlio.h pp.h regexp.h \
+ uconfig.h XSUB.h cc_runtime.h embedvar.h handy.h opnames.h \
+ perliol.h pp_proto.h regnodes.h unixish.h config.h EXTERN.h \
+ hv.h malloc_ctl.h pad.h perlsdio.h proto.h scope.h utf8.h \
+ cop.h fakesdio.h INTERN.h mg.h patchlevel.h perlsfio.h \
+ reentr.h sv.h utfebcdic.h cv.h fakethr.h intrpvar.h \
+ nostdio.h perlapi.h perlvars.h reentr.inc thrdvar.h util.h \
+ dosish.h form.h iperlsys.h opcode.h perl.h perly.h regcomp.h \
+ thread.h warnings.h; do
+ install $i ${D}${libdir}/perl/${PV}/CORE
+ done
+}
+do_install_append_nylon() {
+ # get rid of definitions not supported by the gcc version we use for nylon...
+ for i in ${D}${libdir}/perl/${PV}/Config_heavy.pl ${D}${libdir}/perl/config.sh; do
+ perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
+ done
+}
+
+PARALLEL_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 0000000..1ce5ad0
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.8.8.inc
@@ -0,0 +1,1145 @@
+# To create/update the perl-rdepends_${PV}.inc use this piece of ugly script (modified for your arch/paths etc):
+# 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
+
+# Some additional dependencies that the above doesn't manage to figure out
+RDEPENDS_perl-module-math-bigint += "perl-module-math-bigint-calc "
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-integer "
+
+# Depends list
+RDEPENDS_perl-misc += "perl-module-exporter "
+RDEPENDS_perl-misc += "perl-module-strict "
+RDEPENDS_perl-misc += "perl-module-warnings "
+RDEPENDS_perl-module-attribute-handlers-demo-demo += "perl-module-attribute-handlers "
+RDEPENDS_perl-module-attribute-handlers-demo-descriptions += "perl-module-attribute-handlers "
+RDEPENDS_perl-module-attribute-handlers-demo-myclass += "perl-module-base "
+RDEPENDS_perl-module-attribute-handlers += "perl-module-carp "
+RDEPENDS_perl-module-attribute-handlers += "perl-module-warnings "
+RDEPENDS_perl-module-attributes += "perl-module-strict "
+RDEPENDS_perl-module-attrs += "perl-module-xsloader "
+RDEPENDS_perl-module-autoloader += "perl-module-strict "
+RDEPENDS_perl-module-autosplit += "perl-module-carp "
+RDEPENDS_perl-module-autosplit += "perl-module-config "
+RDEPENDS_perl-module-autosplit += "perl-module-exporter "
+RDEPENDS_perl-module-autosplit += "perl-module-file-basename "
+RDEPENDS_perl-module-autosplit += "perl-module-file-path "
+RDEPENDS_perl-module-autosplit += "perl-module-file-spec-functions "
+RDEPENDS_perl-module-autosplit += "perl-module-strict "
+RDEPENDS_perl-module-base += "perl-module-strict "
+RDEPENDS_perl-module-base += "perl-module-vars "
+RDEPENDS_perl-module-b-asmdata += "perl-module-exporter "
+RDEPENDS_perl-module-b-assembler += "perl-module-b "
+RDEPENDS_perl-module-b-assembler += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-assembler += "perl-module-config "
+RDEPENDS_perl-module-b-assembler += "perl-module-exporter "
+RDEPENDS_perl-module-b-assembler += "perl-module-strict "
+RDEPENDS_perl-module-b-bblock += "perl-module-b-concise "
+RDEPENDS_perl-module-b-bblock += "perl-module-exporter "
+RDEPENDS_perl-module-b-bblock += "perl-module-strict "
+RDEPENDS_perl-module-b-bytecode += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-bytecode += "perl-module-b-assembler "
+RDEPENDS_perl-module-b-bytecode += "perl-module-config "
+RDEPENDS_perl-module-b-bytecode += "perl-module-strict "
+RDEPENDS_perl-module-b-cc += "perl-module-b-bblock "
+RDEPENDS_perl-module-b-cc += "perl-module-b-stackobj "
+RDEPENDS_perl-module-b-cc += "perl-module-config "
+RDEPENDS_perl-module-b-cc += "perl-module-strict "
+RDEPENDS_perl-module-b-c += "perl-module-b "
+RDEPENDS_perl-module-b-c += "perl-module-base "
+RDEPENDS_perl-module-b-c += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-c += "perl-module-carp "
+RDEPENDS_perl-module-b-c += "perl-module-config "
+RDEPENDS_perl-module-b-c += "perl-module-exporter "
+RDEPENDS_perl-module-b-c += "perl-module-filehandle "
+RDEPENDS_perl-module-b-c += "perl-module-strict "
+RDEPENDS_perl-module-b-debug += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-debug += "perl-module-strict "
+RDEPENDS_perl-module-b-deparse += "perl-module-bytes "
+RDEPENDS_perl-module-b-deparse += "perl-module-carp "
+RDEPENDS_perl-module-b-deparse += "perl-module-integer "
+RDEPENDS_perl-module-b-deparse += "perl-module-re "
+RDEPENDS_perl-module-b-deparse += "perl-module-strict "
+RDEPENDS_perl-module-b-deparse += "perl-module-utf8 "
+RDEPENDS_perl-module-b-deparse += "perl-module-warnings "
+RDEPENDS_perl-module-b-deparse += "perl-module-warnings "
+RDEPENDS_perl-module-b-deparse += "perl-module-vars "
+RDEPENDS_perl-module-b-disassembler += "perl-module-b "
+RDEPENDS_perl-module-b-disassembler += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-disassembler += "perl-module-carp "
+RDEPENDS_perl-module-b-disassembler += "perl-module-config "
+RDEPENDS_perl-module-b-disassembler += "perl-module-exporter "
+RDEPENDS_perl-module-b-disassembler += "perl-module-filehandle "
+RDEPENDS_perl-module-b-disassembler += "perl-module-strict "
+RDEPENDS_perl-module-benchmark += "perl-module-carp "
+RDEPENDS_perl-module-benchmark += "perl-module-exporter "
+RDEPENDS_perl-module-benchmark += "perl-module-strict "
+RDEPENDS_perl-module-bigint += "perl-module-exporter "
+RDEPENDS_perl-module-bigint += "perl-module-overload "
+RDEPENDS_perl-module-bigint += "perl-module-strict "
+RDEPENDS_perl-module-bignum += "perl-module-exporter "
+RDEPENDS_perl-module-bignum += "perl-module-strict "
+RDEPENDS_perl-module-bigrat += "perl-module-exporter "
+RDEPENDS_perl-module-bigrat += "perl-module-strict "
+RDEPENDS_perl-module-blib += "perl-module-cwd "
+RDEPENDS_perl-module-blib += "perl-module-file-spec "
+RDEPENDS_perl-module-blib += "perl-module-vars "
+RDEPENDS_perl-module-b-lint += "perl-module-strict "
+RDEPENDS_perl-module-b-showlex += "perl-module-b "
+RDEPENDS_perl-module-b-showlex += "perl-module-b-concise "
+RDEPENDS_perl-module-b-showlex += "perl-module-b-terse "
+RDEPENDS_perl-module-b-showlex += "perl-module-strict "
+RDEPENDS_perl-module-b-stackobj += "perl-module-b "
+RDEPENDS_perl-module-b-stackobj += "perl-module-carp "
+RDEPENDS_perl-module-b-stackobj += "perl-module-exporter "
+RDEPENDS_perl-module-b-stackobj += "perl-module-strict "
+RDEPENDS_perl-module-b-terse += "perl-module-b "
+RDEPENDS_perl-module-b-terse += "perl-module-b-asmdata "
+RDEPENDS_perl-module-b-terse += "perl-module-b-concise "
+RDEPENDS_perl-module-b-terse += "perl-module-carp "
+RDEPENDS_perl-module-b-terse += "perl-module-strict "
+RDEPENDS_perl-module-b += "perl-module-exporter "
+RDEPENDS_perl-module-b += "perl-module-strict "
+RDEPENDS_perl-module-b += "perl-module-xsloader "
+RDEPENDS_perl-module-b-xref += "perl-module-config "
+RDEPENDS_perl-module-b-xref += "perl-module-strict "
+RDEPENDS_perl-module-byteloader += "perl-module-xsloader "
+RDEPENDS_perl-module-carp-heavy += "perl-module-carp "
+RDEPENDS_perl-module-carp += "perl-module-exporter "
+RDEPENDS_perl-module-cgi-apache += "perl-module-cgi "
+RDEPENDS_perl-module-cgi-carp += "perl-module-exporter "
+RDEPENDS_perl-module-cgi-carp += "perl-module-file-spec "
+RDEPENDS_perl-module-cgi-cookie += "perl-module-cgi-util "
+RDEPENDS_perl-module-cgi-fast += "perl-module-cgi "
+RDEPENDS_perl-module-cgi-fast += "perl-module-vars "
+RDEPENDS_perl-module-cgi-pretty += "perl-module-cgi "
+RDEPENDS_perl-module-cgi-pretty += "perl-module-strict "
+RDEPENDS_perl-module-cgi-push += "perl-module-cgi "
+RDEPENDS_perl-module-cgi-push += "perl-module-cgi-util "
+RDEPENDS_perl-module-cgi-switch += "perl-module-cgi "
+RDEPENDS_perl-module-cgi += "perl-module-carp "
+RDEPENDS_perl-module-cgi += "perl-module-cgi-util "
+RDEPENDS_perl-module-cgi += "perl-module-constant "
+RDEPENDS_perl-module-cgi-util += "perl-module-exporter "
+RDEPENDS_perl-module-cgi-util += "perl-module-strict "
+RDEPENDS_perl-module-cgi-util += "perl-module-vars "
+RDEPENDS_perl-module-charnames += "perl-module-carp "
+RDEPENDS_perl-module-charnames += "perl-module-file-spec "
+RDEPENDS_perl-module-charnames += "perl-module-strict "
+RDEPENDS_perl-module-charnames += "perl-module-warnings "
+RDEPENDS_perl-module-class-isa += "perl-module-strict "
+RDEPENDS_perl-module-class-isa += "perl-module-vars "
+RDEPENDS_perl-module-class-struct += "perl-module-exporter "
+RDEPENDS_perl-module-class-struct += "perl-module-carp "
+RDEPENDS_perl-module-class-struct += "perl-module-strict "
+RDEPENDS_perl-module-class-struct += "perl-module-warnings-register "
+RDEPENDS_perl-module-config += "perl-module-strict "
+RDEPENDS_perl-module-constant += "perl-module-strict "
+RDEPENDS_perl-module-constant += "perl-module-warnings-register "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-basename "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-filehandle "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-path "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-file-spec "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-strict "
+RDEPENDS_perl-module-cpan-firsttime += "perl-module-vars "
+RDEPENDS_perl-module-cpan-nox += "perl-module-base "
+RDEPENDS_perl-module-cpan-nox += "perl-module-cpan "
+RDEPENDS_perl-module-cpan-nox += "perl-module-strict "
+RDEPENDS_perl-module-cpan-nox += "perl-module-vars "
+RDEPENDS_perl-module-cpan += "perl-module-carp "
+RDEPENDS_perl-module-cpan += "perl-module-config "
+RDEPENDS_perl-module-cpan += "perl-module-cwd "
+RDEPENDS_perl-module-cpan += "perl-module-dirhandle "
+RDEPENDS_perl-module-cpan += "perl-module-exporter "
+RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-cpan += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-cpan += "perl-module-file-basename "
+RDEPENDS_perl-module-cpan += "perl-module-file-copy "
+RDEPENDS_perl-module-cpan += "perl-module-file-find "
+RDEPENDS_perl-module-cpan += "perl-module-filehandle "
+RDEPENDS_perl-module-cpan += "perl-module-file-path "
+RDEPENDS_perl-module-cpan += "perl-module-file-spec "
+RDEPENDS_perl-module-cpan += "perl-module-overload "
+RDEPENDS_perl-module-cpan += "perl-module-safe "
+RDEPENDS_perl-module-cpan += "perl-module-strict "
+RDEPENDS_perl-module-cpan += "perl-module-sys-hostname "
+RDEPENDS_perl-module-cpan += "perl-module-text-parsewords "
+RDEPENDS_perl-module-cpan += "perl-module-text-wrap "
+RDEPENDS_perl-module-cpan += "perl-module-vars "
+RDEPENDS_perl-module-cwd += "perl-module-exporter "
+RDEPENDS_perl-module-cwd += "perl-module-strict "
+RDEPENDS_perl-module-cwd += "perl-module-vars "
+RDEPENDS_perl-module-data-dumper += "perl-module-exporter "
+RDEPENDS_perl-module-data-dumper += "perl-module-overload "
+RDEPENDS_perl-module-data-dumper += "perl-module-carp "
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-carp "
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter-compress += "perl-module-warnings "
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-carp "
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter-encode += "perl-module-warnings "
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter-int32 += "perl-module-warnings "
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter-null += "perl-module-warnings "
+RDEPENDS_perl-module-dbm-filter += "perl-module-carp "
+RDEPENDS_perl-module-dbm-filter += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter += "perl-module-warnings "
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-carp "
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-strict "
+RDEPENDS_perl-module-dbm-filter-utf8 += "perl-module-warnings "
+RDEPENDS_perl-module-devel-dprof += "perl-module-xsloader "
+RDEPENDS_perl-module-devel-peek += "perl-module-exporter "
+RDEPENDS_perl-module-devel-peek += "perl-module-xsloader "
+RDEPENDS_perl-module-devel-ppport += "perl-module-dynaloader "
+RDEPENDS_perl-module-devel-ppport += "perl-module-strict "
+RDEPENDS_perl-module-devel-ppport += "perl-module-vars "
+RDEPENDS_perl-module-devel-selfstubber += "perl-module-selfloader "
+RDEPENDS_perl-module-devel-selfstubber += "perl-module-file-spec "
+RDEPENDS_perl-module-diagnostics += "perl-module-carp "
+RDEPENDS_perl-module-diagnostics += "perl-module-config "
+RDEPENDS_perl-module-diagnostics += "perl-module-strict "
+RDEPENDS_perl-module-digest-base += "perl-module-strict "
+RDEPENDS_perl-module-digest-base += "perl-module-vars "
+RDEPENDS_perl-module-digest-file += "perl-module-carp "
+RDEPENDS_perl-module-digest-file += "perl-module-digest "
+RDEPENDS_perl-module-digest-file += "perl-module-exporter "
+RDEPENDS_perl-module-digest-file += "perl-module-strict "
+RDEPENDS_perl-module-digest-file += "perl-module-vars "
+RDEPENDS_perl-module-digest-md5 += "perl-module-dynaloader "
+RDEPENDS_perl-module-digest-md5 += "perl-module-exporter "
+RDEPENDS_perl-module-digest-md5 += "perl-module-strict "
+RDEPENDS_perl-module-digest-md5 += "perl-module-vars "
+RDEPENDS_perl-module-digest += "perl-module-strict "
+RDEPENDS_perl-module-digest += "perl-module-vars "
+RDEPENDS_perl-module-dirhandle += "perl-module-carp "
+RDEPENDS_perl-module-dirhandle += "perl-module-symbol "
+RDEPENDS_perl-module-dumpvalue += "perl-module-strict "
+RDEPENDS_perl-module-dynaloader += "perl-module-autoloader "
+RDEPENDS_perl-module-dynaloader += "perl-module-config "
+RDEPENDS_perl-module-dynaloader += "perl-module-vars "
+RDEPENDS_perl-module-encode-alias += "perl-module-base "
+RDEPENDS_perl-module-encode-alias += "perl-module-encode "
+RDEPENDS_perl-module-encode-alias += "perl-module-strict "
+RDEPENDS_perl-module-encode-byte += "perl-module-encode "
+RDEPENDS_perl-module-encode-byte += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-exporter "
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-carp "
+RDEPENDS_perl-module-encode-cjkconstants += "perl-module-strict "
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-base "
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-encode "
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-strict "
+RDEPENDS_perl-module-encode-cn-hz += "perl-module-vars "
+RDEPENDS_perl-module-encode-cn += "perl-module-encode "
+RDEPENDS_perl-module-encode-cn += "perl-module-encode-cn-hz "
+RDEPENDS_perl-module-encode-cn += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-config += "perl-module-strict "
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-encode "
+RDEPENDS_perl-module-encode-ebcdic += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-encoder += "perl-module-exporter "
+RDEPENDS_perl-module-encode-encoder += "perl-module-carp "
+RDEPENDS_perl-module-encode-encoder += "perl-module-encode "
+RDEPENDS_perl-module-encode-encoder += "perl-module-strict "
+RDEPENDS_perl-module-encode-encoder += "perl-module-warnings "
+RDEPENDS_perl-module-encode-encoding += "perl-module-encode "
+RDEPENDS_perl-module-encode-encoding += "perl-module-strict "
+RDEPENDS_perl-module-encode-guess += "perl-module-base "
+RDEPENDS_perl-module-encode-guess += "perl-module-encode "
+RDEPENDS_perl-module-encode-guess += "perl-module-strict "
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-encode-cjkconstants "
+RDEPENDS_perl-module-encode-jp-h2z += "perl-module-strict "
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-base "
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode "
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-encode-cjkconstants "
+RDEPENDS_perl-module-encode-jp-jis7 += "perl-module-strict "
+RDEPENDS_perl-module-encode-jp += "perl-module-encode "
+RDEPENDS_perl-module-encode-jp += "perl-module-encode-jp-jis7 "
+RDEPENDS_perl-module-encode-jp += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-base "
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode "
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-encode-cjkconstants "
+RDEPENDS_perl-module-encode-kr-2022-kr += "perl-module-strict "
+RDEPENDS_perl-module-encode-kr += "perl-module-encode "
+RDEPENDS_perl-module-encode-kr += "perl-module-encode-kr-2022-kr "
+RDEPENDS_perl-module-encode-kr += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-base "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-carp "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-constant "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-encode "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-mime-base64 "
+RDEPENDS_perl-module-encode-mime-header += "perl-module-strict "
+RDEPENDS_perl-module-encode-symbol += "perl-module-encode "
+RDEPENDS_perl-module-encode-symbol += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-tw += "perl-module-encode "
+RDEPENDS_perl-module-encode-tw += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-unicode += "perl-module-encode "
+RDEPENDS_perl-module-encode-unicode += "perl-module-base "
+RDEPENDS_perl-module-encode-unicode += "perl-module-strict "
+RDEPENDS_perl-module-encode-unicode += "perl-module-warnings "
+RDEPENDS_perl-module-encode-unicode += "perl-module-xsloader "
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-base "
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-encode "
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-mime-base64 "
+RDEPENDS_perl-module-encode-unicode-utf7 += "perl-module-strict "
+RDEPENDS_perl-module-encode += "perl-module-encode-config "
+RDEPENDS_perl-module-encode += "perl-module-exporter "
+RDEPENDS_perl-module-encode += "perl-module-base "
+RDEPENDS_perl-module-encode += "perl-module-encode-alias "
+RDEPENDS_perl-module-encode += "perl-module-strict "
+RDEPENDS_perl-module-encode += "perl-module-xsloader "
+RDEPENDS_perl-module-encoding += "perl-module-encode "
+RDEPENDS_perl-module-encoding += "perl-module-strict "
+RDEPENDS_perl-module-english += "perl-module-exporter "
+RDEPENDS_perl-module-env += "perl-module-config "
+RDEPENDS_perl-module-env += "perl-module-tie-array "
+RDEPENDS_perl-module-errno += "perl-module-config "
+RDEPENDS_perl-module-errno += "perl-module-exporter "
+RDEPENDS_perl-module-errno += "perl-module-strict "
+RDEPENDS_perl-module-exporter-heavy += "perl-module-exporter "
+RDEPENDS_perl-module-exporter-heavy += "perl-module-strict "
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-strict "
+RDEPENDS_perl-module-extutils-command-mm += "perl-module-vars "
+RDEPENDS_perl-module-extutils-command += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-command += "perl-module-carp "
+RDEPENDS_perl-module-extutils-command += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-command += "perl-module-file-compare "
+RDEPENDS_perl-module-extutils-command += "perl-module-file-copy "
+RDEPENDS_perl-module-extutils-command += "perl-module-file-path "
+RDEPENDS_perl-module-extutils-command += "perl-module-strict "
+RDEPENDS_perl-module-extutils-command += "perl-module-vars "
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-carp "
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-extutils-constant-utils "
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-strict "
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-text-wrap "
+RDEPENDS_perl-module-extutils-constant-base += "perl-module-vars "
+RDEPENDS_perl-module-extutils-constant += "perl-module-carp "
+RDEPENDS_perl-module-extutils-constant += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-utils "
+RDEPENDS_perl-module-extutils-constant += "perl-module-extutils-constant-xs "
+RDEPENDS_perl-module-extutils-constant += "perl-module-strict "
+RDEPENDS_perl-module-extutils-constant += "perl-module-vars "
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-carp "
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-strict "
+RDEPENDS_perl-module-extutils-constant-utils += "perl-module-vars "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-base "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-carp "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-extutils-constant-utils "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-strict "
+RDEPENDS_perl-module-extutils-constant-xs += "perl-module-vars "
+RDEPENDS_perl-module-extutils-embed += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-embed += "perl-module-filehandle "
+RDEPENDS_perl-module-extutils-embed += "perl-module-config "
+RDEPENDS_perl-module-extutils-embed += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-embed += "perl-module-getopt-std "
+RDEPENDS_perl-module-extutils-embed += "perl-module-strict "
+RDEPENDS_perl-module-extutils-installed += "perl-module-carp "
+RDEPENDS_perl-module-extutils-installed += "perl-module-config "
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-installed += "perl-module-extutils-packlist "
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-find "
+RDEPENDS_perl-module-extutils-installed += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-installed += "perl-module-strict "
+RDEPENDS_perl-module-extutils-installed += "perl-module-vars "
+RDEPENDS_perl-module-extutils-install += "perl-module-carp "
+RDEPENDS_perl-module-extutils-install += "perl-module-config "
+RDEPENDS_perl-module-extutils-install += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-install += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-install += "perl-module-vars "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-config "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-cwd "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-strict "
+RDEPENDS_perl-module-extutils-liblist-kid += "perl-module-vars "
+RDEPENDS_perl-module-extutils-liblist += "perl-module-extutils-liblist-kid "
+RDEPENDS_perl-module-extutils-liblist += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-liblist += "perl-module-vars "
+RDEPENDS_perl-module-extutils-makemaker-bytes += "perl-module-vars "
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-carp "
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-config "
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-file-path "
+RDEPENDS_perl-module-extutils-makemaker += "perl-module-strict "
+RDEPENDS_perl-module-extutils-makemaker-vmsish += "perl-module-vmsish "
+RDEPENDS_perl-module-extutils-makemaker-vmsish += "perl-module-vars "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-carp "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-config "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-copy "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-find "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-manifest += "perl-module-strict "
+RDEPENDS_perl-module-extutils-miniperl += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-config "
+RDEPENDS_perl-module-extutils-mkbootstrap += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-carp "
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-config "
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mksymlists += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-any += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-mm-beos += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-cygwin += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-dos += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-cwd "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-mm-macos += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-mm-win32 "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-nw5 += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-os2 += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-carp "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-dirhandle "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-mm-unix += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-liblist "
+RDEPENDS_perl-module-extutils-mm += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-uwin += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-win32 += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-extutils-mm-win32 "
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-win95 += "perl-module-vars "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-exporter "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-any "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-mm-unix "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-config "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-extutils-makemaker "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-file-basename "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-strict "
+RDEPENDS_perl-module-extutils-mm-vms += "perl-module-vars "
+RDEPENDS_perl-module-extutils-my += "perl-module-extutils-mm "
+RDEPENDS_perl-module-extutils-my += "perl-module-strict "
+RDEPENDS_perl-module-extutils-my += "perl-module-vars "
+RDEPENDS_perl-module-extutils-packlist += "perl-module-carp "
+RDEPENDS_perl-module-extutils-packlist += "perl-module-strict "
+RDEPENDS_perl-module-extutils-packlist += "perl-module-vars "
+RDEPENDS_perl-module-extutils-testlib += "perl-module-cwd "
+RDEPENDS_perl-module-extutils-testlib += "perl-module-file-spec "
+RDEPENDS_perl-module-extutils-testlib += "perl-module-lib "
+RDEPENDS_perl-module-fatal += "perl-module-carp "
+RDEPENDS_perl-module-fatal += "perl-module-strict "
+RDEPENDS_perl-module-fcntl += "perl-module-exporter "
+RDEPENDS_perl-module-fcntl += "perl-module-xsloader "
+RDEPENDS_perl-module-fields += "perl-module-strict "
+RDEPENDS_perl-module-fields += "perl-module-vars "
+RDEPENDS_perl-module-file-basename += "perl-module-exporter "
+RDEPENDS_perl-module-file-basename += "perl-module-warnings "
+RDEPENDS_perl-module-filecache += "perl-module-base "
+RDEPENDS_perl-module-filecache += "perl-module-carp "
+RDEPENDS_perl-module-filecache += "perl-module-config "
+RDEPENDS_perl-module-filecache += "perl-module-strict "
+RDEPENDS_perl-module-filecache += "perl-module-vars "
+RDEPENDS_perl-module-file-checktree += "perl-module-cwd "
+RDEPENDS_perl-module-file-checktree += "perl-module-exporter "
+RDEPENDS_perl-module-file-checktree += "perl-module-file-spec "
+RDEPENDS_perl-module-file-checktree += "perl-module-strict "
+RDEPENDS_perl-module-file-checktree += "perl-module-warnings "
+RDEPENDS_perl-module-file-compare += "perl-module-exporter "
+RDEPENDS_perl-module-file-compare += "perl-module-carp "
+RDEPENDS_perl-module-file-compare += "perl-module-strict "
+RDEPENDS_perl-module-file-compare += "perl-module-warnings "
+RDEPENDS_perl-module-file-copy += "perl-module-exporter "
+RDEPENDS_perl-module-file-copy += "perl-module-carp "
+RDEPENDS_perl-module-file-copy += "perl-module-config "
+RDEPENDS_perl-module-file-copy += "perl-module-file-spec "
+RDEPENDS_perl-module-file-copy += "perl-module-strict "
+RDEPENDS_perl-module-file-copy += "perl-module-warnings "
+RDEPENDS_perl-module-file-dosglob += "perl-module-strict "
+RDEPENDS_perl-module-file-dosglob += "perl-module-warnings "
+RDEPENDS_perl-module-file-find += "perl-module-cwd "
+RDEPENDS_perl-module-file-find += "perl-module-exporter "
+RDEPENDS_perl-module-file-find += "perl-module-file-basename "
+RDEPENDS_perl-module-file-find += "perl-module-file-spec "
+RDEPENDS_perl-module-file-find += "perl-module-strict "
+RDEPENDS_perl-module-file-find += "perl-module-warnings "
+RDEPENDS_perl-module-file-find += "perl-module-warnings-register "
+RDEPENDS_perl-module-file-glob += "perl-module-strict "
+RDEPENDS_perl-module-file-glob += "perl-module-xsloader "
+RDEPENDS_perl-module-filehandle += "perl-module-io-file "
+RDEPENDS_perl-module-filehandle += "perl-module-strict "
+RDEPENDS_perl-module-file-path += "perl-module-carp "
+RDEPENDS_perl-module-file-path += "perl-module-exporter "
+RDEPENDS_perl-module-file-path += "perl-module-file-basename "
+RDEPENDS_perl-module-file-path += "perl-module-strict "
+RDEPENDS_perl-module-file-path += "perl-module-warnings "
+RDEPENDS_perl-module-file-spec-cygwin += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-cygwin += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-cygwin += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-epoc += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-epoc += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-epoc += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-functions += "perl-module-exporter "
+RDEPENDS_perl-module-file-spec-functions += "perl-module-file-spec "
+RDEPENDS_perl-module-file-spec-functions += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-functions += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-mac += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-mac += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-mac += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-os2 += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-os2 += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-os2 += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-unix += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-unix += "perl-module-vars "
+RDEPENDS_perl-module-file-spec += "perl-module-strict "
+RDEPENDS_perl-module-file-spec += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-win32 += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-win32 += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-win32 += "perl-module-vars "
+RDEPENDS_perl-module-file-spec-vms += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-file-spec-vms += "perl-module-file-basename "
+RDEPENDS_perl-module-file-spec-vms += "perl-module-strict "
+RDEPENDS_perl-module-file-spec-vms += "perl-module-vars "
+RDEPENDS_perl-module-file-stat += "perl-module-class-struct "
+RDEPENDS_perl-module-file-stat += "perl-module-strict "
+RDEPENDS_perl-module-file-stat += "perl-module-warnings "
+RDEPENDS_perl-module-file-stat += "perl-module-vars "
+RDEPENDS_perl-module-file-temp += "perl-module-base "
+RDEPENDS_perl-module-file-temp += "perl-module-carp "
+RDEPENDS_perl-module-file-temp += "perl-module-constant "
+RDEPENDS_perl-module-file-temp += "perl-module-errno "
+RDEPENDS_perl-module-file-temp += "perl-module-fcntl "
+RDEPENDS_perl-module-file-temp += "perl-module-file-path "
+RDEPENDS_perl-module-file-temp += "perl-module-file-spec "
+RDEPENDS_perl-module-file-temp += "perl-module-overload "
+RDEPENDS_perl-module-file-temp += "perl-module-strict "
+RDEPENDS_perl-module-file-temp += "perl-module-vars "
+RDEPENDS_perl-module-filter-simple += "perl-module-carp "
+RDEPENDS_perl-module-filter-simple += "perl-module-filter-util-call "
+RDEPENDS_perl-module-filter-simple += "perl-module-text-balanced "
+RDEPENDS_perl-module-filter-simple += "perl-module-vars "
+RDEPENDS_perl-module-filter-util-call += "perl-module-dynaloader "
+RDEPENDS_perl-module-filter-util-call += "perl-module-exporter "
+RDEPENDS_perl-module-filter-util-call += "perl-module-carp "
+RDEPENDS_perl-module-filter-util-call += "perl-module-strict "
+RDEPENDS_perl-module-filter-util-call += "perl-module-warnings "
+RDEPENDS_perl-module-filter-util-call += "perl-module-vars "
+RDEPENDS_perl-module-findbin += "perl-module-exporter "
+RDEPENDS_perl-module-findbin += "perl-module-carp "
+RDEPENDS_perl-module-findbin += "perl-module-config "
+RDEPENDS_perl-module-findbin += "perl-module-cwd "
+RDEPENDS_perl-module-findbin += "perl-module-file-basename "
+RDEPENDS_perl-module-findbin += "perl-module-file-spec "
+RDEPENDS_perl-module-getopt-long += "perl-module-constant "
+RDEPENDS_perl-module-getopt-long += "perl-module-exporter "
+RDEPENDS_perl-module-getopt-long += "perl-module-strict "
+RDEPENDS_perl-module-getopt-long += "perl-module-vars "
+RDEPENDS_perl-module-getopt-std += "perl-module-exporter "
+RDEPENDS_perl-module-hash-util += "perl-module-exporter "
+RDEPENDS_perl-module-hash-util += "perl-module-carp "
+RDEPENDS_perl-module-hash-util += "perl-module-strict "
+RDEPENDS_perl-module-i18n-collate += "perl-module-exporter "
+RDEPENDS_perl-module-i18n-collate += "perl-module-posix "
+RDEPENDS_perl-module-i18n-collate += "perl-module-strict "
+RDEPENDS_perl-module-i18n-collate += "perl-module-warnings-register "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-dynaloader "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-exporter "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-autoloader "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-carp "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-strict "
+RDEPENDS_perl-module-i18n-langinfo += "perl-module-warnings "
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-i18n-langtags "
+RDEPENDS_perl-module-i18n-langtags-detect += "perl-module-strict "
+RDEPENDS_perl-module-i18n-langtags-list += "perl-module-strict "
+RDEPENDS_perl-module-i18n-langtags-list += "perl-module-vars "
+RDEPENDS_perl-module-i18n-langtags += "perl-module-exporter "
+RDEPENDS_perl-module-i18n-langtags += "perl-module-strict "
+RDEPENDS_perl-module-i18n-langtags += "perl-module-vars "
+RDEPENDS_perl-module-io-dir += "perl-module-carp "
+RDEPENDS_perl-module-io-dir += "perl-module-exporter "
+RDEPENDS_perl-module-io-dir += "perl-module-file-spec "
+RDEPENDS_perl-module-io-dir += "perl-module-file-stat "
+RDEPENDS_perl-module-io-dir += "perl-module-io-file "
+RDEPENDS_perl-module-io-dir += "perl-module-strict "
+RDEPENDS_perl-module-io-dir += "perl-module-symbol "
+RDEPENDS_perl-module-io-dir += "perl-module-tie-hash "
+RDEPENDS_perl-module-io-file += "perl-module-exporter "
+RDEPENDS_perl-module-io-file += "perl-module-carp "
+RDEPENDS_perl-module-io-file += "perl-module-file-spec "
+RDEPENDS_perl-module-io-file += "perl-module-io-seekable "
+RDEPENDS_perl-module-io-file += "perl-module-selectsaver "
+RDEPENDS_perl-module-io-file += "perl-module-strict "
+RDEPENDS_perl-module-io-file += "perl-module-symbol "
+RDEPENDS_perl-module-io-handle += "perl-module-exporter "
+RDEPENDS_perl-module-io-handle += "perl-module-carp "
+RDEPENDS_perl-module-io-handle += "perl-module-selectsaver "
+RDEPENDS_perl-module-io-handle += "perl-module-strict "
+RDEPENDS_perl-module-io-handle += "perl-module-symbol "
+RDEPENDS_perl-module-io-pipe += "perl-module-carp "
+RDEPENDS_perl-module-io-pipe += "perl-module-io-handle "
+RDEPENDS_perl-module-io-pipe += "perl-module-strict "
+RDEPENDS_perl-module-io-pipe += "perl-module-symbol "
+RDEPENDS_perl-module-io-poll += "perl-module-exporter "
+RDEPENDS_perl-module-io-poll += "perl-module-io-handle "
+RDEPENDS_perl-module-io-poll += "perl-module-strict "
+RDEPENDS_perl-module-io-seekable += "perl-module-exporter "
+RDEPENDS_perl-module-io-seekable += "perl-module-carp "
+RDEPENDS_perl-module-io-seekable += "perl-module-fcntl "
+RDEPENDS_perl-module-io-seekable += "perl-module-io-handle "
+RDEPENDS_perl-module-io-seekable += "perl-module-strict "
+RDEPENDS_perl-module-io-select += "perl-module-exporter "
+RDEPENDS_perl-module-io-select += "perl-module-strict "
+RDEPENDS_perl-module-io-select += "perl-module-warnings-register "
+RDEPENDS_perl-module-io-select += "perl-module-vars "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-carp "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-errno "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-exporter "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-io-socket "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-socket "
+RDEPENDS_perl-module-io-socket-inet += "perl-module-strict "
+RDEPENDS_perl-module-io-socket-unix += "perl-module-carp "
+RDEPENDS_perl-module-io-socket-unix += "perl-module-io-socket "
+RDEPENDS_perl-module-io-socket-unix += "perl-module-socket "
+RDEPENDS_perl-module-io-socket-unix += "perl-module-strict "
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-inet "
+RDEPENDS_perl-module-io-socket += "perl-module-io-socket-unix "
+RDEPENDS_perl-module-io-socket += "perl-module-carp "
+RDEPENDS_perl-module-io-socket += "perl-module-errno "
+RDEPENDS_perl-module-io-socket += "perl-module-exporter "
+RDEPENDS_perl-module-io-socket += "perl-module-io-handle "
+RDEPENDS_perl-module-io-socket += "perl-module-socket "
+RDEPENDS_perl-module-io-socket += "perl-module-strict "
+RDEPENDS_perl-module-io += "perl-module-carp "
+RDEPENDS_perl-module-io += "perl-module-strict "
+RDEPENDS_perl-module-io += "perl-module-warnings "
+RDEPENDS_perl-module-io += "perl-module-xsloader "
+RDEPENDS_perl-module-ipc-msg += "perl-module-carp "
+RDEPENDS_perl-module-ipc-msg += "perl-module-ipc-sysv "
+RDEPENDS_perl-module-ipc-msg += "perl-module-strict "
+RDEPENDS_perl-module-ipc-msg += "perl-module-vars "
+RDEPENDS_perl-module-ipc-open2 += "perl-module-exporter "
+RDEPENDS_perl-module-ipc-open2 += "perl-module-ipc-open3 "
+RDEPENDS_perl-module-ipc-open2 += "perl-module-strict "
+RDEPENDS_perl-module-ipc-open3 += "perl-module-exporter "
+RDEPENDS_perl-module-ipc-open3 += "perl-module-carp "
+RDEPENDS_perl-module-ipc-open3 += "perl-module-strict "
+RDEPENDS_perl-module-ipc-open3 += "perl-module-symbol "
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-carp "
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-strict "
+RDEPENDS_perl-module-ipc-semaphore += "perl-module-vars "
+RDEPENDS_perl-module-ipc-sysv += "perl-module-exporter "
+RDEPENDS_perl-module-ipc-sysv += "perl-module-carp "
+RDEPENDS_perl-module-ipc-sysv += "perl-module-config "
+RDEPENDS_perl-module-ipc-sysv += "perl-module-strict "
+RDEPENDS_perl-module-ipc-sysv += "perl-module-vars "
+RDEPENDS_perl-module-lib += "perl-module-config "
+RDEPENDS_perl-module-lib += "perl-module-strict "
+RDEPENDS_perl-module-list-util += "perl-module-exporter "
+RDEPENDS_perl-module-list-util += "perl-module-vars "
+RDEPENDS_perl-module-locale-constants += "perl-module-exporter "
+RDEPENDS_perl-module-locale-constants += "perl-module-constant "
+RDEPENDS_perl-module-locale-constants += "perl-module-strict "
+RDEPENDS_perl-module-locale-constants += "perl-module-vars "
+RDEPENDS_perl-module-locale-country += "perl-module-exporter "
+RDEPENDS_perl-module-locale-country += "perl-module-carp "
+RDEPENDS_perl-module-locale-country += "perl-module-locale-constants "
+RDEPENDS_perl-module-locale-country += "perl-module-strict "
+RDEPENDS_perl-module-locale-country += "perl-module-vars "
+RDEPENDS_perl-module-locale-currency += "perl-module-exporter "
+RDEPENDS_perl-module-locale-currency += "perl-module-strict "
+RDEPENDS_perl-module-locale-currency += "perl-module-vars "
+RDEPENDS_perl-module-locale-language += "perl-module-exporter "
+RDEPENDS_perl-module-locale-language += "perl-module-strict "
+RDEPENDS_perl-module-locale-language += "perl-module-vars "
+RDEPENDS_perl-module-locale-maketext-gutsloader += "perl-module-strict "
+RDEPENDS_perl-module-locale-maketext-guts += "perl-module-strict "
+RDEPENDS_perl-module-locale-maketext-guts += "perl-module-utf8 "
+RDEPENDS_perl-module-locale-maketext-guts += "perl-module-vars "
+RDEPENDS_perl-module-locale-maketext += "perl-module-carp "
+RDEPENDS_perl-module-locale-maketext += "perl-module-i18n-langtags "
+RDEPENDS_perl-module-locale-maketext += "perl-module-locale-maketext-gutsloader "
+RDEPENDS_perl-module-locale-maketext += "perl-module-strict "
+RDEPENDS_perl-module-locale-script += "perl-module-exporter "
+RDEPENDS_perl-module-locale-script += "perl-module-carp "
+RDEPENDS_perl-module-locale-script += "perl-module-locale-constants "
+RDEPENDS_perl-module-locale-script += "perl-module-strict "
+RDEPENDS_perl-module-locale-script += "perl-module-vars "
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-exporter "
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-math-bigfloat "
+RDEPENDS_perl-module-math-bigfloat-trace += "perl-module-strict "
+RDEPENDS_perl-module-math-bigfloat += "perl-module-exporter "
+RDEPENDS_perl-module-math-bigfloat += "perl-module-strict "
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-strict "
+RDEPENDS_perl-module-math-bigint-calcemu += "perl-module-vars "
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-strict "
+RDEPENDS_perl-module-math-bigint-calc += "perl-module-vars "
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-exporter "
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-math-bigint "
+RDEPENDS_perl-module-math-bigint-trace += "perl-module-strict "
+RDEPENDS_perl-module-math-bigint += "perl-module-strict "
+RDEPENDS_perl-module-math-bigrat += "perl-module-math-bigfloat "
+RDEPENDS_perl-module-math-bigrat += "perl-module-strict "
+RDEPENDS_perl-module-math-complex += "perl-module-exporter "
+RDEPENDS_perl-module-math-complex += "perl-module-strict "
+RDEPENDS_perl-module-math-trig += "perl-module-exporter "
+RDEPENDS_perl-module-math-trig += "perl-module-math-complex "
+RDEPENDS_perl-module-math-trig += "perl-module-strict "
+RDEPENDS_perl-module-memoize-anydbm-file += "perl-module-vars "
+RDEPENDS_perl-module-memoize-expirefile += "perl-module-carp "
+RDEPENDS_perl-module-memoize-expire += "perl-module-carp "
+RDEPENDS_perl-module-memoize-sdbm-file += "perl-module-sdbm-file "
+RDEPENDS_perl-module-memoize-storable += "perl-module-storable "
+RDEPENDS_perl-module-memoize += "perl-module-carp "
+RDEPENDS_perl-module-memoize += "perl-module-exporter "
+RDEPENDS_perl-module-memoize += "perl-module-strict "
+RDEPENDS_perl-module-memoize += "perl-module-vars "
+RDEPENDS_perl-module-mime-base64 += "perl-module-dynaloader "
+RDEPENDS_perl-module-mime-base64 += "perl-module-exporter "
+RDEPENDS_perl-module-mime-base64 += "perl-module-strict "
+RDEPENDS_perl-module-mime-base64 += "perl-module-vars "
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-exporter "
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-strict "
+RDEPENDS_perl-module-mime-quotedprint += "perl-module-vars "
+RDEPENDS_perl-module-net-cmd += "perl-module-exporter "
+RDEPENDS_perl-module-net-cmd += "perl-module-carp "
+RDEPENDS_perl-module-net-cmd += "perl-module-strict "
+RDEPENDS_perl-module-net-cmd += "perl-module-symbol "
+RDEPENDS_perl-module-net-cmd += "perl-module-vars "
+RDEPENDS_perl-module-net-config += "perl-module-exporter "
+RDEPENDS_perl-module-net-config += "perl-module-socket "
+RDEPENDS_perl-module-net-config += "perl-module-strict "
+RDEPENDS_perl-module-net-config += "perl-module-vars "
+RDEPENDS_perl-module-net-domain += "perl-module-exporter "
+RDEPENDS_perl-module-net-domain += "perl-module-carp "
+RDEPENDS_perl-module-net-domain += "perl-module-net-config "
+RDEPENDS_perl-module-net-domain += "perl-module-strict "
+RDEPENDS_perl-module-net-domain += "perl-module-vars "
+RDEPENDS_perl-module-net-ftp-a += "perl-module-net-ftp-dataconn "
+RDEPENDS_perl-module-net-ftp-a += "perl-module-carp "
+RDEPENDS_perl-module-net-ftp-a += "perl-module-strict "
+RDEPENDS_perl-module-net-ftp-a += "perl-module-vars "
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-carp "
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-errno "
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-net-cmd "
+RDEPENDS_perl-module-net-ftp-dataconn += "perl-module-vars "
+RDEPENDS_perl-module-net-ftp-e += "perl-module-net-ftp-i "
+RDEPENDS_perl-module-net-ftp-i += "perl-module-net-ftp-dataconn "
+RDEPENDS_perl-module-net-ftp-i += "perl-module-carp "
+RDEPENDS_perl-module-net-ftp-i += "perl-module-vars "
+RDEPENDS_perl-module-net-ftp-l += "perl-module-net-ftp-i "
+RDEPENDS_perl-module-net-ftp += "perl-module-carp "
+RDEPENDS_perl-module-net-ftp += "perl-module-fcntl "
+RDEPENDS_perl-module-net-ftp += "perl-module-io-socket "
+RDEPENDS_perl-module-net-ftp += "perl-module-net-cmd "
+RDEPENDS_perl-module-net-ftp += "perl-module-net-config "
+RDEPENDS_perl-module-net-ftp += "perl-module-socket "
+RDEPENDS_perl-module-net-ftp += "perl-module-strict "
+RDEPENDS_perl-module-net-ftp += "perl-module-time-local "
+RDEPENDS_perl-module-net-ftp += "perl-module-vars "
+RDEPENDS_perl-module-net-hostent += "perl-module-class-struct "
+RDEPENDS_perl-module-net-hostent += "perl-module-strict "
+RDEPENDS_perl-module-net-hostent += "perl-module-vars "
+RDEPENDS_perl-module-net-netent += "perl-module-class-struct "
+RDEPENDS_perl-module-net-netent += "perl-module-strict "
+RDEPENDS_perl-module-net-netent += "perl-module-vars "
+RDEPENDS_perl-module-net-netrc += "perl-module-carp "
+RDEPENDS_perl-module-net-netrc += "perl-module-filehandle "
+RDEPENDS_perl-module-net-netrc += "perl-module-strict "
+RDEPENDS_perl-module-net-netrc += "perl-module-vars "
+RDEPENDS_perl-module-net-nntp += "perl-module-carp "
+RDEPENDS_perl-module-net-nntp += "perl-module-io-socket "
+RDEPENDS_perl-module-net-nntp += "perl-module-net-cmd "
+RDEPENDS_perl-module-net-nntp += "perl-module-net-config "
+RDEPENDS_perl-module-net-nntp += "perl-module-strict "
+RDEPENDS_perl-module-net-nntp += "perl-module-time-local "
+RDEPENDS_perl-module-net-nntp += "perl-module-vars "
+RDEPENDS_perl-module-net-ping += "perl-module-exporter "
+RDEPENDS_perl-module-net-ping += "perl-module-carp "
+RDEPENDS_perl-module-net-ping += "perl-module-constant "
+RDEPENDS_perl-module-net-ping += "perl-module-fcntl "
+RDEPENDS_perl-module-net-ping += "perl-module-filehandle "
+RDEPENDS_perl-module-net-ping += "perl-module-posix "
+RDEPENDS_perl-module-net-ping += "perl-module-strict "
+RDEPENDS_perl-module-net-pop3 += "perl-module-carp "
+RDEPENDS_perl-module-net-pop3 += "perl-module-io-socket "
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-cmd "
+RDEPENDS_perl-module-net-pop3 += "perl-module-net-config "
+RDEPENDS_perl-module-net-pop3 += "perl-module-strict "
+RDEPENDS_perl-module-net-pop3 += "perl-module-vars "
+RDEPENDS_perl-module-net-protoent += "perl-module-class-struct "
+RDEPENDS_perl-module-net-protoent += "perl-module-strict "
+RDEPENDS_perl-module-net-protoent += "perl-module-vars "
+RDEPENDS_perl-module-net-servent += "perl-module-class-struct "
+RDEPENDS_perl-module-net-servent += "perl-module-strict "
+RDEPENDS_perl-module-net-servent += "perl-module-vars "
+RDEPENDS_perl-module-net-smtp += "perl-module-carp "
+RDEPENDS_perl-module-net-smtp += "perl-module-io-socket "
+RDEPENDS_perl-module-net-smtp += "perl-module-net-cmd "
+RDEPENDS_perl-module-net-smtp += "perl-module-net-config "
+RDEPENDS_perl-module-net-smtp += "perl-module-socket "
+RDEPENDS_perl-module-net-smtp += "perl-module-strict "
+RDEPENDS_perl-module-net-smtp += "perl-module-vars "
+RDEPENDS_perl-module-net-time += "perl-module-exporter "
+RDEPENDS_perl-module-net-time += "perl-module-carp "
+RDEPENDS_perl-module-net-time += "perl-module-io-select "
+RDEPENDS_perl-module-net-time += "perl-module-io-socket "
+RDEPENDS_perl-module-net-time += "perl-module-net-config "
+RDEPENDS_perl-module-net-time += "perl-module-strict "
+RDEPENDS_perl-module-net-time += "perl-module-vars "
+RDEPENDS_perl-module-next += "perl-module-carp "
+RDEPENDS_perl-module-next += "perl-module-strict "
+RDEPENDS_perl-module-opcode += "perl-module-carp "
+RDEPENDS_perl-module-opcode += "perl-module-exporter "
+RDEPENDS_perl-module-opcode += "perl-module-strict "
+RDEPENDS_perl-module-opcode += "perl-module-subs "
+RDEPENDS_perl-module-opcode += "perl-module-xsloader "
+RDEPENDS_perl-module-open += "perl-module-carp "
+RDEPENDS_perl-module-open += "perl-module-warnings "
+RDEPENDS_perl-module-ops += "perl-module-opcode "
+RDEPENDS_perl-module-o += "perl-module-b "
+RDEPENDS_perl-module-o += "perl-module-carp "
+RDEPENDS_perl-module-overload += "perl-module-warnings-register "
+RDEPENDS_perl-module-perlio-encoding += "perl-module-strict "
+RDEPENDS_perl-module-perlio-encoding += "perl-module-xsloader "
+RDEPENDS_perl-module-perlio-scalar += "perl-module-xsloader "
+RDEPENDS_perl-module-perlio-via-quotedprint += "perl-module-strict "
+RDEPENDS_perl-module-perlio-via += "perl-module-xsloader "
+RDEPENDS_perl-module-pod-checker += "perl-module-carp "
+RDEPENDS_perl-module-pod-checker += "perl-module-exporter "
+RDEPENDS_perl-module-pod-checker += "perl-module-pod-parser "
+RDEPENDS_perl-module-pod-checker += "perl-module-strict "
+RDEPENDS_perl-module-pod-checker += "perl-module-vars "
+RDEPENDS_perl-module-pod-find += "perl-module-carp "
+RDEPENDS_perl-module-pod-find += "perl-module-cwd "
+RDEPENDS_perl-module-pod-find += "perl-module-exporter "
+RDEPENDS_perl-module-pod-find += "perl-module-file-find "
+RDEPENDS_perl-module-pod-find += "perl-module-file-spec "
+RDEPENDS_perl-module-pod-find += "perl-module-strict "
+RDEPENDS_perl-module-pod-find += "perl-module-vars "
+RDEPENDS_perl-module-pod-functions += "perl-module-exporter "
+RDEPENDS_perl-module-pod-functions += "perl-module-strict "
+RDEPENDS_perl-module-pod-html += "perl-module-exporter "
+RDEPENDS_perl-module-pod-html += "perl-module-carp "
+RDEPENDS_perl-module-pod-html += "perl-module-config "
+RDEPENDS_perl-module-pod-html += "perl-module-cwd "
+RDEPENDS_perl-module-pod-html += "perl-module-file-spec "
+RDEPENDS_perl-module-pod-html += "perl-module-file-spec-unix "
+RDEPENDS_perl-module-pod-html += "perl-module-getopt-long "
+RDEPENDS_perl-module-pod-html += "perl-module-strict "
+RDEPENDS_perl-module-pod-html += "perl-module-vars "
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-strict "
+RDEPENDS_perl-module-pod-inputobjects += "perl-module-vars "
+RDEPENDS_perl-module-pod-latex += "perl-module-pod-parseutils "
+RDEPENDS_perl-module-pod-latex += "perl-module-base "
+RDEPENDS_perl-module-pod-latex += "perl-module-carp "
+RDEPENDS_perl-module-pod-latex += "perl-module-strict "
+RDEPENDS_perl-module-pod-latex += "perl-module-vars "
+RDEPENDS_perl-module-pod-man += "perl-module-carp "
+RDEPENDS_perl-module-pod-man += "perl-module-pod-parselink "
+RDEPENDS_perl-module-pod-man += "perl-module-pod-parser "
+RDEPENDS_perl-module-pod-man += "perl-module-strict "
+RDEPENDS_perl-module-pod-man += "perl-module-subs "
+RDEPENDS_perl-module-pod-man += "perl-module-vars "
+RDEPENDS_perl-module-pod-parselink += "perl-module-exporter "
+RDEPENDS_perl-module-pod-parselink += "perl-module-strict "
+RDEPENDS_perl-module-pod-parselink += "perl-module-vars "
+RDEPENDS_perl-module-pod-parser += "perl-module-carp "
+RDEPENDS_perl-module-pod-parser += "perl-module-exporter "
+RDEPENDS_perl-module-pod-parser += "perl-module-pod-inputobjects "
+RDEPENDS_perl-module-pod-parser += "perl-module-strict "
+RDEPENDS_perl-module-pod-parser += "perl-module-vars "
+RDEPENDS_perl-module-pod-parseutils += "perl-module-carp "
+RDEPENDS_perl-module-pod-parseutils += "perl-module-vars "
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-baseto += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-getoptsoo += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-tochecker += "perl-module-vars "
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-file-spec-functions "
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-toman += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-pod-man "
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-tonroff += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-topod += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-tortf += "perl-module-vars "
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-pod-text "
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-totext += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-file-spec-functions "
+RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-pod-perldoc "
+RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-totk += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-base "
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-warnings "
+RDEPENDS_perl-module-pod-perldoc-toxml += "perl-module-vars "
+RDEPENDS_perl-module-pod-perldoc += "perl-module-config "
+RDEPENDS_perl-module-pod-perldoc += "perl-module-file-spec-functions "
+RDEPENDS_perl-module-pod-perldoc += "perl-module-strict "
+RDEPENDS_perl-module-pod-perldoc += "perl-module-warnings "
+RDEPENDS_perl-module-pod-plainer += "perl-module-pod-parser "
+RDEPENDS_perl-module-pod-plainer += "perl-module-strict "
+RDEPENDS_perl-module-pod-plaintext += "perl-module-carp "
+RDEPENDS_perl-module-pod-plaintext += "perl-module-pod-select "
+RDEPENDS_perl-module-pod-plaintext += "perl-module-strict "
+RDEPENDS_perl-module-pod-plaintext += "perl-module-vars "
+RDEPENDS_perl-module-pod-select += "perl-module-carp "
+RDEPENDS_perl-module-pod-select += "perl-module-pod-parser "
+RDEPENDS_perl-module-pod-select += "perl-module-strict "
+RDEPENDS_perl-module-pod-select += "perl-module-vars "
+RDEPENDS_perl-module-pod-text-color += "perl-module-pod-text "
+RDEPENDS_perl-module-pod-text-color += "perl-module-strict "
+RDEPENDS_perl-module-pod-text-color += "perl-module-term-ansicolor "
+RDEPENDS_perl-module-pod-text-color += "perl-module-vars "
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-pod-text "
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-strict "
+RDEPENDS_perl-module-pod-text-overstrike += "perl-module-vars "
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-pod-text "
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-posix "
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-strict "
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-term-cap "
+RDEPENDS_perl-module-pod-text-termcap += "perl-module-vars "
+RDEPENDS_perl-module-pod-text += "perl-module-carp "
+RDEPENDS_perl-module-pod-text += "perl-module-exporter "
+RDEPENDS_perl-module-pod-text += "perl-module-pod-parselink "
+RDEPENDS_perl-module-pod-text += "perl-module-pod-select "
+RDEPENDS_perl-module-pod-text += "perl-module-strict "
+RDEPENDS_perl-module-pod-text += "perl-module-vars "
+RDEPENDS_perl-module-pod-usage += "perl-module-carp "
+RDEPENDS_perl-module-pod-usage += "perl-module-config "
+RDEPENDS_perl-module-pod-usage += "perl-module-exporter "
+RDEPENDS_perl-module-pod-usage += "perl-module-file-spec "
+RDEPENDS_perl-module-pod-usage += "perl-module-strict "
+RDEPENDS_perl-module-pod-usage += "perl-module-vars "
+RDEPENDS_perl-module-posix += "perl-module-exporter "
+RDEPENDS_perl-module-posix += "perl-module-autoloader "
+RDEPENDS_perl-module-posix += "perl-module-autoloader "
+RDEPENDS_perl-module-posix += "perl-module-xsloader "
+RDEPENDS_perl-module-safe += "perl-module-carp "
+RDEPENDS_perl-module-safe += "perl-module-carp-heavy "
+RDEPENDS_perl-module-safe += "perl-module-strict "
+RDEPENDS_perl-module-scalar-util += "perl-module-exporter "
+RDEPENDS_perl-module-sdbm-file += "perl-module-tie-hash "
+RDEPENDS_perl-module-sdbm-file += "perl-module-strict "
+RDEPENDS_perl-module-sdbm-file += "perl-module-warnings "
+RDEPENDS_perl-module-sdbm-file += "perl-module-xsloader "
+RDEPENDS_perl-module-search-dict += "perl-module-exporter "
+RDEPENDS_perl-module-search-dict += "perl-module-strict "
+RDEPENDS_perl-module-selectsaver += "perl-module-carp "
+RDEPENDS_perl-module-selectsaver += "perl-module-symbol "
+RDEPENDS_perl-module-selfloader += "perl-module-exporter "
+RDEPENDS_perl-module-shell += "perl-module-file-spec-functions "
+RDEPENDS_perl-module-shell += "perl-module-strict "
+RDEPENDS_perl-module-shell += "perl-module-warnings "
+RDEPENDS_perl-module-sigtrap += "perl-module-carp "
+RDEPENDS_perl-module-socket += "perl-module-exporter "
+RDEPENDS_perl-module-socket += "perl-module-carp "
+RDEPENDS_perl-module-socket += "perl-module-warnings-register "
+RDEPENDS_perl-module-socket += "perl-module-xsloader "
+RDEPENDS_perl-module-sort += "perl-module-strict "
+RDEPENDS_perl-module-storable += "perl-module-carp "
+RDEPENDS_perl-module-storable += "perl-module-dynaloader "
+RDEPENDS_perl-module-storable += "perl-module-exporter "
+RDEPENDS_perl-module-storable += "perl-module-autoloader "
+RDEPENDS_perl-module-storable += "perl-module-vars "
+RDEPENDS_perl-module-switch += "perl-module-carp "
+RDEPENDS_perl-module-switch += "perl-module-filter-util-call "
+RDEPENDS_perl-module-switch += "perl-module-strict "
+RDEPENDS_perl-module-switch += "perl-module-text-balanced "
+RDEPENDS_perl-module-switch += "perl-module-vars "
+RDEPENDS_perl-module-symbol += "perl-module-exporter "
+RDEPENDS_perl-module-sys-hostname += "perl-module-autoloader "
+RDEPENDS_perl-module-sys-hostname += "perl-module-exporter "
+RDEPENDS_perl-module-sys-hostname += "perl-module-carp "
+RDEPENDS_perl-module-sys-hostname += "perl-module-strict "
+RDEPENDS_perl-module-sys-syslog += "perl-module-dynaloader "
+RDEPENDS_perl-module-sys-syslog += "perl-module-exporter "
+RDEPENDS_perl-module-sys-syslog += "perl-module-carp "
+RDEPENDS_perl-module-sys-syslog += "perl-module-socket "
+RDEPENDS_perl-module-sys-syslog += "perl-module-strict "
+RDEPENDS_perl-module-sys-syslog += "perl-module-sys-hostname "
+RDEPENDS_perl-module-term-ansicolor += "perl-module-exporter "
+RDEPENDS_perl-module-term-ansicolor += "perl-module-strict "
+RDEPENDS_perl-module-term-cap += "perl-module-strict "
+RDEPENDS_perl-module-term-cap += "perl-module-vars "
+RDEPENDS_perl-module-term-complete += "perl-module-exporter "
+RDEPENDS_perl-module-term-complete += "perl-module-strict "
+RDEPENDS_perl-module-term-readline += "perl-module-strict "
+RDEPENDS_perl-module-test-builder += "perl-module-strict "
+RDEPENDS_perl-module-test-builder += "perl-module-vars "
+RDEPENDS_perl-module-test-harness-assert += "perl-module-exporter "
+RDEPENDS_perl-module-test-harness-assert += "perl-module-strict "
+RDEPENDS_perl-module-test-harness-assert += "perl-module-vars "
+RDEPENDS_perl-module-test-harness-iterator += "perl-module-strict "
+RDEPENDS_perl-module-test-harness-iterator += "perl-module-vars "
+RDEPENDS_perl-module-test-harness-point += "perl-module-strict "
+RDEPENDS_perl-module-test-harness-point += "perl-module-vars "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-config "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-strict "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-assert "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-iterator "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-test-harness-point "
+RDEPENDS_perl-module-test-harness-straps += "perl-module-vars "
+RDEPENDS_perl-module-test-harness += "perl-module-benchmark "
+RDEPENDS_perl-module-test-harness += "perl-module-config "
+RDEPENDS_perl-module-test-harness += "perl-module-exporter "
+RDEPENDS_perl-module-test-harness += "perl-module-strict "
+RDEPENDS_perl-module-test-harness += "perl-module-test-harness-assert "
+RDEPENDS_perl-module-test-harness += "perl-module-test-harness-straps "
+RDEPENDS_perl-module-test-more += "perl-module-exporter "
+RDEPENDS_perl-module-test-more += "perl-module-strict "
+RDEPENDS_perl-module-test-more += "perl-module-test-builder "
+RDEPENDS_perl-module-test-more += "perl-module-vars "
+RDEPENDS_perl-module-test-simple += "perl-module-strict "
+RDEPENDS_perl-module-test-simple += "perl-module-test-builder "
+RDEPENDS_perl-module-test-simple += "perl-module-vars "
+RDEPENDS_perl-module-test += "perl-module-exporter "
+RDEPENDS_perl-module-test += "perl-module-carp "
+RDEPENDS_perl-module-test += "perl-module-strict "
+RDEPENDS_perl-module-text-abbrev += "perl-module-exporter "
+RDEPENDS_perl-module-text-balanced += "perl-module-exporter "
+RDEPENDS_perl-module-text-balanced += "perl-module-overload "
+RDEPENDS_perl-module-text-balanced += "perl-module-selfloader "
+RDEPENDS_perl-module-text-balanced += "perl-module-strict "
+RDEPENDS_perl-module-text-balanced += "perl-module-vars "
+RDEPENDS_perl-module-text-parsewords += "perl-module-exporter "
+RDEPENDS_perl-module-text-parsewords += "perl-module-vars "
+RDEPENDS_perl-module-text-soundex += "perl-module-exporter "
+RDEPENDS_perl-module-text-tabs += "perl-module-exporter "
+RDEPENDS_perl-module-text-tabs += "perl-module-strict "
+RDEPENDS_perl-module-text-tabs += "perl-module-vars "
+RDEPENDS_perl-module-text-wrap += "perl-module-exporter "
+RDEPENDS_perl-module-text-wrap += "perl-module-strict "
+RDEPENDS_perl-module-text-wrap += "perl-module-text-tabs "
+RDEPENDS_perl-module-thread-queue += "perl-module-strict "
+RDEPENDS_perl-module-thread-queue += "perl-module-threads-shared "
+RDEPENDS_perl-module-thread-semaphore += "perl-module-threads-shared "
+RDEPENDS_perl-module-threads-shared += "perl-module-strict "
+RDEPENDS_perl-module-threads-shared += "perl-module-warnings "
+RDEPENDS_perl-module-threads += "perl-module-dynaloader "
+RDEPENDS_perl-module-threads += "perl-module-exporter "
+RDEPENDS_perl-module-threads += "perl-module-config "
+RDEPENDS_perl-module-threads += "perl-module-strict "
+RDEPENDS_perl-module-threads += "perl-module-warnings "
+RDEPENDS_perl-module-thread += "perl-module-exporter "
+RDEPENDS_perl-module-thread += "perl-module-strict "
+RDEPENDS_perl-module-thread += "perl-module-xsloader "
+RDEPENDS_perl-module-tie-array += "perl-module-carp "
+RDEPENDS_perl-module-tie-array += "perl-module-strict "
+RDEPENDS_perl-module-tie-array += "perl-module-vars "
+RDEPENDS_perl-module-tie-file += "perl-module-carp "
+RDEPENDS_perl-module-tie-file += "perl-module-fcntl "
+RDEPENDS_perl-module-tie-file += "perl-module-posix "
+RDEPENDS_perl-module-tie-file += "perl-module-strict "
+RDEPENDS_perl-module-tie-handle += "perl-module-carp "
+RDEPENDS_perl-module-tie-handle += "perl-module-warnings-register "
+RDEPENDS_perl-module-tie-hash += "perl-module-carp "
+RDEPENDS_perl-module-tie-hash += "perl-module-warnings-register "
+RDEPENDS_perl-module-tie-memoize += "perl-module-strict "
+RDEPENDS_perl-module-tie-memoize += "perl-module-tie-hash "
+RDEPENDS_perl-module-tie-refhash += "perl-module-strict "
+RDEPENDS_perl-module-tie-refhash += "perl-module-tie-hash "
+RDEPENDS_perl-module-tie-refhash += "perl-module-vars "
+RDEPENDS_perl-module-tie-scalar += "perl-module-carp "
+RDEPENDS_perl-module-tie-scalar += "perl-module-warnings-register "
+RDEPENDS_perl-module-tie-substrhash += "perl-module-carp "
+RDEPENDS_perl-module-time-gmtime += "perl-module-strict "
+RDEPENDS_perl-module-time-gmtime += "perl-module-time-tm "
+RDEPENDS_perl-module-time-gmtime += "perl-module-vars "
+RDEPENDS_perl-module-time-hires += "perl-module-dynaloader "
+RDEPENDS_perl-module-time-hires += "perl-module-exporter "
+RDEPENDS_perl-module-time-hires += "perl-module-strict "
+RDEPENDS_perl-module-time-hires += "perl-module-vars "
+RDEPENDS_perl-module-time-localtime += "perl-module-strict "
+RDEPENDS_perl-module-time-localtime += "perl-module-time-tm "
+RDEPENDS_perl-module-time-localtime += "perl-module-vars "
+RDEPENDS_perl-module-time-local += "perl-module-exporter "
+RDEPENDS_perl-module-time-local += "perl-module-carp "
+RDEPENDS_perl-module-time-local += "perl-module-config "
+RDEPENDS_perl-module-time-local += "perl-module-integer "
+RDEPENDS_perl-module-time-local += "perl-module-strict "
+RDEPENDS_perl-module-time-local += "perl-module-vars "
+RDEPENDS_perl-module-time-tm += "perl-module-class-struct "
+RDEPENDS_perl-module-time-tm += "perl-module-strict "
+RDEPENDS_perl-module-unicode-collate += "perl-module-carp "
+RDEPENDS_perl-module-unicode-collate += "perl-module-constant "
+RDEPENDS_perl-module-unicode-collate += "perl-module-file-spec "
+RDEPENDS_perl-module-unicode-collate += "perl-module-strict "
+RDEPENDS_perl-module-unicode-collate += "perl-module-warnings "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-dynaloader "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-exporter "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-carp "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-constant "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-strict "
+RDEPENDS_perl-module-unicode-normalize += "perl-module-warnings "
+RDEPENDS_perl-module-unicode-ucd += "perl-module-exporter "
+RDEPENDS_perl-module-unicode-ucd += "perl-module-carp "
+RDEPENDS_perl-module-unicode-ucd += "perl-module-storable "
+RDEPENDS_perl-module-unicode-ucd += "perl-module-strict "
+RDEPENDS_perl-module-unicode-ucd += "perl-module-warnings "
+RDEPENDS_perl-module-universal += "perl-module-exporter "
+RDEPENDS_perl-module-user-grent += "perl-module-class-struct "
+RDEPENDS_perl-module-user-grent += "perl-module-strict "
+RDEPENDS_perl-module-user-grent += "perl-module-vars "
+RDEPENDS_perl-module-user-pwent += "perl-module-carp "
+RDEPENDS_perl-module-user-pwent += "perl-module-class-struct "
+RDEPENDS_perl-module-user-pwent += "perl-module-config "
+RDEPENDS_perl-module-user-pwent += "perl-module-strict "
+RDEPENDS_perl-module-user-pwent += "perl-module-warnings "
+RDEPENDS_perl-module-user-pwent += "perl-module-vars "
+RDEPENDS_perl-module-warnings-register += "perl-module-warnings "
+RDEPENDS_perl-module-warnings += "perl-module-carp "
+RDEPENDS_perl-module-vars += "perl-module-strict "
+RDEPENDS_perl-module-vars += "perl-module-warnings-register "
+RDEPENDS_perl-module-xs-apitest += "perl-module-base "
+RDEPENDS_perl-module-xs-apitest += "perl-module-carp "
+RDEPENDS_perl-module-xs-apitest += "perl-module-strict "
+RDEPENDS_perl-module-xs-apitest += "perl-module-warnings "
+RDEPENDS_perl-module-xs-typemap += "perl-module-base "
+RDEPENDS_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 0000000..637c993
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-rprovides.inc
@@ -0,0 +1,45 @@
+#
+# Some packages changed names in 5.8.7-r14, RPROVIDE them for things that
+# depend on the old name
+#
+RPROVIDES_perl-module-b-asmdata = "perl-module-${TARGET_SYS}-b-asmdata"
+RPROVIDES_perl-module-b-assembler = "perl-module-${TARGET_SYS}-b-assembler"
+RPROVIDES_perl-module-b-bblock = "perl-module-${TARGET_SYS}-b-bblock"
+RPROVIDES_perl-module-b-bytecode = "perl-module-${TARGET_SYS}-b-bytecode"
+RPROVIDES_perl-module-b-cc = "perl-module-${TARGET_SYS}-b-cc"
+RPROVIDES_perl-module-b-concise = "perl-module-${TARGET_SYS}-b-concise"
+RPROVIDES_perl-module-b-debug = "perl-module-${TARGET_SYS}-b-debug"
+RPROVIDES_perl-module-b-deparse = "perl-module-${TARGET_SYS}-b-deparse"
+RPROVIDES_perl-module-b-disassembler = "perl-module-${TARGET_SYS}-b-disassembler"
+RPROVIDES_perl-module-b-lint = "perl-module-${TARGET_SYS}-b-lint"
+RPROVIDES_perl-module-b-showlex = "perl-module-${TARGET_SYS}-b-showlex"
+RPROVIDES_perl-module-b-stackobj = "perl-module-${TARGET_SYS}-b-stackobj"
+RPROVIDES_perl-module-b-stash = "perl-module-${TARGET_SYS}-b-stash"
+RPROVIDES_perl-module-b-terse = "perl-module-${TARGET_SYS}-b-terse"
+RPROVIDES_perl-module-b-xref = "perl-module-${TARGET_SYS}-b-xref"
+RPROVIDES_perl-module-config = "perl-module-${TARGET_SYS}-config"
+RPROVIDES_perl-module-config-heavy = "perl-module-${TARGET_SYS}-config-heavy"
+RPROVIDES_perl-module-encode-alias = "perl-module-${TARGET_SYS}-encode-alias"
+RPROVIDES_perl-module-encode-cjkconstants = "perl-module-${TARGET_SYS}-encode-cjkconstants"
+RPROVIDES_perl-module-encode-config = "perl-module-${TARGET_SYS}-encode-config"
+RPROVIDES_perl-module-encode-encoder = "perl-module-${TARGET_SYS}-encode-encoder"
+RPROVIDES_perl-module-encode-encoding = "perl-module-${TARGET_SYS}-encode-encoding"
+RPROVIDES_perl-module-encode-guess = "perl-module-${TARGET_SYS}-encode-guess"
+RPROVIDES_perl-module-encoding = "perl-module-${TARGET_SYS}-encoding"
+RPROVIDES_perl-module-errno = "perl-module-${TARGET_SYS}-errno"
+RPROVIDES_perl-module-io-dir = "perl-module-${TARGET_SYS}-io-dir"
+RPROVIDES_perl-module-io-file = "perl-module-${TARGET_SYS}-io-file"
+RPROVIDES_perl-module-io-handle = "perl-module-${TARGET_SYS}-io-handle"
+RPROVIDES_perl-module-io-pipe = "perl-module-${TARGET_SYS}-io-pipe"
+RPROVIDES_perl-module-io-poll = "perl-module-${TARGET_SYS}-io-poll"
+RPROVIDES_perl-module-io-seekable = "perl-module-${TARGET_SYS}-io-seekable"
+RPROVIDES_perl-module-io-select = "perl-module-${TARGET_SYS}-io-select"
+RPROVIDES_perl-module-io-socket = "perl-module-${TARGET_SYS}-io-socket"
+RPROVIDES_perl-module-ipc-msg = "perl-module-${TARGET_SYS}-ipc-msg"
+RPROVIDES_perl-module-ipc-semaphore = "perl-module-${TARGET_SYS}-ipc-semaphore"
+RPROVIDES_perl-module-lib = "perl-module-${TARGET_SYS}-lib"
+RPROVIDES_perl-module-mime-quotedprint = "perl-module-${TARGET_SYS}-mime-quotedprint"
+RPROVIDES_perl-module-o = "perl-module-${TARGET_SYS}-o"
+RPROVIDES_perl-module-ops = "perl-module-${TARGET_SYS}-ops"
+RPROVIDES_perl-module-safe = "perl-module-${TARGET_SYS}-safe"
+RPROVIDES_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 0000000..5060705
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl_5.8.8.bb
@@ -0,0 +1,218 @@
+DESCRIPTION = "Perl is a popular scripting language."
+HOMEPAGE = "http://www.perl.org/"
+SECTION = "devel"
+LICENSE = "Artistic|GPL"
+PRIORITY = "optional"
+# We need gnugrep (for -I)
+DEPENDS = "virtual/db perl-native grep-native"
+PR = "r20"
+
+# Major part of version
+PVM = "5.8"
+
+SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
+ file://Makefile.patch;patch=1 \
+ file://Makefile.SH.patch;patch=1 \
+ file://makedepend-dash.patch;patch=1 \
+ file://installperl.patch;patch=1 \
+ file://perl-dynloader.patch;patch=1 \
+ file://perl-moreconfig.patch;patch=1 \
+ file://letgcc-find-errno.patch;patch=1 \
+ file://generate-sh.patch;patch=1 \
+ file://perl-5.8.8-gcc-4.2.patch;patch=1 \
+ file://09_fix_installperl.patch;patch=1 \
+ file://52_debian_extutils_hacks.patch;patch=1 \
+ file://53_debian_mod_paths.patch;patch=1 \
+ file://54_debian_perldoc-r.patch;patch=1 \
+ file://58_debian_cpan_config_path.patch;patch=1 \
+ file://60_debian_libnet_config_path.patch;patch=1 \
+ file://62_debian_cpan_definstalldirs.patch;patch=1 \
+ file://64_debian_enc2xs_inc.patch;patch=1 \
+ file://asm-pageh-fix.patch;patch=1 \
+ file://native-perlinc.patch;patch=1 \
+ file://config.sh \
+ file://config.sh-32 \
+ file://config.sh-32-le \
+ file://config.sh-32-be \
+ file://config.sh-64 \
+ file://config.sh-64-le \
+ file://config.sh-64-be"
+
+inherit siteinfo
+
+# Where to find the native perl
+HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl${PV}"
+
+# Where to find .so files - use the -native versions not those from the target build
+export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
+
+do_configure() {
+ # Make hostperl in build directory be the native perl
+ ln -s ${HOSTPERL} hostperl
+
+ # Do our work in the cross subdir
+ cd Cross
+
+ # Generate configuration
+ rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
+ for i in ${WORKDIR}/config.sh \
+ ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)} \
+ ${WORKDIR}/config.sh-${@siteinfo_get_bits(d)}-${@siteinfo_get_endianess(d)}; do
+ cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
+ done
+
+ # Fixups for uclibc
+ if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
+ sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
+ -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
+ -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
+ -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
+ -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
+ -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
+ -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
+ -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
+ -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
+ -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
+ config.sh-${TARGET_ARCH}-${TARGET_OS}
+ fi
+
+ # Update some paths in the configuration
+ sed -i -e 's,@LIBDIR@,${libdir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@MANDIR@,${mandir},g' \
+ -e 's,@PREFIX@,${prefix},g' \
+ -e 's,@DATADIR@,${datadir},g' \
+ -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
+ -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
+ -e 's,/usr/,${exec_prefix}/,g' \
+ config.sh-${TARGET_ARCH}-${TARGET_OS}
+
+
+ # These are strewn all over the source tree
+ for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
+ echo Fixing: $foo
+ sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
+ done
+
+ rm -f config
+ echo "ARCH = ${TARGET_ARCH}" > config
+ echo "OS = ${TARGET_OS}" >> config
+}
+
+do_compile() {
+ if test "${MACHINE}" != "native"; then
+ sed -i -e 's|/usr/include|${STAGING_INCDIR}|g' ext/Errno/Errno_pm.PL
+ fi
+ cd Cross
+ oe_runmake perl LD="${TARGET_SYS}-gcc"
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # Add perl pointing at current version
+ ln -sf perl${PV} ${D}${bindir}/perl
+
+ # Fix up versioned directories
+ mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
+ mv ${D}/${datadir}/perl/${PVM} ${D}/${datadir}/perl/${PV}
+ ln -sf ${PV} ${D}/${libdir}/perl/${PVM}
+ ln -sf ${PV} ${D}/${datadir}/perl/${PVM}
+
+ # Remove unwanted file
+ rm -f ${D}/${libdir}/perl/${PV}/.packlist
+
+ # Fix up shared library
+ mv -f ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
+ ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
+
+ # target config, used by cpan.bbclass to extract version information
+ install config.sh ${D}${libdir}/perl/
+
+ install -d ${D}${datadir}/perl/${PV}/ExtUtils
+ install lib/ExtUtils/typemap ${D}${datadir}/perl/${PV}/ExtUtils/
+
+ ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
+}
+
+PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
+
+perl_package_preprocess () {
+ # Fix up installed configuration
+ sed -i -e "s,${D},,g" \
+ -e "s,-isystem${STAGING_INCDIR} ,,g" \
+ -e "s,${STAGING_LIBDIR},${libdir},g" \
+ -e "s,${STAGING_BINDIR},${bindir},g" \
+ -e "s,${STAGING_INCDIR},${includedir},g" \
+ -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
+ ${PKGD}${bindir}/h2xs \
+ ${PKGD}${bindir}/h2ph \
+ ${PKGD}${datadir}/perl/${PV}/pod/*.pod \
+ ${PKGD}${datadir}/perl/${PV}/cacheout.pl \
+ ${PKGD}${datadir}/perl/${PV}/FileCache.pm \
+ ${PKGD}${libdir}/perl/config.sh \
+ ${PKGD}${libdir}/perl/${PV}/Config.pm \
+ ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
+ ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
+ ${PKGD}${libdir}/perl/${PV}/CORE/pp.h
+}
+
+PACKAGES = "perl-dbg perl perl-misc perl-lib perl-dev perl-pod perl-doc"
+FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV}"
+FILES_${PN}-lib = "${libdir}/libperl.so* ${libdir}/perl/${PVM} ${datadir}/perl/${PVM}"
+FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
+FILES_${PN}-pod = "${datadir}/perl/${PV}/pod \
+ ${datadir}/perl/${PV}/*/*.pod \
+ ${datadir}/perl/${PV}/*/*/*.pod \
+ ${libdir}/perl/${PV}/*.pod"
+FILES_perl-misc = "${bindir}/*"
+FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
+ ${libdir}/perl/${PV}/auto/*/*/.debug \
+ ${libdir}/perl/${PV}/auto/*/*/*/.debug \
+ ${datadir}/perl/${PV}/auto/*/.debug \
+ ${datadir}/perl/${PV}/auto/*/*/.debug \
+ ${datadir}/perl/${PV}/auto/*/*/*/.debug \
+ ${libdir}/perl/${PV}/CORE/.debug"
+FILES_${PN}-doc = "${datadir}/perl/${PV}/*/*.txt \
+ ${datadir}/perl/${PV}/*/*/*.txt \
+ ${datadir}/perl/${PV}/Net/*.eg \
+ ${datadir}/perl/${PV}/CGI/eg \
+ ${datadir}/perl/${PV}/ExtUtils/PATCHING \
+ ${datadir}/perl/${PV}/ExtUtils/NOTES \
+ ${datadir}/perl/${PV}/ExtUtils/typemap \
+ ${datadir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
+ ${datadir}/perl/${PV}/CPAN/SIGNATURE \
+ ${datadir}/perl/${PV}/CPAN/PAUSE2003.pub \
+ ${datadir}/perl/${PV}/B/assemble \
+ ${datadir}/perl/${PV}/B/makeliblinks \
+ ${datadir}/perl/${PV}/B/disassemble \
+ ${datadir}/perl/${PV}/B/cc_harness \
+ ${datadir}/perl/${PV}/ExtUtils/xsubpp \
+ ${datadir}/perl/${PV}/Encode/encode.h \
+ ${datadir}/perl/${PV}/unicore/mktables \
+ ${datadir}/perl/${PV}/unicore/mktables.lst \
+ ${datadir}/perl/${PV}/unicore/version"
+
+RPROVIDES_perl-lib = "perl-lib"
+
+# Create a perl-modules package recommending all the other perl
+# packages (actually the non modules packages and not created too)
+ALLOW_EMPTY_perl-modules = "1"
+PACKAGES_append = " perl-modules "
+RRECOMMENDS_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 ', '')}"
+
+python populate_packages_prepend () {
+ libdir = bb.data.expand('${libdir}/perl/${PV}', d)
+ do_split_packages(d, libdir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+ do_split_packages(d, libdir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+ datadir = bb.data.expand('${datadir}/perl/${PV}', d)
+ do_split_packages(d, datadir, 'auto/(.*)(?!\.debug)/', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+ do_split_packages(d, datadir, '(.*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True)
+}
+
+PACKAGES_DYNAMIC = "perl-module-*"
+
+require perl-rdepends_${PV}.inc
+require perl-rprovides.inc
+
+PARALLEL_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 0000000..9789538
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/autofoo.patch
@@ -0,0 +1,526 @@
+---
+ glib-1.2.10/acglib.m4 | 12 +-
+ glib-1.2.10/configure.in | 212 ++++++++++++++++++++++++++++++------------------
+ 2 files changed, 140 insertions(+), 84 deletions(-)
+
+Index: pkg-config-0.23/glib-1.2.10/acglib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/acglib.m4 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/acglib.m4 2008-03-26 20:59:12.000000000 +0000
+@@ -10,7 +10,7 @@
+ AC_DIVERT_POP()])])])
+
+ dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_IF_VAR_EQ,[
++AC_DEFUN([GLIB_IF_VAR_EQ],[
+ case "$[$1]" in
+ "[$2]"[)]
+ [$3]
+@@ -21,7 +21,7 @@
+ esac
+ ])
+ dnl GLIB_STR_CONTAINS (SRC_STRING, SUB_STRING [, CONTAINS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_STR_CONTAINS,[
++AC_DEFUN([GLIB_STR_CONTAINS],[
+ case "[$1]" in
+ *"[$2]"*[)]
+ [$3]
+@@ -32,12 +32,12 @@
+ esac
+ ])
+ dnl GLIB_ADD_TO_VAR (ENV_VARIABLE, CHECK_STRING, ADD_STRING)
+-AC_DEFUN(GLIB_ADD_TO_VAR,[
++AC_DEFUN([GLIB_ADD_TO_VAR],[
+ GLIB_STR_CONTAINS($[$1], [$2], [$1]="$[$1]", [$1]="$[$1] [$3]")
+ ])
+
+ dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
+-AC_DEFUN(GLIB_SIZEOF,
++AC_DEFUN([GLIB_SIZEOF],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
+@@ -62,7 +62,7 @@
+ ])
+
+ dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
+-AC_DEFUN(GLIB_BYTE_CONTENTS,
++AC_DEFUN([GLIB_BYTE_CONTENTS],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
+@@ -92,7 +92,7 @@
+ ])
+
+ dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
+-AC_DEFUN(GLIB_SYSDEFS,
++AC_DEFUN([GLIB_SYSDEFS],
+ [glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
+ glib_sysdef_msg=`echo $2 | sed 's/:[[^ ]]*//g'`
+ if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
+Index: pkg-config-0.23/glib-1.2.10/configure.in
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/configure.in 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/configure.in 2008-03-26 20:59:12.000000000 +0000
+@@ -1,10 +1,11 @@
+ dnl ***********************************
+ dnl *** include special GLib macros ***
+ dnl ***********************************
+-builtin(include, acglib.m4)dnl
++dnl no need, just use aclocal -I . --CL
++dnl builtin(include, acglib.m4)dnl
+
+ # require autoconf 2.13
+-AC_PREREQ(2.13)
++AC_PREREQ(2.53)
+
+ # init autoconf (and check for presence of glist.c)
+ AC_INIT(glist.c)
+@@ -13,11 +14,48 @@
+ cflags_set=${CFLAGS+set}
+
+ # we rewrite this file
++if test "x$cross_compiling" != "xyes"; then
+ rm -f glibconfig-sysdefs.h
++fi
++
++# config defines
++
++AH_TEMPLATE([ENABLE_MEM_CHECK],
++ [Define if enabling memory checking])
++AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
++AH_TEMPLATE([GLIB_BINARY_AGE], [])
++AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
++AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
++AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
++AH_TEMPLATE([GLIB_MINOR_VERSION], [])
++AH_TEMPLATE([GLIB_MICRO_VERSION], [])
++AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
++AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
++AH_TEMPLATE([G_HAVE_INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE__], [])
++AH_TEMPLATE([G_THREAD_SOURCE], [])
++AH_TEMPLATE([G_VA_COPY], [])
++AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
++AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
++AH_TEMPLATE([HAVE_GETPWUID_R], [])
++AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
++AH_TEMPLATE([HAVE_WCHAR_H], [])
++AH_TEMPLATE([HAVE_WCTYPE_H], [])
++AH_TEMPLATE([NO_FD_SET], [])
++AH_TEMPLATE([NO_SYS_ERRLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
++AH_TEMPLATE([REALLOC_0_WORKS], [])
++
+
+ dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
+ dnl are available for $ac_help expansion (don't we all *love* autoconf?)
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
++#dnl
+ #
+ # The following version number definitions apply to GLib, GModule and GThread
+ # as a whole, so if changes occoured in any of them, they are all
+@@ -38,7 +76,7 @@
+ GLIB_BINARY_AGE=10
+ GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
+ dnl
+-])
++#AC_DIVERT_POP()dnl
+
+ AC_SUBST(GLIB_MAJOR_VERSION)
+ AC_SUBST(GLIB_MINOR_VERSION)
+@@ -72,22 +110,20 @@
+ AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
+
+ dnl Initialize libtool
+-AC_PROG_LIBTOOL
++AM_PROG_LIBTOOL
+
+ dnl Initialize maintainer mode
+ AM_MAINTAINER_MODE
+
+-AC_CANONICAL_HOST
+-
+ dnl figure debugging default, prior to $ac_help setup
+ dnl
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+ if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
+ debug_default=yes
+ else
+ debug_default=minimum
+ fi
+-]) dnl
++#AC_DIVERT_POP()dnl
+
+ dnl declare --enable-* args and collect ac_help strings
+ AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
+@@ -194,7 +230,9 @@
+ CFLAGS=$glib_save_CFLAGS
+ AC_MSG_WARN(
+ [No ANSI prototypes found in library. (-std1 didn't work.)])
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
+ LIBS=$glib_save_LIBS
+
+@@ -336,7 +374,7 @@
+ if test $gtk_ok = yes; then
+ AC_MSG_RESULT([yes, found in sys/types.h])
+ else
+- AC_HEADER_EGREP(fd_set, sys/select.h, gtk_ok=yes)
++ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
+ if test $gtk_ok = yes; then
+ AC_DEFINE(HAVE_SYS_SELECT_H)
+ AC_MSG_RESULT([yes, found in sys/select.h])
+@@ -409,7 +447,7 @@
+ glib_cv_sane_realloc=no
+ ,)
+ ])
+-if test x$glib_cv_sane_realloc = xyes; then
++if test "x$glib_cv_sane_realloc" = "xyes"; then
+ AC_DEFINE(REALLOC_0_WORKS)
+ fi
+ AC_MSG_RESULT($glib_cv_sane_realloc)
+@@ -487,7 +525,8 @@
+ ])
+ if test "x$glib_cv_va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, va_copy)
+-else if test "x$glib_cv___va_copy" = "xyes"; then
++else
++if test "x$glib_cv___va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, __va_copy)
+ fi
+ fi
+@@ -496,6 +535,7 @@
+ fi
+ AC_MSG_RESULT($glib_cv_va_val_copy)
+
++AC_MSG_WARN([hi mom])
+
+ dnl ***********************
+ dnl *** g_module checks ***
+@@ -507,23 +547,27 @@
+ G_MODULE_BROKEN_RTLD_GLOBAL=0
+ G_MODULE_HAVE_DLERROR=0
+ dnl *** dlopen() and dlsym() in system libraries
++AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
++ G_MODULE_IMPL=G_MODULE_IMPL_DL
++ ],
++ )],
++)
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_FUNC(dlopen,
+- [AC_CHECK_FUNC(dlsym,
++ AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
+-
++ ])],
++ )
+ fi
+-
+ dnl *** dlopen() and dlsym() in libdl
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_LIB(dl, dlopen,
+- [AC_CHECK_LIB(dl, dlsym,
++ AC_CHECK_LIB(dl, dlopen,[
++ AC_CHECK_LIB(dl, dlsym,[
+ G_MODULE_LIBS=-ldl
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
++ ])]
++ )
+ fi
+ dnl *** shl_load() in libdld (HP-UX)
+ if test -z "$G_MODULE_IMPL"; then
+@@ -633,6 +677,7 @@
+ AC_SUBST(G_MODULE_NEED_USCORE)
+ AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
+ AC_SUBST(GLIB_DEBUG_FLAGS)
++AC_MSG_WARN([hi mom])
+
+
+ dnl ***********************
+@@ -869,40 +914,50 @@
+ fi
+ if test x"$have_threads" = xposix; then
+ LIBS="$LIBS $G_THREAD_LIBS"
+- AC_MSG_CHECKING(whether pthread_getspecific is posix like)
+ # PCThreads has pthread_getspecific(pthread_key_t, void **);
+- AC_TRY_COMPILE([#include <pthread.h>],
+- [pthread_getspecific(0,NULL);],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
+- AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
++ AC_CACHE_CHECK([whether pthread_getspecific is posix like],
++ [glib_cv_sys_pthread_getspecific_posix],
++ AC_TRY_COMPILE([#include <pthread.h>],
++ [pthread_getspecific(0,NULL);],
++ [glib_cv_sys_pthread_getspecific_posix=no],
++ [glib_cv_sys_pthread_getspecific_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
++ fi
+ # DCE Threads return 1 as success, posix 0. what a mess.
+- AC_TRY_RUN([#include <pthread.h>
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- int main () {
+- return !pthread_mutex_trylock (&mutex); }],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
+- AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
++ AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
++ [glib_cv_sys_pthread_mutex_trylock_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ int main () {
++ return !pthread_mutex_trylock (&mutex); }],
++ [glib_cv_sys_pthread_mutex_trylock_posix=no],
++ [glib_cv_sys_pthread_mutex_trylock_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
++ fi
+ # DCE Threads return -1 as failure, posix ETIMEDOUT.
+- AC_TRY_RUN([#include <pthread.h>
+- #include <sys/time.h>
+- int main () {
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+- struct timeval tval;
+- struct timespec tspec;
+- gettimeofday (&tval, NULL);
+- tspec.tv_sec = tval.tv_sec;
+- tspec.tv_nsec = 0;
+- pthread_mutex_lock (&mutex);
+- return pthread_cond_timedwait (&cond,&mutex,&tspec)
+- != -1;}],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
++ AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
++ [glib_cv_sys_pthread_cond_timedwait_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ int main () {
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
++ struct timeval tval;
++ struct timespec tspec;
++ gettimeofday (&tval, NULL);
++ tspec.tv_sec = tval.tv_sec;
++ tspec.tv_nsec = 0;
++ return pthread_cond_timedwait (&cond,&mutex,&tspec)
++ != -1;}],
++ [glib_cv_sys_pthread_cond_timedwait_posix=no],
++ [glib_cv_sys_pthread_cond_timedwait_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
++ fi
+ fi
+ LIBS="$glib_save_LIBS"
+ CFLAGS="$glib_save_CFLAGS"
+@@ -946,13 +1001,14 @@
+ dnl ****************************************
+ dnl *** GLib POLL* compatibility defines ***
+ dnl ****************************************
++if test x"$cross_compiling" != xyes; then
+ GLIB_SYSDEFS(
+ [#include <sys/types.h>
+ #include <sys/poll.h>],
+ POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
+ glibconfig-sysdefs.h,
+ =)
+-
++fi
+
+ dnl ******************************
+ dnl *** output the whole stuff ***
+@@ -1005,7 +1061,7 @@
+ echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
+ fi
+
+- cat >> $outfile <<_______EOF
++ cat >> $outfile <<EOF
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -1022,60 +1078,60 @@
+ #define G_MINLONG $glib_ml
+ #define G_MAXLONG $glib_Ml
+
+-_______EOF
++EOF
+
+
+ ### this should always be true in a modern C/C++ compiler
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed char gint8;
+ typedef unsigned char guint8;
+-_______EOF
++EOF
+
+
+ if test -n "$gint16"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint16 gint16;
+ typedef unsigned $gint16 guint16;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint32"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint32 gint32;
+ typedef unsigned $gint32 guint32;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint64"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ ${glib_warning_guard}#define G_HAVE_GINT64 1
+
+ ${glib_extension}typedef signed $gint64 gint64;
+ ${glib_extension}typedef unsigned $gint64 guint64;
+
+ #define G_GINT64_CONSTANT(val) $gint64_constant
+-_______EOF
++EOF
+ fi
+
+
+ if test -z "$glib_unknown_void_p"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
+ #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
+
+ #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
+ #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
+-_______EOF
++EOF
+ else
+ echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
+ fi
+
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $glib_atexit
+ $glib_memmove
+ $glib_defines
+@@ -1087,11 +1143,11 @@
+ #else /* !__cplusplus */
+ $glib_inline
+ #endif /* !__cplusplus */
+-_______EOF
++EOF
+
+ echo >>$outfile
+ if test x$g_mutex_has_default = xyes; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GStaticMutex GStaticMutex;
+@@ -1109,15 +1165,15 @@
+ #define g_static_mutex_get_mutex(mutex) \
+ (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
+ g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
+-_______EOF
++EOF
+ else
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GMutex* GStaticMutex;
+ #define G_STATIC_MUTEX_INIT NULL
+ #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
+-_______EOF
++EOF
+ fi
+
+ echo >>$outfile
+@@ -1126,15 +1182,15 @@
+ g_bit_sizes="$g_bit_sizes 64"
+ fi
+ for bits in $g_bit_sizes; do
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
+ #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
+ #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
+ #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
+-_______EOF
++EOF
+ done
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
+ #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
+ #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
+@@ -1145,14 +1201,14 @@
+ #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
+ #define G_BYTE_ORDER $g_byte_order
+
+-_______EOF
++EOF
+
+ if test -r glibconfig-sysdefs.h; then
+ cat glibconfig-sysdefs.h >>$outfile
+ fi
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ $glib_wc
+
+@@ -1162,7 +1218,7 @@
+ #endif /* __cplusplus */
+
+ #endif /* GLIBCONFIG_H */
+-_______EOF
++EOF
+
+
+ if cmp -s $outfile glibconfig.h; then
+Index: pkg-config-0.23/glib-1.2.10/glib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/glib.m4 2008-04-14 23:34:39.000000000 +0100
++++ pkg-config-0.23/glib-1.2.10/glib.m4 2008-04-14 09:26:29.000000000 +0100
+@@ -5,7 +5,7 @@
+ dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
+ dnl gthread is specified in MODULES, pass to glib-config
+ dnl
+-AC_DEFUN(AM_PATH_GLIB,
++AC_DEFUN([AM_PATH_GLIB],
+ [dnl
+ dnl Get the cflags and libraries from the glib-config script
+ 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 0000000..1329e7f
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig-0.25/glibconfig-sysdefs.h
@@ -0,0 +1,6 @@
+#define GLIB_SYSDEF_POLLIN =1
+#define GLIB_SYSDEF_POLLOUT =4
+#define GLIB_SYSDEF_POLLPRI =2
+#define GLIB_SYSDEF_POLLERR =8
+#define GLIB_SYSDEF_POLLHUP =16
+#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 0000000..c0e7481
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -0,0 +1,34 @@
+DESCRIPTION = "pkg-config is a system for managing library \
+compile/link flags that works with automake and autoconf. \
+It replaces the ubiquitous *-config scripts you may have \
+seen with a single tool."
+HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
+BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "glib-2.0 popt"
+DEPENDS_virtclass-native = ""
+DEPENDS_virtclass-nativesdk = ""
+
+SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \
+ file://autofoo.patch \
+ file://glibconfig-sysdefs.h \
+ file://disable-legacy.patch"
+
+S = "${WORKDIR}/pkg-config-${PV}/"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-installed-glib --with-installed-popt --disable-legacy-scripts"
+EXTRA_OECONF_virtclass-native = "--disable-legacy-scripts"
+EXTRA_OECONF_virtclass-nativesdk = "--disable-legacy-scripts"
+
+acpaths = "-I ."
+do_configure_prepend () {
+ install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h glib-1.2.10/
+}
+
+BBCLASSEXTEND = "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 0000000..9789538
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/autofoo.patch
@@ -0,0 +1,526 @@
+---
+ glib-1.2.10/acglib.m4 | 12 +-
+ glib-1.2.10/configure.in | 212 ++++++++++++++++++++++++++++++------------------
+ 2 files changed, 140 insertions(+), 84 deletions(-)
+
+Index: pkg-config-0.23/glib-1.2.10/acglib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/acglib.m4 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/acglib.m4 2008-03-26 20:59:12.000000000 +0000
+@@ -10,7 +10,7 @@
+ AC_DIVERT_POP()])])])
+
+ dnl GLIB_IF_VAR_EQ (ENV_VAR, VALUE [, EQUALS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_IF_VAR_EQ,[
++AC_DEFUN([GLIB_IF_VAR_EQ],[
+ case "$[$1]" in
+ "[$2]"[)]
+ [$3]
+@@ -21,7 +21,7 @@
+ esac
+ ])
+ dnl GLIB_STR_CONTAINS (SRC_STRING, SUB_STRING [, CONTAINS_ACTION] [, ELSE_ACTION])
+-AC_DEFUN(GLIB_STR_CONTAINS,[
++AC_DEFUN([GLIB_STR_CONTAINS],[
+ case "[$1]" in
+ *"[$2]"*[)]
+ [$3]
+@@ -32,12 +32,12 @@
+ esac
+ ])
+ dnl GLIB_ADD_TO_VAR (ENV_VARIABLE, CHECK_STRING, ADD_STRING)
+-AC_DEFUN(GLIB_ADD_TO_VAR,[
++AC_DEFUN([GLIB_ADD_TO_VAR],[
+ GLIB_STR_CONTAINS($[$1], [$2], [$1]="$[$1]", [$1]="$[$1] [$3]")
+ ])
+
+ dnl GLIB_SIZEOF (INCLUDES, TYPE, ALIAS [, CROSS-SIZE])
+-AC_DEFUN(GLIB_SIZEOF,
++AC_DEFUN([GLIB_SIZEOF],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_sizeof_$3, [a-z *], [A-Z_P]))dnl
+@@ -62,7 +62,7 @@
+ ])
+
+ dnl GLIB_BYTE_CONTENTS (INCLUDES, TYPE, ALIAS, N_BYTES, INITIALIZER)
+-AC_DEFUN(GLIB_BYTE_CONTENTS,
++AC_DEFUN([GLIB_BYTE_CONTENTS],
+ [changequote(<<, >>)dnl
+ dnl The name to #define.
+ define(<<AC_TYPE_NAME>>, translit(glib_byte_contents_$3, [a-z *], [A-Z_P]))dnl
+@@ -92,7 +92,7 @@
+ ])
+
+ dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
+-AC_DEFUN(GLIB_SYSDEFS,
++AC_DEFUN([GLIB_SYSDEFS],
+ [glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
+ glib_sysdef_msg=`echo $2 | sed 's/:[[^ ]]*//g'`
+ if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then
+Index: pkg-config-0.23/glib-1.2.10/configure.in
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/configure.in 2008-01-16 22:52:24.000000000 +0000
++++ pkg-config-0.23/glib-1.2.10/configure.in 2008-03-26 20:59:12.000000000 +0000
+@@ -1,10 +1,11 @@
+ dnl ***********************************
+ dnl *** include special GLib macros ***
+ dnl ***********************************
+-builtin(include, acglib.m4)dnl
++dnl no need, just use aclocal -I . --CL
++dnl builtin(include, acglib.m4)dnl
+
+ # require autoconf 2.13
+-AC_PREREQ(2.13)
++AC_PREREQ(2.53)
+
+ # init autoconf (and check for presence of glist.c)
+ AC_INIT(glist.c)
+@@ -13,11 +14,48 @@
+ cflags_set=${CFLAGS+set}
+
+ # we rewrite this file
++if test "x$cross_compiling" != "xyes"; then
+ rm -f glibconfig-sysdefs.h
++fi
++
++# config defines
++
++AH_TEMPLATE([ENABLE_MEM_CHECK],
++ [Define if enabling memory checking])
++AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
++AH_TEMPLATE([GLIB_BINARY_AGE], [])
++AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
++AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
++AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
++AH_TEMPLATE([GLIB_MINOR_VERSION], [])
++AH_TEMPLATE([GLIB_MICRO_VERSION], [])
++AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
++AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
++AH_TEMPLATE([G_HAVE_INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE], [])
++AH_TEMPLATE([G_HAVE___INLINE__], [])
++AH_TEMPLATE([G_THREAD_SOURCE], [])
++AH_TEMPLATE([G_VA_COPY], [])
++AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
++AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
++AH_TEMPLATE([HAVE_GETPWUID_R], [])
++AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
++AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
++AH_TEMPLATE([HAVE_WCHAR_H], [])
++AH_TEMPLATE([HAVE_WCTYPE_H], [])
++AH_TEMPLATE([NO_FD_SET], [])
++AH_TEMPLATE([NO_SYS_ERRLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST], [])
++AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
++AH_TEMPLATE([REALLOC_0_WORKS], [])
++
+
+ dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
+ dnl are available for $ac_help expansion (don't we all *love* autoconf?)
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
++#dnl
+ #
+ # The following version number definitions apply to GLib, GModule and GThread
+ # as a whole, so if changes occoured in any of them, they are all
+@@ -38,7 +76,7 @@
+ GLIB_BINARY_AGE=10
+ GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
+ dnl
+-])
++#AC_DIVERT_POP()dnl
+
+ AC_SUBST(GLIB_MAJOR_VERSION)
+ AC_SUBST(GLIB_MINOR_VERSION)
+@@ -72,22 +110,20 @@
+ AC_DEFINE_UNQUOTED(GLIB_BINARY_AGE, $GLIB_BINARY_AGE)
+
+ dnl Initialize libtool
+-AC_PROG_LIBTOOL
++AM_PROG_LIBTOOL
+
+ dnl Initialize maintainer mode
+ AM_MAINTAINER_MODE
+
+-AC_CANONICAL_HOST
+-
+ dnl figure debugging default, prior to $ac_help setup
+ dnl
+-GLIB_AC_DIVERT_BEFORE_HELP([
++#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+ if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
+ debug_default=yes
+ else
+ debug_default=minimum
+ fi
+-]) dnl
++#AC_DIVERT_POP()dnl
+
+ dnl declare --enable-* args and collect ac_help strings
+ AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
+@@ -194,7 +230,9 @@
+ CFLAGS=$glib_save_CFLAGS
+ AC_MSG_WARN(
+ [No ANSI prototypes found in library. (-std1 didn't work.)])
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
++ , AC_MSG_WARN([Skipping test due to crosscompilation])
+ )
+ LIBS=$glib_save_LIBS
+
+@@ -336,7 +374,7 @@
+ if test $gtk_ok = yes; then
+ AC_MSG_RESULT([yes, found in sys/types.h])
+ else
+- AC_HEADER_EGREP(fd_set, sys/select.h, gtk_ok=yes)
++ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
+ if test $gtk_ok = yes; then
+ AC_DEFINE(HAVE_SYS_SELECT_H)
+ AC_MSG_RESULT([yes, found in sys/select.h])
+@@ -409,7 +447,7 @@
+ glib_cv_sane_realloc=no
+ ,)
+ ])
+-if test x$glib_cv_sane_realloc = xyes; then
++if test "x$glib_cv_sane_realloc" = "xyes"; then
+ AC_DEFINE(REALLOC_0_WORKS)
+ fi
+ AC_MSG_RESULT($glib_cv_sane_realloc)
+@@ -487,7 +525,8 @@
+ ])
+ if test "x$glib_cv_va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, va_copy)
+-else if test "x$glib_cv___va_copy" = "xyes"; then
++else
++if test "x$glib_cv___va_copy" = "xyes"; then
+ AC_DEFINE(G_VA_COPY, __va_copy)
+ fi
+ fi
+@@ -496,6 +535,7 @@
+ fi
+ AC_MSG_RESULT($glib_cv_va_val_copy)
+
++AC_MSG_WARN([hi mom])
+
+ dnl ***********************
+ dnl *** g_module checks ***
+@@ -507,23 +547,27 @@
+ G_MODULE_BROKEN_RTLD_GLOBAL=0
+ G_MODULE_HAVE_DLERROR=0
+ dnl *** dlopen() and dlsym() in system libraries
++AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
++ G_MODULE_IMPL=G_MODULE_IMPL_DL
++ ],
++ )],
++)
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_FUNC(dlopen,
+- [AC_CHECK_FUNC(dlsym,
++ AC_CHECK_FUNC(dlopen,[
++ AC_CHECK_FUNC(dlsym,[
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
+-
++ ])],
++ )
+ fi
+-
+ dnl *** dlopen() and dlsym() in libdl
+ if test -z "$G_MODULE_IMPL"; then
+- AC_CHECK_LIB(dl, dlopen,
+- [AC_CHECK_LIB(dl, dlsym,
++ AC_CHECK_LIB(dl, dlopen,[
++ AC_CHECK_LIB(dl, dlsym,[
+ G_MODULE_LIBS=-ldl
+ G_MODULE_IMPL=G_MODULE_IMPL_DL
+- ,)]
+- ,)
++ ])]
++ )
+ fi
+ dnl *** shl_load() in libdld (HP-UX)
+ if test -z "$G_MODULE_IMPL"; then
+@@ -633,6 +677,7 @@
+ AC_SUBST(G_MODULE_NEED_USCORE)
+ AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
+ AC_SUBST(GLIB_DEBUG_FLAGS)
++AC_MSG_WARN([hi mom])
+
+
+ dnl ***********************
+@@ -869,40 +914,50 @@
+ fi
+ if test x"$have_threads" = xposix; then
+ LIBS="$LIBS $G_THREAD_LIBS"
+- AC_MSG_CHECKING(whether pthread_getspecific is posix like)
+ # PCThreads has pthread_getspecific(pthread_key_t, void **);
+- AC_TRY_COMPILE([#include <pthread.h>],
+- [pthread_getspecific(0,NULL);],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
+- AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
++ AC_CACHE_CHECK([whether pthread_getspecific is posix like],
++ [glib_cv_sys_pthread_getspecific_posix],
++ AC_TRY_COMPILE([#include <pthread.h>],
++ [pthread_getspecific(0,NULL);],
++ [glib_cv_sys_pthread_getspecific_posix=no],
++ [glib_cv_sys_pthread_getspecific_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
++ fi
+ # DCE Threads return 1 as success, posix 0. what a mess.
+- AC_TRY_RUN([#include <pthread.h>
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- int main () {
+- return !pthread_mutex_trylock (&mutex); }],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
+- AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
++ AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
++ [glib_cv_sys_pthread_mutex_trylock_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ int main () {
++ return !pthread_mutex_trylock (&mutex); }],
++ [glib_cv_sys_pthread_mutex_trylock_posix=no],
++ [glib_cv_sys_pthread_mutex_trylock_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
++ fi
+ # DCE Threads return -1 as failure, posix ETIMEDOUT.
+- AC_TRY_RUN([#include <pthread.h>
+- #include <sys/time.h>
+- int main () {
+- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+- pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
+- struct timeval tval;
+- struct timespec tspec;
+- gettimeofday (&tval, NULL);
+- tspec.tv_sec = tval.tv_sec;
+- tspec.tv_nsec = 0;
+- pthread_mutex_lock (&mutex);
+- return pthread_cond_timedwait (&cond,&mutex,&tspec)
+- != -1;}],
+- [AC_MSG_RESULT(no)],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
++ AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
++ [glib_cv_sys_pthread_cond_timedwait_posix],
++ AC_TRY_RUN([#include <pthread.h>
++ int main () {
++ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
++ pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
++ struct timeval tval;
++ struct timespec tspec;
++ gettimeofday (&tval, NULL);
++ tspec.tv_sec = tval.tv_sec;
++ tspec.tv_nsec = 0;
++ return pthread_cond_timedwait (&cond,&mutex,&tspec)
++ != -1;}],
++ [glib_cv_sys_pthread_cond_timedwait_posix=no],
++ [glib_cv_sys_pthread_cond_timedwait_posix=yes])
++ )
++ if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
++ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
++ fi
+ fi
+ LIBS="$glib_save_LIBS"
+ CFLAGS="$glib_save_CFLAGS"
+@@ -946,13 +1001,14 @@
+ dnl ****************************************
+ dnl *** GLib POLL* compatibility defines ***
+ dnl ****************************************
++if test x"$cross_compiling" != xyes; then
+ GLIB_SYSDEFS(
+ [#include <sys/types.h>
+ #include <sys/poll.h>],
+ POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
+ glibconfig-sysdefs.h,
+ =)
+-
++fi
+
+ dnl ******************************
+ dnl *** output the whole stuff ***
+@@ -1005,7 +1061,7 @@
+ echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
+ fi
+
+- cat >> $outfile <<_______EOF
++ cat >> $outfile <<EOF
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -1022,60 +1078,60 @@
+ #define G_MINLONG $glib_ml
+ #define G_MAXLONG $glib_Ml
+
+-_______EOF
++EOF
+
+
+ ### this should always be true in a modern C/C++ compiler
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed char gint8;
+ typedef unsigned char guint8;
+-_______EOF
++EOF
+
+
+ if test -n "$gint16"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint16 gint16;
+ typedef unsigned $gint16 guint16;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint32"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ typedef signed $gint32 gint32;
+ typedef unsigned $gint32 guint32;
+-_______EOF
++EOF
+ fi
+
+
+ if test -n "$gint64"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ ${glib_warning_guard}#define G_HAVE_GINT64 1
+
+ ${glib_extension}typedef signed $gint64 gint64;
+ ${glib_extension}typedef unsigned $gint64 guint64;
+
+ #define G_GINT64_CONSTANT(val) $gint64_constant
+-_______EOF
++EOF
+ fi
+
+
+ if test -z "$glib_unknown_void_p"; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
+ #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
+
+ #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
+ #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
+-_______EOF
++EOF
+ else
+ echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
+ fi
+
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $glib_atexit
+ $glib_memmove
+ $glib_defines
+@@ -1087,11 +1143,11 @@
+ #else /* !__cplusplus */
+ $glib_inline
+ #endif /* !__cplusplus */
+-_______EOF
++EOF
+
+ echo >>$outfile
+ if test x$g_mutex_has_default = xyes; then
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GStaticMutex GStaticMutex;
+@@ -1109,15 +1165,15 @@
+ #define g_static_mutex_get_mutex(mutex) \
+ (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
+ g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
+-_______EOF
++EOF
+ else
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ $g_enable_threads_def G_THREADS_ENABLED
+ #define G_THREADS_IMPL_$g_threads_impl_def
+ typedef struct _GMutex* GStaticMutex;
+ #define G_STATIC_MUTEX_INIT NULL
+ #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
+-_______EOF
++EOF
+ fi
+
+ echo >>$outfile
+@@ -1126,15 +1182,15 @@
+ g_bit_sizes="$g_bit_sizes 64"
+ fi
+ for bits in $g_bit_sizes; do
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
+ #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
+ #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
+ #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
+-_______EOF
++EOF
+ done
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+ #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
+ #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
+ #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
+@@ -1145,14 +1201,14 @@
+ #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
+ #define G_BYTE_ORDER $g_byte_order
+
+-_______EOF
++EOF
+
+ if test -r glibconfig-sysdefs.h; then
+ cat glibconfig-sysdefs.h >>$outfile
+ fi
+
+
+- cat >>$outfile <<_______EOF
++ cat >>$outfile <<EOF
+
+ $glib_wc
+
+@@ -1162,7 +1218,7 @@
+ #endif /* __cplusplus */
+
+ #endif /* GLIBCONFIG_H */
+-_______EOF
++EOF
+
+
+ if cmp -s $outfile glibconfig.h; then
+Index: pkg-config-0.23/glib-1.2.10/glib.m4
+===================================================================
+--- pkg-config-0.23.orig/glib-1.2.10/glib.m4 2008-04-14 23:34:39.000000000 +0100
++++ pkg-config-0.23/glib-1.2.10/glib.m4 2008-04-14 09:26:29.000000000 +0100
+@@ -5,7 +5,7 @@
+ dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
+ dnl gthread is specified in MODULES, pass to glib-config
+ dnl
+-AC_DEFUN(AM_PATH_GLIB,
++AC_DEFUN([AM_PATH_GLIB],
+ [dnl
+ dnl Get the cflags and libraries from the glib-config script
+ 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 0000000..fea2d3d
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch
@@ -0,0 +1,42 @@
+On an Fedora host with glib-config installed pkgconfig-native can get into a
+horrible state with recursive calls between pkg-config and glib-config.
+The patch adds a configure time option to disable legacy script support in
+pkgconfig with the --disable-legacy-scripts option, to maintain compatibility
+the default is to leave the scripts enabled.
+
+JL - 22/06/10
+Index: pkg-config-0.23/configure.in
+===================================================================
+--- pkg-config-0.23.orig/configure.in 2008-01-16 22:48:07.000000000 +0000
++++ pkg-config-0.23/configure.in 2010-06-22 13:05:58.951984140 +0100
+@@ -125,6 +125,14 @@
+ AC_CONFIG_SUBDIRS(glib-1.2.10)
+ fi # !native_win32
+
++# legacy *-configure scripts can cause headaches, add option to disable
++AC_ARG_ENABLE(legacy-scripts,
++ [AC_HELP_STRING([--enable-legacy-scripts=@<:@no/yes@:>@],
++ [Whether pkg-config will try and use legacy scripts such as glib-config and gnome-config @<:@default=yes@:>@])],
++ [],
++ [enable_legacy=yes])
++AM_CONDITIONAL([LEGACY_SCRIPTS], [test x$enable_legacy = xyes])
++
+ AC_FUNC_ALLOCA
+
+ AC_CHECK_FUNCS(setresuid setreuid,break)
+Index: pkg-config-0.23/parse.c
+===================================================================
+--- pkg-config-0.23.orig/parse.c 2008-01-16 20:42:49.000000000 +0000
++++ pkg-config-0.23/parse.c 2010-06-22 13:09:10.410129471 +0100
+@@ -1195,6 +1195,11 @@
+ * messages.
+ */
+ return NULL;
++#elif defined(LEGACY_SCRIPTS)
++ /* There are scenarios where we might not want to use these legacy
++ * scripts even if they are available.
++ */
++ return NULL;
+ #else
+
+ 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 0000000..1329e7f
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/glibconfig-sysdefs.h
@@ -0,0 +1,6 @@
+#define GLIB_SYSDEF_POLLIN =1
+#define GLIB_SYSDEF_POLLOUT =4
+#define GLIB_SYSDEF_POLLPRI =2
+#define GLIB_SYSDEF_POLLERR =8
+#define GLIB_SYSDEF_POLLHUP =16
+#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 0000000..09b28a5
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
@@ -0,0 +1,3 @@
+require pkgconfig.inc
+
+PR = "r0"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
new file mode 100644
index 0000000..73acb9e
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -0,0 +1,39 @@
+require pkgconfig.inc
+
+SRC_URI = "git://anongit.freedesktop.org/pkg-config;protocol=git \
+ file://autofoo.patch;patch=1 \
+ file://glibconfig-sysdefs.h"
+
+S = "${WORKDIR}/git/"
+
+PV = "0.23+git${SRCPV}"
+
+DEFAULT_PREFERENCE = "-1"
+
+# Can't do native version with git since git-native depends on pkgconfig-native
+BBCLASSEXTEND = "nativesdk"
+
+do_fixsource() {
+ # Adapted from autogen.sh
+ cd ${S}
+ tar -xvzf glib-1.2.10.tar.gz
+
+ chmod +w `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/lib_LTLIBRARIES/noinst_LTLIBRARIES/g" `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/bin_SCRIPTS/noinst_SCRIPTS/g" `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/include_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/glibnoinst_HEADERS/noinst_HEADERS/g" `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e 's/([a-zA-Z0-9]+)_DATA/noinst_DATA/g' `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/info_TEXINFOS/noinst_TEXINFOS/g" `find glib-1.2.10 -name Makefile.am`
+ perl -p -i.bak -e "s/man_MANS/noinst_MANS/g" `find glib-1.2.10 -name Makefile.am`
+
+ ## patch gslist.c to have stable sort
+ 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
+
+ # Update random auto* files to actually have something which have a snowball's
+ # chance in a hot place of working with modern auto* tools.
+
+ (cd glib-1.2.10 && for p in ../glib-patches/*.diff; do echo $p; patch -p1 < $p || exit 1; done ) || exit 1
+}
+
+addtask 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 0000000..c5a4f4a
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.conf
@@ -0,0 +1,18 @@
+# This config file contains a list of directories both with binaries
+# and libraries prelink should consider by default.
+# If a directory name is prefixed with `-l ', the directory hierarchy
+# will be walked as long as filesystem boundaries are not crossed.
+# If a directory name is prefixed with `-h ', symbolic links in a
+# directory hierarchy are followed.
+-l /usr/local/sbin
+-l /sbin
+-l /usr/sbin
+-l /usr/local/bin
+-l /bin
+-l /usr/bin
+-l /usr/X11R6/bin
+-l /usr/games
+-l /usr/local/lib
+-l /lib
+-l /usr/lib
+-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 0000000..0b3c073
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.cron.daily
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+. /etc/default/prelink
+
+renice +19 -p $$ >/dev/null 2>&1
+
+if [ "$PRELINKING" != yes ]; then
+ if [ -f /etc/prelink.cache ]; then
+ echo /usr/sbin/prelink -uav > /var/log/prelink.log
+ /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1
+ rm -f /etc/prelink.cache
+ # Restart init if needed
+ [ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
+ fi
+ exit 0
+fi
+
+if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \
+ || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then
+ # If cache does not exist or is from older prelink versions or
+ # if we were asked to explicitely, force full prelinking
+ rm -f /etc/prelink.cache /var/lib/misc/prelink.force
+ PRELINK_OPTS="$PRELINK_OPTS -f"
+ date > /var/lib/misc/prelink.full
+elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \
+ -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \
+ = /var/lib/misc/prelink.full ]; then
+ # If prelink without -q has been run in the last
+ # PRELINK_FULL_TIME_INTERVAL days, just use quick mode
+ PRELINK_OPTS="$PRELINK_OPTS -q"
+else
+ date > /var/lib/misc/prelink.full
+fi
+
+echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink.log
+/usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink.log 2>&1
+# Restart init if needed
+[ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
+
+exit 0
diff --git a/meta/recipes-devtools/prelink/prelink/prelink.default b/meta/recipes-devtools/prelink/prelink/prelink.default
new file mode 100644
index 0000000..901258e
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/prelink.default
@@ -0,0 +1,22 @@
+# Set this to no to disable prelinking altogether
+# or to yes to enable it.
+# (if you change this from yes to no prelink -ua
+# will be run next night to undo prelinking)
+PRELINKING=unknown
+
+# Options to pass to prelink
+# -m Try to conserve virtual memory by allowing overlapping
+# assigned virtual memory slots for libraries which
+# never appear together in one binary
+# -R Randomize virtual memory slot assignments for libraries.
+# This makes it slightly harder for various buffer overflow
+# attacks, since library addresses will be different on each
+# host using -R.
+PRELINK_OPTS=-mR
+
+# How often should full prelink be run (in days)
+# Normally, prelink will be run in quick mode, every
+# $PRELINK_FULL_TIME_INTERVAL days it will be run
+# in normal mode. Comment this line out if prelink
+# should be run in normal mode always.
+PRELINK_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 0000000..06078ed
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -0,0 +1,50 @@
+SECTION = "devel"
+# Need binutils for libiberty.a
+DEPENDS = "elfutils binutils"
+DESCRIPTION = " The prelink package contains a utility which modifies ELF shared libraries \
+and executables, so that far fewer relocations need to be resolved at \
+runtime and thus programs come up faster."
+LICENSE = "GPLv2"
+PV = "1.0+git${SRCPV}"
+PR = "r0"
+
+SRC_URI = "git://git.pokylinux.org/prelink-cross.git;protocol=git \
+ file://prelink.conf \
+ file://prelink.cron.daily \
+ file://prelink.default"
+
+TARGET_OS_ORIG := "${TARGET_OS}"
+OVERRIDES_append = ":${TARGET_OS_ORIG}"
+
+S = "${WORKDIR}/git/trunk"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-selinux --with-pkgversion=${PV}-${PR} \
+ --with-bugurl=http://bugzilla.pokylinux.org/"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf
+ install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink
+ install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink
+}
+
+pkg_postinst_prelink() {
+#!/bin/sh
+
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+prelink -a
+}
+
+pkg_postrm_prelink() {
+#!/bin/sh
+
+prelink -au
+}
+
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 0000000..0a2fa28
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo/static_sqlite.patch
@@ -0,0 +1,15 @@
+Due to disabling the LD_LIBRARY_PATH handling, we need to use a static
+libsqlite.
+
+diff -ur git.orig/Makefile.in git/Makefile.in
+--- git.orig/Makefile.in 2010-07-20 17:13:56.000000000 -0700
++++ git/Makefile.in 2010-07-20 17:12:14.000000000 -0700
+@@ -45,7 +45,7 @@
+ GLOB_PATTERN=guts/*.c
+ GUTS=$(filter-out "$(GLOB_PATTERN)",$(wildcard $(GLOB_PATTERN)))
+
+-DBLDFLAGS=-lsqlite3
++DBLDFLAGS=$(SQLITE)/lib/libsqlite3.a
+ USE_64=wrapfuncs64.in
+
+ 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 0000000..4cb483e
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "Pseudo gives fake root capabilities to a normal user"
+HOMEPAGE = "http://wiki.github.com/wrpseudo/pseudo/"
+LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
+SECTION = "base"
+LICENSE = "LGPL2.1"
+DEPENDS = "sqlite3"
+
+PV = "0.0+git${SRCPV}"
+PR = "r14"
+
+SRC_URI = "git://github.com/wrpseudo/pseudo.git;protocol=git \
+ file://static_sqlite.patch"
+
+FILES_${PN} = "${libdir}/libpseudo.so ${bindir}/* ${localstatedir}/pseudo"
+PROVIDES += "virtual/fakeroot"
+
+S = "${WORKDIR}/git"
+
+inherit siteinfo
+
+do_configure () {
+ :
+}
+
+do_compile () {
+ if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" ]; then
+ # We need the 32-bit libpseudo on a 64-bit machine...
+ ./configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
+ oe_runmake 'CFLAGS=-m32' 'LIB=lib/pseudo/lib' libpseudo
+ # prevent it from removing the lib, but remove everything else
+ make 'LIB=foo' distclean
+ fi
+ ${S}/configure --prefix=${prefix} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=${SITEINFO_BITS}
+ oe_runmake 'LIB=lib/pseudo/lib$(MARK64)'
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' 'LIB=lib/pseudo/lib$(MARK64)' install
+ if [ "${SITEINFO_BITS}" == "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" == "pseudo-native" ]; then
+ mkdir -p ${D}${prefix}/lib/pseudo/lib
+ cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
+ fi
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+
diff --git a/meta/recipes-devtools/python/fix-path.inc b/meta/recipes-devtools/python/fix-path.inc
new file mode 100644
index 0000000..0738c59
--- /dev/null
+++ b/meta/recipes-devtools/python/fix-path.inc
@@ -0,0 +1,22 @@
+do_install_append() {
+ for i in `find ${D} -name "*.py"` ; do \
+ sed -i -e s:${D}::g $i
+ done
+
+ for i in `find ${D} -name "*.la"` ; do \
+ sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
+ done
+
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ if test -e ${D}${sbindir} ; then
+ for i in ${D}${sbindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+}
+
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 0000000..cee12c8
--- /dev/null
+++ b/meta/recipes-devtools/python/python-2.6-manifest.inc
@@ -0,0 +1,268 @@
+
+# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
+# Generator: '../../contrib/python/generate-manifest-2.6.py' Version 20091004 (C) 2002-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
+
+
+
+PROVIDES+="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 "
+
+PACKAGES="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"
+
+DESCRIPTION_python-profile="Python Basic Profiling Support"
+RDEPENDS_python-profile="python-core python-textutils"
+FILES_python-profile="${libdir}/python2.6/profile.* ${libdir}/python2.6/pstats.* ${libdir}/python2.6/cProfile.* ${libdir}/python2.6/lib-dynload/_lsprof.so "
+
+DESCRIPTION_python-threading="Python Threading & Synchronization Support"
+RDEPENDS_python-threading="python-core python-lang"
+FILES_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.* "
+
+DESCRIPTION_python-distutils="Python Distribution Utilities"
+RDEPENDS_python-distutils="python-core"
+FILES_python-distutils="${libdir}/python2.6/config ${libdir}/python2.6/distutils "
+
+DESCRIPTION_python-doctest="Python framework for running examples in docstrings."
+RDEPENDS_python-doctest="python-core python-lang python-io python-re python-unittest python-debugger python-difflib"
+FILES_python-doctest="${libdir}/python2.6/doctest.* "
+
+DESCRIPTION_python-stringold="Python String APIs [deprecated]"
+RDEPENDS_python-stringold="python-core python-re"
+FILES_python-stringold="${libdir}/python2.6/lib-dynload/strop.so ${libdir}/python2.6/string.* "
+
+DESCRIPTION_python-codecs="Python Codecs, Encodings & i18n Support"
+RDEPENDS_python-codecs="python-core python-lang"
+FILES_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.* "
+
+DESCRIPTION_python-ctypes="Python C Types Support"
+RDEPENDS_python-ctypes="python-core"
+FILES_python-ctypes="${libdir}/python2.6/ctypes ${libdir}/python2.6/lib-dynload/_ctypes.so "
+
+DESCRIPTION_python-pickle="Python Persistence Support"
+RDEPENDS_python-pickle="python-core python-codecs python-io python-re"
+FILES_python-pickle="${libdir}/python2.6/pickle.* ${libdir}/python2.6/shelve.* ${libdir}/python2.6/lib-dynload/cPickle.so "
+
+DESCRIPTION_python-datetime="Python Calendar and Time support"
+RDEPENDS_python-datetime="python-core python-codecs"
+FILES_python-datetime="${libdir}/python2.6/_strptime.* ${libdir}/python2.6/calendar.* ${libdir}/python2.6/lib-dynload/datetime.so "
+
+DESCRIPTION_python-core="Python Interpreter and core modules (needed!)"
+RDEPENDS_python-core=""
+FILES_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* "
+
+DESCRIPTION_python-io="Python Low-Level I/O"
+RDEPENDS_python-io="python-core python-math"
+FILES_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.* "
+
+DESCRIPTION_python-compiler="Python Compiler Support"
+RDEPENDS_python-compiler="python-core"
+FILES_python-compiler="${libdir}/python2.6/compiler "
+
+DESCRIPTION_python-compression="Python High Level Compression Support"
+RDEPENDS_python-compression="python-core python-zlib"
+FILES_python-compression="${libdir}/python2.6/gzip.* ${libdir}/python2.6/zipfile.* ${libdir}/python2.6/tarfile.* ${libdir}/python2.6/lib-dynload/bz2.so "
+
+DESCRIPTION_python-re="Python Regular Expression APIs"
+RDEPENDS_python-re="python-core"
+FILES_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.* "
+
+DESCRIPTION_python-xmlrpc="Python XMLRPC Support"
+RDEPENDS_python-xmlrpc="python-core python-xml python-netserver python-lang"
+FILES_python-xmlrpc="${libdir}/python2.6/xmlrpclib.* ${libdir}/python2.6/SimpleXMLRPCServer.* "
+
+DESCRIPTION_python-terminal="Python Terminal Controlling Support"
+RDEPENDS_python-terminal="python-core python-io"
+FILES_python-terminal="${libdir}/python2.6/pty.* ${libdir}/python2.6/tty.* "
+
+DESCRIPTION_python-email="Python Email Support"
+RDEPENDS_python-email="python-core python-io python-re python-mime python-audio python-image python-netclient"
+FILES_python-email="${libdir}/python2.6/imaplib.* ${libdir}/python2.6/email "
+
+DESCRIPTION_python-image="Python Graphical Image Handling"
+RDEPENDS_python-image="python-core"
+FILES_python-image="${libdir}/python2.6/colorsys.* ${libdir}/python2.6/imghdr.* ${libdir}/python2.6/lib-dynload/imageop.so ${libdir}/python2.6/lib-dynload/rgbimg.so "
+
+DESCRIPTION_python-tests="Python Tests"
+RDEPENDS_python-tests="python-core"
+FILES_python-tests="${libdir}/python2.6/test "
+
+DESCRIPTION_python-core-dbg="Python core module debug information"
+RDEPENDS_python-core-dbg="python-core"
+FILES_python-core-dbg="${libdir}/python2.6/config/.debug ${libdir}/python2.6/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug "
+
+DESCRIPTION_python-resource="Python Resource Control Interface"
+RDEPENDS_python-resource="python-core"
+FILES_python-resource="${libdir}/python2.6/lib-dynload/resource.so "
+
+DESCRIPTION_python-json="Python JSON Support"
+RDEPENDS_python-json="python-core python-math python-re"
+FILES_python-json="${libdir}/python2.6/json "
+
+DESCRIPTION_python-devel="Python Development Package"
+RDEPENDS_python-devel="python-core"
+FILES_python-devel="${includedir} ${libdir}/libpython2.6.so ${libdir}/python2.6/config "
+
+DESCRIPTION_python-difflib="Python helpers for computing deltas between objects."
+RDEPENDS_python-difflib="python-lang python-re"
+FILES_python-difflib="${libdir}/python2.6/difflib.* "
+
+DESCRIPTION_python-math="Python Math Support"
+RDEPENDS_python-math="python-core"
+FILES_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.* "
+
+DESCRIPTION_python-syslog="Python Syslog Interface"
+RDEPENDS_python-syslog="python-core"
+FILES_python-syslog="${libdir}/python2.6/lib-dynload/syslog.so "
+
+DESCRIPTION_python-hotshot="Python Hotshot Profiler"
+RDEPENDS_python-hotshot="python-core"
+FILES_python-hotshot="${libdir}/python2.6/hotshot ${libdir}/python2.6/lib-dynload/_hotshot.so "
+
+DESCRIPTION_python-unixadmin="Python Unix Administration Support"
+RDEPENDS_python-unixadmin="python-core"
+FILES_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.* "
+
+DESCRIPTION_python-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support"
+RDEPENDS_python-textutils="python-core python-io python-re python-stringold"
+FILES_python-textutils="${libdir}/python2.6/lib-dynload/_csv.so ${libdir}/python2.6/csv.* ${libdir}/python2.6/optparse.* ${libdir}/python2.6/textwrap.* "
+
+DESCRIPTION_python-tkinter="Python Tcl/Tk Bindings"
+RDEPENDS_python-tkinter="python-core"
+FILES_python-tkinter="${libdir}/python2.6/lib-dynload/_tkinter.so ${libdir}/python2.6/lib-tk "
+
+DESCRIPTION_python-gdbm="Python GNU Database Support"
+RDEPENDS_python-gdbm="python-core"
+FILES_python-gdbm="${libdir}/python2.6/lib-dynload/gdbm.so "
+
+DESCRIPTION_python-elementtree="Python elementree"
+RDEPENDS_python-elementtree="python-core"
+FILES_python-elementtree="${libdir}/python2.6/lib-dynload/_elementtree.so "
+
+DESCRIPTION_python-fcntl="Python's fcntl Interface"
+RDEPENDS_python-fcntl="python-core"
+FILES_python-fcntl="${libdir}/python2.6/lib-dynload/fcntl.so "
+
+DESCRIPTION_python-netclient="Python Internet Protocol Clients"
+RDEPENDS_python-netclient="python-core python-crypt python-datetime python-io python-lang python-logging python-mime"
+FILES_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.* "
+
+DESCRIPTION_python-pprint="Python Pretty-Print Support"
+RDEPENDS_python-pprint="python-core"
+FILES_python-pprint="${libdir}/python2.6/pprint.* "
+
+DESCRIPTION_python-netserver="Python Internet Protocol Servers"
+RDEPENDS_python-netserver="python-core python-netclient"
+FILES_python-netserver="${libdir}/python2.6/cgi.* ${libdir}/python2.6/*HTTPServer.* ${libdir}/python2.6/SocketServer.* "
+
+DESCRIPTION_python-curses="Python Curses Support"
+RDEPENDS_python-curses="python-core"
+FILES_python-curses="${libdir}/python2.6/curses ${libdir}/python2.6/lib-dynload/_curses.so ${libdir}/python2.6/lib-dynload/_curses_panel.so "
+
+DESCRIPTION_python-smtpd="Python Simple Mail Transport Daemon"
+RDEPENDS_python-smtpd="python-core python-netserver python-email python-mime"
+FILES_python-smtpd="${bindir}/smtpd.* "
+
+DESCRIPTION_python-html="Python HTML Processing"
+RDEPENDS_python-html="python-core"
+FILES_python-html="${libdir}/python2.6/formatter.* ${libdir}/python2.6/htmlentitydefs.* ${libdir}/python2.6/htmllib.* ${libdir}/python2.6/markupbase.* ${libdir}/python2.6/sgmllib.* "
+
+DESCRIPTION_python-readline="Python Readline Support"
+RDEPENDS_python-readline="python-core"
+FILES_python-readline="${libdir}/python2.6/lib-dynload/readline.so ${libdir}/python2.6/rlcompleter.* "
+
+DESCRIPTION_python-subprocess="Python Subprocess Support"
+RDEPENDS_python-subprocess="python-core python-io python-re python-fcntl python-pickle"
+FILES_python-subprocess="${libdir}/python2.6/subprocess.* "
+
+DESCRIPTION_python-pydoc="Python Interactive Help Support"
+RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re"
+FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.6/pydoc.* "
+
+DESCRIPTION_python-logging="Python Logging Support"
+RDEPENDS_python-logging="python-core python-io python-lang python-pickle python-stringold"
+FILES_python-logging="${libdir}/python2.6/logging "
+
+DESCRIPTION_python-mailbox="Python Mailbox Format Support"
+RDEPENDS_python-mailbox="python-core python-mime"
+FILES_python-mailbox="${libdir}/python2.6/mailbox.* "
+
+DESCRIPTION_python-xml="Python basic XML support."
+RDEPENDS_python-xml="python-core python-re"
+FILES_python-xml="${libdir}/python2.6/lib-dynload/pyexpat.so ${libdir}/python2.6/xml ${libdir}/python2.6/xmllib.* "
+
+DESCRIPTION_python-mime="Python MIME Handling APIs"
+RDEPENDS_python-mime="python-core python-io"
+FILES_python-mime="${libdir}/python2.6/mimetools.* ${libdir}/python2.6/uu.* ${libdir}/python2.6/quopri.* ${libdir}/python2.6/rfc822.* "
+
+DESCRIPTION_python-sqlite3="Python Sqlite3 Database Support"
+RDEPENDS_python-sqlite3="python-core python-datetime python-lang python-crypt python-io python-threading python-zlib"
+FILES_python-sqlite3="${libdir}/python2.6/lib-dynload/_sqlite3.so ${libdir}/python2.6/sqlite3/dbapi2.* ${libdir}/python2.6/sqlite3/__init__.* ${libdir}/python2.6/sqlite3/dump.* "
+
+DESCRIPTION_python-sqlite3-tests="Python Sqlite3 Database Support Tests"
+RDEPENDS_python-sqlite3-tests="python-core python-sqlite3"
+FILES_python-sqlite3-tests="${libdir}/python2.6/sqlite3/test "
+
+DESCRIPTION_python-unittest="Python Unit Testing Framework"
+RDEPENDS_python-unittest="python-core python-stringold python-lang"
+FILES_python-unittest="${libdir}/python2.6/unittest.* "
+
+DESCRIPTION_python-multiprocessing="Python Multiprocessing Support"
+RDEPENDS_python-multiprocessing="python-core python-io python-lang"
+FILES_python-multiprocessing="${libdir}/python2.6/lib-dynload/_multiprocessing.so ${libdir}/python2.6/multiprocessing "
+
+DESCRIPTION_python-robotparser="Python robots.txt parser"
+RDEPENDS_python-robotparser="python-core python-netclient"
+FILES_python-robotparser="${libdir}/python2.6/robotparser.* "
+
+DESCRIPTION_python-compile="Python Bytecode Compilation Support"
+RDEPENDS_python-compile="python-core"
+FILES_python-compile="${libdir}/python2.6/py_compile.* ${libdir}/python2.6/compileall.* "
+
+DESCRIPTION_python-debugger="Python Debugger"
+RDEPENDS_python-debugger="python-core python-io python-lang python-re python-stringold python-shell python-pprint"
+FILES_python-debugger="${libdir}/python2.6/bdb.* ${libdir}/python2.6/pdb.* "
+
+DESCRIPTION_python-pkgutil="Python Package Extension Utility Support"
+RDEPENDS_python-pkgutil="python-core"
+FILES_python-pkgutil="${libdir}/python2.6/pkgutil.* "
+
+DESCRIPTION_python-shell="Python Shell-Like Functionality"
+RDEPENDS_python-shell="python-core python-re"
+FILES_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.* "
+
+DESCRIPTION_python-bsddb="Python Berkeley Database Bindings"
+RDEPENDS_python-bsddb="python-core"
+FILES_python-bsddb="${libdir}/python2.6/bsddb ${libdir}/python2.6/lib-dynload/_bsddb.so "
+
+DESCRIPTION_python-mmap="Python Memory-Mapped-File Support"
+RDEPENDS_python-mmap="python-core python-io"
+FILES_python-mmap="${libdir}/python2.6/lib-dynload/mmap.so "
+
+DESCRIPTION_python-zlib="Python zlib Support."
+RDEPENDS_python-zlib="python-core"
+FILES_python-zlib="${libdir}/python2.6/lib-dynload/zlib.so "
+
+DESCRIPTION_python-db="Python File-Based Database Support"
+RDEPENDS_python-db="python-core"
+FILES_python-db="${libdir}/python2.6/anydbm.* ${libdir}/python2.6/dumbdbm.* ${libdir}/python2.6/whichdb.* "
+
+DESCRIPTION_python-crypt="Python Basic Cryptographic and Hashing Support"
+RDEPENDS_python-crypt="python-core"
+FILES_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 "
+
+DESCRIPTION_python-idle="Python Integrated Development Environment"
+RDEPENDS_python-idle="python-core python-tkinter"
+FILES_python-idle="${bindir}/idle ${libdir}/python2.6/idlelib "
+
+DESCRIPTION_python-lang="Python Low-Level Language Support"
+RDEPENDS_python-lang="python-core"
+FILES_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.* "
+
+DESCRIPTION_python-audio="Python Audio Handling"
+RDEPENDS_python-audio="python-core"
+FILES_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 "
+
+DESCRIPTION_python-modules="All Python modules"
+RDEPENDS_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 "
+ALLOW_EMPTY_python-modules = "1"
+
+
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 0000000..b30e82b
--- /dev/null
+++ b/meta/recipes-devtools/python/python-dbus_0.83.1.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Python bindings for DBus, a socket-based message bus system for interprocess communication"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT"
+DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
+PR = "ml0"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils-base autotools pkgconfig
+
+export BUILD_SYS
+export HOST_SYS
+
+export STAGING_LIBDIR
+export STAGING_INCDIR
+
+RDEPENDS = "python-io python-logging python-stringold python-threading python-xml"
+
+FILES_${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 0000000..af5badd
--- /dev/null
+++ b/meta/recipes-devtools/python/python-gst/python-path.patch
@@ -0,0 +1,25 @@
+Index: gst-python-0.10.18/acinclude.m4
+===================================================================
+--- gst-python-0.10.18.orig/acinclude.m4
++++ gst-python-0.10.18/acinclude.m4
+@@ -43,6 +43,12 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+ [AC_REQUIRE([AM_PATH_PYTHON])
+ AC_MSG_CHECKING(for headers required to compile python extensions)
+ dnl deduce PYTHON_INCLUDES
++
++AC_ARG_WITH(python-includes,
++ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
++if test x$py_exec_prefix != x; then
++PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
++else
+ py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+ py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+ if $PYTHON-config --help 2>/dev/null; then
+@@ -53,6 +59,7 @@ else
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+ fi
+ fi
++fi
+ AC_SUBST(PYTHON_INCLUDES)
+ dnl check if the headers exist:
+ 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 0000000..9de07b3
--- /dev/null
+++ b/meta/recipes-devtools/python/python-gst_0.10.18.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Python Gstreamer bindings"
+SECTION = "devel/python"
+LICENSE = "LGPL"
+DEPENDS = "gstreamer gst-plugins-base python-pygobject"
+PR = "ml1"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/gst-python/gst-python-${PV}.tar.bz2 \
+ file://python-path.patch"
+S = "${WORKDIR}/gst-python-${PV}"
+
+inherit autotools distutils-base pkgconfig
+
+EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
+
+FILES_${PN} += "${datadir}/gst-python"
+FILES_${PN}-dev += "${datadir}/gst-python/0.10/defs"
+FILES_${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 0000000..264dcc0
--- /dev/null
+++ b/meta/recipes-devtools/python/python-imaging/path.patch
@@ -0,0 +1,33 @@
+Index: Imaging-1.1.7/setup.py
+===================================================================
+--- Imaging-1.1.7.orig/setup.py
++++ Imaging-1.1.7/setup.py
+@@ -34,10 +34,10 @@ def libinclude(root):
+ # TIFF_ROOT = libinclude("/opt/tiff")
+
+ TCL_ROOT = None
+-JPEG_ROOT = None
+-ZLIB_ROOT = None
++JPEG_ROOT = os.environ['STAGING_LIBDIR']
++ZLIB_ROOT = os.environ['STAGING_LIBDIR']
+ TIFF_ROOT = None
+-FREETYPE_ROOT = None
++FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
+ LCMS_ROOT = None
+
+ # FIXME: add mechanism to explicitly *disable* the use of a library
+@@ -207,14 +207,6 @@ class pil_build_ext(build_ext):
+ if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
+ add_directory(include_dirs, tcl_dir)
+
+- # standard locations
+- add_directory(library_dirs, "/usr/local/lib")
+- add_directory(include_dirs, "/usr/local/include")
+-
+- add_directory(library_dirs, "/usr/lib")
+- add_directory(include_dirs, "/usr/include")
+-
+- #
+ # insert new dirs *before* default libs, to avoid conflicts
+ # between Python PYD stub libs and real libraries
+
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 0000000..9812043
--- /dev/null
+++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Python Imaging Library"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "freetype jpeg tiff"
+RDEPENDS = "python-lang python-stringold"
+SRCNAME = "Imaging"
+PR = "ml0"
+
+SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
+ file://path.patch"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
+
+do_compile() {
+ export STAGING_LIBDIR=${STAGING_LIBDIR}
+ export STAGING_INCDIR=${STAGING_INCDIR}
+ distutils_do_compile
+}
+
+do_install() {
+ export STAGING_LIBDIR=${STAGING_LIBDIR}
+ export STAGING_INCDIR=${STAGING_INCDIR}
+ distutils_do_install
+ install -d ${D}${datadir}/doc/${PN}/html/
+ install -m 0644 ${S}/README ${D}${datadir}/doc/${PN}/
+ install -m 0644 ${S}/Docs/* ${D}${datadir}/doc/${PN}/html/
+
+}
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 0000000..41aa13d
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse-native_0.3.2.bb
@@ -0,0 +1,6 @@
+require python-iniparse_${PV}.bb
+inherit native
+DEPENDS = "python-native"
+RDEPENDS = ""
+PR = "r0"
+
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 0000000..27a38f4
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse_0.3.2.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "iniparse is a INI parser for Python"
+HOMEPAGE = "http://code.google.com/p/iniparse/"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://iniparse.googlecode.com/files/iniparse-${PV}.tar.gz"
+S = "${WORKDIR}/iniparse-${PV}"
+
+inherit 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 0000000..2559e3a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch
@@ -0,0 +1,20 @@
+# $(exec_prefix) points to the wrong directory, when installing
+# a cross-build. @bindir@ and @libdir@ works better and doesn't
+# affect the native build.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Makefile.pre.in
+===================================================================
+--- Python-2.6.1.orig/Makefile.pre.in
++++ Python-2.6.1/Makefile.pre.in
+@@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@
+ datarootdir= @datarootdir@
+
+ # Expanded directories
+-BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++BINDIR= @bindir@
++LIBDIR= @libdir@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ 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 0000000..5131e0b
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/04-default-is-optimized.patch
@@ -0,0 +1,18 @@
+# When compiling for an embedded system, we need every bit of
+# performance we can get. default to optimized with the option
+# of opt-out.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Python/compile.c
+===================================================================
+--- Python-2.6.1.orig/Python/compile.c
++++ Python-2.6.1/Python/compile.c
+@@ -32,7 +32,7 @@
+ #include "symtable.h"
+ #include "opcode.h"
+
+-int Py_OptimizeFlag = 0;
++int Py_OptimizeFlag = 1;
+
+ #define DEFAULT_BLOCK_SIZE 16
+ #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 0000000..f5e852a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/10-distutils-fix-swig-parameter.patch
@@ -0,0 +1,16 @@
+# Some versions of SWIG do not use the extension parameter.
+# Make it optional.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+Index: Python-2.6.1/Lib/distutils/command/build_ext.py
+===================================================================
+--- Python-2.6.1.orig/Lib/distutils/command/build_ext.py
++++ Python-2.6.1/Lib/distutils/command/build_ext.py
+@@ -566,7 +566,7 @@ class build_ext (Command):
+ target_lang=language)
+
+
+- def swig_sources (self, sources, extension):
++ def swig_sources (self, sources, extension=None):
+
+ """Walk the list of source files in 'sources', looking for SWIG
+ 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 0000000..8354e26
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/11-distutils-never-modify-shebang-line.patch
@@ -0,0 +1,18 @@
+# Don't modify the she-bang line for a cross-build.
+# Otherwise it points to our hostpython (which we do not want)
+#
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Lib/distutils/command/build_scripts.py
+===================================================================
+--- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py
++++ Python-2.6.1/Lib/distutils/command/build_scripts.py
+@@ -87,7 +87,7 @@ class build_scripts (Command):
+ continue
+
+ match = first_line_re.match(first_line)
+- if match:
++ if False: #match:
+ adjust = 1
+ post_interp = match.group(1) or ''
+
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 0000000..aa43936
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/12-distutils-prefix-is-inside-staging-area.patch
@@ -0,0 +1,60 @@
+# The proper prefix is inside our staging area.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-2.6.1.orig/Lib/distutils/sysconfig.py
++++ Python-2.6.1/Lib/distutils/sysconfig.py
+@@ -19,8 +19,8 @@ import sys
+ from distutils.errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
++EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ if plat_specific:
++ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
++ else:
++ prefix = plat_specific and EXEC_PREFIX or PREFIX
+ if os.name == "posix":
+ if python_build:
+ base = os.path.dirname(os.path.abspath(sys.executable))
+@@ -112,7 +115,10 @@ def get_python_lib(plat_specific=0, stan
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ if plat_specific:
++ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib')
++ else:
++ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+@@ -218,7 +218,7 @@ def get_config_h_filename():
+ else:
+ # The name of the config.h file changed in 2.2
+ config_h = 'pyconfig.h'
+- return os.path.join(inc_dir, config_h)
++ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ def get_makefile_filename():
+@@ -226,7 +226,7 @@ def get_makefile_filename():
+ if python_build:
+ return os.path.join(os.path.dirname(sys.executable), "Makefile")
+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
+- return os.path.join(lib_dir, "config", "Makefile")
++ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
+
+
+ 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 0000000..beb3adc
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/debug.patch
@@ -0,0 +1,27 @@
+Index: Python-2.6.1/Lib/distutils/unixccompiler.py
+===================================================================
+--- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000
++++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000
+@@ -300,6 +300,8 @@
+ dylib_f = self.library_filename(lib, lib_type='dylib')
+ static_f = self.library_filename(lib, lib_type='static')
+
++ print "Looking in %s for %s" % (lib, dirs)
++
+ for dir in dirs:
+ shared = os.path.join(dir, shared_f)
+ dylib = os.path.join(dir, dylib_f)
+@@ -309,10 +311,13 @@
+ # assuming that *all* Unix C compilers do. And of course I'm
+ # ignoring even GCC's "-static" option. So sue me.
+ if os.path.exists(dylib):
++ print "Found %s" % (dylib)
+ return dylib
+ elif os.path.exists(shared):
++ print "Found %s" % (shared)
+ return shared
+ elif os.path.exists(static):
++ print "Found %s" % (static)
+ return static
+
+ # 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 0000000..7020f3c
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/nohostlibs.patch
@@ -0,0 +1,53 @@
+Index: Python-2.6.1/setup.py
+===================================================================
+--- Python-2.6.1.orig/setup.py 2009-11-13 16:20:47.000000000 +0000
++++ Python-2.6.1/setup.py 2009-11-13 16:28:00.000000000 +0000
+@@ -310,8 +310,8 @@
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -347,10 +347,10 @@
+ for directory in reversed(options.dirs):
+ add_dir_to_list(dir_list, directory)
+
+- if os.path.normpath(sys.prefix) != '/usr':
+- add_dir_to_list(self.compiler.library_dirs,
++
++ add_dir_to_list(self.compiler.library_dirs,
+ sysconfig.get_config_var("LIBDIR"))
+- add_dir_to_list(self.compiler.include_dirs,
++ add_dir_to_list(self.compiler.include_dirs,
+ sysconfig.get_config_var("INCLUDEDIR"))
+
+ try:
+@@ -361,11 +361,8 @@
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+- lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
+- ]
+- inc_dirs = self.compiler.include_dirs + ['/usr/include']
++ lib_dirs = self.compiler.library_dirs
++ inc_dirs = self.compiler.include_dirs
+ exts = []
+ missing = []
+
+@@ -583,8 +580,7 @@
+ readline_libs.append('ncurses')
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+ readline_libs.append('curses')
+- elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ elif self.compiler.find_library_file(lib_dirs,
+ 'termcap'):
+ readline_libs.append('termcap')
+ 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 0000000..2739018
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native-2.6.5/sitecustomize.py
@@ -0,0 +1,45 @@
+# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# GPLv2 or later
+# Version: 20081123
+# Features:
+# * set proper default encoding
+# * enable readline completion in the interactive interpreter
+# * load command line history on startup
+# * save command line history on exit
+
+import os
+
+def __exithandler():
+ try:
+ readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+def __registerExitHandler():
+ import atexit
+ atexit.register( __exithandler )
+
+def __enableReadlineSupport():
+ readline.set_history_length( 1000 )
+ readline.parse_and_bind( "tab: complete" )
+ try:
+ readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+def __enableDefaultEncoding():
+ import sys
+ try:
+ sys.setdefaultencoding( "utf8" )
+ except LookupError:
+ pass
+
+import sys
+try:
+ import rlcompleter, readline
+except ImportError:
+ pass
+else:
+ __enableDefaultEncoding()
+ __registerExitHandler()
+ __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 0000000..cb95e4b
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native_2.6.5.bb
@@ -0,0 +1,30 @@
+require python.inc
+DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
+PR = "${INC_PR}.3"
+
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+ file://00-fix-bindir-libdir-for-cross.patch \
+ file://04-default-is-optimized.patch \
+ file://05-enable-ctypes-cross-build.patch \
+ file://10-distutils-fix-swig-parameter.patch \
+ file://11-distutils-never-modify-shebang-line.patch \
+ file://12-distutils-prefix-is-inside-staging-area.patch \
+ file://debug.patch \
+ file://nohostlibs.patch"
+S = "${WORKDIR}/Python-${PV}"
+
+inherit native
+
+EXTRA_OEMAKE = '\
+ BUILD_SYS="" \
+ HOST_SYS="" \
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${bindir}/
+ install -m 0755 Parser/pgen ${D}${bindir}/
+}
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 0000000..1ff6038
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycairo_1.8.10.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Python Bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv2.1 & MPLv1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421"
+# cairo >= 1.8.8
+DEPENDS = "cairo"
+PR = "ml0"
+
+SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.gz"
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit distutils pkgconfig
+
+do_install_append () {
+ install -d ${D}${includedir}
+ install -d ${D}${libdir}
+ mv ${D}${datadir}/include/* ${D}${includedir}
+ mv ${D}${datadir}/lib/* ${D}${libdir}
+ sed -i -e 's#prefix=.*#prefix=${prefix}#' ${D}${libdir}/pkgconfig/pycairo.pc
+}
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 0000000..b7c5ab9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
@@ -0,0 +1,14 @@
+Index: pycurl-7.18.2/setup.py
+===================================================================
+--- pycurl-7.18.2.orig/setup.py
++++ pycurl-7.18.2/setup.py
+@@ -97,8 +97,7 @@ else:
+ else:
+ extra_compile_args.append(e)
+ libs = split_quoted(
+- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
+- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
++ os.popen("'%s' --libs" % CURL_CONFIG).read())
+ for e in libs:
+ if e[:2] == "-l":
+ 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 0000000..1a04767
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "libcurl python bindings."
+HOMEPAGE = "http://pycurl.sourceforge.net/"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "LGPLv2.1+ | MIT"
+LIC_FILES_CHKSUM = "file://README;endline=13;md5=fbfe545b1869617123a08c0983ef17b2 \
+ file://COPYING;md5=3579a9fd0221d49a237aaa33492f988c \
+ file://COPYING2;md5=ffaa1e283b7f9bf5aafd8d45db6f7518"
+
+DEPENDS = "curl python"
+RDEPENDS = "python-core curl"
+SRCNAME = "pycurl"
+PR = "r0"
+
+SRC_URI = "\
+ http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
+ file://no-static-link.patch;patch=1 \
+"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
+
+# need to export these variables for python-config to work
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+BBCLASSEXTEND = "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 0000000..d360227
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject-native_2.21.1.bb
@@ -0,0 +1,15 @@
+require python-pygobject_${PV}.bb
+
+DEPENDS = "python-native glib-2.0-native"
+PR = "r0"
+
+PARALLEL_MAKE = ""
+
+inherit native
+
+SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2"
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 gobject/generate-constants ${D}${bindir}/gobject-generate-constants
+}
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 0000000..57a9380
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject/generate-constants.patch
@@ -0,0 +1,18 @@
+Index: pygobject-2.14.2/gobject/Makefile.am
+===================================================================
+--- pygobject-2.14.2.orig/gobject/Makefile.am
++++ pygobject-2.14.2/gobject/Makefile.am
+@@ -21,11 +21,11 @@ if PLATFORM_WIN32
+ common_ldflags += -no-undefined
+ endif
+
+-constants.py: generate-constants$(EXEEXT) constants.py.in
++constants.py: constants.py.in
+ rm -f constants.py
+ cp $(srcdir)/constants.py.in constants.py
+ chmod 644 constants.py
+- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
++ gobject-generate-constants$(EXEEXT) >> constants.py
+ chmod 444 constants.py
+
+ 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 0000000..b815e4c
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygobject_2.21.1.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPL"
+DEPENDS = "python-pygobject-native-${PV} glib-2.0"
+PR = "ml0"
+
+MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
+
+SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
+ file://generate-constants.patch"
+S = "${WORKDIR}/pygobject-${PV}"
+
+FILESPATH = "${FILE_DIRNAME}/python-pygobject:${FILE_DIRNAME}/files"
+
+inherit autotools distutils-base pkgconfig
+
+# necessary to let the call for python-config succeed
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+PACKAGES += "${PN}-lib"
+
+RDEPENDS_${PN} += "python-textutils"
+
+FILES_${PN} = "${libdir}/python*"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir} ${datadir}"
+FILES_${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 0000000..53518fb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/acinclude.m4
@@ -0,0 +1,90 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN(AM_CHECK_PYMOD,
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+AC_ARG_WITH(python-includes,
+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
+if test x$py_exec_prefix != x; then
+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+else
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS. If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_MSG_CHECKING([whether [$]CC understands $1])
+ AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+ AC_MSG_RESULT($jh_has_option)
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac])
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 0000000..dca19ce
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
@@ -0,0 +1,16 @@
+Index: pygtk-2.10.0/gtk/gtkunixprint.override
+===================================================================
+--- pygtk-2.10.0.orig/gtk/gtkunixprint.override
++++ pygtk-2.10.0/gtk/gtkunixprint.override
+@@ -105,11 +105,7 @@ _wrap_gtk_print_job_get_surface(PyGObjec
+ if (pyg_error_check(&error))
+ return NULL;
+
+-#if PYCAIRO_VERSION_HEX >= 0x1010600
+ return PycairoSurface_FromSurface(surface, NULL);
+-#else
+- return PycairoSurface_FromSurface(surface, NULL, NULL);
+-#endif
+ }
+ %%
+ 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 0000000..c358104
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/nodocs.patch
@@ -0,0 +1,13 @@
+Index: pygtk-2.17.0/Makefile.am
+===================================================================
+--- pygtk-2.17.0.orig/Makefile.am
++++ pygtk-2.17.0/Makefile.am
+@@ -4,7 +4,7 @@ if BUILD_GTK
+ GTK_SUBDIR = gtk
+ endif
+
+-SUBDIRS = . $(GTK_SUBDIR) examples tests docs
++SUBDIRS = . $(GTK_SUBDIR) examples tests
+
+ PLATFORM_VERSION = 2.0
+
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 0000000..9340f82
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
@@ -0,0 +1,14 @@
+Index: pygtk-2.10.4/gtk/__init__.py
+===================================================================
+--- pygtk-2.10.4.orig/gtk/__init__.py 2007-11-27 19:27:05.000000000 -0300
++++ pygtk-2.10.4/gtk/__init__.py 2007-11-27 19:28:22.000000000 -0300
+@@ -78,7 +78,8 @@
+
+ keysyms = LazyModule('keysyms', locals())
+
+-_init()
++if not hasattr(sys.modules['__main__'], 'python_launcher_enabled'):
++ _init()
+
+ # CAPI
+ _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 0000000..53518fb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
@@ -0,0 +1,90 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN(AM_CHECK_PYMOD,
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+AC_ARG_WITH(python-includes,
+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
+if test x$py_exec_prefix != x; then
+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+else
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS. If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_MSG_CHECKING([whether [$]CC understands $1])
+ AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+ AC_MSG_RESULT($jh_has_option)
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac])
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 0000000..ef63b51
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk_2.17.0.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "Python GTK+ 2.17.x Bindings"
+SECTION = "devel/python"
+# needs gtk+ 2.17.x
+DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
+RDEPENDS = "python-shell python-pycairo python-pygobject"
+PROVIDES = "python-pygtk2"
+SRCNAME = "pygtk"
+LICENSE = "LGPL"
+PR = "ml8.2"
+
+SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.17/${SRCNAME}-${PV}.tar.bz2 \
+ file://fix-gtkunixprint.patch \
+ file://prevent_to_get_display_during_import.patch \
+ file://nodocs.patch \
+ file://acinclude.m4"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../"
+
+inherit autotools pkgconfig distutils-base
+
+do_configure_prepend() {
+ install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+# dirty fix #1: remove dependency on python-pygobject-dev
+do_install_append() {
+ find ${D} -name "*.la"|xargs rm -f
+ rm -f ${D}/${bindir}/pygtk-codegen-2.0
+ rm -rf ${D}/${libdir}/pkgconfig
+}
+
+# dirty fix #2: fix build system paths leaking in
+require fix-path.inc
+
+PACKAGES =+ "${PN}-demo"
+FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk "
+RDEPENDS_${PN}-demo = "python-pygtk python-stringold python-lang"
+
+# todo: revamp packaging, package demo seperatly
+FILES_${PN}-dev += " ${libdir}/pygtk/2.0 ${bindir}/pygtk-* ${datadir}/pygtk/2.0"
+
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 0000000..90b6b16
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
@@ -0,0 +1,5 @@
+require python-pyrex_${PV}.bb
+inherit native
+DEPENDS = "python-native"
+RDEPENDS = ""
+PR = "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 0000000..a1f5bb2
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
@@ -0,0 +1,13 @@
+Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
+===================================================================
+--- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py
++++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
+@@ -15,7 +15,7 @@ except ImportError:
+ warnings = None
+
+ class Extension(_Extension.Extension):
+- _Extension.Extension.__doc__ + \
++ _Extension.Extension.__doc__ or "" + \
+ """pyrex_include_dirs : [string]
+ list of directories to search for Pyrex header files (.pxd) (in
+ 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 0000000..6c57af5
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Pyrex is a language specially designed for writing Python extension modules. \
+It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
+and the messy, low-level world of C."
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+SRCNAME = "Pyrex"
+PR = "ml0"
+
+SRC_URI = "\
+ http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+ file://pyrex-fix-optimized-mode.patch \
+"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit 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 0000000..a4bcd42
--- /dev/null
+++ b/meta/recipes-devtools/python/python-scons-native_1.3.0.bb
@@ -0,0 +1,6 @@
+require python-scons_${PV}.bb
+inherit native
+DEPENDS = "python-native"
+RDEPENDS = ""
+PR = "r0"
+
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 0000000..f5d11eb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-scons_1.3.0.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "A Software Construction Tool"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+SRCNAME = "scons"
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit 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 0000000..ff8f02e
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber-native_3.9.1.bb
@@ -0,0 +1,4 @@
+require python-urlgrabber_${PV}.bb
+inherit native
+DEPENDS = "python-native python-pycurl-native"
+RDEPENDS = ""
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 0000000..7a1ee05
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-3.0.0-cleanup.patch
@@ -0,0 +1,28 @@
+diff -up urlgrabber-3.0.0/urlgrabber/grabber.py.cleanup urlgrabber-3.0.0/urlgrabber/grabber.py
+--- urlgrabber-3.0.0/urlgrabber/grabber.py.cleanup 2007-11-29 10:25:13.000000000 +0000
++++ urlgrabber-3.0.0/urlgrabber/grabber.py 2007-11-29 10:26:15.000000000 +0000
+@@ -1204,16 +1204,18 @@ class URLGrabberFileObject:
+ bs = 1024*8
+ size = 0
+
+- if amount is not None: bs = min(bs, amount - size)
+- block = self.read(bs)
+- size = size + len(block)
+- while block:
+- new_fo.write(block)
++ try:
+ if amount is not None: bs = min(bs, amount - size)
+ block = self.read(bs)
+ size = size + len(block)
++ while block:
++ new_fo.write(block)
++ if amount is not None: bs = min(bs, amount - size)
++ block = self.read(bs)
++ size = size + len(block)
++ finally:
++ new_fo.close()
+
+- new_fo.close()
+ try:
+ modified_tuple = self.hdr.getdate_tz('last-modified')
+ 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 0000000..90180d2
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-HEAD.patch
@@ -0,0 +1,142 @@
+diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
+index e090e90..a26880c 100644
+--- a/urlgrabber/grabber.py
++++ b/urlgrabber/grabber.py
+@@ -439,6 +439,12 @@ try:
+ except:
+ __version__ = '???'
+
++try:
++ # this part isn't going to do much - need to talk to gettext
++ from i18n import _
++except ImportError, msg:
++ def _(st): return st
++
+ ########################################################################
+ # functions for debugging output. These functions are here because they
+ # are also part of the module initialization.
+@@ -1052,7 +1058,8 @@ class PyCurlFileObject():
+ self._reget_length = 0
+ self._prog_running = False
+ self._error = (None, None)
+- self.size = None
++ self.size = 0
++ self._hdr_ended = False
+ self._do_open()
+
+
+@@ -1085,9 +1092,14 @@ class PyCurlFileObject():
+ return -1
+
+ def _hdr_retrieve(self, buf):
++ if self._hdr_ended:
++ self._hdr_dump = ''
++ self.size = 0
++ self._hdr_ended = False
++
+ if self._over_max_size(cur=len(self._hdr_dump),
+ max_size=self.opts.max_header_size):
+- return -1
++ return -1
+ try:
+ self._hdr_dump += buf
+ # we have to get the size before we do the progress obj start
+@@ -1104,7 +1116,17 @@ class PyCurlFileObject():
+ s = parse150(buf)
+ if s:
+ self.size = int(s)
+-
++
++ if buf.lower().find('location') != -1:
++ location = ':'.join(buf.split(':')[1:])
++ location = location.strip()
++ self.scheme = urlparse.urlsplit(location)[0]
++ self.url = location
++
++ if len(self._hdr_dump) != 0 and buf == '\r\n':
++ self._hdr_ended = True
++ if DEBUG: DEBUG.info('header ended:')
++
+ return len(buf)
+ except KeyboardInterrupt:
+ return pycurl.READFUNC_ABORT
+@@ -1136,6 +1158,7 @@ class PyCurlFileObject():
+ self.curl_obj.setopt(pycurl.PROGRESSFUNCTION, self._progress_update)
+ self.curl_obj.setopt(pycurl.FAILONERROR, True)
+ self.curl_obj.setopt(pycurl.OPT_FILETIME, True)
++ self.curl_obj.setopt(pycurl.FOLLOWLOCATION, True)
+
+ if DEBUG:
+ self.curl_obj.setopt(pycurl.VERBOSE, True)
+@@ -1291,7 +1314,12 @@ class PyCurlFileObject():
+ raise err
+
+ elif str(e.args[1]) == '' and self.http_code != 0: # fake it until you make it
+- msg = 'HTTP Error %s : %s ' % (self.http_code, self.url)
++ if self.scheme in ['http', 'https']:
++ msg = 'HTTP Error %s : %s ' % (self.http_code, self.url)
++ elif self.scheme in ['ftp']:
++ msg = 'FTP Error %s : %s ' % (self.http_code, self.url)
++ else:
++ msg = "Unknown Error: URL=%s , scheme=%s" % (self.url, self.scheme)
+ else:
+ msg = 'PYCURL ERROR %s - "%s"' % (errcode, str(e.args[1]))
+ code = errcode
+@@ -1299,6 +1327,12 @@ class PyCurlFileObject():
+ err.code = code
+ err.exception = e
+ raise err
++ else:
++ if self._error[1]:
++ msg = self._error[1]
++ err = URLGRabError(14, msg)
++ err.url = self.url
++ raise err
+
+ def _do_open(self):
+ self.curl_obj = _curl_cache
+@@ -1532,11 +1566,14 @@ class PyCurlFileObject():
+ def _over_max_size(self, cur, max_size=None):
+
+ if not max_size:
+- max_size = self.size
+- if self.opts.size: # if we set an opts size use that, no matter what
+- max_size = self.opts.size
++ if not self.opts.size:
++ max_size = self.size
++ else:
++ max_size = self.opts.size
++
+ if not max_size: return False # if we have None for all of the Max then this is dumb
+- if cur > max_size + max_size*.10:
++
++ if cur > int(float(max_size) * 1.10):
+
+ msg = _("Downloaded more than max size for %s: %s > %s") \
+ % (self.url, cur, max_size)
+@@ -1582,7 +1619,11 @@ class PyCurlFileObject():
+ self.opts.progress_obj.end(self._amount_read)
+ self.fo.close()
+
+-
++ def geturl(self):
++ """ Provide the geturl() method, used to be got from
++ urllib.addinfourl, via. urllib.URLopener.* """
++ return self.url
++
+ _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
+
+
+diff --git a/urlgrabber/progress.py b/urlgrabber/progress.py
+index dd07c6a..45eb248 100644
+--- a/urlgrabber/progress.py
++++ b/urlgrabber/progress.py
+@@ -658,6 +658,8 @@ def format_time(seconds, use_hours=0):
+ if seconds is None or seconds < 0:
+ if use_hours: return '--:--:--'
+ else: return '--:--'
++ elif seconds == float('inf'):
++ return 'Infinite'
+ else:
+ seconds = int(seconds)
+ 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 0000000..b63e7c3
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber/urlgrabber-reset.patch
@@ -0,0 +1,15 @@
+--- a/urlgrabber/grabber.py 2010-02-19 14:50:45.000000000 -0500
++++ b/urlgrabber/grabber.py 2010-02-19 14:51:28.000000000 -0500
+@@ -1626,6 +1626,12 @@
+
+ _curl_cache = pycurl.Curl() # make one and reuse it over and over and over
+
++def reset_curl_obj():
++ """To make sure curl has reread the network/dns info we force a reload"""
++ global _curl_cache
++ _curl_cache.close()
++ _curl_cache = pycurl.Curl()
++
+
+ #####################################################################
+ # 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 0000000..9f3a4cc
--- /dev/null
+++ b/meta/recipes-devtools/python/python-urlgrabber_3.9.1.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "urlgrabber is a pure python package that drastically simplifies the fetching of files."
+
+HOMEPAGE = "http://urlgrabber.baseurl.org/"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPL"
+PR = "r1"
+
+SRC_URI = "http://urlgrabber.baseurl.org/download/urlgrabber-${PV}.tar.gz \
+ file://urlgrabber-HEAD.patch;patch=1 \
+ file://urlgrabber-reset.patch;patch=1"
+S = "${WORKDIR}/urlgrabber-${PV}"
+
+DEPENDS = "python-pycurl"
+
+inherit 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 0000000..682bd5a
--- /dev/null
+++ b/meta/recipes-devtools/python/python.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "The Python Programming Language"
+HOMEPAGE = "http://www.python.org"
+LICENSE = "PSF"
+SECTION = "devel/python"
+PRIORITY = "optional"
+# bump this on every change in contrib/python/generate-manifest-2.6.py
+INC_PR = "ml8"
+
+DEFAULT_PREFERENCE = "-26"
+
+PYTHON_MAJMIN = "2.6"
+
+inherit autotools
+
+EXTRA_OECONF = "\
+ --with-threads \
+ --with-pymalloc \
+ --with-cyclic-gc \
+ --without-cxx \
+ --with-signal-module \
+ --with-wctype-functions \
+ --enable-shared \
+"
+
+PARALLEL_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 0000000..2559e3a
--- /dev/null
+++ b/meta/recipes-devtools/python/python/00-fix-bindir-libdir-for-cross.patch
@@ -0,0 +1,20 @@
+# $(exec_prefix) points to the wrong directory, when installing
+# a cross-build. @bindir@ and @libdir@ works better and doesn't
+# affect the native build.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Makefile.pre.in
+===================================================================
+--- Python-2.6.1.orig/Makefile.pre.in
++++ Python-2.6.1/Makefile.pre.in
+@@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@
+ datarootdir= @datarootdir@
+
+ # Expanded directories
+-BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++BINDIR= @bindir@
++LIBDIR= @libdir@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ 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 0000000..e89faa4
--- /dev/null
+++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -0,0 +1,116 @@
+# We need to ensure our host tools get run during build, not the freshly
+# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Makefile.pre.in
+===================================================================
+--- Python-2.6.1.orig/Makefile.pre.in
++++ Python-2.6.1/Makefile.pre.in
+@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
+
+ PYTHON= python$(EXE)
+ BUILDPYTHON= python$(BUILDEXE)
++HOSTPYTHON= $(BUILDPYTHON)
+
+ # The task to run while instrument when building the profile-opt target
+ PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
+@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
+-
++HOSTPGEN= $(PGEN)$(EXE)
+ POBJS= \
+ Parser/acceler.o \
+ Parser/grammar1.o \
+@@ -394,8 +395,8 @@ platform: $(BUILDPYTHON)
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON)
+ @case $$MAKEFLAGS in \
+- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
+ esac
+
+ # Build static library
+@@ -513,7 +514,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
+
+ $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+ -@$(INSTALL) -d Include
+- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+
+ $(PGEN): $(PGENOBJS)
+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+@@ -879,23 +880,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+ done
+ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
++ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
+
+ # Create the PLATDIR source directory, if one wasn't distributed..
+ $(srcdir)/Lib/$(PLATDIR):
+@@ -993,7 +994,7 @@ libainstall: all
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall:
+- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+Index: Python-2.6.1/setup.py
+===================================================================
+--- Python-2.6.1.orig/setup.py
++++ Python-2.6.1/setup.py
+@@ -276,6 +276,7 @@ class PyBuildExt(build_ext):
+ self.failed.append(ext.name)
+ self.announce('*** WARNING: renaming "%s" since importing it'
+ ' failed: %s' % (ext.name, why), level=3)
++ return
+ assert not self.inplace
+ basename, tail = os.path.splitext(ext_filename)
+ newname = basename + "_failed" + tail
+@@ -310,8 +311,8 @@ class PyBuildExt(build_ext):
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -410,6 +411,9 @@ class PyBuildExt(build_ext):
+
+ # XXX Omitted modules: gl, pure, dl, SGI-specific modules
+
++ lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ]
++ inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ]
++
+ #
+ # The following modules are all pretty straightforward, and compile
+ # 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 0000000..b1c0bfb
--- /dev/null
+++ b/meta/recipes-devtools/python/python/02-remove-test-for-cross.patch
@@ -0,0 +1,106 @@
+# OpenEmbedded prepopulates the autotools site cache, so if this
+# would be using AC_TRY_CACHE, we could patch it in a more sane way
+# Alas, I don't have enough autotalent to do that.
+#
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+Index: Python-2.6.1/configure.in
+===================================================================
+--- Python-2.6.5.orig/configure.in 2010-07-06 04:37:09.000000000 -0700
++++ Python-2.6.5/configure.in 2010-07-06 04:40:18.000000000 -0700
+@@ -2697,50 +2697,6 @@
+ AC_CHECK_LIB(resolv, inet_aton)
+ )
+
+-# On Tru64, chflags seems to be present, but calling it will
+-# exit Python
+-AC_CACHE_CHECK([for chflags], [ac_cv_have_chflags], [dnl
+-AC_TRY_RUN([[
+-#include <sys/stat.h>
+-#include <unistd.h>
+-int main(int argc, char*argv[])
+-{
+- if(chflags(argv[0], 0) != 0)
+- return 1;
+- return 0;
+-}
+-]], ac_cv_have_chflags=yes,
+- ac_cv_have_chflags=no,
+- ac_cv_have_chflags=cross)
+-])
+-if test "$ac_cv_have_chflags" = cross ; then
+- AC_CHECK_FUNC([chflags], [ac_cv_have_chflags="yes"], [ac_cv_have_chflags="no"])
+-fi
+-if test "$ac_cv_have_chflags" = yes ; then
+- AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
+-fi
+-
+-AC_CACHE_CHECK([for lchflags], [ac_cv_have_lchflags], [dnl
+-AC_TRY_RUN([[
+-#include <sys/stat.h>
+-#include <unistd.h>
+-int main(int argc, char*argv[])
+-{
+- if(lchflags(argv[0], 0) != 0)
+- return 1;
+- return 0;
+-}
+-]], ac_cv_have_lchflags=yes,
+- ac_cv_have_lchflags=no,
+- ac_cv_have_lchflags=cross)
+-])
+-if test "$ac_cv_have_lchflags" = cross ; then
+- AC_CHECK_FUNC([lchflags], [ac_cv_have_lchflags="yes"], [ac_cv_have_lchflags="no"])
+-fi
+-if test "$ac_cv_have_lchflags" = yes ; then
+- AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
+-fi
+-
+ dnl Check if system zlib has *Copy() functions
+ dnl
+ dnl On MacOSX the linker will search for dylibs on the entire linker path
+@@ -3844,45 +3800,6 @@
+ AC_MSG_RESULT(no)
+ fi
+
+-AC_MSG_CHECKING(for %zd printf() format support)
+-AC_TRY_RUN([#include <stdio.h>
+-#include <stddef.h>
+-#include <string.h>
+-
+-#ifdef HAVE_SYS_TYPES_H
+-#include <sys/types.h>
+-#endif
+-
+-#ifdef HAVE_SSIZE_T
+-typedef ssize_t Py_ssize_t;
+-#elif SIZEOF_VOID_P == SIZEOF_LONG
+-typedef long Py_ssize_t;
+-#else
+-typedef int Py_ssize_t;
+-#endif
+-
+-int main()
+-{
+- char buffer[256];
+-
+- if(sprintf(buffer, "%zd", (size_t)123) < 0)
+- return 1;
+-
+- if (strcmp(buffer, "123"))
+- return 1;
+-
+- if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
+- return 1;
+-
+- if (strcmp(buffer, "-123"))
+- return 1;
+-
+- return 0;
+-}],
+-[AC_MSG_RESULT(yes)
+- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
+- AC_MSG_RESULT(no))
+-
+ AC_CHECK_TYPE(socklen_t,,
+ AC_DEFINE(socklen_t,int,
+ 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 0000000..a1a385a
--- /dev/null
+++ b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
@@ -0,0 +1,40 @@
+# We need to supply STAGING_INCDIR here, otherwise the Tk headers
+# will not be found.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de>
+
+Index: Python-2.6.1/setup.py
+===================================================================
+--- Python-2.6.1.orig/setup.py
++++ Python-2.6.1/setup.py
+@@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext):
+ dotversion = dotversion[:-1] + '.' + dotversion[-1]
+ tcl_include_sub = []
+ tk_include_sub = []
+- for dir in inc_dirs:
++ for dir in [os.getenv("STAGING_INCDIR")]:
+ tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
+ tk_include_sub += [dir + os.sep + "tk" + dotversion]
+ tk_include_sub += tcl_include_sub
+@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext):
+ if dir not in include_dirs:
+ include_dirs.append(dir)
+
+- # Check for various platform-specific directories
+- if platform == 'sunos5':
+- include_dirs.append('/usr/openwin/include')
+- added_lib_dirs.append('/usr/openwin/lib')
+- elif os.path.exists('/usr/X11R6/include'):
+- include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib64')
+- added_lib_dirs.append('/usr/X11R6/lib')
+- elif os.path.exists('/usr/X11R5/include'):
+- include_dirs.append('/usr/X11R5/include')
+- added_lib_dirs.append('/usr/X11R5/lib')
+- else:
+- # Assume default location for X11
+- include_dirs.append('/usr/X11/include')
+- added_lib_dirs.append('/usr/X11/lib')
+-
+ # If Cygwin, then verify that X is installed before proceeding
+ if platform == 'cygwin':
+ 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 0000000..805f4f6
--- /dev/null
+++ b/meta/recipes-devtools/python/python/04-default-is-optimized.patch
@@ -0,0 +1,52 @@
+# when compiling for an embedded system, we need every bit of
+# performance we can get. default to optimized with the option
+# of opt-out.
+# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+
+Index: Python-2.6.1/Python/compile.c
+===================================================================
+--- Python-2.6.1.orig/Python/compile.c
++++ Python-2.6.1/Python/compile.c
+@@ -32,7 +32,7 @@
+ #include "symtable.h"
+ #include "opcode.h"
+
+-int Py_OptimizeFlag = 0;
++int Py_OptimizeFlag = 1;
+
+ #define DEFAULT_BLOCK_SIZE 16
+ #define DEFAULT_BLOCKS 8
+Index: Python-2.6.1/Modules/main.c
+===================================================================
+--- Python-2.6.1.orig/Modules/main.c
++++ Python-2.6.1/Modules/main.c
+@@ -40,7 +40,7 @@ static char **orig_argv;
+ static int orig_argc;
+
+ /* command line options */
+-#define BASE_OPTS "3bBc:dEhiJm:OQ:sStuUvVW:xX?"
++#define BASE_OPTS "3bBc:dEhiJm:NOQ:sStuUvVW:xX?"
+
+ #ifndef RISCOS
+ #define PROGRAM_OPTS BASE_OPTS
+@@ -69,8 +69,7 @@ Options and arguments (and corresponding
+ static char *usage_2 = "\
+ if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n\
+ -m mod : run library module as a script (terminates option list)\n\
+--O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
+--OO : remove doc-strings in addition to the -O optimizations\n\
++-N : do NOT optimize generated bytecode\n\
+ -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\
+ -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
+ -S : don't imply 'import site' on initialization\n\
+@@ -353,8 +352,8 @@ Py_Main(int argc, char **argv)
+
+ /* case 'J': reserved for Jython */
+
+- case 'O':
+- Py_OptimizeFlag++;
++ case 'N':
++ Py_OptimizeFlag=0;
+ break;
+
+ 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 0000000..58b8078
--- /dev/null
+++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
@@ -0,0 +1,28 @@
+# CTypes need to know the actual host we are building on.
+# Signed-Off: Michael Dietrich <mdt@emdete.de>
+
+Index: Python-2.6.1/setup.py
+===================================================================
+--- Python-2.6.1.orig/setup.py
++++ Python-2.6.1/setup.py
+@@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext):
+ ffi_configfile):
+ from distutils.dir_util import mkpath
+ mkpath(ffi_builddir)
+- config_args = []
++ config_args = ['--host=%s' % os.environ["HOST_SYS"], ]
+
+ # Pass empty CFLAGS because we'll just append the resulting
+ # CFLAGS to Python's; -g or -O2 is to be avoided.
+- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
+- % (ffi_builddir, ffi_srcdir, " ".join(config_args))
++ cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
++ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
+
+ res = os.system(cmd)
+ if res or not os.path.exists(ffi_configfile):
+- print "Failed to configure _ctypes module"
++ print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile )
+ return False
+
+ 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 0000000..02dc44c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/99-ignore-optimization-flag.patch
@@ -0,0 +1,19 @@
+# Reinstate the empty -O option to fix weird mixing of native and target
+# binaries and libraries with LD_LIBRARY_PATH when host==target
+#
+# Signed-off-by: Denys Dmytriyenko <denis@denix.org>
+
+Index: Python-2.6.1/Modules/main.c
+===================================================================
+--- Python-2.6.1-orig/Modules/main.c
++++ Python-2.6.1/Modules/main.c
+@@ -352,6 +352,9 @@ Py_Main(int argc, char **argv)
+
+ /* case 'J': reserved for Jython */
+
++ case 'O': /* ignore it */
++ break;
++
+ case 'N':
+ Py_OptimizeFlag=0;
+ break;
diff --git a/meta/recipes-devtools/python/python/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py
new file mode 100644
index 0000000..2739018
--- /dev/null
+++ b/meta/recipes-devtools/python/python/sitecustomize.py
@@ -0,0 +1,45 @@
+# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# GPLv2 or later
+# Version: 20081123
+# Features:
+# * set proper default encoding
+# * enable readline completion in the interactive interpreter
+# * load command line history on startup
+# * save command line history on exit
+
+import os
+
+def __exithandler():
+ try:
+ readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+def __registerExitHandler():
+ import atexit
+ atexit.register( __exithandler )
+
+def __enableReadlineSupport():
+ readline.set_history_length( 1000 )
+ readline.parse_and_bind( "tab: complete" )
+ try:
+ readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
+ except IOError:
+ pass
+
+def __enableDefaultEncoding():
+ import sys
+ try:
+ sys.setdefaultencoding( "utf8" )
+ except LookupError:
+ pass
+
+import sys
+try:
+ import rlcompleter, readline
+except ImportError:
+ pass
+else:
+ __enableDefaultEncoding()
+ __registerExitHandler()
+ __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 0000000..9658fd4
--- /dev/null
+++ b/meta/recipes-devtools/python/python_2.6.5.bb
@@ -0,0 +1,121 @@
+require python.inc
+DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
+DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
+# set to .0 on every increase of INC_PR
+PR = "${INC_PR}.2"
+
+SRC_URI = "\
+ http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+ file://00-fix-bindir-libdir-for-cross.patch \
+ file://01-use-proper-tools-for-cross-build.patch \
+ file://02-remove-test-for-cross.patch \
+ file://03-fix-tkinter-detection.patch \
+ file://04-default-is-optimized.patch \
+ file://05-enable-ctypes-cross-build.patch \
+ file://99-ignore-optimization-flag.patch \
+ file://sitecustomize.py \
+"
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools
+
+# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
+#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
+TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
+TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
+
+do_configure_prepend() {
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || oenote "_ctypes failed to autoreconf"
+}
+
+#
+# Copy config.h and an appropriate Makefile for distutils.sysconfig,
+# which laters uses the information out of these to compile extensions
+#
+do_compile_prepend() {
+ install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
+ install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+ install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
+ install -m 0644 Makefile Makefile.orig
+ install -m 0644 Makefile Makefile.backup
+ sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
+ install -m 0644 Makefile Makefile.backup
+ sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
+ install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
+}
+
+do_compile() {
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
+
+ oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ install -m 0644 Makefile.orig Makefile
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+
+ # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
+ sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_python-core = "python"
+RRECOMMENDS_python-core = "python-readline"
+RRECOMMENDS_python-crypt = "openssl"
+
+# add sitecustomize
+FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
+# ship 2to3
+FILES_python-core += "${bindir}/2to3"
+
+# package libpython2
+PACKAGES =+ "libpython2"
+FILES_libpython2 = "${libdir}/libpython*.so*"
+
+# additional stuff -dev
+
+FILES_${PN}-dev = "\
+ ${includedir} \
+ ${libdir}/lib*${SOLIBSDEV} \
+ ${libdir}/*.la \
+ ${libdir}/*.a \
+ ${libdir}/*.o \
+ ${libdir}/pkgconfig \
+ ${base_libdir}/*.a \
+ ${base_libdir}/*.o \
+ ${datadir}/aclocal \
+ ${datadir}/pkgconfig \
+"
+
+# catch debug extensions (isn't that already in python-core-dbg?)
+FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
+
+# catch all the rest (unsorted)
+PACKAGES += "python-misc"
+FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "python-man"
+FILES_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 0000000..0a44b99
--- /dev/null
+++ b/meta/recipes-devtools/python/yum-metadata-parser-native_1.1.4.bb
@@ -0,0 +1,7 @@
+require yum-metadata-parser_${PV}.bb
+inherit native
+DEPENDS = "python-native sqlite3-native glib-2.0-native libxml2-native"
+RDEPENDS = ""
+PR = "r0"
+
+#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 0000000..2e404a2
--- /dev/null
+++ b/meta/recipes-devtools/python/yum-metadata-parser_1.1.4.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "C-based metadata parser to quickly parse xml metadata into sqlite databases."
+HOMEPAGE = "http://linux.duke.edu/projects/yum/download.ptml"
+SECTION = "devel/python"
+PRIORITY = "optional"
+DEPENDS = "python sqlite3 glib-2.0 libxml2"
+LICENSE = "GPL"
+
+PR = "r1"
+
+SRC_URI = "http://linux.duke.edu/projects/yum/download/yum-metadata-parser/yum-metadata-parser-${PV}.tar.gz"
+S = "${WORKDIR}/yum-metadata-parser-${PV}"
+
+TARGET_CFLAGS += "-I${STAGING_LIBDIR}/glib-2.0"
+
+inherit 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 0000000..8bbfa0e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch
@@ -0,0 +1,12 @@
+Index: qemu/linux-user/syscall.c
+===================================================================
+--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
++++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
+@@ -26,6 +26,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <dirent.h>
+ #include <time.h>
+ #include <limits.h>
+ #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 0000000..528b6f0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch
@@ -0,0 +1,96 @@
+Index: qemu-0.12.4/Makefile.target
+===================================================================
+--- qemu-0.12.4.orig/Makefile.target 2010-06-24 07:59:15.669394205 +0100
++++ qemu-0.12.4/Makefile.target 2010-06-24 08:07:38.739399512 +0100
+@@ -47,6 +47,10 @@
+ libobj-y += op_helper.o helper.o
+ libobj-$(CONFIG_NEED_MMU) += mmu.o
+ libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
++libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
++libobj-$(TARGET_ARM) += dummygl.o
++libobj-$(TARGET_MIPS) += dummygl.o
++libobj-$(TARGET_PPC) += dummygl.o
+ libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
+ libobj-$(TARGET_ALPHA) += alpha_palcode.o
+
+Index: qemu-0.12.4/target-arm/dummygl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qemu-0.12.4/target-arm/dummygl.c 2010-06-24 07:59:15.899401748 +0100
+@@ -0,0 +1,22 @@
++#include <string.h>
++#include <stdlib.h>
++#include <assert.h>
++#include <stdint.h>
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
++{
++
++}
++
++void opengl_process_enable(void)
++{
++
++}
++
++
++void mem_opengl(uint64_t ptr)
++{
++
++}
+Index: qemu-0.12.4/target-mips/dummygl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qemu-0.12.4/target-mips/dummygl.c 2010-06-24 07:59:15.899401748 +0100
+@@ -0,0 +1,22 @@
++#include <string.h>
++#include <stdlib.h>
++#include <assert.h>
++#include <stdint.h>
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
++{
++
++}
++
++void opengl_process_enable(void)
++{
++
++}
++
++
++void mem_opengl(uint64_t ptr)
++{
++
++}
+Index: qemu-0.12.4/target-ppc/dummygl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ qemu-0.12.4/target-ppc/dummygl.c 2010-06-24 08:07:59.070712946 +0100
+@@ -0,0 +1,22 @@
++#include <string.h>
++#include <stdlib.h>
++#include <assert.h>
++#include <stdint.h>
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
++{
++
++}
++
++void opengl_process_enable(void)
++{
++
++}
++
++
++void mem_opengl(uint64_t ptr)
++{
++
++}
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 0000000..0a27c2d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch
@@ -0,0 +1,13 @@
+Index: git/Makefile.target
+===================================================================
+--- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
++++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
+@@ -326,7 +326,7 @@ vl.o: qemu-options.h
+
+ monitor.o: qemu-monitor.h
+
+-LIBS += -lGL -lGLU
++LIBS += -lGL
+
+ ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
+
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 0000000..8ba7d8f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch
@@ -0,0 +1,16 @@
+# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
+# makes info.info.x11.display zero and avoids the calls to
+# opengl_exec_set_parent_window, one of which is crashing.
+
+Index: qemu-0.12.4/sdl.c
+===================================================================
+--- qemu-0.12.4.orig/sdl.c
++++ qemu-0.12.4/sdl.c
+@@ -871,6 +871,7 @@ void sdl_display_init(DisplayState *ds,
+ vi = SDL_GetVideoInfo();
+ host_format = *(vi->vfmt);
+
++ bzero(&info, sizeof(info));
+ SDL_GetWMInfo(&info);
+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
+ 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 0000000..7b33aa4
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch
@@ -0,0 +1,22 @@
+Fedora 13 switched the default behaviour of the linker to no longer
+indirectly link to required libraries (i.e. dependencies of a library
+already linked to). Therefore we need to explicitly pass the depended on
+libraries into the linker for building to work on Fedora 13.
+
+More information is available on the Fedora Wiki:
+https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
+
+JL - 15/06/10
+Index: qemu-0.12.4/Makefile.target
+===================================================================
+--- qemu-0.12.4.orig/Makefile.target 2010-06-15 11:21:52.000000000 +0100
++++ qemu-0.12.4/Makefile.target 2010-06-15 11:25:27.212852910 +0100
+@@ -178,7 +178,7 @@
+ obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
+ obj-$(CONFIG_KVM) += kvm.o kvm-all.o
+ obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
+-LIBS+=-lz
++LIBS+=-lz -lX11 -ldl
+
+ sound-obj-y =
+ 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 0000000..8a95a68
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch
@@ -0,0 +1,26 @@
+Index: qemu/Makefile
+===================================================================
+--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
++++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
+@@ -300,7 +300,7 @@ endif
+ install: all $(if $(BUILD_DOCS),install-doc)
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
++ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ ifneq ($(BLOBS),)
+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
+Index: qemu/Makefile.target
+===================================================================
+--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
++++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
+@@ -351,7 +351,7 @@ clean:
+
+ install: all
+ ifneq ($(PROGS),)
+- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+
+ # 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 0000000..c404429
--- /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 0000000..ab31476
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
@@ -0,0 +1,34376 @@
+Index: qemu-0.12.4/Makefile.target
+===================================================================
+--- qemu-0.12.4.orig/Makefile.target
++++ qemu-0.12.4/Makefile.target
+@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
+ libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
+ libobj-y += op_helper.o helper.o
+ libobj-$(CONFIG_NEED_MMU) += mmu.o
++libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
+ libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
+ libobj-$(TARGET_ALPHA) += alpha_palcode.o
+
+@@ -82,6 +83,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
+ # cpu_signal_handler() in cpu-exec.c.
+ signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
+
++parse_gl_h: parse_gl_h.c
++ $(HOST_CC) -g -o $@ $<
++server_stub.c: parse_gl_h
++ ./parse_gl_h
++gl_func.h: parse_gl_h
++ ./parse_gl_h
++GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
++opengl_func.h: gl_func.h
++helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
++ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
++gl_beginend.h: ../target-i386/beginend_funcs.sh
++ $< > $@
++opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
++ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
++
+ #########################################################
+ # Linux user emulator target
+
+@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
+ obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
+ obj-i386-y += ne2000-isa.o
+
++ifeq ($(TARGET_BASE_ARCH), i386)
++QEMU_CFLAGS += -DTARGET_OPENGL_OK
++endif
++
+ # shared objects
+ obj-ppc-y = ppc.o ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
+ obj-ppc-y += ide/cmd646.o
+@@ -303,6 +323,8 @@ vl.o: qemu-options.h
+
+ monitor.o: qemu-monitor.h
+
++LIBS += -lGL -lGLU
++
+ ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
+
+ endif # CONFIG_SOFTMMU
+Index: qemu-0.12.4/hw/pixel_ops.h
+===================================================================
+--- qemu-0.12.4.orig/hw/pixel_ops.h
++++ qemu-0.12.4/hw/pixel_ops.h
+@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
+ return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
+ }
+
++static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
++ unsigned int b)
++{
++ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
++}
++
+ static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
+ unsigned int b)
+ {
+Index: qemu-0.12.4/hw/vmware_vga.c
+===================================================================
+--- qemu-0.12.4.orig/hw/vmware_vga.c
++++ qemu-0.12.4/hw/vmware_vga.c
+@@ -489,6 +489,8 @@ static inline void vmsvga_cursor_define(
+
+ #define CMD(f) le32_to_cpu(s->cmd->f)
+
++static uint32_t last_cmd;
++
+ static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
+ {
+ if (!s->config || !s->enable)
+@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
+
+ static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
+ {
+- uint32_t cmd = s->fifo[CMD(stop) >> 2];
+- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
+- if (CMD(stop) >= CMD(max))
++ int offset = CMD(stop);
++
++ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
++ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
++ __FUNCTION__, last_cmd);
++ return 0x00000000;
++ }
++
++ s->cmd->stop = cpu_to_le32(offset + 4);
++ if (offset + 4 >= CMD(max))
+ s->cmd->stop = s->cmd->min;
+- return cmd;
++ return s->fifo[offset >> 2];
+ }
+
+ static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
+@@ -512,12 +521,12 @@ static inline uint32_t vmsvga_fifo_read(
+
+ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
+ {
+- uint32_t cmd, colour;
++ uint32_t colour;
+ int args = 0;
+ int x, y, dx, dy, width, height;
+ struct vmsvga_cursor_definition_s cursor;
+ while (!vmsvga_fifo_empty(s))
+- switch (cmd = vmsvga_fifo_read(s)) {
++ switch (last_cmd = vmsvga_fifo_read(s)) {
+ case SVGA_CMD_UPDATE:
+ case SVGA_CMD_UPDATE_VERBOSE:
+ x = vmsvga_fifo_read(s);
+@@ -624,7 +633,7 @@ static void vmsvga_fifo_run(struct vmsvg
+ while (args --)
+ vmsvga_fifo_read(s);
+ printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
+- __FUNCTION__, cmd);
++ __FUNCTION__, last_cmd);
+ break;
+ }
+
+@@ -1143,6 +1152,12 @@ static void vmsvga_init(struct vmsvga_st
+
+ vga_init_vbe(&s->vga);
+
++#ifdef EMBED_STDVGA
++ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
++ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
++ vga_dirty_log_start(s);
++#endif
++
+ rom_add_vga(VGABIOS_FILENAME);
+
+ vmsvga_reset(s);
+Index: qemu-0.12.4/qemu-char.c
+===================================================================
+--- qemu-0.12.4.orig/qemu-char.c
++++ qemu-0.12.4/qemu-char.c
+@@ -2235,6 +2235,69 @@ static CharDriverState *qemu_chr_open_so
+ return NULL;
+ }
+
++#define TARGET_OPENGL_OK
++#if defined(TARGET_OPENGL_OK)
++static uint8_t buffer[32];
++static int buffer_len;
++static int hexdigit[128] = {
++ ['0'] = 0x0,
++ ['1'] = 0x1,
++ ['2'] = 0x2,
++ ['3'] = 0x3,
++ ['4'] = 0x4,
++ ['5'] = 0x5,
++ ['6'] = 0x6,
++ ['7'] = 0x7,
++ ['8'] = 0x8,
++ ['9'] = 0x9,
++ ['a'] = 0xa,
++ ['b'] = 0xb,
++ ['c'] = 0xc,
++ ['d'] = 0xd,
++ ['e'] = 0xe,
++ ['f'] = 0xf,
++};
++
++static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
++{
++ uint64_t ptr = 0;
++ int i;
++
++ if (memchr(buf, 'x', len))
++ opengl_process_enable();
++ return len;
++ memcpy(buffer + buffer_len, buf, len);
++ buffer_len += len;
++
++ if (buffer_len >= 16) {
++ for (i = 0; i < 16; i ++)
++ ptr = (ptr << 4) + hexdigit[buffer[i]];
++
++ buffer_len -= 16;
++ if (buffer_len)
++ memcpy(buffer, buffer + 16, buffer_len);
++
++ mem_opengl(ptr);
++ }
++
++ return len;
++}
++
++CharDriverState *qemu_chr_open_opengl(void)
++{
++ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
++
++ chr->opaque = chr;
++ chr->chr_write = opengl_chr_write;
++
++ qemu_chr_generic_open(chr);
++
++ return chr;
++}
++#else
++#define qemu_chr_open_opengl() 0
++#endif
++
+ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
+ {
+ char host[65], port[33], width[8], height[8];
+@@ -2353,6 +2416,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
+ qemu_opt_set(opts, "path", filename);
+ return opts;
+ }
++ if (!strcmp(filename, "opengl")){
++ qemu_opt_set(opts, "backend", "opengl");
++ return opts;
++ }
+
+ fail:
+ qemu_opts_del(opts);
+@@ -2368,6 +2435,7 @@ static const struct {
+ { .name = "udp", .open = qemu_chr_open_udp },
+ { .name = "msmouse", .open = qemu_chr_open_msmouse },
+ { .name = "vc", .open = text_console_init },
++ { .name = "opengl", .open = qemu_chr_open_opengl },
+ #ifdef _WIN32
+ { .name = "file", .open = qemu_chr_open_win_file_out },
+ { .name = "pipe", .open = qemu_chr_open_win_pipe },
+Index: qemu-0.12.4/sdl.c
+===================================================================
+--- qemu-0.12.4.orig/sdl.c
++++ qemu-0.12.4/sdl.c
+@@ -58,6 +58,8 @@ static uint8_t allocator;
+ static SDL_PixelFormat host_format;
+ static int scaling_active = 0;
+
++extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
++
+ static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
+ {
+ // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
+@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
+
+ static void sdl_resize(DisplayState *ds)
+ {
+- if (!allocator) {
++ SDL_SysWMinfo info;
++ static Display *dpy;
++
++ if (!allocator) {
+ if (!scaling_active)
+ do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
+ else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
+ do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
+ sdl_setdata(ds);
++
++ SDL_GetWMInfo(&info);
++ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
++ (!dpy || dpy == info.info.x11.display)) {
++ dpy = info.info.x11.display;
++ opengl_exec_set_parent_window(dpy, info.info.x11.window);
++ }
+ } else {
+ if (guest_screen != NULL) {
+ SDL_FreeSurface(guest_screen);
+@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
+
+ if (!kbd_mouse_is_absolute()) {
+ SDL_ShowCursor(1);
+- if (guest_cursor &&
++ if (guest_cursor && !force_pointer &&
+ (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
+ SDL_SetCursor(guest_sprite);
+ else
+@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
+ static void sdl_grab_start(void)
+ {
+ if (guest_cursor) {
+- SDL_SetCursor(guest_sprite);
++ if (!force_pointer)
++ SDL_SetCursor(guest_sprite);
+ if (!kbd_mouse_is_absolute() && !absolute_enabled)
+ SDL_WarpMouse(guest_x, guest_y);
+ } else
+@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
+ absolute_enabled = 1;
+ }
+
+- dx = x * 0x7FFF / (width - 1);
+- dy = y * 0x7FFF / (height - 1);
++ dx = x * 0x7FFF / (width - 1);
++ dy = y * 0x7FFF / (height - 1);
+ } else if (absolute_enabled) {
+ sdl_show_cursor();
+ absolute_enabled = 0;
+@@ -761,7 +774,8 @@ static void sdl_mouse_warp(int x, int y,
+ if (!guest_cursor)
+ sdl_show_cursor();
+ if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
+- SDL_SetCursor(guest_sprite);
++ if (!force_pointer)
++ SDL_SetCursor(guest_sprite);
+ if (!kbd_mouse_is_absolute() && !absolute_enabled)
+ SDL_WarpMouse(x, y);
+ }
+@@ -815,7 +829,7 @@ static void sdl_mouse_define(int width,
+ }
+ guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
+
+- if (guest_cursor &&
++ if (guest_cursor && !force_pointer &&
+ (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
+ SDL_SetCursor(guest_sprite);
+ }
+@@ -832,6 +846,7 @@ void sdl_display_init(DisplayState *ds,
+ int flags;
+ uint8_t data = 0;
+ DisplayAllocator *da;
++ SDL_SysWMinfo info;
+ const SDL_VideoInfo *vi;
+
+ #if defined(__APPLE__)
+@@ -856,6 +871,12 @@ void sdl_display_init(DisplayState *ds,
+ vi = SDL_GetVideoInfo();
+ host_format = *(vi->vfmt);
+
++ SDL_GetWMInfo(&info);
++ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
++ opengl_exec_set_parent_window(info.info.x11.display,
++ RootWindow(info.info.x11.display,
++ DefaultScreen(info.info.x11.display)));
++
+ dcl = qemu_mallocz(sizeof(DisplayChangeListener));
+ dcl->dpy_update = sdl_update;
+ dcl->dpy_resize = sdl_resize;
+@@ -891,4 +912,9 @@ void sdl_display_init(DisplayState *ds,
+ gui_fullscreen_initial_grab = 1;
+ sdl_grab_start();
+ }
++
++ SDL_GetWMInfo(&info);
++ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
++ opengl_exec_set_parent_window(info.info.x11.display,
++ info.info.x11.window);
+ }
+Index: qemu-0.12.4/slirp/udp.c
+===================================================================
+--- qemu-0.12.4.orig/slirp/udp.c
++++ qemu-0.12.4/slirp/udp.c
+@@ -40,6 +40,7 @@
+
+ #include <slirp.h>
+ #include "ip_icmp.h"
++#include "bswap.h"
+
+ static u_int8_t udp_tos(struct socket *so);
+
+@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
+ goto bad;
+ }
+
++ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
++ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
++ goto bad;
++ }
++
+ if (slirp->restricted) {
+ goto bad;
+ }
+Index: qemu-0.12.4/sysemu.h
+===================================================================
+--- qemu-0.12.4.orig/sysemu.h
++++ qemu-0.12.4/sysemu.h
+@@ -141,6 +141,7 @@ extern int semihosting_enabled;
+ extern int old_param;
+ extern int boot_menu;
+ extern QEMUClock *rtc_clock;
++extern int force_pointer;
+
+ #define MAX_NODES 64
+ extern int nb_numa_nodes;
+Index: qemu-0.12.4/target-i386/beginend_funcs.sh
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/beginend_funcs.sh
+@@ -0,0 +1,23 @@
++#! /bin/sh
++# Copyright 2008 (C) Intel Corporation
++#
++# echo names of functions that are legal between a glBegin and glEnd pair.
++echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
++echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
++echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
++echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
++echo -e MAGIC_MACRO\(glArrayElement\)\\n
++echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
++echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
++echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
++echo -e MAGIC_MACRO\(glCallList\)\\n
++echo -e MAGIC_MACRO\(glCallLists\)\\n
++echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
+Index: qemu-0.12.4/target-i386/ghash.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/ghash.c
+@@ -0,0 +1,347 @@
++/* This is a modified and simplified version of original ghash.c */
++
++/* GLIB - Library of useful routines for C programming
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GLib Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++
++#include <stdlib.h>
++
++#include "ghash.h"
++
++#define HASH_TABLE_MIN_SIZE 11
++#define HASH_TABLE_MAX_SIZE 13845163
++
++#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
++
++
++typedef struct _SimpleHashNode SimpleHashNode;
++
++struct _SimpleHashNode
++{
++ int key;
++ void* value;
++ SimpleHashNode *next;
++};
++
++struct _SimpleHashTable
++{
++ int size;
++ int nnodes;
++ SimpleHashNode **nodes;
++ SimpleDestroyNotify value_destroy_func;
++};
++
++static const unsigned int simple_primes[] =
++{
++ 11,
++ 19,
++ 37,
++ 73,
++ 109,
++ 163,
++ 251,
++ 367,
++ 557,
++ 823,
++ 1237,
++ 1861,
++ 2777,
++ 4177,
++ 6247,
++ 9371,
++ 14057,
++ 21089,
++ 31627,
++ 47431,
++ 71143,
++ 106721,
++ 160073,
++ 240101,
++ 360163,
++ 540217,
++ 810343,
++ 1215497,
++ 1823231,
++ 2734867,
++ 4102283,
++ 6153409,
++ 9230113,
++ 13845163,
++};
++
++static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
++
++unsigned int simple_spaced_primes_closest (unsigned int num)
++{
++ int i;
++
++ for (i = 0; i < simple_nprimes; i++)
++ if (simple_primes[i] > num)
++ return simple_primes[i];
++
++ return simple_primes[simple_nprimes - 1];
++}
++
++#define HASH_TABLE_RESIZE(hash_table) \
++ do { \
++ if ((hash_table->size >= 3 * hash_table->nnodes && \
++ hash_table->size > HASH_TABLE_MIN_SIZE) || \
++ (3 * hash_table->size <= hash_table->nnodes && \
++ hash_table->size < HASH_TABLE_MAX_SIZE)) \
++ simple_hash_table_resize (hash_table); \
++ } while(0)
++
++static void simple_hash_table_resize (SimpleHashTable *hash_table);
++static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
++ int key);
++static SimpleHashNode* simple_hash_node_new (int key,
++ void* value);
++static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
++ SimpleDestroyNotify value_destroy_func);
++
++
++#define alloc0(type, n) (type*)calloc(n, sizeof(type))
++
++SimpleHashTable*
++simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
++{
++ SimpleHashTable *hash_table;
++
++ hash_table = alloc0(SimpleHashTable, 1);
++ hash_table->size = HASH_TABLE_MIN_SIZE;
++ hash_table->nnodes = 0;
++ hash_table->value_destroy_func = value_destroy_func;
++ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
++
++ return hash_table;
++}
++
++SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
++ SimpleCloneValue clone_value_func)
++{
++ SimpleHashTable *hash_table_new;
++ SimpleHashNode *new_node;
++ SimpleHashNode *node;
++ int i;
++
++ hash_table_new = alloc0 (SimpleHashTable, 1);
++ hash_table_new->size = hash_table->size;
++ hash_table_new->nnodes = hash_table->nnodes;
++ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
++ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
++ for (i = 0; i < hash_table->size; i++)
++ {
++ node = hash_table->nodes[i];
++ while(node)
++ {
++ SimpleHashNode *next = hash_table_new->nodes[i];
++ new_node = simple_hash_node_new(node->key,
++ (clone_value_func)? clone_value_func(node->value) : node->value);
++ new_node->next = next;
++ hash_table_new->nodes[i] = new_node;
++ node = node->next;
++ }
++ }
++ return hash_table_new;
++}
++
++void
++simple_hash_table_destroy (SimpleHashTable *hash_table)
++{
++ int i;
++
++ for (i = 0; i < hash_table->size; i++)
++ {
++ simple_hash_nodes_destroy (hash_table->nodes[i],
++ hash_table->value_destroy_func);
++ hash_table->nodes[i] = NULL;
++ }
++ free (hash_table->nodes);
++ free (hash_table);
++}
++
++static inline SimpleHashNode**
++simple_hash_table_lookup_node (SimpleHashTable *hash_table,
++ int key)
++{
++ SimpleHashNode **node;
++
++ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
++ while (*node && (*node)->key != key)
++ node = &(*node)->next;
++
++ return node;
++}
++
++void*
++simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
++{
++ SimpleHashNode *node;
++
++ node = *simple_hash_table_lookup_node (hash_table, key);
++
++ return node ? node->value : NULL;
++}
++
++void**
++simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
++{
++ SimpleHashNode *node;
++
++ node = *simple_hash_table_lookup_node (hash_table, key);
++
++ return node ? &node->value : NULL;
++}
++
++
++void
++simple_hash_table_insert (SimpleHashTable *hash_table,
++ int key,
++ void* value)
++{
++ SimpleHashNode **node;
++
++ node = simple_hash_table_lookup_node (hash_table, key);
++
++ if (*node)
++ {
++ /* do not reset node->key in this place, keeping
++ * the old key is the intended behaviour.
++ * simple_hash_table_replace() can be used instead.
++ */
++ if (hash_table->value_destroy_func)
++ hash_table->value_destroy_func ((*node)->value);
++
++ (*node)->value = value;
++ }
++ else
++ {
++ *node = simple_hash_node_new (key, value);
++ hash_table->nnodes++;
++ HASH_TABLE_RESIZE (hash_table);
++ }
++}
++int
++simple_hash_table_remove (SimpleHashTable *hash_table,
++ int key)
++{
++ SimpleHashNode **node, *dest;
++
++ node = simple_hash_table_lookup_node (hash_table, key);
++ if (*node)
++ {
++ dest = *node;
++ (*node) = dest->next;
++ if (hash_table->value_destroy_func)
++ hash_table->value_destroy_func (dest->value);
++ free (dest);
++ hash_table->nnodes--;
++
++ HASH_TABLE_RESIZE (hash_table);
++
++ return 1;
++ }
++
++ return 0;
++}
++
++
++void
++simple_hash_table_foreach (SimpleHashTable *hash_table,
++ SimpleHFunc func,
++ void* user_data)
++{
++ SimpleHashNode *node;
++ int i;
++
++ for (i = 0; i < hash_table->size; i++)
++ for (node = hash_table->nodes[i]; node; node = node->next)
++ (* func) (node->key, node->value, user_data);
++}
++
++unsigned int
++simple_hash_table_size (SimpleHashTable *hash_table)
++{
++ return hash_table->nnodes;
++}
++
++static void
++simple_hash_table_resize (SimpleHashTable *hash_table)
++{
++ SimpleHashNode **new_nodes;
++ SimpleHashNode *node;
++ SimpleHashNode *next;
++ unsigned int hash_val;
++ int new_size;
++ int i;
++
++ new_size = simple_spaced_primes_closest (hash_table->nnodes);
++ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
++
++ new_nodes = alloc0 (SimpleHashNode*, new_size);
++
++ for (i = 0; i < hash_table->size; i++)
++ for (node = hash_table->nodes[i]; node; node = next)
++ {
++ next = node->next;
++
++ hash_val = (unsigned int)(node->key) % new_size;
++
++ node->next = new_nodes[hash_val];
++ new_nodes[hash_val] = node;
++ }
++
++ free (hash_table->nodes);
++ hash_table->nodes = new_nodes;
++ hash_table->size = new_size;
++}
++
++static SimpleHashNode*
++simple_hash_node_new (int key,
++ void* value)
++{
++ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
++
++ hash_node->key = key;
++ hash_node->value = value;
++ hash_node->next = NULL;
++
++ return hash_node;
++}
++
++static void
++simple_hash_nodes_destroy (SimpleHashNode *hash_node,
++ SimpleDestroyNotify value_destroy_func)
++{
++ while (hash_node)
++ {
++ SimpleHashNode *next = hash_node->next;
++ if (value_destroy_func)
++ value_destroy_func (hash_node->value);
++ free (hash_node);
++ hash_node = next;
++ }
++}
+Index: qemu-0.12.4/target-i386/ghash.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/ghash.h
+@@ -0,0 +1,59 @@
++/* This is a modified and simplified version of original ghash.h */
++
++
++/* GLIB - Library of useful routines for C programming
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GLib Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++#ifndef __SIMPLE_HASH_H__
++#define __SIMPLE_HASH_H__
++
++typedef struct _SimpleHashTable SimpleHashTable;
++
++typedef void (*SimpleDestroyNotify)(void*);
++typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
++typedef void* (*SimpleCloneValue)(void* value);
++
++/* Hash tables
++ */
++SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
++SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
++ SimpleCloneValue clone_value_func);
++void simple_hash_table_destroy (SimpleHashTable *hash_table);
++void simple_hash_table_insert (SimpleHashTable *hash_table,
++ int key,
++ void* value);
++int simple_hash_table_remove (SimpleHashTable *hash_table,
++ int key);
++void* simple_hash_table_lookup (SimpleHashTable *hash_table,
++ int key);
++void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
++void simple_hash_table_foreach (SimpleHashTable *hash_table,
++ SimpleHFunc func,
++ void* user_data);
++unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
++
++#endif /* __SIMPLE_HASH_H__ */
++
+Index: qemu-0.12.4/target-i386/gl_func_perso.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/gl_func_perso.h
+@@ -0,0 +1,135 @@
++/*
++ * Hand-implemented GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++MAGIC_MACRO(_init32),
++MAGIC_MACRO(_init64),
++MAGIC_MACRO(_synchronize),
++MAGIC_MACRO(_serialized_calls),
++MAGIC_MACRO(_exit_process),
++MAGIC_MACRO(_moveResizeWindow),
++MAGIC_MACRO(_changeWindowState),
++MAGIC_MACRO(_send_cursor),
++
++/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
++MAGIC_MACRO(glXChooseVisual),
++MAGIC_MACRO(glXQueryExtensionsString),
++MAGIC_MACRO(glXQueryServerString),
++MAGIC_MACRO(glXCreateContext),
++MAGIC_MACRO(glXCopyContext),
++MAGIC_MACRO(glXDestroyContext),
++MAGIC_MACRO(glXGetClientString),
++MAGIC_MACRO(glXQueryVersion),
++MAGIC_MACRO(glXMakeCurrent),
++MAGIC_MACRO(glXGetConfig),
++MAGIC_MACRO(glXGetConfig_extended),
++MAGIC_MACRO(glXWaitGL),
++MAGIC_MACRO(glXWaitX),
++MAGIC_MACRO(glXGetFBConfigAttrib_extended),
++MAGIC_MACRO(glXChooseFBConfig),
++MAGIC_MACRO(glXChooseFBConfigSGIX),
++MAGIC_MACRO(glXGetFBConfigs),
++MAGIC_MACRO(glXCreatePbuffer),
++MAGIC_MACRO(glXCreateGLXPbufferSGIX),
++MAGIC_MACRO(glXDestroyPbuffer),
++MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
++MAGIC_MACRO(glXCreateNewContext),
++MAGIC_MACRO(glXCreateContextWithConfigSGIX),
++MAGIC_MACRO(glXGetVisualFromFBConfig),
++MAGIC_MACRO(glXGetFBConfigAttrib),
++MAGIC_MACRO(glXGetFBConfigAttribSGIX),
++MAGIC_MACRO(glXQueryContext),
++MAGIC_MACRO(glXQueryDrawable),
++MAGIC_MACRO(glXQueryGLXPbufferSGIX),
++MAGIC_MACRO(glXUseXFont),
++MAGIC_MACRO(glXIsDirect),
++MAGIC_MACRO(glXGetProcAddress_fake),
++MAGIC_MACRO(glXGetProcAddress_global_fake),
++MAGIC_MACRO(glXSwapBuffers),
++MAGIC_MACRO(glXQueryExtension),
++MAGIC_MACRO(glXGetScreenDriver),
++MAGIC_MACRO(glXGetDriverConfig),
++MAGIC_MACRO(glXSwapIntervalSGI),
++MAGIC_MACRO(glXBindTexImageATI),
++MAGIC_MACRO(glXReleaseTexImageATI),
++MAGIC_MACRO(glXBindTexImageARB),
++MAGIC_MACRO(glXReleaseTexImageARB),
++
++MAGIC_MACRO(glGetString),
++
++MAGIC_MACRO(glShaderSourceARB_fake),
++MAGIC_MACRO(glShaderSource_fake),
++MAGIC_MACRO(glVertexPointer_fake),
++MAGIC_MACRO(glNormalPointer_fake),
++MAGIC_MACRO(glColorPointer_fake),
++MAGIC_MACRO(glSecondaryColorPointer_fake),
++MAGIC_MACRO(glIndexPointer_fake),
++MAGIC_MACRO(glTexCoordPointer_fake),
++MAGIC_MACRO(glEdgeFlagPointer_fake),
++MAGIC_MACRO(glVertexAttribPointerARB_fake),
++MAGIC_MACRO(glVertexAttribPointerNV_fake),
++MAGIC_MACRO(glWeightPointerARB_fake),
++MAGIC_MACRO(glMatrixIndexPointerARB_fake),
++MAGIC_MACRO(glFogCoordPointer_fake),
++MAGIC_MACRO(glVariantPointerEXT_fake),
++MAGIC_MACRO(glInterleavedArrays_fake),
++MAGIC_MACRO(glElementPointerATI_fake),
++MAGIC_MACRO(glTuxRacerDrawElements_fake),
++MAGIC_MACRO(glVertexAndNormalPointer_fake),
++MAGIC_MACRO(glTexCoordPointer01_fake),
++MAGIC_MACRO(glTexCoordPointer012_fake),
++MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
++MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
++MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
++MAGIC_MACRO(glGenTextures_fake),
++MAGIC_MACRO(glGenBuffersARB_fake),
++MAGIC_MACRO(glGenLists_fake),
++MAGIC_MACRO(_glDrawElements_buffer),
++MAGIC_MACRO(_glDrawRangeElements_buffer),
++MAGIC_MACRO(_glMultiDrawElements_buffer),
++MAGIC_MACRO(_glVertexPointer_buffer),
++MAGIC_MACRO(_glNormalPointer_buffer),
++MAGIC_MACRO(_glColorPointer_buffer),
++MAGIC_MACRO(_glSecondaryColorPointer_buffer),
++MAGIC_MACRO(_glIndexPointer_buffer),
++MAGIC_MACRO(_glTexCoordPointer_buffer),
++MAGIC_MACRO(_glEdgeFlagPointer_buffer),
++MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
++MAGIC_MACRO(_glWeightPointerARB_buffer),
++MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
++MAGIC_MACRO(_glFogCoordPointer_buffer),
++MAGIC_MACRO(_glVariantPointerEXT_buffer),
++MAGIC_MACRO(_glGetError_fake),
++MAGIC_MACRO(_glReadPixels_pbo),
++MAGIC_MACRO(_glDrawPixels_pbo),
++MAGIC_MACRO(_glMapBufferARB_fake),
++MAGIC_MACRO(_glSelectBuffer_fake),
++MAGIC_MACRO(_glGetSelectBuffer_fake),
++MAGIC_MACRO(_glFeedbackBuffer_fake),
++MAGIC_MACRO(_glGetFeedbackBuffer_fake),
+Index: qemu-0.12.4/target-i386/helper.c
+===================================================================
+--- qemu-0.12.4.orig/target-i386/helper.c
++++ qemu-0.12.4/target-i386/helper.c
+@@ -1435,7 +1435,7 @@ target_phys_addr_t cpu_get_phys_page_deb
+ }
+
+ page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
+- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
++ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
+ return paddr;
+ }
+
+Index: qemu-0.12.4/target-i386/helper.h
+===================================================================
+--- qemu-0.12.4.orig/target-i386/helper.h
++++ qemu-0.12.4/target-i386/helper.h
+@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
+ DEF_HELPER_2(rcrq, tl, tl, tl)
+ #endif
+
++DEF_HELPER_0(opengl, void)
++
+ #include "def-helper.h"
+Index: qemu-0.12.4/target-i386/helper_opengl.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/helper_opengl.c
+@@ -0,0 +1,1207 @@
++/*
++ * Host-side implementation of GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++#define _XOPEN_SOURCE 600
++#include <string.h>
++#include <stdlib.h>
++#include <assert.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#include "exec.h"
++
++#if defined(CONFIG_USER_ONLY)
++void helper_opengl(void)
++{
++ /* TODO */
++}
++#else
++
++#include "opengl_func.h"
++
++#define ENABLE_GL_LOG
++
++extern FILE *stderr;
++
++extern void init_process_tab(void);
++extern int do_function_call(int func_number, arg_t *args, char *ret_string);
++
++extern void sdl_set_opengl_window(int x, int y, int width, int height);
++
++static int last_process_id = 0;
++static int must_save = 0;
++
++static int allow_kernel = 0;
++
++static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
++{
++ int is_user, index;
++
++ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
++ is_user = ((env->hflags & HF_CPL_MASK) == 3);
++ /* A sanity check for the int0x99 case */
++ if (unlikely(is_user == 0 && !allow_kernel)) {
++ fprintf(stderr, "not in userland !!!\n");
++ return NULL;
++ }
++ if (__builtin_expect
++ (env->tlb_table[is_user][index].addr_code !=
++ (addr & TARGET_PAGE_MASK), 0)) {
++ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
++
++ if (ret == -1) {
++ fprintf(stderr,
++ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
++ TARGET_FMT_lx "\n", addr, ret);
++ fprintf(stderr,
++ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
++ TARGET_FMT_lx ")\n", addr,
++ env->tlb_table[is_user][index].addr_code,
++ addr & TARGET_PAGE_MASK);
++ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
++ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
++ return NULL;
++ } else {
++ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
++ return qemu_get_ram_ptr(ret +
++ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
++ } else {
++ fprintf(stderr,
++ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
++ TARGET_FMT_lx "\n", addr, ret);
++ fprintf(stderr,
++ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
++ "\n", ret, (target_ulong) last_ram_offset);
++ return NULL;
++ }
++ }
++ } else
++ return (void *) (addr + env->tlb_table[is_user][index].addend);
++}
++
++#ifndef MIN
++#define MIN(a, b) (((a) < (b)) ? (a) : (b))
++#endif
++
++enum {
++ NOT_MAPPED,
++ MAPPED_CONTIGUOUS,
++ MAPPED_NOT_CONTIGUOUS
++};
++
++#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
++
++/* Return NOT_MAPPED if a page is not mapped into target physical memory */
++/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
++/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
++static int get_target_mem_state(const CPUState *env,
++ target_ulong target_addr, int len)
++{
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = MAPPED_CONTIGUOUS;
++
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
++ void *last_phys_addr = phys_addr;
++
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (len > to_end_page) {
++ len -= to_end_page;
++ aligned_target_addr += TARGET_PAGE_SIZE;
++ int i;
++
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr =
++ get_phys_mem_addr(env, aligned_target_addr + i);
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
++ ret = MAPPED_NOT_CONTIGUOUS;
++ last_phys_addr = phys_addr;
++ }
++ }
++ } else {
++ void *last_phys_addr = NULL;
++ int i;
++
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ if (phys_addr == 0) {
++ return NOT_MAPPED;
++ }
++ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
++ ret = MAPPED_NOT_CONTIGUOUS;
++ last_phys_addr = phys_addr;
++ }
++ }
++ return ret;
++}
++
++/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
++/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
++static int memcpy_host_to_target(const CPUState *env,
++ target_ulong target_addr,
++ const void *host_addr, int len)
++{
++ int i;
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return 0;
++ }
++
++ if (ret == MAPPED_CONTIGUOUS) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(phys_addr, host_addr, len);
++ } else {
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
++ if (len <= to_end_page) {
++ return 1;
++ }
++ len -= to_end_page;
++ host_addr += to_end_page;
++ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
++ }
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ memcpy(phys_addr, host_addr + i,
++ (i + TARGET_PAGE_SIZE <=
++ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
++ }
++ }
++
++ return 1;
++}
++
++static int memcpy_target_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int len)
++{
++ int i;
++ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
++ int to_end_page =
++ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return 0;
++ }
++
++ if (ret == MAPPED_CONTIGUOUS) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(host_addr, phys_addr, len);
++ } else {
++ if (aligned_target_addr != target_addr) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr);
++
++ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
++ if (len <= to_end_page)
++ return 1;
++
++ len -= to_end_page;
++ host_addr += to_end_page;
++ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
++ }
++ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
++ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
++
++ memcpy(host_addr + i, phys_addr,
++ (i + TARGET_PAGE_SIZE <=
++ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
++ }
++ }
++
++ return 1;
++}
++
++static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
++}
++
++static int wordsize = 0;
++static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args) =
++ memcpy_target_to_host_1_1;
++
++void do_disconnect_current(void);
++void do_context_switch(Display *dpy, pid_t pid, int call);
++
++static void disconnect_current(void)
++{
++ last_process_id = 0;
++
++ return do_disconnect_current();
++}
++
++static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ int ret;
++ uint32_t args_temp[nb_args], *src = args_temp;
++ arg_t *dest = host_addr;
++
++ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
++ if (!ret)
++ return ret;
++
++ while (nb_args) {
++ /* TODO: endianness */
++ *dest = 0;
++ *(uint32_t *) (dest++) = *src++;
++ nb_args--;
++ }
++
++ return ret;
++}
++
++static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
++ target_ulong target_addr, int nb_args)
++{
++ int ret;
++ uint64_t args_temp[nb_args], *src = args_temp;
++ arg_t *dest = host_addr;
++
++ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
++ if (!ret)
++ return ret;
++
++ while (nb_args) {
++ /* TODO: endianness */
++ *dest = 0;
++ *(uint64_t *) (dest++) = *src++;
++ nb_args--;
++ }
++
++ return ret;
++}
++
++static int host_offset = 0;
++static void reset_host_offset()
++{
++ host_offset = 0;
++}
++
++/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
++/* Do not free or modify */
++static const void *get_host_read_pointer(const CPUState *env,
++ const target_ulong target_addr, int len)
++{
++ int ret = get_target_mem_state(env, target_addr, len);
++
++ if (ret == NOT_MAPPED) {
++ return NULL;
++ } else if (ret == MAPPED_CONTIGUOUS) {
++ return get_phys_mem_addr(env, target_addr);
++ } else {
++ static int host_mem_size = 0;
++ static void *host_mem = NULL;
++ static void *ret;
++
++ if (host_mem_size < host_offset + len) {
++ host_mem_size = 2 * host_mem_size + host_offset + len;
++ host_mem = realloc(host_mem, host_mem_size);
++ }
++ ret = host_mem + host_offset;
++ assert(memcpy_target_to_host(env, ret, target_addr, len));
++ host_offset += len;
++ return ret;
++ }
++}
++
++int doing_opengl = 0;
++static int last_func_number = -1;
++static size_t(*my_strlen) (const char *) = NULL;
++
++#ifdef ENABLE_GL_LOG
++static FILE *f = NULL;
++static int logger_pid = 0;
++
++#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
++
++void write_gl_debug_cmd_int(int my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(int), 1, f);
++ fflush(f);
++}
++
++void write_gl_debug_cmd_short(short my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(short), 1, f);
++ fflush(f);
++}
++
++static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
++{
++ write_gl_debug_init();
++ fwrite(&size, sizeof(int), 1, f);
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_without_size(
++ int size, void *buffer)
++{
++ write_gl_debug_init();
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++void write_gl_debug_end(void)
++{
++ write_gl_debug_init();
++ fclose(f);
++ f = NULL;
++ logger_pid = 0;
++ must_save = 0;
++}
++
++static inline int is_logging(int pid)
++{
++ return must_save && pid == logger_pid;
++}
++#endif
++
++#include <dlfcn.h>
++#include <signal.h>
++
++static void (*anticrash_handler) (void *) = NULL;
++static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
++
++void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
++{
++ static int counter = 0;
++
++ counter++;
++
++ printf("oops\n");
++
++ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
++ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
++ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
++ anticrash_handler(ptr);
++
++ counter--;
++}
++
++static int decode_call_int(CPUState *env, int func_number, int pid,
++ target_ulong target_ret_string,
++ target_ulong in_args, target_ulong in_args_size)
++{
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++ /* int has_out_parameters = signature->has_out_parameters; */
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++ int i;
++ int ret;
++ int *args_size = NULL;
++ target_ulong saved_out_ptr[50];
++ static char *ret_string = NULL;
++ static arg_t args[50];
++ static Display *dpy = NULL;
++
++ if (dpy == NULL) {
++ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
++
++ if (handle) {
++ anticrash_handler = dlsym(handle, "anticrash_handler");
++ if (anticrash_handler) {
++ fprintf(stderr, "anticrash handler enabled\n");
++ struct sigaction sigsegv_action;
++ struct sigaction old_sigsegv_action;
++
++ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
++ sigemptyset(&(sigsegv_action.sa_mask));
++ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
++ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
++ }
++ }
++ handle = dlopen("libgetstack.so", RTLD_LAZY);
++ if (handle) {
++ show_stack_from_signal_handler =
++ dlsym(handle, "show_stack_from_signal_handler");
++ }
++
++ dpy = XOpenDisplay(NULL);
++ init_process_tab();
++ ret_string = malloc(32768);
++ my_strlen = strlen;
++ }
++
++ if (unlikely(last_func_number == _exit_process_func &&
++ func_number == _exit_process_func)) {
++ last_func_number = -1;
++ return 0;
++ }
++
++ if (last_process_id != pid) {
++ do_context_switch(dpy, pid, func_number);
++ last_process_id = pid;
++ }
++
++ if (unlikely(func_number == _exit_process_func))
++ last_process_id = 0;
++
++ if (!wordsize) {
++ if (func_number == _init32_func || func_number == _init64_func) {
++ if (func_number == _init32_func) {
++ wordsize = 32;
++ argcpy_target_to_host = memcpy_target32_to_host;
++ } else {
++ wordsize = 64;
++ argcpy_target_to_host = memcpy_target64_to_host;
++ }
++ } else
++ fprintf(stderr, "commands submitted before initialisation done\n");
++ }
++
++ reset_host_offset();
++
++ if (nb_args) {
++
++ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
++ fprintf(stderr, "call %s pid=%d\n",
++ tab_opengl_calls_name[func_number], pid);
++ fprintf(stderr, "cannot get call parameters\n");
++ disconnect_current();
++ return 0;
++ }
++
++ args_size =
++ (int *) get_host_read_pointer(env, in_args_size,
++ sizeof(int) * nb_args);
++ if (args_size == NULL) {
++ fprintf(stderr, "call %s pid=%d\n",
++ tab_opengl_calls_name[func_number], pid);
++ fprintf(stderr, "cannot get call parameters size\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++
++ if (func_number == _serialized_calls_func) {
++ int command_buffer_size = args_size[0];
++ const void *command_buffer =
++ get_host_read_pointer(env, args[0], command_buffer_size);
++ int commmand_buffer_offset = 0;
++
++ args_size = NULL;
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(_serialized_calls_func);
++#endif
++
++ while (commmand_buffer_offset < command_buffer_size) {
++ func_number =
++ *(short *) (command_buffer + commmand_buffer_offset);
++ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
++ fprintf(stderr,
++ "func_number >= 0 && func_number < GL_N_CALLS failed at "
++ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
++ commmand_buffer_offset, command_buffer_size);
++ return 0;
++ }
++ commmand_buffer_offset += sizeof(short);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(func_number);
++#endif
++
++ signature = (Signature *) tab_opengl_calls[func_number];
++ ret_type = signature->ret_type;
++ assert(ret_type == TYPE_NONE);
++ nb_args = signature->nb_args;
++ args_type = signature->args_type;
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ {
++ args[i] =
++ *(int *) (command_buffer +
++ commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_int(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ int arg_size =
++ *(int *) (command_buffer +
++ commmand_buffer_offset);
++ commmand_buffer_offset += sizeof(int);
++
++ if (arg_size == 0) {
++ args[i] = 0;
++ } else {
++ args[i] =
++ (long) (command_buffer +
++ commmand_buffer_offset);
++ }
++
++ if (args[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ disconnect_current();
++ return 0;
++ }
++ } else {
++ if (arg_size == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ fprintf(stderr, "args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_with_size(arg_size,
++ (void *)
++ args[i]);
++#endif
++ commmand_buffer_offset += arg_size;
++
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ int arg_size =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] =
++ (arg_size) ? (long) (command_buffer +
++ commmand_buffer_offset) : 0;
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(arg_size,
++ (void *)
++ args[i]);
++#endif
++ commmand_buffer_offset += arg_size;
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ fprintf(stderr,
++ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args[i] =
++ (long) (command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(
++ tab_args_type_length[args_type[i]],
++ (void *) args[i]);
++#endif
++ commmand_buffer_offset +=
++ tab_args_type_length[args_type[i]];
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr,
++ "shouldn't happen : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ }
++ do_function_call(func_number, args, ret_string);
++ }
++
++ ret = 0;
++ } else {
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_short(func_number);
++#endif
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_int(args[i]);
++#endif
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ if (args[i] == 0 && args_size[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ } else if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
++ disconnect_current();
++ return 0;
++ } else if (args[i] != 0 && args_size[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ if (args[i]) {
++ args[i] =
++ (arg_t) get_host_read_pointer(env, args[i],
++ args_size[i]);
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ args_size[i]);
++ disconnect_current();
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_with_size(args_size[i],
++ (void *) args[i]);
++#endif
++ break;
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (arg_t)
++ get_host_read_pointer(env,
++ args[i], args_size [i]) : 0;
++ if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ args_size[i]);
++ disconnect_current();
++ return 0;
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size(args_size[i],
++ (void *) args[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ int mem_state;
++
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ switch (args_type[i]) {
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ write_gl_debug_cmd_int(args_size[i]);
++ break;
++
++ default:
++ break;
++ }
++#endif
++
++ if (func_number == glXQueryExtension_func && args[i] == 0) {
++ saved_out_ptr[i] = 0;
++ continue;
++ }
++ if (args[i] == 0 && args_size[i] == 0) {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i,
++ pid);
++ disconnect_current();
++ return 0;
++ }
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ } else if (args[i] == 0 && args_size[i] != 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr,
++ "args[i] == 0 && args_size[i] != 0 !!\n");
++ disconnect_current();
++ return 0;
++ } else if (args[i] != 0 && args_size[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr,
++ "args[i] != 0 && args_size[i] == 0 !!\n");
++ disconnect_current();
++ return 0;
++ }
++ if (args[i]) {
++ mem_state =
++ get_target_mem_state(env, args[i], args_size[i]);
++ if (mem_state == NOT_MAPPED) {
++ fprintf(stderr,
++ "call %s arg %d pid=%d addr="
++ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
++ tab_opengl_calls_name[func_number], i,
++ pid, args[i], args_size[i]);
++ disconnect_current();
++ return 0;
++ } else if (mem_state == MAPPED_CONTIGUOUS) {
++ saved_out_ptr[i] = 0;
++ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
++ } else {
++ saved_out_ptr[i] = args[i];
++ args[i] = (arg_t) malloc(args_size[i]);
++ }
++ } else {
++ saved_out_ptr[i] = 0;
++ }
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ tab_args_type_length[args_type[i]]);
++ disconnect_current();
++ return 0;
++ }
++ args[i] = (arg_t) get_host_read_pointer(env,
++ args[i], tab_args_type_length[args_type[i]]);
++ if (args[i] == 0) {
++ fprintf(stderr, "call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ fprintf(stderr, "can not get %d bytes\n",
++ tab_args_type_length[args_type[i]]);
++ disconnect_current();
++ return 0;
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid))
++ write_gl_debug_cmd_buffer_without_size
++ (tab_args_type_length[args_type[i]],
++ (void *) args[i]);
++#endif
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
++ tab_opengl_calls_name[func_number], i, pid);
++ disconnect_current();
++ return 0;
++ }
++ }
++
++ if (ret_type == TYPE_CONST_CHAR) {
++ ret_string[0] = 0;
++ }
++
++ if (func_number == _init32_func || func_number == _init64_func) {
++ if (func_number == _init32_func) {
++ if (wordsize != 32) {
++ fprintf(stderr,
++ "clients with different ABIs not supported\n");
++ exit(-1);
++ }
++ } else {
++ if (wordsize != 64) {
++ fprintf(stderr,
++ "clients with different ABIs not supported\n");
++ exit(-1);
++ }
++ }
++
++ if (must_save && args[0])
++ fprintf(stderr, "error: pid %i is already recording\n",
++ logger_pid);
++ else if (args[0]) {
++ logger_pid = pid;
++ must_save = 1;
++ }
++#ifdef USE_KQEMU
++ if (env->kqemu_enabled)
++ *(int *) args[1] = 2;
++ else
++#endif
++ *(int *) args[1] = 1;
++ ret = 0;
++ } else {
++ ret = do_function_call(func_number, args, ret_string);
++ }
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
++ write_gl_debug_cmd_int(ret);
++#endif
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ CASE_OUT_POINTERS:
++ {
++ if (saved_out_ptr[i]) {
++ if (memcpy_host_to_target(env, saved_out_ptr[i],
++ (void *) args[i],
++ args_size[i]) == 0) {
++ fprintf(stderr, "could not copy out parameters "
++ "back to user space\n");
++ disconnect_current();
++ return 0;
++ }
++ free((void *) args[i]);
++ }
++ break;
++ }
++
++ default:
++ break;
++ }
++ }
++
++ if (ret_type == TYPE_CONST_CHAR)
++ if (target_ret_string) {
++ /* the my_strlen stuff is a hack to workaround a GCC bug if
++ * using directly strlen... */
++ if (memcpy_host_to_target(env, target_ret_string, ret_string,
++ my_strlen(ret_string) + 1) == 0) {
++ fprintf(stderr, "cannot copy out parameters "
++ "back to user space\n");
++ disconnect_current();
++ return 0;
++ }
++ }
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (is_logging(pid) && func_number == _exit_process_func) {
++ write_gl_debug_end();
++ }
++#endif
++
++ return ret;
++}
++
++static int decode_call(CPUState *env, int func_number, int pid,
++ target_ulong target_ret_string, target_ulong in_args,
++ target_ulong in_args_size)
++{
++ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
++ fprintf(stderr,
++ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
++ return 0;
++ }
++
++ return decode_call_int(env, func_number, pid,
++ target_ret_string, in_args, in_args_size);
++}
++
++#define env first_cpu
++
++void helper_opengl(void)
++{
++ doing_opengl = 1;
++ env->regs[R_EAX] =
++ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
++ env->regs[R_EDX], env->regs[R_ESI]);
++ doing_opengl = 0;
++}
++
++void mem_opengl(uint64_t ptr)
++{
++ uint64_t *params = get_phys_mem_addr(env, ptr);
++ int ret;
++
++ /* Execute */
++ doing_opengl = 1;
++ ret = decode_call(env, le64_to_cpu(params[0]),
++ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
++ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
++ doing_opengl = 0;
++
++ params[0] = cpu_to_le64(ret);
++ params[5] = 0;
++}
++
++#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
++#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
++#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
++#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
++#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
++#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
++#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
++#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
++#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
++#define CRED_CAPINH_OFFSET 0x28
++#define CRED_CAPPER_OFFSET 0x30
++#define CRED_CAPEFF_OFFSET 0x38
++#define CRED_CAPBST_OFFSET 0x40
++/* How to obtain the numbers:
++ * $ gbd vmlinux
++ * ...
++ * (gdb) print &((struct task_struct *) 0)->real_cred
++ * $22 = (const struct cred **) 0x29c
++ * (gdb) print &((struct task_struct *) 0)->cred
++ * $23 = (const struct cred **) 0x2a0
++ * (gbd) ...
++ * ...
++ * (gdb) ^D
++ * $ vim target-i386/helper_opengl.c
++ * ...
++ * :wq
++ * $ make
++ * ...
++ *
++ * Testing:
++ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
++ * ^Z
++ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
++ * $ bg
++ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
++ * $ gdb
++ * ...
++ * (gdb) target remote localhost:1234
++ * ...
++ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
++ * 0x2c0
++ * $9 = 0xc094062c "swapper"
++ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
++ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
++ * $10 = 0xdf87cee0 "init"
++ * ...
++ */
++
++#define CAP_SYS_RAWIO 17
++
++#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
++static ram_addr_t x86_current_thread(void)
++{
++ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
++}
++
++static ram_addr_t x86_current_task(void)
++{
++ return *(uint32_t *) get_phys_mem_addr(env,
++ x86_current_thread() + THREADINFO_TASK_OFFSET);
++}
++
++static ram_addr_t x86_current_io_ctx(void)
++{
++ return *(uint32_t *) get_phys_mem_addr(env,
++ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
++}
++
++static ram_addr_t x86_task_name(ram_addr_t proc)
++{
++ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
++}
++
++static ram_addr_t x86_task_next(ram_addr_t proc)
++{
++ return *(uint32_t *) get_phys_mem_addr(env,
++ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
++ TASKSTRUCT_NEXT_OFFSET;
++}
++
++static void x86_cap_set(ram_addr_t caps, int cap)
++{
++ int offset = cap >> 5;
++ int mask = 1 << (cap & 31);
++
++ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
++}
++
++static void x86_cred_cap_set(ram_addr_t creds, int cap)
++{
++ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
++ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
++ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
++ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
++}
++
++static void x86_task_cap_set(ram_addr_t proc, int cap)
++{
++ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
++ proc + TASKSTRUCT_RCRED_OFFSET), cap);
++ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
++ proc + TASKSTRUCT_CRED_OFFSET), cap);
++}
++
++#include "kvm.h"
++
++/* The putting and getting of the register set seems to incure a too
++ * high overhead. It's at least 4 ioctl's each. */
++#if 0
++static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
++{
++ /* Ignore the first outb after iopl which is emulated by the kernel. */
++ if (val == (uint8_t) -1)
++ return;
++
++ if (kvm_enabled())
++ kvm_arch_get_registers(env);
++ doing_opengl = 1;
++ env->regs[R_EAX] =
++ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
++ env->regs[R_ESI], env->regs[R_EDI]);
++ doing_opengl = 0;
++ if (kvm_enabled())
++ kvm_arch_put_registers(env);
++}
++#else
++static void get_regs(void)
++{
++ /* We only really need the eflags and cr[0..4] */
++ if (kvm_enabled())
++ kvm_get_sregs(env);
++}
++
++static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
++{
++ uint64_t *params;
++ int ret;
++
++ /* Only need to fetch the registers after a guest's context switch...
++ * the problem is, to find out about context switches we already need
++ * to fetch rsp
++ * TODO: pass the pid in val. the params pointer doesn't need to be
++ * passed on all calls because it can be a global and be constant.
++ */
++ get_regs();
++
++ params = get_phys_mem_addr(env, (target_ulong) val);
++
++ /* Execute */
++ doing_opengl = 1;
++ ret = decode_call(env, le64_to_cpu(params[0]),
++ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
++ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
++ doing_opengl = 0;
++
++ params[0] = cpu_to_le64(ret);
++ params[5] = 0;
++}
++#endif
++
++static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
++{
++ if (val != (uint32_t) -1)
++ return;
++
++ /* Ignore the first outb after iopl which is emulated by the kernel. */
++
++ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
++}
++
++void io_register(void)
++{
++ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
++}
++
++void opengl_process_enable(void)
++{
++ ram_addr_t task;
++ char *name;
++ int newlevel = 3;
++ uint32_t iopl = newlevel << 12;
++ void *ioplptr;
++
++ if (kvm_enabled())
++ kvm_arch_get_registers(env);
++ allow_kernel = 1;
++
++ task = x86_current_task();
++ x86_task_cap_set(task, CAP_SYS_RAWIO);
++ name = get_phys_mem_addr(env, x86_task_name(task));
++
++ ioplptr = get_phys_mem_addr(env, task +
++ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
++ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
++
++ env->eflags &= ~0x3000;
++ env->eflags |= newlevel << 12;
++
++ allow_kernel = 0;
++ if (kvm_enabled())
++ kvm_arch_put_registers(env);
++
++ printf("Granted OpenGL access to process '%s'\n", name);
++
++ io_register();
++}
++#endif
+Index: qemu-0.12.4/target-i386/kvm.c
+===================================================================
+--- qemu-0.12.4.orig/target-i386/kvm.c
++++ qemu-0.12.4/target-i386/kvm.c
+@@ -529,7 +529,7 @@ static int kvm_get_fpu(CPUState *env)
+ return 0;
+ }
+
+-static int kvm_get_sregs(CPUState *env)
++int kvm_get_sregs(CPUState *env)
+ {
+ struct kvm_sregs sregs;
+ uint32_t hflags;
+Index: qemu-0.12.4/target-i386/mesa_enums.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_enums.c
+@@ -0,0 +1,4890 @@
++/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
++
++/*
++ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
++ * All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sub license,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL,
++ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
++ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#include "glheader.h"
++#include "enums.h"
++#include "imports.h"
++
++typedef struct {
++ size_t offset;
++ int n;
++} enum_elt;
++
++LONGSTRING static const char enum_string_table[] =
++ "GL_2D\0"
++ "GL_2_BYTES\0"
++ "GL_3D\0"
++ "GL_3D_COLOR\0"
++ "GL_3D_COLOR_TEXTURE\0"
++ "GL_3_BYTES\0"
++ "GL_4D_COLOR_TEXTURE\0"
++ "GL_4_BYTES\0"
++ "GL_ACCUM\0"
++ "GL_ACCUM_ALPHA_BITS\0"
++ "GL_ACCUM_BLUE_BITS\0"
++ "GL_ACCUM_BUFFER_BIT\0"
++ "GL_ACCUM_CLEAR_VALUE\0"
++ "GL_ACCUM_GREEN_BITS\0"
++ "GL_ACCUM_RED_BITS\0"
++ "GL_ACTIVE_ATTRIBUTES\0"
++ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
++ "GL_ACTIVE_STENCIL_FACE_EXT\0"
++ "GL_ACTIVE_TEXTURE\0"
++ "GL_ACTIVE_TEXTURE_ARB\0"
++ "GL_ACTIVE_UNIFORMS\0"
++ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
++ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
++ "GL_ADD\0"
++ "GL_ADD_SIGNED\0"
++ "GL_ADD_SIGNED_ARB\0"
++ "GL_ADD_SIGNED_EXT\0"
++ "GL_ALIASED_LINE_WIDTH_RANGE\0"
++ "GL_ALIASED_POINT_SIZE_RANGE\0"
++ "GL_ALL_ATTRIB_BITS\0"
++ "GL_ALL_CLIENT_ATTRIB_BITS\0"
++ "GL_ALPHA\0"
++ "GL_ALPHA12\0"
++ "GL_ALPHA12_EXT\0"
++ "GL_ALPHA16\0"
++ "GL_ALPHA16_EXT\0"
++ "GL_ALPHA4\0"
++ "GL_ALPHA4_EXT\0"
++ "GL_ALPHA8\0"
++ "GL_ALPHA8_EXT\0"
++ "GL_ALPHA_BIAS\0"
++ "GL_ALPHA_BITS\0"
++ "GL_ALPHA_SCALE\0"
++ "GL_ALPHA_TEST\0"
++ "GL_ALPHA_TEST_FUNC\0"
++ "GL_ALPHA_TEST_REF\0"
++ "GL_ALWAYS\0"
++ "GL_AMBIENT\0"
++ "GL_AMBIENT_AND_DIFFUSE\0"
++ "GL_AND\0"
++ "GL_AND_INVERTED\0"
++ "GL_AND_REVERSE\0"
++ "GL_ARRAY_BUFFER\0"
++ "GL_ARRAY_BUFFER_ARB\0"
++ "GL_ARRAY_BUFFER_BINDING\0"
++ "GL_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_ATTACHED_SHADERS\0"
++ "GL_ATTRIB_ARRAY_POINTER_NV\0"
++ "GL_ATTRIB_ARRAY_SIZE_NV\0"
++ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
++ "GL_ATTRIB_ARRAY_TYPE_NV\0"
++ "GL_ATTRIB_STACK_DEPTH\0"
++ "GL_AUTO_NORMAL\0"
++ "GL_AUX0\0"
++ "GL_AUX1\0"
++ "GL_AUX2\0"
++ "GL_AUX3\0"
++ "GL_AUX_BUFFERS\0"
++ "GL_BACK\0"
++ "GL_BACK_LEFT\0"
++ "GL_BACK_RIGHT\0"
++ "GL_BGR\0"
++ "GL_BGRA\0"
++ "GL_BITMAP\0"
++ "GL_BITMAP_TOKEN\0"
++ "GL_BLEND\0"
++ "GL_BLEND_COLOR\0"
++ "GL_BLEND_COLOR_EXT\0"
++ "GL_BLEND_DST\0"
++ "GL_BLEND_DST_ALPHA\0"
++ "GL_BLEND_DST_RGB\0"
++ "GL_BLEND_EQUATION\0"
++ "GL_BLEND_EQUATION_ALPHA\0"
++ "GL_BLEND_EQUATION_ALPHA_EXT\0"
++ "GL_BLEND_EQUATION_EXT\0"
++ "GL_BLEND_EQUATION_RGB_EXT\0"
++ "GL_BLEND_SRC\0"
++ "GL_BLEND_SRC_ALPHA\0"
++ "GL_BLEND_SRC_RGB\0"
++ "GL_BLUE\0"
++ "GL_BLUE_BIAS\0"
++ "GL_BLUE_BITS\0"
++ "GL_BLUE_SCALE\0"
++ "GL_BOOL\0"
++ "GL_BOOL_ARB\0"
++ "GL_BOOL_VEC2\0"
++ "GL_BOOL_VEC2_ARB\0"
++ "GL_BOOL_VEC3\0"
++ "GL_BOOL_VEC3_ARB\0"
++ "GL_BOOL_VEC4\0"
++ "GL_BOOL_VEC4_ARB\0"
++ "GL_BUFFER_ACCESS\0"
++ "GL_BUFFER_ACCESS_ARB\0"
++ "GL_BUFFER_MAPPED\0"
++ "GL_BUFFER_MAPPED_ARB\0"
++ "GL_BUFFER_MAP_POINTER\0"
++ "GL_BUFFER_MAP_POINTER_ARB\0"
++ "GL_BUFFER_SIZE\0"
++ "GL_BUFFER_SIZE_ARB\0"
++ "GL_BUFFER_USAGE\0"
++ "GL_BUFFER_USAGE_ARB\0"
++ "GL_BYTE\0"
++ "GL_C3F_V3F\0"
++ "GL_C4F_N3F_V3F\0"
++ "GL_C4UB_V2F\0"
++ "GL_C4UB_V3F\0"
++ "GL_CCW\0"
++ "GL_CLAMP\0"
++ "GL_CLAMP_TO_BORDER\0"
++ "GL_CLAMP_TO_BORDER_ARB\0"
++ "GL_CLAMP_TO_BORDER_SGIS\0"
++ "GL_CLAMP_TO_EDGE\0"
++ "GL_CLAMP_TO_EDGE_SGIS\0"
++ "GL_CLEAR\0"
++ "GL_CLIENT_ACTIVE_TEXTURE\0"
++ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
++ "GL_CLIENT_ALL_ATTRIB_BITS\0"
++ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
++ "GL_CLIENT_PIXEL_STORE_BIT\0"
++ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
++ "GL_CLIP_PLANE0\0"
++ "GL_CLIP_PLANE1\0"
++ "GL_CLIP_PLANE2\0"
++ "GL_CLIP_PLANE3\0"
++ "GL_CLIP_PLANE4\0"
++ "GL_CLIP_PLANE5\0"
++ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
++ "GL_COEFF\0"
++ "GL_COLOR\0"
++ "GL_COLOR_ARRAY\0"
++ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
++ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_COLOR_ARRAY_POINTER\0"
++ "GL_COLOR_ARRAY_SIZE\0"
++ "GL_COLOR_ARRAY_STRIDE\0"
++ "GL_COLOR_ARRAY_TYPE\0"
++ "GL_COLOR_ATTACHMENT0_EXT\0"
++ "GL_COLOR_ATTACHMENT10_EXT\0"
++ "GL_COLOR_ATTACHMENT11_EXT\0"
++ "GL_COLOR_ATTACHMENT12_EXT\0"
++ "GL_COLOR_ATTACHMENT13_EXT\0"
++ "GL_COLOR_ATTACHMENT14_EXT\0"
++ "GL_COLOR_ATTACHMENT15_EXT\0"
++ "GL_COLOR_ATTACHMENT1_EXT\0"
++ "GL_COLOR_ATTACHMENT2_EXT\0"
++ "GL_COLOR_ATTACHMENT3_EXT\0"
++ "GL_COLOR_ATTACHMENT4_EXT\0"
++ "GL_COLOR_ATTACHMENT5_EXT\0"
++ "GL_COLOR_ATTACHMENT6_EXT\0"
++ "GL_COLOR_ATTACHMENT7_EXT\0"
++ "GL_COLOR_ATTACHMENT8_EXT\0"
++ "GL_COLOR_ATTACHMENT9_EXT\0"
++ "GL_COLOR_BUFFER_BIT\0"
++ "GL_COLOR_CLEAR_VALUE\0"
++ "GL_COLOR_INDEX\0"
++ "GL_COLOR_INDEXES\0"
++ "GL_COLOR_LOGIC_OP\0"
++ "GL_COLOR_MATERIAL\0"
++ "GL_COLOR_MATERIAL_FACE\0"
++ "GL_COLOR_MATERIAL_PARAMETER\0"
++ "GL_COLOR_MATRIX\0"
++ "GL_COLOR_MATRIX_SGI\0"
++ "GL_COLOR_MATRIX_STACK_DEPTH\0"
++ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
++ "GL_COLOR_SUM\0"
++ "GL_COLOR_SUM_ARB\0"
++ "GL_COLOR_TABLE\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
++ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
++ "GL_COLOR_TABLE_BIAS\0"
++ "GL_COLOR_TABLE_BIAS_SGI\0"
++ "GL_COLOR_TABLE_BLUE_SIZE\0"
++ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
++ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
++ "GL_COLOR_TABLE_FORMAT\0"
++ "GL_COLOR_TABLE_FORMAT_EXT\0"
++ "GL_COLOR_TABLE_FORMAT_SGI\0"
++ "GL_COLOR_TABLE_GREEN_SIZE\0"
++ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
++ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
++ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
++ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
++ "GL_COLOR_TABLE_RED_SIZE\0"
++ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
++ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
++ "GL_COLOR_TABLE_SCALE\0"
++ "GL_COLOR_TABLE_SCALE_SGI\0"
++ "GL_COLOR_TABLE_WIDTH\0"
++ "GL_COLOR_TABLE_WIDTH_EXT\0"
++ "GL_COLOR_TABLE_WIDTH_SGI\0"
++ "GL_COLOR_WRITEMASK\0"
++ "GL_COMBINE\0"
++ "GL_COMBINE4\0"
++ "GL_COMBINE_ALPHA\0"
++ "GL_COMBINE_ALPHA_ARB\0"
++ "GL_COMBINE_ALPHA_EXT\0"
++ "GL_COMBINE_ARB\0"
++ "GL_COMBINE_EXT\0"
++ "GL_COMBINE_RGB\0"
++ "GL_COMBINE_RGB_ARB\0"
++ "GL_COMBINE_RGB_EXT\0"
++ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
++ "GL_COMPARE_R_TO_TEXTURE\0"
++ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
++ "GL_COMPILE\0"
++ "GL_COMPILE_AND_EXECUTE\0"
++ "GL_COMPILE_STATUS\0"
++ "GL_COMPRESSED_ALPHA\0"
++ "GL_COMPRESSED_ALPHA_ARB\0"
++ "GL_COMPRESSED_INTENSITY\0"
++ "GL_COMPRESSED_INTENSITY_ARB\0"
++ "GL_COMPRESSED_LUMINANCE\0"
++ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
++ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
++ "GL_COMPRESSED_LUMINANCE_ARB\0"
++ "GL_COMPRESSED_RGB\0"
++ "GL_COMPRESSED_RGBA\0"
++ "GL_COMPRESSED_RGBA_ARB\0"
++ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
++ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
++ "GL_COMPRESSED_RGB_ARB\0"
++ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
++ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
++ "GL_COMPRESSED_TEXTURE_FORMATS\0"
++ "GL_CONSTANT\0"
++ "GL_CONSTANT_ALPHA\0"
++ "GL_CONSTANT_ALPHA_EXT\0"
++ "GL_CONSTANT_ARB\0"
++ "GL_CONSTANT_ATTENUATION\0"
++ "GL_CONSTANT_BORDER_HP\0"
++ "GL_CONSTANT_COLOR\0"
++ "GL_CONSTANT_COLOR_EXT\0"
++ "GL_CONSTANT_EXT\0"
++ "GL_CONVOLUTION_1D\0"
++ "GL_CONVOLUTION_2D\0"
++ "GL_CONVOLUTION_BORDER_COLOR\0"
++ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
++ "GL_CONVOLUTION_BORDER_MODE\0"
++ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
++ "GL_CONVOLUTION_FILTER_BIAS\0"
++ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
++ "GL_CONVOLUTION_FILTER_SCALE\0"
++ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
++ "GL_CONVOLUTION_FORMAT\0"
++ "GL_CONVOLUTION_FORMAT_EXT\0"
++ "GL_CONVOLUTION_HEIGHT\0"
++ "GL_CONVOLUTION_HEIGHT_EXT\0"
++ "GL_CONVOLUTION_WIDTH\0"
++ "GL_CONVOLUTION_WIDTH_EXT\0"
++ "GL_COORD_REPLACE\0"
++ "GL_COORD_REPLACE_ARB\0"
++ "GL_COORD_REPLACE_NV\0"
++ "GL_COPY\0"
++ "GL_COPY_INVERTED\0"
++ "GL_COPY_PIXEL_TOKEN\0"
++ "GL_CULL_FACE\0"
++ "GL_CULL_FACE_MODE\0"
++ "GL_CULL_VERTEX_EXT\0"
++ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
++ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
++ "GL_CURRENT_ATTRIB_NV\0"
++ "GL_CURRENT_BIT\0"
++ "GL_CURRENT_COLOR\0"
++ "GL_CURRENT_FOG_COORD\0"
++ "GL_CURRENT_FOG_COORDINATE\0"
++ "GL_CURRENT_INDEX\0"
++ "GL_CURRENT_MATRIX_ARB\0"
++ "GL_CURRENT_MATRIX_INDEX_ARB\0"
++ "GL_CURRENT_MATRIX_NV\0"
++ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
++ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
++ "GL_CURRENT_NORMAL\0"
++ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
++ "GL_CURRENT_PROGRAM\0"
++ "GL_CURRENT_QUERY\0"
++ "GL_CURRENT_QUERY_ARB\0"
++ "GL_CURRENT_RASTER_COLOR\0"
++ "GL_CURRENT_RASTER_DISTANCE\0"
++ "GL_CURRENT_RASTER_INDEX\0"
++ "GL_CURRENT_RASTER_POSITION\0"
++ "GL_CURRENT_RASTER_POSITION_VALID\0"
++ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
++ "GL_CURRENT_SECONDARY_COLOR\0"
++ "GL_CURRENT_TEXTURE_COORDS\0"
++ "GL_CURRENT_VERTEX_ATTRIB\0"
++ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
++ "GL_CURRENT_WEIGHT_ARB\0"
++ "GL_CW\0"
++ "GL_DEBUG_ASSERT_MESA\0"
++ "GL_DEBUG_OBJECT_MESA\0"
++ "GL_DEBUG_PRINT_MESA\0"
++ "GL_DECAL\0"
++ "GL_DECR\0"
++ "GL_DECR_WRAP\0"
++ "GL_DECR_WRAP_EXT\0"
++ "GL_DELETE_STATUS\0"
++ "GL_DEPTH\0"
++ "GL_DEPTH_ATTACHMENT_EXT\0"
++ "GL_DEPTH_BIAS\0"
++ "GL_DEPTH_BITS\0"
++ "GL_DEPTH_BOUNDS_EXT\0"
++ "GL_DEPTH_BOUNDS_TEST_EXT\0"
++ "GL_DEPTH_BUFFER_BIT\0"
++ "GL_DEPTH_CLAMP_NV\0"
++ "GL_DEPTH_CLEAR_VALUE\0"
++ "GL_DEPTH_COMPONENT\0"
++ "GL_DEPTH_COMPONENT16\0"
++ "GL_DEPTH_COMPONENT16_ARB\0"
++ "GL_DEPTH_COMPONENT16_SGIX\0"
++ "GL_DEPTH_COMPONENT24\0"
++ "GL_DEPTH_COMPONENT24_ARB\0"
++ "GL_DEPTH_COMPONENT24_SGIX\0"
++ "GL_DEPTH_COMPONENT32\0"
++ "GL_DEPTH_COMPONENT32_ARB\0"
++ "GL_DEPTH_COMPONENT32_SGIX\0"
++ "GL_DEPTH_FUNC\0"
++ "GL_DEPTH_RANGE\0"
++ "GL_DEPTH_SCALE\0"
++ "GL_DEPTH_STENCIL_NV\0"
++ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
++ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
++ "GL_DEPTH_TEST\0"
++ "GL_DEPTH_TEXTURE_MODE\0"
++ "GL_DEPTH_TEXTURE_MODE_ARB\0"
++ "GL_DEPTH_WRITEMASK\0"
++ "GL_DIFFUSE\0"
++ "GL_DITHER\0"
++ "GL_DOMAIN\0"
++ "GL_DONT_CARE\0"
++ "GL_DOT3_RGB\0"
++ "GL_DOT3_RGBA\0"
++ "GL_DOT3_RGBA_ARB\0"
++ "GL_DOT3_RGBA_EXT\0"
++ "GL_DOT3_RGB_ARB\0"
++ "GL_DOT3_RGB_EXT\0"
++ "GL_DOUBLE\0"
++ "GL_DOUBLEBUFFER\0"
++ "GL_DRAW_BUFFER\0"
++ "GL_DRAW_BUFFER0\0"
++ "GL_DRAW_BUFFER0_ARB\0"
++ "GL_DRAW_BUFFER0_ATI\0"
++ "GL_DRAW_BUFFER1\0"
++ "GL_DRAW_BUFFER10\0"
++ "GL_DRAW_BUFFER10_ARB\0"
++ "GL_DRAW_BUFFER10_ATI\0"
++ "GL_DRAW_BUFFER11\0"
++ "GL_DRAW_BUFFER11_ARB\0"
++ "GL_DRAW_BUFFER11_ATI\0"
++ "GL_DRAW_BUFFER12\0"
++ "GL_DRAW_BUFFER12_ARB\0"
++ "GL_DRAW_BUFFER12_ATI\0"
++ "GL_DRAW_BUFFER13\0"
++ "GL_DRAW_BUFFER13_ARB\0"
++ "GL_DRAW_BUFFER13_ATI\0"
++ "GL_DRAW_BUFFER14\0"
++ "GL_DRAW_BUFFER14_ARB\0"
++ "GL_DRAW_BUFFER14_ATI\0"
++ "GL_DRAW_BUFFER15\0"
++ "GL_DRAW_BUFFER15_ARB\0"
++ "GL_DRAW_BUFFER15_ATI\0"
++ "GL_DRAW_BUFFER1_ARB\0"
++ "GL_DRAW_BUFFER1_ATI\0"
++ "GL_DRAW_BUFFER2\0"
++ "GL_DRAW_BUFFER2_ARB\0"
++ "GL_DRAW_BUFFER2_ATI\0"
++ "GL_DRAW_BUFFER3\0"
++ "GL_DRAW_BUFFER3_ARB\0"
++ "GL_DRAW_BUFFER3_ATI\0"
++ "GL_DRAW_BUFFER4\0"
++ "GL_DRAW_BUFFER4_ARB\0"
++ "GL_DRAW_BUFFER4_ATI\0"
++ "GL_DRAW_BUFFER5\0"
++ "GL_DRAW_BUFFER5_ARB\0"
++ "GL_DRAW_BUFFER5_ATI\0"
++ "GL_DRAW_BUFFER6\0"
++ "GL_DRAW_BUFFER6_ARB\0"
++ "GL_DRAW_BUFFER6_ATI\0"
++ "GL_DRAW_BUFFER7\0"
++ "GL_DRAW_BUFFER7_ARB\0"
++ "GL_DRAW_BUFFER7_ATI\0"
++ "GL_DRAW_BUFFER8\0"
++ "GL_DRAW_BUFFER8_ARB\0"
++ "GL_DRAW_BUFFER8_ATI\0"
++ "GL_DRAW_BUFFER9\0"
++ "GL_DRAW_BUFFER9_ARB\0"
++ "GL_DRAW_BUFFER9_ATI\0"
++ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_DRAW_FRAMEBUFFER_EXT\0"
++ "GL_DRAW_PIXEL_TOKEN\0"
++ "GL_DST_ALPHA\0"
++ "GL_DST_COLOR\0"
++ "GL_DYNAMIC_COPY\0"
++ "GL_DYNAMIC_COPY_ARB\0"
++ "GL_DYNAMIC_DRAW\0"
++ "GL_DYNAMIC_DRAW_ARB\0"
++ "GL_DYNAMIC_READ\0"
++ "GL_DYNAMIC_READ_ARB\0"
++ "GL_EDGE_FLAG\0"
++ "GL_EDGE_FLAG_ARRAY\0"
++ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
++ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_EDGE_FLAG_ARRAY_POINTER\0"
++ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
++ "GL_ELEMENT_ARRAY_BUFFER\0"
++ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
++ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
++ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_EMISSION\0"
++ "GL_ENABLE_BIT\0"
++ "GL_EQUAL\0"
++ "GL_EQUIV\0"
++ "GL_EVAL_BIT\0"
++ "GL_EXP\0"
++ "GL_EXP2\0"
++ "GL_EXTENSIONS\0"
++ "GL_EYE_LINEAR\0"
++ "GL_EYE_PLANE\0"
++ "GL_EYE_PLANE_ABSOLUTE_NV\0"
++ "GL_EYE_RADIAL_NV\0"
++ "GL_FALSE\0"
++ "GL_FASTEST\0"
++ "GL_FEEDBACK\0"
++ "GL_FEEDBACK_BUFFER_POINTER\0"
++ "GL_FEEDBACK_BUFFER_SIZE\0"
++ "GL_FEEDBACK_BUFFER_TYPE\0"
++ "GL_FILL\0"
++ "GL_FLAT\0"
++ "GL_FLOAT\0"
++ "GL_FLOAT_MAT2\0"
++ "GL_FLOAT_MAT2_ARB\0"
++ "GL_FLOAT_MAT3\0"
++ "GL_FLOAT_MAT3_ARB\0"
++ "GL_FLOAT_MAT4\0"
++ "GL_FLOAT_MAT4_ARB\0"
++ "GL_FLOAT_VEC2\0"
++ "GL_FLOAT_VEC2_ARB\0"
++ "GL_FLOAT_VEC3\0"
++ "GL_FLOAT_VEC3_ARB\0"
++ "GL_FLOAT_VEC4\0"
++ "GL_FLOAT_VEC4_ARB\0"
++ "GL_FOG\0"
++ "GL_FOG_BIT\0"
++ "GL_FOG_COLOR\0"
++ "GL_FOG_COORD\0"
++ "GL_FOG_COORDINATE\0"
++ "GL_FOG_COORDINATE_ARRAY\0"
++ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
++ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
++ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
++ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
++ "GL_FOG_COORDINATE_SOURCE\0"
++ "GL_FOG_COORD_ARRAY\0"
++ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
++ "GL_FOG_COORD_ARRAY_POINTER\0"
++ "GL_FOG_COORD_ARRAY_STRIDE\0"
++ "GL_FOG_COORD_ARRAY_TYPE\0"
++ "GL_FOG_COORD_SRC\0"
++ "GL_FOG_DENSITY\0"
++ "GL_FOG_DISTANCE_MODE_NV\0"
++ "GL_FOG_END\0"
++ "GL_FOG_HINT\0"
++ "GL_FOG_INDEX\0"
++ "GL_FOG_MODE\0"
++ "GL_FOG_OFFSET_SGIX\0"
++ "GL_FOG_OFFSET_VALUE_SGIX\0"
++ "GL_FOG_START\0"
++ "GL_FRAGMENT_DEPTH\0"
++ "GL_FRAGMENT_PROGRAM_ARB\0"
++ "GL_FRAGMENT_SHADER\0"
++ "GL_FRAGMENT_SHADER_ARB\0"
++ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
++ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
++ "GL_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
++ "GL_FRAMEBUFFER_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
++ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
++ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
++ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
++ "GL_FRONT\0"
++ "GL_FRONT_AND_BACK\0"
++ "GL_FRONT_FACE\0"
++ "GL_FRONT_LEFT\0"
++ "GL_FRONT_RIGHT\0"
++ "GL_FUNC_ADD\0"
++ "GL_FUNC_ADD_EXT\0"
++ "GL_FUNC_REVERSE_SUBTRACT\0"
++ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
++ "GL_FUNC_SUBTRACT\0"
++ "GL_FUNC_SUBTRACT_EXT\0"
++ "GL_GENERATE_MIPMAP\0"
++ "GL_GENERATE_MIPMAP_HINT\0"
++ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
++ "GL_GENERATE_MIPMAP_SGIS\0"
++ "GL_GEQUAL\0"
++ "GL_GL_BLEND_EQUATION_RGB\0"
++ "GL_GL_COMPRESSED_SLUMINANCE\0"
++ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
++ "GL_GL_COMPRESSED_SRGB\0"
++ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
++ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
++ "GL_GL_FLOAT_MAT2x3\0"
++ "GL_GL_FLOAT_MAT2x4\0"
++ "GL_GL_FLOAT_MAT3x2\0"
++ "GL_GL_FLOAT_MAT3x4\0"
++ "GL_GL_FLOAT_MAT4x2\0"
++ "GL_GL_FLOAT_MAT4x3\0"
++ "GL_GL_PIXEL_PACK_BUFFER\0"
++ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
++ "GL_GL_PIXEL_UNPACK_BUFFER\0"
++ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
++ "GL_GL_SLUMINANCE\0"
++ "GL_GL_SLUMINANCE8\0"
++ "GL_GL_SLUMINANCE8_ALPHA8\0"
++ "GL_GL_SLUMINANCE_ALPHA\0"
++ "GL_GL_SRGB\0"
++ "GL_GL_SRGB8\0"
++ "GL_GL_SRGB8_ALPHA8\0"
++ "GL_GL_SRGB_ALPHA\0"
++ "GL_GREATER\0"
++ "GL_GREEN\0"
++ "GL_GREEN_BIAS\0"
++ "GL_GREEN_BITS\0"
++ "GL_GREEN_SCALE\0"
++ "GL_HINT_BIT\0"
++ "GL_HISTOGRAM\0"
++ "GL_HISTOGRAM_ALPHA_SIZE\0"
++ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
++ "GL_HISTOGRAM_BLUE_SIZE\0"
++ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
++ "GL_HISTOGRAM_EXT\0"
++ "GL_HISTOGRAM_FORMAT\0"
++ "GL_HISTOGRAM_FORMAT_EXT\0"
++ "GL_HISTOGRAM_GREEN_SIZE\0"
++ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
++ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
++ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
++ "GL_HISTOGRAM_RED_SIZE\0"
++ "GL_HISTOGRAM_RED_SIZE_EXT\0"
++ "GL_HISTOGRAM_SINK\0"
++ "GL_HISTOGRAM_SINK_EXT\0"
++ "GL_HISTOGRAM_WIDTH\0"
++ "GL_HISTOGRAM_WIDTH_EXT\0"
++ "GL_IDENTITY_NV\0"
++ "GL_IGNORE_BORDER_HP\0"
++ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
++ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
++ "GL_INCR\0"
++ "GL_INCR_WRAP\0"
++ "GL_INCR_WRAP_EXT\0"
++ "GL_INDEX_ARRAY\0"
++ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
++ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_INDEX_ARRAY_POINTER\0"
++ "GL_INDEX_ARRAY_STRIDE\0"
++ "GL_INDEX_ARRAY_TYPE\0"
++ "GL_INDEX_BITS\0"
++ "GL_INDEX_CLEAR_VALUE\0"
++ "GL_INDEX_LOGIC_OP\0"
++ "GL_INDEX_MODE\0"
++ "GL_INDEX_OFFSET\0"
++ "GL_INDEX_SHIFT\0"
++ "GL_INDEX_WRITEMASK\0"
++ "GL_INFO_LOG_LENGTH\0"
++ "GL_INT\0"
++ "GL_INTENSITY\0"
++ "GL_INTENSITY12\0"
++ "GL_INTENSITY12_EXT\0"
++ "GL_INTENSITY16\0"
++ "GL_INTENSITY16_EXT\0"
++ "GL_INTENSITY4\0"
++ "GL_INTENSITY4_EXT\0"
++ "GL_INTENSITY8\0"
++ "GL_INTENSITY8_EXT\0"
++ "GL_INTENSITY_EXT\0"
++ "GL_INTERPOLATE\0"
++ "GL_INTERPOLATE_ARB\0"
++ "GL_INTERPOLATE_EXT\0"
++ "GL_INT_VEC2\0"
++ "GL_INT_VEC2_ARB\0"
++ "GL_INT_VEC3\0"
++ "GL_INT_VEC3_ARB\0"
++ "GL_INT_VEC4\0"
++ "GL_INT_VEC4_ARB\0"
++ "GL_INVALID_ENUM\0"
++ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
++ "GL_INVALID_OPERATION\0"
++ "GL_INVALID_VALUE\0"
++ "GL_INVERSE_NV\0"
++ "GL_INVERSE_TRANSPOSE_NV\0"
++ "GL_INVERT\0"
++ "GL_KEEP\0"
++ "GL_LEFT\0"
++ "GL_LEQUAL\0"
++ "GL_LESS\0"
++ "GL_LIGHT0\0"
++ "GL_LIGHT1\0"
++ "GL_LIGHT2\0"
++ "GL_LIGHT3\0"
++ "GL_LIGHT4\0"
++ "GL_LIGHT5\0"
++ "GL_LIGHT6\0"
++ "GL_LIGHT7\0"
++ "GL_LIGHTING\0"
++ "GL_LIGHTING_BIT\0"
++ "GL_LIGHT_MODEL_AMBIENT\0"
++ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
++ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
++ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
++ "GL_LIGHT_MODEL_TWO_SIDE\0"
++ "GL_LINE\0"
++ "GL_LINEAR\0"
++ "GL_LINEAR_ATTENUATION\0"
++ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
++ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
++ "GL_LINEAR_MIPMAP_LINEAR\0"
++ "GL_LINEAR_MIPMAP_NEAREST\0"
++ "GL_LINES\0"
++ "GL_LINE_BIT\0"
++ "GL_LINE_LOOP\0"
++ "GL_LINE_RESET_TOKEN\0"
++ "GL_LINE_SMOOTH\0"
++ "GL_LINE_SMOOTH_HINT\0"
++ "GL_LINE_STIPPLE\0"
++ "GL_LINE_STIPPLE_PATTERN\0"
++ "GL_LINE_STIPPLE_REPEAT\0"
++ "GL_LINE_STRIP\0"
++ "GL_LINE_TOKEN\0"
++ "GL_LINE_WIDTH\0"
++ "GL_LINE_WIDTH_GRANULARITY\0"
++ "GL_LINE_WIDTH_RANGE\0"
++ "GL_LINK_STATUS\0"
++ "GL_LIST_BASE\0"
++ "GL_LIST_BIT\0"
++ "GL_LIST_INDEX\0"
++ "GL_LIST_MODE\0"
++ "GL_LOAD\0"
++ "GL_LOGIC_OP\0"
++ "GL_LOGIC_OP_MODE\0"
++ "GL_LOWER_LEFT\0"
++ "GL_LUMINANCE\0"
++ "GL_LUMINANCE12\0"
++ "GL_LUMINANCE12_ALPHA12\0"
++ "GL_LUMINANCE12_ALPHA12_EXT\0"
++ "GL_LUMINANCE12_ALPHA4\0"
++ "GL_LUMINANCE12_ALPHA4_EXT\0"
++ "GL_LUMINANCE12_EXT\0"
++ "GL_LUMINANCE16\0"
++ "GL_LUMINANCE16_ALPHA16\0"
++ "GL_LUMINANCE16_ALPHA16_EXT\0"
++ "GL_LUMINANCE16_EXT\0"
++ "GL_LUMINANCE4\0"
++ "GL_LUMINANCE4_ALPHA4\0"
++ "GL_LUMINANCE4_ALPHA4_EXT\0"
++ "GL_LUMINANCE4_EXT\0"
++ "GL_LUMINANCE6_ALPHA2\0"
++ "GL_LUMINANCE6_ALPHA2_EXT\0"
++ "GL_LUMINANCE8\0"
++ "GL_LUMINANCE8_ALPHA8\0"
++ "GL_LUMINANCE8_ALPHA8_EXT\0"
++ "GL_LUMINANCE8_EXT\0"
++ "GL_LUMINANCE_ALPHA\0"
++ "GL_MAP1_COLOR_4\0"
++ "GL_MAP1_GRID_DOMAIN\0"
++ "GL_MAP1_GRID_SEGMENTS\0"
++ "GL_MAP1_INDEX\0"
++ "GL_MAP1_NORMAL\0"
++ "GL_MAP1_TEXTURE_COORD_1\0"
++ "GL_MAP1_TEXTURE_COORD_2\0"
++ "GL_MAP1_TEXTURE_COORD_3\0"
++ "GL_MAP1_TEXTURE_COORD_4\0"
++ "GL_MAP1_VERTEX_3\0"
++ "GL_MAP1_VERTEX_4\0"
++ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
++ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
++ "GL_MAP2_COLOR_4\0"
++ "GL_MAP2_GRID_DOMAIN\0"
++ "GL_MAP2_GRID_SEGMENTS\0"
++ "GL_MAP2_INDEX\0"
++ "GL_MAP2_NORMAL\0"
++ "GL_MAP2_TEXTURE_COORD_1\0"
++ "GL_MAP2_TEXTURE_COORD_2\0"
++ "GL_MAP2_TEXTURE_COORD_3\0"
++ "GL_MAP2_TEXTURE_COORD_4\0"
++ "GL_MAP2_VERTEX_3\0"
++ "GL_MAP2_VERTEX_4\0"
++ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
++ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
++ "GL_MAP_COLOR\0"
++ "GL_MAP_STENCIL\0"
++ "GL_MATRIX0_ARB\0"
++ "GL_MATRIX0_NV\0"
++ "GL_MATRIX10_ARB\0"
++ "GL_MATRIX11_ARB\0"
++ "GL_MATRIX12_ARB\0"
++ "GL_MATRIX13_ARB\0"
++ "GL_MATRIX14_ARB\0"
++ "GL_MATRIX15_ARB\0"
++ "GL_MATRIX16_ARB\0"
++ "GL_MATRIX17_ARB\0"
++ "GL_MATRIX18_ARB\0"
++ "GL_MATRIX19_ARB\0"
++ "GL_MATRIX1_ARB\0"
++ "GL_MATRIX1_NV\0"
++ "GL_MATRIX20_ARB\0"
++ "GL_MATRIX21_ARB\0"
++ "GL_MATRIX22_ARB\0"
++ "GL_MATRIX23_ARB\0"
++ "GL_MATRIX24_ARB\0"
++ "GL_MATRIX25_ARB\0"
++ "GL_MATRIX26_ARB\0"
++ "GL_MATRIX27_ARB\0"
++ "GL_MATRIX28_ARB\0"
++ "GL_MATRIX29_ARB\0"
++ "GL_MATRIX2_ARB\0"
++ "GL_MATRIX2_NV\0"
++ "GL_MATRIX30_ARB\0"
++ "GL_MATRIX31_ARB\0"
++ "GL_MATRIX3_ARB\0"
++ "GL_MATRIX3_NV\0"
++ "GL_MATRIX4_ARB\0"
++ "GL_MATRIX4_NV\0"
++ "GL_MATRIX5_ARB\0"
++ "GL_MATRIX5_NV\0"
++ "GL_MATRIX6_ARB\0"
++ "GL_MATRIX6_NV\0"
++ "GL_MATRIX7_ARB\0"
++ "GL_MATRIX7_NV\0"
++ "GL_MATRIX8_ARB\0"
++ "GL_MATRIX9_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
++ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
++ "GL_MATRIX_MODE\0"
++ "GL_MATRIX_PALETTE_ARB\0"
++ "GL_MAX\0"
++ "GL_MAX_3D_TEXTURE_SIZE\0"
++ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
++ "GL_MAX_ATTRIB_STACK_DEPTH\0"
++ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
++ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
++ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
++ "GL_MAX_CLIP_PLANES\0"
++ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
++ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
++ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
++ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_CONVOLUTION_HEIGHT\0"
++ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
++ "GL_MAX_CONVOLUTION_WIDTH\0"
++ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
++ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
++ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
++ "GL_MAX_DRAW_BUFFERS\0"
++ "GL_MAX_DRAW_BUFFERS_ARB\0"
++ "GL_MAX_DRAW_BUFFERS_ATI\0"
++ "GL_MAX_ELEMENTS_INDICES\0"
++ "GL_MAX_ELEMENTS_VERTICES\0"
++ "GL_MAX_EVAL_ORDER\0"
++ "GL_MAX_EXT\0"
++ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
++ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
++ "GL_MAX_LIGHTS\0"
++ "GL_MAX_LIST_NESTING\0"
++ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
++ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
++ "GL_MAX_NAME_STACK_DEPTH\0"
++ "GL_MAX_PALETTE_MATRICES_ARB\0"
++ "GL_MAX_PIXEL_MAP_TABLE\0"
++ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
++ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
++ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
++ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
++ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
++ "GL_MAX_PROGRAM_MATRICES_ARB\0"
++ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
++ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
++ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
++ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
++ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
++ "GL_MAX_PROJECTION_STACK_DEPTH\0"
++ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
++ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
++ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
++ "GL_MAX_SHININESS_NV\0"
++ "GL_MAX_SPOT_EXPONENT_NV\0"
++ "GL_MAX_TEXTURE_COORDS\0"
++ "GL_MAX_TEXTURE_COORDS_ARB\0"
++ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_TEXTURE_LOD_BIAS\0"
++ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
++ "GL_MAX_TEXTURE_SIZE\0"
++ "GL_MAX_TEXTURE_STACK_DEPTH\0"
++ "GL_MAX_TEXTURE_UNITS\0"
++ "GL_MAX_TEXTURE_UNITS_ARB\0"
++ "GL_MAX_TRACK_MATRICES_NV\0"
++ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
++ "GL_MAX_VARYING_FLOATS\0"
++ "GL_MAX_VARYING_FLOATS_ARB\0"
++ "GL_MAX_VERTEX_ATTRIBS\0"
++ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
++ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
++ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
++ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
++ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
++ "GL_MAX_VERTEX_UNITS_ARB\0"
++ "GL_MAX_VIEWPORT_DIMS\0"
++ "GL_MIN\0"
++ "GL_MINMAX\0"
++ "GL_MINMAX_EXT\0"
++ "GL_MINMAX_FORMAT\0"
++ "GL_MINMAX_FORMAT_EXT\0"
++ "GL_MINMAX_SINK\0"
++ "GL_MINMAX_SINK_EXT\0"
++ "GL_MIN_EXT\0"
++ "GL_MIRRORED_REPEAT\0"
++ "GL_MIRRORED_REPEAT_ARB\0"
++ "GL_MIRRORED_REPEAT_IBM\0"
++ "GL_MIRROR_CLAMP_ATI\0"
++ "GL_MIRROR_CLAMP_EXT\0"
++ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
++ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
++ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
++ "GL_MODELVIEW\0"
++ "GL_MODELVIEW0_ARB\0"
++ "GL_MODELVIEW10_ARB\0"
++ "GL_MODELVIEW11_ARB\0"
++ "GL_MODELVIEW12_ARB\0"
++ "GL_MODELVIEW13_ARB\0"
++ "GL_MODELVIEW14_ARB\0"
++ "GL_MODELVIEW15_ARB\0"
++ "GL_MODELVIEW16_ARB\0"
++ "GL_MODELVIEW17_ARB\0"
++ "GL_MODELVIEW18_ARB\0"
++ "GL_MODELVIEW19_ARB\0"
++ "GL_MODELVIEW1_ARB\0"
++ "GL_MODELVIEW20_ARB\0"
++ "GL_MODELVIEW21_ARB\0"
++ "GL_MODELVIEW22_ARB\0"
++ "GL_MODELVIEW23_ARB\0"
++ "GL_MODELVIEW24_ARB\0"
++ "GL_MODELVIEW25_ARB\0"
++ "GL_MODELVIEW26_ARB\0"
++ "GL_MODELVIEW27_ARB\0"
++ "GL_MODELVIEW28_ARB\0"
++ "GL_MODELVIEW29_ARB\0"
++ "GL_MODELVIEW2_ARB\0"
++ "GL_MODELVIEW30_ARB\0"
++ "GL_MODELVIEW31_ARB\0"
++ "GL_MODELVIEW3_ARB\0"
++ "GL_MODELVIEW4_ARB\0"
++ "GL_MODELVIEW5_ARB\0"
++ "GL_MODELVIEW6_ARB\0"
++ "GL_MODELVIEW7_ARB\0"
++ "GL_MODELVIEW8_ARB\0"
++ "GL_MODELVIEW9_ARB\0"
++ "GL_MODELVIEW_MATRIX\0"
++ "GL_MODELVIEW_PROJECTION_NV\0"
++ "GL_MODELVIEW_STACK_DEPTH\0"
++ "GL_MODULATE\0"
++ "GL_MODULATE_ADD_ATI\0"
++ "GL_MODULATE_SIGNED_ADD_ATI\0"
++ "GL_MODULATE_SUBTRACT_ATI\0"
++ "GL_MULT\0"
++ "GL_MULTISAMPLE\0"
++ "GL_MULTISAMPLE_3DFX\0"
++ "GL_MULTISAMPLE_ARB\0"
++ "GL_MULTISAMPLE_BIT\0"
++ "GL_MULTISAMPLE_BIT_3DFX\0"
++ "GL_MULTISAMPLE_BIT_ARB\0"
++ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
++ "GL_N3F_V3F\0"
++ "GL_NAME_STACK_DEPTH\0"
++ "GL_NAND\0"
++ "GL_NEAREST\0"
++ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
++ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
++ "GL_NEAREST_MIPMAP_LINEAR\0"
++ "GL_NEAREST_MIPMAP_NEAREST\0"
++ "GL_NEVER\0"
++ "GL_NICEST\0"
++ "GL_NONE\0"
++ "GL_NOOP\0"
++ "GL_NOR\0"
++ "GL_NORMALIZE\0"
++ "GL_NORMAL_ARRAY\0"
++ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
++ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_NORMAL_ARRAY_POINTER\0"
++ "GL_NORMAL_ARRAY_STRIDE\0"
++ "GL_NORMAL_ARRAY_TYPE\0"
++ "GL_NORMAL_MAP\0"
++ "GL_NORMAL_MAP_ARB\0"
++ "GL_NORMAL_MAP_NV\0"
++ "GL_NOTEQUAL\0"
++ "GL_NO_ERROR\0"
++ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
++ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
++ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
++ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
++ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
++ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
++ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
++ "GL_OBJECT_COMPILE_STATUS_ARB\0"
++ "GL_OBJECT_DELETE_STATUS_ARB\0"
++ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
++ "GL_OBJECT_LINEAR\0"
++ "GL_OBJECT_LINK_STATUS_ARB\0"
++ "GL_OBJECT_PLANE\0"
++ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
++ "GL_OBJECT_SUBTYPE_ARB\0"
++ "GL_OBJECT_TYPE_ARB\0"
++ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
++ "GL_OCCLUSION_TEST_HP\0"
++ "GL_OCCLUSION_TEST_RESULT_HP\0"
++ "GL_ONE\0"
++ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
++ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
++ "GL_ONE_MINUS_CONSTANT_COLOR\0"
++ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
++ "GL_ONE_MINUS_DST_ALPHA\0"
++ "GL_ONE_MINUS_DST_COLOR\0"
++ "GL_ONE_MINUS_SRC_ALPHA\0"
++ "GL_ONE_MINUS_SRC_COLOR\0"
++ "GL_OPERAND0_ALPHA\0"
++ "GL_OPERAND0_ALPHA_ARB\0"
++ "GL_OPERAND0_ALPHA_EXT\0"
++ "GL_OPERAND0_RGB\0"
++ "GL_OPERAND0_RGB_ARB\0"
++ "GL_OPERAND0_RGB_EXT\0"
++ "GL_OPERAND1_ALPHA\0"
++ "GL_OPERAND1_ALPHA_ARB\0"
++ "GL_OPERAND1_ALPHA_EXT\0"
++ "GL_OPERAND1_RGB\0"
++ "GL_OPERAND1_RGB_ARB\0"
++ "GL_OPERAND1_RGB_EXT\0"
++ "GL_OPERAND2_ALPHA\0"
++ "GL_OPERAND2_ALPHA_ARB\0"
++ "GL_OPERAND2_ALPHA_EXT\0"
++ "GL_OPERAND2_RGB\0"
++ "GL_OPERAND2_RGB_ARB\0"
++ "GL_OPERAND2_RGB_EXT\0"
++ "GL_OPERAND3_ALPHA_NV\0"
++ "GL_OPERAND3_RGB_NV\0"
++ "GL_OR\0"
++ "GL_ORDER\0"
++ "GL_OR_INVERTED\0"
++ "GL_OR_REVERSE\0"
++ "GL_OUT_OF_MEMORY\0"
++ "GL_PACK_ALIGNMENT\0"
++ "GL_PACK_IMAGE_HEIGHT\0"
++ "GL_PACK_INVERT_MESA\0"
++ "GL_PACK_LSB_FIRST\0"
++ "GL_PACK_ROW_LENGTH\0"
++ "GL_PACK_SKIP_IMAGES\0"
++ "GL_PACK_SKIP_PIXELS\0"
++ "GL_PACK_SKIP_ROWS\0"
++ "GL_PACK_SWAP_BYTES\0"
++ "GL_PALETTE4_R5_G6_B5_OES\0"
++ "GL_PALETTE4_RGB5_A1_OES\0"
++ "GL_PALETTE4_RGB8_OES\0"
++ "GL_PALETTE4_RGBA4_OES\0"
++ "GL_PALETTE4_RGBA8_OES\0"
++ "GL_PALETTE8_R5_G6_B5_OES\0"
++ "GL_PALETTE8_RGB5_A1_OES\0"
++ "GL_PALETTE8_RGB8_OES\0"
++ "GL_PALETTE8_RGBA4_OES\0"
++ "GL_PALETTE8_RGBA8_OES\0"
++ "GL_PASS_THROUGH_TOKEN\0"
++ "GL_PERSPECTIVE_CORRECTION_HINT\0"
++ "GL_PIXEL_MAP_A_TO_A\0"
++ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
++ "GL_PIXEL_MAP_B_TO_B\0"
++ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
++ "GL_PIXEL_MAP_G_TO_G\0"
++ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_A\0"
++ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_B\0"
++ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_G\0"
++ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_I\0"
++ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
++ "GL_PIXEL_MAP_I_TO_R\0"
++ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
++ "GL_PIXEL_MAP_R_TO_R\0"
++ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
++ "GL_PIXEL_MAP_S_TO_S\0"
++ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
++ "GL_PIXEL_MODE_BIT\0"
++ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
++ "GL_PIXEL_PACK_BUFFER_EXT\0"
++ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
++ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
++ "GL_POINT\0"
++ "GL_POINTS\0"
++ "GL_POINT_BIT\0"
++ "GL_POINT_DISTANCE_ATTENUATION\0"
++ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
++ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
++ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
++ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
++ "GL_POINT_SIZE\0"
++ "GL_POINT_SIZE_GRANULARITY\0"
++ "GL_POINT_SIZE_MAX\0"
++ "GL_POINT_SIZE_MAX_ARB\0"
++ "GL_POINT_SIZE_MAX_EXT\0"
++ "GL_POINT_SIZE_MAX_SGIS\0"
++ "GL_POINT_SIZE_MIN\0"
++ "GL_POINT_SIZE_MIN_ARB\0"
++ "GL_POINT_SIZE_MIN_EXT\0"
++ "GL_POINT_SIZE_MIN_SGIS\0"
++ "GL_POINT_SIZE_RANGE\0"
++ "GL_POINT_SMOOTH\0"
++ "GL_POINT_SMOOTH_HINT\0"
++ "GL_POINT_SPRITE\0"
++ "GL_POINT_SPRITE_ARB\0"
++ "GL_POINT_SPRITE_COORD_ORIGIN\0"
++ "GL_POINT_SPRITE_NV\0"
++ "GL_POINT_SPRITE_R_MODE_NV\0"
++ "GL_POINT_TOKEN\0"
++ "GL_POLYGON\0"
++ "GL_POLYGON_BIT\0"
++ "GL_POLYGON_MODE\0"
++ "GL_POLYGON_OFFSET_BIAS\0"
++ "GL_POLYGON_OFFSET_FACTOR\0"
++ "GL_POLYGON_OFFSET_FILL\0"
++ "GL_POLYGON_OFFSET_LINE\0"
++ "GL_POLYGON_OFFSET_POINT\0"
++ "GL_POLYGON_OFFSET_UNITS\0"
++ "GL_POLYGON_SMOOTH\0"
++ "GL_POLYGON_SMOOTH_HINT\0"
++ "GL_POLYGON_STIPPLE\0"
++ "GL_POLYGON_STIPPLE_BIT\0"
++ "GL_POLYGON_TOKEN\0"
++ "GL_POSITION\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
++ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
++ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
++ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
++ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
++ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
++ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
++ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
++ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
++ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
++ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
++ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
++ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
++ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
++ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
++ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
++ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
++ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
++ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
++ "GL_POST_CONVOLUTION_RED_BIAS\0"
++ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
++ "GL_POST_CONVOLUTION_RED_SCALE\0"
++ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
++ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
++ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
++ "GL_PREVIOUS\0"
++ "GL_PREVIOUS_ARB\0"
++ "GL_PREVIOUS_EXT\0"
++ "GL_PRIMARY_COLOR\0"
++ "GL_PRIMARY_COLOR_ARB\0"
++ "GL_PRIMARY_COLOR_EXT\0"
++ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
++ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_ATTRIBS_ARB\0"
++ "GL_PROGRAM_BINDING_ARB\0"
++ "GL_PROGRAM_ERROR_POSITION_ARB\0"
++ "GL_PROGRAM_ERROR_POSITION_NV\0"
++ "GL_PROGRAM_ERROR_STRING_ARB\0"
++ "GL_PROGRAM_FORMAT_ARB\0"
++ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
++ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_LENGTH_ARB\0"
++ "GL_PROGRAM_LENGTH_NV\0"
++ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
++ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
++ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
++ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
++ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
++ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_OBJECT_ARB\0"
++ "GL_PROGRAM_PARAMETERS_ARB\0"
++ "GL_PROGRAM_PARAMETER_NV\0"
++ "GL_PROGRAM_RESIDENT_NV\0"
++ "GL_PROGRAM_STRING_ARB\0"
++ "GL_PROGRAM_STRING_NV\0"
++ "GL_PROGRAM_TARGET_NV\0"
++ "GL_PROGRAM_TEMPORARIES_ARB\0"
++ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
++ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
++ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
++ "GL_PROJECTION\0"
++ "GL_PROJECTION_MATRIX\0"
++ "GL_PROJECTION_STACK_DEPTH\0"
++ "GL_PROXY_COLOR_TABLE\0"
++ "GL_PROXY_HISTOGRAM\0"
++ "GL_PROXY_HISTOGRAM_EXT\0"
++ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
++ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
++ "GL_PROXY_TEXTURE_1D\0"
++ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
++ "GL_PROXY_TEXTURE_1D_EXT\0"
++ "GL_PROXY_TEXTURE_2D\0"
++ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
++ "GL_PROXY_TEXTURE_2D_EXT\0"
++ "GL_PROXY_TEXTURE_3D\0"
++ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
++ "GL_PROXY_TEXTURE_CUBE_MAP\0"
++ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
++ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
++ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
++ "GL_Q\0"
++ "GL_QUADRATIC_ATTENUATION\0"
++ "GL_QUADS\0"
++ "GL_QUAD_MESH_SUN\0"
++ "GL_QUAD_STRIP\0"
++ "GL_QUERY_COUNTER_BITS\0"
++ "GL_QUERY_COUNTER_BITS_ARB\0"
++ "GL_QUERY_RESULT\0"
++ "GL_QUERY_RESULT_ARB\0"
++ "GL_QUERY_RESULT_AVAILABLE\0"
++ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
++ "GL_R\0"
++ "GL_R3_G3_B2\0"
++ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
++ "GL_READ_BUFFER\0"
++ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
++ "GL_READ_FRAMEBUFFER_EXT\0"
++ "GL_READ_ONLY\0"
++ "GL_READ_ONLY_ARB\0"
++ "GL_READ_WRITE\0"
++ "GL_READ_WRITE_ARB\0"
++ "GL_RED\0"
++ "GL_REDUCE\0"
++ "GL_REDUCE_EXT\0"
++ "GL_RED_BIAS\0"
++ "GL_RED_BITS\0"
++ "GL_RED_SCALE\0"
++ "GL_REFLECTION_MAP\0"
++ "GL_REFLECTION_MAP_ARB\0"
++ "GL_REFLECTION_MAP_NV\0"
++ "GL_RENDER\0"
++ "GL_RENDERBUFFER_BINDING_EXT\0"
++ "GL_RENDERBUFFER_EXT\0"
++ "GL_RENDERBUFFER_HEIGHT_EXT\0"
++ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
++ "GL_RENDERBUFFER_WIDTH_EXT\0"
++ "GL_RENDERER\0"
++ "GL_RENDER_MODE\0"
++ "GL_REPEAT\0"
++ "GL_REPLACE\0"
++ "GL_REPLACE_EXT\0"
++ "GL_REPLICATE_BORDER_HP\0"
++ "GL_RESCALE_NORMAL\0"
++ "GL_RESCALE_NORMAL_EXT\0"
++ "GL_RETURN\0"
++ "GL_RGB\0"
++ "GL_RGB10\0"
++ "GL_RGB10_A2\0"
++ "GL_RGB10_A2_EXT\0"
++ "GL_RGB10_EXT\0"
++ "GL_RGB12\0"
++ "GL_RGB12_EXT\0"
++ "GL_RGB16\0"
++ "GL_RGB16_EXT\0"
++ "GL_RGB2_EXT\0"
++ "GL_RGB4\0"
++ "GL_RGB4_EXT\0"
++ "GL_RGB4_S3TC\0"
++ "GL_RGB5\0"
++ "GL_RGB5_A1\0"
++ "GL_RGB5_A1_EXT\0"
++ "GL_RGB5_EXT\0"
++ "GL_RGB8\0"
++ "GL_RGB8_EXT\0"
++ "GL_RGBA\0"
++ "GL_RGBA12\0"
++ "GL_RGBA12_EXT\0"
++ "GL_RGBA16\0"
++ "GL_RGBA16_EXT\0"
++ "GL_RGBA2\0"
++ "GL_RGBA2_EXT\0"
++ "GL_RGBA4\0"
++ "GL_RGBA4_DXT5_S3TC\0"
++ "GL_RGBA4_EXT\0"
++ "GL_RGBA4_S3TC\0"
++ "GL_RGBA8\0"
++ "GL_RGBA8_EXT\0"
++ "GL_RGBA_DXT5_S3TC\0"
++ "GL_RGBA_MODE\0"
++ "GL_RGBA_S3TC\0"
++ "GL_RGB_S3TC\0"
++ "GL_RGB_SCALE\0"
++ "GL_RGB_SCALE_ARB\0"
++ "GL_RGB_SCALE_EXT\0"
++ "GL_RIGHT\0"
++ "GL_S\0"
++ "GL_SAMPLER_1D\0"
++ "GL_SAMPLER_1D_SHADOW\0"
++ "GL_SAMPLER_2D\0"
++ "GL_SAMPLER_2D_SHADOW\0"
++ "GL_SAMPLER_3D\0"
++ "GL_SAMPLER_CUBE\0"
++ "GL_SAMPLES\0"
++ "GL_SAMPLES_3DFX\0"
++ "GL_SAMPLES_ARB\0"
++ "GL_SAMPLES_PASSED\0"
++ "GL_SAMPLES_PASSED_ARB\0"
++ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
++ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
++ "GL_SAMPLE_ALPHA_TO_ONE\0"
++ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
++ "GL_SAMPLE_BUFFERS\0"
++ "GL_SAMPLE_BUFFERS_3DFX\0"
++ "GL_SAMPLE_BUFFERS_ARB\0"
++ "GL_SAMPLE_COVERAGE\0"
++ "GL_SAMPLE_COVERAGE_ARB\0"
++ "GL_SAMPLE_COVERAGE_INVERT\0"
++ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
++ "GL_SAMPLE_COVERAGE_VALUE\0"
++ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
++ "GL_SCISSOR_BIT\0"
++ "GL_SCISSOR_BOX\0"
++ "GL_SCISSOR_TEST\0"
++ "GL_SECONDARY_COLOR_ARRAY\0"
++ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
++ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
++ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
++ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
++ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
++ "GL_SELECT\0"
++ "GL_SELECTION_BUFFER_POINTER\0"
++ "GL_SELECTION_BUFFER_SIZE\0"
++ "GL_SEPARABLE_2D\0"
++ "GL_SEPARATE_SPECULAR_COLOR\0"
++ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
++ "GL_SET\0"
++ "GL_SHADER_OBJECT_ARB\0"
++ "GL_SHADER_SOURCE_LENGTH\0"
++ "GL_SHADER_TYPE\0"
++ "GL_SHADE_MODEL\0"
++ "GL_SHADING_LANGUAGE_VERSION\0"
++ "GL_SHADOW_AMBIENT_SGIX\0"
++ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
++ "GL_SHININESS\0"
++ "GL_SHORT\0"
++ "GL_SINGLE_COLOR\0"
++ "GL_SINGLE_COLOR_EXT\0"
++ "GL_SLICE_ACCUM_SUN\0"
++ "GL_SMOOTH\0"
++ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
++ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
++ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
++ "GL_SMOOTH_POINT_SIZE_RANGE\0"
++ "GL_SOURCE0_ALPHA\0"
++ "GL_SOURCE0_ALPHA_ARB\0"
++ "GL_SOURCE0_ALPHA_EXT\0"
++ "GL_SOURCE0_RGB\0"
++ "GL_SOURCE0_RGB_ARB\0"
++ "GL_SOURCE0_RGB_EXT\0"
++ "GL_SOURCE1_ALPHA\0"
++ "GL_SOURCE1_ALPHA_ARB\0"
++ "GL_SOURCE1_ALPHA_EXT\0"
++ "GL_SOURCE1_RGB\0"
++ "GL_SOURCE1_RGB_ARB\0"
++ "GL_SOURCE1_RGB_EXT\0"
++ "GL_SOURCE2_ALPHA\0"
++ "GL_SOURCE2_ALPHA_ARB\0"
++ "GL_SOURCE2_ALPHA_EXT\0"
++ "GL_SOURCE2_RGB\0"
++ "GL_SOURCE2_RGB_ARB\0"
++ "GL_SOURCE2_RGB_EXT\0"
++ "GL_SOURCE3_ALPHA_NV\0"
++ "GL_SOURCE3_RGB_NV\0"
++ "GL_SPECULAR\0"
++ "GL_SPHERE_MAP\0"
++ "GL_SPOT_CUTOFF\0"
++ "GL_SPOT_DIRECTION\0"
++ "GL_SPOT_EXPONENT\0"
++ "GL_SRC0_ALPHA\0"
++ "GL_SRC0_RGB\0"
++ "GL_SRC1_ALPHA\0"
++ "GL_SRC1_RGB\0"
++ "GL_SRC2_ALPHA\0"
++ "GL_SRC2_RGB\0"
++ "GL_SRC_ALPHA\0"
++ "GL_SRC_ALPHA_SATURATE\0"
++ "GL_SRC_COLOR\0"
++ "GL_STACK_OVERFLOW\0"
++ "GL_STACK_UNDERFLOW\0"
++ "GL_STATIC_COPY\0"
++ "GL_STATIC_COPY_ARB\0"
++ "GL_STATIC_DRAW\0"
++ "GL_STATIC_DRAW_ARB\0"
++ "GL_STATIC_READ\0"
++ "GL_STATIC_READ_ARB\0"
++ "GL_STENCIL\0"
++ "GL_STENCIL_ATTACHMENT_EXT\0"
++ "GL_STENCIL_BACK_FAIL\0"
++ "GL_STENCIL_BACK_FUNC\0"
++ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
++ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
++ "GL_STENCIL_BACK_REF\0"
++ "GL_STENCIL_BACK_VALUE_MASK\0"
++ "GL_STENCIL_BACK_WRITEMASK\0"
++ "GL_STENCIL_BITS\0"
++ "GL_STENCIL_BUFFER_BIT\0"
++ "GL_STENCIL_CLEAR_VALUE\0"
++ "GL_STENCIL_FAIL\0"
++ "GL_STENCIL_FUNC\0"
++ "GL_STENCIL_INDEX\0"
++ "GL_STENCIL_INDEX16_EXT\0"
++ "GL_STENCIL_INDEX1_EXT\0"
++ "GL_STENCIL_INDEX4_EXT\0"
++ "GL_STENCIL_INDEX8_EXT\0"
++ "GL_STENCIL_INDEX_EXT\0"
++ "GL_STENCIL_PASS_DEPTH_FAIL\0"
++ "GL_STENCIL_PASS_DEPTH_PASS\0"
++ "GL_STENCIL_REF\0"
++ "GL_STENCIL_TEST\0"
++ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
++ "GL_STENCIL_VALUE_MASK\0"
++ "GL_STENCIL_WRITEMASK\0"
++ "GL_STEREO\0"
++ "GL_STREAM_COPY\0"
++ "GL_STREAM_COPY_ARB\0"
++ "GL_STREAM_DRAW\0"
++ "GL_STREAM_DRAW_ARB\0"
++ "GL_STREAM_READ\0"
++ "GL_STREAM_READ_ARB\0"
++ "GL_SUBPIXEL_BITS\0"
++ "GL_SUBTRACT\0"
++ "GL_SUBTRACT_ARB\0"
++ "GL_T\0"
++ "GL_T2F_C3F_V3F\0"
++ "GL_T2F_C4F_N3F_V3F\0"
++ "GL_T2F_C4UB_V3F\0"
++ "GL_T2F_N3F_V3F\0"
++ "GL_T2F_V3F\0"
++ "GL_T4F_C4F_N3F_V4F\0"
++ "GL_T4F_V4F\0"
++ "GL_TABLE_TOO_LARGE_EXT\0"
++ "GL_TEXTURE\0"
++ "GL_TEXTURE0\0"
++ "GL_TEXTURE0_ARB\0"
++ "GL_TEXTURE1\0"
++ "GL_TEXTURE10\0"
++ "GL_TEXTURE10_ARB\0"
++ "GL_TEXTURE11\0"
++ "GL_TEXTURE11_ARB\0"
++ "GL_TEXTURE12\0"
++ "GL_TEXTURE12_ARB\0"
++ "GL_TEXTURE13\0"
++ "GL_TEXTURE13_ARB\0"
++ "GL_TEXTURE14\0"
++ "GL_TEXTURE14_ARB\0"
++ "GL_TEXTURE15\0"
++ "GL_TEXTURE15_ARB\0"
++ "GL_TEXTURE16\0"
++ "GL_TEXTURE16_ARB\0"
++ "GL_TEXTURE17\0"
++ "GL_TEXTURE17_ARB\0"
++ "GL_TEXTURE18\0"
++ "GL_TEXTURE18_ARB\0"
++ "GL_TEXTURE19\0"
++ "GL_TEXTURE19_ARB\0"
++ "GL_TEXTURE1_ARB\0"
++ "GL_TEXTURE2\0"
++ "GL_TEXTURE20\0"
++ "GL_TEXTURE20_ARB\0"
++ "GL_TEXTURE21\0"
++ "GL_TEXTURE21_ARB\0"
++ "GL_TEXTURE22\0"
++ "GL_TEXTURE22_ARB\0"
++ "GL_TEXTURE23\0"
++ "GL_TEXTURE23_ARB\0"
++ "GL_TEXTURE24\0"
++ "GL_TEXTURE24_ARB\0"
++ "GL_TEXTURE25\0"
++ "GL_TEXTURE25_ARB\0"
++ "GL_TEXTURE26\0"
++ "GL_TEXTURE26_ARB\0"
++ "GL_TEXTURE27\0"
++ "GL_TEXTURE27_ARB\0"
++ "GL_TEXTURE28\0"
++ "GL_TEXTURE28_ARB\0"
++ "GL_TEXTURE29\0"
++ "GL_TEXTURE29_ARB\0"
++ "GL_TEXTURE2_ARB\0"
++ "GL_TEXTURE3\0"
++ "GL_TEXTURE30\0"
++ "GL_TEXTURE30_ARB\0"
++ "GL_TEXTURE31\0"
++ "GL_TEXTURE31_ARB\0"
++ "GL_TEXTURE3_ARB\0"
++ "GL_TEXTURE4\0"
++ "GL_TEXTURE4_ARB\0"
++ "GL_TEXTURE5\0"
++ "GL_TEXTURE5_ARB\0"
++ "GL_TEXTURE6\0"
++ "GL_TEXTURE6_ARB\0"
++ "GL_TEXTURE7\0"
++ "GL_TEXTURE7_ARB\0"
++ "GL_TEXTURE8\0"
++ "GL_TEXTURE8_ARB\0"
++ "GL_TEXTURE9\0"
++ "GL_TEXTURE9_ARB\0"
++ "GL_TEXTURE_1D\0"
++ "GL_TEXTURE_1D_ARRAY_EXT\0"
++ "GL_TEXTURE_2D\0"
++ "GL_TEXTURE_2D_ARRAY_EXT\0"
++ "GL_TEXTURE_3D\0"
++ "GL_TEXTURE_ALPHA_SIZE\0"
++ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
++ "GL_TEXTURE_BASE_LEVEL\0"
++ "GL_TEXTURE_BINDING_1D\0"
++ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
++ "GL_TEXTURE_BINDING_2D\0"
++ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
++ "GL_TEXTURE_BINDING_3D\0"
++ "GL_TEXTURE_BINDING_CUBE_MAP\0"
++ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
++ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
++ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
++ "GL_TEXTURE_BIT\0"
++ "GL_TEXTURE_BLUE_SIZE\0"
++ "GL_TEXTURE_BLUE_SIZE_EXT\0"
++ "GL_TEXTURE_BORDER\0"
++ "GL_TEXTURE_BORDER_COLOR\0"
++ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
++ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
++ "GL_TEXTURE_COLOR_TABLE_SGI\0"
++ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
++ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
++ "GL_TEXTURE_COMPARE_FUNC\0"
++ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
++ "GL_TEXTURE_COMPARE_MODE\0"
++ "GL_TEXTURE_COMPARE_MODE_ARB\0"
++ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
++ "GL_TEXTURE_COMPARE_SGIX\0"
++ "GL_TEXTURE_COMPONENTS\0"
++ "GL_TEXTURE_COMPRESSED\0"
++ "GL_TEXTURE_COMPRESSED_ARB\0"
++ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
++ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
++ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
++ "GL_TEXTURE_COMPRESSION_HINT\0"
++ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
++ "GL_TEXTURE_COORD_ARRAY\0"
++ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
++ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
++ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
++ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
++ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
++ "GL_TEXTURE_CUBE_MAP\0"
++ "GL_TEXTURE_CUBE_MAP_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
++ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
++ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
++ "GL_TEXTURE_DEPTH\0"
++ "GL_TEXTURE_DEPTH_SIZE\0"
++ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
++ "GL_TEXTURE_ENV\0"
++ "GL_TEXTURE_ENV_COLOR\0"
++ "GL_TEXTURE_ENV_MODE\0"
++ "GL_TEXTURE_FILTER_CONTROL\0"
++ "GL_TEXTURE_GEN_MODE\0"
++ "GL_TEXTURE_GEN_Q\0"
++ "GL_TEXTURE_GEN_R\0"
++ "GL_TEXTURE_GEN_S\0"
++ "GL_TEXTURE_GEN_T\0"
++ "GL_TEXTURE_GEQUAL_R_SGIX\0"
++ "GL_TEXTURE_GREEN_SIZE\0"
++ "GL_TEXTURE_GREEN_SIZE_EXT\0"
++ "GL_TEXTURE_HEIGHT\0"
++ "GL_TEXTURE_INDEX_SIZE_EXT\0"
++ "GL_TEXTURE_INTENSITY_SIZE\0"
++ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
++ "GL_TEXTURE_INTERNAL_FORMAT\0"
++ "GL_TEXTURE_LEQUAL_R_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS\0"
++ "GL_TEXTURE_LOD_BIAS_EXT\0"
++ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
++ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
++ "GL_TEXTURE_LUMINANCE_SIZE\0"
++ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
++ "GL_TEXTURE_MAG_FILTER\0"
++ "GL_TEXTURE_MATRIX\0"
++ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
++ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
++ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
++ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
++ "GL_TEXTURE_MAX_LEVEL\0"
++ "GL_TEXTURE_MAX_LOD\0"
++ "GL_TEXTURE_MIN_FILTER\0"
++ "GL_TEXTURE_MIN_LOD\0"
++ "GL_TEXTURE_PRIORITY\0"
++ "GL_TEXTURE_RECTANGLE_ARB\0"
++ "GL_TEXTURE_RECTANGLE_NV\0"
++ "GL_TEXTURE_RED_SIZE\0"
++ "GL_TEXTURE_RED_SIZE_EXT\0"
++ "GL_TEXTURE_RESIDENT\0"
++ "GL_TEXTURE_STACK_DEPTH\0"
++ "GL_TEXTURE_TOO_LARGE_EXT\0"
++ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
++ "GL_TEXTURE_WIDTH\0"
++ "GL_TEXTURE_WRAP_R\0"
++ "GL_TEXTURE_WRAP_S\0"
++ "GL_TEXTURE_WRAP_T\0"
++ "GL_TIME_ELAPSED_EXT\0"
++ "GL_TRACK_MATRIX_NV\0"
++ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
++ "GL_TRANSFORM_BIT\0"
++ "GL_TRANSPOSE_COLOR_MATRIX\0"
++ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
++ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
++ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
++ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
++ "GL_TRANSPOSE_NV\0"
++ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
++ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
++ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
++ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
++ "GL_TRIANGLES\0"
++ "GL_TRIANGLE_FAN\0"
++ "GL_TRIANGLE_MESH_SUN\0"
++ "GL_TRIANGLE_STRIP\0"
++ "GL_TRUE\0"
++ "GL_UNPACK_ALIGNMENT\0"
++ "GL_UNPACK_IMAGE_HEIGHT\0"
++ "GL_UNPACK_LSB_FIRST\0"
++ "GL_UNPACK_ROW_LENGTH\0"
++ "GL_UNPACK_SKIP_IMAGES\0"
++ "GL_UNPACK_SKIP_PIXELS\0"
++ "GL_UNPACK_SKIP_ROWS\0"
++ "GL_UNPACK_SWAP_BYTES\0"
++ "GL_UNSIGNED_BYTE\0"
++ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
++ "GL_UNSIGNED_BYTE_3_3_2\0"
++ "GL_UNSIGNED_INT\0"
++ "GL_UNSIGNED_INT_10_10_10_2\0"
++ "GL_UNSIGNED_INT_24_8_NV\0"
++ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
++ "GL_UNSIGNED_INT_8_8_8_8\0"
++ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
++ "GL_UNSIGNED_SHORT\0"
++ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
++ "GL_UNSIGNED_SHORT_4_4_4_4\0"
++ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
++ "GL_UNSIGNED_SHORT_5_5_5_1\0"
++ "GL_UNSIGNED_SHORT_5_6_5\0"
++ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
++ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
++ "GL_UNSIGNED_SHORT_8_8_MESA\0"
++ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
++ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
++ "GL_UPPER_LEFT\0"
++ "GL_V2F\0"
++ "GL_V3F\0"
++ "GL_VALIDATE_STATUS\0"
++ "GL_VENDOR\0"
++ "GL_VERSION\0"
++ "GL_VERTEX_ARRAY\0"
++ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
++ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
++ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_VERTEX_ARRAY_POINTER\0"
++ "GL_VERTEX_ARRAY_SIZE\0"
++ "GL_VERTEX_ARRAY_STRIDE\0"
++ "GL_VERTEX_ARRAY_TYPE\0"
++ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
++ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
++ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
++ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
++ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
++ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
++ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
++ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
++ "GL_VERTEX_BLEND_ARB\0"
++ "GL_VERTEX_PROGRAM_ARB\0"
++ "GL_VERTEX_PROGRAM_BINDING_NV\0"
++ "GL_VERTEX_PROGRAM_NV\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
++ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
++ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
++ "GL_VERTEX_SHADER\0"
++ "GL_VERTEX_SHADER_ARB\0"
++ "GL_VERTEX_STATE_PROGRAM_NV\0"
++ "GL_VIEWPORT\0"
++ "GL_VIEWPORT_BIT\0"
++ "GL_WEIGHT_ARRAY_ARB\0"
++ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
++ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
++ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
++ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
++ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
++ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
++ "GL_WEIGHT_SUM_UNITY_ARB\0"
++ "GL_WRAP_BORDER_SUN\0"
++ "GL_WRITE_ONLY\0"
++ "GL_WRITE_ONLY_ARB\0"
++ "GL_XOR\0"
++ "GL_YCBCR_422_APPLE\0"
++ "GL_YCBCR_MESA\0"
++ "GL_ZERO\0"
++ "GL_ZOOM_X\0"
++ "GL_ZOOM_Y\0"
++ ;
++
++static const enum_elt all_enums[1746] =
++{
++ { 0, 0x00000600 }, /* GL_2D */
++ { 6, 0x00001407 }, /* GL_2_BYTES */
++ { 17, 0x00000601 }, /* GL_3D */
++ { 23, 0x00000602 }, /* GL_3D_COLOR */
++ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
++ { 55, 0x00001408 }, /* GL_3_BYTES */
++ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
++ { 86, 0x00001409 }, /* GL_4_BYTES */
++ { 97, 0x00000100 }, /* GL_ACCUM */
++ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
++ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
++ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
++ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
++ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
++ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
++ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
++ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
++ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
++ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
++ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
++ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
++ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
++ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
++ { 418, 0x00000104 }, /* GL_ADD */
++ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
++ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
++ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
++ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
++ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
++ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
++ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
++ { 576, 0x00001906 }, /* GL_ALPHA */
++ { 585, 0x0000803D }, /* GL_ALPHA12 */
++ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
++ { 611, 0x0000803E }, /* GL_ALPHA16 */
++ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
++ { 637, 0x0000803B }, /* GL_ALPHA4 */
++ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
++ { 661, 0x0000803C }, /* GL_ALPHA8 */
++ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
++ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
++ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
++ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
++ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
++ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
++ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
++ { 779, 0x00000207 }, /* GL_ALWAYS */
++ { 789, 0x00001200 }, /* GL_AMBIENT */
++ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
++ { 823, 0x00001501 }, /* GL_AND */
++ { 830, 0x00001504 }, /* GL_AND_INVERTED */
++ { 846, 0x00001502 }, /* GL_AND_REVERSE */
++ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
++ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
++ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
++ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
++ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
++ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
++ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
++ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
++ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
++ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
++ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
++ { 1107, 0x00000409 }, /* GL_AUX0 */
++ { 1115, 0x0000040A }, /* GL_AUX1 */
++ { 1123, 0x0000040B }, /* GL_AUX2 */
++ { 1131, 0x0000040C }, /* GL_AUX3 */
++ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
++ { 1154, 0x00000405 }, /* GL_BACK */
++ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
++ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
++ { 1189, 0x000080E0 }, /* GL_BGR */
++ { 1196, 0x000080E1 }, /* GL_BGRA */
++ { 1204, 0x00001A00 }, /* GL_BITMAP */
++ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
++ { 1230, 0x00000BE2 }, /* GL_BLEND */
++ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
++ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
++ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
++ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
++ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
++ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
++ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
++ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
++ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
++ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
++ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
++ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
++ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
++ { 1489, 0x00001905 }, /* GL_BLUE */
++ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
++ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
++ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
++ { 1537, 0x00008B56 }, /* GL_BOOL */
++ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
++ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
++ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
++ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
++ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
++ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
++ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
++ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
++ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
++ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
++ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
++ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
++ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
++ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
++ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
++ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
++ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
++ { 1841, 0x00001400 }, /* GL_BYTE */
++ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
++ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
++ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
++ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
++ { 1899, 0x00000901 }, /* GL_CCW */
++ { 1906, 0x00002900 }, /* GL_CLAMP */
++ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
++ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
++ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
++ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
++ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
++ { 2020, 0x00001500 }, /* GL_CLEAR */
++ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
++ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
++ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
++ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
++ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
++ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
++ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
++ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
++ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
++ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
++ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
++ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
++ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
++ { 2314, 0x00000A00 }, /* GL_COEFF */
++ { 2323, 0x00001800 }, /* GL_COLOR */
++ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
++ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
++ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
++ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
++ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
++ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
++ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
++ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
++ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
++ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
++ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
++ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
++ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
++ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
++ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
++ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
++ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
++ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
++ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
++ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
++ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
++ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
++ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
++ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
++ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
++ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
++ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
++ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
++ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
++ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
++ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
++ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
++ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
++ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
++ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
++ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
++ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
++ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
++ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
++ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
++ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
++ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
++ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
++ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
++ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
++ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
++ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
++ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
++ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
++ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
++ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
++ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
++ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
++ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
++ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
++ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
++ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
++ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
++ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
++ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
++ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
++ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
++ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
++ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
++ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
++ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
++ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
++ { 3988, 0x00008570 }, /* GL_COMBINE */
++ { 3999, 0x00008503 }, /* GL_COMBINE4 */
++ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
++ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
++ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
++ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
++ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
++ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
++ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
++ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
++ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
++ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
++ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
++ { 4241, 0x00001300 }, /* GL_COMPILE */
++ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
++ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
++ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
++ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
++ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
++ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
++ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
++ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
++ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
++ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
++ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
++ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
++ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
++ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
++ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
++ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
++ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
++ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
++ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
++ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
++ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
++ { 4805, 0x00008576 }, /* GL_CONSTANT */
++ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
++ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
++ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
++ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
++ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
++ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
++ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
++ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
++ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
++ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
++ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
++ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
++ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
++ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
++ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
++ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
++ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
++ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
++ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
++ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
++ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
++ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
++ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
++ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
++ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
++ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
++ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
++ { 5446, 0x00001503 }, /* GL_COPY */
++ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
++ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
++ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
++ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
++ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
++ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
++ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
++ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
++ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
++ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
++ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
++ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
++ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
++ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
++ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
++ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
++ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
++ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
++ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
++ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
++ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
++ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
++ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
++ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
++ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
++ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
++ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
++ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
++ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
++ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
++ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
++ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
++ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
++ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
++ { 6265, 0x00000900 }, /* GL_CW */
++ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
++ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
++ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
++ { 6333, 0x00002101 }, /* GL_DECAL */
++ { 6342, 0x00001E03 }, /* GL_DECR */
++ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
++ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
++ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
++ { 6397, 0x00001801 }, /* GL_DEPTH */
++ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
++ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
++ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
++ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
++ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
++ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
++ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
++ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
++ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
++ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
++ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
++ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
++ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
++ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
++ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
++ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
++ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
++ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
++ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
++ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
++ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
++ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
++ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
++ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
++ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
++ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
++ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
++ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
++ { 6998, 0x00001201 }, /* GL_DIFFUSE */
++ { 7009, 0x00000BD0 }, /* GL_DITHER */
++ { 7019, 0x00000A02 }, /* GL_DOMAIN */
++ { 7029, 0x00001100 }, /* GL_DONT_CARE */
++ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
++ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
++ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
++ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
++ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
++ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
++ { 7133, 0x0000140A }, /* GL_DOUBLE */
++ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
++ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
++ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
++ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
++ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
++ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
++ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
++ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
++ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
++ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
++ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
++ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
++ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
++ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
++ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
++ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
++ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
++ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
++ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
++ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
++ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
++ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
++ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
++ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
++ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
++ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
++ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
++ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
++ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
++ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
++ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
++ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
++ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
++ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
++ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
++ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
++ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
++ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
++ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
++ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
++ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
++ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
++ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
++ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
++ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
++ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
++ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
++ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
++ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
++ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
++ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
++ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
++ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
++ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
++ { 8177, 0x00000306 }, /* GL_DST_COLOR */
++ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
++ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
++ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
++ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
++ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
++ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
++ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
++ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
++ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
++ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
++ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
++ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
++ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
++ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
++ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
++ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
++ { 8575, 0x00001600 }, /* GL_EMISSION */
++ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
++ { 8601, 0x00000202 }, /* GL_EQUAL */
++ { 8610, 0x00001509 }, /* GL_EQUIV */
++ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
++ { 8631, 0x00000800 }, /* GL_EXP */
++ { 8638, 0x00000801 }, /* GL_EXP2 */
++ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
++ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
++ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
++ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
++ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
++ { 8729, 0x00000000 }, /* GL_FALSE */
++ { 8738, 0x00001101 }, /* GL_FASTEST */
++ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
++ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
++ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
++ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
++ { 8836, 0x00001B02 }, /* GL_FILL */
++ { 8844, 0x00001D00 }, /* GL_FLAT */
++ { 8852, 0x00001406 }, /* GL_FLOAT */
++ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
++ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
++ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
++ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
++ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
++ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
++ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
++ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
++ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
++ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
++ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
++ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
++ { 9053, 0x00000B60 }, /* GL_FOG */
++ { 9060, 0x00000080 }, /* GL_FOG_BIT */
++ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
++ { 9084, 0x00008451 }, /* GL_FOG_COORD */
++ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
++ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
++ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
++ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
++ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
++ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
++ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
++ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
++ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
++ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
++ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
++ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
++ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
++ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
++ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
++ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
++ { 9524, 0x00000B64 }, /* GL_FOG_END */
++ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
++ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
++ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
++ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
++ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
++ { 9616, 0x00000B63 }, /* GL_FOG_START */
++ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
++ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
++ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
++ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
++ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
++ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
++ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
++ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
++ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
++ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
++ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
++ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
++ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
++ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
++ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
++ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
++ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
++ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
++ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
++ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
++ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
++ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
++ { 10462, 0x00000404 }, /* GL_FRONT */
++ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
++ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
++ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
++ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
++ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
++ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
++ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
++ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
++ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
++ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
++ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
++ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
++ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
++ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
++ { 10748, 0x00000206 }, /* GL_GEQUAL */
++ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
++ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
++ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
++ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
++ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
++ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
++ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
++ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
++ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
++ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
++ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
++ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
++ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
++ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
++ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
++ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
++ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
++ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
++ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
++ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
++ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
++ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
++ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
++ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
++ { 11304, 0x00000204 }, /* GL_GREATER */
++ { 11315, 0x00001904 }, /* GL_GREEN */
++ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
++ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
++ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
++ { 11367, 0x00008000 }, /* GL_HINT_BIT */
++ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
++ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
++ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
++ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
++ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
++ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
++ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
++ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
++ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
++ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
++ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
++ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
++ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
++ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
++ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
++ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
++ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
++ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
++ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
++ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
++ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
++ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
++ { 11910, 0x00001E02 }, /* GL_INCR */
++ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
++ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
++ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
++ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
++ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
++ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
++ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
++ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
++ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
++ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
++ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
++ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
++ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
++ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
++ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
++ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
++ { 12228, 0x00001404 }, /* GL_INT */
++ { 12235, 0x00008049 }, /* GL_INTENSITY */
++ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
++ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
++ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
++ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
++ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
++ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
++ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
++ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
++ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
++ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
++ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
++ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
++ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
++ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
++ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
++ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
++ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
++ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
++ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
++ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
++ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
++ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
++ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
++ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
++ { 12663, 0x0000150A }, /* GL_INVERT */
++ { 12673, 0x00001E00 }, /* GL_KEEP */
++ { 12681, 0x00000406 }, /* GL_LEFT */
++ { 12689, 0x00000203 }, /* GL_LEQUAL */
++ { 12699, 0x00000201 }, /* GL_LESS */
++ { 12707, 0x00004000 }, /* GL_LIGHT0 */
++ { 12717, 0x00004001 }, /* GL_LIGHT1 */
++ { 12727, 0x00004002 }, /* GL_LIGHT2 */
++ { 12737, 0x00004003 }, /* GL_LIGHT3 */
++ { 12747, 0x00004004 }, /* GL_LIGHT4 */
++ { 12757, 0x00004005 }, /* GL_LIGHT5 */
++ { 12767, 0x00004006 }, /* GL_LIGHT6 */
++ { 12777, 0x00004007 }, /* GL_LIGHT7 */
++ { 12787, 0x00000B50 }, /* GL_LIGHTING */
++ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
++ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
++ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
++ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
++ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
++ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
++ { 12952, 0x00001B01 }, /* GL_LINE */
++ { 12960, 0x00002601 }, /* GL_LINEAR */
++ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
++ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
++ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
++ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
++ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
++ { 13102, 0x00000001 }, /* GL_LINES */
++ { 13111, 0x00000004 }, /* GL_LINE_BIT */
++ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
++ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
++ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
++ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
++ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
++ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
++ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
++ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
++ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
++ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
++ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
++ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
++ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
++ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
++ { 13370, 0x00020000 }, /* GL_LIST_BIT */
++ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
++ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
++ { 13409, 0x00000101 }, /* GL_LOAD */
++ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
++ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
++ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
++ { 13460, 0x00001909 }, /* GL_LUMINANCE */
++ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
++ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
++ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
++ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
++ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
++ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
++ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
++ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
++ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
++ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
++ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
++ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
++ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
++ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
++ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
++ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
++ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
++ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
++ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
++ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
++ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
++ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
++ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
++ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
++ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
++ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
++ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
++ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
++ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
++ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
++ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
++ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
++ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
++ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
++ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
++ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
++ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
++ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
++ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
++ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
++ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
++ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
++ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
++ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
++ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
++ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
++ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
++ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
++ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
++ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
++ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
++ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
++ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
++ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
++ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
++ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
++ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
++ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
++ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
++ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
++ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
++ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
++ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
++ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
++ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
++ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
++ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
++ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
++ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
++ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
++ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
++ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
++ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
++ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
++ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
++ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
++ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
++ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
++ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
++ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
++ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
++ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
++ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
++ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
++ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
++ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
++ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
++ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
++ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
++ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
++ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
++ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
++ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
++ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
++ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
++ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
++ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
++ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
++ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
++ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
++ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
++ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
++ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
++ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
++ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
++ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
++ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
++ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
++ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
++ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
++ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
++ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
++ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
++ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
++ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
++ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
++ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
++ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
++ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
++ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
++ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
++ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
++ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
++ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
++ { 16086, 0x00008008 }, /* GL_MAX */
++ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
++ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
++ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
++ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
++ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
++ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
++ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
++ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
++ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
++ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
++ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
++ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
++ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
++ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
++ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
++ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
++ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
++ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
++ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
++ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
++ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
++ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
++ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
++ { 16766, 0x00008008 }, /* GL_MAX_EXT */
++ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
++ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
++ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
++ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
++ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
++ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
++ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
++ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
++ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
++ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
++ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
++ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
++ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
++ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
++ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
++ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
++ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
++ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
++ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
++ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
++ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
++ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
++ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
++ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
++ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
++ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
++ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
++ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
++ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
++ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
++ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
++ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
++ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
++ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
++ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
++ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
++ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
++ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
++ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
++ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
++ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
++ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
++ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
++ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
++ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
++ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
++ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
++ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
++ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
++ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
++ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
++ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
++ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
++ { 18669, 0x00008007 }, /* GL_MIN */
++ { 18676, 0x0000802E }, /* GL_MINMAX */
++ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
++ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
++ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
++ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
++ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
++ { 18772, 0x00008007 }, /* GL_MIN_EXT */
++ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
++ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
++ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
++ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
++ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
++ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
++ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
++ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
++ { 18974, 0x00001700 }, /* GL_MODELVIEW */
++ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
++ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
++ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
++ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
++ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
++ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
++ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
++ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
++ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
++ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
++ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
++ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
++ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
++ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
++ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
++ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
++ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
++ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
++ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
++ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
++ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
++ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
++ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
++ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
++ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
++ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
++ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
++ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
++ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
++ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
++ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
++ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
++ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
++ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
++ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
++ { 19657, 0x00002100 }, /* GL_MODULATE */
++ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
++ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
++ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
++ { 19741, 0x00000103 }, /* GL_MULT */
++ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
++ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
++ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
++ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
++ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
++ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
++ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
++ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
++ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
++ { 19930, 0x0000150E }, /* GL_NAND */
++ { 19938, 0x00002600 }, /* GL_NEAREST */
++ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
++ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
++ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
++ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
++ { 20063, 0x00000200 }, /* GL_NEVER */
++ { 20072, 0x00001102 }, /* GL_NICEST */
++ { 20082, 0x00000000 }, /* GL_NONE */
++ { 20090, 0x00001505 }, /* GL_NOOP */
++ { 20098, 0x00001508 }, /* GL_NOR */
++ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
++ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
++ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
++ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
++ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
++ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
++ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
++ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
++ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
++ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
++ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
++ { 20329, 0x00000000 }, /* GL_NO_ERROR */
++ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
++ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
++ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
++ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
++ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
++ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
++ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
++ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
++ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
++ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
++ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
++ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
++ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
++ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
++ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
++ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
++ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
++ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
++ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
++ { 20889, 0x00000001 }, /* GL_ONE */
++ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
++ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
++ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
++ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
++ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
++ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
++ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
++ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
++ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
++ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
++ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
++ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
++ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
++ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
++ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
++ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
++ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
++ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
++ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
++ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
++ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
++ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
++ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
++ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
++ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
++ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
++ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
++ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
++ { 21502, 0x00001507 }, /* GL_OR */
++ { 21508, 0x00000A01 }, /* GL_ORDER */
++ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
++ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
++ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
++ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
++ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
++ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
++ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
++ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
++ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
++ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
++ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
++ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
++ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
++ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
++ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
++ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
++ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
++ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
++ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
++ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
++ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
++ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
++ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
++ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
++ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
++ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
++ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
++ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
++ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
++ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
++ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
++ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
++ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
++ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
++ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
++ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
++ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
++ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
++ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
++ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
++ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
++ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
++ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
++ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
++ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
++ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
++ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
++ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
++ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
++ { 22605, 0x00001B00 }, /* GL_POINT */
++ { 22614, 0x00000000 }, /* GL_POINTS */
++ { 22624, 0x00000002 }, /* GL_POINT_BIT */
++ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
++ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
++ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
++ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
++ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
++ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
++ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
++ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
++ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
++ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
++ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
++ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
++ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
++ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
++ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
++ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
++ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
++ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
++ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
++ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
++ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
++ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
++ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
++ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
++ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
++ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
++ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
++ { 23291, 0x00000009 }, /* GL_POLYGON */
++ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
++ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
++ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
++ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
++ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
++ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
++ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
++ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
++ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
++ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
++ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
++ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
++ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
++ { 23575, 0x00001203 }, /* GL_POSITION */
++ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
++ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
++ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
++ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
++ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
++ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
++ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
++ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
++ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
++ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
++ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
++ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
++ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
++ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
++ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
++ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
++ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
++ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
++ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
++ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
++ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
++ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
++ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
++ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
++ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
++ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
++ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
++ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
++ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
++ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
++ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
++ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
++ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
++ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
++ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
++ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
++ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
++ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
++ { 24862, 0x00008578 }, /* GL_PREVIOUS */
++ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
++ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
++ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
++ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
++ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
++ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
++ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
++ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
++ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
++ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
++ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
++ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
++ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
++ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
++ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
++ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
++ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
++ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
++ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
++ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
++ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
++ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
++ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
++ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
++ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
++ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
++ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
++ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
++ { 25858, 0x00001701 }, /* GL_PROJECTION */
++ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
++ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
++ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
++ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
++ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
++ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
++ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
++ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
++ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
++ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
++ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
++ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
++ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
++ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
++ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
++ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
++ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
++ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
++ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
++ { 26377, 0x00002003 }, /* GL_Q */
++ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
++ { 26407, 0x00000007 }, /* GL_QUADS */
++ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
++ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
++ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
++ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
++ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
++ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
++ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
++ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
++ { 26587, 0x00002002 }, /* GL_R */
++ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
++ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
++ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
++ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
++ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
++ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
++ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
++ { 26738, 0x000088BA }, /* GL_READ_WRITE */
++ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
++ { 26770, 0x00001903 }, /* GL_RED */
++ { 26777, 0x00008016 }, /* GL_REDUCE */
++ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
++ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
++ { 26813, 0x00000D52 }, /* GL_RED_BITS */
++ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
++ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
++ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
++ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
++ { 26899, 0x00001C00 }, /* GL_RENDER */
++ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
++ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
++ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
++ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
++ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
++ { 27046, 0x00001F01 }, /* GL_RENDERER */
++ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
++ { 27073, 0x00002901 }, /* GL_REPEAT */
++ { 27083, 0x00001E01 }, /* GL_REPLACE */
++ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
++ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
++ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
++ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
++ { 27172, 0x00000102 }, /* GL_RETURN */
++ { 27182, 0x00001907 }, /* GL_RGB */
++ { 27189, 0x00008052 }, /* GL_RGB10 */
++ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
++ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
++ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
++ { 27239, 0x00008053 }, /* GL_RGB12 */
++ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
++ { 27261, 0x00008054 }, /* GL_RGB16 */
++ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
++ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
++ { 27295, 0x0000804F }, /* GL_RGB4 */
++ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
++ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
++ { 27328, 0x00008050 }, /* GL_RGB5 */
++ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
++ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
++ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
++ { 27374, 0x00008051 }, /* GL_RGB8 */
++ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
++ { 27394, 0x00001908 }, /* GL_RGBA */
++ { 27402, 0x0000805A }, /* GL_RGBA12 */
++ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
++ { 27426, 0x0000805B }, /* GL_RGBA16 */
++ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
++ { 27450, 0x00008055 }, /* GL_RGBA2 */
++ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
++ { 27472, 0x00008056 }, /* GL_RGBA4 */
++ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
++ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
++ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
++ { 27527, 0x00008058 }, /* GL_RGBA8 */
++ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
++ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
++ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
++ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
++ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
++ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
++ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
++ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
++ { 27652, 0x00000407 }, /* GL_RIGHT */
++ { 27661, 0x00002000 }, /* GL_S */
++ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
++ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
++ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
++ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
++ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
++ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
++ { 27766, 0x000080A9 }, /* GL_SAMPLES */
++ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
++ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
++ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
++ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
++ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
++ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
++ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
++ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
++ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
++ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
++ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
++ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
++ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
++ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
++ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
++ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
++ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
++ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
++ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
++ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
++ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
++ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
++ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
++ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
++ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
++ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
++ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
++ { 28453, 0x00001C02 }, /* GL_SELECT */
++ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
++ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
++ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
++ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
++ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
++ { 28590, 0x0000150F }, /* GL_SET */
++ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
++ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
++ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
++ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
++ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
++ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
++ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
++ { 28753, 0x00001601 }, /* GL_SHININESS */
++ { 28766, 0x00001402 }, /* GL_SHORT */
++ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
++ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
++ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
++ { 28830, 0x00001D01 }, /* GL_SMOOTH */
++ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
++ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
++ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
++ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
++ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
++ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
++ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
++ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
++ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
++ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
++ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
++ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
++ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
++ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
++ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
++ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
++ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
++ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
++ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
++ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
++ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
++ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
++ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
++ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
++ { 29334, 0x00001202 }, /* GL_SPECULAR */
++ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
++ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
++ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
++ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
++ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
++ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
++ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
++ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
++ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
++ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
++ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
++ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
++ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
++ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
++ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
++ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
++ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
++ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
++ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
++ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
++ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
++ { 29675, 0x00001802 }, /* GL_STENCIL */
++ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
++ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
++ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
++ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
++ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
++ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
++ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
++ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
++ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
++ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
++ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
++ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
++ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
++ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
++ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
++ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
++ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
++ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
++ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
++ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
++ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
++ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
++ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
++ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
++ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
++ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
++ { 30268, 0x00000C33 }, /* GL_STEREO */
++ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
++ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
++ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
++ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
++ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
++ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
++ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
++ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
++ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
++ { 30425, 0x00002001 }, /* GL_T */
++ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
++ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
++ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
++ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
++ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
++ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
++ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
++ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
++ { 30559, 0x00001702 }, /* GL_TEXTURE */
++ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
++ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
++ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
++ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
++ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
++ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
++ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
++ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
++ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
++ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
++ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
++ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
++ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
++ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
++ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
++ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
++ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
++ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
++ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
++ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
++ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
++ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
++ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
++ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
++ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
++ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
++ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
++ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
++ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
++ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
++ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
++ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
++ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
++ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
++ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
++ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
++ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
++ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
++ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
++ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
++ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
++ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
++ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
++ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
++ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
++ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
++ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
++ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
++ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
++ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
++ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
++ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
++ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
++ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
++ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
++ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
++ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
++ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
++ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
++ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
++ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
++ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
++ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
++ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
++ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
++ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
++ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
++ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
++ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
++ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
++ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
++ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
++ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
++ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
++ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
++ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
++ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
++ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
++ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
++ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
++ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
++ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
++ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
++ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
++ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
++ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
++ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
++ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
++ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
++ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
++ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
++ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
++ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
++ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
++ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
++ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
++ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
++ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
++ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
++ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
++ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
++ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
++ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
++ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
++ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
++ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
++ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
++ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
++ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
++ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
++ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
++ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
++ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
++ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
++ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
++ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
++ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
++ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
++ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
++ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
++ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
++ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
++ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
++ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
++ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
++ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
++ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
++ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
++ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
++ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
++ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
++ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
++ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
++ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
++ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
++ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
++ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
++ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
++ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
++ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
++ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
++ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
++ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
++ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
++ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
++ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
++ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
++ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
++ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
++ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
++ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
++ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
++ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
++ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
++ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
++ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
++ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
++ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
++ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
++ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
++ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
++ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
++ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
++ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
++ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
++ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
++ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
++ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
++ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
++ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
++ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
++ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
++ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
++ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
++ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
++ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
++ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
++ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
++ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
++ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
++ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
++ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
++ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
++ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
++ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
++ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
++ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
++ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
++ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
++ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
++ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
++ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
++ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
++ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
++ { 34912, 0x00000004 }, /* GL_TRIANGLES */
++ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
++ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
++ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
++ { 34980, 0x00000001 }, /* GL_TRUE */
++ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
++ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
++ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
++ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
++ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
++ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
++ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
++ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
++ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
++ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
++ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
++ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
++ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
++ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
++ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
++ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
++ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
++ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
++ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
++ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
++ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
++ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
++ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
++ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
++ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
++ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
++ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
++ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
++ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
++ { 35688, 0x00002A20 }, /* GL_V2F */
++ { 35695, 0x00002A21 }, /* GL_V3F */
++ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
++ { 35721, 0x00001F00 }, /* GL_VENDOR */
++ { 35731, 0x00001F02 }, /* GL_VERSION */
++ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
++ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
++ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
++ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
++ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
++ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
++ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
++ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
++ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
++ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
++ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
++ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
++ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
++ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
++ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
++ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
++ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
++ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
++ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
++ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
++ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
++ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
++ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
++ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
++ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
++ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
++ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
++ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
++ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
++ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
++ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
++ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
++ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
++ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
++ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
++ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
++ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
++ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
++ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
++ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
++ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
++ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
++ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
++ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
++ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
++ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
++ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
++ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
++ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
++ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
++ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
++ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
++ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
++ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
++ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
++ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
++ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
++ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
++ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
++ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
++ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
++ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
++ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
++ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
++ { 37482, 0x00001506 }, /* GL_XOR */
++ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
++ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
++ { 37522, 0x00000000 }, /* GL_ZERO */
++ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
++ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
++};
++
++static const unsigned reduced_enums[1284] =
++{
++ 436, /* GL_FALSE */
++ 645, /* GL_LINES */
++ 647, /* GL_LINE_LOOP */
++ 654, /* GL_LINE_STRIP */
++ 1637, /* GL_TRIANGLES */
++ 1640, /* GL_TRIANGLE_STRIP */
++ 1638, /* GL_TRIANGLE_FAN */
++ 1211, /* GL_QUADS */
++ 1213, /* GL_QUAD_STRIP */
++ 1099, /* GL_POLYGON */
++ 1111, /* GL_POLYGON_STIPPLE_BIT */
++ 1064, /* GL_PIXEL_MODE_BIT */
++ 632, /* GL_LIGHTING_BIT */
++ 458, /* GL_FOG_BIT */
++ 8, /* GL_ACCUM */
++ 664, /* GL_LOAD */
++ 1253, /* GL_RETURN */
++ 937, /* GL_MULT */
++ 23, /* GL_ADD */
++ 953, /* GL_NEVER */
++ 622, /* GL_LESS */
++ 426, /* GL_EQUAL */
++ 621, /* GL_LEQUAL */
++ 547, /* GL_GREATER */
++ 968, /* GL_NOTEQUAL */
++ 522, /* GL_GEQUAL */
++ 46, /* GL_ALWAYS */
++ 1386, /* GL_SRC_COLOR */
++ 997, /* GL_ONE_MINUS_SRC_COLOR */
++ 1384, /* GL_SRC_ALPHA */
++ 996, /* GL_ONE_MINUS_SRC_ALPHA */
++ 406, /* GL_DST_ALPHA */
++ 994, /* GL_ONE_MINUS_DST_ALPHA */
++ 407, /* GL_DST_COLOR */
++ 995, /* GL_ONE_MINUS_DST_COLOR */
++ 1385, /* GL_SRC_ALPHA_SATURATE */
++ 510, /* GL_FRONT_LEFT */
++ 511, /* GL_FRONT_RIGHT */
++ 69, /* GL_BACK_LEFT */
++ 70, /* GL_BACK_RIGHT */
++ 507, /* GL_FRONT */
++ 68, /* GL_BACK */
++ 620, /* GL_LEFT */
++ 1293, /* GL_RIGHT */
++ 508, /* GL_FRONT_AND_BACK */
++ 63, /* GL_AUX0 */
++ 64, /* GL_AUX1 */
++ 65, /* GL_AUX2 */
++ 66, /* GL_AUX3 */
++ 612, /* GL_INVALID_ENUM */
++ 615, /* GL_INVALID_VALUE */
++ 614, /* GL_INVALID_OPERATION */
++ 1387, /* GL_STACK_OVERFLOW */
++ 1388, /* GL_STACK_UNDERFLOW */
++ 1022, /* GL_OUT_OF_MEMORY */
++ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
++ 0, /* GL_2D */
++ 2, /* GL_3D */
++ 3, /* GL_3D_COLOR */
++ 4, /* GL_3D_COLOR_TEXTURE */
++ 6, /* GL_4D_COLOR_TEXTURE */
++ 1042, /* GL_PASS_THROUGH_TOKEN */
++ 1098, /* GL_POINT_TOKEN */
++ 655, /* GL_LINE_TOKEN */
++ 1112, /* GL_POLYGON_TOKEN */
++ 74, /* GL_BITMAP_TOKEN */
++ 405, /* GL_DRAW_PIXEL_TOKEN */
++ 271, /* GL_COPY_PIXEL_TOKEN */
++ 648, /* GL_LINE_RESET_TOKEN */
++ 429, /* GL_EXP */
++ 430, /* GL_EXP2 */
++ 304, /* GL_CW */
++ 116, /* GL_CCW */
++ 137, /* GL_COEFF */
++ 1019, /* GL_ORDER */
++ 344, /* GL_DOMAIN */
++ 279, /* GL_CURRENT_COLOR */
++ 282, /* GL_CURRENT_INDEX */
++ 288, /* GL_CURRENT_NORMAL */
++ 300, /* GL_CURRENT_TEXTURE_COORDS */
++ 293, /* GL_CURRENT_RASTER_COLOR */
++ 295, /* GL_CURRENT_RASTER_INDEX */
++ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
++ 296, /* GL_CURRENT_RASTER_POSITION */
++ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
++ 294, /* GL_CURRENT_RASTER_DISTANCE */
++ 1091, /* GL_POINT_SMOOTH */
++ 1080, /* GL_POINT_SIZE */
++ 1090, /* GL_POINT_SIZE_RANGE */
++ 1081, /* GL_POINT_SIZE_GRANULARITY */
++ 649, /* GL_LINE_SMOOTH */
++ 656, /* GL_LINE_WIDTH */
++ 658, /* GL_LINE_WIDTH_RANGE */
++ 657, /* GL_LINE_WIDTH_GRANULARITY */
++ 651, /* GL_LINE_STIPPLE */
++ 652, /* GL_LINE_STIPPLE_PATTERN */
++ 653, /* GL_LINE_STIPPLE_REPEAT */
++ 663, /* GL_LIST_MODE */
++ 822, /* GL_MAX_LIST_NESTING */
++ 660, /* GL_LIST_BASE */
++ 662, /* GL_LIST_INDEX */
++ 1101, /* GL_POLYGON_MODE */
++ 1108, /* GL_POLYGON_SMOOTH */
++ 1110, /* GL_POLYGON_STIPPLE */
++ 414, /* GL_EDGE_FLAG */
++ 272, /* GL_CULL_FACE */
++ 273, /* GL_CULL_FACE_MODE */
++ 509, /* GL_FRONT_FACE */
++ 631, /* GL_LIGHTING */
++ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
++ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
++ 633, /* GL_LIGHT_MODEL_AMBIENT */
++ 1339, /* GL_SHADE_MODEL */
++ 168, /* GL_COLOR_MATERIAL_FACE */
++ 169, /* GL_COLOR_MATERIAL_PARAMETER */
++ 167, /* GL_COLOR_MATERIAL */
++ 457, /* GL_FOG */
++ 479, /* GL_FOG_INDEX */
++ 475, /* GL_FOG_DENSITY */
++ 483, /* GL_FOG_START */
++ 477, /* GL_FOG_END */
++ 480, /* GL_FOG_MODE */
++ 459, /* GL_FOG_COLOR */
++ 333, /* GL_DEPTH_RANGE */
++ 338, /* GL_DEPTH_TEST */
++ 341, /* GL_DEPTH_WRITEMASK */
++ 321, /* GL_DEPTH_CLEAR_VALUE */
++ 332, /* GL_DEPTH_FUNC */
++ 12, /* GL_ACCUM_CLEAR_VALUE */
++ 1418, /* GL_STENCIL_TEST */
++ 1406, /* GL_STENCIL_CLEAR_VALUE */
++ 1408, /* GL_STENCIL_FUNC */
++ 1420, /* GL_STENCIL_VALUE_MASK */
++ 1407, /* GL_STENCIL_FAIL */
++ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
++ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
++ 1417, /* GL_STENCIL_REF */
++ 1421, /* GL_STENCIL_WRITEMASK */
++ 791, /* GL_MATRIX_MODE */
++ 958, /* GL_NORMALIZE */
++ 1727, /* GL_VIEWPORT */
++ 932, /* GL_MODELVIEW_STACK_DEPTH */
++ 1191, /* GL_PROJECTION_STACK_DEPTH */
++ 1616, /* GL_TEXTURE_STACK_DEPTH */
++ 930, /* GL_MODELVIEW_MATRIX */
++ 1190, /* GL_PROJECTION_MATRIX */
++ 1601, /* GL_TEXTURE_MATRIX */
++ 61, /* GL_ATTRIB_STACK_DEPTH */
++ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
++ 43, /* GL_ALPHA_TEST */
++ 44, /* GL_ALPHA_TEST_FUNC */
++ 45, /* GL_ALPHA_TEST_REF */
++ 343, /* GL_DITHER */
++ 78, /* GL_BLEND_DST */
++ 86, /* GL_BLEND_SRC */
++ 75, /* GL_BLEND */
++ 666, /* GL_LOGIC_OP_MODE */
++ 586, /* GL_INDEX_LOGIC_OP */
++ 166, /* GL_COLOR_LOGIC_OP */
++ 67, /* GL_AUX_BUFFERS */
++ 354, /* GL_DRAW_BUFFER */
++ 1223, /* GL_READ_BUFFER */
++ 1320, /* GL_SCISSOR_BOX */
++ 1321, /* GL_SCISSOR_TEST */
++ 585, /* GL_INDEX_CLEAR_VALUE */
++ 590, /* GL_INDEX_WRITEMASK */
++ 163, /* GL_COLOR_CLEAR_VALUE */
++ 205, /* GL_COLOR_WRITEMASK */
++ 587, /* GL_INDEX_MODE */
++ 1287, /* GL_RGBA_MODE */
++ 353, /* GL_DOUBLEBUFFER */
++ 1422, /* GL_STEREO */
++ 1246, /* GL_RENDER_MODE */
++ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
++ 1092, /* GL_POINT_SMOOTH_HINT */
++ 650, /* GL_LINE_SMOOTH_HINT */
++ 1109, /* GL_POLYGON_SMOOTH_HINT */
++ 478, /* GL_FOG_HINT */
++ 1582, /* GL_TEXTURE_GEN_S */
++ 1583, /* GL_TEXTURE_GEN_T */
++ 1581, /* GL_TEXTURE_GEN_R */
++ 1580, /* GL_TEXTURE_GEN_Q */
++ 1056, /* GL_PIXEL_MAP_I_TO_I */
++ 1062, /* GL_PIXEL_MAP_S_TO_S */
++ 1058, /* GL_PIXEL_MAP_I_TO_R */
++ 1054, /* GL_PIXEL_MAP_I_TO_G */
++ 1052, /* GL_PIXEL_MAP_I_TO_B */
++ 1050, /* GL_PIXEL_MAP_I_TO_A */
++ 1060, /* GL_PIXEL_MAP_R_TO_R */
++ 1048, /* GL_PIXEL_MAP_G_TO_G */
++ 1046, /* GL_PIXEL_MAP_B_TO_B */
++ 1044, /* GL_PIXEL_MAP_A_TO_A */
++ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
++ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
++ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
++ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
++ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
++ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
++ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
++ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
++ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
++ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
++ 1649, /* GL_UNPACK_SWAP_BYTES */
++ 1644, /* GL_UNPACK_LSB_FIRST */
++ 1645, /* GL_UNPACK_ROW_LENGTH */
++ 1648, /* GL_UNPACK_SKIP_ROWS */
++ 1647, /* GL_UNPACK_SKIP_PIXELS */
++ 1642, /* GL_UNPACK_ALIGNMENT */
++ 1031, /* GL_PACK_SWAP_BYTES */
++ 1026, /* GL_PACK_LSB_FIRST */
++ 1027, /* GL_PACK_ROW_LENGTH */
++ 1030, /* GL_PACK_SKIP_ROWS */
++ 1029, /* GL_PACK_SKIP_PIXELS */
++ 1023, /* GL_PACK_ALIGNMENT */
++ 744, /* GL_MAP_COLOR */
++ 745, /* GL_MAP_STENCIL */
++ 589, /* GL_INDEX_SHIFT */
++ 588, /* GL_INDEX_OFFSET */
++ 1235, /* GL_RED_SCALE */
++ 1233, /* GL_RED_BIAS */
++ 1744, /* GL_ZOOM_X */
++ 1745, /* GL_ZOOM_Y */
++ 551, /* GL_GREEN_SCALE */
++ 549, /* GL_GREEN_BIAS */
++ 92, /* GL_BLUE_SCALE */
++ 90, /* GL_BLUE_BIAS */
++ 42, /* GL_ALPHA_SCALE */
++ 40, /* GL_ALPHA_BIAS */
++ 334, /* GL_DEPTH_SCALE */
++ 315, /* GL_DEPTH_BIAS */
++ 817, /* GL_MAX_EVAL_ORDER */
++ 821, /* GL_MAX_LIGHTS */
++ 800, /* GL_MAX_CLIP_PLANES */
++ 865, /* GL_MAX_TEXTURE_SIZE */
++ 827, /* GL_MAX_PIXEL_MAP_TABLE */
++ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
++ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
++ 825, /* GL_MAX_NAME_STACK_DEPTH */
++ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
++ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
++ 880, /* GL_MAX_VIEWPORT_DIMS */
++ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
++ 1429, /* GL_SUBPIXEL_BITS */
++ 584, /* GL_INDEX_BITS */
++ 1234, /* GL_RED_BITS */
++ 550, /* GL_GREEN_BITS */
++ 91, /* GL_BLUE_BITS */
++ 41, /* GL_ALPHA_BITS */
++ 316, /* GL_DEPTH_BITS */
++ 1404, /* GL_STENCIL_BITS */
++ 14, /* GL_ACCUM_RED_BITS */
++ 13, /* GL_ACCUM_GREEN_BITS */
++ 10, /* GL_ACCUM_BLUE_BITS */
++ 9, /* GL_ACCUM_ALPHA_BITS */
++ 946, /* GL_NAME_STACK_DEPTH */
++ 62, /* GL_AUTO_NORMAL */
++ 690, /* GL_MAP1_COLOR_4 */
++ 693, /* GL_MAP1_INDEX */
++ 694, /* GL_MAP1_NORMAL */
++ 695, /* GL_MAP1_TEXTURE_COORD_1 */
++ 696, /* GL_MAP1_TEXTURE_COORD_2 */
++ 697, /* GL_MAP1_TEXTURE_COORD_3 */
++ 698, /* GL_MAP1_TEXTURE_COORD_4 */
++ 699, /* GL_MAP1_VERTEX_3 */
++ 700, /* GL_MAP1_VERTEX_4 */
++ 717, /* GL_MAP2_COLOR_4 */
++ 720, /* GL_MAP2_INDEX */
++ 721, /* GL_MAP2_NORMAL */
++ 722, /* GL_MAP2_TEXTURE_COORD_1 */
++ 723, /* GL_MAP2_TEXTURE_COORD_2 */
++ 724, /* GL_MAP2_TEXTURE_COORD_3 */
++ 725, /* GL_MAP2_TEXTURE_COORD_4 */
++ 726, /* GL_MAP2_VERTEX_3 */
++ 727, /* GL_MAP2_VERTEX_4 */
++ 691, /* GL_MAP1_GRID_DOMAIN */
++ 692, /* GL_MAP1_GRID_SEGMENTS */
++ 718, /* GL_MAP2_GRID_DOMAIN */
++ 719, /* GL_MAP2_GRID_SEGMENTS */
++ 1506, /* GL_TEXTURE_1D */
++ 1508, /* GL_TEXTURE_2D */
++ 439, /* GL_FEEDBACK_BUFFER_POINTER */
++ 440, /* GL_FEEDBACK_BUFFER_SIZE */
++ 441, /* GL_FEEDBACK_BUFFER_TYPE */
++ 1330, /* GL_SELECTION_BUFFER_POINTER */
++ 1331, /* GL_SELECTION_BUFFER_SIZE */
++ 1619, /* GL_TEXTURE_WIDTH */
++ 1587, /* GL_TEXTURE_HEIGHT */
++ 1543, /* GL_TEXTURE_COMPONENTS */
++ 1527, /* GL_TEXTURE_BORDER_COLOR */
++ 1526, /* GL_TEXTURE_BORDER */
++ 345, /* GL_DONT_CARE */
++ 437, /* GL_FASTEST */
++ 954, /* GL_NICEST */
++ 47, /* GL_AMBIENT */
++ 342, /* GL_DIFFUSE */
++ 1373, /* GL_SPECULAR */
++ 1113, /* GL_POSITION */
++ 1376, /* GL_SPOT_DIRECTION */
++ 1377, /* GL_SPOT_EXPONENT */
++ 1375, /* GL_SPOT_CUTOFF */
++ 245, /* GL_CONSTANT_ATTENUATION */
++ 640, /* GL_LINEAR_ATTENUATION */
++ 1210, /* GL_QUADRATIC_ATTENUATION */
++ 219, /* GL_COMPILE */
++ 220, /* GL_COMPILE_AND_EXECUTE */
++ 111, /* GL_BYTE */
++ 1650, /* GL_UNSIGNED_BYTE */
++ 1344, /* GL_SHORT */
++ 1659, /* GL_UNSIGNED_SHORT */
++ 592, /* GL_INT */
++ 1653, /* GL_UNSIGNED_INT */
++ 444, /* GL_FLOAT */
++ 1, /* GL_2_BYTES */
++ 5, /* GL_3_BYTES */
++ 7, /* GL_4_BYTES */
++ 352, /* GL_DOUBLE */
++ 123, /* GL_CLEAR */
++ 49, /* GL_AND */
++ 51, /* GL_AND_REVERSE */
++ 269, /* GL_COPY */
++ 50, /* GL_AND_INVERTED */
++ 956, /* GL_NOOP */
++ 1740, /* GL_XOR */
++ 1018, /* GL_OR */
++ 957, /* GL_NOR */
++ 427, /* GL_EQUIV */
++ 618, /* GL_INVERT */
++ 1021, /* GL_OR_REVERSE */
++ 270, /* GL_COPY_INVERTED */
++ 1020, /* GL_OR_INVERTED */
++ 947, /* GL_NAND */
++ 1335, /* GL_SET */
++ 424, /* GL_EMISSION */
++ 1343, /* GL_SHININESS */
++ 48, /* GL_AMBIENT_AND_DIFFUSE */
++ 165, /* GL_COLOR_INDEXES */
++ 897, /* GL_MODELVIEW */
++ 1189, /* GL_PROJECTION */
++ 1441, /* GL_TEXTURE */
++ 138, /* GL_COLOR */
++ 313, /* GL_DEPTH */
++ 1395, /* GL_STENCIL */
++ 164, /* GL_COLOR_INDEX */
++ 1409, /* GL_STENCIL_INDEX */
++ 322, /* GL_DEPTH_COMPONENT */
++ 1230, /* GL_RED */
++ 548, /* GL_GREEN */
++ 89, /* GL_BLUE */
++ 31, /* GL_ALPHA */
++ 1254, /* GL_RGB */
++ 1273, /* GL_RGBA */
++ 668, /* GL_LUMINANCE */
++ 689, /* GL_LUMINANCE_ALPHA */
++ 73, /* GL_BITMAP */
++ 1069, /* GL_POINT */
++ 638, /* GL_LINE */
++ 442, /* GL_FILL */
++ 1239, /* GL_RENDER */
++ 438, /* GL_FEEDBACK */
++ 1329, /* GL_SELECT */
++ 443, /* GL_FLAT */
++ 1348, /* GL_SMOOTH */
++ 619, /* GL_KEEP */
++ 1248, /* GL_REPLACE */
++ 575, /* GL_INCR */
++ 309, /* GL_DECR */
++ 1674, /* GL_VENDOR */
++ 1245, /* GL_RENDERER */
++ 1675, /* GL_VERSION */
++ 431, /* GL_EXTENSIONS */
++ 1294, /* GL_S */
++ 1432, /* GL_T */
++ 1220, /* GL_R */
++ 1209, /* GL_Q */
++ 933, /* GL_MODULATE */
++ 308, /* GL_DECAL */
++ 1577, /* GL_TEXTURE_ENV_MODE */
++ 1576, /* GL_TEXTURE_ENV_COLOR */
++ 1575, /* GL_TEXTURE_ENV */
++ 432, /* GL_EYE_LINEAR */
++ 980, /* GL_OBJECT_LINEAR */
++ 1374, /* GL_SPHERE_MAP */
++ 1579, /* GL_TEXTURE_GEN_MODE */
++ 982, /* GL_OBJECT_PLANE */
++ 433, /* GL_EYE_PLANE */
++ 948, /* GL_NEAREST */
++ 639, /* GL_LINEAR */
++ 952, /* GL_NEAREST_MIPMAP_NEAREST */
++ 644, /* GL_LINEAR_MIPMAP_NEAREST */
++ 951, /* GL_NEAREST_MIPMAP_LINEAR */
++ 643, /* GL_LINEAR_MIPMAP_LINEAR */
++ 1600, /* GL_TEXTURE_MAG_FILTER */
++ 1608, /* GL_TEXTURE_MIN_FILTER */
++ 1621, /* GL_TEXTURE_WRAP_S */
++ 1622, /* GL_TEXTURE_WRAP_T */
++ 117, /* GL_CLAMP */
++ 1247, /* GL_REPEAT */
++ 1107, /* GL_POLYGON_OFFSET_UNITS */
++ 1106, /* GL_POLYGON_OFFSET_POINT */
++ 1105, /* GL_POLYGON_OFFSET_LINE */
++ 1221, /* GL_R3_G3_B2 */
++ 1671, /* GL_V2F */
++ 1672, /* GL_V3F */
++ 114, /* GL_C4UB_V2F */
++ 115, /* GL_C4UB_V3F */
++ 112, /* GL_C3F_V3F */
++ 945, /* GL_N3F_V3F */
++ 113, /* GL_C4F_N3F_V3F */
++ 1437, /* GL_T2F_V3F */
++ 1439, /* GL_T4F_V4F */
++ 1435, /* GL_T2F_C4UB_V3F */
++ 1433, /* GL_T2F_C3F_V3F */
++ 1436, /* GL_T2F_N3F_V3F */
++ 1434, /* GL_T2F_C4F_N3F_V3F */
++ 1438, /* GL_T4F_C4F_N3F_V4F */
++ 130, /* GL_CLIP_PLANE0 */
++ 131, /* GL_CLIP_PLANE1 */
++ 132, /* GL_CLIP_PLANE2 */
++ 133, /* GL_CLIP_PLANE3 */
++ 134, /* GL_CLIP_PLANE4 */
++ 135, /* GL_CLIP_PLANE5 */
++ 623, /* GL_LIGHT0 */
++ 624, /* GL_LIGHT1 */
++ 625, /* GL_LIGHT2 */
++ 626, /* GL_LIGHT3 */
++ 627, /* GL_LIGHT4 */
++ 628, /* GL_LIGHT5 */
++ 629, /* GL_LIGHT6 */
++ 630, /* GL_LIGHT7 */
++ 552, /* GL_HINT_BIT */
++ 247, /* GL_CONSTANT_COLOR */
++ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
++ 242, /* GL_CONSTANT_ALPHA */
++ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
++ 76, /* GL_BLEND_COLOR */
++ 512, /* GL_FUNC_ADD */
++ 881, /* GL_MIN */
++ 793, /* GL_MAX */
++ 81, /* GL_BLEND_EQUATION */
++ 516, /* GL_FUNC_SUBTRACT */
++ 514, /* GL_FUNC_REVERSE_SUBTRACT */
++ 250, /* GL_CONVOLUTION_1D */
++ 251, /* GL_CONVOLUTION_2D */
++ 1332, /* GL_SEPARABLE_2D */
++ 254, /* GL_CONVOLUTION_BORDER_MODE */
++ 258, /* GL_CONVOLUTION_FILTER_SCALE */
++ 256, /* GL_CONVOLUTION_FILTER_BIAS */
++ 1231, /* GL_REDUCE */
++ 260, /* GL_CONVOLUTION_FORMAT */
++ 264, /* GL_CONVOLUTION_WIDTH */
++ 262, /* GL_CONVOLUTION_HEIGHT */
++ 808, /* GL_MAX_CONVOLUTION_WIDTH */
++ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
++ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
++ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
++ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
++ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
++ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
++ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
++ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
++ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
++ 553, /* GL_HISTOGRAM */
++ 1193, /* GL_PROXY_HISTOGRAM */
++ 569, /* GL_HISTOGRAM_WIDTH */
++ 559, /* GL_HISTOGRAM_FORMAT */
++ 565, /* GL_HISTOGRAM_RED_SIZE */
++ 561, /* GL_HISTOGRAM_GREEN_SIZE */
++ 556, /* GL_HISTOGRAM_BLUE_SIZE */
++ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
++ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
++ 567, /* GL_HISTOGRAM_SINK */
++ 882, /* GL_MINMAX */
++ 884, /* GL_MINMAX_FORMAT */
++ 886, /* GL_MINMAX_SINK */
++ 1440, /* GL_TABLE_TOO_LARGE_EXT */
++ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
++ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
++ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
++ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
++ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
++ 1104, /* GL_POLYGON_OFFSET_FILL */
++ 1103, /* GL_POLYGON_OFFSET_FACTOR */
++ 1102, /* GL_POLYGON_OFFSET_BIAS */
++ 1251, /* GL_RESCALE_NORMAL */
++ 36, /* GL_ALPHA4 */
++ 38, /* GL_ALPHA8 */
++ 32, /* GL_ALPHA12 */
++ 34, /* GL_ALPHA16 */
++ 679, /* GL_LUMINANCE4 */
++ 685, /* GL_LUMINANCE8 */
++ 669, /* GL_LUMINANCE12 */
++ 675, /* GL_LUMINANCE16 */
++ 680, /* GL_LUMINANCE4_ALPHA4 */
++ 683, /* GL_LUMINANCE6_ALPHA2 */
++ 686, /* GL_LUMINANCE8_ALPHA8 */
++ 672, /* GL_LUMINANCE12_ALPHA4 */
++ 670, /* GL_LUMINANCE12_ALPHA12 */
++ 676, /* GL_LUMINANCE16_ALPHA16 */
++ 593, /* GL_INTENSITY */
++ 598, /* GL_INTENSITY4 */
++ 600, /* GL_INTENSITY8 */
++ 594, /* GL_INTENSITY12 */
++ 596, /* GL_INTENSITY16 */
++ 1263, /* GL_RGB2_EXT */
++ 1264, /* GL_RGB4 */
++ 1267, /* GL_RGB5 */
++ 1271, /* GL_RGB8 */
++ 1255, /* GL_RGB10 */
++ 1259, /* GL_RGB12 */
++ 1261, /* GL_RGB16 */
++ 1278, /* GL_RGBA2 */
++ 1280, /* GL_RGBA4 */
++ 1268, /* GL_RGB5_A1 */
++ 1284, /* GL_RGBA8 */
++ 1256, /* GL_RGB10_A2 */
++ 1274, /* GL_RGBA12 */
++ 1276, /* GL_RGBA16 */
++ 1613, /* GL_TEXTURE_RED_SIZE */
++ 1585, /* GL_TEXTURE_GREEN_SIZE */
++ 1524, /* GL_TEXTURE_BLUE_SIZE */
++ 1511, /* GL_TEXTURE_ALPHA_SIZE */
++ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
++ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
++ 1249, /* GL_REPLACE_EXT */
++ 1197, /* GL_PROXY_TEXTURE_1D */
++ 1200, /* GL_PROXY_TEXTURE_2D */
++ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
++ 1610, /* GL_TEXTURE_PRIORITY */
++ 1615, /* GL_TEXTURE_RESIDENT */
++ 1514, /* GL_TEXTURE_BINDING_1D */
++ 1516, /* GL_TEXTURE_BINDING_2D */
++ 1518, /* GL_TEXTURE_BINDING_3D */
++ 1028, /* GL_PACK_SKIP_IMAGES */
++ 1024, /* GL_PACK_IMAGE_HEIGHT */
++ 1646, /* GL_UNPACK_SKIP_IMAGES */
++ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
++ 1510, /* GL_TEXTURE_3D */
++ 1203, /* GL_PROXY_TEXTURE_3D */
++ 1572, /* GL_TEXTURE_DEPTH */
++ 1620, /* GL_TEXTURE_WRAP_R */
++ 794, /* GL_MAX_3D_TEXTURE_SIZE */
++ 1676, /* GL_VERTEX_ARRAY */
++ 959, /* GL_NORMAL_ARRAY */
++ 139, /* GL_COLOR_ARRAY */
++ 578, /* GL_INDEX_ARRAY */
++ 1551, /* GL_TEXTURE_COORD_ARRAY */
++ 415, /* GL_EDGE_FLAG_ARRAY */
++ 1681, /* GL_VERTEX_ARRAY_SIZE */
++ 1683, /* GL_VERTEX_ARRAY_TYPE */
++ 1682, /* GL_VERTEX_ARRAY_STRIDE */
++ 964, /* GL_NORMAL_ARRAY_TYPE */
++ 963, /* GL_NORMAL_ARRAY_STRIDE */
++ 143, /* GL_COLOR_ARRAY_SIZE */
++ 145, /* GL_COLOR_ARRAY_TYPE */
++ 144, /* GL_COLOR_ARRAY_STRIDE */
++ 583, /* GL_INDEX_ARRAY_TYPE */
++ 582, /* GL_INDEX_ARRAY_STRIDE */
++ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
++ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
++ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
++ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
++ 1680, /* GL_VERTEX_ARRAY_POINTER */
++ 962, /* GL_NORMAL_ARRAY_POINTER */
++ 142, /* GL_COLOR_ARRAY_POINTER */
++ 581, /* GL_INDEX_ARRAY_POINTER */
++ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
++ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
++ 938, /* GL_MULTISAMPLE */
++ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
++ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
++ 1313, /* GL_SAMPLE_COVERAGE */
++ 1310, /* GL_SAMPLE_BUFFERS */
++ 1301, /* GL_SAMPLES */
++ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
++ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
++ 170, /* GL_COLOR_MATRIX */
++ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
++ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
++ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
++ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
++ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
++ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
++ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
++ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
++ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
++ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
++ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
++ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
++ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
++ 80, /* GL_BLEND_DST_RGB */
++ 88, /* GL_BLEND_SRC_RGB */
++ 79, /* GL_BLEND_DST_ALPHA */
++ 87, /* GL_BLEND_SRC_ALPHA */
++ 176, /* GL_COLOR_TABLE */
++ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
++ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
++ 1192, /* GL_PROXY_COLOR_TABLE */
++ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
++ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
++ 200, /* GL_COLOR_TABLE_SCALE */
++ 180, /* GL_COLOR_TABLE_BIAS */
++ 185, /* GL_COLOR_TABLE_FORMAT */
++ 202, /* GL_COLOR_TABLE_WIDTH */
++ 197, /* GL_COLOR_TABLE_RED_SIZE */
++ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
++ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
++ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
++ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
++ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
++ 71, /* GL_BGR */
++ 72, /* GL_BGRA */
++ 816, /* GL_MAX_ELEMENTS_VERTICES */
++ 815, /* GL_MAX_ELEMENTS_INDICES */
++ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
++ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
++ 1086, /* GL_POINT_SIZE_MIN */
++ 1082, /* GL_POINT_SIZE_MAX */
++ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
++ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
++ 118, /* GL_CLAMP_TO_BORDER */
++ 121, /* GL_CLAMP_TO_EDGE */
++ 1609, /* GL_TEXTURE_MIN_LOD */
++ 1607, /* GL_TEXTURE_MAX_LOD */
++ 1513, /* GL_TEXTURE_BASE_LEVEL */
++ 1606, /* GL_TEXTURE_MAX_LEVEL */
++ 572, /* GL_IGNORE_BORDER_HP */
++ 246, /* GL_CONSTANT_BORDER_HP */
++ 1250, /* GL_REPLICATE_BORDER_HP */
++ 252, /* GL_CONVOLUTION_BORDER_COLOR */
++ 987, /* GL_OCCLUSION_TEST_HP */
++ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
++ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
++ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
++ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
++ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
++ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
++ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
++ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
++ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
++ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
++ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
++ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
++ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
++ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
++ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
++ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
++ 518, /* GL_GENERATE_MIPMAP */
++ 519, /* GL_GENERATE_MIPMAP_HINT */
++ 481, /* GL_FOG_OFFSET_SGIX */
++ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
++ 1542, /* GL_TEXTURE_COMPARE_SGIX */
++ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
++ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
++ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
++ 323, /* GL_DEPTH_COMPONENT16 */
++ 326, /* GL_DEPTH_COMPONENT24 */
++ 329, /* GL_DEPTH_COMPONENT32 */
++ 274, /* GL_CULL_VERTEX_EXT */
++ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
++ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
++ 1737, /* GL_WRAP_BORDER_SUN */
++ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
++ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
++ 1345, /* GL_SINGLE_COLOR */
++ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
++ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
++ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
++ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
++ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
++ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
++ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
++ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
++ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
++ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
++ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
++ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
++ 889, /* GL_MIRRORED_REPEAT */
++ 1289, /* GL_RGB_S3TC */
++ 1266, /* GL_RGB4_S3TC */
++ 1288, /* GL_RGBA_S3TC */
++ 1283, /* GL_RGBA4_S3TC */
++ 1286, /* GL_RGBA_DXT5_S3TC */
++ 1281, /* GL_RGBA4_DXT5_S3TC */
++ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
++ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
++ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
++ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
++ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
++ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
++ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
++ 468, /* GL_FOG_COORDINATE_SOURCE */
++ 460, /* GL_FOG_COORD */
++ 484, /* GL_FRAGMENT_DEPTH */
++ 280, /* GL_CURRENT_FOG_COORD */
++ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
++ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
++ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
++ 462, /* GL_FOG_COORDINATE_ARRAY */
++ 174, /* GL_COLOR_SUM */
++ 299, /* GL_CURRENT_SECONDARY_COLOR */
++ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
++ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
++ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
++ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
++ 1322, /* GL_SECONDARY_COLOR_ARRAY */
++ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
++ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
++ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
++ 1442, /* GL_TEXTURE0 */
++ 1444, /* GL_TEXTURE1 */
++ 1466, /* GL_TEXTURE2 */
++ 1488, /* GL_TEXTURE3 */
++ 1494, /* GL_TEXTURE4 */
++ 1496, /* GL_TEXTURE5 */
++ 1498, /* GL_TEXTURE6 */
++ 1500, /* GL_TEXTURE7 */
++ 1502, /* GL_TEXTURE8 */
++ 1504, /* GL_TEXTURE9 */
++ 1445, /* GL_TEXTURE10 */
++ 1447, /* GL_TEXTURE11 */
++ 1449, /* GL_TEXTURE12 */
++ 1451, /* GL_TEXTURE13 */
++ 1453, /* GL_TEXTURE14 */
++ 1455, /* GL_TEXTURE15 */
++ 1457, /* GL_TEXTURE16 */
++ 1459, /* GL_TEXTURE17 */
++ 1461, /* GL_TEXTURE18 */
++ 1463, /* GL_TEXTURE19 */
++ 1467, /* GL_TEXTURE20 */
++ 1469, /* GL_TEXTURE21 */
++ 1471, /* GL_TEXTURE22 */
++ 1473, /* GL_TEXTURE23 */
++ 1475, /* GL_TEXTURE24 */
++ 1477, /* GL_TEXTURE25 */
++ 1479, /* GL_TEXTURE26 */
++ 1481, /* GL_TEXTURE27 */
++ 1483, /* GL_TEXTURE28 */
++ 1485, /* GL_TEXTURE29 */
++ 1489, /* GL_TEXTURE30 */
++ 1491, /* GL_TEXTURE31 */
++ 18, /* GL_ACTIVE_TEXTURE */
++ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
++ 867, /* GL_MAX_TEXTURE_UNITS */
++ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
++ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
++ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
++ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
++ 1430, /* GL_SUBTRACT */
++ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
++ 222, /* GL_COMPRESSED_ALPHA */
++ 226, /* GL_COMPRESSED_LUMINANCE */
++ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
++ 224, /* GL_COMPRESSED_INTENSITY */
++ 230, /* GL_COMPRESSED_RGB */
++ 231, /* GL_COMPRESSED_RGBA */
++ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
++ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
++ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
++ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
++ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
++ 335, /* GL_DEPTH_STENCIL_NV */
++ 1655, /* GL_UNSIGNED_INT_24_8_NV */
++ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
++ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
++ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
++ 1578, /* GL_TEXTURE_FILTER_CONTROL */
++ 1593, /* GL_TEXTURE_LOD_BIAS */
++ 207, /* GL_COMBINE4 */
++ 857, /* GL_MAX_SHININESS_NV */
++ 858, /* GL_MAX_SPOT_EXPONENT_NV */
++ 576, /* GL_INCR_WRAP */
++ 310, /* GL_DECR_WRAP */
++ 909, /* GL_MODELVIEW1_ARB */
++ 965, /* GL_NORMAL_MAP */
++ 1236, /* GL_REFLECTION_MAP */
++ 1558, /* GL_TEXTURE_CUBE_MAP */
++ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
++ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
++ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
++ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
++ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
++ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
++ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
++ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
++ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
++ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
++ 476, /* GL_FOG_DISTANCE_MODE_NV */
++ 435, /* GL_EYE_RADIAL_NV */
++ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
++ 206, /* GL_COMBINE */
++ 213, /* GL_COMBINE_RGB */
++ 208, /* GL_COMBINE_ALPHA */
++ 1290, /* GL_RGB_SCALE */
++ 24, /* GL_ADD_SIGNED */
++ 603, /* GL_INTERPOLATE */
++ 241, /* GL_CONSTANT */
++ 1155, /* GL_PRIMARY_COLOR */
++ 1152, /* GL_PREVIOUS */
++ 1356, /* GL_SOURCE0_RGB */
++ 1362, /* GL_SOURCE1_RGB */
++ 1368, /* GL_SOURCE2_RGB */
++ 1372, /* GL_SOURCE3_RGB_NV */
++ 1353, /* GL_SOURCE0_ALPHA */
++ 1359, /* GL_SOURCE1_ALPHA */
++ 1365, /* GL_SOURCE2_ALPHA */
++ 1371, /* GL_SOURCE3_ALPHA_NV */
++ 1001, /* GL_OPERAND0_RGB */
++ 1007, /* GL_OPERAND1_RGB */
++ 1013, /* GL_OPERAND2_RGB */
++ 1017, /* GL_OPERAND3_RGB_NV */
++ 998, /* GL_OPERAND0_ALPHA */
++ 1004, /* GL_OPERAND1_ALPHA */
++ 1010, /* GL_OPERAND2_ALPHA */
++ 1016, /* GL_OPERAND3_ALPHA_NV */
++ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
++ 1741, /* GL_YCBCR_422_APPLE */
++ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
++ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
++ 1347, /* GL_SLICE_ACCUM_SUN */
++ 1212, /* GL_QUAD_MESH_SUN */
++ 1639, /* GL_TRIANGLE_MESH_SUN */
++ 1715, /* GL_VERTEX_PROGRAM_ARB */
++ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
++ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
++ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
++ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
++ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
++ 301, /* GL_CURRENT_VERTEX_ATTRIB */
++ 1168, /* GL_PROGRAM_LENGTH_ARB */
++ 1182, /* GL_PROGRAM_STRING_ARB */
++ 931, /* GL_MODELVIEW_PROJECTION_NV */
++ 571, /* GL_IDENTITY_NV */
++ 616, /* GL_INVERSE_NV */
++ 1632, /* GL_TRANSPOSE_NV */
++ 617, /* GL_INVERSE_TRANSPOSE_NV */
++ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
++ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
++ 747, /* GL_MATRIX0_NV */
++ 759, /* GL_MATRIX1_NV */
++ 771, /* GL_MATRIX2_NV */
++ 775, /* GL_MATRIX3_NV */
++ 777, /* GL_MATRIX4_NV */
++ 779, /* GL_MATRIX5_NV */
++ 781, /* GL_MATRIX6_NV */
++ 783, /* GL_MATRIX7_NV */
++ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
++ 283, /* GL_CURRENT_MATRIX_ARB */
++ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
++ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
++ 1180, /* GL_PROGRAM_PARAMETER_NV */
++ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
++ 1184, /* GL_PROGRAM_TARGET_NV */
++ 1181, /* GL_PROGRAM_RESIDENT_NV */
++ 1624, /* GL_TRACK_MATRIX_NV */
++ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
++ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
++ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
++ 320, /* GL_DEPTH_CLAMP_NV */
++ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
++ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
++ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
++ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
++ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
++ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
++ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
++ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
++ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
++ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
++ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
++ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
++ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
++ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
++ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
++ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
++ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
++ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
++ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
++ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
++ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
++ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
++ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
++ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
++ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
++ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
++ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
++ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
++ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
++ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
++ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
++ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
++ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
++ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
++ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
++ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
++ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
++ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
++ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
++ 1161, /* GL_PROGRAM_BINDING_ARB */
++ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
++ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
++ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
++ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
++ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
++ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
++ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
++ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
++ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
++ 1544, /* GL_TEXTURE_COMPRESSED */
++ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
++ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
++ 879, /* GL_MAX_VERTEX_UNITS_ARB */
++ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
++ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
++ 1714, /* GL_VERTEX_BLEND_ARB */
++ 303, /* GL_CURRENT_WEIGHT_ARB */
++ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
++ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
++ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
++ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
++ 1729, /* GL_WEIGHT_ARRAY_ARB */
++ 346, /* GL_DOT3_RGB */
++ 347, /* GL_DOT3_RGBA */
++ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
++ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
++ 939, /* GL_MULTISAMPLE_3DFX */
++ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
++ 1302, /* GL_SAMPLES_3DFX */
++ 920, /* GL_MODELVIEW2_ARB */
++ 923, /* GL_MODELVIEW3_ARB */
++ 924, /* GL_MODELVIEW4_ARB */
++ 925, /* GL_MODELVIEW5_ARB */
++ 926, /* GL_MODELVIEW6_ARB */
++ 927, /* GL_MODELVIEW7_ARB */
++ 928, /* GL_MODELVIEW8_ARB */
++ 929, /* GL_MODELVIEW9_ARB */
++ 899, /* GL_MODELVIEW10_ARB */
++ 900, /* GL_MODELVIEW11_ARB */
++ 901, /* GL_MODELVIEW12_ARB */
++ 902, /* GL_MODELVIEW13_ARB */
++ 903, /* GL_MODELVIEW14_ARB */
++ 904, /* GL_MODELVIEW15_ARB */
++ 905, /* GL_MODELVIEW16_ARB */
++ 906, /* GL_MODELVIEW17_ARB */
++ 907, /* GL_MODELVIEW18_ARB */
++ 908, /* GL_MODELVIEW19_ARB */
++ 910, /* GL_MODELVIEW20_ARB */
++ 911, /* GL_MODELVIEW21_ARB */
++ 912, /* GL_MODELVIEW22_ARB */
++ 913, /* GL_MODELVIEW23_ARB */
++ 914, /* GL_MODELVIEW24_ARB */
++ 915, /* GL_MODELVIEW25_ARB */
++ 916, /* GL_MODELVIEW26_ARB */
++ 917, /* GL_MODELVIEW27_ARB */
++ 918, /* GL_MODELVIEW28_ARB */
++ 919, /* GL_MODELVIEW29_ARB */
++ 921, /* GL_MODELVIEW30_ARB */
++ 922, /* GL_MODELVIEW31_ARB */
++ 351, /* GL_DOT3_RGB_EXT */
++ 349, /* GL_DOT3_RGBA_EXT */
++ 893, /* GL_MIRROR_CLAMP_EXT */
++ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
++ 934, /* GL_MODULATE_ADD_ATI */
++ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
++ 936, /* GL_MODULATE_SUBTRACT_ATI */
++ 1742, /* GL_YCBCR_MESA */
++ 1025, /* GL_PACK_INVERT_MESA */
++ 306, /* GL_DEBUG_OBJECT_MESA */
++ 307, /* GL_DEBUG_PRINT_MESA */
++ 305, /* GL_DEBUG_ASSERT_MESA */
++ 107, /* GL_BUFFER_SIZE */
++ 109, /* GL_BUFFER_USAGE */
++ 1398, /* GL_STENCIL_BACK_FUNC */
++ 1397, /* GL_STENCIL_BACK_FAIL */
++ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
++ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
++ 485, /* GL_FRAGMENT_PROGRAM_ARB */
++ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
++ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
++ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
++ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
++ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
++ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
++ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
++ 812, /* GL_MAX_DRAW_BUFFERS */
++ 355, /* GL_DRAW_BUFFER0 */
++ 358, /* GL_DRAW_BUFFER1 */
++ 379, /* GL_DRAW_BUFFER2 */
++ 382, /* GL_DRAW_BUFFER3 */
++ 385, /* GL_DRAW_BUFFER4 */
++ 388, /* GL_DRAW_BUFFER5 */
++ 391, /* GL_DRAW_BUFFER6 */
++ 394, /* GL_DRAW_BUFFER7 */
++ 397, /* GL_DRAW_BUFFER8 */
++ 400, /* GL_DRAW_BUFFER9 */
++ 359, /* GL_DRAW_BUFFER10 */
++ 362, /* GL_DRAW_BUFFER11 */
++ 365, /* GL_DRAW_BUFFER12 */
++ 368, /* GL_DRAW_BUFFER13 */
++ 371, /* GL_DRAW_BUFFER14 */
++ 374, /* GL_DRAW_BUFFER15 */
++ 82, /* GL_BLEND_EQUATION_ALPHA */
++ 792, /* GL_MATRIX_PALETTE_ARB */
++ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
++ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
++ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
++ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
++ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
++ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
++ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
++ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
++ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
++ 1573, /* GL_TEXTURE_DEPTH_SIZE */
++ 339, /* GL_DEPTH_TEXTURE_MODE */
++ 1539, /* GL_TEXTURE_COMPARE_MODE */
++ 1537, /* GL_TEXTURE_COMPARE_FUNC */
++ 217, /* GL_COMPARE_R_TO_TEXTURE */
++ 1093, /* GL_POINT_SPRITE */
++ 266, /* GL_COORD_REPLACE */
++ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
++ 1214, /* GL_QUERY_COUNTER_BITS */
++ 291, /* GL_CURRENT_QUERY */
++ 1216, /* GL_QUERY_RESULT */
++ 1218, /* GL_QUERY_RESULT_AVAILABLE */
++ 873, /* GL_MAX_VERTEX_ATTRIBS */
++ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
++ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
++ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
++ 859, /* GL_MAX_TEXTURE_COORDS */
++ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
++ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
++ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
++ 1165, /* GL_PROGRAM_FORMAT_ARB */
++ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
++ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
++ 317, /* GL_DEPTH_BOUNDS_EXT */
++ 52, /* GL_ARRAY_BUFFER */
++ 420, /* GL_ELEMENT_ARRAY_BUFFER */
++ 54, /* GL_ARRAY_BUFFER_BINDING */
++ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
++ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
++ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
++ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
++ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
++ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
++ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
++ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
++ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
++ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
++ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
++ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
++ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
++ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
++ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
++ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
++ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
++ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
++ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
++ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
++ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
++ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
++ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
++ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
++ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
++ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
++ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
++ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
++ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
++ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
++ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
++ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
++ 1226, /* GL_READ_ONLY */
++ 1738, /* GL_WRITE_ONLY */
++ 1228, /* GL_READ_WRITE */
++ 101, /* GL_BUFFER_ACCESS */
++ 103, /* GL_BUFFER_MAPPED */
++ 105, /* GL_BUFFER_MAP_POINTER */
++ 1623, /* GL_TIME_ELAPSED_EXT */
++ 746, /* GL_MATRIX0_ARB */
++ 758, /* GL_MATRIX1_ARB */
++ 770, /* GL_MATRIX2_ARB */
++ 774, /* GL_MATRIX3_ARB */
++ 776, /* GL_MATRIX4_ARB */
++ 778, /* GL_MATRIX5_ARB */
++ 780, /* GL_MATRIX6_ARB */
++ 782, /* GL_MATRIX7_ARB */
++ 784, /* GL_MATRIX8_ARB */
++ 785, /* GL_MATRIX9_ARB */
++ 748, /* GL_MATRIX10_ARB */
++ 749, /* GL_MATRIX11_ARB */
++ 750, /* GL_MATRIX12_ARB */
++ 751, /* GL_MATRIX13_ARB */
++ 752, /* GL_MATRIX14_ARB */
++ 753, /* GL_MATRIX15_ARB */
++ 754, /* GL_MATRIX16_ARB */
++ 755, /* GL_MATRIX17_ARB */
++ 756, /* GL_MATRIX18_ARB */
++ 757, /* GL_MATRIX19_ARB */
++ 760, /* GL_MATRIX20_ARB */
++ 761, /* GL_MATRIX21_ARB */
++ 762, /* GL_MATRIX22_ARB */
++ 763, /* GL_MATRIX23_ARB */
++ 764, /* GL_MATRIX24_ARB */
++ 765, /* GL_MATRIX25_ARB */
++ 766, /* GL_MATRIX26_ARB */
++ 767, /* GL_MATRIX27_ARB */
++ 768, /* GL_MATRIX28_ARB */
++ 769, /* GL_MATRIX29_ARB */
++ 772, /* GL_MATRIX30_ARB */
++ 773, /* GL_MATRIX31_ARB */
++ 1425, /* GL_STREAM_DRAW */
++ 1427, /* GL_STREAM_READ */
++ 1423, /* GL_STREAM_COPY */
++ 1391, /* GL_STATIC_DRAW */
++ 1393, /* GL_STATIC_READ */
++ 1389, /* GL_STATIC_COPY */
++ 410, /* GL_DYNAMIC_DRAW */
++ 412, /* GL_DYNAMIC_READ */
++ 408, /* GL_DYNAMIC_COPY */
++ 535, /* GL_GL_PIXEL_PACK_BUFFER */
++ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
++ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
++ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
++ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
++ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
++ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
++ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
++ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
++ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
++ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
++ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
++ 1304, /* GL_SAMPLES_PASSED */
++ 486, /* GL_FRAGMENT_SHADER */
++ 1724, /* GL_VERTEX_SHADER */
++ 1178, /* GL_PROGRAM_OBJECT_ARB */
++ 1336, /* GL_SHADER_OBJECT_ARB */
++ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
++ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
++ 871, /* GL_MAX_VARYING_FLOATS */
++ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
++ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
++ 985, /* GL_OBJECT_TYPE_ARB */
++ 1338, /* GL_SHADER_TYPE */
++ 451, /* GL_FLOAT_VEC2 */
++ 453, /* GL_FLOAT_VEC3 */
++ 455, /* GL_FLOAT_VEC4 */
++ 606, /* GL_INT_VEC2 */
++ 608, /* GL_INT_VEC3 */
++ 610, /* GL_INT_VEC4 */
++ 93, /* GL_BOOL */
++ 95, /* GL_BOOL_VEC2 */
++ 97, /* GL_BOOL_VEC3 */
++ 99, /* GL_BOOL_VEC4 */
++ 445, /* GL_FLOAT_MAT2 */
++ 447, /* GL_FLOAT_MAT3 */
++ 449, /* GL_FLOAT_MAT4 */
++ 1295, /* GL_SAMPLER_1D */
++ 1297, /* GL_SAMPLER_2D */
++ 1299, /* GL_SAMPLER_3D */
++ 1300, /* GL_SAMPLER_CUBE */
++ 1296, /* GL_SAMPLER_1D_SHADOW */
++ 1298, /* GL_SAMPLER_2D_SHADOW */
++ 529, /* GL_GL_FLOAT_MAT2x3 */
++ 530, /* GL_GL_FLOAT_MAT2x4 */
++ 531, /* GL_GL_FLOAT_MAT3x2 */
++ 532, /* GL_GL_FLOAT_MAT3x4 */
++ 533, /* GL_GL_FLOAT_MAT4x2 */
++ 534, /* GL_GL_FLOAT_MAT4x3 */
++ 312, /* GL_DELETE_STATUS */
++ 221, /* GL_COMPILE_STATUS */
++ 659, /* GL_LINK_STATUS */
++ 1673, /* GL_VALIDATE_STATUS */
++ 591, /* GL_INFO_LOG_LENGTH */
++ 56, /* GL_ATTACHED_SHADERS */
++ 20, /* GL_ACTIVE_UNIFORMS */
++ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
++ 1337, /* GL_SHADER_SOURCE_LENGTH */
++ 15, /* GL_ACTIVE_ATTRIBUTES */
++ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
++ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
++ 1340, /* GL_SHADING_LANGUAGE_VERSION */
++ 290, /* GL_CURRENT_PROGRAM */
++ 1034, /* GL_PALETTE4_RGB8_OES */
++ 1036, /* GL_PALETTE4_RGBA8_OES */
++ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
++ 1035, /* GL_PALETTE4_RGBA4_OES */
++ 1033, /* GL_PALETTE4_RGB5_A1_OES */
++ 1039, /* GL_PALETTE8_RGB8_OES */
++ 1041, /* GL_PALETTE8_RGBA8_OES */
++ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
++ 1040, /* GL_PALETTE8_RGBA4_OES */
++ 1038, /* GL_PALETTE8_RGB5_A1_OES */
++ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
++ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
++ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
++ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
++ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
++ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
++ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
++ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
++ 543, /* GL_GL_SRGB */
++ 544, /* GL_GL_SRGB8 */
++ 546, /* GL_GL_SRGB_ALPHA */
++ 545, /* GL_GL_SRGB8_ALPHA8 */
++ 542, /* GL_GL_SLUMINANCE_ALPHA */
++ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
++ 539, /* GL_GL_SLUMINANCE */
++ 540, /* GL_GL_SLUMINANCE8 */
++ 526, /* GL_GL_COMPRESSED_SRGB */
++ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
++ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
++ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
++ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
++ 667, /* GL_LOWER_LEFT */
++ 1670, /* GL_UPPER_LEFT */
++ 1401, /* GL_STENCIL_BACK_REF */
++ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
++ 1403, /* GL_STENCIL_BACK_WRITEMASK */
++ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
++ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
++ 1225, /* GL_READ_FRAMEBUFFER_EXT */
++ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
++ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
++ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
++ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
++ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
++ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
++ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
++ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
++ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
++ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
++ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
++ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
++ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
++ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
++ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
++ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
++ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
++ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
++ 146, /* GL_COLOR_ATTACHMENT0_EXT */
++ 153, /* GL_COLOR_ATTACHMENT1_EXT */
++ 154, /* GL_COLOR_ATTACHMENT2_EXT */
++ 155, /* GL_COLOR_ATTACHMENT3_EXT */
++ 156, /* GL_COLOR_ATTACHMENT4_EXT */
++ 157, /* GL_COLOR_ATTACHMENT5_EXT */
++ 158, /* GL_COLOR_ATTACHMENT6_EXT */
++ 159, /* GL_COLOR_ATTACHMENT7_EXT */
++ 160, /* GL_COLOR_ATTACHMENT8_EXT */
++ 161, /* GL_COLOR_ATTACHMENT9_EXT */
++ 147, /* GL_COLOR_ATTACHMENT10_EXT */
++ 148, /* GL_COLOR_ATTACHMENT11_EXT */
++ 149, /* GL_COLOR_ATTACHMENT12_EXT */
++ 150, /* GL_COLOR_ATTACHMENT13_EXT */
++ 151, /* GL_COLOR_ATTACHMENT14_EXT */
++ 152, /* GL_COLOR_ATTACHMENT15_EXT */
++ 314, /* GL_DEPTH_ATTACHMENT_EXT */
++ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
++ 497, /* GL_FRAMEBUFFER_EXT */
++ 1241, /* GL_RENDERBUFFER_EXT */
++ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
++ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
++ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
++ 1414, /* GL_STENCIL_INDEX_EXT */
++ 1411, /* GL_STENCIL_INDEX1_EXT */
++ 1412, /* GL_STENCIL_INDEX4_EXT */
++ 1413, /* GL_STENCIL_INDEX8_EXT */
++ 1410, /* GL_STENCIL_INDEX16_EXT */
++ 428, /* GL_EVAL_BIT */
++ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
++ 661, /* GL_LIST_BIT */
++ 1523, /* GL_TEXTURE_BIT */
++ 1319, /* GL_SCISSOR_BIT */
++ 29, /* GL_ALL_ATTRIB_BITS */
++ 941, /* GL_MULTISAMPLE_BIT */
++ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
++};
++
++#define Elements(x) sizeof(x)/sizeof(*x)
++
++typedef int (*cfunc)(const void *, const void *);
++
++/**
++ * Compare a key name to an element in the \c all_enums array.
++ *
++ * \c bsearch always passes the key as the first parameter and the pointer
++ * to the array element as the second parameter. We can elimiate some
++ * extra work by taking advantage of that fact.
++ *
++ * \param a Pointer to the desired enum name.
++ * \param b Pointer to an element of the \c all_enums array.
++ */
++static int compar_name( const char *a, const enum_elt *b )
++{
++ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
++}
++
++/**
++ * Compare a key enum value to an element in the \c all_enums array.
++ *
++ * \c bsearch always passes the key as the first parameter and the pointer
++ * to the array element as the second parameter. We can elimiate some
++ * extra work by taking advantage of that fact.
++ *
++ * \param a Pointer to the desired enum name.
++ * \param b Pointer to an index into the \c all_enums array.
++ */
++static int compar_nr( const int *a, const unsigned *b )
++{
++ return a[0] - all_enums[*b].n;
++}
++
++
++static char token_tmp[20];
++
++const char *_mesa_lookup_enum_by_nr( int nr )
++{
++ unsigned * i;
++
++ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
++ sizeof(reduced_enums[0]), (cfunc) compar_nr );
++
++ if ( i != NULL ) {
++ return & enum_string_table[ all_enums[ *i ].offset ];
++ }
++ else {
++ /* this is not re-entrant safe, no big deal here */
++ _mesa_sprintf(token_tmp, "0x%x", nr);
++ return token_tmp;
++ }
++}
++
++int _mesa_lookup_enum_by_name( const char *symbol )
++{
++ enum_elt * f = NULL;
++
++ if ( symbol != NULL ) {
++ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
++ sizeof( enum_elt ), (cfunc) compar_name );
++ }
++
++ return (f != NULL) ? f->n : -1;
++}
++
++
+Index: qemu-0.12.4/target-i386/mesa_get.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_get.c
+@@ -0,0 +1,5563 @@
++
++/***
++ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
++ ***/
++
++#include "glheader.h"
++#include "context.h"
++#include "enable.h"
++#include "extensions.h"
++#include "fbobject.h"
++#include "get.h"
++#include "macros.h"
++#include "mtypes.h"
++#include "state.h"
++#include "texcompress.h"
++
++
++#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
++
++#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
++
++#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
++#define ENUM_TO_INT(E) ( (GLint) (E) )
++#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
++
++#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
++#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
++
++
++/*
++ * Check if named extension is enabled, if not generate error and return.
++ */
++#define CHECK_EXT1(EXT1, FUNC) \
++ if (!ctx->Extensions.EXT1) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of two extensions is enabled.
++ */
++#define CHECK_EXT2(EXT1, EXT2, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of three extensions is enabled.
++ */
++#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
++ !ctx->Extensions.EXT3) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++/*
++ * Check if either of four extensions is enabled.
++ */
++#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
++ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
++ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
++ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
++ return; \
++ }
++
++
++void GLAPIENTRY
++_mesa_GetBooleanv( GLenum pname, GLboolean *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetBooleanv &&
++ ctx->Driver.GetBooleanv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = ctx->Color.AlphaEnabled;
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = ctx->Eval.AutoNormal;
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
++ break;
++ case GL_BLEND:
++ params[0] = ctx->Color.BlendEnabled;
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
++ break;
++ case GL_BLUE_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = ctx->Light.ColorMaterialEnabled;
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
++ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
++ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
++ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
++ break;
++ case GL_CULL_FACE:
++ params[0] = ctx->Polygon.CullFlag;
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = ctx->Current.RasterPosValid;
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = ctx->Depth.Test;
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = ctx->Depth.Mask;
++ break;
++ case GL_DITHER:
++ params[0] = ctx->Color.DitherFlag;
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.EdgeFlag;
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = ctx->Fog.Enabled;
++ break;
++ case GL_FOG_COLOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
++ break;
++ case GL_FOG_END:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
++ break;
++ case GL_GREEN_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
++ break;
++ case GL_INDEX_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
++ break;
++ case GL_INDEX_MODE:
++ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
++ break;
++ case GL_LIGHT0:
++ params[0] = ctx->Light.Light[0].Enabled;
++ break;
++ case GL_LIGHT1:
++ params[0] = ctx->Light.Light[1].Enabled;
++ break;
++ case GL_LIGHT2:
++ params[0] = ctx->Light.Light[2].Enabled;
++ break;
++ case GL_LIGHT3:
++ params[0] = ctx->Light.Light[3].Enabled;
++ break;
++ case GL_LIGHT4:
++ params[0] = ctx->Light.Light[4].Enabled;
++ break;
++ case GL_LIGHT5:
++ params[0] = ctx->Light.Light[5].Enabled;
++ break;
++ case GL_LIGHT6:
++ params[0] = ctx->Light.Light[6].Enabled;
++ break;
++ case GL_LIGHT7:
++ params[0] = ctx->Light.Light[7].Enabled;
++ break;
++ case GL_LIGHTING:
++ params[0] = ctx->Light.Enabled;
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = ctx->Light.Model.LocalViewer;
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = ctx->Light.Model.TwoSide;
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = ctx->Line.SmoothFlag;
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = ctx->Line.StippleFlag;
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
++ break;
++ case GL_LIST_BASE:
++ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
++ break;
++ case GL_LIST_INDEX:
++ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_BOOLEAN(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = ctx->Color.IndexLogicOpEnabled;
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = ctx->Color.ColorLogicOpEnabled;
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = ctx->Eval.Map1Color4;
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = ctx->Eval.Map1Index;
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = ctx->Eval.Map1Normal;
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = ctx->Eval.Map1TextureCoord1;
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = ctx->Eval.Map1TextureCoord2;
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = ctx->Eval.Map1TextureCoord3;
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = ctx->Eval.Map1TextureCoord4;
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = ctx->Eval.Map1Vertex3;
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = ctx->Eval.Map1Vertex4;
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = ctx->Eval.Map2Color4;
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
++ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = ctx->Eval.Map2Index;
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = ctx->Eval.Map2Normal;
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = ctx->Eval.Map2TextureCoord1;
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = ctx->Eval.Map2TextureCoord2;
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = ctx->Eval.Map2TextureCoord3;
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = ctx->Eval.Map2TextureCoord4;
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = ctx->Eval.Map2Vertex3;
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = ctx->Eval.Map2Vertex4;
++ break;
++ case GL_MAP_COLOR:
++ params[0] = ctx->Pixel.MapColorFlag;
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = ctx->Pixel.MapStencilFlag;
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
++ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
++ break;
++ case GL_NORMALIZE:
++ params[0] = ctx->Transform.Normalize;
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = ctx->Pack.LsbFirst;
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = ctx->Pack.SwapBytes;
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = ctx->Pack.Invert;
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
++ break;
++ case GL_POINT_SIZE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = ctx->Point.SmoothFlag;
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = ctx->Polygon.SmoothFlag;
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = ctx->Polygon.StippleFlag;
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
++ break;
++ case GL_RED_BITS:
++ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
++ break;
++ case GL_RED_SCALE:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = ctx->Transform.RescaleNormals;
++ break;
++ case GL_RGBA_MODE:
++ params[0] = ctx->DrawBuffer->Visual.rgbMode;
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
++ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
++ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
++ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = ctx->Scissor.Enabled;
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = ctx->Texture.SharedPalette;
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = ctx->Stencil.Enabled;
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STEREO:
++ params[0] = ctx->DrawBuffer->Visual.stereoMode;
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = FLOAT_TO_BOOLEAN(color[0]);
++ params[1] = FLOAT_TO_BOOLEAN(color[1]);
++ params[2] = FLOAT_TO_BOOLEAN(color[2]);
++ params[3] = FLOAT_TO_BOOLEAN(color[3]);
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = ctx->Unpack.LsbFirst;
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = ctx->Unpack.SwapBytes;
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = ctx->Unpack.ClientStorage;
++ break;
++ case GL_VIEWPORT:
++ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
++ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
++ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
++ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
++ break;
++ case GL_ZOOM_X:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
++ break;
++ case GL_ZOOM_Y:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Color.Enabled;
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = ctx->Array.ArrayObj->Index.Enabled;
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = INT_TO_BOOLEAN(0);
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Convolution1DEnabled;
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Convolution2DEnabled;
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = ctx->Pixel.Separable2DEnabled;
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetBooleanv");
++ params[0] = ctx->Pixel.HistogramEnabled;
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetBooleanv");
++ params[0] = ctx->Pixel.MinMaxEnabled;
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.ColorTableEnabled;
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetBooleanv");
++ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
++ params[0] = ctx->Fog.ColorSumEnabled;
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
++ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
++ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.Enabled;
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleAlphaToCoverage;
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleAlphaToOne;
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleCoverage;
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = ctx->Multisample.SampleCoverageInvert;
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
++ params[0] = ctx->Transform.RasterPositionUnclipped;
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
++ params[0] = ctx->Point.PointSprite;
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[0];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[1];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[2];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[3];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[4];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[5];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[6];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[7];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[8];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[9];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[10];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[11];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[12];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[13];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[14];
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->Eval.Map1Attrib[15];
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.Enabled;
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
++ params[0] = ctx->Stencil.TestTwoSide;
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.Enabled;
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.PointSizeEnabled;
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->VertexProgram.TwoSideEnabled;
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
++ params[0] = ctx->CurrentStack->Depth + 1;
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
++ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
++ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
++ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
++ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
++ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
++ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
++ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
++ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
++ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
++ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
++ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
++ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
++ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
++ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
++ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.Enabled;
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
++ params[0] = ctx->Depth.BoundsTest;
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
++ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
++ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = ctx->FragmentProgram.CallbackEnabled;
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = ctx->VertexProgram.CallbackEnabled;
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_BOOLEAN(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(6);
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(8);
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(2);
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(8);
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(16);
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = GL_TRUE;
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(3);
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(3);
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
++ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
++ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
++ }
++}
++
++void GLAPIENTRY
++_mesa_GetFloatv( GLenum pname, GLfloat *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetFloatv &&
++ ctx->Driver.GetFloatv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = ctx->Accum.ClearColor[0];
++ params[1] = ctx->Accum.ClearColor[1];
++ params[2] = ctx->Accum.ClearColor[2];
++ params[3] = ctx->Accum.ClearColor[3];
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = ctx->Pixel.AlphaBias;
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = ctx->Pixel.AlphaScale;
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = ctx->Color.AlphaRef;
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->AttribStackDepth);
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
++ break;
++ case GL_BLEND:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = ctx->Color.BlendColor[0];
++ params[1] = ctx->Color.BlendColor[1];
++ params[2] = ctx->Color.BlendColor[2];
++ params[3] = ctx->Color.BlendColor[3];
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = ctx->Pixel.BlueBias;
++ break;
++ case GL_BLUE_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = ctx->Pixel.BlueScale;
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = ctx->Color.ClearColor[0];
++ params[1] = ctx->Color.ClearColor[1];
++ params[2] = ctx->Color.ClearColor[2];
++ params[3] = ctx->Color.ClearColor[3];
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
++ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
++ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
++ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
++ break;
++ case GL_CULL_FACE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = ctx->Current.RasterColor[0];
++ params[1] = ctx->Current.RasterColor[1];
++ params[2] = ctx->Current.RasterColor[2];
++ params[3] = ctx->Current.RasterColor[3];
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = ctx->Current.RasterDistance;
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = ctx->Current.RasterIndex;
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = ctx->Current.RasterPos[0];
++ params[1] = ctx->Current.RasterPos[1];
++ params[2] = ctx->Current.RasterPos[2];
++ params[3] = ctx->Current.RasterPos[3];
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = ctx->Current.RasterSecondaryColor[0];
++ params[1] = ctx->Current.RasterSecondaryColor[1];
++ params[2] = ctx->Current.RasterSecondaryColor[2];
++ params[3] = ctx->Current.RasterSecondaryColor[3];
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
++ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
++ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
++ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = ctx->Pixel.DepthBias;
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = ctx->Depth.Clear;
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = ctx->Viewport.Near;
++ params[1] = ctx->Viewport.Far;
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = ctx->Pixel.DepthScale;
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
++ break;
++ case GL_DITHER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
++ break;
++ case GL_FOG_COLOR:
++ params[0] = ctx->Fog.Color[0];
++ params[1] = ctx->Fog.Color[1];
++ params[2] = ctx->Fog.Color[2];
++ params[3] = ctx->Fog.Color[3];
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = ctx->Fog.Density;
++ break;
++ case GL_FOG_END:
++ params[0] = ctx->Fog.End;
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = ctx->Fog.Index;
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = ctx->Fog.Start;
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = ctx->Pixel.GreenBias;
++ break;
++ case GL_GREEN_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = ctx->Pixel.GreenScale;
++ break;
++ case GL_INDEX_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = (GLfloat)(ctx->Color.ClearIndex);
++ break;
++ case GL_INDEX_MODE:
++ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Color.IndexMask);
++ break;
++ case GL_LIGHT0:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
++ break;
++ case GL_LIGHT1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
++ break;
++ case GL_LIGHT2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
++ break;
++ case GL_LIGHT3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
++ break;
++ case GL_LIGHT4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
++ break;
++ case GL_LIGHT5:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
++ break;
++ case GL_LIGHT6:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
++ break;
++ case GL_LIGHT7:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
++ break;
++ case GL_LIGHTING:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = ctx->Light.Model.Ambient[0];
++ params[1] = ctx->Light.Model.Ambient[1];
++ params[2] = ctx->Light.Model.Ambient[2];
++ params[3] = ctx->Light.Model.Ambient[3];
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = (GLfloat)(ctx->Line.StipplePattern);
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = (GLfloat)(ctx->Line.StippleFactor);
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = ctx->Line.Width;
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = ctx->Const.LineWidthGranularity;
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = ctx->Const.MinLineWidthAA;
++ params[1] = ctx->Const.MaxLineWidthAA;
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = ctx->Const.MinLineWidth;
++ params[1] = ctx->Const.MaxLineWidth;
++ break;
++ case GL_LIST_BASE:
++ params[0] = (GLfloat)(ctx->List.ListBase);
++ break;
++ case GL_LIST_INDEX:
++ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_FLOAT(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = ctx->Eval.MapGrid1u1;
++ params[1] = ctx->Eval.MapGrid1u2;
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = ctx->Eval.MapGrid2u1;
++ params[1] = ctx->Eval.MapGrid2u2;
++ params[2] = ctx->Eval.MapGrid2v1;
++ params[3] = ctx->Eval.MapGrid2v2;
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
++ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
++ break;
++ case GL_MAP_COLOR:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = (GLfloat)(MAX_EVAL_ORDER);
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = (GLfloat)(ctx->Const.MaxLights);
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = (GLfloat)(MAX_LIST_NESTING);
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
++ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
++ break;
++ case GL_NORMALIZE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = (GLfloat)(ctx->Pack.Alignment);
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = (GLfloat)(ctx->Pack.RowLength);
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = (GLfloat)(ctx->Pack.SkipRows);
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = (GLfloat)(ctx->Pack.SkipImages);
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
++ break;
++ case GL_POINT_SIZE:
++ params[0] = ctx->Point.Size;
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = ctx->Const.PointSizeGranularity;
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = ctx->Const.MinPointSizeAA;
++ params[1] = ctx->Const.MaxPointSizeAA;
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = ctx->Const.MinPointSize;
++ params[1] = ctx->Const.MaxPointSize;
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = ctx->Point.MinSize;
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = ctx->Point.MaxSize;
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = ctx->Point.Threshold;
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = ctx->Point.Params[0];
++ params[1] = ctx->Point.Params[1];
++ params[2] = ctx->Point.Params[2];
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = ctx->Polygon.OffsetUnits;
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = ctx->Polygon.OffsetFactor ;
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = ctx->Polygon.OffsetUnits ;
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = ctx->Pixel.RedBias;
++ break;
++ case GL_RED_BITS:
++ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
++ break;
++ case GL_RED_SCALE:
++ params[0] = ctx->Pixel.RedScale;
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
++ break;
++ case GL_RGBA_MODE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = (GLfloat)(ctx->Scissor.X);
++ params[1] = (GLfloat)(ctx->Scissor.Y);
++ params[2] = (GLfloat)(ctx->Scissor.Width);
++ params[3] = (GLfloat)(ctx->Scissor.Height);
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = (GLfloat)(ctx->Select.BufferSize);
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = (GLfloat)(ctx->Stencil.Clear);
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STEREO:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = color[0];
++ params[1] = color[1];
++ params[2] = color[2];
++ params[3] = color[3];
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = (GLfloat)(ctx->Unpack.Alignment);
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = (GLfloat)(ctx->Unpack.RowLength);
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
++ break;
++ case GL_VIEWPORT:
++ params[0] = (GLfloat)(ctx->Viewport.X);
++ params[1] = (GLfloat)(ctx->Viewport.Y);
++ params[2] = (GLfloat)(ctx->Viewport.Width);
++ params[3] = (GLfloat)(ctx->Viewport.Height);
++ break;
++ case GL_ZOOM_X:
++ params[0] = ctx->Pixel.ZoomX;
++ break;
++ case GL_ZOOM_Y:
++ params[0] = ctx->Pixel.ZoomY;
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = (GLfloat)(0);
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetFloatv");
++ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
++ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.LockFirst);
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.LockCount);
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[0];
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[1];
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[2];
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixScale[3];
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[0];
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[1];
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[2];
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = ctx->Pixel.PostColorMatrixBias[3];
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[0];
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[1];
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[2];
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionScale[3];
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[0];
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[1];
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[2];
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetFloatv");
++ params[0] = ctx->Pixel.PostConvolutionBias[3];
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
++ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
++ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
++ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
++ params[0] = ctx->Const.MaxTextureLodBias;
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
++ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = ctx->Multisample.SampleCoverageValue;
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
++ params[0] = ctx->Const.MaxShininess;
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
++ params[0] = ctx->Const.MaxSpotExponent;
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[1];
++ params[2] = matrix[2];
++ params[3] = matrix[3];
++ params[4] = matrix[4];
++ params[5] = matrix[5];
++ params[6] = matrix[6];
++ params[7] = matrix[7];
++ params[8] = matrix[8];
++ params[9] = matrix[9];
++ params[10] = matrix[10];
++ params[11] = matrix[11];
++ params[12] = matrix[12];
++ params[13] = matrix[13];
++ params[14] = matrix[14];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = matrix[0];
++ params[1] = matrix[4];
++ params[2] = matrix[8];
++ params[3] = matrix[12];
++ params[4] = matrix[1];
++ params[5] = matrix[5];
++ params[6] = matrix[9];
++ params[7] = matrix[13];
++ params[8] = matrix[2];
++ params[9] = matrix[6];
++ params[10] = matrix[10];
++ params[11] = matrix[14];
++ params[12] = matrix[3];
++ params[13] = matrix[7];
++ params[14] = matrix[11];
++ params[15] = matrix[15];
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Program.ErrorPos);
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
++ params[0] = ctx->Depth.BoundsMin;
++ params[1] = ctx->Depth.BoundsMax;
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetFloatv");
++ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_FLOAT(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.ColorReadType);
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(6);
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(8);
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(2);
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(8);
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(16);
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(3);
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(3);
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
++ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
++ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
++ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
++ }
++}
++
++void GLAPIENTRY
++_mesa_GetIntegerv( GLenum pname, GLint *params )
++{
++ GET_CURRENT_CONTEXT(ctx);
++ ASSERT_OUTSIDE_BEGIN_END(ctx);
++
++ if (!params)
++ return;
++
++ if (ctx->NewState)
++ _mesa_update_state(ctx);
++
++ if (ctx->Driver.GetIntegerv &&
++ ctx->Driver.GetIntegerv(ctx, pname, params))
++ return;
++
++ switch (pname) {
++ case GL_ACCUM_RED_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
++ break;
++ case GL_ACCUM_GREEN_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
++ break;
++ case GL_ACCUM_BLUE_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
++ break;
++ case GL_ACCUM_ALPHA_BITS:
++ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
++ break;
++ case GL_ACCUM_CLEAR_VALUE:
++ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
++ break;
++ case GL_ALPHA_BIAS:
++ params[0] = IROUND(ctx->Pixel.AlphaBias);
++ break;
++ case GL_ALPHA_BITS:
++ params[0] = ctx->DrawBuffer->Visual.alphaBits;
++ break;
++ case GL_ALPHA_SCALE:
++ params[0] = IROUND(ctx->Pixel.AlphaScale);
++ break;
++ case GL_ALPHA_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
++ break;
++ case GL_ALPHA_TEST_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
++ break;
++ case GL_ALPHA_TEST_REF:
++ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
++ break;
++ case GL_ATTRIB_STACK_DEPTH:
++ params[0] = ctx->AttribStackDepth;
++ break;
++ case GL_AUTO_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
++ break;
++ case GL_AUX_BUFFERS:
++ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
++ break;
++ case GL_BLEND:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
++ break;
++ case GL_BLEND_DST:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_SRC_RGB_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
++ break;
++ case GL_BLEND_DST_RGB_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
++ break;
++ case GL_BLEND_SRC_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
++ break;
++ case GL_BLEND_DST_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
++ break;
++ case GL_BLEND_EQUATION:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
++ break;
++ case GL_BLEND_EQUATION_ALPHA_EXT:
++ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
++ break;
++ case GL_BLEND_COLOR_EXT:
++ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
++ break;
++ case GL_BLUE_BIAS:
++ params[0] = IROUND(ctx->Pixel.BlueBias);
++ break;
++ case GL_BLUE_BITS:
++ params[0] = ctx->DrawBuffer->Visual.blueBits;
++ break;
++ case GL_BLUE_SCALE:
++ params[0] = IROUND(ctx->Pixel.BlueScale);
++ break;
++ case GL_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = ctx->ClientAttribStackDepth;
++ break;
++ case GL_CLIP_PLANE0:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
++ break;
++ case GL_CLIP_PLANE1:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
++ break;
++ case GL_CLIP_PLANE2:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
++ break;
++ case GL_CLIP_PLANE3:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
++ break;
++ case GL_CLIP_PLANE4:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
++ break;
++ case GL_CLIP_PLANE5:
++ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
++ break;
++ case GL_COLOR_CLEAR_VALUE:
++ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
++ break;
++ case GL_COLOR_MATERIAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
++ break;
++ case GL_COLOR_MATERIAL_FACE:
++ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
++ break;
++ case GL_COLOR_MATERIAL_PARAMETER:
++ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
++ break;
++ case GL_COLOR_WRITEMASK:
++ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
++ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
++ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
++ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
++ break;
++ case GL_CULL_FACE:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
++ break;
++ case GL_CULL_FACE_MODE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
++ break;
++ case GL_CURRENT_COLOR:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
++ }
++ break;
++ case GL_CURRENT_INDEX:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
++ }
++ break;
++ case GL_CURRENT_NORMAL:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
++ }
++ break;
++ case GL_CURRENT_RASTER_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
++ break;
++ case GL_CURRENT_RASTER_DISTANCE:
++ params[0] = IROUND(ctx->Current.RasterDistance);
++ break;
++ case GL_CURRENT_RASTER_INDEX:
++ params[0] = IROUND(ctx->Current.RasterIndex);
++ break;
++ case GL_CURRENT_RASTER_POSITION:
++ params[0] = IROUND(ctx->Current.RasterPos[0]);
++ params[1] = IROUND(ctx->Current.RasterPos[1]);
++ params[2] = IROUND(ctx->Current.RasterPos[2]);
++ params[3] = IROUND(ctx->Current.RasterPos[3]);
++ break;
++ case GL_CURRENT_RASTER_SECONDARY_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
++ break;
++ case GL_CURRENT_RASTER_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
++ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
++ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
++ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
++ }
++ break;
++ case GL_CURRENT_RASTER_POSITION_VALID:
++ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
++ break;
++ case GL_CURRENT_TEXTURE_COORDS:
++ {
++ const GLuint texUnit = ctx->Texture.CurrentUnit;
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
++ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
++ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
++ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
++ }
++ break;
++ case GL_DEPTH_BIAS:
++ params[0] = IROUND(ctx->Pixel.DepthBias);
++ break;
++ case GL_DEPTH_BITS:
++ params[0] = ctx->DrawBuffer->Visual.depthBits;
++ break;
++ case GL_DEPTH_CLEAR_VALUE:
++ params[0] = IROUND(ctx->Depth.Clear);
++ break;
++ case GL_DEPTH_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Depth.Func);
++ break;
++ case GL_DEPTH_RANGE:
++ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
++ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
++ break;
++ case GL_DEPTH_SCALE:
++ params[0] = IROUND(ctx->Pixel.DepthScale);
++ break;
++ case GL_DEPTH_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
++ break;
++ case GL_DEPTH_WRITEMASK:
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
++ break;
++ case GL_DITHER:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
++ break;
++ case GL_DOUBLEBUFFER:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
++ break;
++ case GL_DRAW_BUFFER:
++ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_EDGE_FLAG:
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
++ }
++ break;
++ case GL_FEEDBACK_BUFFER_SIZE:
++ params[0] = ctx->Feedback.BufferSize;
++ break;
++ case GL_FEEDBACK_BUFFER_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
++ break;
++ case GL_FOG:
++ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
++ break;
++ case GL_FOG_COLOR:
++ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
++ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
++ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
++ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
++ break;
++ case GL_FOG_DENSITY:
++ params[0] = IROUND(ctx->Fog.Density);
++ break;
++ case GL_FOG_END:
++ params[0] = IROUND(ctx->Fog.End);
++ break;
++ case GL_FOG_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
++ break;
++ case GL_FOG_INDEX:
++ params[0] = IROUND(ctx->Fog.Index);
++ break;
++ case GL_FOG_MODE:
++ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
++ break;
++ case GL_FOG_START:
++ params[0] = IROUND(ctx->Fog.Start);
++ break;
++ case GL_FRONT_FACE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
++ break;
++ case GL_GREEN_BIAS:
++ params[0] = IROUND(ctx->Pixel.GreenBias);
++ break;
++ case GL_GREEN_BITS:
++ params[0] = ctx->DrawBuffer->Visual.greenBits;
++ break;
++ case GL_GREEN_SCALE:
++ params[0] = IROUND(ctx->Pixel.GreenScale);
++ break;
++ case GL_INDEX_BITS:
++ params[0] = ctx->DrawBuffer->Visual.indexBits;
++ break;
++ case GL_INDEX_CLEAR_VALUE:
++ params[0] = ctx->Color.ClearIndex;
++ break;
++ case GL_INDEX_MODE:
++ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_INDEX_OFFSET:
++ params[0] = ctx->Pixel.IndexOffset;
++ break;
++ case GL_INDEX_SHIFT:
++ params[0] = ctx->Pixel.IndexShift;
++ break;
++ case GL_INDEX_WRITEMASK:
++ params[0] = ctx->Color.IndexMask;
++ break;
++ case GL_LIGHT0:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
++ break;
++ case GL_LIGHT1:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
++ break;
++ case GL_LIGHT2:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
++ break;
++ case GL_LIGHT3:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
++ break;
++ case GL_LIGHT4:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
++ break;
++ case GL_LIGHT5:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
++ break;
++ case GL_LIGHT6:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
++ break;
++ case GL_LIGHT7:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
++ break;
++ case GL_LIGHTING:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
++ break;
++ case GL_LIGHT_MODEL_AMBIENT:
++ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
++ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
++ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
++ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
++ break;
++ case GL_LIGHT_MODEL_COLOR_CONTROL:
++ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
++ break;
++ case GL_LIGHT_MODEL_LOCAL_VIEWER:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
++ break;
++ case GL_LIGHT_MODEL_TWO_SIDE:
++ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
++ break;
++ case GL_LINE_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
++ break;
++ case GL_LINE_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
++ break;
++ case GL_LINE_STIPPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
++ break;
++ case GL_LINE_STIPPLE_PATTERN:
++ params[0] = ctx->Line.StipplePattern;
++ break;
++ case GL_LINE_STIPPLE_REPEAT:
++ params[0] = ctx->Line.StippleFactor;
++ break;
++ case GL_LINE_WIDTH:
++ params[0] = IROUND(ctx->Line.Width);
++ break;
++ case GL_LINE_WIDTH_GRANULARITY:
++ params[0] = IROUND(ctx->Const.LineWidthGranularity);
++ break;
++ case GL_LINE_WIDTH_RANGE:
++ params[0] = IROUND(ctx->Const.MinLineWidthAA);
++ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
++ break;
++ case GL_ALIASED_LINE_WIDTH_RANGE:
++ params[0] = IROUND(ctx->Const.MinLineWidth);
++ params[1] = IROUND(ctx->Const.MaxLineWidth);
++ break;
++ case GL_LIST_BASE:
++ params[0] = ctx->List.ListBase;
++ break;
++ case GL_LIST_INDEX:
++ params[0] = ctx->ListState.CurrentListNum;
++ break;
++ case GL_LIST_MODE:
++ {
++ GLenum mode;
++ if (!ctx->CompileFlag)
++ mode = 0;
++ else if (ctx->ExecuteFlag)
++ mode = GL_COMPILE_AND_EXECUTE;
++ else
++ mode = GL_COMPILE;
++ params[0] = ENUM_TO_INT(mode);
++ }
++ break;
++ case GL_INDEX_LOGIC_OP:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
++ break;
++ case GL_COLOR_LOGIC_OP:
++ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
++ break;
++ case GL_LOGIC_OP_MODE:
++ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
++ break;
++ case GL_MAP1_COLOR_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
++ break;
++ case GL_MAP1_GRID_DOMAIN:
++ params[0] = IROUND(ctx->Eval.MapGrid1u1);
++ params[1] = IROUND(ctx->Eval.MapGrid1u2);
++ break;
++ case GL_MAP1_GRID_SEGMENTS:
++ params[0] = ctx->Eval.MapGrid1un;
++ break;
++ case GL_MAP1_INDEX:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
++ break;
++ case GL_MAP1_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
++ break;
++ case GL_MAP1_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
++ break;
++ case GL_MAP1_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
++ break;
++ case GL_MAP1_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
++ break;
++ case GL_MAP1_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
++ break;
++ case GL_MAP1_VERTEX_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
++ break;
++ case GL_MAP1_VERTEX_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
++ break;
++ case GL_MAP2_COLOR_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
++ break;
++ case GL_MAP2_GRID_DOMAIN:
++ params[0] = IROUND(ctx->Eval.MapGrid2u1);
++ params[1] = IROUND(ctx->Eval.MapGrid2u2);
++ params[2] = IROUND(ctx->Eval.MapGrid2v1);
++ params[3] = IROUND(ctx->Eval.MapGrid2v2);
++ break;
++ case GL_MAP2_GRID_SEGMENTS:
++ params[0] = ctx->Eval.MapGrid2un;
++ params[1] = ctx->Eval.MapGrid2vn;
++ break;
++ case GL_MAP2_INDEX:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
++ break;
++ case GL_MAP2_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
++ break;
++ case GL_MAP2_TEXTURE_COORD_1:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
++ break;
++ case GL_MAP2_TEXTURE_COORD_2:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
++ break;
++ case GL_MAP2_TEXTURE_COORD_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
++ break;
++ case GL_MAP2_TEXTURE_COORD_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
++ break;
++ case GL_MAP2_VERTEX_3:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
++ break;
++ case GL_MAP2_VERTEX_4:
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
++ break;
++ case GL_MAP_COLOR:
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
++ break;
++ case GL_MAP_STENCIL:
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
++ break;
++ case GL_MATRIX_MODE:
++ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
++ break;
++ case GL_MAX_ATTRIB_STACK_DEPTH:
++ params[0] = MAX_ATTRIB_STACK_DEPTH;
++ break;
++ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
++ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
++ break;
++ case GL_MAX_CLIP_PLANES:
++ params[0] = ctx->Const.MaxClipPlanes;
++ break;
++ case GL_MAX_ELEMENTS_VERTICES:
++ params[0] = ctx->Const.MaxArrayLockSize;
++ break;
++ case GL_MAX_ELEMENTS_INDICES:
++ params[0] = ctx->Const.MaxArrayLockSize;
++ break;
++ case GL_MAX_EVAL_ORDER:
++ params[0] = MAX_EVAL_ORDER;
++ break;
++ case GL_MAX_LIGHTS:
++ params[0] = ctx->Const.MaxLights;
++ break;
++ case GL_MAX_LIST_NESTING:
++ params[0] = MAX_LIST_NESTING;
++ break;
++ case GL_MAX_MODELVIEW_STACK_DEPTH:
++ params[0] = MAX_MODELVIEW_STACK_DEPTH;
++ break;
++ case GL_MAX_NAME_STACK_DEPTH:
++ params[0] = MAX_NAME_STACK_DEPTH;
++ break;
++ case GL_MAX_PIXEL_MAP_TABLE:
++ params[0] = MAX_PIXEL_MAP_TABLE;
++ break;
++ case GL_MAX_PROJECTION_STACK_DEPTH:
++ params[0] = MAX_PROJECTION_STACK_DEPTH;
++ break;
++ case GL_MAX_TEXTURE_SIZE:
++ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
++ break;
++ case GL_MAX_3D_TEXTURE_SIZE:
++ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
++ break;
++ case GL_MAX_TEXTURE_STACK_DEPTH:
++ params[0] = MAX_TEXTURE_STACK_DEPTH;
++ break;
++ case GL_MAX_VIEWPORT_DIMS:
++ params[0] = ctx->Const.MaxViewportWidth;
++ params[1] = ctx->Const.MaxViewportHeight;
++ break;
++ case GL_MODELVIEW_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_MODELVIEW_STACK_DEPTH:
++ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
++ break;
++ case GL_NAME_STACK_DEPTH:
++ params[0] = ctx->Select.NameStackDepth;
++ break;
++ case GL_NORMALIZE:
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
++ break;
++ case GL_PACK_ALIGNMENT:
++ params[0] = ctx->Pack.Alignment;
++ break;
++ case GL_PACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
++ break;
++ case GL_PACK_ROW_LENGTH:
++ params[0] = ctx->Pack.RowLength;
++ break;
++ case GL_PACK_SKIP_PIXELS:
++ params[0] = ctx->Pack.SkipPixels;
++ break;
++ case GL_PACK_SKIP_ROWS:
++ params[0] = ctx->Pack.SkipRows;
++ break;
++ case GL_PACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
++ break;
++ case GL_PACK_SKIP_IMAGES_EXT:
++ params[0] = ctx->Pack.SkipImages;
++ break;
++ case GL_PACK_IMAGE_HEIGHT_EXT:
++ params[0] = ctx->Pack.ImageHeight;
++ break;
++ case GL_PACK_INVERT_MESA:
++ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
++ break;
++ case GL_PERSPECTIVE_CORRECTION_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
++ break;
++ case GL_PIXEL_MAP_A_TO_A_SIZE:
++ params[0] = ctx->Pixel.MapAtoAsize;
++ break;
++ case GL_PIXEL_MAP_B_TO_B_SIZE:
++ params[0] = ctx->Pixel.MapBtoBsize;
++ break;
++ case GL_PIXEL_MAP_G_TO_G_SIZE:
++ params[0] = ctx->Pixel.MapGtoGsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_A_SIZE:
++ params[0] = ctx->Pixel.MapItoAsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_B_SIZE:
++ params[0] = ctx->Pixel.MapItoBsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_G_SIZE:
++ params[0] = ctx->Pixel.MapItoGsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_I_SIZE:
++ params[0] = ctx->Pixel.MapItoIsize;
++ break;
++ case GL_PIXEL_MAP_I_TO_R_SIZE:
++ params[0] = ctx->Pixel.MapItoRsize;
++ break;
++ case GL_PIXEL_MAP_R_TO_R_SIZE:
++ params[0] = ctx->Pixel.MapRtoRsize;
++ break;
++ case GL_PIXEL_MAP_S_TO_S_SIZE:
++ params[0] = ctx->Pixel.MapStoSsize;
++ break;
++ case GL_POINT_SIZE:
++ params[0] = IROUND(ctx->Point.Size);
++ break;
++ case GL_POINT_SIZE_GRANULARITY:
++ params[0] = IROUND(ctx->Const.PointSizeGranularity);
++ break;
++ case GL_POINT_SIZE_RANGE:
++ params[0] = IROUND(ctx->Const.MinPointSizeAA);
++ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
++ break;
++ case GL_ALIASED_POINT_SIZE_RANGE:
++ params[0] = IROUND(ctx->Const.MinPointSize);
++ params[1] = IROUND(ctx->Const.MaxPointSize);
++ break;
++ case GL_POINT_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
++ break;
++ case GL_POINT_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
++ break;
++ case GL_POINT_SIZE_MIN_EXT:
++ params[0] = IROUND(ctx->Point.MinSize);
++ break;
++ case GL_POINT_SIZE_MAX_EXT:
++ params[0] = IROUND(ctx->Point.MaxSize);
++ break;
++ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
++ params[0] = IROUND(ctx->Point.Threshold);
++ break;
++ case GL_DISTANCE_ATTENUATION_EXT:
++ params[0] = IROUND(ctx->Point.Params[0]);
++ params[1] = IROUND(ctx->Point.Params[1]);
++ params[2] = IROUND(ctx->Point.Params[2]);
++ break;
++ case GL_POLYGON_MODE:
++ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
++ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
++ break;
++ case GL_POLYGON_OFFSET_BIAS_EXT:
++ params[0] = IROUND(ctx->Polygon.OffsetUnits);
++ break;
++ case GL_POLYGON_OFFSET_FACTOR:
++ params[0] = IROUND(ctx->Polygon.OffsetFactor );
++ break;
++ case GL_POLYGON_OFFSET_UNITS:
++ params[0] = IROUND(ctx->Polygon.OffsetUnits );
++ break;
++ case GL_POLYGON_SMOOTH:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
++ break;
++ case GL_POLYGON_SMOOTH_HINT:
++ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
++ break;
++ case GL_POLYGON_STIPPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
++ break;
++ case GL_PROJECTION_MATRIX:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_PROJECTION_STACK_DEPTH:
++ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
++ break;
++ case GL_READ_BUFFER:
++ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
++ break;
++ case GL_RED_BIAS:
++ params[0] = IROUND(ctx->Pixel.RedBias);
++ break;
++ case GL_RED_BITS:
++ params[0] = ctx->DrawBuffer->Visual.redBits ;
++ break;
++ case GL_RED_SCALE:
++ params[0] = IROUND(ctx->Pixel.RedScale);
++ break;
++ case GL_RENDER_MODE:
++ params[0] = ENUM_TO_INT(ctx->RenderMode);
++ break;
++ case GL_RESCALE_NORMAL:
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
++ break;
++ case GL_RGBA_MODE:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
++ break;
++ case GL_SCISSOR_BOX:
++ params[0] = ctx->Scissor.X;
++ params[1] = ctx->Scissor.Y;
++ params[2] = ctx->Scissor.Width;
++ params[3] = ctx->Scissor.Height;
++ break;
++ case GL_SCISSOR_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
++ break;
++ case GL_SELECTION_BUFFER_SIZE:
++ params[0] = ctx->Select.BufferSize;
++ break;
++ case GL_SHADE_MODEL:
++ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
++ break;
++ case GL_SHARED_TEXTURE_PALETTE_EXT:
++ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
++ break;
++ case GL_STENCIL_BITS:
++ params[0] = ctx->DrawBuffer->Visual.stencilBits;
++ break;
++ case GL_STENCIL_CLEAR_VALUE:
++ params[0] = ctx->Stencil.Clear;
++ break;
++ case GL_STENCIL_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
++ break;
++ case GL_STENCIL_REF:
++ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STENCIL_TEST:
++ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
++ break;
++ case GL_STENCIL_VALUE_MASK:
++ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STENCIL_WRITEMASK:
++ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
++ break;
++ case GL_STEREO:
++ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
++ break;
++ case GL_SUBPIXEL_BITS:
++ params[0] = ctx->Const.SubPixelBits;
++ break;
++ case GL_TEXTURE_1D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
++ break;
++ case GL_TEXTURE_2D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
++ break;
++ case GL_TEXTURE_3D:
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
++ break;
++ case GL_TEXTURE_BINDING_1D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
++ break;
++ case GL_TEXTURE_BINDING_2D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
++ break;
++ case GL_TEXTURE_BINDING_3D:
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
++ break;
++ case GL_TEXTURE_ENV_COLOR:
++ {
++ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
++ params[0] = FLOAT_TO_INT(color[0]);
++ params[1] = FLOAT_TO_INT(color[1]);
++ params[2] = FLOAT_TO_INT(color[2]);
++ params[3] = FLOAT_TO_INT(color[3]);
++ }
++ break;
++ case GL_TEXTURE_ENV_MODE:
++ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
++ break;
++ case GL_TEXTURE_GEN_S:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_T:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_R:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_GEN_Q:
++ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
++ break;
++ case GL_TEXTURE_MATRIX:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TEXTURE_STACK_DEPTH:
++ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
++ break;
++ case GL_UNPACK_ALIGNMENT:
++ params[0] = ctx->Unpack.Alignment;
++ break;
++ case GL_UNPACK_LSB_FIRST:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
++ break;
++ case GL_UNPACK_ROW_LENGTH:
++ params[0] = ctx->Unpack.RowLength;
++ break;
++ case GL_UNPACK_SKIP_PIXELS:
++ params[0] = ctx->Unpack.SkipPixels;
++ break;
++ case GL_UNPACK_SKIP_ROWS:
++ params[0] = ctx->Unpack.SkipRows;
++ break;
++ case GL_UNPACK_SWAP_BYTES:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
++ break;
++ case GL_UNPACK_SKIP_IMAGES_EXT:
++ params[0] = ctx->Unpack.SkipImages;
++ break;
++ case GL_UNPACK_IMAGE_HEIGHT_EXT:
++ params[0] = ctx->Unpack.ImageHeight;
++ break;
++ case GL_UNPACK_CLIENT_STORAGE_APPLE:
++ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
++ break;
++ case GL_VIEWPORT:
++ params[0] = ctx->Viewport.X;
++ params[1] = ctx->Viewport.Y;
++ params[2] = ctx->Viewport.Width;
++ params[3] = ctx->Viewport.Height;
++ break;
++ case GL_ZOOM_X:
++ params[0] = IROUND(ctx->Pixel.ZoomX);
++ break;
++ case GL_ZOOM_Y:
++ params[0] = IROUND(ctx->Pixel.ZoomY);
++ break;
++ case GL_VERTEX_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
++ break;
++ case GL_VERTEX_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->Vertex.Size;
++ break;
++ case GL_VERTEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
++ break;
++ case GL_VERTEX_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
++ break;
++ case GL_VERTEX_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_NORMAL_ARRAY:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
++ break;
++ case GL_NORMAL_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
++ break;
++ case GL_NORMAL_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Normal.Stride;
++ break;
++ case GL_NORMAL_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_COLOR_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
++ break;
++ case GL_COLOR_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->Color.Size;
++ break;
++ case GL_COLOR_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
++ break;
++ case GL_COLOR_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Color.Stride;
++ break;
++ case GL_COLOR_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_INDEX_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
++ break;
++ case GL_INDEX_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
++ break;
++ case GL_INDEX_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->Index.Stride;
++ break;
++ case GL_INDEX_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_TEXTURE_COORD_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_SIZE:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_TYPE:
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
++ break;
++ case GL_TEXTURE_COORD_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_EDGE_FLAG_ARRAY:
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
++ break;
++ case GL_EDGE_FLAG_ARRAY_STRIDE:
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
++ break;
++ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
++ params[0] = 0;
++ break;
++ case GL_MAX_TEXTURE_UNITS_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureUnits;
++ break;
++ case GL_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
++ break;
++ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
++ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
++ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
++ break;
++ case GL_TEXTURE_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
++ break;
++ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
++ break;
++ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
++ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
++ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
++ break;
++ case GL_TEXTURE_COMPRESSION_HINT_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ params[0] = ctx->Hint.TextureCompression;
++ break;
++ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
++ break;
++ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
++ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
++ {
++ GLint formats[100];
++ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
++ ASSERT(n <= 100);
++ for (i = 0; i < n; i++)
++ params[i] = ENUM_TO_INT(formats[i]);
++ }
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
++ params[0] = ctx->Array.LockFirst;
++ break;
++ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
++ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
++ params[0] = ctx->Array.LockCount;
++ break;
++ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
++ {
++ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_SGI:
++ {
++ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = ctx->ColorMatrixStack.Depth + 1;
++ break;
++ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
++ params[0] = MAX_COLOR_STACK_DEPTH;
++ break;
++ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
++ break;
++ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
++ break;
++ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
++ break;
++ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
++ break;
++ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
++ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
++ break;
++ case GL_CONVOLUTION_1D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
++ break;
++ case GL_CONVOLUTION_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
++ break;
++ case GL_SEPARABLE_2D_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
++ break;
++ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
++ break;
++ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
++ break;
++ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
++ break;
++ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
++ break;
++ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
++ CHECK_EXT1(EXT_convolution, "GetIntegerv");
++ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
++ break;
++ case GL_HISTOGRAM:
++ CHECK_EXT1(EXT_histogram, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
++ break;
++ case GL_MINMAX:
++ CHECK_EXT1(EXT_histogram, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
++ break;
++ case GL_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
++ break;
++ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
++ break;
++ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
++ break;
++ case GL_TEXTURE_COLOR_TABLE_SGI:
++ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
++ break;
++ case GL_COLOR_SUM_EXT:
++ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
++ break;
++ case GL_CURRENT_SECONDARY_COLOR_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
++ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
++ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
++ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
++ }
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
++ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
++ break;
++ case GL_CURRENT_FOG_COORDINATE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ {
++ FLUSH_CURRENT(ctx, 0);
++ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
++ }
++ break;
++ case GL_FOG_COORDINATE_ARRAY_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
++ break;
++ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
++ break;
++ case GL_FOG_COORDINATE_SOURCE_EXT:
++ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
++ break;
++ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
++ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
++ break;
++ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
++ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
++ break;
++ case GL_MULTISAMPLE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
++ break;
++ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
++ break;
++ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
++ break;
++ case GL_SAMPLE_COVERAGE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
++ break;
++ case GL_SAMPLE_COVERAGE_VALUE_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
++ break;
++ case GL_SAMPLE_COVERAGE_INVERT_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
++ break;
++ case GL_SAMPLE_BUFFERS_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
++ break;
++ case GL_SAMPLES_ARB:
++ CHECK_EXT1(ARB_multisample, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Visual.samples;
++ break;
++ case GL_RASTER_POSITION_UNCLIPPED_IBM:
++ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
++ break;
++ case GL_POINT_SPRITE_NV:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
++ break;
++ case GL_POINT_SPRITE_R_MODE_NV:
++ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
++ break;
++ case GL_POINT_SPRITE_COORD_ORIGIN:
++ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
++ break;
++ case GL_GENERATE_MIPMAP_HINT_SGIS:
++ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
++ break;
++ case GL_VERTEX_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY0_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY1_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY2_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY3_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY5_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY6_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY7_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY8_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY9_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY10_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY11_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY12_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY13_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY14_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
++ break;
++ case GL_VERTEX_ATTRIB_ARRAY15_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
++ break;
++ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
++ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
++ break;
++ case GL_FRAGMENT_PROGRAM_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_BINDING_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
++ break;
++ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
++ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
++ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
++ break;
++ case GL_TEXTURE_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
++ break;
++ case GL_TEXTURE_BINDING_RECTANGLE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
++ break;
++ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
++ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureRectSize;
++ break;
++ case GL_STENCIL_TEST_TWO_SIDE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
++ break;
++ case GL_ACTIVE_STENCIL_FACE_EXT:
++ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
++ break;
++ case GL_MAX_SHININESS_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxShininess);
++ break;
++ case GL_MAX_SPOT_EXPONENT_NV:
++ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
++ params[0] = IROUND(ctx->Const.MaxSpotExponent);
++ break;
++ case GL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayBufferObj->Name;
++ break;
++ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
++ break;
++ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
++ break;
++ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
++ break;
++ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
++ break;
++ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
++ break;
++ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
++ break;
++ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
++ break;
++ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
++ break;
++ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
++ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
++ params[0] = ctx->Array.ElementArrayBufferObj->Name;
++ break;
++ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
++ params[0] = ctx->Pack.BufferObj->Name;
++ break;
++ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
++ params[0] = ctx->Unpack.BufferObj->Name;
++ break;
++ case GL_VERTEX_PROGRAM_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
++ break;
++ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
++ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
++ break;
++ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
++ break;
++ case GL_MAX_PROGRAM_MATRICES_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxProgramMatrices;
++ break;
++ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
++ break;
++ case GL_CURRENT_MATRIX_ARB:
++ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[1]);
++ params[2] = IROUND(matrix[2]);
++ params[3] = IROUND(matrix[3]);
++ params[4] = IROUND(matrix[4]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[6]);
++ params[7] = IROUND(matrix[7]);
++ params[8] = IROUND(matrix[8]);
++ params[9] = IROUND(matrix[9]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[11]);
++ params[12] = IROUND(matrix[12]);
++ params[13] = IROUND(matrix[13]);
++ params[14] = IROUND(matrix[14]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
++ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
++ {
++ const GLfloat *matrix = ctx->CurrentStack->Top->m;
++ params[0] = IROUND(matrix[0]);
++ params[1] = IROUND(matrix[4]);
++ params[2] = IROUND(matrix[8]);
++ params[3] = IROUND(matrix[12]);
++ params[4] = IROUND(matrix[1]);
++ params[5] = IROUND(matrix[5]);
++ params[6] = IROUND(matrix[9]);
++ params[7] = IROUND(matrix[13]);
++ params[8] = IROUND(matrix[2]);
++ params[9] = IROUND(matrix[6]);
++ params[10] = IROUND(matrix[10]);
++ params[11] = IROUND(matrix[14]);
++ params[12] = IROUND(matrix[3]);
++ params[13] = IROUND(matrix[7]);
++ params[14] = IROUND(matrix[11]);
++ params[15] = IROUND(matrix[15]);
++ }
++ break;
++ case GL_MAX_VERTEX_ATTRIBS_ARB:
++ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
++ params[0] = ctx->Const.VertexProgram.MaxAttribs;
++ break;
++ case GL_PROGRAM_ERROR_POSITION_ARB:
++ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
++ params[0] = ctx->Program.ErrorPos;
++ break;
++ case GL_FRAGMENT_PROGRAM_ARB:
++ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
++ break;
++ case GL_MAX_TEXTURE_COORDS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureCoordUnits;
++ break;
++ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
++ params[0] = ctx->Const.MaxTextureImageUnits;
++ break;
++ case GL_DEPTH_BOUNDS_TEST_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
++ break;
++ case GL_DEPTH_BOUNDS_EXT:
++ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
++ params[0] = IROUND(ctx->Depth.BoundsMin);
++ params[1] = IROUND(ctx->Depth.BoundsMax);
++ break;
++ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
++ break;
++ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
++ break;
++ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = ctx->FragmentProgram.CurrentPosition;
++ break;
++ case GL_VERTEX_PROGRAM_POSITION_MESA:
++ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
++ params[0] = ctx->VertexProgram.CurrentPosition;
++ break;
++ case GL_MAX_DRAW_BUFFERS_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ params[0] = ctx->Const.MaxDrawBuffers;
++ break;
++ case GL_DRAW_BUFFER0_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
++ break;
++ case GL_DRAW_BUFFER1_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER2_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_DRAW_BUFFER3_ARB:
++ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
++ {
++ GLenum buffer;
++ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
++ return;
++ }
++ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
++ params[0] = ENUM_TO_INT(buffer);
++ }
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
++ CHECK_EXT1(OES_read_format, "GetIntegerv");
++ params[0] = ctx->Const.ColorReadType;
++ break;
++ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
++ CHECK_EXT1(OES_read_format, "GetIntegerv");
++ params[0] = ctx->Const.ColorReadFormat;
++ break;
++ case GL_NUM_FRAGMENT_REGISTERS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 6;
++ break;
++ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 8;
++ break;
++ case GL_NUM_PASSES_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 2;
++ break;
++ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 8;
++ break;
++ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 16;
++ break;
++ case GL_COLOR_ALPHA_PAIRING_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = BOOLEAN_TO_INT(GL_TRUE);
++ break;
++ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 3;
++ break;
++ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
++ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
++ params[0] = 3;
++ break;
++ case GL_STENCIL_BACK_FUNC:
++ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
++ break;
++ case GL_STENCIL_BACK_VALUE_MASK:
++ params[0] = ctx->Stencil.ValueMask[1];
++ break;
++ case GL_STENCIL_BACK_REF:
++ params[0] = ctx->Stencil.Ref[1];
++ break;
++ case GL_STENCIL_BACK_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
++ break;
++ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
++ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
++ break;
++ case GL_FRAMEBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->DrawBuffer->Name;
++ break;
++ case GL_RENDERBUFFER_BINDING_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
++ break;
++ case GL_MAX_COLOR_ATTACHMENTS_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->Const.MaxColorAttachments;
++ break;
++ case GL_MAX_RENDERBUFFER_SIZE_EXT:
++ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
++ params[0] = ctx->Const.MaxRenderbufferSize;
++ break;
++ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
++ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
++ break;
++ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
++ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
++ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
++ break;
++ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
++ break;
++ case GL_MAX_VARYING_FLOATS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VARYING_FLOATS;
++ break;
++ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
++ break;
++ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
++ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
++ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
++ break;
++ default:
++ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
++ }
++}
++
++
++void GLAPIENTRY
++_mesa_GetDoublev( GLenum pname, GLdouble *params )
++{
++ const GLfloat magic = -1234.5F;
++ GLfloat values[16];
++ GLuint i;
++
++ if (!params)
++ return;
++
++ /* Init temp array to magic numbers so we can figure out how many values
++ * are returned by the GetFloatv() call.
++ */
++ for (i = 0; i < 16; i++)
++ values[i] = magic;
++
++ _mesa_GetFloatv(pname, values);
++
++ for (i = 0; i < 16 && values[i] != magic; i++)
++ params[i] = (GLdouble) values[i];
++}
++
+Index: qemu-0.12.4/target-i386/mesa_gl.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_gl.h
+@@ -0,0 +1,2251 @@
++/*
++ * Mesa 3-D graphics library
++ * Version: 6.5.1
++ *
++ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++
++#ifndef __gl_h_
++#define __gl_h_
++
++#if defined(USE_MGL_NAMESPACE)
++#include "gl_mangle.h"
++#endif
++
++
++/**********************************************************************
++ * Begin system-specific stuff. Do not do any of this when building
++ * for SciTech SNAP, as this is all done before this header file is
++ * included.
++ */
++#if !defined(__SCITECH_SNAP__)
++
++#if defined(__BEOS__)
++#include <stdlib.h> /* to get some BeOS-isms */
++#endif
++
++#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
++#define OPENSTEP
++#endif
++
++#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
++#define __WIN32__
++#endif
++
++#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
++# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
++# define GLAPI __declspec(dllexport)
++# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
++# define GLAPI __declspec(dllimport)
++# else /* for use with static link lib build of Win32 edition only */
++# define GLAPI extern
++# endif /* _STATIC_MESA support */
++# define GLAPIENTRY __stdcall
++#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
++# define GLAPI extern
++# define GLAPIENTRY __stdcall
++#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
++# define GLAPI __attribute__((visibility("default")))
++# define GLAPIENTRY
++#endif /* WIN32 && !CYGWIN */
++
++#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
++# define PRAGMA_EXPORT_SUPPORTED 1
++#endif
++
++/*
++ * WINDOWS: Include windows.h here to define APIENTRY.
++ * It is also useful when applications include this file by
++ * including only glut.h, since glut.h depends on windows.h.
++ * Applications needing to include windows.h with parms other
++ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
++ * glut.h or gl.h.
++ */
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
++#include <GL/mesa_wgl.h>
++#endif
++
++#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
++#pragma import on
++#endif
++
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++#ifndef GLAPIENTRY
++#define GLAPIENTRY
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY GLAPIENTRY
++#endif
++
++/* "P" suffix to be used for a pointer to a function */
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++
++#ifndef GLAPIENTRYP
++#define GLAPIENTRYP GLAPIENTRY *
++#endif
++
++#ifdef CENTERLINE_CLPP
++#define signed
++#endif
++
++#if defined(PRAGMA_EXPORT_SUPPORTED)
++#pragma export on
++#endif
++
++#endif /* !__SCITECH_SNAP__ */
++/*
++ * End system-specific stuff.
++ **********************************************************************/
++
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++
++
++#define GL_VERSION_1_1 1
++#define GL_VERSION_1_2 1
++#define GL_VERSION_1_3 1
++#define GL_ARB_imaging 1
++
++
++/*
++ * Datatypes
++ */
++typedef unsigned int GLenum;
++typedef unsigned char GLboolean;
++typedef unsigned int GLbitfield;
++typedef void GLvoid;
++typedef signed char GLbyte; /* 1-byte signed */
++typedef short GLshort; /* 2-byte signed */
++typedef int GLint; /* 4-byte signed */
++typedef unsigned char GLubyte; /* 1-byte unsigned */
++typedef unsigned short GLushort; /* 2-byte unsigned */
++typedef unsigned int GLuint; /* 4-byte unsigned */
++typedef int GLsizei; /* 4-byte signed */
++typedef float GLfloat; /* single precision float */
++typedef float GLclampf; /* single precision float in [0,1] */
++typedef double GLdouble; /* double precision float */
++typedef double GLclampd; /* double precision float in [0,1] */
++
++
++
++/*
++ * Constants
++ */
++
++/* Boolean values */
++#define GL_FALSE 0x0
++#define GL_TRUE 0x1
++
++/* Data types */
++#define GL_BYTE 0x1400
++#define GL_UNSIGNED_BYTE 0x1401
++#define GL_SHORT 0x1402
++#define GL_UNSIGNED_SHORT 0x1403
++#define GL_INT 0x1404
++#define GL_UNSIGNED_INT 0x1405
++#define GL_FLOAT 0x1406
++#define GL_2_BYTES 0x1407
++#define GL_3_BYTES 0x1408
++#define GL_4_BYTES 0x1409
++#define GL_DOUBLE 0x140A
++
++/* Primitives */
++#define GL_POINTS 0x0000
++#define GL_LINES 0x0001
++#define GL_LINE_LOOP 0x0002
++#define GL_LINE_STRIP 0x0003
++#define GL_TRIANGLES 0x0004
++#define GL_TRIANGLE_STRIP 0x0005
++#define GL_TRIANGLE_FAN 0x0006
++#define GL_QUADS 0x0007
++#define GL_QUAD_STRIP 0x0008
++#define GL_POLYGON 0x0009
++
++/* Vertex Arrays */
++#define GL_VERTEX_ARRAY 0x8074
++#define GL_NORMAL_ARRAY 0x8075
++#define GL_COLOR_ARRAY 0x8076
++#define GL_INDEX_ARRAY 0x8077
++#define GL_TEXTURE_COORD_ARRAY 0x8078
++#define GL_EDGE_FLAG_ARRAY 0x8079
++#define GL_VERTEX_ARRAY_SIZE 0x807A
++#define GL_VERTEX_ARRAY_TYPE 0x807B
++#define GL_VERTEX_ARRAY_STRIDE 0x807C
++#define GL_NORMAL_ARRAY_TYPE 0x807E
++#define GL_NORMAL_ARRAY_STRIDE 0x807F
++#define GL_COLOR_ARRAY_SIZE 0x8081
++#define GL_COLOR_ARRAY_TYPE 0x8082
++#define GL_COLOR_ARRAY_STRIDE 0x8083
++#define GL_INDEX_ARRAY_TYPE 0x8085
++#define GL_INDEX_ARRAY_STRIDE 0x8086
++#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
++#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
++#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
++#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
++#define GL_VERTEX_ARRAY_POINTER 0x808E
++#define GL_NORMAL_ARRAY_POINTER 0x808F
++#define GL_COLOR_ARRAY_POINTER 0x8090
++#define GL_INDEX_ARRAY_POINTER 0x8091
++#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
++#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
++#define GL_V2F 0x2A20
++#define GL_V3F 0x2A21
++#define GL_C4UB_V2F 0x2A22
++#define GL_C4UB_V3F 0x2A23
++#define GL_C3F_V3F 0x2A24
++#define GL_N3F_V3F 0x2A25
++#define GL_C4F_N3F_V3F 0x2A26
++#define GL_T2F_V3F 0x2A27
++#define GL_T4F_V4F 0x2A28
++#define GL_T2F_C4UB_V3F 0x2A29
++#define GL_T2F_C3F_V3F 0x2A2A
++#define GL_T2F_N3F_V3F 0x2A2B
++#define GL_T2F_C4F_N3F_V3F 0x2A2C
++#define GL_T4F_C4F_N3F_V4F 0x2A2D
++
++/* Matrix Mode */
++#define GL_MATRIX_MODE 0x0BA0
++#define GL_MODELVIEW 0x1700
++#define GL_PROJECTION 0x1701
++#define GL_TEXTURE 0x1702
++
++/* Points */
++#define GL_POINT_SMOOTH 0x0B10
++#define GL_POINT_SIZE 0x0B11
++#define GL_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_POINT_SIZE_RANGE 0x0B12
++
++/* Lines */
++#define GL_LINE_SMOOTH 0x0B20
++#define GL_LINE_STIPPLE 0x0B24
++#define GL_LINE_STIPPLE_PATTERN 0x0B25
++#define GL_LINE_STIPPLE_REPEAT 0x0B26
++#define GL_LINE_WIDTH 0x0B21
++#define GL_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_LINE_WIDTH_RANGE 0x0B22
++
++/* Polygons */
++#define GL_POINT 0x1B00
++#define GL_LINE 0x1B01
++#define GL_FILL 0x1B02
++#define GL_CW 0x0900
++#define GL_CCW 0x0901
++#define GL_FRONT 0x0404
++#define GL_BACK 0x0405
++#define GL_POLYGON_MODE 0x0B40
++#define GL_POLYGON_SMOOTH 0x0B41
++#define GL_POLYGON_STIPPLE 0x0B42
++#define GL_EDGE_FLAG 0x0B43
++#define GL_CULL_FACE 0x0B44
++#define GL_CULL_FACE_MODE 0x0B45
++#define GL_FRONT_FACE 0x0B46
++#define GL_POLYGON_OFFSET_FACTOR 0x8038
++#define GL_POLYGON_OFFSET_UNITS 0x2A00
++#define GL_POLYGON_OFFSET_POINT 0x2A01
++#define GL_POLYGON_OFFSET_LINE 0x2A02
++#define GL_POLYGON_OFFSET_FILL 0x8037
++
++/* Display Lists */
++#define GL_COMPILE 0x1300
++#define GL_COMPILE_AND_EXECUTE 0x1301
++#define GL_LIST_BASE 0x0B32
++#define GL_LIST_INDEX 0x0B33
++#define GL_LIST_MODE 0x0B30
++
++/* Depth buffer */
++#define GL_NEVER 0x0200
++#define GL_LESS 0x0201
++#define GL_EQUAL 0x0202
++#define GL_LEQUAL 0x0203
++#define GL_GREATER 0x0204
++#define GL_NOTEQUAL 0x0205
++#define GL_GEQUAL 0x0206
++#define GL_ALWAYS 0x0207
++#define GL_DEPTH_TEST 0x0B71
++#define GL_DEPTH_BITS 0x0D56
++#define GL_DEPTH_CLEAR_VALUE 0x0B73
++#define GL_DEPTH_FUNC 0x0B74
++#define GL_DEPTH_RANGE 0x0B70
++#define GL_DEPTH_WRITEMASK 0x0B72
++#define GL_DEPTH_COMPONENT 0x1902
++
++/* Lighting */
++#define GL_LIGHTING 0x0B50
++#define GL_LIGHT0 0x4000
++#define GL_LIGHT1 0x4001
++#define GL_LIGHT2 0x4002
++#define GL_LIGHT3 0x4003
++#define GL_LIGHT4 0x4004
++#define GL_LIGHT5 0x4005
++#define GL_LIGHT6 0x4006
++#define GL_LIGHT7 0x4007
++#define GL_SPOT_EXPONENT 0x1205
++#define GL_SPOT_CUTOFF 0x1206
++#define GL_CONSTANT_ATTENUATION 0x1207
++#define GL_LINEAR_ATTENUATION 0x1208
++#define GL_QUADRATIC_ATTENUATION 0x1209
++#define GL_AMBIENT 0x1200
++#define GL_DIFFUSE 0x1201
++#define GL_SPECULAR 0x1202
++#define GL_SHININESS 0x1601
++#define GL_EMISSION 0x1600
++#define GL_POSITION 0x1203
++#define GL_SPOT_DIRECTION 0x1204
++#define GL_AMBIENT_AND_DIFFUSE 0x1602
++#define GL_COLOR_INDEXES 0x1603
++#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
++#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
++#define GL_LIGHT_MODEL_AMBIENT 0x0B53
++#define GL_FRONT_AND_BACK 0x0408
++#define GL_SHADE_MODEL 0x0B54
++#define GL_FLAT 0x1D00
++#define GL_SMOOTH 0x1D01
++#define GL_COLOR_MATERIAL 0x0B57
++#define GL_COLOR_MATERIAL_FACE 0x0B55
++#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
++#define GL_NORMALIZE 0x0BA1
++
++/* User clipping planes */
++#define GL_CLIP_PLANE0 0x3000
++#define GL_CLIP_PLANE1 0x3001
++#define GL_CLIP_PLANE2 0x3002
++#define GL_CLIP_PLANE3 0x3003
++#define GL_CLIP_PLANE4 0x3004
++#define GL_CLIP_PLANE5 0x3005
++
++/* Accumulation buffer */
++#define GL_ACCUM_RED_BITS 0x0D58
++#define GL_ACCUM_GREEN_BITS 0x0D59
++#define GL_ACCUM_BLUE_BITS 0x0D5A
++#define GL_ACCUM_ALPHA_BITS 0x0D5B
++#define GL_ACCUM_CLEAR_VALUE 0x0B80
++#define GL_ACCUM 0x0100
++#define GL_ADD 0x0104
++#define GL_LOAD 0x0101
++#define GL_MULT 0x0103
++#define GL_RETURN 0x0102
++
++/* Alpha testing */
++#define GL_ALPHA_TEST 0x0BC0
++#define GL_ALPHA_TEST_REF 0x0BC2
++#define GL_ALPHA_TEST_FUNC 0x0BC1
++
++/* Blending */
++#define GL_BLEND 0x0BE2
++#define GL_BLEND_SRC 0x0BE1
++#define GL_BLEND_DST 0x0BE0
++#define GL_ZERO 0x0
++#define GL_ONE 0x1
++#define GL_SRC_COLOR 0x0300
++#define GL_ONE_MINUS_SRC_COLOR 0x0301
++#define GL_SRC_ALPHA 0x0302
++#define GL_ONE_MINUS_SRC_ALPHA 0x0303
++#define GL_DST_ALPHA 0x0304
++#define GL_ONE_MINUS_DST_ALPHA 0x0305
++#define GL_DST_COLOR 0x0306
++#define GL_ONE_MINUS_DST_COLOR 0x0307
++#define GL_SRC_ALPHA_SATURATE 0x0308
++
++/* Render Mode */
++#define GL_FEEDBACK 0x1C01
++#define GL_RENDER 0x1C00
++#define GL_SELECT 0x1C02
++
++/* Feedback */
++#define GL_2D 0x0600
++#define GL_3D 0x0601
++#define GL_3D_COLOR 0x0602
++#define GL_3D_COLOR_TEXTURE 0x0603
++#define GL_4D_COLOR_TEXTURE 0x0604
++#define GL_POINT_TOKEN 0x0701
++#define GL_LINE_TOKEN 0x0702
++#define GL_LINE_RESET_TOKEN 0x0707
++#define GL_POLYGON_TOKEN 0x0703
++#define GL_BITMAP_TOKEN 0x0704
++#define GL_DRAW_PIXEL_TOKEN 0x0705
++#define GL_COPY_PIXEL_TOKEN 0x0706
++#define GL_PASS_THROUGH_TOKEN 0x0700
++#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
++#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
++#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
++
++/* Selection */
++#define GL_SELECTION_BUFFER_POINTER 0x0DF3
++#define GL_SELECTION_BUFFER_SIZE 0x0DF4
++
++/* Fog */
++#define GL_FOG 0x0B60
++#define GL_FOG_MODE 0x0B65
++#define GL_FOG_DENSITY 0x0B62
++#define GL_FOG_COLOR 0x0B66
++#define GL_FOG_INDEX 0x0B61
++#define GL_FOG_START 0x0B63
++#define GL_FOG_END 0x0B64
++#define GL_LINEAR 0x2601
++#define GL_EXP 0x0800
++#define GL_EXP2 0x0801
++
++/* Logic Ops */
++#define GL_LOGIC_OP 0x0BF1
++#define GL_INDEX_LOGIC_OP 0x0BF1
++#define GL_COLOR_LOGIC_OP 0x0BF2
++#define GL_LOGIC_OP_MODE 0x0BF0
++#define GL_CLEAR 0x1500
++#define GL_SET 0x150F
++#define GL_COPY 0x1503
++#define GL_COPY_INVERTED 0x150C
++#define GL_NOOP 0x1505
++#define GL_INVERT 0x150A
++#define GL_AND 0x1501
++#define GL_NAND 0x150E
++#define GL_OR 0x1507
++#define GL_NOR 0x1508
++#define GL_XOR 0x1506
++#define GL_EQUIV 0x1509
++#define GL_AND_REVERSE 0x1502
++#define GL_AND_INVERTED 0x1504
++#define GL_OR_REVERSE 0x150B
++#define GL_OR_INVERTED 0x150D
++
++/* Stencil */
++#define GL_STENCIL_BITS 0x0D57
++#define GL_STENCIL_TEST 0x0B90
++#define GL_STENCIL_CLEAR_VALUE 0x0B91
++#define GL_STENCIL_FUNC 0x0B92
++#define GL_STENCIL_VALUE_MASK 0x0B93
++#define GL_STENCIL_FAIL 0x0B94
++#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
++#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
++#define GL_STENCIL_REF 0x0B97
++#define GL_STENCIL_WRITEMASK 0x0B98
++#define GL_STENCIL_INDEX 0x1901
++#define GL_KEEP 0x1E00
++#define GL_REPLACE 0x1E01
++#define GL_INCR 0x1E02
++#define GL_DECR 0x1E03
++
++/* Buffers, Pixel Drawing/Reading */
++#define GL_NONE 0x0
++#define GL_LEFT 0x0406
++#define GL_RIGHT 0x0407
++/*GL_FRONT 0x0404 */
++/*GL_BACK 0x0405 */
++/*GL_FRONT_AND_BACK 0x0408 */
++#define GL_FRONT_LEFT 0x0400
++#define GL_FRONT_RIGHT 0x0401
++#define GL_BACK_LEFT 0x0402
++#define GL_BACK_RIGHT 0x0403
++#define GL_AUX0 0x0409
++#define GL_AUX1 0x040A
++#define GL_AUX2 0x040B
++#define GL_AUX3 0x040C
++#define GL_COLOR_INDEX 0x1900
++#define GL_RED 0x1903
++#define GL_GREEN 0x1904
++#define GL_BLUE 0x1905
++#define GL_ALPHA 0x1906
++#define GL_LUMINANCE 0x1909
++#define GL_LUMINANCE_ALPHA 0x190A
++#define GL_ALPHA_BITS 0x0D55
++#define GL_RED_BITS 0x0D52
++#define GL_GREEN_BITS 0x0D53
++#define GL_BLUE_BITS 0x0D54
++#define GL_INDEX_BITS 0x0D51
++#define GL_SUBPIXEL_BITS 0x0D50
++#define GL_AUX_BUFFERS 0x0C00
++#define GL_READ_BUFFER 0x0C02
++#define GL_DRAW_BUFFER 0x0C01
++#define GL_DOUBLEBUFFER 0x0C32
++#define GL_STEREO 0x0C33
++#define GL_BITMAP 0x1A00
++#define GL_COLOR 0x1800
++#define GL_DEPTH 0x1801
++#define GL_STENCIL 0x1802
++#define GL_DITHER 0x0BD0
++#define GL_RGB 0x1907
++#define GL_RGBA 0x1908
++
++/* Implementation limits */
++#define GL_MAX_LIST_NESTING 0x0B31
++#define GL_MAX_EVAL_ORDER 0x0D30
++#define GL_MAX_LIGHTS 0x0D31
++#define GL_MAX_CLIP_PLANES 0x0D32
++#define GL_MAX_TEXTURE_SIZE 0x0D33
++#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
++#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
++#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
++#define GL_MAX_NAME_STACK_DEPTH 0x0D37
++#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
++#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
++#define GL_MAX_VIEWPORT_DIMS 0x0D3A
++#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
++
++/* Gets */
++#define GL_ATTRIB_STACK_DEPTH 0x0BB0
++#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
++#define GL_COLOR_CLEAR_VALUE 0x0C22
++#define GL_COLOR_WRITEMASK 0x0C23
++#define GL_CURRENT_INDEX 0x0B01
++#define GL_CURRENT_COLOR 0x0B00
++#define GL_CURRENT_NORMAL 0x0B02
++#define GL_CURRENT_RASTER_COLOR 0x0B04
++#define GL_CURRENT_RASTER_DISTANCE 0x0B09
++#define GL_CURRENT_RASTER_INDEX 0x0B05
++#define GL_CURRENT_RASTER_POSITION 0x0B07
++#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
++#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
++#define GL_CURRENT_TEXTURE_COORDS 0x0B03
++#define GL_INDEX_CLEAR_VALUE 0x0C20
++#define GL_INDEX_MODE 0x0C30
++#define GL_INDEX_WRITEMASK 0x0C21
++#define GL_MODELVIEW_MATRIX 0x0BA6
++#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
++#define GL_NAME_STACK_DEPTH 0x0D70
++#define GL_PROJECTION_MATRIX 0x0BA7
++#define GL_PROJECTION_STACK_DEPTH 0x0BA4
++#define GL_RENDER_MODE 0x0C40
++#define GL_RGBA_MODE 0x0C31
++#define GL_TEXTURE_MATRIX 0x0BA8
++#define GL_TEXTURE_STACK_DEPTH 0x0BA5
++#define GL_VIEWPORT 0x0BA2
++
++/* Evaluators */
++#define GL_AUTO_NORMAL 0x0D80
++#define GL_MAP1_COLOR_4 0x0D90
++#define GL_MAP1_INDEX 0x0D91
++#define GL_MAP1_NORMAL 0x0D92
++#define GL_MAP1_TEXTURE_COORD_1 0x0D93
++#define GL_MAP1_TEXTURE_COORD_2 0x0D94
++#define GL_MAP1_TEXTURE_COORD_3 0x0D95
++#define GL_MAP1_TEXTURE_COORD_4 0x0D96
++#define GL_MAP1_VERTEX_3 0x0D97
++#define GL_MAP1_VERTEX_4 0x0D98
++#define GL_MAP2_COLOR_4 0x0DB0
++#define GL_MAP2_INDEX 0x0DB1
++#define GL_MAP2_NORMAL 0x0DB2
++#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
++#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
++#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
++#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
++#define GL_MAP2_VERTEX_3 0x0DB7
++#define GL_MAP2_VERTEX_4 0x0DB8
++#define GL_MAP1_GRID_DOMAIN 0x0DD0
++#define GL_MAP1_GRID_SEGMENTS 0x0DD1
++#define GL_MAP2_GRID_DOMAIN 0x0DD2
++#define GL_MAP2_GRID_SEGMENTS 0x0DD3
++#define GL_COEFF 0x0A00
++#define GL_ORDER 0x0A01
++#define GL_DOMAIN 0x0A02
++
++/* Hints */
++#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
++#define GL_POINT_SMOOTH_HINT 0x0C51
++#define GL_LINE_SMOOTH_HINT 0x0C52
++#define GL_POLYGON_SMOOTH_HINT 0x0C53
++#define GL_FOG_HINT 0x0C54
++#define GL_DONT_CARE 0x1100
++#define GL_FASTEST 0x1101
++#define GL_NICEST 0x1102
++
++/* Scissor box */
++#define GL_SCISSOR_BOX 0x0C10
++#define GL_SCISSOR_TEST 0x0C11
++
++/* Pixel Mode / Transfer */
++#define GL_MAP_COLOR 0x0D10
++#define GL_MAP_STENCIL 0x0D11
++#define GL_INDEX_SHIFT 0x0D12
++#define GL_INDEX_OFFSET 0x0D13
++#define GL_RED_SCALE 0x0D14
++#define GL_RED_BIAS 0x0D15
++#define GL_GREEN_SCALE 0x0D18
++#define GL_GREEN_BIAS 0x0D19
++#define GL_BLUE_SCALE 0x0D1A
++#define GL_BLUE_BIAS 0x0D1B
++#define GL_ALPHA_SCALE 0x0D1C
++#define GL_ALPHA_BIAS 0x0D1D
++#define GL_DEPTH_SCALE 0x0D1E
++#define GL_DEPTH_BIAS 0x0D1F
++#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
++#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
++#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
++#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
++#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
++#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
++#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
++#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
++#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
++#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
++#define GL_PIXEL_MAP_S_TO_S 0x0C71
++#define GL_PIXEL_MAP_I_TO_I 0x0C70
++#define GL_PIXEL_MAP_I_TO_R 0x0C72
++#define GL_PIXEL_MAP_I_TO_G 0x0C73
++#define GL_PIXEL_MAP_I_TO_B 0x0C74
++#define GL_PIXEL_MAP_I_TO_A 0x0C75
++#define GL_PIXEL_MAP_R_TO_R 0x0C76
++#define GL_PIXEL_MAP_G_TO_G 0x0C77
++#define GL_PIXEL_MAP_B_TO_B 0x0C78
++#define GL_PIXEL_MAP_A_TO_A 0x0C79
++#define GL_PACK_ALIGNMENT 0x0D05
++#define GL_PACK_LSB_FIRST 0x0D01
++#define GL_PACK_ROW_LENGTH 0x0D02
++#define GL_PACK_SKIP_PIXELS 0x0D04
++#define GL_PACK_SKIP_ROWS 0x0D03
++#define GL_PACK_SWAP_BYTES 0x0D00
++#define GL_UNPACK_ALIGNMENT 0x0CF5
++#define GL_UNPACK_LSB_FIRST 0x0CF1
++#define GL_UNPACK_ROW_LENGTH 0x0CF2
++#define GL_UNPACK_SKIP_PIXELS 0x0CF4
++#define GL_UNPACK_SKIP_ROWS 0x0CF3
++#define GL_UNPACK_SWAP_BYTES 0x0CF0
++#define GL_ZOOM_X 0x0D16
++#define GL_ZOOM_Y 0x0D17
++
++/* Texture mapping */
++#define GL_TEXTURE_ENV 0x2300
++#define GL_TEXTURE_ENV_MODE 0x2200
++#define GL_TEXTURE_1D 0x0DE0
++#define GL_TEXTURE_2D 0x0DE1
++#define GL_TEXTURE_WRAP_S 0x2802
++#define GL_TEXTURE_WRAP_T 0x2803
++#define GL_TEXTURE_MAG_FILTER 0x2800
++#define GL_TEXTURE_MIN_FILTER 0x2801
++#define GL_TEXTURE_ENV_COLOR 0x2201
++#define GL_TEXTURE_GEN_S 0x0C60
++#define GL_TEXTURE_GEN_T 0x0C61
++#define GL_TEXTURE_GEN_MODE 0x2500
++#define GL_TEXTURE_BORDER_COLOR 0x1004
++#define GL_TEXTURE_WIDTH 0x1000
++#define GL_TEXTURE_HEIGHT 0x1001
++#define GL_TEXTURE_BORDER 0x1005
++#define GL_TEXTURE_COMPONENTS 0x1003
++#define GL_TEXTURE_RED_SIZE 0x805C
++#define GL_TEXTURE_GREEN_SIZE 0x805D
++#define GL_TEXTURE_BLUE_SIZE 0x805E
++#define GL_TEXTURE_ALPHA_SIZE 0x805F
++#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
++#define GL_TEXTURE_INTENSITY_SIZE 0x8061
++#define GL_NEAREST_MIPMAP_NEAREST 0x2700
++#define GL_NEAREST_MIPMAP_LINEAR 0x2702
++#define GL_LINEAR_MIPMAP_NEAREST 0x2701
++#define GL_LINEAR_MIPMAP_LINEAR 0x2703
++#define GL_OBJECT_LINEAR 0x2401
++#define GL_OBJECT_PLANE 0x2501
++#define GL_EYE_LINEAR 0x2400
++#define GL_EYE_PLANE 0x2502
++#define GL_SPHERE_MAP 0x2402
++#define GL_DECAL 0x2101
++#define GL_MODULATE 0x2100
++#define GL_NEAREST 0x2600
++#define GL_REPEAT 0x2901
++#define GL_CLAMP 0x2900
++#define GL_S 0x2000
++#define GL_T 0x2001
++#define GL_R 0x2002
++#define GL_Q 0x2003
++#define GL_TEXTURE_GEN_R 0x0C62
++#define GL_TEXTURE_GEN_Q 0x0C63
++
++/* Utility */
++#define GL_VENDOR 0x1F00
++#define GL_RENDERER 0x1F01
++#define GL_VERSION 0x1F02
++#define GL_EXTENSIONS 0x1F03
++
++/* Errors */
++#define GL_NO_ERROR 0x0
++#define GL_INVALID_ENUM 0x0500
++#define GL_INVALID_VALUE 0x0501
++#define GL_INVALID_OPERATION 0x0502
++#define GL_STACK_OVERFLOW 0x0503
++#define GL_STACK_UNDERFLOW 0x0504
++#define GL_OUT_OF_MEMORY 0x0505
++
++/* glPush/PopAttrib bits */
++#define GL_CURRENT_BIT 0x00000001
++#define GL_POINT_BIT 0x00000002
++#define GL_LINE_BIT 0x00000004
++#define GL_POLYGON_BIT 0x00000008
++#define GL_POLYGON_STIPPLE_BIT 0x00000010
++#define GL_PIXEL_MODE_BIT 0x00000020
++#define GL_LIGHTING_BIT 0x00000040
++#define GL_FOG_BIT 0x00000080
++#define GL_DEPTH_BUFFER_BIT 0x00000100
++#define GL_ACCUM_BUFFER_BIT 0x00000200
++#define GL_STENCIL_BUFFER_BIT 0x00000400
++#define GL_VIEWPORT_BIT 0x00000800
++#define GL_TRANSFORM_BIT 0x00001000
++#define GL_ENABLE_BIT 0x00002000
++#define GL_COLOR_BUFFER_BIT 0x00004000
++#define GL_HINT_BIT 0x00008000
++#define GL_EVAL_BIT 0x00010000
++#define GL_LIST_BIT 0x00020000
++#define GL_TEXTURE_BIT 0x00040000
++#define GL_SCISSOR_BIT 0x00080000
++#define GL_ALL_ATTRIB_BITS 0x000FFFFF
++
++
++/* OpenGL 1.1 */
++#define GL_PROXY_TEXTURE_1D 0x8063
++#define GL_PROXY_TEXTURE_2D 0x8064
++#define GL_TEXTURE_PRIORITY 0x8066
++#define GL_TEXTURE_RESIDENT 0x8067
++#define GL_TEXTURE_BINDING_1D 0x8068
++#define GL_TEXTURE_BINDING_2D 0x8069
++#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
++#define GL_ALPHA4 0x803B
++#define GL_ALPHA8 0x803C
++#define GL_ALPHA12 0x803D
++#define GL_ALPHA16 0x803E
++#define GL_LUMINANCE4 0x803F
++#define GL_LUMINANCE8 0x8040
++#define GL_LUMINANCE12 0x8041
++#define GL_LUMINANCE16 0x8042
++#define GL_LUMINANCE4_ALPHA4 0x8043
++#define GL_LUMINANCE6_ALPHA2 0x8044
++#define GL_LUMINANCE8_ALPHA8 0x8045
++#define GL_LUMINANCE12_ALPHA4 0x8046
++#define GL_LUMINANCE12_ALPHA12 0x8047
++#define GL_LUMINANCE16_ALPHA16 0x8048
++#define GL_INTENSITY 0x8049
++#define GL_INTENSITY4 0x804A
++#define GL_INTENSITY8 0x804B
++#define GL_INTENSITY12 0x804C
++#define GL_INTENSITY16 0x804D
++#define GL_R3_G3_B2 0x2A10
++#define GL_RGB4 0x804F
++#define GL_RGB5 0x8050
++#define GL_RGB8 0x8051
++#define GL_RGB10 0x8052
++#define GL_RGB12 0x8053
++#define GL_RGB16 0x8054
++#define GL_RGBA2 0x8055
++#define GL_RGBA4 0x8056
++#define GL_RGB5_A1 0x8057
++#define GL_RGBA8 0x8058
++#define GL_RGB10_A2 0x8059
++#define GL_RGBA12 0x805A
++#define GL_RGBA16 0x805B
++#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
++#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
++#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
++#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
++
++
++
++/*
++ * Miscellaneous
++ */
++
++GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
++
++GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
++
++GLAPI void GLAPIENTRY glClear( GLbitfield mask );
++
++GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
++
++GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
++
++GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
++
++GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
++
++GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
++
++GLAPI void GLAPIENTRY glCullFace( GLenum mode );
++
++GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
++
++GLAPI void GLAPIENTRY glPointSize( GLfloat size );
++
++GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
++
++GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
++
++GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
++
++GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
++
++GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
++
++GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
++
++GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
++
++GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
++
++GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
++
++GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
++
++GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
++
++GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
++
++GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
++
++GLAPI void GLAPIENTRY glEnable( GLenum cap );
++
++GLAPI void GLAPIENTRY glDisable( GLenum cap );
++
++GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
++
++
++GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
++
++
++GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
++
++GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
++
++GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
++
++GLAPI void GLAPIENTRY glPopAttrib( void );
++
++
++GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
++
++
++GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
++
++GLAPI GLenum GLAPIENTRY glGetError( void );
++
++GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
++
++GLAPI void GLAPIENTRY glFinish( void );
++
++GLAPI void GLAPIENTRY glFlush( void );
++
++GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
++
++
++/*
++ * Depth Buffer
++ */
++
++GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
++
++GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
++
++GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
++
++GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
++
++
++/*
++ * Accumulation Buffer
++ */
++
++GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
++
++GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
++
++
++/*
++ * Transformation
++ */
++
++GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
++
++GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
++ GLdouble bottom, GLdouble top,
++ GLdouble near_val, GLdouble far_val );
++
++GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
++ GLdouble bottom, GLdouble top,
++ GLdouble near_val, GLdouble far_val );
++
++GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
++ GLsizei width, GLsizei height );
++
++GLAPI void GLAPIENTRY glPushMatrix( void );
++
++GLAPI void GLAPIENTRY glPopMatrix( void );
++
++GLAPI void GLAPIENTRY glLoadIdentity( void );
++
++GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
++GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
++
++GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
++GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
++
++GLAPI void GLAPIENTRY glRotated( GLdouble angle,
++ GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
++ GLfloat x, GLfloat y, GLfloat z );
++
++GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
++
++GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
++
++
++/*
++ * Display Lists
++ */
++
++GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
++
++GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
++
++GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
++
++GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
++
++GLAPI void GLAPIENTRY glEndList( void );
++
++GLAPI void GLAPIENTRY glCallList( GLuint list );
++
++GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
++ const GLvoid *lists );
++
++GLAPI void GLAPIENTRY glListBase( GLuint base );
++
++
++/*
++ * Drawing Functions
++ */
++
++GLAPI void GLAPIENTRY glBegin( GLenum mode );
++
++GLAPI void GLAPIENTRY glEnd( void );
++
++
++GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
++GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
++GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
++GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
++
++GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
++GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
++GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
++
++GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
++GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
++GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
++GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
++
++GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
++GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
++GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
++GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
++GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
++GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
++
++GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
++GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glIndexd( GLdouble c );
++GLAPI void GLAPIENTRY glIndexf( GLfloat c );
++GLAPI void GLAPIENTRY glIndexi( GLint c );
++GLAPI void GLAPIENTRY glIndexs( GLshort c );
++GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
++GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
++GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
++GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
++GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
++
++GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
++GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
++GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
++GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
++GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
++GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
++GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
++GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
++
++GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
++ GLbyte blue, GLbyte alpha );
++GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
++ GLdouble blue, GLdouble alpha );
++GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
++ GLfloat blue, GLfloat alpha );
++GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
++ GLint blue, GLint alpha );
++GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
++ GLshort blue, GLshort alpha );
++GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
++ GLubyte blue, GLubyte alpha );
++GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
++ GLuint blue, GLuint alpha );
++GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
++ GLushort blue, GLushort alpha );
++
++
++GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
++GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
++GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
++GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
++GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
++
++GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
++GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
++GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
++GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
++GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
++GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
++
++
++GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
++GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
++GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
++GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
++
++GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
++GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
++GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
++GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
++
++GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
++GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
++GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
++GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
++
++GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
++GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
++GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
++GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
++
++GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
++GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
++GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
++GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
++GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
++
++GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
++GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
++GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
++GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
++
++GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
++GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
++GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
++GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
++
++GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
++
++GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
++GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
++GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
++GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
++GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
++GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
++GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
++
++
++GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
++GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
++GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
++GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
++
++
++/*
++ * Vertex Arrays (1.1)
++ */
++
++GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
++ const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
++ const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
++ GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
++
++GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
++
++GLAPI void GLAPIENTRY glArrayElement( GLint i );
++
++GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
++
++GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
++ GLenum type, const GLvoid *indices );
++
++GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
++ const GLvoid *pointer );
++
++/*
++ * Lighting
++ */
++
++GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
++
++GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
++ const GLfloat *params );
++GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
++ GLfloat *params );
++GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
++GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
++
++GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
++
++
++/*
++ * Raster functions
++ */
++
++GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
++
++GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
++ const GLfloat *values );
++GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
++ const GLuint *values );
++GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
++ const GLushort *values );
++
++GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
++GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
++GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
++
++GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
++ GLfloat xorig, GLfloat yorig,
++ GLfloat xmove, GLfloat ymove,
++ const GLubyte *bitmap );
++
++GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLenum type );
++
++/*
++ * Stenciling
++ */
++
++GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
++
++GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
++
++GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
++
++GLAPI void GLAPIENTRY glClearStencil( GLint s );
++
++
++
++/*
++ * Texture mapping
++ */
++
++GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
++GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
++GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
++GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
++GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
++GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
++ const GLfloat *params );
++GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
++ GLenum pname, GLfloat *params);
++GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
++ GLenum pname, GLint *params );
++
++GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
++ GLenum pname, GLfloat *params );
++GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
++ GLenum pname, GLint *params );
++
++
++GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLint border,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLsizei height,
++ GLint border, GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
++ GLenum format, GLenum type,
++ GLvoid *pixels );
++
++
++/* 1.1 functions */
++
++GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
++
++GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
++
++GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
++
++GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
++ const GLuint *textures,
++ const GLclampf *priorities );
++
++GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
++ const GLuint *textures,
++ GLboolean *residences );
++
++GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
++
++
++GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
++ GLint xoffset,
++ GLsizei width, GLenum format,
++ GLenum type, const GLvoid *pixels );
++
++
++GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLsizei width, GLsizei height,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++
++GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
++ GLenum internalformat,
++ GLint x, GLint y,
++ GLsizei width, GLint border );
++
++
++GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
++ GLenum internalformat,
++ GLint x, GLint y,
++ GLsizei width, GLsizei height,
++ GLint border );
++
++
++GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
++ GLint xoffset, GLint x, GLint y,
++ GLsizei width );
++
++
++GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint x, GLint y,
++ GLsizei width, GLsizei height );
++
++
++/*
++ * Evaluators
++ */
++
++GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
++ GLint stride,
++ GLint order, const GLdouble *points );
++GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
++ GLint stride,
++ GLint order, const GLfloat *points );
++
++GLAPI void GLAPIENTRY glMap2d( GLenum target,
++ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
++ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
++ const GLdouble *points );
++GLAPI void GLAPIENTRY glMap2f( GLenum target,
++ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
++ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
++ const GLfloat *points );
++
++GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
++GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
++GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
++
++GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
++GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
++
++GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
++GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
++
++GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
++GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
++
++GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
++GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
++
++GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
++GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
++
++GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
++ GLint vn, GLdouble v1, GLdouble v2 );
++GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
++ GLint vn, GLfloat v1, GLfloat v2 );
++
++GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
++
++GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
++
++GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
++
++GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
++
++
++/*
++ * Fog
++ */
++
++GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
++
++GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
++
++GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
++
++GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
++
++
++/*
++ * Selection and Feedback
++ */
++
++GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
++
++GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
++
++GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
++
++GLAPI void GLAPIENTRY glInitNames( void );
++
++GLAPI void GLAPIENTRY glLoadName( GLuint name );
++
++GLAPI void GLAPIENTRY glPushName( GLuint name );
++
++GLAPI void GLAPIENTRY glPopName( void );
++
++
++
++/*
++ * OpenGL 1.2
++ */
++
++#define GL_RESCALE_NORMAL 0x803A
++#define GL_CLAMP_TO_EDGE 0x812F
++#define GL_MAX_ELEMENTS_VERTICES 0x80E8
++#define GL_MAX_ELEMENTS_INDICES 0x80E9
++#define GL_BGR 0x80E0
++#define GL_BGRA 0x80E1
++#define GL_UNSIGNED_BYTE_3_3_2 0x8032
++#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
++#define GL_UNSIGNED_SHORT_5_6_5 0x8363
++#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
++#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
++#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
++#define GL_UNSIGNED_INT_8_8_8_8 0x8035
++#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
++#define GL_UNSIGNED_INT_10_10_10_2 0x8036
++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
++#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
++#define GL_SINGLE_COLOR 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
++#define GL_TEXTURE_MIN_LOD 0x813A
++#define GL_TEXTURE_MAX_LOD 0x813B
++#define GL_TEXTURE_BASE_LEVEL 0x813C
++#define GL_TEXTURE_MAX_LEVEL 0x813D
++#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
++#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
++#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
++#define GL_PACK_SKIP_IMAGES 0x806B
++#define GL_PACK_IMAGE_HEIGHT 0x806C
++#define GL_UNPACK_SKIP_IMAGES 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT 0x806E
++#define GL_TEXTURE_3D 0x806F
++#define GL_PROXY_TEXTURE_3D 0x8070
++#define GL_TEXTURE_DEPTH 0x8071
++#define GL_TEXTURE_WRAP_R 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE 0x8073
++#define GL_TEXTURE_BINDING_3D 0x806A
++
++GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
++ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
++
++GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
++ GLint internalFormat,
++ GLsizei width, GLsizei height,
++ GLsizei depth, GLint border,
++ GLenum format, GLenum type,
++ const GLvoid *pixels );
++
++GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint zoffset, GLsizei width,
++ GLsizei height, GLsizei depth,
++ GLenum format,
++ GLenum type, const GLvoid *pixels);
++
++GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
++ GLint xoffset, GLint yoffset,
++ GLint zoffset, GLint x,
++ GLint y, GLsizei width,
++ GLsizei height );
++
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++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);
++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);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++
++
++/*
++ * GL_ARB_imaging
++ */
++
++#define GL_CONSTANT_COLOR 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
++#define GL_CONSTANT_ALPHA 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
++#define GL_COLOR_TABLE 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
++#define GL_PROXY_COLOR_TABLE 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
++#define GL_COLOR_TABLE_SCALE 0x80D6
++#define GL_COLOR_TABLE_BIAS 0x80D7
++#define GL_COLOR_TABLE_FORMAT 0x80D8
++#define GL_COLOR_TABLE_WIDTH 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
++#define GL_CONVOLUTION_1D 0x8010
++#define GL_CONVOLUTION_2D 0x8011
++#define GL_SEPARABLE_2D 0x8012
++#define GL_CONVOLUTION_BORDER_MODE 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS 0x8015
++#define GL_REDUCE 0x8016
++#define GL_CONVOLUTION_FORMAT 0x8017
++#define GL_CONVOLUTION_WIDTH 0x8018
++#define GL_CONVOLUTION_HEIGHT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
++#define GL_CONSTANT_BORDER 0x8151
++#define GL_REPLICATE_BORDER 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR 0x8154
++#define GL_COLOR_MATRIX 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
++#define GL_HISTOGRAM 0x8024
++#define GL_PROXY_HISTOGRAM 0x8025
++#define GL_HISTOGRAM_WIDTH 0x8026
++#define GL_HISTOGRAM_FORMAT 0x8027
++#define GL_HISTOGRAM_RED_SIZE 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
++#define GL_HISTOGRAM_SINK 0x802D
++#define GL_MINMAX 0x802E
++#define GL_MINMAX_FORMAT 0x802F
++#define GL_MINMAX_SINK 0x8030
++#define GL_TABLE_TOO_LARGE 0x8031
++#define GL_BLEND_EQUATION 0x8009
++#define GL_MIN 0x8007
++#define GL_MAX 0x8008
++#define GL_FUNC_ADD 0x8006
++#define GL_FUNC_SUBTRACT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT 0x800B
++#define GL_BLEND_COLOR 0x8005
++
++
++GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
++ GLsizei width, GLenum format,
++ GLenum type, const GLvoid *table );
++
++GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
++ GLsizei start, GLsizei count,
++ GLenum format, GLenum type,
++ const GLvoid *data );
++
++GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
++ const GLint *params);
++
++GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
++ const GLfloat *params);
++
++GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
++ GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
++ GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
++ GLenum type, GLvoid *table );
++
++GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
++
++GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
++ GLclampf blue, GLclampf alpha );
++
++GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
++ GLenum internalformat, GLboolean sink );
++
++GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
++
++GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
++ GLenum format, GLenum type,
++ GLvoid *values );
++
++GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
++ GLboolean sink );
++
++GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
++
++GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
++ GLenum format, GLenum types,
++ GLvoid *values );
++
++GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
++ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
++ const GLvoid *image );
++
++GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
++ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const GLvoid *image );
++
++GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
++ GLfloat params );
++
++GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
++ const GLfloat *params );
++
++GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
++ GLint params );
++
++GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
++ const GLint *params );
++
++GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
++ GLenum internalformat, GLint x, GLint y, GLsizei width );
++
++GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
++ GLenum internalformat, GLint x, GLint y, GLsizei width,
++ GLsizei height);
++
++GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
++ GLenum type, GLvoid *image );
++
++GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
++ GLfloat *params );
++
++GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
++ GLint *params );
++
++GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
++ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const GLvoid *row, const GLvoid *column );
++
++GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
++ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
++
++typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
++
++
++
++/*
++ * OpenGL 1.3
++ */
++
++/* multitexture */
++#define GL_TEXTURE0 0x84C0
++#define GL_TEXTURE1 0x84C1
++#define GL_TEXTURE2 0x84C2
++#define GL_TEXTURE3 0x84C3
++#define GL_TEXTURE4 0x84C4
++#define GL_TEXTURE5 0x84C5
++#define GL_TEXTURE6 0x84C6
++#define GL_TEXTURE7 0x84C7
++#define GL_TEXTURE8 0x84C8
++#define GL_TEXTURE9 0x84C9
++#define GL_TEXTURE10 0x84CA
++#define GL_TEXTURE11 0x84CB
++#define GL_TEXTURE12 0x84CC
++#define GL_TEXTURE13 0x84CD
++#define GL_TEXTURE14 0x84CE
++#define GL_TEXTURE15 0x84CF
++#define GL_TEXTURE16 0x84D0
++#define GL_TEXTURE17 0x84D1
++#define GL_TEXTURE18 0x84D2
++#define GL_TEXTURE19 0x84D3
++#define GL_TEXTURE20 0x84D4
++#define GL_TEXTURE21 0x84D5
++#define GL_TEXTURE22 0x84D6
++#define GL_TEXTURE23 0x84D7
++#define GL_TEXTURE24 0x84D8
++#define GL_TEXTURE25 0x84D9
++#define GL_TEXTURE26 0x84DA
++#define GL_TEXTURE27 0x84DB
++#define GL_TEXTURE28 0x84DC
++#define GL_TEXTURE29 0x84DD
++#define GL_TEXTURE30 0x84DE
++#define GL_TEXTURE31 0x84DF
++#define GL_ACTIVE_TEXTURE 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
++#define GL_MAX_TEXTURE_UNITS 0x84E2
++/* texture_cube_map */
++#define GL_NORMAL_MAP 0x8511
++#define GL_REFLECTION_MAP 0x8512
++#define GL_TEXTURE_CUBE_MAP 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
++/* texture_compression */
++#define GL_COMPRESSED_ALPHA 0x84E9
++#define GL_COMPRESSED_LUMINANCE 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
++#define GL_COMPRESSED_INTENSITY 0x84EC
++#define GL_COMPRESSED_RGB 0x84ED
++#define GL_COMPRESSED_RGBA 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
++#define GL_TEXTURE_COMPRESSED 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
++/* multisample */
++#define GL_MULTISAMPLE 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
++#define GL_SAMPLE_COVERAGE 0x80A0
++#define GL_SAMPLE_BUFFERS 0x80A8
++#define GL_SAMPLES 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
++#define GL_MULTISAMPLE_BIT 0x20000000
++/* transpose_matrix */
++#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
++/* texture_env_combine */
++#define GL_COMBINE 0x8570
++#define GL_COMBINE_RGB 0x8571
++#define GL_COMBINE_ALPHA 0x8572
++#define GL_SOURCE0_RGB 0x8580
++#define GL_SOURCE1_RGB 0x8581
++#define GL_SOURCE2_RGB 0x8582
++#define GL_SOURCE0_ALPHA 0x8588
++#define GL_SOURCE1_ALPHA 0x8589
++#define GL_SOURCE2_ALPHA 0x858A
++#define GL_OPERAND0_RGB 0x8590
++#define GL_OPERAND1_RGB 0x8591
++#define GL_OPERAND2_RGB 0x8592
++#define GL_OPERAND0_ALPHA 0x8598
++#define GL_OPERAND1_ALPHA 0x8599
++#define GL_OPERAND2_ALPHA 0x859A
++#define GL_RGB_SCALE 0x8573
++#define GL_ADD_SIGNED 0x8574
++#define GL_INTERPOLATE 0x8575
++#define GL_SUBTRACT 0x84E7
++#define GL_CONSTANT 0x8576
++#define GL_PRIMARY_COLOR 0x8577
++#define GL_PREVIOUS 0x8578
++/* texture_env_dot3 */
++#define GL_DOT3_RGB 0x86AE
++#define GL_DOT3_RGBA 0x86AF
++/* texture_border_clamp */
++#define GL_CLAMP_TO_BORDER 0x812D
++
++GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
++
++GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
++
++GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
++
++GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
++
++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 );
++
++GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
++
++GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
++
++GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
++
++GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
++
++GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
++
++
++GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
++
++GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
++
++GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
++
++GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
++
++GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
++
++typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
++
++
++/*
++ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
++ */
++#ifndef GL_ARB_multitexture
++#define GL_ARB_multitexture 1
++
++#define GL_TEXTURE0_ARB 0x84C0
++#define GL_TEXTURE1_ARB 0x84C1
++#define GL_TEXTURE2_ARB 0x84C2
++#define GL_TEXTURE3_ARB 0x84C3
++#define GL_TEXTURE4_ARB 0x84C4
++#define GL_TEXTURE5_ARB 0x84C5
++#define GL_TEXTURE6_ARB 0x84C6
++#define GL_TEXTURE7_ARB 0x84C7
++#define GL_TEXTURE8_ARB 0x84C8
++#define GL_TEXTURE9_ARB 0x84C9
++#define GL_TEXTURE10_ARB 0x84CA
++#define GL_TEXTURE11_ARB 0x84CB
++#define GL_TEXTURE12_ARB 0x84CC
++#define GL_TEXTURE13_ARB 0x84CD
++#define GL_TEXTURE14_ARB 0x84CE
++#define GL_TEXTURE15_ARB 0x84CF
++#define GL_TEXTURE16_ARB 0x84D0
++#define GL_TEXTURE17_ARB 0x84D1
++#define GL_TEXTURE18_ARB 0x84D2
++#define GL_TEXTURE19_ARB 0x84D3
++#define GL_TEXTURE20_ARB 0x84D4
++#define GL_TEXTURE21_ARB 0x84D5
++#define GL_TEXTURE22_ARB 0x84D6
++#define GL_TEXTURE23_ARB 0x84D7
++#define GL_TEXTURE24_ARB 0x84D8
++#define GL_TEXTURE25_ARB 0x84D9
++#define GL_TEXTURE26_ARB 0x84DA
++#define GL_TEXTURE27_ARB 0x84DB
++#define GL_TEXTURE28_ARB 0x84DC
++#define GL_TEXTURE29_ARB 0x84DD
++#define GL_TEXTURE30_ARB 0x84DE
++#define GL_TEXTURE31_ARB 0x84DF
++#define GL_ACTIVE_TEXTURE_ARB 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
++#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
++
++GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
++GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
++GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
++GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
++GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
++GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
++GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
++GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
++GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
++GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
++GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
++GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
++GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
++GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
++GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
++GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
++GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
++
++typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
++
++#endif /* GL_ARB_multitexture */
++
++
++
++/*
++ * Define this token if you want "old-style" header file behaviour (extensions
++ * defined in gl.h). Otherwise, extensions will be included from glext.h.
++ */
++#if defined(GL_GLEXT_LEGACY)
++
++/* All extensions that used to be here are now found in glext.h */
++
++#else /* GL_GLEXT_LEGACY */
++
++#include <mesa_glext.h>
++
++#endif /* GL_GLEXT_LEGACY */
++
++
++
++#if GL_ARB_shader_objects
++
++#ifndef GL_MESA_shader_debug
++#define GL_MESA_shader_debug 1
++
++#define GL_DEBUG_OBJECT_MESA 0x8759
++#define GL_DEBUG_PRINT_MESA 0x875A
++#define GL_DEBUG_ASSERT_MESA 0x875B
++
++GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
++GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
++GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
++ GLsizei *length, GLcharARB *debugLog);
++GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
++
++#endif /* GL_MESA_shader_debug */
++
++#endif /* GL_ARB_shader_objects */
++
++
++/*
++ * ???. GL_MESA_packed_depth_stencil
++ * XXX obsolete
++ */
++#ifndef GL_MESA_packed_depth_stencil
++#define GL_MESA_packed_depth_stencil 1
++
++#define GL_DEPTH_STENCIL_MESA 0x8750
++#define GL_UNSIGNED_INT_24_8_MESA 0x8751
++#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
++#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
++#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
++
++#endif /* GL_MESA_packed_depth_stencil */
++
++
++#ifndef GL_MESA_program_debug
++#define GL_MESA_program_debug 1
++
++#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
++#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
++#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
++#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
++#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
++#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
++#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
++#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
++
++typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
++
++GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
++
++GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
++
++#endif /* GL_MESA_program_debug */
++
++
++#ifndef GL_ATI_blend_equation_separate
++#define GL_ATI_blend_equation_separate 1
++
++#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
++
++GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
++
++#endif /* GL_ATI_blend_equation_separate */
++
++
++
++/**
++ ** NOTE!!!!! If you add new functions to this file, or update
++ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
++ ** in that file for details.
++ **/
++
++
++
++/**********************************************************************
++ * Begin system-specific stuff
++ */
++#if defined(PRAGMA_EXPORT_SUPPORTED)
++#pragma export off
++#endif
++
++#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
++#pragma import off
++#endif
++/*
++ * End system-specific stuff
++ **********************************************************************/
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __gl_h_ */
+Index: qemu-0.12.4/target-i386/mesa_glext.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_glext.h
+@@ -0,0 +1,7279 @@
++#ifndef __glext_h_
++#define __glext_h_
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++** Copyright (c) 2007 The Khronos Group Inc.
++**
++** Permission is hereby granted, free of charge, to any person obtaining a
++** copy of this software and/or associated documentation files (the
++** "Materials"), to deal in the Materials without restriction, including
++** without limitation the rights to use, copy, modify, merge, publish,
++** distribute, sublicense, and/or sell copies of the Materials, and to
++** permit persons to whom the Materials are furnished to do so, subject to
++** the following conditions:
++**
++** The above copyright notice and this permission notice shall be included
++** in all copies or substantial portions of the Materials.
++**
++** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
++*/
++
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY
++#endif
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++/*************************************************************/
++
++/* Header file version number, required by OpenGL ABI for Linux */
++/* glext.h last updated 2007/02/12 */
++/* Current version at http://www.opengl.org/registry/ */
++#define GL_GLEXT_VERSION 39
++
++#ifndef GL_VERSION_1_2
++#define GL_UNSIGNED_BYTE_3_3_2 0x8032
++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
++#define GL_UNSIGNED_INT_8_8_8_8 0x8035
++#define GL_UNSIGNED_INT_10_10_10_2 0x8036
++#define GL_RESCALE_NORMAL 0x803A
++#define GL_TEXTURE_BINDING_3D 0x806A
++#define GL_PACK_SKIP_IMAGES 0x806B
++#define GL_PACK_IMAGE_HEIGHT 0x806C
++#define GL_UNPACK_SKIP_IMAGES 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT 0x806E
++#define GL_TEXTURE_3D 0x806F
++#define GL_PROXY_TEXTURE_3D 0x8070
++#define GL_TEXTURE_DEPTH 0x8071
++#define GL_TEXTURE_WRAP_R 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE 0x8073
++#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
++#define GL_UNSIGNED_SHORT_5_6_5 0x8363
++#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
++#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
++#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
++#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
++#define GL_BGR 0x80E0
++#define GL_BGRA 0x80E1
++#define GL_MAX_ELEMENTS_VERTICES 0x80E8
++#define GL_MAX_ELEMENTS_INDICES 0x80E9
++#define GL_CLAMP_TO_EDGE 0x812F
++#define GL_TEXTURE_MIN_LOD 0x813A
++#define GL_TEXTURE_MAX_LOD 0x813B
++#define GL_TEXTURE_BASE_LEVEL 0x813C
++#define GL_TEXTURE_MAX_LEVEL 0x813D
++#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
++#define GL_SINGLE_COLOR 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
++#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
++#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
++#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
++#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
++#endif
++
++#ifndef GL_ARB_imaging
++#define GL_CONSTANT_COLOR 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
++#define GL_CONSTANT_ALPHA 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
++#define GL_BLEND_COLOR 0x8005
++#define GL_FUNC_ADD 0x8006
++#define GL_MIN 0x8007
++#define GL_MAX 0x8008
++#define GL_BLEND_EQUATION 0x8009
++#define GL_FUNC_SUBTRACT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT 0x800B
++#define GL_CONVOLUTION_1D 0x8010
++#define GL_CONVOLUTION_2D 0x8011
++#define GL_SEPARABLE_2D 0x8012
++#define GL_CONVOLUTION_BORDER_MODE 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS 0x8015
++#define GL_REDUCE 0x8016
++#define GL_CONVOLUTION_FORMAT 0x8017
++#define GL_CONVOLUTION_WIDTH 0x8018
++#define GL_CONVOLUTION_HEIGHT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
++#define GL_HISTOGRAM 0x8024
++#define GL_PROXY_HISTOGRAM 0x8025
++#define GL_HISTOGRAM_WIDTH 0x8026
++#define GL_HISTOGRAM_FORMAT 0x8027
++#define GL_HISTOGRAM_RED_SIZE 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
++#define GL_HISTOGRAM_SINK 0x802D
++#define GL_MINMAX 0x802E
++#define GL_MINMAX_FORMAT 0x802F
++#define GL_MINMAX_SINK 0x8030
++#define GL_TABLE_TOO_LARGE 0x8031
++#define GL_COLOR_MATRIX 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
++#define GL_COLOR_TABLE 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
++#define GL_PROXY_COLOR_TABLE 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
++#define GL_COLOR_TABLE_SCALE 0x80D6
++#define GL_COLOR_TABLE_BIAS 0x80D7
++#define GL_COLOR_TABLE_FORMAT 0x80D8
++#define GL_COLOR_TABLE_WIDTH 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
++#define GL_CONSTANT_BORDER 0x8151
++#define GL_REPLICATE_BORDER 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR 0x8154
++#endif
++
++#ifndef GL_VERSION_1_3
++#define GL_TEXTURE0 0x84C0
++#define GL_TEXTURE1 0x84C1
++#define GL_TEXTURE2 0x84C2
++#define GL_TEXTURE3 0x84C3
++#define GL_TEXTURE4 0x84C4
++#define GL_TEXTURE5 0x84C5
++#define GL_TEXTURE6 0x84C6
++#define GL_TEXTURE7 0x84C7
++#define GL_TEXTURE8 0x84C8
++#define GL_TEXTURE9 0x84C9
++#define GL_TEXTURE10 0x84CA
++#define GL_TEXTURE11 0x84CB
++#define GL_TEXTURE12 0x84CC
++#define GL_TEXTURE13 0x84CD
++#define GL_TEXTURE14 0x84CE
++#define GL_TEXTURE15 0x84CF
++#define GL_TEXTURE16 0x84D0
++#define GL_TEXTURE17 0x84D1
++#define GL_TEXTURE18 0x84D2
++#define GL_TEXTURE19 0x84D3
++#define GL_TEXTURE20 0x84D4
++#define GL_TEXTURE21 0x84D5
++#define GL_TEXTURE22 0x84D6
++#define GL_TEXTURE23 0x84D7
++#define GL_TEXTURE24 0x84D8
++#define GL_TEXTURE25 0x84D9
++#define GL_TEXTURE26 0x84DA
++#define GL_TEXTURE27 0x84DB
++#define GL_TEXTURE28 0x84DC
++#define GL_TEXTURE29 0x84DD
++#define GL_TEXTURE30 0x84DE
++#define GL_TEXTURE31 0x84DF
++#define GL_ACTIVE_TEXTURE 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
++#define GL_MAX_TEXTURE_UNITS 0x84E2
++#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
++#define GL_MULTISAMPLE 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
++#define GL_SAMPLE_COVERAGE 0x80A0
++#define GL_SAMPLE_BUFFERS 0x80A8
++#define GL_SAMPLES 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
++#define GL_MULTISAMPLE_BIT 0x20000000
++#define GL_NORMAL_MAP 0x8511
++#define GL_REFLECTION_MAP 0x8512
++#define GL_TEXTURE_CUBE_MAP 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
++#define GL_COMPRESSED_ALPHA 0x84E9
++#define GL_COMPRESSED_LUMINANCE 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
++#define GL_COMPRESSED_INTENSITY 0x84EC
++#define GL_COMPRESSED_RGB 0x84ED
++#define GL_COMPRESSED_RGBA 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
++#define GL_TEXTURE_COMPRESSED 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
++#define GL_CLAMP_TO_BORDER 0x812D
++#define GL_COMBINE 0x8570
++#define GL_COMBINE_RGB 0x8571
++#define GL_COMBINE_ALPHA 0x8572
++#define GL_SOURCE0_RGB 0x8580
++#define GL_SOURCE1_RGB 0x8581
++#define GL_SOURCE2_RGB 0x8582
++#define GL_SOURCE0_ALPHA 0x8588
++#define GL_SOURCE1_ALPHA 0x8589
++#define GL_SOURCE2_ALPHA 0x858A
++#define GL_OPERAND0_RGB 0x8590
++#define GL_OPERAND1_RGB 0x8591
++#define GL_OPERAND2_RGB 0x8592
++#define GL_OPERAND0_ALPHA 0x8598
++#define GL_OPERAND1_ALPHA 0x8599
++#define GL_OPERAND2_ALPHA 0x859A
++#define GL_RGB_SCALE 0x8573
++#define GL_ADD_SIGNED 0x8574
++#define GL_INTERPOLATE 0x8575
++#define GL_SUBTRACT 0x84E7
++#define GL_CONSTANT 0x8576
++#define GL_PRIMARY_COLOR 0x8577
++#define GL_PREVIOUS 0x8578
++#define GL_DOT3_RGB 0x86AE
++#define GL_DOT3_RGBA 0x86AF
++#endif
++
++#ifndef GL_VERSION_1_4
++#define GL_BLEND_DST_RGB 0x80C8
++#define GL_BLEND_SRC_RGB 0x80C9
++#define GL_BLEND_DST_ALPHA 0x80CA
++#define GL_BLEND_SRC_ALPHA 0x80CB
++#define GL_POINT_SIZE_MIN 0x8126
++#define GL_POINT_SIZE_MAX 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
++#define GL_POINT_DISTANCE_ATTENUATION 0x8129
++#define GL_GENERATE_MIPMAP 0x8191
++#define GL_GENERATE_MIPMAP_HINT 0x8192
++#define GL_DEPTH_COMPONENT16 0x81A5
++#define GL_DEPTH_COMPONENT24 0x81A6
++#define GL_DEPTH_COMPONENT32 0x81A7
++#define GL_MIRRORED_REPEAT 0x8370
++#define GL_FOG_COORDINATE_SOURCE 0x8450
++#define GL_FOG_COORDINATE 0x8451
++#define GL_FRAGMENT_DEPTH 0x8452
++#define GL_CURRENT_FOG_COORDINATE 0x8453
++#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
++#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
++#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
++#define GL_FOG_COORDINATE_ARRAY 0x8457
++#define GL_COLOR_SUM 0x8458
++#define GL_CURRENT_SECONDARY_COLOR 0x8459
++#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
++#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
++#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
++#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
++#define GL_SECONDARY_COLOR_ARRAY 0x845E
++#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
++#define GL_TEXTURE_FILTER_CONTROL 0x8500
++#define GL_TEXTURE_LOD_BIAS 0x8501
++#define GL_INCR_WRAP 0x8507
++#define GL_DECR_WRAP 0x8508
++#define GL_TEXTURE_DEPTH_SIZE 0x884A
++#define GL_DEPTH_TEXTURE_MODE 0x884B
++#define GL_TEXTURE_COMPARE_MODE 0x884C
++#define GL_TEXTURE_COMPARE_FUNC 0x884D
++#define GL_COMPARE_R_TO_TEXTURE 0x884E
++#endif
++
++#ifndef GL_VERSION_1_5
++#define GL_BUFFER_SIZE 0x8764
++#define GL_BUFFER_USAGE 0x8765
++#define GL_QUERY_COUNTER_BITS 0x8864
++#define GL_CURRENT_QUERY 0x8865
++#define GL_QUERY_RESULT 0x8866
++#define GL_QUERY_RESULT_AVAILABLE 0x8867
++#define GL_ARRAY_BUFFER 0x8892
++#define GL_ELEMENT_ARRAY_BUFFER 0x8893
++#define GL_ARRAY_BUFFER_BINDING 0x8894
++#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
++#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
++#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
++#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
++#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
++#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
++#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
++#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
++#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
++#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
++#define GL_READ_ONLY 0x88B8
++#define GL_WRITE_ONLY 0x88B9
++#define GL_READ_WRITE 0x88BA
++#define GL_BUFFER_ACCESS 0x88BB
++#define GL_BUFFER_MAPPED 0x88BC
++#define GL_BUFFER_MAP_POINTER 0x88BD
++#define GL_STREAM_DRAW 0x88E0
++#define GL_STREAM_READ 0x88E1
++#define GL_STREAM_COPY 0x88E2
++#define GL_STATIC_DRAW 0x88E4
++#define GL_STATIC_READ 0x88E5
++#define GL_STATIC_COPY 0x88E6
++#define GL_DYNAMIC_DRAW 0x88E8
++#define GL_DYNAMIC_READ 0x88E9
++#define GL_DYNAMIC_COPY 0x88EA
++#define GL_SAMPLES_PASSED 0x8914
++#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
++#define GL_FOG_COORD GL_FOG_COORDINATE
++#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
++#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
++#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
++#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
++#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
++#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
++#define GL_SRC0_RGB GL_SOURCE0_RGB
++#define GL_SRC1_RGB GL_SOURCE1_RGB
++#define GL_SRC2_RGB GL_SOURCE2_RGB
++#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
++#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
++#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
++#endif
++
++#ifndef GL_VERSION_2_0
++#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
++#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
++#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
++#define GL_CURRENT_VERTEX_ATTRIB 0x8626
++#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
++#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
++#define GL_STENCIL_BACK_FUNC 0x8800
++#define GL_STENCIL_BACK_FAIL 0x8801
++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
++#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
++#define GL_MAX_DRAW_BUFFERS 0x8824
++#define GL_DRAW_BUFFER0 0x8825
++#define GL_DRAW_BUFFER1 0x8826
++#define GL_DRAW_BUFFER2 0x8827
++#define GL_DRAW_BUFFER3 0x8828
++#define GL_DRAW_BUFFER4 0x8829
++#define GL_DRAW_BUFFER5 0x882A
++#define GL_DRAW_BUFFER6 0x882B
++#define GL_DRAW_BUFFER7 0x882C
++#define GL_DRAW_BUFFER8 0x882D
++#define GL_DRAW_BUFFER9 0x882E
++#define GL_DRAW_BUFFER10 0x882F
++#define GL_DRAW_BUFFER11 0x8830
++#define GL_DRAW_BUFFER12 0x8831
++#define GL_DRAW_BUFFER13 0x8832
++#define GL_DRAW_BUFFER14 0x8833
++#define GL_DRAW_BUFFER15 0x8834
++#define GL_BLEND_EQUATION_ALPHA 0x883D
++#define GL_POINT_SPRITE 0x8861
++#define GL_COORD_REPLACE 0x8862
++#define GL_MAX_VERTEX_ATTRIBS 0x8869
++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
++#define GL_MAX_TEXTURE_COORDS 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
++#define GL_FRAGMENT_SHADER 0x8B30
++#define GL_VERTEX_SHADER 0x8B31
++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
++#define GL_MAX_VARYING_FLOATS 0x8B4B
++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
++#define GL_SHADER_TYPE 0x8B4F
++#define GL_FLOAT_VEC2 0x8B50
++#define GL_FLOAT_VEC3 0x8B51
++#define GL_FLOAT_VEC4 0x8B52
++#define GL_INT_VEC2 0x8B53
++#define GL_INT_VEC3 0x8B54
++#define GL_INT_VEC4 0x8B55
++#define GL_BOOL 0x8B56
++#define GL_BOOL_VEC2 0x8B57
++#define GL_BOOL_VEC3 0x8B58
++#define GL_BOOL_VEC4 0x8B59
++#define GL_FLOAT_MAT2 0x8B5A
++#define GL_FLOAT_MAT3 0x8B5B
++#define GL_FLOAT_MAT4 0x8B5C
++#define GL_SAMPLER_1D 0x8B5D
++#define GL_SAMPLER_2D 0x8B5E
++#define GL_SAMPLER_3D 0x8B5F
++#define GL_SAMPLER_CUBE 0x8B60
++#define GL_SAMPLER_1D_SHADOW 0x8B61
++#define GL_SAMPLER_2D_SHADOW 0x8B62
++#define GL_DELETE_STATUS 0x8B80
++#define GL_COMPILE_STATUS 0x8B81
++#define GL_LINK_STATUS 0x8B82
++#define GL_VALIDATE_STATUS 0x8B83
++#define GL_INFO_LOG_LENGTH 0x8B84
++#define GL_ATTACHED_SHADERS 0x8B85
++#define GL_ACTIVE_UNIFORMS 0x8B86
++#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
++#define GL_SHADER_SOURCE_LENGTH 0x8B88
++#define GL_ACTIVE_ATTRIBUTES 0x8B89
++#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
++#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
++#define GL_CURRENT_PROGRAM 0x8B8D
++#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
++#define GL_LOWER_LEFT 0x8CA1
++#define GL_UPPER_LEFT 0x8CA2
++#define GL_STENCIL_BACK_REF 0x8CA3
++#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
++#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
++#endif
++
++#ifndef GL_VERSION_2_1
++#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
++#define GL_PIXEL_PACK_BUFFER 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
++#define GL_FLOAT_MAT2x3 0x8B65
++#define GL_FLOAT_MAT2x4 0x8B66
++#define GL_FLOAT_MAT3x2 0x8B67
++#define GL_FLOAT_MAT3x4 0x8B68
++#define GL_FLOAT_MAT4x2 0x8B69
++#define GL_FLOAT_MAT4x3 0x8B6A
++#define GL_SRGB 0x8C40
++#define GL_SRGB8 0x8C41
++#define GL_SRGB_ALPHA 0x8C42
++#define GL_SRGB8_ALPHA8 0x8C43
++#define GL_SLUMINANCE_ALPHA 0x8C44
++#define GL_SLUMINANCE8_ALPHA8 0x8C45
++#define GL_SLUMINANCE 0x8C46
++#define GL_SLUMINANCE8 0x8C47
++#define GL_COMPRESSED_SRGB 0x8C48
++#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
++#define GL_COMPRESSED_SLUMINANCE 0x8C4A
++#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
++#endif
++
++#ifndef GL_ARB_multitexture
++#define GL_TEXTURE0_ARB 0x84C0
++#define GL_TEXTURE1_ARB 0x84C1
++#define GL_TEXTURE2_ARB 0x84C2
++#define GL_TEXTURE3_ARB 0x84C3
++#define GL_TEXTURE4_ARB 0x84C4
++#define GL_TEXTURE5_ARB 0x84C5
++#define GL_TEXTURE6_ARB 0x84C6
++#define GL_TEXTURE7_ARB 0x84C7
++#define GL_TEXTURE8_ARB 0x84C8
++#define GL_TEXTURE9_ARB 0x84C9
++#define GL_TEXTURE10_ARB 0x84CA
++#define GL_TEXTURE11_ARB 0x84CB
++#define GL_TEXTURE12_ARB 0x84CC
++#define GL_TEXTURE13_ARB 0x84CD
++#define GL_TEXTURE14_ARB 0x84CE
++#define GL_TEXTURE15_ARB 0x84CF
++#define GL_TEXTURE16_ARB 0x84D0
++#define GL_TEXTURE17_ARB 0x84D1
++#define GL_TEXTURE18_ARB 0x84D2
++#define GL_TEXTURE19_ARB 0x84D3
++#define GL_TEXTURE20_ARB 0x84D4
++#define GL_TEXTURE21_ARB 0x84D5
++#define GL_TEXTURE22_ARB 0x84D6
++#define GL_TEXTURE23_ARB 0x84D7
++#define GL_TEXTURE24_ARB 0x84D8
++#define GL_TEXTURE25_ARB 0x84D9
++#define GL_TEXTURE26_ARB 0x84DA
++#define GL_TEXTURE27_ARB 0x84DB
++#define GL_TEXTURE28_ARB 0x84DC
++#define GL_TEXTURE29_ARB 0x84DD
++#define GL_TEXTURE30_ARB 0x84DE
++#define GL_TEXTURE31_ARB 0x84DF
++#define GL_ACTIVE_TEXTURE_ARB 0x84E0
++#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
++#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
++#endif
++
++#ifndef GL_ARB_transpose_matrix
++#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
++#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
++#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
++#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
++#endif
++
++#ifndef GL_ARB_multisample
++#define GL_MULTISAMPLE_ARB 0x809D
++#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
++#define GL_SAMPLE_COVERAGE_ARB 0x80A0
++#define GL_SAMPLE_BUFFERS_ARB 0x80A8
++#define GL_SAMPLES_ARB 0x80A9
++#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
++#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
++#define GL_MULTISAMPLE_BIT_ARB 0x20000000
++#endif
++
++#ifndef GL_ARB_texture_env_add
++#endif
++
++#ifndef GL_ARB_texture_cube_map
++#define GL_NORMAL_MAP_ARB 0x8511
++#define GL_REFLECTION_MAP_ARB 0x8512
++#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
++#endif
++
++#ifndef GL_ARB_texture_compression
++#define GL_COMPRESSED_ALPHA_ARB 0x84E9
++#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
++#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
++#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
++#define GL_COMPRESSED_RGB_ARB 0x84ED
++#define GL_COMPRESSED_RGBA_ARB 0x84EE
++#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
++#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
++#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
++#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
++#endif
++
++#ifndef GL_ARB_texture_border_clamp
++#define GL_CLAMP_TO_BORDER_ARB 0x812D
++#endif
++
++#ifndef GL_ARB_point_parameters
++#define GL_POINT_SIZE_MIN_ARB 0x8126
++#define GL_POINT_SIZE_MAX_ARB 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
++#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
++#endif
++
++#ifndef GL_ARB_vertex_blend
++#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
++#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
++#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
++#define GL_VERTEX_BLEND_ARB 0x86A7
++#define GL_CURRENT_WEIGHT_ARB 0x86A8
++#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
++#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
++#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
++#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
++#define GL_WEIGHT_ARRAY_ARB 0x86AD
++#define GL_MODELVIEW0_ARB 0x1700
++#define GL_MODELVIEW1_ARB 0x850A
++#define GL_MODELVIEW2_ARB 0x8722
++#define GL_MODELVIEW3_ARB 0x8723
++#define GL_MODELVIEW4_ARB 0x8724
++#define GL_MODELVIEW5_ARB 0x8725
++#define GL_MODELVIEW6_ARB 0x8726
++#define GL_MODELVIEW7_ARB 0x8727
++#define GL_MODELVIEW8_ARB 0x8728
++#define GL_MODELVIEW9_ARB 0x8729
++#define GL_MODELVIEW10_ARB 0x872A
++#define GL_MODELVIEW11_ARB 0x872B
++#define GL_MODELVIEW12_ARB 0x872C
++#define GL_MODELVIEW13_ARB 0x872D
++#define GL_MODELVIEW14_ARB 0x872E
++#define GL_MODELVIEW15_ARB 0x872F
++#define GL_MODELVIEW16_ARB 0x8730
++#define GL_MODELVIEW17_ARB 0x8731
++#define GL_MODELVIEW18_ARB 0x8732
++#define GL_MODELVIEW19_ARB 0x8733
++#define GL_MODELVIEW20_ARB 0x8734
++#define GL_MODELVIEW21_ARB 0x8735
++#define GL_MODELVIEW22_ARB 0x8736
++#define GL_MODELVIEW23_ARB 0x8737
++#define GL_MODELVIEW24_ARB 0x8738
++#define GL_MODELVIEW25_ARB 0x8739
++#define GL_MODELVIEW26_ARB 0x873A
++#define GL_MODELVIEW27_ARB 0x873B
++#define GL_MODELVIEW28_ARB 0x873C
++#define GL_MODELVIEW29_ARB 0x873D
++#define GL_MODELVIEW30_ARB 0x873E
++#define GL_MODELVIEW31_ARB 0x873F
++#endif
++
++#ifndef GL_ARB_matrix_palette
++#define GL_MATRIX_PALETTE_ARB 0x8840
++#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
++#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
++#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
++#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
++#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
++#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
++#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
++#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
++#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
++#endif
++
++#ifndef GL_ARB_texture_env_combine
++#define GL_COMBINE_ARB 0x8570
++#define GL_COMBINE_RGB_ARB 0x8571
++#define GL_COMBINE_ALPHA_ARB 0x8572
++#define GL_SOURCE0_RGB_ARB 0x8580
++#define GL_SOURCE1_RGB_ARB 0x8581
++#define GL_SOURCE2_RGB_ARB 0x8582
++#define GL_SOURCE0_ALPHA_ARB 0x8588
++#define GL_SOURCE1_ALPHA_ARB 0x8589
++#define GL_SOURCE2_ALPHA_ARB 0x858A
++#define GL_OPERAND0_RGB_ARB 0x8590
++#define GL_OPERAND1_RGB_ARB 0x8591
++#define GL_OPERAND2_RGB_ARB 0x8592
++#define GL_OPERAND0_ALPHA_ARB 0x8598
++#define GL_OPERAND1_ALPHA_ARB 0x8599
++#define GL_OPERAND2_ALPHA_ARB 0x859A
++#define GL_RGB_SCALE_ARB 0x8573
++#define GL_ADD_SIGNED_ARB 0x8574
++#define GL_INTERPOLATE_ARB 0x8575
++#define GL_SUBTRACT_ARB 0x84E7
++#define GL_CONSTANT_ARB 0x8576
++#define GL_PRIMARY_COLOR_ARB 0x8577
++#define GL_PREVIOUS_ARB 0x8578
++#endif
++
++#ifndef GL_ARB_texture_env_crossbar
++#endif
++
++#ifndef GL_ARB_texture_env_dot3
++#define GL_DOT3_RGB_ARB 0x86AE
++#define GL_DOT3_RGBA_ARB 0x86AF
++#endif
++
++#ifndef GL_ARB_texture_mirrored_repeat
++#define GL_MIRRORED_REPEAT_ARB 0x8370
++#endif
++
++#ifndef GL_ARB_depth_texture
++#define GL_DEPTH_COMPONENT16_ARB 0x81A5
++#define GL_DEPTH_COMPONENT24_ARB 0x81A6
++#define GL_DEPTH_COMPONENT32_ARB 0x81A7
++#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
++#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
++#endif
++
++#ifndef GL_ARB_shadow
++#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
++#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
++#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
++#endif
++
++#ifndef GL_ARB_shadow_ambient
++#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
++#endif
++
++#ifndef GL_ARB_window_pos
++#endif
++
++#ifndef GL_ARB_vertex_program
++#define GL_COLOR_SUM_ARB 0x8458
++#define GL_VERTEX_PROGRAM_ARB 0x8620
++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
++#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
++#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
++#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
++#define GL_PROGRAM_LENGTH_ARB 0x8627
++#define GL_PROGRAM_STRING_ARB 0x8628
++#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
++#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
++#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
++#define GL_CURRENT_MATRIX_ARB 0x8641
++#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
++#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
++#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
++#define GL_PROGRAM_BINDING_ARB 0x8677
++#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
++#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
++#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
++#define GL_PROGRAM_FORMAT_ARB 0x8876
++#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
++#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
++#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
++#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
++#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
++#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
++#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
++#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
++#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
++#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
++#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
++#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
++#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
++#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
++#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
++#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
++#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
++#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
++#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
++#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
++#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
++#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
++#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
++#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
++#define GL_MATRIX0_ARB 0x88C0
++#define GL_MATRIX1_ARB 0x88C1
++#define GL_MATRIX2_ARB 0x88C2
++#define GL_MATRIX3_ARB 0x88C3
++#define GL_MATRIX4_ARB 0x88C4
++#define GL_MATRIX5_ARB 0x88C5
++#define GL_MATRIX6_ARB 0x88C6
++#define GL_MATRIX7_ARB 0x88C7
++#define GL_MATRIX8_ARB 0x88C8
++#define GL_MATRIX9_ARB 0x88C9
++#define GL_MATRIX10_ARB 0x88CA
++#define GL_MATRIX11_ARB 0x88CB
++#define GL_MATRIX12_ARB 0x88CC
++#define GL_MATRIX13_ARB 0x88CD
++#define GL_MATRIX14_ARB 0x88CE
++#define GL_MATRIX15_ARB 0x88CF
++#define GL_MATRIX16_ARB 0x88D0
++#define GL_MATRIX17_ARB 0x88D1
++#define GL_MATRIX18_ARB 0x88D2
++#define GL_MATRIX19_ARB 0x88D3
++#define GL_MATRIX20_ARB 0x88D4
++#define GL_MATRIX21_ARB 0x88D5
++#define GL_MATRIX22_ARB 0x88D6
++#define GL_MATRIX23_ARB 0x88D7
++#define GL_MATRIX24_ARB 0x88D8
++#define GL_MATRIX25_ARB 0x88D9
++#define GL_MATRIX26_ARB 0x88DA
++#define GL_MATRIX27_ARB 0x88DB
++#define GL_MATRIX28_ARB 0x88DC
++#define GL_MATRIX29_ARB 0x88DD
++#define GL_MATRIX30_ARB 0x88DE
++#define GL_MATRIX31_ARB 0x88DF
++#endif
++
++#ifndef GL_ARB_fragment_program
++#define GL_FRAGMENT_PROGRAM_ARB 0x8804
++#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
++#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
++#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
++#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
++#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
++#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
++#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
++#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
++#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
++#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
++#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
++#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
++#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++#define GL_BUFFER_SIZE_ARB 0x8764
++#define GL_BUFFER_USAGE_ARB 0x8765
++#define GL_ARRAY_BUFFER_ARB 0x8892
++#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
++#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
++#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
++#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
++#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
++#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
++#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
++#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
++#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
++#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
++#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
++#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
++#define GL_READ_ONLY_ARB 0x88B8
++#define GL_WRITE_ONLY_ARB 0x88B9
++#define GL_READ_WRITE_ARB 0x88BA
++#define GL_BUFFER_ACCESS_ARB 0x88BB
++#define GL_BUFFER_MAPPED_ARB 0x88BC
++#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
++#define GL_STREAM_DRAW_ARB 0x88E0
++#define GL_STREAM_READ_ARB 0x88E1
++#define GL_STREAM_COPY_ARB 0x88E2
++#define GL_STATIC_DRAW_ARB 0x88E4
++#define GL_STATIC_READ_ARB 0x88E5
++#define GL_STATIC_COPY_ARB 0x88E6
++#define GL_DYNAMIC_DRAW_ARB 0x88E8
++#define GL_DYNAMIC_READ_ARB 0x88E9
++#define GL_DYNAMIC_COPY_ARB 0x88EA
++#endif
++
++#ifndef GL_ARB_occlusion_query
++#define GL_QUERY_COUNTER_BITS_ARB 0x8864
++#define GL_CURRENT_QUERY_ARB 0x8865
++#define GL_QUERY_RESULT_ARB 0x8866
++#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
++#define GL_SAMPLES_PASSED_ARB 0x8914
++#endif
++
++#ifndef GL_ARB_shader_objects
++#define GL_PROGRAM_OBJECT_ARB 0x8B40
++#define GL_SHADER_OBJECT_ARB 0x8B48
++#define GL_OBJECT_TYPE_ARB 0x8B4E
++#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
++#define GL_FLOAT_VEC2_ARB 0x8B50
++#define GL_FLOAT_VEC3_ARB 0x8B51
++#define GL_FLOAT_VEC4_ARB 0x8B52
++#define GL_INT_VEC2_ARB 0x8B53
++#define GL_INT_VEC3_ARB 0x8B54
++#define GL_INT_VEC4_ARB 0x8B55
++#define GL_BOOL_ARB 0x8B56
++#define GL_BOOL_VEC2_ARB 0x8B57
++#define GL_BOOL_VEC3_ARB 0x8B58
++#define GL_BOOL_VEC4_ARB 0x8B59
++#define GL_FLOAT_MAT2_ARB 0x8B5A
++#define GL_FLOAT_MAT3_ARB 0x8B5B
++#define GL_FLOAT_MAT4_ARB 0x8B5C
++#define GL_SAMPLER_1D_ARB 0x8B5D
++#define GL_SAMPLER_2D_ARB 0x8B5E
++#define GL_SAMPLER_3D_ARB 0x8B5F
++#define GL_SAMPLER_CUBE_ARB 0x8B60
++#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
++#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
++#define GL_SAMPLER_2D_RECT_ARB 0x8B63
++#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
++#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
++#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
++#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
++#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
++#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
++#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
++#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
++#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
++#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
++#endif
++
++#ifndef GL_ARB_vertex_shader
++#define GL_VERTEX_SHADER_ARB 0x8B31
++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
++#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
++#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
++#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
++#endif
++
++#ifndef GL_ARB_fragment_shader
++#define GL_FRAGMENT_SHADER_ARB 0x8B30
++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
++#endif
++
++#ifndef GL_ARB_shading_language_100
++#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
++#endif
++
++#ifndef GL_ARB_texture_non_power_of_two
++#endif
++
++#ifndef GL_ARB_point_sprite
++#define GL_POINT_SPRITE_ARB 0x8861
++#define GL_COORD_REPLACE_ARB 0x8862
++#endif
++
++#ifndef GL_ARB_fragment_program_shadow
++#endif
++
++#ifndef GL_ARB_draw_buffers
++#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
++#define GL_DRAW_BUFFER0_ARB 0x8825
++#define GL_DRAW_BUFFER1_ARB 0x8826
++#define GL_DRAW_BUFFER2_ARB 0x8827
++#define GL_DRAW_BUFFER3_ARB 0x8828
++#define GL_DRAW_BUFFER4_ARB 0x8829
++#define GL_DRAW_BUFFER5_ARB 0x882A
++#define GL_DRAW_BUFFER6_ARB 0x882B
++#define GL_DRAW_BUFFER7_ARB 0x882C
++#define GL_DRAW_BUFFER8_ARB 0x882D
++#define GL_DRAW_BUFFER9_ARB 0x882E
++#define GL_DRAW_BUFFER10_ARB 0x882F
++#define GL_DRAW_BUFFER11_ARB 0x8830
++#define GL_DRAW_BUFFER12_ARB 0x8831
++#define GL_DRAW_BUFFER13_ARB 0x8832
++#define GL_DRAW_BUFFER14_ARB 0x8833
++#define GL_DRAW_BUFFER15_ARB 0x8834
++#endif
++
++#ifndef GL_ARB_texture_rectangle
++#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
++#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
++#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
++#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
++#endif
++
++#ifndef GL_ARB_color_buffer_float
++#define GL_RGBA_FLOAT_MODE_ARB 0x8820
++#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
++#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
++#define GL_CLAMP_READ_COLOR_ARB 0x891C
++#define GL_FIXED_ONLY_ARB 0x891D
++#endif
++
++#ifndef GL_ARB_half_float_pixel
++#define GL_HALF_FLOAT_ARB 0x140B
++#endif
++
++#ifndef GL_ARB_texture_float
++#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
++#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
++#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
++#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
++#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
++#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
++#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
++#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
++#define GL_RGBA32F_ARB 0x8814
++#define GL_RGB32F_ARB 0x8815
++#define GL_ALPHA32F_ARB 0x8816
++#define GL_INTENSITY32F_ARB 0x8817
++#define GL_LUMINANCE32F_ARB 0x8818
++#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
++#define GL_RGBA16F_ARB 0x881A
++#define GL_RGB16F_ARB 0x881B
++#define GL_ALPHA16F_ARB 0x881C
++#define GL_INTENSITY16F_ARB 0x881D
++#define GL_LUMINANCE16F_ARB 0x881E
++#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
++#endif
++
++#ifndef GL_ARB_pixel_buffer_object
++#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
++#endif
++
++#ifndef GL_EXT_abgr
++#define GL_ABGR_EXT 0x8000
++#endif
++
++#ifndef GL_EXT_blend_color
++#define GL_CONSTANT_COLOR_EXT 0x8001
++#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
++#define GL_CONSTANT_ALPHA_EXT 0x8003
++#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
++#define GL_BLEND_COLOR_EXT 0x8005
++#endif
++
++#ifndef GL_EXT_polygon_offset
++#define GL_POLYGON_OFFSET_EXT 0x8037
++#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
++#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
++#endif
++
++#ifndef GL_EXT_texture
++#define GL_ALPHA4_EXT 0x803B
++#define GL_ALPHA8_EXT 0x803C
++#define GL_ALPHA12_EXT 0x803D
++#define GL_ALPHA16_EXT 0x803E
++#define GL_LUMINANCE4_EXT 0x803F
++#define GL_LUMINANCE8_EXT 0x8040
++#define GL_LUMINANCE12_EXT 0x8041
++#define GL_LUMINANCE16_EXT 0x8042
++#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
++#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
++#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
++#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
++#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
++#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
++#define GL_INTENSITY_EXT 0x8049
++#define GL_INTENSITY4_EXT 0x804A
++#define GL_INTENSITY8_EXT 0x804B
++#define GL_INTENSITY12_EXT 0x804C
++#define GL_INTENSITY16_EXT 0x804D
++#define GL_RGB2_EXT 0x804E
++#define GL_RGB4_EXT 0x804F
++#define GL_RGB5_EXT 0x8050
++#define GL_RGB8_EXT 0x8051
++#define GL_RGB10_EXT 0x8052
++#define GL_RGB12_EXT 0x8053
++#define GL_RGB16_EXT 0x8054
++#define GL_RGBA2_EXT 0x8055
++#define GL_RGBA4_EXT 0x8056
++#define GL_RGB5_A1_EXT 0x8057
++#define GL_RGBA8_EXT 0x8058
++#define GL_RGB10_A2_EXT 0x8059
++#define GL_RGBA12_EXT 0x805A
++#define GL_RGBA16_EXT 0x805B
++#define GL_TEXTURE_RED_SIZE_EXT 0x805C
++#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
++#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
++#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
++#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
++#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
++#define GL_REPLACE_EXT 0x8062
++#define GL_PROXY_TEXTURE_1D_EXT 0x8063
++#define GL_PROXY_TEXTURE_2D_EXT 0x8064
++#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
++#endif
++
++#ifndef GL_EXT_texture3D
++#define GL_PACK_SKIP_IMAGES_EXT 0x806B
++#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
++#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
++#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
++#define GL_TEXTURE_3D_EXT 0x806F
++#define GL_PROXY_TEXTURE_3D_EXT 0x8070
++#define GL_TEXTURE_DEPTH_EXT 0x8071
++#define GL_TEXTURE_WRAP_R_EXT 0x8072
++#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
++#endif
++
++#ifndef GL_SGIS_texture_filter4
++#define GL_FILTER4_SGIS 0x8146
++#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
++#endif
++
++#ifndef GL_EXT_subtexture
++#endif
++
++#ifndef GL_EXT_copy_texture
++#endif
++
++#ifndef GL_EXT_histogram
++#define GL_HISTOGRAM_EXT 0x8024
++#define GL_PROXY_HISTOGRAM_EXT 0x8025
++#define GL_HISTOGRAM_WIDTH_EXT 0x8026
++#define GL_HISTOGRAM_FORMAT_EXT 0x8027
++#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
++#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
++#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
++#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
++#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
++#define GL_HISTOGRAM_SINK_EXT 0x802D
++#define GL_MINMAX_EXT 0x802E
++#define GL_MINMAX_FORMAT_EXT 0x802F
++#define GL_MINMAX_SINK_EXT 0x8030
++#define GL_TABLE_TOO_LARGE_EXT 0x8031
++#endif
++
++#ifndef GL_EXT_convolution
++#define GL_CONVOLUTION_1D_EXT 0x8010
++#define GL_CONVOLUTION_2D_EXT 0x8011
++#define GL_SEPARABLE_2D_EXT 0x8012
++#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
++#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
++#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
++#define GL_REDUCE_EXT 0x8016
++#define GL_CONVOLUTION_FORMAT_EXT 0x8017
++#define GL_CONVOLUTION_WIDTH_EXT 0x8018
++#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
++#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
++#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
++#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
++#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
++#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
++#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
++#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
++#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
++#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
++#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
++#endif
++
++#ifndef GL_SGI_color_matrix
++#define GL_COLOR_MATRIX_SGI 0x80B1
++#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
++#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
++#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
++#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
++#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
++#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
++#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
++#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
++#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
++#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
++#endif
++
++#ifndef GL_SGI_color_table
++#define GL_COLOR_TABLE_SGI 0x80D0
++#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
++#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
++#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
++#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
++#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
++#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
++#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
++#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
++#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
++#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
++#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
++#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
++#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
++#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
++#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
++#endif
++
++#ifndef GL_SGIS_pixel_texture
++#define GL_PIXEL_TEXTURE_SGIS 0x8353
++#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
++#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
++#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
++#endif
++
++#ifndef GL_SGIX_pixel_texture
++#define GL_PIXEL_TEX_GEN_SGIX 0x8139
++#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
++#endif
++
++#ifndef GL_SGIS_texture4D
++#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
++#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
++#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
++#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
++#define GL_TEXTURE_4D_SGIS 0x8134
++#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
++#define GL_TEXTURE_4DSIZE_SGIS 0x8136
++#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
++#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
++#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
++#endif
++
++#ifndef GL_SGI_texture_color_table
++#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
++#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
++#endif
++
++#ifndef GL_EXT_cmyka
++#define GL_CMYK_EXT 0x800C
++#define GL_CMYKA_EXT 0x800D
++#define GL_PACK_CMYK_HINT_EXT 0x800E
++#define GL_UNPACK_CMYK_HINT_EXT 0x800F
++#endif
++
++#ifndef GL_EXT_texture_object
++#define GL_TEXTURE_PRIORITY_EXT 0x8066
++#define GL_TEXTURE_RESIDENT_EXT 0x8067
++#define GL_TEXTURE_1D_BINDING_EXT 0x8068
++#define GL_TEXTURE_2D_BINDING_EXT 0x8069
++#define GL_TEXTURE_3D_BINDING_EXT 0x806A
++#endif
++
++#ifndef GL_SGIS_detail_texture
++#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
++#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
++#define GL_LINEAR_DETAIL_SGIS 0x8097
++#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
++#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
++#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
++#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
++#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
++#endif
++
++#ifndef GL_SGIS_sharpen_texture
++#define GL_LINEAR_SHARPEN_SGIS 0x80AD
++#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
++#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
++#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
++#endif
++
++#ifndef GL_EXT_packed_pixels
++#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
++#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
++#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
++#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
++#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
++#endif
++
++#ifndef GL_SGIS_texture_lod
++#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
++#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
++#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
++#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
++#endif
++
++#ifndef GL_SGIS_multisample
++#define GL_MULTISAMPLE_SGIS 0x809D
++#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
++#define GL_SAMPLE_MASK_SGIS 0x80A0
++#define GL_1PASS_SGIS 0x80A1
++#define GL_2PASS_0_SGIS 0x80A2
++#define GL_2PASS_1_SGIS 0x80A3
++#define GL_4PASS_0_SGIS 0x80A4
++#define GL_4PASS_1_SGIS 0x80A5
++#define GL_4PASS_2_SGIS 0x80A6
++#define GL_4PASS_3_SGIS 0x80A7
++#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
++#define GL_SAMPLES_SGIS 0x80A9
++#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
++#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
++#define GL_SAMPLE_PATTERN_SGIS 0x80AC
++#endif
++
++#ifndef GL_EXT_rescale_normal
++#define GL_RESCALE_NORMAL_EXT 0x803A
++#endif
++
++#ifndef GL_EXT_vertex_array
++#define GL_VERTEX_ARRAY_EXT 0x8074
++#define GL_NORMAL_ARRAY_EXT 0x8075
++#define GL_COLOR_ARRAY_EXT 0x8076
++#define GL_INDEX_ARRAY_EXT 0x8077
++#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
++#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
++#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
++#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
++#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
++#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
++#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
++#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
++#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
++#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
++#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
++#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
++#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
++#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
++#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
++#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
++#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
++#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
++#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
++#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
++#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
++#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
++#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
++#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
++#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
++#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
++#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
++#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
++#endif
++
++#ifndef GL_EXT_misc_attribute
++#endif
++
++#ifndef GL_SGIS_generate_mipmap
++#define GL_GENERATE_MIPMAP_SGIS 0x8191
++#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
++#endif
++
++#ifndef GL_SGIX_clipmap
++#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
++#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
++#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
++#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
++#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
++#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
++#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
++#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
++#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
++#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
++#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
++#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
++#endif
++
++#ifndef GL_SGIX_shadow
++#define GL_TEXTURE_COMPARE_SGIX 0x819A
++#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
++#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
++#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
++#endif
++
++#ifndef GL_SGIS_texture_edge_clamp
++#define GL_CLAMP_TO_EDGE_SGIS 0x812F
++#endif
++
++#ifndef GL_SGIS_texture_border_clamp
++#define GL_CLAMP_TO_BORDER_SGIS 0x812D
++#endif
++
++#ifndef GL_EXT_blend_minmax
++#define GL_FUNC_ADD_EXT 0x8006
++#define GL_MIN_EXT 0x8007
++#define GL_MAX_EXT 0x8008
++#define GL_BLEND_EQUATION_EXT 0x8009
++#endif
++
++#ifndef GL_EXT_blend_subtract
++#define GL_FUNC_SUBTRACT_EXT 0x800A
++#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
++#endif
++
++#ifndef GL_EXT_blend_logic_op
++#endif
++
++#ifndef GL_SGIX_interlace
++#define GL_INTERLACE_SGIX 0x8094
++#endif
++
++#ifndef GL_SGIX_pixel_tiles
++#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
++#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
++#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
++#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
++#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
++#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
++#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
++#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
++#endif
++
++#ifndef GL_SGIS_texture_select
++#define GL_DUAL_ALPHA4_SGIS 0x8110
++#define GL_DUAL_ALPHA8_SGIS 0x8111
++#define GL_DUAL_ALPHA12_SGIS 0x8112
++#define GL_DUAL_ALPHA16_SGIS 0x8113
++#define GL_DUAL_LUMINANCE4_SGIS 0x8114
++#define GL_DUAL_LUMINANCE8_SGIS 0x8115
++#define GL_DUAL_LUMINANCE12_SGIS 0x8116
++#define GL_DUAL_LUMINANCE16_SGIS 0x8117
++#define GL_DUAL_INTENSITY4_SGIS 0x8118
++#define GL_DUAL_INTENSITY8_SGIS 0x8119
++#define GL_DUAL_INTENSITY12_SGIS 0x811A
++#define GL_DUAL_INTENSITY16_SGIS 0x811B
++#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
++#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
++#define GL_QUAD_ALPHA4_SGIS 0x811E
++#define GL_QUAD_ALPHA8_SGIS 0x811F
++#define GL_QUAD_LUMINANCE4_SGIS 0x8120
++#define GL_QUAD_LUMINANCE8_SGIS 0x8121
++#define GL_QUAD_INTENSITY4_SGIS 0x8122
++#define GL_QUAD_INTENSITY8_SGIS 0x8123
++#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
++#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
++#endif
++
++#ifndef GL_SGIX_sprite
++#define GL_SPRITE_SGIX 0x8148
++#define GL_SPRITE_MODE_SGIX 0x8149
++#define GL_SPRITE_AXIS_SGIX 0x814A
++#define GL_SPRITE_TRANSLATION_SGIX 0x814B
++#define GL_SPRITE_AXIAL_SGIX 0x814C
++#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
++#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
++#endif
++
++#ifndef GL_SGIX_texture_multi_buffer
++#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
++#endif
++
++#ifndef GL_EXT_point_parameters
++#define GL_POINT_SIZE_MIN_EXT 0x8126
++#define GL_POINT_SIZE_MAX_EXT 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
++#define GL_DISTANCE_ATTENUATION_EXT 0x8129
++#endif
++
++#ifndef GL_SGIS_point_parameters
++#define GL_POINT_SIZE_MIN_SGIS 0x8126
++#define GL_POINT_SIZE_MAX_SGIS 0x8127
++#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
++#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
++#endif
++
++#ifndef GL_SGIX_instruments
++#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
++#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
++#endif
++
++#ifndef GL_SGIX_texture_scale_bias
++#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
++#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
++#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
++#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
++#endif
++
++#ifndef GL_SGIX_framezoom
++#define GL_FRAMEZOOM_SGIX 0x818B
++#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
++#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
++#endif
++
++#ifndef GL_SGIX_tag_sample_buffer
++#endif
++
++#ifndef GL_FfdMaskSGIX
++#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
++#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
++#endif
++
++#ifndef GL_SGIX_polynomial_ffd
++#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
++#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
++#define GL_DEFORMATIONS_MASK_SGIX 0x8196
++#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
++#endif
++
++#ifndef GL_SGIX_reference_plane
++#define GL_REFERENCE_PLANE_SGIX 0x817D
++#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
++#endif
++
++#ifndef GL_SGIX_flush_raster
++#endif
++
++#ifndef GL_SGIX_depth_texture
++#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
++#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
++#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
++#endif
++
++#ifndef GL_SGIS_fog_function
++#define GL_FOG_FUNC_SGIS 0x812A
++#define GL_FOG_FUNC_POINTS_SGIS 0x812B
++#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
++#endif
++
++#ifndef GL_SGIX_fog_offset
++#define GL_FOG_OFFSET_SGIX 0x8198
++#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
++#endif
++
++#ifndef GL_HP_image_transform
++#define GL_IMAGE_SCALE_X_HP 0x8155
++#define GL_IMAGE_SCALE_Y_HP 0x8156
++#define GL_IMAGE_TRANSLATE_X_HP 0x8157
++#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
++#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
++#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
++#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
++#define GL_IMAGE_MAG_FILTER_HP 0x815C
++#define GL_IMAGE_MIN_FILTER_HP 0x815D
++#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
++#define GL_CUBIC_HP 0x815F
++#define GL_AVERAGE_HP 0x8160
++#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
++#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
++#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
++#endif
++
++#ifndef GL_HP_convolution_border_modes
++#define GL_IGNORE_BORDER_HP 0x8150
++#define GL_CONSTANT_BORDER_HP 0x8151
++#define GL_REPLICATE_BORDER_HP 0x8153
++#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
++#endif
++
++#ifndef GL_INGR_palette_buffer
++#endif
++
++#ifndef GL_SGIX_texture_add_env
++#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
++#endif
++
++#ifndef GL_EXT_color_subtable
++#endif
++
++#ifndef GL_PGI_vertex_hints
++#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
++#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
++#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
++#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
++#define GL_COLOR3_BIT_PGI 0x00010000
++#define GL_COLOR4_BIT_PGI 0x00020000
++#define GL_EDGEFLAG_BIT_PGI 0x00040000
++#define GL_INDEX_BIT_PGI 0x00080000
++#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
++#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
++#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
++#define GL_MAT_EMISSION_BIT_PGI 0x00800000
++#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
++#define GL_MAT_SHININESS_BIT_PGI 0x02000000
++#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
++#define GL_NORMAL_BIT_PGI 0x08000000
++#define GL_TEXCOORD1_BIT_PGI 0x10000000
++#define GL_TEXCOORD2_BIT_PGI 0x20000000
++#define GL_TEXCOORD3_BIT_PGI 0x40000000
++#define GL_TEXCOORD4_BIT_PGI 0x80000000
++#define GL_VERTEX23_BIT_PGI 0x00000004
++#define GL_VERTEX4_BIT_PGI 0x00000008
++#endif
++
++#ifndef GL_PGI_misc_hints
++#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
++#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
++#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
++#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
++#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
++#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
++#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
++#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
++#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
++#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
++#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
++#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
++#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
++#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
++#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
++#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
++#define GL_CLIP_NEAR_HINT_PGI 0x1A220
++#define GL_CLIP_FAR_HINT_PGI 0x1A221
++#define GL_WIDE_LINE_HINT_PGI 0x1A222
++#define GL_BACK_NORMALS_HINT_PGI 0x1A223
++#endif
++
++#ifndef GL_EXT_paletted_texture
++#define GL_COLOR_INDEX1_EXT 0x80E2
++#define GL_COLOR_INDEX2_EXT 0x80E3
++#define GL_COLOR_INDEX4_EXT 0x80E4
++#define GL_COLOR_INDEX8_EXT 0x80E5
++#define GL_COLOR_INDEX12_EXT 0x80E6
++#define GL_COLOR_INDEX16_EXT 0x80E7
++#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
++#endif
++
++#ifndef GL_EXT_clip_volume_hint
++#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
++#endif
++
++#ifndef GL_SGIX_list_priority
++#define GL_LIST_PRIORITY_SGIX 0x8182
++#endif
++
++#ifndef GL_SGIX_ir_instrument1
++#define GL_IR_INSTRUMENT1_SGIX 0x817F
++#endif
++
++#ifndef GL_SGIX_calligraphic_fragment
++#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
++#endif
++
++#ifndef GL_SGIX_texture_lod_bias
++#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
++#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
++#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
++#endif
++
++#ifndef GL_SGIX_shadow_ambient
++#define GL_SHADOW_AMBIENT_SGIX 0x80BF
++#endif
++
++#ifndef GL_EXT_index_texture
++#endif
++
++#ifndef GL_EXT_index_material
++#define GL_INDEX_MATERIAL_EXT 0x81B8
++#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
++#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
++#endif
++
++#ifndef GL_EXT_index_func
++#define GL_INDEX_TEST_EXT 0x81B5
++#define GL_INDEX_TEST_FUNC_EXT 0x81B6
++#define GL_INDEX_TEST_REF_EXT 0x81B7
++#endif
++
++#ifndef GL_EXT_index_array_formats
++#define GL_IUI_V2F_EXT 0x81AD
++#define GL_IUI_V3F_EXT 0x81AE
++#define GL_IUI_N3F_V2F_EXT 0x81AF
++#define GL_IUI_N3F_V3F_EXT 0x81B0
++#define GL_T2F_IUI_V2F_EXT 0x81B1
++#define GL_T2F_IUI_V3F_EXT 0x81B2
++#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
++#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
++#endif
++
++#ifndef GL_EXT_compiled_vertex_array
++#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
++#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
++#endif
++
++#ifndef GL_EXT_cull_vertex
++#define GL_CULL_VERTEX_EXT 0x81AA
++#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
++#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
++#endif
++
++#ifndef GL_SGIX_ycrcb
++#define GL_YCRCB_422_SGIX 0x81BB
++#define GL_YCRCB_444_SGIX 0x81BC
++#endif
++
++#ifndef GL_SGIX_fragment_lighting
++#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
++#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
++#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
++#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
++#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
++#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
++#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
++#define GL_LIGHT_ENV_MODE_SGIX 0x8407
++#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
++#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
++#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
++#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
++#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
++#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
++#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
++#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
++#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
++#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
++#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
++#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
++#endif
++
++#ifndef GL_IBM_rasterpos_clip
++#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
++#endif
++
++#ifndef GL_HP_texture_lighting
++#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
++#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
++#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
++#endif
++
++#ifndef GL_EXT_draw_range_elements
++#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
++#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
++#endif
++
++#ifndef GL_WIN_phong_shading
++#define GL_PHONG_WIN 0x80EA
++#define GL_PHONG_HINT_WIN 0x80EB
++#endif
++
++#ifndef GL_WIN_specular_fog
++#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
++#endif
++
++#ifndef GL_EXT_light_texture
++#define GL_FRAGMENT_MATERIAL_EXT 0x8349
++#define GL_FRAGMENT_NORMAL_EXT 0x834A
++#define GL_FRAGMENT_COLOR_EXT 0x834C
++#define GL_ATTENUATION_EXT 0x834D
++#define GL_SHADOW_ATTENUATION_EXT 0x834E
++#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
++#define GL_TEXTURE_LIGHT_EXT 0x8350
++#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
++#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
++/* reuse GL_FRAGMENT_DEPTH_EXT */
++#endif
++
++#ifndef GL_SGIX_blend_alpha_minmax
++#define GL_ALPHA_MIN_SGIX 0x8320
++#define GL_ALPHA_MAX_SGIX 0x8321
++#endif
++
++#ifndef GL_SGIX_impact_pixel_texture
++#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
++#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
++#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
++#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
++#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
++#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
++#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
++#endif
++
++#ifndef GL_EXT_bgra
++#define GL_BGR_EXT 0x80E0
++#define GL_BGRA_EXT 0x80E1
++#endif
++
++#ifndef GL_SGIX_async
++#define GL_ASYNC_MARKER_SGIX 0x8329
++#endif
++
++#ifndef GL_SGIX_async_pixel
++#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
++#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
++#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
++#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
++#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
++#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
++#endif
++
++#ifndef GL_SGIX_async_histogram
++#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
++#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
++#endif
++
++#ifndef GL_INTEL_texture_scissor
++#endif
++
++#ifndef GL_INTEL_parallel_arrays
++#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
++#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
++#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
++#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
++#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
++#endif
++
++#ifndef GL_HP_occlusion_test
++#define GL_OCCLUSION_TEST_HP 0x8165
++#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
++#endif
++
++#ifndef GL_EXT_pixel_transform
++#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
++#define GL_PIXEL_MAG_FILTER_EXT 0x8331
++#define GL_PIXEL_MIN_FILTER_EXT 0x8332
++#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
++#define GL_CUBIC_EXT 0x8334
++#define GL_AVERAGE_EXT 0x8335
++#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
++#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
++#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
++#endif
++
++#ifndef GL_EXT_pixel_transform_color_table
++#endif
++
++#ifndef GL_EXT_shared_texture_palette
++#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
++#endif
++
++#ifndef GL_EXT_separate_specular_color
++#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
++#define GL_SINGLE_COLOR_EXT 0x81F9
++#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
++#endif
++
++#ifndef GL_EXT_secondary_color
++#define GL_COLOR_SUM_EXT 0x8458
++#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
++#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
++#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
++#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
++#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
++#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
++#endif
++
++#ifndef GL_EXT_texture_perturb_normal
++#define GL_PERTURB_EXT 0x85AE
++#define GL_TEXTURE_NORMAL_EXT 0x85AF
++#endif
++
++#ifndef GL_EXT_multi_draw_arrays
++#endif
++
++#ifndef GL_EXT_fog_coord
++#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
++#define GL_FOG_COORDINATE_EXT 0x8451
++#define GL_FRAGMENT_DEPTH_EXT 0x8452
++#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
++#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
++#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
++#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
++#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
++#endif
++
++#ifndef GL_REND_screen_coordinates
++#define GL_SCREEN_COORDINATES_REND 0x8490
++#define GL_INVERTED_SCREEN_W_REND 0x8491
++#endif
++
++#ifndef GL_EXT_coordinate_frame
++#define GL_TANGENT_ARRAY_EXT 0x8439
++#define GL_BINORMAL_ARRAY_EXT 0x843A
++#define GL_CURRENT_TANGENT_EXT 0x843B
++#define GL_CURRENT_BINORMAL_EXT 0x843C
++#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
++#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
++#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
++#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
++#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
++#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
++#define GL_MAP1_TANGENT_EXT 0x8444
++#define GL_MAP2_TANGENT_EXT 0x8445
++#define GL_MAP1_BINORMAL_EXT 0x8446
++#define GL_MAP2_BINORMAL_EXT 0x8447
++#endif
++
++#ifndef GL_EXT_texture_env_combine
++#define GL_COMBINE_EXT 0x8570
++#define GL_COMBINE_RGB_EXT 0x8571
++#define GL_COMBINE_ALPHA_EXT 0x8572
++#define GL_RGB_SCALE_EXT 0x8573
++#define GL_ADD_SIGNED_EXT 0x8574
++#define GL_INTERPOLATE_EXT 0x8575
++#define GL_CONSTANT_EXT 0x8576
++#define GL_PRIMARY_COLOR_EXT 0x8577
++#define GL_PREVIOUS_EXT 0x8578
++#define GL_SOURCE0_RGB_EXT 0x8580
++#define GL_SOURCE1_RGB_EXT 0x8581
++#define GL_SOURCE2_RGB_EXT 0x8582
++#define GL_SOURCE0_ALPHA_EXT 0x8588
++#define GL_SOURCE1_ALPHA_EXT 0x8589
++#define GL_SOURCE2_ALPHA_EXT 0x858A
++#define GL_OPERAND0_RGB_EXT 0x8590
++#define GL_OPERAND1_RGB_EXT 0x8591
++#define GL_OPERAND2_RGB_EXT 0x8592
++#define GL_OPERAND0_ALPHA_EXT 0x8598
++#define GL_OPERAND1_ALPHA_EXT 0x8599
++#define GL_OPERAND2_ALPHA_EXT 0x859A
++#endif
++
++#ifndef GL_APPLE_specular_vector
++#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
++#endif
++
++#ifndef GL_APPLE_transform_hint
++#define GL_TRANSFORM_HINT_APPLE 0x85B1
++#endif
++
++#ifndef GL_SGIX_fog_scale
++#define GL_FOG_SCALE_SGIX 0x81FC
++#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
++#endif
++
++#ifndef GL_SUNX_constant_data
++#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
++#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
++#endif
++
++#ifndef GL_SUN_global_alpha
++#define GL_GLOBAL_ALPHA_SUN 0x81D9
++#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
++#endif
++
++#ifndef GL_SUN_triangle_list
++#define GL_RESTART_SUN 0x0001
++#define GL_REPLACE_MIDDLE_SUN 0x0002
++#define GL_REPLACE_OLDEST_SUN 0x0003
++#define GL_TRIANGLE_LIST_SUN 0x81D7
++#define GL_REPLACEMENT_CODE_SUN 0x81D8
++#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
++#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
++#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
++#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
++#define GL_R1UI_V3F_SUN 0x85C4
++#define GL_R1UI_C4UB_V3F_SUN 0x85C5
++#define GL_R1UI_C3F_V3F_SUN 0x85C6
++#define GL_R1UI_N3F_V3F_SUN 0x85C7
++#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
++#define GL_R1UI_T2F_V3F_SUN 0x85C9
++#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
++#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
++#endif
++
++#ifndef GL_SUN_vertex
++#endif
++
++#ifndef GL_EXT_blend_func_separate
++#define GL_BLEND_DST_RGB_EXT 0x80C8
++#define GL_BLEND_SRC_RGB_EXT 0x80C9
++#define GL_BLEND_DST_ALPHA_EXT 0x80CA
++#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
++#endif
++
++#ifndef GL_INGR_color_clamp
++#define GL_RED_MIN_CLAMP_INGR 0x8560
++#define GL_GREEN_MIN_CLAMP_INGR 0x8561
++#define GL_BLUE_MIN_CLAMP_INGR 0x8562
++#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
++#define GL_RED_MAX_CLAMP_INGR 0x8564
++#define GL_GREEN_MAX_CLAMP_INGR 0x8565
++#define GL_BLUE_MAX_CLAMP_INGR 0x8566
++#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
++#endif
++
++#ifndef GL_INGR_interlace_read
++#define GL_INTERLACE_READ_INGR 0x8568
++#endif
++
++#ifndef GL_EXT_stencil_wrap
++#define GL_INCR_WRAP_EXT 0x8507
++#define GL_DECR_WRAP_EXT 0x8508
++#endif
++
++#ifndef GL_EXT_422_pixels
++#define GL_422_EXT 0x80CC
++#define GL_422_REV_EXT 0x80CD
++#define GL_422_AVERAGE_EXT 0x80CE
++#define GL_422_REV_AVERAGE_EXT 0x80CF
++#endif
++
++#ifndef GL_NV_texgen_reflection
++#define GL_NORMAL_MAP_NV 0x8511
++#define GL_REFLECTION_MAP_NV 0x8512
++#endif
++
++#ifndef GL_EXT_texture_cube_map
++#define GL_NORMAL_MAP_EXT 0x8511
++#define GL_REFLECTION_MAP_EXT 0x8512
++#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
++#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
++#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
++#endif
++
++#ifndef GL_SUN_convolution_border_modes
++#define GL_WRAP_BORDER_SUN 0x81D4
++#endif
++
++#ifndef GL_EXT_texture_env_add
++#endif
++
++#ifndef GL_EXT_texture_lod_bias
++#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
++#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
++#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
++#endif
++
++#ifndef GL_EXT_texture_filter_anisotropic
++#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
++#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
++#endif
++
++#ifndef GL_EXT_vertex_weighting
++#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
++#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
++#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
++#define GL_MODELVIEW1_MATRIX_EXT 0x8506
++#define GL_VERTEX_WEIGHTING_EXT 0x8509
++#define GL_MODELVIEW0_EXT GL_MODELVIEW
++#define GL_MODELVIEW1_EXT 0x850A
++#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
++#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
++#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
++#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
++#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
++#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
++#endif
++
++#ifndef GL_NV_light_max_exponent
++#define GL_MAX_SHININESS_NV 0x8504
++#define GL_MAX_SPOT_EXPONENT_NV 0x8505
++#endif
++
++#ifndef GL_NV_vertex_array_range
++#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
++#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
++#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
++#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
++#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
++#endif
++
++#ifndef GL_NV_register_combiners
++#define GL_REGISTER_COMBINERS_NV 0x8522
++#define GL_VARIABLE_A_NV 0x8523
++#define GL_VARIABLE_B_NV 0x8524
++#define GL_VARIABLE_C_NV 0x8525
++#define GL_VARIABLE_D_NV 0x8526
++#define GL_VARIABLE_E_NV 0x8527
++#define GL_VARIABLE_F_NV 0x8528
++#define GL_VARIABLE_G_NV 0x8529
++#define GL_CONSTANT_COLOR0_NV 0x852A
++#define GL_CONSTANT_COLOR1_NV 0x852B
++#define GL_PRIMARY_COLOR_NV 0x852C
++#define GL_SECONDARY_COLOR_NV 0x852D
++#define GL_SPARE0_NV 0x852E
++#define GL_SPARE1_NV 0x852F
++#define GL_DISCARD_NV 0x8530
++#define GL_E_TIMES_F_NV 0x8531
++#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
++#define GL_UNSIGNED_IDENTITY_NV 0x8536
++#define GL_UNSIGNED_INVERT_NV 0x8537
++#define GL_EXPAND_NORMAL_NV 0x8538
++#define GL_EXPAND_NEGATE_NV 0x8539
++#define GL_HALF_BIAS_NORMAL_NV 0x853A
++#define GL_HALF_BIAS_NEGATE_NV 0x853B
++#define GL_SIGNED_IDENTITY_NV 0x853C
++#define GL_SIGNED_NEGATE_NV 0x853D
++#define GL_SCALE_BY_TWO_NV 0x853E
++#define GL_SCALE_BY_FOUR_NV 0x853F
++#define GL_SCALE_BY_ONE_HALF_NV 0x8540
++#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
++#define GL_COMBINER_INPUT_NV 0x8542
++#define GL_COMBINER_MAPPING_NV 0x8543
++#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
++#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
++#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
++#define GL_COMBINER_MUX_SUM_NV 0x8547
++#define GL_COMBINER_SCALE_NV 0x8548
++#define GL_COMBINER_BIAS_NV 0x8549
++#define GL_COMBINER_AB_OUTPUT_NV 0x854A
++#define GL_COMBINER_CD_OUTPUT_NV 0x854B
++#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
++#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
++#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
++#define GL_COLOR_SUM_CLAMP_NV 0x854F
++#define GL_COMBINER0_NV 0x8550
++#define GL_COMBINER1_NV 0x8551
++#define GL_COMBINER2_NV 0x8552
++#define GL_COMBINER3_NV 0x8553
++#define GL_COMBINER4_NV 0x8554
++#define GL_COMBINER5_NV 0x8555
++#define GL_COMBINER6_NV 0x8556
++#define GL_COMBINER7_NV 0x8557
++/* reuse GL_TEXTURE0_ARB */
++/* reuse GL_TEXTURE1_ARB */
++/* reuse GL_ZERO */
++/* reuse GL_NONE */
++/* reuse GL_FOG */
++#endif
++
++#ifndef GL_NV_fog_distance
++#define GL_FOG_DISTANCE_MODE_NV 0x855A
++#define GL_EYE_RADIAL_NV 0x855B
++#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
++/* reuse GL_EYE_PLANE */
++#endif
++
++#ifndef GL_NV_texgen_emboss
++#define GL_EMBOSS_LIGHT_NV 0x855D
++#define GL_EMBOSS_CONSTANT_NV 0x855E
++#define GL_EMBOSS_MAP_NV 0x855F
++#endif
++
++#ifndef GL_NV_blend_square
++#endif
++
++#ifndef GL_NV_texture_env_combine4
++#define GL_COMBINE4_NV 0x8503
++#define GL_SOURCE3_RGB_NV 0x8583
++#define GL_SOURCE3_ALPHA_NV 0x858B
++#define GL_OPERAND3_RGB_NV 0x8593
++#define GL_OPERAND3_ALPHA_NV 0x859B
++#endif
++
++#ifndef GL_MESA_resize_buffers
++#endif
++
++#ifndef GL_MESA_window_pos
++#endif
++
++#ifndef GL_EXT_texture_compression_s3tc
++#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
++#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
++#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
++#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
++#endif
++
++#ifndef GL_IBM_cull_vertex
++#define GL_CULL_VERTEX_IBM 103050
++#endif
++
++#ifndef GL_IBM_multimode_draw_arrays
++#endif
++
++#ifndef GL_IBM_vertex_array_lists
++#define GL_VERTEX_ARRAY_LIST_IBM 103070
++#define GL_NORMAL_ARRAY_LIST_IBM 103071
++#define GL_COLOR_ARRAY_LIST_IBM 103072
++#define GL_INDEX_ARRAY_LIST_IBM 103073
++#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
++#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
++#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
++#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
++#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
++#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
++#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
++#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
++#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
++#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
++#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
++#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
++#endif
++
++#ifndef GL_SGIX_subsample
++#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
++#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
++#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
++#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
++#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
++#endif
++
++#ifndef GL_SGIX_ycrcb_subsample
++#endif
++
++#ifndef GL_SGIX_ycrcba
++#define GL_YCRCB_SGIX 0x8318
++#define GL_YCRCBA_SGIX 0x8319
++#endif
++
++#ifndef GL_SGI_depth_pass_instrument
++#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
++#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
++#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
++#endif
++
++#ifndef GL_3DFX_texture_compression_FXT1
++#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
++#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
++#endif
++
++#ifndef GL_3DFX_multisample
++#define GL_MULTISAMPLE_3DFX 0x86B2
++#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
++#define GL_SAMPLES_3DFX 0x86B4
++#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
++#endif
++
++#ifndef GL_3DFX_tbuffer
++#endif
++
++#ifndef GL_EXT_multisample
++#define GL_MULTISAMPLE_EXT 0x809D
++#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
++#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
++#define GL_SAMPLE_MASK_EXT 0x80A0
++#define GL_1PASS_EXT 0x80A1
++#define GL_2PASS_0_EXT 0x80A2
++#define GL_2PASS_1_EXT 0x80A3
++#define GL_4PASS_0_EXT 0x80A4
++#define GL_4PASS_1_EXT 0x80A5
++#define GL_4PASS_2_EXT 0x80A6
++#define GL_4PASS_3_EXT 0x80A7
++#define GL_SAMPLE_BUFFERS_EXT 0x80A8
++#define GL_SAMPLES_EXT 0x80A9
++#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
++#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
++#define GL_SAMPLE_PATTERN_EXT 0x80AC
++#define GL_MULTISAMPLE_BIT_EXT 0x20000000
++#endif
++
++#ifndef GL_SGIX_vertex_preclip
++#define GL_VERTEX_PRECLIP_SGIX 0x83EE
++#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
++#endif
++
++#ifndef GL_SGIX_convolution_accuracy
++#define GL_CONVOLUTION_HINT_SGIX 0x8316
++#endif
++
++#ifndef GL_SGIX_resample
++#define GL_PACK_RESAMPLE_SGIX 0x842C
++#define GL_UNPACK_RESAMPLE_SGIX 0x842D
++#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
++#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
++#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
++#endif
++
++#ifndef GL_SGIS_point_line_texgen
++#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
++#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
++#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
++#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
++#define GL_EYE_POINT_SGIS 0x81F4
++#define GL_OBJECT_POINT_SGIS 0x81F5
++#define GL_EYE_LINE_SGIS 0x81F6
++#define GL_OBJECT_LINE_SGIS 0x81F7
++#endif
++
++#ifndef GL_SGIS_texture_color_mask
++#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
++#endif
++
++#ifndef GL_EXT_texture_env_dot3
++#define GL_DOT3_RGB_EXT 0x8740
++#define GL_DOT3_RGBA_EXT 0x8741
++#endif
++
++#ifndef GL_ATI_texture_mirror_once
++#define GL_MIRROR_CLAMP_ATI 0x8742
++#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
++#endif
++
++#ifndef GL_NV_fence
++#define GL_ALL_COMPLETED_NV 0x84F2
++#define GL_FENCE_STATUS_NV 0x84F3
++#define GL_FENCE_CONDITION_NV 0x84F4
++#endif
++
++#ifndef GL_IBM_texture_mirrored_repeat
++#define GL_MIRRORED_REPEAT_IBM 0x8370
++#endif
++
++#ifndef GL_NV_evaluators
++#define GL_EVAL_2D_NV 0x86C0
++#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
++#define GL_MAP_TESSELLATION_NV 0x86C2
++#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
++#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
++#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
++#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
++#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
++#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
++#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
++#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
++#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
++#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
++#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
++#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
++#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
++#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
++#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
++#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
++#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
++#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
++#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
++#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
++#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
++#endif
++
++#ifndef GL_NV_packed_depth_stencil
++#define GL_DEPTH_STENCIL_NV 0x84F9
++#define GL_UNSIGNED_INT_24_8_NV 0x84FA
++#endif
++
++#ifndef GL_NV_register_combiners2
++#define GL_PER_STAGE_CONSTANTS_NV 0x8535
++#endif
++
++#ifndef GL_NV_texture_compression_vtc
++#endif
++
++#ifndef GL_NV_texture_rectangle
++#define GL_TEXTURE_RECTANGLE_NV 0x84F5
++#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
++#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
++#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
++#endif
++
++#ifndef GL_NV_texture_shader
++#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
++#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
++#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
++#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
++#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
++#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
++#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
++#define GL_SHADER_CONSISTENT_NV 0x86DD
++#define GL_TEXTURE_SHADER_NV 0x86DE
++#define GL_SHADER_OPERATION_NV 0x86DF
++#define GL_CULL_MODES_NV 0x86E0
++#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
++#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
++#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
++#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
++#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
++#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
++#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
++#define GL_CONST_EYE_NV 0x86E5
++#define GL_PASS_THROUGH_NV 0x86E6
++#define GL_CULL_FRAGMENT_NV 0x86E7
++#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
++#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
++#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
++#define GL_DOT_PRODUCT_NV 0x86EC
++#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
++#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
++#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
++#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
++#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
++#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
++#define GL_HILO_NV 0x86F4
++#define GL_DSDT_NV 0x86F5
++#define GL_DSDT_MAG_NV 0x86F6
++#define GL_DSDT_MAG_VIB_NV 0x86F7
++#define GL_HILO16_NV 0x86F8
++#define GL_SIGNED_HILO_NV 0x86F9
++#define GL_SIGNED_HILO16_NV 0x86FA
++#define GL_SIGNED_RGBA_NV 0x86FB
++#define GL_SIGNED_RGBA8_NV 0x86FC
++#define GL_SIGNED_RGB_NV 0x86FE
++#define GL_SIGNED_RGB8_NV 0x86FF
++#define GL_SIGNED_LUMINANCE_NV 0x8701
++#define GL_SIGNED_LUMINANCE8_NV 0x8702
++#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
++#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
++#define GL_SIGNED_ALPHA_NV 0x8705
++#define GL_SIGNED_ALPHA8_NV 0x8706
++#define GL_SIGNED_INTENSITY_NV 0x8707
++#define GL_SIGNED_INTENSITY8_NV 0x8708
++#define GL_DSDT8_NV 0x8709
++#define GL_DSDT8_MAG8_NV 0x870A
++#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
++#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
++#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
++#define GL_HI_SCALE_NV 0x870E
++#define GL_LO_SCALE_NV 0x870F
++#define GL_DS_SCALE_NV 0x8710
++#define GL_DT_SCALE_NV 0x8711
++#define GL_MAGNITUDE_SCALE_NV 0x8712
++#define GL_VIBRANCE_SCALE_NV 0x8713
++#define GL_HI_BIAS_NV 0x8714
++#define GL_LO_BIAS_NV 0x8715
++#define GL_DS_BIAS_NV 0x8716
++#define GL_DT_BIAS_NV 0x8717
++#define GL_MAGNITUDE_BIAS_NV 0x8718
++#define GL_VIBRANCE_BIAS_NV 0x8719
++#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
++#define GL_TEXTURE_HI_SIZE_NV 0x871B
++#define GL_TEXTURE_LO_SIZE_NV 0x871C
++#define GL_TEXTURE_DS_SIZE_NV 0x871D
++#define GL_TEXTURE_DT_SIZE_NV 0x871E
++#define GL_TEXTURE_MAG_SIZE_NV 0x871F
++#endif
++
++#ifndef GL_NV_texture_shader2
++#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
++#endif
++
++#ifndef GL_NV_vertex_array_range2
++#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
++#endif
++
++#ifndef GL_NV_vertex_program
++#define GL_VERTEX_PROGRAM_NV 0x8620
++#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
++#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
++#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
++#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
++#define GL_CURRENT_ATTRIB_NV 0x8626
++#define GL_PROGRAM_LENGTH_NV 0x8627
++#define GL_PROGRAM_STRING_NV 0x8628
++#define GL_MODELVIEW_PROJECTION_NV 0x8629
++#define GL_IDENTITY_NV 0x862A
++#define GL_INVERSE_NV 0x862B
++#define GL_TRANSPOSE_NV 0x862C
++#define GL_INVERSE_TRANSPOSE_NV 0x862D
++#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
++#define GL_MAX_TRACK_MATRICES_NV 0x862F
++#define GL_MATRIX0_NV 0x8630
++#define GL_MATRIX1_NV 0x8631
++#define GL_MATRIX2_NV 0x8632
++#define GL_MATRIX3_NV 0x8633
++#define GL_MATRIX4_NV 0x8634
++#define GL_MATRIX5_NV 0x8635
++#define GL_MATRIX6_NV 0x8636
++#define GL_MATRIX7_NV 0x8637
++#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
++#define GL_CURRENT_MATRIX_NV 0x8641
++#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
++#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
++#define GL_PROGRAM_PARAMETER_NV 0x8644
++#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
++#define GL_PROGRAM_TARGET_NV 0x8646
++#define GL_PROGRAM_RESIDENT_NV 0x8647
++#define GL_TRACK_MATRIX_NV 0x8648
++#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
++#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
++#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
++#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
++#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
++#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
++#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
++#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
++#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
++#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
++#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
++#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
++#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
++#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
++#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
++#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
++#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
++#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
++#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
++#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
++#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
++#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
++#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
++#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
++#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
++#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
++#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
++#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
++#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
++#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
++#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
++#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
++#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
++#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
++#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
++#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
++#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
++#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
++#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
++#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
++#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
++#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
++#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
++#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
++#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
++#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
++#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
++#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
++#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
++#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
++#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
++#endif
++
++#ifndef GL_SGIX_texture_coordinate_clamp
++#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
++#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
++#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
++#endif
++
++#ifndef GL_SGIX_scalebias_hint
++#define GL_SCALEBIAS_HINT_SGIX 0x8322
++#endif
++
++#ifndef GL_OML_interlace
++#define GL_INTERLACE_OML 0x8980
++#define GL_INTERLACE_READ_OML 0x8981
++#endif
++
++#ifndef GL_OML_subsample
++#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
++#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
++#endif
++
++#ifndef GL_OML_resample
++#define GL_PACK_RESAMPLE_OML 0x8984
++#define GL_UNPACK_RESAMPLE_OML 0x8985
++#define GL_RESAMPLE_REPLICATE_OML 0x8986
++#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
++#define GL_RESAMPLE_AVERAGE_OML 0x8988
++#define GL_RESAMPLE_DECIMATE_OML 0x8989
++#endif
++
++#ifndef GL_NV_copy_depth_to_color
++#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
++#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
++#endif
++
++#ifndef GL_ATI_envmap_bumpmap
++#define GL_BUMP_ROT_MATRIX_ATI 0x8775
++#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
++#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
++#define GL_BUMP_TEX_UNITS_ATI 0x8778
++#define GL_DUDV_ATI 0x8779
++#define GL_DU8DV8_ATI 0x877A
++#define GL_BUMP_ENVMAP_ATI 0x877B
++#define GL_BUMP_TARGET_ATI 0x877C
++#endif
++
++#ifndef GL_ATI_fragment_shader
++#define GL_FRAGMENT_SHADER_ATI 0x8920
++#define GL_REG_0_ATI 0x8921
++#define GL_REG_1_ATI 0x8922
++#define GL_REG_2_ATI 0x8923
++#define GL_REG_3_ATI 0x8924
++#define GL_REG_4_ATI 0x8925
++#define GL_REG_5_ATI 0x8926
++#define GL_REG_6_ATI 0x8927
++#define GL_REG_7_ATI 0x8928
++#define GL_REG_8_ATI 0x8929
++#define GL_REG_9_ATI 0x892A
++#define GL_REG_10_ATI 0x892B
++#define GL_REG_11_ATI 0x892C
++#define GL_REG_12_ATI 0x892D
++#define GL_REG_13_ATI 0x892E
++#define GL_REG_14_ATI 0x892F
++#define GL_REG_15_ATI 0x8930
++#define GL_REG_16_ATI 0x8931
++#define GL_REG_17_ATI 0x8932
++#define GL_REG_18_ATI 0x8933
++#define GL_REG_19_ATI 0x8934
++#define GL_REG_20_ATI 0x8935
++#define GL_REG_21_ATI 0x8936
++#define GL_REG_22_ATI 0x8937
++#define GL_REG_23_ATI 0x8938
++#define GL_REG_24_ATI 0x8939
++#define GL_REG_25_ATI 0x893A
++#define GL_REG_26_ATI 0x893B
++#define GL_REG_27_ATI 0x893C
++#define GL_REG_28_ATI 0x893D
++#define GL_REG_29_ATI 0x893E
++#define GL_REG_30_ATI 0x893F
++#define GL_REG_31_ATI 0x8940
++#define GL_CON_0_ATI 0x8941
++#define GL_CON_1_ATI 0x8942
++#define GL_CON_2_ATI 0x8943
++#define GL_CON_3_ATI 0x8944
++#define GL_CON_4_ATI 0x8945
++#define GL_CON_5_ATI 0x8946
++#define GL_CON_6_ATI 0x8947
++#define GL_CON_7_ATI 0x8948
++#define GL_CON_8_ATI 0x8949
++#define GL_CON_9_ATI 0x894A
++#define GL_CON_10_ATI 0x894B
++#define GL_CON_11_ATI 0x894C
++#define GL_CON_12_ATI 0x894D
++#define GL_CON_13_ATI 0x894E
++#define GL_CON_14_ATI 0x894F
++#define GL_CON_15_ATI 0x8950
++#define GL_CON_16_ATI 0x8951
++#define GL_CON_17_ATI 0x8952
++#define GL_CON_18_ATI 0x8953
++#define GL_CON_19_ATI 0x8954
++#define GL_CON_20_ATI 0x8955
++#define GL_CON_21_ATI 0x8956
++#define GL_CON_22_ATI 0x8957
++#define GL_CON_23_ATI 0x8958
++#define GL_CON_24_ATI 0x8959
++#define GL_CON_25_ATI 0x895A
++#define GL_CON_26_ATI 0x895B
++#define GL_CON_27_ATI 0x895C
++#define GL_CON_28_ATI 0x895D
++#define GL_CON_29_ATI 0x895E
++#define GL_CON_30_ATI 0x895F
++#define GL_CON_31_ATI 0x8960
++#define GL_MOV_ATI 0x8961
++#define GL_ADD_ATI 0x8963
++#define GL_MUL_ATI 0x8964
++#define GL_SUB_ATI 0x8965
++#define GL_DOT3_ATI 0x8966
++#define GL_DOT4_ATI 0x8967
++#define GL_MAD_ATI 0x8968
++#define GL_LERP_ATI 0x8969
++#define GL_CND_ATI 0x896A
++#define GL_CND0_ATI 0x896B
++#define GL_DOT2_ADD_ATI 0x896C
++#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
++#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
++#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
++#define GL_NUM_PASSES_ATI 0x8970
++#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
++#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
++#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
++#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
++#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
++#define GL_SWIZZLE_STR_ATI 0x8976
++#define GL_SWIZZLE_STQ_ATI 0x8977
++#define GL_SWIZZLE_STR_DR_ATI 0x8978
++#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
++#define GL_SWIZZLE_STRQ_ATI 0x897A
++#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
++#define GL_RED_BIT_ATI 0x00000001
++#define GL_GREEN_BIT_ATI 0x00000002
++#define GL_BLUE_BIT_ATI 0x00000004
++#define GL_2X_BIT_ATI 0x00000001
++#define GL_4X_BIT_ATI 0x00000002
++#define GL_8X_BIT_ATI 0x00000004
++#define GL_HALF_BIT_ATI 0x00000008
++#define GL_QUARTER_BIT_ATI 0x00000010
++#define GL_EIGHTH_BIT_ATI 0x00000020
++#define GL_SATURATE_BIT_ATI 0x00000040
++#define GL_COMP_BIT_ATI 0x00000002
++#define GL_NEGATE_BIT_ATI 0x00000004
++#define GL_BIAS_BIT_ATI 0x00000008
++#endif
++
++#ifndef GL_ATI_pn_triangles
++#define GL_PN_TRIANGLES_ATI 0x87F0
++#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
++#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
++#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
++#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
++#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
++#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
++#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
++#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
++#endif
++
++#ifndef GL_ATI_vertex_array_object
++#define GL_STATIC_ATI 0x8760
++#define GL_DYNAMIC_ATI 0x8761
++#define GL_PRESERVE_ATI 0x8762
++#define GL_DISCARD_ATI 0x8763
++#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
++#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
++#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
++#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
++#endif
++
++#ifndef GL_EXT_vertex_shader
++#define GL_VERTEX_SHADER_EXT 0x8780
++#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
++#define GL_OP_INDEX_EXT 0x8782
++#define GL_OP_NEGATE_EXT 0x8783
++#define GL_OP_DOT3_EXT 0x8784
++#define GL_OP_DOT4_EXT 0x8785
++#define GL_OP_MUL_EXT 0x8786
++#define GL_OP_ADD_EXT 0x8787
++#define GL_OP_MADD_EXT 0x8788
++#define GL_OP_FRAC_EXT 0x8789
++#define GL_OP_MAX_EXT 0x878A
++#define GL_OP_MIN_EXT 0x878B
++#define GL_OP_SET_GE_EXT 0x878C
++#define GL_OP_SET_LT_EXT 0x878D
++#define GL_OP_CLAMP_EXT 0x878E
++#define GL_OP_FLOOR_EXT 0x878F
++#define GL_OP_ROUND_EXT 0x8790
++#define GL_OP_EXP_BASE_2_EXT 0x8791
++#define GL_OP_LOG_BASE_2_EXT 0x8792
++#define GL_OP_POWER_EXT 0x8793
++#define GL_OP_RECIP_EXT 0x8794
++#define GL_OP_RECIP_SQRT_EXT 0x8795
++#define GL_OP_SUB_EXT 0x8796
++#define GL_OP_CROSS_PRODUCT_EXT 0x8797
++#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
++#define GL_OP_MOV_EXT 0x8799
++#define GL_OUTPUT_VERTEX_EXT 0x879A
++#define GL_OUTPUT_COLOR0_EXT 0x879B
++#define GL_OUTPUT_COLOR1_EXT 0x879C
++#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
++#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
++#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
++#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
++#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
++#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
++#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
++#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
++#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
++#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
++#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
++#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
++#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
++#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
++#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
++#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
++#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
++#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
++#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
++#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
++#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
++#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
++#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
++#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
++#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
++#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
++#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
++#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
++#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
++#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
++#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
++#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
++#define GL_OUTPUT_FOG_EXT 0x87BD
++#define GL_SCALAR_EXT 0x87BE
++#define GL_VECTOR_EXT 0x87BF
++#define GL_MATRIX_EXT 0x87C0
++#define GL_VARIANT_EXT 0x87C1
++#define GL_INVARIANT_EXT 0x87C2
++#define GL_LOCAL_CONSTANT_EXT 0x87C3
++#define GL_LOCAL_EXT 0x87C4
++#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
++#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
++#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
++#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
++#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
++#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
++#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
++#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
++#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
++#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
++#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
++#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
++#define GL_X_EXT 0x87D5
++#define GL_Y_EXT 0x87D6
++#define GL_Z_EXT 0x87D7
++#define GL_W_EXT 0x87D8
++#define GL_NEGATIVE_X_EXT 0x87D9
++#define GL_NEGATIVE_Y_EXT 0x87DA
++#define GL_NEGATIVE_Z_EXT 0x87DB
++#define GL_NEGATIVE_W_EXT 0x87DC
++#define GL_ZERO_EXT 0x87DD
++#define GL_ONE_EXT 0x87DE
++#define GL_NEGATIVE_ONE_EXT 0x87DF
++#define GL_NORMALIZED_RANGE_EXT 0x87E0
++#define GL_FULL_RANGE_EXT 0x87E1
++#define GL_CURRENT_VERTEX_EXT 0x87E2
++#define GL_MVP_MATRIX_EXT 0x87E3
++#define GL_VARIANT_VALUE_EXT 0x87E4
++#define GL_VARIANT_DATATYPE_EXT 0x87E5
++#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
++#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
++#define GL_VARIANT_ARRAY_EXT 0x87E8
++#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
++#define GL_INVARIANT_VALUE_EXT 0x87EA
++#define GL_INVARIANT_DATATYPE_EXT 0x87EB
++#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
++#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
++#endif
++
++#ifndef GL_ATI_vertex_streams
++#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
++#define GL_VERTEX_STREAM0_ATI 0x876C
++#define GL_VERTEX_STREAM1_ATI 0x876D
++#define GL_VERTEX_STREAM2_ATI 0x876E
++#define GL_VERTEX_STREAM3_ATI 0x876F
++#define GL_VERTEX_STREAM4_ATI 0x8770
++#define GL_VERTEX_STREAM5_ATI 0x8771
++#define GL_VERTEX_STREAM6_ATI 0x8772
++#define GL_VERTEX_STREAM7_ATI 0x8773
++#define GL_VERTEX_SOURCE_ATI 0x8774
++#endif
++
++#ifndef GL_ATI_element_array
++#define GL_ELEMENT_ARRAY_ATI 0x8768
++#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
++#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
++#endif
++
++#ifndef GL_SUN_mesh_array
++#define GL_QUAD_MESH_SUN 0x8614
++#define GL_TRIANGLE_MESH_SUN 0x8615
++#endif
++
++#ifndef GL_SUN_slice_accum
++#define GL_SLICE_ACCUM_SUN 0x85CC
++#endif
++
++#ifndef GL_NV_multisample_filter_hint
++#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
++#endif
++
++#ifndef GL_NV_depth_clamp
++#define GL_DEPTH_CLAMP_NV 0x864F
++#endif
++
++#ifndef GL_NV_occlusion_query
++#define GL_PIXEL_COUNTER_BITS_NV 0x8864
++#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
++#define GL_PIXEL_COUNT_NV 0x8866
++#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
++#endif
++
++#ifndef GL_NV_point_sprite
++#define GL_POINT_SPRITE_NV 0x8861
++#define GL_COORD_REPLACE_NV 0x8862
++#define GL_POINT_SPRITE_R_MODE_NV 0x8863
++#endif
++
++#ifndef GL_NV_texture_shader3
++#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
++#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
++#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
++#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
++#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
++#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
++#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
++#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
++#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
++#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
++#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
++#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
++#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
++#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
++#define GL_HILO8_NV 0x885E
++#define GL_SIGNED_HILO8_NV 0x885F
++#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
++#endif
++
++#ifndef GL_NV_vertex_program1_1
++#endif
++
++#ifndef GL_EXT_shadow_funcs
++#endif
++
++#ifndef GL_EXT_stencil_two_side
++#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
++#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
++#endif
++
++#ifndef GL_ATI_text_fragment_shader
++#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
++#endif
++
++#ifndef GL_APPLE_client_storage
++#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
++#endif
++
++#ifndef GL_APPLE_element_array
++#define GL_ELEMENT_ARRAY_APPLE 0x8768
++#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
++#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
++#endif
++
++#ifndef GL_APPLE_fence
++#define GL_DRAW_PIXELS_APPLE 0x8A0A
++#define GL_FENCE_APPLE 0x8A0B
++#endif
++
++#ifndef GL_APPLE_vertex_array_object
++#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
++#endif
++
++#ifndef GL_APPLE_vertex_array_range
++#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
++#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
++#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
++#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
++#define GL_STORAGE_CACHED_APPLE 0x85BE
++#define GL_STORAGE_SHARED_APPLE 0x85BF
++#endif
++
++#ifndef GL_APPLE_ycbcr_422
++#define GL_YCBCR_422_APPLE 0x85B9
++#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
++#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
++#endif
++
++#ifndef GL_S3_s3tc
++#define GL_RGB_S3TC 0x83A0
++#define GL_RGB4_S3TC 0x83A1
++#define GL_RGBA_S3TC 0x83A2
++#define GL_RGBA4_S3TC 0x83A3
++#endif
++
++#ifndef GL_ATI_draw_buffers
++#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
++#define GL_DRAW_BUFFER0_ATI 0x8825
++#define GL_DRAW_BUFFER1_ATI 0x8826
++#define GL_DRAW_BUFFER2_ATI 0x8827
++#define GL_DRAW_BUFFER3_ATI 0x8828
++#define GL_DRAW_BUFFER4_ATI 0x8829
++#define GL_DRAW_BUFFER5_ATI 0x882A
++#define GL_DRAW_BUFFER6_ATI 0x882B
++#define GL_DRAW_BUFFER7_ATI 0x882C
++#define GL_DRAW_BUFFER8_ATI 0x882D
++#define GL_DRAW_BUFFER9_ATI 0x882E
++#define GL_DRAW_BUFFER10_ATI 0x882F
++#define GL_DRAW_BUFFER11_ATI 0x8830
++#define GL_DRAW_BUFFER12_ATI 0x8831
++#define GL_DRAW_BUFFER13_ATI 0x8832
++#define GL_DRAW_BUFFER14_ATI 0x8833
++#define GL_DRAW_BUFFER15_ATI 0x8834
++#endif
++
++#ifndef GL_ATI_pixel_format_float
++#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
++#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
++#endif
++
++#ifndef GL_ATI_texture_env_combine3
++#define GL_MODULATE_ADD_ATI 0x8744
++#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
++#define GL_MODULATE_SUBTRACT_ATI 0x8746
++#endif
++
++#ifndef GL_ATI_texture_float
++#define GL_RGBA_FLOAT32_ATI 0x8814
++#define GL_RGB_FLOAT32_ATI 0x8815
++#define GL_ALPHA_FLOAT32_ATI 0x8816
++#define GL_INTENSITY_FLOAT32_ATI 0x8817
++#define GL_LUMINANCE_FLOAT32_ATI 0x8818
++#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
++#define GL_RGBA_FLOAT16_ATI 0x881A
++#define GL_RGB_FLOAT16_ATI 0x881B
++#define GL_ALPHA_FLOAT16_ATI 0x881C
++#define GL_INTENSITY_FLOAT16_ATI 0x881D
++#define GL_LUMINANCE_FLOAT16_ATI 0x881E
++#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
++#endif
++
++#ifndef GL_NV_float_buffer
++#define GL_FLOAT_R_NV 0x8880
++#define GL_FLOAT_RG_NV 0x8881
++#define GL_FLOAT_RGB_NV 0x8882
++#define GL_FLOAT_RGBA_NV 0x8883
++#define GL_FLOAT_R16_NV 0x8884
++#define GL_FLOAT_R32_NV 0x8885
++#define GL_FLOAT_RG16_NV 0x8886
++#define GL_FLOAT_RG32_NV 0x8887
++#define GL_FLOAT_RGB16_NV 0x8888
++#define GL_FLOAT_RGB32_NV 0x8889
++#define GL_FLOAT_RGBA16_NV 0x888A
++#define GL_FLOAT_RGBA32_NV 0x888B
++#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
++#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
++#define GL_FLOAT_RGBA_MODE_NV 0x888E
++#endif
++
++#ifndef GL_NV_fragment_program
++#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
++#define GL_FRAGMENT_PROGRAM_NV 0x8870
++#define GL_MAX_TEXTURE_COORDS_NV 0x8871
++#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
++#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
++#define GL_PROGRAM_ERROR_STRING_NV 0x8874
++#endif
++
++#ifndef GL_NV_half_float
++#define GL_HALF_FLOAT_NV 0x140B
++#endif
++
++#ifndef GL_NV_pixel_data_range
++#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
++#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
++#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
++#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
++#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
++#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
++#endif
++
++#ifndef GL_NV_primitive_restart
++#define GL_PRIMITIVE_RESTART_NV 0x8558
++#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
++#endif
++
++#ifndef GL_NV_texture_expand_normal
++#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
++#endif
++
++#ifndef GL_NV_vertex_program2
++#endif
++
++#ifndef GL_ATI_map_object_buffer
++#endif
++
++#ifndef GL_ATI_separate_stencil
++#define GL_STENCIL_BACK_FUNC_ATI 0x8800
++#define GL_STENCIL_BACK_FAIL_ATI 0x8801
++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
++#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
++#endif
++
++#ifndef GL_ATI_vertex_attrib_array_object
++#endif
++
++#ifndef GL_OES_read_format
++#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
++#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
++#endif
++
++#ifndef GL_EXT_depth_bounds_test
++#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
++#define GL_DEPTH_BOUNDS_EXT 0x8891
++#endif
++
++#ifndef GL_EXT_texture_mirror_clamp
++#define GL_MIRROR_CLAMP_EXT 0x8742
++#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
++#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
++#endif
++
++#ifndef GL_EXT_blend_equation_separate
++#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
++#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
++#endif
++
++#ifndef GL_MESA_pack_invert
++#define GL_PACK_INVERT_MESA 0x8758
++#endif
++
++#ifndef GL_MESA_ycbcr_texture
++#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
++#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
++#define GL_YCBCR_MESA 0x8757
++#endif
++
++#ifndef GL_EXT_pixel_buffer_object
++#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
++#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
++#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
++#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
++#endif
++
++#ifndef GL_NV_fragment_program_option
++#endif
++
++#ifndef GL_NV_fragment_program2
++#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
++#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
++#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
++#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
++#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
++#endif
++
++#ifndef GL_NV_vertex_program2_option
++/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
++/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
++#endif
++
++#ifndef GL_NV_vertex_program3
++/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
++#endif
++
++#ifndef GL_EXT_framebuffer_object
++#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
++#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
++#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
++#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
++#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
++#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
++#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
++#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
++#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
++#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
++#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
++#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
++#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
++#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
++#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
++#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
++#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
++#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
++#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
++#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
++#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
++#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
++#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
++#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
++#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
++#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
++#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
++#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
++#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
++#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
++#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
++#define GL_FRAMEBUFFER_EXT 0x8D40
++#define GL_RENDERBUFFER_EXT 0x8D41
++#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
++#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
++#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
++#define GL_STENCIL_INDEX1_EXT 0x8D46
++#define GL_STENCIL_INDEX4_EXT 0x8D47
++#define GL_STENCIL_INDEX8_EXT 0x8D48
++#define GL_STENCIL_INDEX16_EXT 0x8D49
++#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
++#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
++#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
++#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
++#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
++#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
++#endif
++
++#ifndef GL_GREMEDY_string_marker
++#endif
++
++#ifndef GL_EXT_packed_depth_stencil
++#define GL_DEPTH_STENCIL_EXT 0x84F9
++#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
++#define GL_DEPTH24_STENCIL8_EXT 0x88F0
++#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
++#endif
++
++#ifndef GL_EXT_stencil_clear_tag
++#define GL_STENCIL_TAG_BITS_EXT 0x88F2
++#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
++#endif
++
++#ifndef GL_EXT_texture_sRGB
++#define GL_SRGB_EXT 0x8C40
++#define GL_SRGB8_EXT 0x8C41
++#define GL_SRGB_ALPHA_EXT 0x8C42
++#define GL_SRGB8_ALPHA8_EXT 0x8C43
++#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
++#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
++#define GL_SLUMINANCE_EXT 0x8C46
++#define GL_SLUMINANCE8_EXT 0x8C47
++#define GL_COMPRESSED_SRGB_EXT 0x8C48
++#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
++#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
++#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
++#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
++#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
++#endif
++
++#ifndef GL_EXT_framebuffer_blit
++#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
++#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
++#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
++#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
++#endif
++
++#ifndef GL_EXT_framebuffer_multisample
++#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
++#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
++#define GL_MAX_SAMPLES_EXT 0x8D57
++#endif
++
++#ifndef GL_MESAX_texture_stack
++#define GL_TEXTURE_1D_STACK_MESAX 0x8759
++#define GL_TEXTURE_2D_STACK_MESAX 0x875A
++#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
++#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
++#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
++#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
++#endif
++
++#ifndef GL_EXT_timer_query
++#define GL_TIME_ELAPSED_EXT 0x88BF
++#endif
++
++#ifndef GL_EXT_gpu_program_parameters
++#endif
++
++#ifndef GL_APPLE_flush_buffer_range
++#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
++#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
++#endif
++
++#ifndef GL_NV_gpu_program4
++#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
++#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
++#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
++#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
++#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
++#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
++#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
++#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
++#endif
++
++#ifndef GL_NV_geometry_program4
++#define GL_LINES_ADJACENCY_EXT 0x000A
++#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
++#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
++#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
++#define GL_GEOMETRY_PROGRAM_NV 0x8C26
++#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
++#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
++#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
++#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
++#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
++#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
++#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
++#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
++#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
++#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
++#endif
++
++#ifndef GL_EXT_geometry_shader4
++#define GL_GEOMETRY_SHADER_EXT 0x8DD9
++/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
++/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
++/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
++/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
++#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
++#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
++#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
++#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
++#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
++#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
++/* reuse GL_LINES_ADJACENCY_EXT */
++/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
++/* reuse GL_TRIANGLES_ADJACENCY_EXT */
++/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
++/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
++/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++/* reuse GL_PROGRAM_POINT_SIZE_EXT */
++#endif
++
++#ifndef GL_NV_vertex_program4
++#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
++#endif
++
++#ifndef GL_EXT_gpu_shader4
++#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
++#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
++#define GL_SAMPLER_BUFFER_EXT 0x8DC2
++#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
++#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
++#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
++#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
++#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
++#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
++#define GL_INT_SAMPLER_1D_EXT 0x8DC9
++#define GL_INT_SAMPLER_2D_EXT 0x8DCA
++#define GL_INT_SAMPLER_3D_EXT 0x8DCB
++#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
++#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
++#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
++#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
++#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
++#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
++#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
++#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
++#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
++#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
++#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
++#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
++#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
++#endif
++
++#ifndef GL_EXT_draw_instanced
++#endif
++
++#ifndef GL_EXT_packed_float
++#define GL_R11F_G11F_B10F_EXT 0x8C3A
++#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
++#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
++#endif
++
++#ifndef GL_EXT_texture_array
++#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
++#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
++#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
++#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
++#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
++#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
++#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
++#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
++/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
++#endif
++
++#ifndef GL_EXT_texture_buffer_object
++#define GL_TEXTURE_BUFFER_EXT 0x8C2A
++#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
++#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
++#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
++#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
++#endif
++
++#ifndef GL_EXT_texture_compression_latc
++#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
++#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
++#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
++#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
++#endif
++
++#ifndef GL_EXT_texture_compression_rgtc
++#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
++#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
++#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
++#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
++#endif
++
++#ifndef GL_EXT_texture_shared_exponent
++#define GL_RGB9_E5_EXT 0x8C3D
++#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
++#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
++#endif
++
++#ifndef GL_NV_depth_buffer_float
++#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
++#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
++#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
++#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
++#endif
++
++#ifndef GL_NV_fragment_program4
++#endif
++
++#ifndef GL_NV_framebuffer_multisample_coverage
++#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
++#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
++#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
++#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
++#endif
++
++#ifndef GL_EXT_framebuffer_sRGB
++#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
++#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
++#endif
++
++#ifndef GL_NV_geometry_shader4
++#endif
++
++#ifndef GL_NV_parameter_buffer_object
++#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
++#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
++#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
++#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
++#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
++#endif
++
++#ifndef GL_EXT_draw_buffers2
++#endif
++
++#ifndef GL_NV_transform_feedback
++#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
++#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
++#define GL_TEXTURE_COORD_NV 0x8C79
++#define GL_CLIP_DISTANCE_NV 0x8C7A
++#define GL_VERTEX_ID_NV 0x8C7B
++#define GL_PRIMITIVE_ID_NV 0x8C7C
++#define GL_GENERIC_ATTRIB_NV 0x8C7D
++#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
++#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
++#define GL_ACTIVE_VARYINGS_NV 0x8C81
++#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
++#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
++#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
++#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
++#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
++#define GL_PRIMITIVES_GENERATED_NV 0x8C87
++#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
++#define GL_RASTERIZER_DISCARD_NV 0x8C89
++#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
++#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
++#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
++#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
++#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
++#endif
++
++#ifndef GL_EXT_bindable_uniform
++#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
++#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
++#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
++#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
++#define GL_UNIFORM_BUFFER_EXT 0x8DEE
++#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
++#endif
++
++#ifndef GL_EXT_texture_integer
++#define GL_RGBA32UI_EXT 0x8D70
++#define GL_RGB32UI_EXT 0x8D71
++#define GL_ALPHA32UI_EXT 0x8D72
++#define GL_INTENSITY32UI_EXT 0x8D73
++#define GL_LUMINANCE32UI_EXT 0x8D74
++#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
++#define GL_RGBA16UI_EXT 0x8D76
++#define GL_RGB16UI_EXT 0x8D77
++#define GL_ALPHA16UI_EXT 0x8D78
++#define GL_INTENSITY16UI_EXT 0x8D79
++#define GL_LUMINANCE16UI_EXT 0x8D7A
++#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
++#define GL_RGBA8UI_EXT 0x8D7C
++#define GL_RGB8UI_EXT 0x8D7D
++#define GL_ALPHA8UI_EXT 0x8D7E
++#define GL_INTENSITY8UI_EXT 0x8D7F
++#define GL_LUMINANCE8UI_EXT 0x8D80
++#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
++#define GL_RGBA32I_EXT 0x8D82
++#define GL_RGB32I_EXT 0x8D83
++#define GL_ALPHA32I_EXT 0x8D84
++#define GL_INTENSITY32I_EXT 0x8D85
++#define GL_LUMINANCE32I_EXT 0x8D86
++#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
++#define GL_RGBA16I_EXT 0x8D88
++#define GL_RGB16I_EXT 0x8D89
++#define GL_ALPHA16I_EXT 0x8D8A
++#define GL_INTENSITY16I_EXT 0x8D8B
++#define GL_LUMINANCE16I_EXT 0x8D8C
++#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
++#define GL_RGBA8I_EXT 0x8D8E
++#define GL_RGB8I_EXT 0x8D8F
++#define GL_ALPHA8I_EXT 0x8D90
++#define GL_INTENSITY8I_EXT 0x8D91
++#define GL_LUMINANCE8I_EXT 0x8D92
++#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
++#define GL_RED_INTEGER_EXT 0x8D94
++#define GL_GREEN_INTEGER_EXT 0x8D95
++#define GL_BLUE_INTEGER_EXT 0x8D96
++#define GL_ALPHA_INTEGER_EXT 0x8D97
++#define GL_RGB_INTEGER_EXT 0x8D98
++#define GL_RGBA_INTEGER_EXT 0x8D99
++#define GL_BGR_INTEGER_EXT 0x8D9A
++#define GL_BGRA_INTEGER_EXT 0x8D9B
++#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
++#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
++#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
++#endif
++
++
++/*************************************************************/
++
++#include <stddef.h>
++#ifndef GL_VERSION_2_0
++/* GL type for program/shader text */
++typedef char GLchar; /* native character */
++#endif
++
++#ifndef GL_VERSION_1_5
++/* GL types for handling large vertex buffer objects */
++typedef ptrdiff_t GLintptr;
++typedef ptrdiff_t GLsizeiptr;
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++/* GL types for handling large vertex buffer objects */
++typedef ptrdiff_t GLintptrARB;
++typedef ptrdiff_t GLsizeiptrARB;
++#endif
++
++#ifndef GL_ARB_shader_objects
++/* GL types for handling shader object handles and program/shader text */
++typedef char GLcharARB; /* native character */
++typedef unsigned int GLhandleARB; /* shader object handle */
++#endif
++
++/* GL types for "half" precision (s10e5) float data in host memory */
++#ifndef GL_ARB_half_float_pixel
++typedef unsigned short GLhalfARB;
++#endif
++
++#ifndef GL_NV_half_float
++typedef unsigned short GLhalfNV;
++#endif
++
++#ifndef GLEXT_64_TYPES_DEFINED
++/* This code block is duplicated in glext.h, so must be protected */
++#define GLEXT_64_TYPES_DEFINED
++/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
++/* (as used in the GL_EXT_timer_query extension). */
++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++#include <inttypes.h>
++#elif defined(__sun__)
++#include <inttypes.h>
++#if defined(__STDC__)
++#if defined(__arch64__)
++typedef long int int64_t;
++typedef unsigned long int uint64_t;
++#else
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#endif /* __arch64__ */
++#endif /* __STDC__ */
++#elif defined( __VMS )
++#include <inttypes.h>
++#elif defined(__SCO__) || defined(__USLC__)
++#include <stdint.h>
++#elif defined(__UNIXOS2__) || defined(__SOL64__)
++typedef long int int32_t;
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#elif defined(_WIN32) && defined(__GNUC__)
++#include <stdint.h>
++#elif defined(_WIN32)
++typedef __int32 int32_t;
++typedef __int64 int64_t;
++typedef unsigned __int64 uint64_t;
++#else
++#include <inttypes.h> /* Fallback option */
++#endif
++#endif
++
++#ifndef GL_EXT_timer_query
++typedef int64_t GLint64EXT;
++typedef uint64_t GLuint64EXT;
++#endif
++
++#ifndef GL_VERSION_1_2
++#define GL_VERSION_1_2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
++GLAPI void APIENTRY glBlendEquation (GLenum);
++GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
++GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
++GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
++GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
++GLAPI void APIENTRY glResetHistogram (GLenum);
++GLAPI void APIENTRY glResetMinmax (GLenum);
++GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
++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);
++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);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_VERSION_1_3
++#define GL_VERSION_1_3 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveTexture (GLenum);
++GLAPI void APIENTRY glClientActiveTexture (GLenum);
++GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
++GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
++GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
++GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
++GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
++GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
++GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
++GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
++GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
++#endif
++
++#ifndef GL_VERSION_1_4
++#define GL_VERSION_1_4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glFogCoordf (GLfloat);
++GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
++GLAPI void APIENTRY glFogCoordd (GLdouble);
++GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
++GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
++GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
++GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
++GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
++GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
++GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
++GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
++GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
++GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
++GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
++GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
++GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
++GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
++GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
++GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2iv (const GLint *);
++GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
++GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3iv (const GLint *);
++GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
++typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_VERSION_1_5
++#define GL_VERSION_1_5 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsQuery (GLuint);
++GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
++GLAPI void APIENTRY glEndQuery (GLenum);
++GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
++GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
++GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
++GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
++GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
++GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
++GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
++GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
++typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
++typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
++typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
++typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
++typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
++typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
++typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
++#endif
++
++#ifndef GL_VERSION_2_0
++#define GL_VERSION_2_0 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
++GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
++GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
++GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
++GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
++GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
++GLAPI void APIENTRY glCompileShader (GLuint);
++GLAPI GLuint APIENTRY glCreateProgram (void);
++GLAPI GLuint APIENTRY glCreateShader (GLenum);
++GLAPI void APIENTRY glDeleteProgram (GLuint);
++GLAPI void APIENTRY glDeleteShader (GLuint);
++GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
++GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
++GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
++GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
++GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
++GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
++GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
++GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgram (GLuint);
++GLAPI GLboolean APIENTRY glIsShader (GLuint);
++GLAPI void APIENTRY glLinkProgram (GLuint);
++GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
++GLAPI void APIENTRY glUseProgram (GLuint);
++GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
++GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform1i (GLint, GLint);
++GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glValidateProgram (GLuint);
++GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
++typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
++typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
++typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
++typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
++typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
++typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
++typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
++typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
++typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
++typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
++typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
++typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
++typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
++typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
++typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
++typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
++typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
++typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
++typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
++typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
++typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_VERSION_2_1
++#define GL_VERSION_2_1 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++#endif
++
++#ifndef GL_ARB_multitexture
++#define GL_ARB_multitexture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveTextureARB (GLenum);
++GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
++GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
++GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
++GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
++GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
++GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
++GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
++GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
++#endif
++
++#ifndef GL_ARB_transpose_matrix
++#define GL_ARB_transpose_matrix 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
++GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
++GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
++GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
++typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
++#endif
++
++#ifndef GL_ARB_multisample
++#define GL_ARB_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
++#endif
++
++#ifndef GL_ARB_texture_env_add
++#define GL_ARB_texture_env_add 1
++#endif
++
++#ifndef GL_ARB_texture_cube_map
++#define GL_ARB_texture_cube_map 1
++#endif
++
++#ifndef GL_ARB_texture_compression
++#define GL_ARB_texture_compression 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
++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);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
++#endif
++
++#ifndef GL_ARB_texture_border_clamp
++#define GL_ARB_texture_border_clamp 1
++#endif
++
++#ifndef GL_ARB_point_parameters
++#define GL_ARB_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_ARB_vertex_blend
++#define GL_ARB_vertex_blend 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
++GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
++GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
++GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
++GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
++GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
++GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
++GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
++GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexBlendARB (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
++typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
++typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
++typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
++typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
++typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
++typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
++#endif
++
++#ifndef GL_ARB_matrix_palette
++#define GL_ARB_matrix_palette 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
++GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
++GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
++GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
++GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
++typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_ARB_texture_env_combine
++#define GL_ARB_texture_env_combine 1
++#endif
++
++#ifndef GL_ARB_texture_env_crossbar
++#define GL_ARB_texture_env_crossbar 1
++#endif
++
++#ifndef GL_ARB_texture_env_dot3
++#define GL_ARB_texture_env_dot3 1
++#endif
++
++#ifndef GL_ARB_texture_mirrored_repeat
++#define GL_ARB_texture_mirrored_repeat 1
++#endif
++
++#ifndef GL_ARB_depth_texture
++#define GL_ARB_depth_texture 1
++#endif
++
++#ifndef GL_ARB_shadow
++#define GL_ARB_shadow 1
++#endif
++
++#ifndef GL_ARB_shadow_ambient
++#define GL_ARB_shadow_ambient 1
++#endif
++
++#ifndef GL_ARB_window_pos
++#define GL_ARB_window_pos 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
++GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
++GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
++GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_ARB_vertex_program
++#define GL_ARB_vertex_program 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
++GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
++GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
++GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
++GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
++GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
++GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
++GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
++typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
++typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
++#endif
++
++#ifndef GL_ARB_fragment_program
++#define GL_ARB_fragment_program 1
++/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
++#endif
++
++#ifndef GL_ARB_vertex_buffer_object
++#define GL_ARB_vertex_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
++GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
++GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
++GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
++GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
++GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
++GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
++typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
++typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
++typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
++typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
++typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
++typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
++typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
++#endif
++
++#ifndef GL_ARB_occlusion_query
++#define GL_ARB_occlusion_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
++GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
++GLAPI void APIENTRY glEndQueryARB (GLenum);
++GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_ARB_shader_objects
++#define GL_ARB_shader_objects 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
++GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
++GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
++GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
++GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
++GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
++GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
++GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
++GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
++GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
++GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
++GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
++GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
++GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
++GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
++GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
++GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
++GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
++GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
++GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
++GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
++GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
++GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
++typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
++typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
++typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
++typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
++typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
++typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
++typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
++typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
++typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
++typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
++typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
++typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
++typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
++typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
++typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
++typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
++#endif
++
++#ifndef GL_ARB_vertex_shader
++#define GL_ARB_vertex_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
++GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
++GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
++typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
++typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
++#endif
++
++#ifndef GL_ARB_fragment_shader
++#define GL_ARB_fragment_shader 1
++#endif
++
++#ifndef GL_ARB_shading_language_100
++#define GL_ARB_shading_language_100 1
++#endif
++
++#ifndef GL_ARB_texture_non_power_of_two
++#define GL_ARB_texture_non_power_of_two 1
++#endif
++
++#ifndef GL_ARB_point_sprite
++#define GL_ARB_point_sprite 1
++#endif
++
++#ifndef GL_ARB_fragment_program_shadow
++#define GL_ARB_fragment_program_shadow 1
++#endif
++
++#ifndef GL_ARB_draw_buffers
++#define GL_ARB_draw_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
++#endif
++
++#ifndef GL_ARB_texture_rectangle
++#define GL_ARB_texture_rectangle 1
++#endif
++
++#ifndef GL_ARB_color_buffer_float
++#define GL_ARB_color_buffer_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
++#endif
++
++#ifndef GL_ARB_half_float_pixel
++#define GL_ARB_half_float_pixel 1
++#endif
++
++#ifndef GL_ARB_texture_float
++#define GL_ARB_texture_float 1
++#endif
++
++#ifndef GL_ARB_pixel_buffer_object
++#define GL_ARB_pixel_buffer_object 1
++#endif
++
++#ifndef GL_EXT_abgr
++#define GL_EXT_abgr 1
++#endif
++
++#ifndef GL_EXT_blend_color
++#define GL_EXT_blend_color 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
++#endif
++
++#ifndef GL_EXT_polygon_offset
++#define GL_EXT_polygon_offset 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
++#endif
++
++#ifndef GL_EXT_texture
++#define GL_EXT_texture 1
++#endif
++
++#ifndef GL_EXT_texture3D
++#define GL_EXT_texture3D 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++#endif
++
++#ifndef GL_SGIS_texture_filter4
++#define GL_SGIS_texture_filter4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
++typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
++#endif
++
++#ifndef GL_EXT_subtexture
++#define GL_EXT_subtexture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
++typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
++#endif
++
++#ifndef GL_EXT_copy_texture
++#define GL_EXT_copy_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
++GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
++GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
++typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_EXT_histogram
++#define GL_EXT_histogram 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
++GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
++GLAPI void APIENTRY glResetHistogramEXT (GLenum);
++GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
++typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
++#endif
++
++#ifndef GL_EXT_convolution
++#define GL_EXT_convolution 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
++GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
++typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
++typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
++#endif
++
++#ifndef GL_SGI_color_matrix
++#define GL_SGI_color_matrix 1
++#endif
++
++#ifndef GL_SGI_color_table
++#define GL_SGI_color_table 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
++GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
++typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_SGIX_pixel_texture
++#define GL_SGIX_pixel_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
++#endif
++
++#ifndef GL_SGIS_pixel_texture
++#define GL_SGIS_pixel_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
++GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
++GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
++GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
++GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_SGIS_texture4D
++#define GL_SGIS_texture4D 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++#endif
++
++#ifndef GL_SGI_texture_color_table
++#define GL_SGI_texture_color_table 1
++#endif
++
++#ifndef GL_EXT_cmyka
++#define GL_EXT_cmyka 1
++#endif
++
++#ifndef GL_EXT_texture_object
++#define GL_EXT_texture_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
++GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
++GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
++typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
++typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
++typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
++typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
++typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
++#endif
++
++#ifndef GL_SGIS_detail_texture
++#define GL_SGIS_detail_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
++#endif
++
++#ifndef GL_SGIS_sharpen_texture
++#define GL_SGIS_sharpen_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
++#endif
++
++#ifndef GL_EXT_packed_pixels
++#define GL_EXT_packed_pixels 1
++#endif
++
++#ifndef GL_SGIS_texture_lod
++#define GL_SGIS_texture_lod 1
++#endif
++
++#ifndef GL_SGIS_multisample
++#define GL_SGIS_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
++GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
++#endif
++
++#ifndef GL_EXT_rescale_normal
++#define GL_EXT_rescale_normal 1
++#endif
++
++#ifndef GL_EXT_vertex_array
++#define GL_EXT_vertex_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glArrayElementEXT (GLint);
++GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
++GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
++GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
++GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
++typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
++typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
++typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_misc_attribute
++#define GL_EXT_misc_attribute 1
++#endif
++
++#ifndef GL_SGIS_generate_mipmap
++#define GL_SGIS_generate_mipmap 1
++#endif
++
++#ifndef GL_SGIX_clipmap
++#define GL_SGIX_clipmap 1
++#endif
++
++#ifndef GL_SGIX_shadow
++#define GL_SGIX_shadow 1
++#endif
++
++#ifndef GL_SGIS_texture_edge_clamp
++#define GL_SGIS_texture_edge_clamp 1
++#endif
++
++#ifndef GL_SGIS_texture_border_clamp
++#define GL_SGIS_texture_border_clamp 1
++#endif
++
++#ifndef GL_EXT_blend_minmax
++#define GL_EXT_blend_minmax 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
++#endif
++
++#ifndef GL_EXT_blend_subtract
++#define GL_EXT_blend_subtract 1
++#endif
++
++#ifndef GL_EXT_blend_logic_op
++#define GL_EXT_blend_logic_op 1
++#endif
++
++#ifndef GL_SGIX_interlace
++#define GL_SGIX_interlace 1
++#endif
++
++#ifndef GL_SGIX_pixel_tiles
++#define GL_SGIX_pixel_tiles 1
++#endif
++
++#ifndef GL_SGIX_texture_select
++#define GL_SGIX_texture_select 1
++#endif
++
++#ifndef GL_SGIX_sprite
++#define GL_SGIX_sprite 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
++GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
++GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
++GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_SGIX_texture_multi_buffer
++#define GL_SGIX_texture_multi_buffer 1
++#endif
++
++#ifndef GL_EXT_point_parameters
++#define GL_EXT_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
++/* ERO Begin */
++GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
++GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
++/* ERO end */
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_SGIS_point_parameters
++#define GL_SGIS_point_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
++GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
++#endif
++
++#ifndef GL_SGIX_instruments
++#define GL_SGIX_instruments 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
++GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
++GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
++GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
++GLAPI void APIENTRY glStartInstrumentsSGIX (void);
++GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
++typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
++typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
++typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
++typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
++typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
++#endif
++
++#ifndef GL_SGIX_texture_scale_bias
++#define GL_SGIX_texture_scale_bias 1
++#endif
++
++#ifndef GL_SGIX_framezoom
++#define GL_SGIX_framezoom 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFrameZoomSGIX (GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
++#endif
++
++#ifndef GL_SGIX_tag_sample_buffer
++#define GL_SGIX_tag_sample_buffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTagSampleBufferSGIX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
++#endif
++
++#ifndef GL_SGIX_polynomial_ffd
++#define GL_SGIX_polynomial_ffd 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
++GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
++GLAPI void APIENTRY glDeformSGIX (GLbitfield);
++GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
++#endif /* GL_GLEXT_PROTOTYPES */
++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);
++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);
++typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
++typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
++#endif
++
++#ifndef GL_SGIX_reference_plane
++#define GL_SGIX_reference_plane 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
++#endif
++
++#ifndef GL_SGIX_flush_raster
++#define GL_SGIX_flush_raster 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFlushRasterSGIX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
++#endif
++
++#ifndef GL_SGIX_depth_texture
++#define GL_SGIX_depth_texture 1
++#endif
++
++#ifndef GL_SGIS_fog_function
++#define GL_SGIS_fog_function 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
++GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
++typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
++#endif
++
++#ifndef GL_SGIX_fog_offset
++#define GL_SGIX_fog_offset 1
++#endif
++
++#ifndef GL_HP_image_transform
++#define GL_HP_image_transform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_HP_convolution_border_modes
++#define GL_HP_convolution_border_modes 1
++#endif
++
++#ifndef GL_SGIX_texture_add_env
++#define GL_SGIX_texture_add_env 1
++#endif
++
++#ifndef GL_EXT_color_subtable
++#define GL_EXT_color_subtable 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
++typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
++#endif
++
++#ifndef GL_PGI_vertex_hints
++#define GL_PGI_vertex_hints 1
++#endif
++
++#ifndef GL_PGI_misc_hints
++#define GL_PGI_misc_hints 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glHintPGI (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
++#endif
++
++#ifndef GL_EXT_paletted_texture
++#define GL_EXT_paletted_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
++GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
++GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_EXT_clip_volume_hint
++#define GL_EXT_clip_volume_hint 1
++#endif
++
++#ifndef GL_SGIX_list_priority
++#define GL_SGIX_list_priority 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
++GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
++GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
++GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_SGIX_ir_instrument1
++#define GL_SGIX_ir_instrument1 1
++#endif
++
++#ifndef GL_SGIX_calligraphic_fragment
++#define GL_SGIX_calligraphic_fragment 1
++#endif
++
++#ifndef GL_SGIX_texture_lod_bias
++#define GL_SGIX_texture_lod_bias 1
++#endif
++
++#ifndef GL_SGIX_shadow_ambient
++#define GL_SGIX_shadow_ambient 1
++#endif
++
++#ifndef GL_EXT_index_texture
++#define GL_EXT_index_texture 1
++#endif
++
++#ifndef GL_EXT_index_material
++#define GL_EXT_index_material 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
++#endif
++
++#ifndef GL_EXT_index_func
++#define GL_EXT_index_func 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
++#endif
++
++#ifndef GL_EXT_index_array_formats
++#define GL_EXT_index_array_formats 1
++#endif
++
++#ifndef GL_EXT_compiled_vertex_array
++#define GL_EXT_compiled_vertex_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
++GLAPI void APIENTRY glUnlockArraysEXT (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
++#endif
++
++#ifndef GL_EXT_cull_vertex
++#define GL_EXT_cull_vertex 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
++GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_SGIX_ycrcb
++#define GL_SGIX_ycrcb 1
++#endif
++
++#ifndef GL_SGIX_fragment_lighting
++#define GL_SGIX_fragment_lighting 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
++GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
++GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
++GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
++#endif
++
++#ifndef GL_IBM_rasterpos_clip
++#define GL_IBM_rasterpos_clip 1
++#endif
++
++#ifndef GL_HP_texture_lighting
++#define GL_HP_texture_lighting 1
++#endif
++
++#ifndef GL_EXT_draw_range_elements
++#define GL_EXT_draw_range_elements 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
++#endif
++
++#ifndef GL_WIN_phong_shading
++#define GL_WIN_phong_shading 1
++#endif
++
++#ifndef GL_WIN_specular_fog
++#define GL_WIN_specular_fog 1
++#endif
++
++#ifndef GL_EXT_light_texture
++#define GL_EXT_light_texture 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glApplyTextureEXT (GLenum);
++GLAPI void APIENTRY glTextureLightEXT (GLenum);
++GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
++typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
++typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
++#endif
++
++#ifndef GL_SGIX_blend_alpha_minmax
++#define GL_SGIX_blend_alpha_minmax 1
++#endif
++
++#ifndef GL_EXT_bgra
++#define GL_EXT_bgra 1
++#endif
++
++#ifndef GL_SGIX_async
++#define GL_SGIX_async 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
++GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
++GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
++GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
++GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
++GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
++typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
++typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
++typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
++typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
++typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
++#endif
++
++#ifndef GL_SGIX_async_pixel
++#define GL_SGIX_async_pixel 1
++#endif
++
++#ifndef GL_SGIX_async_histogram
++#define GL_SGIX_async_histogram 1
++#endif
++
++#ifndef GL_INTEL_parallel_arrays
++#define GL_INTEL_parallel_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
++GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
++GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
++GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
++#endif
++
++#ifndef GL_HP_occlusion_test
++#define GL_HP_occlusion_test 1
++#endif
++
++#ifndef GL_EXT_pixel_transform
++#define GL_EXT_pixel_transform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
++GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
++/* ERO Begin */
++GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
++/* ERO End */
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
++/* ERO Begin */
++typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
++/* ERO End */
++#endif
++
++#ifndef GL_EXT_pixel_transform_color_table
++#define GL_EXT_pixel_transform_color_table 1
++#endif
++
++#ifndef GL_EXT_shared_texture_palette
++#define GL_EXT_shared_texture_palette 1
++#endif
++
++#ifndef GL_EXT_separate_specular_color
++#define GL_EXT_separate_specular_color 1
++#endif
++
++#ifndef GL_EXT_secondary_color
++#define GL_EXT_secondary_color 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
++GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
++GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
++GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
++GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
++GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
++GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_texture_perturb_normal
++#define GL_EXT_texture_perturb_normal 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTextureNormalEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
++#endif
++
++#ifndef GL_EXT_multi_draw_arrays
++#define GL_EXT_multi_draw_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
++#endif
++
++#ifndef GL_EXT_fog_coord
++#define GL_EXT_fog_coord 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
++GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
++GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
++GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
++GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
++typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
++typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_REND_screen_coordinates
++#define GL_REND_screen_coordinates 1
++#endif
++
++#ifndef GL_EXT_coordinate_frame
++#define GL_EXT_coordinate_frame 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
++GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
++GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
++GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
++GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
++GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
++GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
++GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
++GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
++typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
++typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
++typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
++typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
++typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
++typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
++typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
++typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
++typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
++typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
++typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_EXT_texture_env_combine
++#define GL_EXT_texture_env_combine 1
++#endif
++
++#ifndef GL_APPLE_specular_vector
++#define GL_APPLE_specular_vector 1
++#endif
++
++#ifndef GL_APPLE_transform_hint
++#define GL_APPLE_transform_hint 1
++#endif
++
++#ifndef GL_SGIX_fog_scale
++#define GL_SGIX_fog_scale 1
++#endif
++
++#ifndef GL_SUNX_constant_data
++#define GL_SUNX_constant_data 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFinishTextureSUNX (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
++#endif
++
++#ifndef GL_SUN_global_alpha
++#define GL_SUN_global_alpha 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
++GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
++GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
++GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
++GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
++GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
++GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
++GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
++typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
++#endif
++
++#ifndef GL_SUN_triangle_list
++#define GL_SUN_triangle_list 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
++GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
++GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
++GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
++GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
++GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
++GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
++#endif
++
++#ifndef GL_SUN_vertex
++#define GL_SUN_vertex 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
++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);
++typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
++#endif
++
++#ifndef GL_EXT_blend_func_separate
++#define GL_EXT_blend_func_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++#endif
++
++#ifndef GL_INGR_blend_func_separate
++#define GL_INGR_blend_func_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
++#endif
++
++#ifndef GL_INGR_color_clamp
++#define GL_INGR_color_clamp 1
++#endif
++
++#ifndef GL_INGR_interlace_read
++#define GL_INGR_interlace_read 1
++#endif
++
++#ifndef GL_EXT_stencil_wrap
++#define GL_EXT_stencil_wrap 1
++#endif
++
++#ifndef GL_EXT_422_pixels
++#define GL_EXT_422_pixels 1
++#endif
++
++#ifndef GL_NV_texgen_reflection
++#define GL_NV_texgen_reflection 1
++#endif
++
++#ifndef GL_SUN_convolution_border_modes
++#define GL_SUN_convolution_border_modes 1
++#endif
++
++#ifndef GL_EXT_texture_env_add
++#define GL_EXT_texture_env_add 1
++#endif
++
++#ifndef GL_EXT_texture_lod_bias
++#define GL_EXT_texture_lod_bias 1
++#endif
++
++#ifndef GL_EXT_texture_filter_anisotropic
++#define GL_EXT_texture_filter_anisotropic 1
++#endif
++
++#ifndef GL_EXT_vertex_weighting
++#define GL_EXT_vertex_weighting 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
++GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
++GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
++#endif
++
++#ifndef GL_NV_light_max_exponent
++#define GL_NV_light_max_exponent 1
++#endif
++
++#ifndef GL_NV_vertex_array_range
++#define GL_NV_vertex_array_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
++GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
++typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
++#endif
++
++#ifndef GL_NV_register_combiners
++#define GL_NV_register_combiners 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
++GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
++GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
++GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
++GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
++GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
++typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
++typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
++typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_NV_fog_distance
++#define GL_NV_fog_distance 1
++#endif
++
++#ifndef GL_NV_texgen_emboss
++#define GL_NV_texgen_emboss 1
++#endif
++
++#ifndef GL_NV_blend_square
++#define GL_NV_blend_square 1
++#endif
++
++#ifndef GL_NV_texture_env_combine4
++#define GL_NV_texture_env_combine4 1
++#endif
++
++#ifndef GL_MESA_resize_buffers
++#define GL_MESA_resize_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glResizeBuffersMESA (void);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
++#endif
++
++#ifndef GL_MESA_window_pos
++#define GL_MESA_window_pos 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
++GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
++GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
++GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
++GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
++GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
++GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
++typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
++#endif
++
++#ifndef GL_IBM_cull_vertex
++#define GL_IBM_cull_vertex 1
++#endif
++
++#ifndef GL_IBM_multimode_draw_arrays
++#define GL_IBM_multimode_draw_arrays 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
++GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
++typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
++#endif
++
++#ifndef GL_IBM_vertex_array_lists
++#define GL_IBM_vertex_array_lists 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
++GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
++#endif
++
++#ifndef GL_SGIX_subsample
++#define GL_SGIX_subsample 1
++#endif
++
++#ifndef GL_SGIX_ycrcba
++#define GL_SGIX_ycrcba 1
++#endif
++
++#ifndef GL_SGIX_ycrcb_subsample
++#define GL_SGIX_ycrcb_subsample 1
++#endif
++
++#ifndef GL_SGIX_depth_pass_instrument
++#define GL_SGIX_depth_pass_instrument 1
++#endif
++
++#ifndef GL_3DFX_texture_compression_FXT1
++#define GL_3DFX_texture_compression_FXT1 1
++#endif
++
++#ifndef GL_3DFX_multisample
++#define GL_3DFX_multisample 1
++#endif
++
++#ifndef GL_3DFX_tbuffer
++#define GL_3DFX_tbuffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
++#endif
++
++#ifndef GL_EXT_multisample
++#define GL_EXT_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
++GLAPI void APIENTRY glSamplePatternEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
++typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
++#endif
++
++#ifndef GL_SGIX_vertex_preclip
++#define GL_SGIX_vertex_preclip 1
++#endif
++
++#ifndef GL_SGIX_convolution_accuracy
++#define GL_SGIX_convolution_accuracy 1
++#endif
++
++#ifndef GL_SGIX_resample
++#define GL_SGIX_resample 1
++#endif
++
++#ifndef GL_SGIS_point_line_texgen
++#define GL_SGIS_point_line_texgen 1
++#endif
++
++#ifndef GL_SGIS_texture_color_mask
++#define GL_SGIS_texture_color_mask 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
++#endif
++
++#ifndef GL_SGIX_igloo_interface
++#define GL_SGIX_igloo_interface 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
++#endif
++
++#ifndef GL_EXT_texture_env_dot3
++#define GL_EXT_texture_env_dot3 1
++#endif
++
++#ifndef GL_ATI_texture_mirror_once
++#define GL_ATI_texture_mirror_once 1
++#endif
++
++#ifndef GL_NV_fence
++#define GL_NV_fence 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
++GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
++GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glFinishFenceNV (GLuint);
++GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
++typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
++typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
++#endif
++
++#ifndef GL_NV_evaluators
++#define GL_NV_evaluators 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
++GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
++GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
++typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
++typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
++#endif
++
++#ifndef GL_NV_packed_depth_stencil
++#define GL_NV_packed_depth_stencil 1
++#endif
++
++#ifndef GL_NV_register_combiners2
++#define GL_NV_register_combiners2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
++#endif
++
++#ifndef GL_NV_texture_compression_vtc
++#define GL_NV_texture_compression_vtc 1
++#endif
++
++#ifndef GL_NV_texture_rectangle
++#define GL_NV_texture_rectangle 1
++#endif
++
++#ifndef GL_NV_texture_shader
++#define GL_NV_texture_shader 1
++#endif
++
++#ifndef GL_NV_texture_shader2
++#define GL_NV_texture_shader2 1
++#endif
++
++#ifndef GL_NV_vertex_array_range2
++#define GL_NV_vertex_array_range2 1
++#endif
++
++#ifndef GL_NV_vertex_program
++#define GL_NV_vertex_program 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
++GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
++GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
++GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
++GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
++GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
++GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
++GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
++GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
++GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
++GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
++GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
++GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
++GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
++GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
++GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
++GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
++GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
++GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
++typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
++typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
++typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
++typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
++typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
++typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
++typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
++#endif
++
++#ifndef GL_SGIX_texture_coordinate_clamp
++#define GL_SGIX_texture_coordinate_clamp 1
++#endif
++
++#ifndef GL_SGIX_scalebias_hint
++#define GL_SGIX_scalebias_hint 1
++#endif
++
++#ifndef GL_OML_interlace
++#define GL_OML_interlace 1
++#endif
++
++#ifndef GL_OML_subsample
++#define GL_OML_subsample 1
++#endif
++
++#ifndef GL_OML_resample
++#define GL_OML_resample 1
++#endif
++
++#ifndef GL_NV_copy_depth_to_color
++#define GL_NV_copy_depth_to_color 1
++#endif
++
++#ifndef GL_ATI_envmap_bumpmap
++#define GL_ATI_envmap_bumpmap 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
++GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
++typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
++typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
++typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
++#endif
++
++#ifndef GL_ATI_fragment_shader
++#define GL_ATI_fragment_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
++GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
++GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
++GLAPI void APIENTRY glBeginFragmentShaderATI (void);
++GLAPI void APIENTRY glEndFragmentShaderATI (void);
++GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
++GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
++GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
++typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
++typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
++typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
++typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
++typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
++typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
++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);
++typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
++typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
++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);
++typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
++#endif
++
++#ifndef GL_ATI_pn_triangles
++#define GL_ATI_pn_triangles 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
++GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
++#endif
++
++#ifndef GL_ATI_vertex_array_object
++#define GL_ATI_vertex_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
++GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
++GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
++GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
++/* ERO Begin */
++GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
++/* ERO End */
++GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
++typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
++typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_EXT_vertex_shader
++#define GL_EXT_vertex_shader 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBeginVertexShaderEXT (void);
++GLAPI void APIENTRY glEndVertexShaderEXT (void);
++GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
++GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
++GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
++GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
++GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
++GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
++GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
++GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
++GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
++GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
++GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
++GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
++GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
++GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
++GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
++GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
++GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
++GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
++GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
++GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
++GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
++typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
++typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
++typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
++typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
++typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
++typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
++typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
++typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
++typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
++typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
++typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
++typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
++typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
++typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
++typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
++typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
++typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
++typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
++typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
++typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
++typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
++typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
++typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
++typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
++typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
++typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
++#endif
++
++#ifndef GL_ATI_vertex_streams
++#define GL_ATI_vertex_streams 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
++GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
++GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
++GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
++GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
++GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
++GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
++GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
++GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
++GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
++GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
++GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
++GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
++GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
++GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
++GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
++typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
++typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
++typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
++#endif
++
++#ifndef GL_ATI_element_array
++#define GL_ATI_element_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
++GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
++GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
++#endif
++
++#ifndef GL_SUN_mesh_array
++#define GL_SUN_mesh_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
++#endif
++
++#ifndef GL_SUN_slice_accum
++#define GL_SUN_slice_accum 1
++#endif
++
++#ifndef GL_NV_multisample_filter_hint
++#define GL_NV_multisample_filter_hint 1
++#endif
++
++#ifndef GL_NV_depth_clamp
++#define GL_NV_depth_clamp 1
++#endif
++
++#ifndef GL_NV_occlusion_query
++#define GL_NV_occlusion_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
++GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
++GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
++GLAPI void APIENTRY glEndOcclusionQueryNV (void);
++GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
++typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
++typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
++typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
++typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_NV_point_sprite
++#define GL_NV_point_sprite 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
++GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
++#endif
++
++#ifndef GL_NV_texture_shader3
++#define GL_NV_texture_shader3 1
++#endif
++
++#ifndef GL_NV_vertex_program1_1
++#define GL_NV_vertex_program1_1 1
++#endif
++
++#ifndef GL_EXT_shadow_funcs
++#define GL_EXT_shadow_funcs 1
++#endif
++
++#ifndef GL_EXT_stencil_two_side
++#define GL_EXT_stencil_two_side 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
++#endif
++
++#ifndef GL_ATI_text_fragment_shader
++#define GL_ATI_text_fragment_shader 1
++#endif
++
++#ifndef GL_APPLE_client_storage
++#define GL_APPLE_client_storage 1
++#endif
++
++#ifndef GL_APPLE_element_array
++#define GL_APPLE_element_array 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
++GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
++GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
++GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
++GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
++typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
++#endif
++
++#ifndef GL_APPLE_fence
++#define GL_APPLE_fence 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
++GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
++GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
++GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
++GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
++GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
++typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
++typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
++typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
++typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
++typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
++#endif
++
++#ifndef GL_APPLE_vertex_array_object
++#define GL_APPLE_vertex_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
++GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
++GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
++typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
++typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
++typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
++#endif
++
++#ifndef GL_APPLE_vertex_array_range
++#define GL_APPLE_vertex_array_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
++GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
++GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
++#endif
++
++#ifndef GL_APPLE_ycbcr_422
++#define GL_APPLE_ycbcr_422 1
++#endif
++
++#ifndef GL_S3_s3tc
++#define GL_S3_s3tc 1
++#endif
++
++#ifndef GL_ATI_draw_buffers
++#define GL_ATI_draw_buffers 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
++#endif
++
++#ifndef GL_ATI_pixel_format_float
++#define GL_ATI_pixel_format_float 1
++/* This is really a WGL extension, but defines some associated GL enums.
++ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
++ */
++#endif
++
++#ifndef GL_ATI_texture_env_combine3
++#define GL_ATI_texture_env_combine3 1
++#endif
++
++#ifndef GL_ATI_texture_float
++#define GL_ATI_texture_float 1
++#endif
++
++#ifndef GL_NV_float_buffer
++#define GL_NV_float_buffer 1
++#endif
++
++#ifndef GL_NV_fragment_program
++#define GL_NV_fragment_program 1
++/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
++GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
++GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
++GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
++GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
++GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
++typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
++typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
++#endif
++
++#ifndef GL_NV_half_float
++#define GL_NV_half_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
++GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
++GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
++GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
++GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
++GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
++GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
++GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
++typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
++typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
++typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
++typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
++typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
++typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
++typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
++typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
++typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
++typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
++typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
++typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
++typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
++typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
++#endif
++
++#ifndef GL_NV_pixel_data_range
++#define GL_NV_pixel_data_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
++GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
++typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
++#endif
++
++#ifndef GL_NV_primitive_restart
++#define GL_NV_primitive_restart 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glPrimitiveRestartNV (void);
++GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
++typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
++#endif
++
++#ifndef GL_NV_texture_expand_normal
++#define GL_NV_texture_expand_normal 1
++#endif
++
++#ifndef GL_NV_vertex_program2
++#define GL_NV_vertex_program2 1
++#endif
++
++#ifndef GL_ATI_map_object_buffer
++#define GL_ATI_map_object_buffer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
++GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
++typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
++#endif
++
++#ifndef GL_ATI_separate_stencil
++#define GL_ATI_separate_stencil 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
++GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
++typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
++#endif
++
++#ifndef GL_ATI_vertex_attrib_array_object
++#define GL_ATI_vertex_attrib_array_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
++GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
++GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
++#endif
++
++#ifndef GL_OES_read_format
++#define GL_OES_read_format 1
++#endif
++
++#ifndef GL_EXT_depth_bounds_test
++#define GL_EXT_depth_bounds_test 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
++#endif
++
++#ifndef GL_EXT_texture_mirror_clamp
++#define GL_EXT_texture_mirror_clamp 1
++#endif
++
++#ifndef GL_EXT_blend_equation_separate
++#define GL_EXT_blend_equation_separate 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
++#endif
++
++#ifndef GL_MESA_pack_invert
++#define GL_MESA_pack_invert 1
++#endif
++
++#ifndef GL_MESA_ycbcr_texture
++#define GL_MESA_ycbcr_texture 1
++#endif
++
++#ifndef GL_EXT_pixel_buffer_object
++#define GL_EXT_pixel_buffer_object 1
++#endif
++
++#ifndef GL_NV_fragment_program_option
++#define GL_NV_fragment_program_option 1
++#endif
++
++#ifndef GL_NV_fragment_program2
++#define GL_NV_fragment_program2 1
++#endif
++
++#ifndef GL_NV_vertex_program2_option
++#define GL_NV_vertex_program2_option 1
++#endif
++
++#ifndef GL_NV_vertex_program3
++#define GL_NV_vertex_program3 1
++#endif
++
++#ifndef GL_EXT_framebuffer_object
++#define GL_EXT_framebuffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
++GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
++GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
++GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
++GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
++GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
++GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
++GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
++GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
++GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
++GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
++typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
++typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
++typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
++typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
++typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
++typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
++typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
++#endif
++
++#ifndef GL_GREMEDY_string_marker
++#define GL_GREMEDY_string_marker 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
++#endif
++
++#ifndef GL_EXT_packed_depth_stencil
++#define GL_EXT_packed_depth_stencil 1
++#endif
++
++#ifndef GL_EXT_stencil_clear_tag
++#define GL_EXT_stencil_clear_tag 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
++#endif
++
++#ifndef GL_EXT_texture_sRGB
++#define GL_EXT_texture_sRGB 1
++#endif
++
++#ifndef GL_EXT_framebuffer_blit
++#define GL_EXT_framebuffer_blit 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
++#endif
++
++#ifndef GL_EXT_framebuffer_multisample
++#define GL_EXT_framebuffer_multisample 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_MESAX_texture_stack
++#define GL_MESAX_texture_stack 1
++#endif
++
++#ifndef GL_EXT_timer_query
++#define GL_EXT_timer_query 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
++GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
++typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
++#endif
++
++#ifndef GL_EXT_gpu_program_parameters
++#define GL_EXT_gpu_program_parameters 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
++#endif
++
++#ifndef GL_APPLE_flush_buffer_range
++#define GL_APPLE_flush_buffer_range 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
++GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
++typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
++#endif
++
++#ifndef GL_NV_gpu_program4
++#define GL_NV_gpu_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
++GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
++GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
++GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
++GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
++GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
++typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
++typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
++#endif
++
++#ifndef GL_NV_geometry_program4
++#define GL_NV_geometry_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
++GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
++GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
++GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
++typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
++#endif
++
++#ifndef GL_EXT_geometry_shader4
++#define GL_EXT_geometry_shader4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
++#endif
++
++#ifndef GL_NV_vertex_program4
++#define GL_NV_vertex_program4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
++GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
++GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
++GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
++GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
++GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
++GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
++GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
++GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
++GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
++typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
++#endif
++
++#ifndef GL_EXT_gpu_shader4
++#define GL_EXT_gpu_shader4 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
++GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
++GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
++GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
++GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
++GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
++GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
++typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
++typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
++typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
++typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
++typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
++typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
++#endif
++
++#ifndef GL_EXT_draw_instanced
++#define GL_EXT_draw_instanced 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
++GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
++typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
++#endif
++
++#ifndef GL_EXT_packed_float
++#define GL_EXT_packed_float 1
++#endif
++
++#ifndef GL_EXT_texture_array
++#define GL_EXT_texture_array 1
++#endif
++
++#ifndef GL_EXT_texture_buffer_object
++#define GL_EXT_texture_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
++#endif
++
++#ifndef GL_EXT_texture_compression_latc
++#define GL_EXT_texture_compression_latc 1
++#endif
++
++#ifndef GL_EXT_texture_compression_rgtc
++#define GL_EXT_texture_compression_rgtc 1
++#endif
++
++#ifndef GL_EXT_texture_shared_exponent
++#define GL_EXT_texture_shared_exponent 1
++#endif
++
++#ifndef GL_NV_depth_buffer_float
++#define GL_NV_depth_buffer_float 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
++GLAPI void APIENTRY glClearDepthdNV (GLdouble);
++GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
++typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
++typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
++#endif
++
++#ifndef GL_NV_fragment_program4
++#define GL_NV_fragment_program4 1
++#endif
++
++#ifndef GL_NV_framebuffer_multisample_coverage
++#define GL_NV_framebuffer_multisample_coverage 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
++#endif
++
++#ifndef GL_EXT_framebuffer_sRGB
++#define GL_EXT_framebuffer_sRGB 1
++#endif
++
++#ifndef GL_NV_geometry_shader4
++#define GL_NV_geometry_shader4 1
++#endif
++
++#ifndef GL_NV_parameter_buffer_object
++#define GL_NV_parameter_buffer_object 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
++GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
++GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
++typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
++#endif
++
++#ifndef GL_EXT_draw_buffers2
++#define GL_EXT_draw_buffers2 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
++GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
++GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
++GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
++GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
++GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
++typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
++typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
++typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
++typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
++typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
++#endif
++
++#ifndef GL_NV_transform_feedback
++#define GL_NV_transform_feedback 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
++GLAPI void APIENTRY glEndTransformFeedbackNV (void);
++GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
++GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
++GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
++GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
++GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
++GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
++GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
++GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
++GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
++typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
++typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
++typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
++typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
++typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
++typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
++typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
++typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
++typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
++typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
++#endif
++
++#ifndef GL_EXT_bindable_uniform
++#define GL_EXT_bindable_uniform 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
++GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
++GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
++typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
++typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
++#endif
++
++#ifndef GL_EXT_texture_integer
++#define GL_EXT_texture_integer 1
++#ifdef GL_GLEXT_PROTOTYPES
++GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
++GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
++GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
++GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
++GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
++GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
++#endif /* GL_GLEXT_PROTOTYPES */
++typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
++typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
++typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
++typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
++typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
++typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
++#endif
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
++
++
++/* ERO */
++GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
+Index: qemu-0.12.4/target-i386/mesa_glu.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_glu.h
+@@ -0,0 +1,354 @@
++/*
++** License Applicability. Except to the extent portions of this file are
++** made subject to an alternative license as permitted in the SGI Free
++** Software License B, Version 1.1 (the "License"), the contents of this
++** file are subject only to the provisions of the License. You may not use
++** this file except in compliance with the License. You may obtain a copy
++** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
++** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
++**
++** http://oss.sgi.com/projects/FreeB
++**
++** Note that, as provided in the License, the Software is distributed on an
++** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
++** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
++** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
++** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
++**
++** Original Code. The Original Code is: OpenGL Sample Implementation,
++** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
++** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
++** Copyright in any portions created by third parties is as indicated
++** elsewhere herein. All Rights Reserved.
++**
++** Additional Notice Provisions: This software was created using the
++** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
++** not been independently verified as being compliant with the OpenGL(R)
++** version 1.2.1 Specification.
++*/
++
++#ifndef __glu_h__
++#define __glu_h__
++
++#if defined(USE_MGL_NAMESPACE)
++#include "glu_mangle.h"
++#endif
++
++//#include <GL/gl.h>
++#include "mesa_gl.h"
++
++#ifndef GLAPIENTRY
++#define GLAPIENTRY
++#endif
++
++#ifndef GLAPIENTRYP
++#define GLAPIENTRYP GLAPIENTRY *
++#endif
++
++#ifdef GLAPI
++#undef GLAPI
++#endif
++
++# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
++# define GLAPI __declspec(dllexport)
++# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
++# define GLAPI __declspec(dllimport)
++# else /* for use with static link lib build of Win32 edition only */
++# define GLAPI extern
++# endif /* _STATIC_MESA support */
++
++
++#ifndef GLAPI
++#define GLAPI
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*************************************************************/
++
++/* Extensions */
++#define GLU_EXT_object_space_tess 1
++#define GLU_EXT_nurbs_tessellator 1
++
++/* Boolean */
++#define GLU_FALSE 0
++#define GLU_TRUE 1
++
++/* Version */
++#define GLU_VERSION_1_1 1
++#define GLU_VERSION_1_2 1
++#define GLU_VERSION_1_3 1
++
++/* StringName */
++#define GLU_VERSION 100800
++#define GLU_EXTENSIONS 100801
++
++/* ErrorCode */
++#define GLU_INVALID_ENUM 100900
++#define GLU_INVALID_VALUE 100901
++#define GLU_OUT_OF_MEMORY 100902
++#define GLU_INCOMPATIBLE_GL_VERSION 100903
++#define GLU_INVALID_OPERATION 100904
++
++/* NurbsDisplay */
++/* GLU_FILL */
++#define GLU_OUTLINE_POLYGON 100240
++#define GLU_OUTLINE_PATCH 100241
++
++/* NurbsCallback */
++#define GLU_NURBS_ERROR 100103
++#define GLU_ERROR 100103
++#define GLU_NURBS_BEGIN 100164
++#define GLU_NURBS_BEGIN_EXT 100164
++#define GLU_NURBS_VERTEX 100165
++#define GLU_NURBS_VERTEX_EXT 100165
++#define GLU_NURBS_NORMAL 100166
++#define GLU_NURBS_NORMAL_EXT 100166
++#define GLU_NURBS_COLOR 100167
++#define GLU_NURBS_COLOR_EXT 100167
++#define GLU_NURBS_TEXTURE_COORD 100168
++#define GLU_NURBS_TEX_COORD_EXT 100168
++#define GLU_NURBS_END 100169
++#define GLU_NURBS_END_EXT 100169
++#define GLU_NURBS_BEGIN_DATA 100170
++#define GLU_NURBS_BEGIN_DATA_EXT 100170
++#define GLU_NURBS_VERTEX_DATA 100171
++#define GLU_NURBS_VERTEX_DATA_EXT 100171
++#define GLU_NURBS_NORMAL_DATA 100172
++#define GLU_NURBS_NORMAL_DATA_EXT 100172
++#define GLU_NURBS_COLOR_DATA 100173
++#define GLU_NURBS_COLOR_DATA_EXT 100173
++#define GLU_NURBS_TEXTURE_COORD_DATA 100174
++#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
++#define GLU_NURBS_END_DATA 100175
++#define GLU_NURBS_END_DATA_EXT 100175
++
++/* NurbsError */
++#define GLU_NURBS_ERROR1 100251
++#define GLU_NURBS_ERROR2 100252
++#define GLU_NURBS_ERROR3 100253
++#define GLU_NURBS_ERROR4 100254
++#define GLU_NURBS_ERROR5 100255
++#define GLU_NURBS_ERROR6 100256
++#define GLU_NURBS_ERROR7 100257
++#define GLU_NURBS_ERROR8 100258
++#define GLU_NURBS_ERROR9 100259
++#define GLU_NURBS_ERROR10 100260
++#define GLU_NURBS_ERROR11 100261
++#define GLU_NURBS_ERROR12 100262
++#define GLU_NURBS_ERROR13 100263
++#define GLU_NURBS_ERROR14 100264
++#define GLU_NURBS_ERROR15 100265
++#define GLU_NURBS_ERROR16 100266
++#define GLU_NURBS_ERROR17 100267
++#define GLU_NURBS_ERROR18 100268
++#define GLU_NURBS_ERROR19 100269
++#define GLU_NURBS_ERROR20 100270
++#define GLU_NURBS_ERROR21 100271
++#define GLU_NURBS_ERROR22 100272
++#define GLU_NURBS_ERROR23 100273
++#define GLU_NURBS_ERROR24 100274
++#define GLU_NURBS_ERROR25 100275
++#define GLU_NURBS_ERROR26 100276
++#define GLU_NURBS_ERROR27 100277
++#define GLU_NURBS_ERROR28 100278
++#define GLU_NURBS_ERROR29 100279
++#define GLU_NURBS_ERROR30 100280
++#define GLU_NURBS_ERROR31 100281
++#define GLU_NURBS_ERROR32 100282
++#define GLU_NURBS_ERROR33 100283
++#define GLU_NURBS_ERROR34 100284
++#define GLU_NURBS_ERROR35 100285
++#define GLU_NURBS_ERROR36 100286
++#define GLU_NURBS_ERROR37 100287
++
++/* NurbsProperty */
++#define GLU_AUTO_LOAD_MATRIX 100200
++#define GLU_CULLING 100201
++#define GLU_SAMPLING_TOLERANCE 100203
++#define GLU_DISPLAY_MODE 100204
++#define GLU_PARAMETRIC_TOLERANCE 100202
++#define GLU_SAMPLING_METHOD 100205
++#define GLU_U_STEP 100206
++#define GLU_V_STEP 100207
++#define GLU_NURBS_MODE 100160
++#define GLU_NURBS_MODE_EXT 100160
++#define GLU_NURBS_TESSELLATOR 100161
++#define GLU_NURBS_TESSELLATOR_EXT 100161
++#define GLU_NURBS_RENDERER 100162
++#define GLU_NURBS_RENDERER_EXT 100162
++
++/* NurbsSampling */
++#define GLU_OBJECT_PARAMETRIC_ERROR 100208
++#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
++#define GLU_OBJECT_PATH_LENGTH 100209
++#define GLU_OBJECT_PATH_LENGTH_EXT 100209
++#define GLU_PATH_LENGTH 100215
++#define GLU_PARAMETRIC_ERROR 100216
++#define GLU_DOMAIN_DISTANCE 100217
++
++/* NurbsTrim */
++#define GLU_MAP1_TRIM_2 100210
++#define GLU_MAP1_TRIM_3 100211
++
++/* QuadricDrawStyle */
++#define GLU_POINT 100010
++#define GLU_LINE 100011
++#define GLU_FILL 100012
++#define GLU_SILHOUETTE 100013
++
++/* QuadricCallback */
++/* GLU_ERROR */
++
++/* QuadricNormal */
++#define GLU_SMOOTH 100000
++#define GLU_FLAT 100001
++#define GLU_NONE 100002
++
++/* QuadricOrientation */
++#define GLU_OUTSIDE 100020
++#define GLU_INSIDE 100021
++
++/* TessCallback */
++#define GLU_TESS_BEGIN 100100
++#define GLU_BEGIN 100100
++#define GLU_TESS_VERTEX 100101
++#define GLU_VERTEX 100101
++#define GLU_TESS_END 100102
++#define GLU_END 100102
++#define GLU_TESS_ERROR 100103
++#define GLU_TESS_EDGE_FLAG 100104
++#define GLU_EDGE_FLAG 100104
++#define GLU_TESS_COMBINE 100105
++#define GLU_TESS_BEGIN_DATA 100106
++#define GLU_TESS_VERTEX_DATA 100107
++#define GLU_TESS_END_DATA 100108
++#define GLU_TESS_ERROR_DATA 100109
++#define GLU_TESS_EDGE_FLAG_DATA 100110
++#define GLU_TESS_COMBINE_DATA 100111
++
++/* TessContour */
++#define GLU_CW 100120
++#define GLU_CCW 100121
++#define GLU_INTERIOR 100122
++#define GLU_EXTERIOR 100123
++#define GLU_UNKNOWN 100124
++
++/* TessProperty */
++#define GLU_TESS_WINDING_RULE 100140
++#define GLU_TESS_BOUNDARY_ONLY 100141
++#define GLU_TESS_TOLERANCE 100142
++
++/* TessError */
++#define GLU_TESS_ERROR1 100151
++#define GLU_TESS_ERROR2 100152
++#define GLU_TESS_ERROR3 100153
++#define GLU_TESS_ERROR4 100154
++#define GLU_TESS_ERROR5 100155
++#define GLU_TESS_ERROR6 100156
++#define GLU_TESS_ERROR7 100157
++#define GLU_TESS_ERROR8 100158
++#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
++#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
++#define GLU_TESS_MISSING_END_POLYGON 100153
++#define GLU_TESS_MISSING_END_CONTOUR 100154
++#define GLU_TESS_COORD_TOO_LARGE 100155
++#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
++
++/* TessWinding */
++#define GLU_TESS_WINDING_ODD 100130
++#define GLU_TESS_WINDING_NONZERO 100131
++#define GLU_TESS_WINDING_POSITIVE 100132
++#define GLU_TESS_WINDING_NEGATIVE 100133
++#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
++
++/*************************************************************/
++
++
++#ifdef __cplusplus
++class GLUnurbs;
++class GLUquadric;
++class GLUtesselator;
++#else
++typedef struct GLUnurbs GLUnurbs;
++typedef struct GLUquadric GLUquadric;
++typedef struct GLUtesselator GLUtesselator;
++#endif
++
++typedef GLUnurbs GLUnurbsObj;
++typedef GLUquadric GLUquadricObj;
++typedef GLUtesselator GLUtesselatorObj;
++typedef GLUtesselator GLUtriangulatorObj;
++
++#define GLU_TESS_MAX_COORD 1.0e150
++
++/* Internal convenience typedefs */
++typedef void (GLAPIENTRYP _GLUfuncptr)();
++
++GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
++GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
++GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
++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);
++GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
++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);
++GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
++GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
++GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
++GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
++GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
++GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
++GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
++GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
++GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
++GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
++GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
++GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
++GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
++GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
++GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
++GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
++GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
++GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
++GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
++GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
++GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
++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);
++GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
++GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
++GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
++GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
++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);
++GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
++GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
++GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
++GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
++GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
++GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
++GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
++GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
++GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
++GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
++GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
++GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
++GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
++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);
++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);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __glu_h__ */
+Index: qemu-0.12.4/target-i386/mesa_glx.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_glx.h
+@@ -0,0 +1,510 @@
++/*
++ * Mesa 3-D graphics library
++ * Version: 6.5
++ *
++ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included
++ * in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++
++#ifndef GLX_H
++#define GLX_H
++
++
++#ifdef __VMS
++#include <GL/vms_x_fix.h>
++# ifdef __cplusplus
++/* VMS Xlib.h gives problems with C++.
++ * this avoids a bunch of trivial warnings */
++#pragma message disable nosimpint
++#endif
++#endif
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++#ifdef __VMS
++# ifdef __cplusplus
++#pragma message enable nosimpint
++#endif
++#endif
++#include <mesa_gl.h>
++
++
++#if defined(USE_MGL_NAMESPACE)
++#include "glx_mangle.h"
++#endif
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++
++#define GLX_VERSION_1_1 1
++#define GLX_VERSION_1_2 1
++#define GLX_VERSION_1_3 1
++#define GLX_VERSION_1_4 1
++
++#define GLX_EXTENSION_NAME "GLX"
++
++
++
++/*
++ * Tokens for glXChooseVisual and glXGetConfig:
++ */
++#define GLX_USE_GL 1
++#define GLX_BUFFER_SIZE 2
++#define GLX_LEVEL 3
++#define GLX_RGBA 4
++#define GLX_DOUBLEBUFFER 5
++#define GLX_STEREO 6
++#define GLX_AUX_BUFFERS 7
++#define GLX_RED_SIZE 8
++#define GLX_GREEN_SIZE 9
++#define GLX_BLUE_SIZE 10
++#define GLX_ALPHA_SIZE 11
++#define GLX_DEPTH_SIZE 12
++#define GLX_STENCIL_SIZE 13
++#define GLX_ACCUM_RED_SIZE 14
++#define GLX_ACCUM_GREEN_SIZE 15
++#define GLX_ACCUM_BLUE_SIZE 16
++#define GLX_ACCUM_ALPHA_SIZE 17
++
++
++/*
++ * Error codes returned by glXGetConfig:
++ */
++#define GLX_BAD_SCREEN 1
++#define GLX_BAD_ATTRIBUTE 2
++#define GLX_NO_EXTENSION 3
++#define GLX_BAD_VISUAL 4
++#define GLX_BAD_CONTEXT 5
++#define GLX_BAD_VALUE 6
++#define GLX_BAD_ENUM 7
++
++
++/*
++ * GLX 1.1 and later:
++ */
++#define GLX_VENDOR 1
++#define GLX_VERSION 2
++#define GLX_EXTENSIONS 3
++
++
++/*
++ * GLX 1.3 and later:
++ */
++#define GLX_CONFIG_CAVEAT 0x20
++#define GLX_DONT_CARE 0xFFFFFFFF
++#define GLX_X_VISUAL_TYPE 0x22
++#define GLX_TRANSPARENT_TYPE 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE 0x24
++#define GLX_TRANSPARENT_RED_VALUE 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
++#define GLX_WINDOW_BIT 0x00000001
++#define GLX_PIXMAP_BIT 0x00000002
++#define GLX_PBUFFER_BIT 0x00000004
++#define GLX_AUX_BUFFERS_BIT 0x00000010
++#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
++#define GLX_DEPTH_BUFFER_BIT 0x00000020
++#define GLX_STENCIL_BUFFER_BIT 0x00000040
++#define GLX_ACCUM_BUFFER_BIT 0x00000080
++#define GLX_NONE 0x8000
++#define GLX_SLOW_CONFIG 0x8001
++#define GLX_TRUE_COLOR 0x8002
++#define GLX_DIRECT_COLOR 0x8003
++#define GLX_PSEUDO_COLOR 0x8004
++#define GLX_STATIC_COLOR 0x8005
++#define GLX_GRAY_SCALE 0x8006
++#define GLX_STATIC_GRAY 0x8007
++#define GLX_TRANSPARENT_RGB 0x8008
++#define GLX_TRANSPARENT_INDEX 0x8009
++#define GLX_VISUAL_ID 0x800B
++#define GLX_SCREEN 0x800C
++#define GLX_NON_CONFORMANT_CONFIG 0x800D
++#define GLX_DRAWABLE_TYPE 0x8010
++#define GLX_RENDER_TYPE 0x8011
++#define GLX_X_RENDERABLE 0x8012
++#define GLX_FBCONFIG_ID 0x8013
++#define GLX_RGBA_TYPE 0x8014
++#define GLX_COLOR_INDEX_TYPE 0x8015
++#define GLX_MAX_PBUFFER_WIDTH 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT 0x8017
++#define GLX_MAX_PBUFFER_PIXELS 0x8018
++#define GLX_PRESERVED_CONTENTS 0x801B
++#define GLX_LARGEST_PBUFFER 0x801C
++#define GLX_WIDTH 0x801D
++#define GLX_HEIGHT 0x801E
++#define GLX_EVENT_MASK 0x801F
++#define GLX_DAMAGED 0x8020
++#define GLX_SAVED 0x8021
++#define GLX_WINDOW 0x8022
++#define GLX_PBUFFER 0x8023
++#define GLX_PBUFFER_HEIGHT 0x8040
++#define GLX_PBUFFER_WIDTH 0x8041
++#define GLX_RGBA_BIT 0x00000001
++#define GLX_COLOR_INDEX_BIT 0x00000002
++#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
++
++
++/*
++ * GLX 1.4 and later:
++ */
++#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
++#define GLX_SAMPLES 0x186a1 /*100001*/
++
++
++
++typedef struct __GLXcontextRec *GLXContext;
++typedef XID GLXPixmap;
++typedef XID GLXDrawable;
++/* GLX 1.3 and later */
++typedef struct __GLXFBConfigRec *GLXFBConfig;
++typedef XID GLXFBConfigID;
++typedef XID GLXContextID;
++typedef XID GLXWindow;
++typedef XID GLXPbuffer;
++
++
++
++extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
++ int *attribList );
++
++extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
++ GLXContext shareList, Bool direct );
++
++extern void glXDestroyContext( Display *dpy, GLXContext ctx );
++
++extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
++ GLXContext ctx);
++
++extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
++ unsigned long mask );
++
++extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
++
++extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
++ Pixmap pixmap );
++
++extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
++
++extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
++
++extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
++
++extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
++
++extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
++ int attrib, int *value );
++
++extern GLXContext glXGetCurrentContext( void );
++
++extern GLXDrawable glXGetCurrentDrawable( void );
++
++extern void glXWaitGL( void );
++
++extern void glXWaitX( void );
++
++extern void glXUseXFont( Font font, int first, int count, int list );
++
++
++
++/* GLX 1.1 and later */
++extern const char *glXQueryExtensionsString( Display *dpy, int screen );
++
++extern const char *glXQueryServerString( Display *dpy, int screen, int name );
++
++extern const char *glXGetClientString( Display *dpy, int name );
++
++
++/* GLX 1.2 and later */
++extern Display *glXGetCurrentDisplay( void );
++
++
++/* GLX 1.3 and later */
++extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
++ const int *attribList, int *nitems );
++
++extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
++ int attribute, int *value );
++
++extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
++ int *nelements );
++
++extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
++ GLXFBConfig config );
++
++extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
++ Window win, const int *attribList );
++
++extern void glXDestroyWindow( Display *dpy, GLXWindow window );
++
++extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
++ Pixmap pixmap, const int *attribList );
++
++extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
++
++extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
++ const int *attribList );
++
++extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
++
++extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
++ unsigned int *value );
++
++extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
++ int renderType, GLXContext shareList,
++ Bool direct );
++
++extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
++ GLXDrawable read, GLXContext ctx );
++
++extern GLXDrawable glXGetCurrentReadDrawable( void );
++
++extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
++ int *value );
++
++extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
++ unsigned long mask );
++
++extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
++ unsigned long *mask );
++
++
++/* GLX 1.4 and later */
++extern void (*glXGetProcAddress(const GLubyte *procname))( void );
++
++
++#ifndef GLX_GLXEXT_LEGACY
++
++#include <mesa_glxext.h>
++
++#else
++
++
++
++/*
++ * ARB 2. GLX_ARB_get_proc_address
++ */
++#ifndef GLX_ARB_get_proc_address
++#define GLX_ARB_get_proc_address 1
++
++typedef void (*__GLXextFuncPtr)(void);
++extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
++
++#endif /* GLX_ARB_get_proc_address */
++
++
++
++#endif /* GLX_GLXEXT_LEGACY */
++
++
++/**
++ ** The following aren't in glxext.h yet.
++ **/
++
++
++/*
++ * ???. GLX_NV_vertex_array_range
++ */
++#ifndef GLX_NV_vertex_array_range
++#define GLX_NV_vertex_array_range
++
++extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
++extern void glXFreeMemoryNV(GLvoid *pointer);
++typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
++typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
++
++#endif /* GLX_NV_vertex_array_range */
++
++
++/*
++ * ???. GLX_MESA_allocate_memory
++ */
++#ifndef GLX_MESA_allocate_memory
++#define GLX_MESA_allocate_memory 1
++
++extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
++extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
++extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
++typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
++typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
++typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
++
++#endif /* GLX_MESA_allocate_memory */
++
++
++/*
++ * ARB ?. GLX_ARB_render_texture
++ * XXX This was never finalized!
++ */
++#ifndef GLX_ARB_render_texture
++#define GLX_ARB_render_texture 1
++
++extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
++
++#endif /* GLX_ARB_render_texture */
++
++
++#ifndef GLX_ATI_render_texture
++#define GLX_ATI_render_texture 1
++
++extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
++extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
++
++#endif /* GLX_ATI_render_texture */
++
++
++/*
++ * Remove this when glxext.h is updated.
++ */
++#ifndef GLX_NV_float_buffer
++#define GLX_NV_float_buffer 1
++
++#define GLX_FLOAT_COMPONENTS_NV 0x20B0
++
++#endif /* GLX_NV_float_buffer */
++
++
++
++/*
++ * #?. GLX_MESA_swap_frame_usage
++ */
++#ifndef GLX_MESA_swap_frame_usage
++#define GLX_MESA_swap_frame_usage 1
++
++extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
++extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
++extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
++extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
++
++typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
++typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
++typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
++typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
++
++#endif /* GLX_MESA_swap_frame_usage */
++
++
++
++/*
++ * #?. GLX_MESA_swap_control
++ */
++#ifndef GLX_MESA_swap_control
++#define GLX_MESA_swap_control 1
++
++extern int glXSwapIntervalMESA(unsigned int interval);
++extern int glXGetSwapIntervalMESA(void);
++
++typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
++typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
++
++#endif /* GLX_MESA_swap_control */
++
++
++
++/*
++ * #?. GLX_EXT_texture_from_pixmap
++ * XXX not finished?
++ */
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_EXT_texture_from_pixmap 1
++
++#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
++#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
++#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
++#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
++#define GLX_Y_INVERTED_EXT 0x20D4
++
++#define GLX_TEXTURE_FORMAT_EXT 0x20D5
++#define GLX_TEXTURE_TARGET_EXT 0x20D6
++#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
++
++#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
++#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
++#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
++
++#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
++#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
++#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
++
++#define GLX_TEXTURE_1D_EXT 0x20DB
++#define GLX_TEXTURE_2D_EXT 0x20DC
++#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
++
++#define GLX_FRONT_LEFT_EXT 0x20DE
++#define GLX_FRONT_RIGHT_EXT 0x20DF
++#define GLX_BACK_LEFT_EXT 0x20E0
++#define GLX_BACK_RIGHT_EXT 0x20E1
++#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
++#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
++#define GLX_AUX0_EXT 0x20E2
++#define GLX_AUX1_EXT 0x20E3
++#define GLX_AUX2_EXT 0x20E4
++#define GLX_AUX3_EXT 0x20E5
++#define GLX_AUX4_EXT 0x20E6
++#define GLX_AUX5_EXT 0x20E7
++#define GLX_AUX6_EXT 0x20E8
++#define GLX_AUX7_EXT 0x20E9
++#define GLX_AUX8_EXT 0x20EA
++#define GLX_AUX9_EXT 0x20EB
++
++extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
++extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
++
++#endif /* GLX_EXT_texture_from_pixmap */
++
++
++
++
++/*** Should these go here, or in another header? */
++/*
++** GLX Events
++*/
++typedef struct {
++ int event_type; /* GLX_DAMAGED or GLX_SAVED */
++ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
++ unsigned long serial; /* # of last request processed by server */
++ Bool send_event; /* true if this came for SendEvent request */
++ Display *display; /* display the event was read from */
++ GLXDrawable drawable; /* XID of Drawable */
++ unsigned int buffer_mask; /* mask indicating which buffers are affected */
++ unsigned int aux_buffer; /* which aux buffer was affected */
++ int x, y;
++ int width, height;
++ int count; /* if nonzero, at least this many more */
++} GLXPbufferClobberEvent;
++
++typedef union __GLXEvent {
++ GLXPbufferClobberEvent glxpbufferclobber;
++ long pad[24];
++} GLXEvent;
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+Index: qemu-0.12.4/target-i386/mesa_glxext.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_glxext.h
+@@ -0,0 +1,785 @@
++#ifndef __glxext_h_
++#define __glxext_h_
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++** Copyright (c) 2007 The Khronos Group Inc.
++**
++** Permission is hereby granted, free of charge, to any person obtaining a
++** copy of this software and/or associated documentation files (the
++** "Materials"), to deal in the Materials without restriction, including
++** without limitation the rights to use, copy, modify, merge, publish,
++** distribute, sublicense, and/or sell copies of the Materials, and to
++** permit persons to whom the Materials are furnished to do so, subject to
++** the following conditions:
++**
++** The above copyright notice and this permission notice shall be included
++** in all copies or substantial portions of the Materials.
++**
++** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
++*/
++
++#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
++#define WIN32_LEAN_AND_MEAN 1
++#include <windows.h>
++#endif
++
++#ifndef APIENTRY
++#define APIENTRY
++#endif
++#ifndef APIENTRYP
++#define APIENTRYP APIENTRY *
++#endif
++#ifndef GLAPI
++#define GLAPI extern
++#endif
++
++/*************************************************************/
++
++/* Header file version number, required by OpenGL ABI for Linux */
++/* glxext.h last updated 2007/04/21 */
++/* Current version at http://www.opengl.org/registry/ */
++#define GLX_GLXEXT_VERSION 19
++
++#ifndef GLX_VERSION_1_3
++#define GLX_WINDOW_BIT 0x00000001
++#define GLX_PIXMAP_BIT 0x00000002
++#define GLX_PBUFFER_BIT 0x00000004
++#define GLX_RGBA_BIT 0x00000001
++#define GLX_COLOR_INDEX_BIT 0x00000002
++#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
++#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
++#define GLX_AUX_BUFFERS_BIT 0x00000010
++#define GLX_DEPTH_BUFFER_BIT 0x00000020
++#define GLX_STENCIL_BUFFER_BIT 0x00000040
++#define GLX_ACCUM_BUFFER_BIT 0x00000080
++#define GLX_CONFIG_CAVEAT 0x20
++#define GLX_X_VISUAL_TYPE 0x22
++#define GLX_TRANSPARENT_TYPE 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE 0x24
++#define GLX_TRANSPARENT_RED_VALUE 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
++#define GLX_DONT_CARE 0xFFFFFFFF
++#define GLX_NONE 0x8000
++#define GLX_SLOW_CONFIG 0x8001
++#define GLX_TRUE_COLOR 0x8002
++#define GLX_DIRECT_COLOR 0x8003
++#define GLX_PSEUDO_COLOR 0x8004
++#define GLX_STATIC_COLOR 0x8005
++#define GLX_GRAY_SCALE 0x8006
++#define GLX_STATIC_GRAY 0x8007
++#define GLX_TRANSPARENT_RGB 0x8008
++#define GLX_TRANSPARENT_INDEX 0x8009
++#define GLX_VISUAL_ID 0x800B
++#define GLX_SCREEN 0x800C
++#define GLX_NON_CONFORMANT_CONFIG 0x800D
++#define GLX_DRAWABLE_TYPE 0x8010
++#define GLX_RENDER_TYPE 0x8011
++#define GLX_X_RENDERABLE 0x8012
++#define GLX_FBCONFIG_ID 0x8013
++#define GLX_RGBA_TYPE 0x8014
++#define GLX_COLOR_INDEX_TYPE 0x8015
++#define GLX_MAX_PBUFFER_WIDTH 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT 0x8017
++#define GLX_MAX_PBUFFER_PIXELS 0x8018
++#define GLX_PRESERVED_CONTENTS 0x801B
++#define GLX_LARGEST_PBUFFER 0x801C
++#define GLX_WIDTH 0x801D
++#define GLX_HEIGHT 0x801E
++#define GLX_EVENT_MASK 0x801F
++#define GLX_DAMAGED 0x8020
++#define GLX_SAVED 0x8021
++#define GLX_WINDOW 0x8022
++#define GLX_PBUFFER 0x8023
++#define GLX_PBUFFER_HEIGHT 0x8040
++#define GLX_PBUFFER_WIDTH 0x8041
++#endif
++
++#ifndef GLX_VERSION_1_4
++#define GLX_SAMPLE_BUFFERS 100000
++#define GLX_SAMPLES 100001
++#endif
++
++#ifndef GLX_ARB_get_proc_address
++#endif
++
++#ifndef GLX_ARB_multisample
++#define GLX_SAMPLE_BUFFERS_ARB 100000
++#define GLX_SAMPLES_ARB 100001
++#endif
++
++#ifndef GLX_ARB_fbconfig_float
++#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
++#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
++#endif
++
++#ifndef GLX_SGIS_multisample
++#define GLX_SAMPLE_BUFFERS_SGIS 100000
++#define GLX_SAMPLES_SGIS 100001
++#endif
++
++#ifndef GLX_EXT_visual_info
++#define GLX_X_VISUAL_TYPE_EXT 0x22
++#define GLX_TRANSPARENT_TYPE_EXT 0x23
++#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
++#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
++#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
++#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
++#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
++#define GLX_NONE_EXT 0x8000
++#define GLX_TRUE_COLOR_EXT 0x8002
++#define GLX_DIRECT_COLOR_EXT 0x8003
++#define GLX_PSEUDO_COLOR_EXT 0x8004
++#define GLX_STATIC_COLOR_EXT 0x8005
++#define GLX_GRAY_SCALE_EXT 0x8006
++#define GLX_STATIC_GRAY_EXT 0x8007
++#define GLX_TRANSPARENT_RGB_EXT 0x8008
++#define GLX_TRANSPARENT_INDEX_EXT 0x8009
++#endif
++
++#ifndef GLX_SGI_swap_control
++#endif
++
++#ifndef GLX_SGI_video_sync
++#endif
++
++#ifndef GLX_SGI_make_current_read
++#endif
++
++#ifndef GLX_SGIX_video_source
++#endif
++
++#ifndef GLX_EXT_visual_rating
++#define GLX_VISUAL_CAVEAT_EXT 0x20
++#define GLX_SLOW_VISUAL_EXT 0x8001
++#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
++/* reuse GLX_NONE_EXT */
++#endif
++
++#ifndef GLX_EXT_import_context
++#define GLX_SHARE_CONTEXT_EXT 0x800A
++#define GLX_VISUAL_ID_EXT 0x800B
++#define GLX_SCREEN_EXT 0x800C
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++#define GLX_WINDOW_BIT_SGIX 0x00000001
++#define GLX_PIXMAP_BIT_SGIX 0x00000002
++#define GLX_RGBA_BIT_SGIX 0x00000001
++#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
++#define GLX_DRAWABLE_TYPE_SGIX 0x8010
++#define GLX_RENDER_TYPE_SGIX 0x8011
++#define GLX_X_RENDERABLE_SGIX 0x8012
++#define GLX_FBCONFIG_ID_SGIX 0x8013
++#define GLX_RGBA_TYPE_SGIX 0x8014
++#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
++/* reuse GLX_SCREEN_EXT */
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++#define GLX_PBUFFER_BIT_SGIX 0x00000004
++#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
++#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
++#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
++#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
++#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
++#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
++#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
++#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
++#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
++#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
++#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
++#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
++#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
++#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
++#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
++#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
++#define GLX_LARGEST_PBUFFER_SGIX 0x801C
++#define GLX_WIDTH_SGIX 0x801D
++#define GLX_HEIGHT_SGIX 0x801E
++#define GLX_EVENT_MASK_SGIX 0x801F
++#define GLX_DAMAGED_SGIX 0x8020
++#define GLX_SAVED_SGIX 0x8021
++#define GLX_WINDOW_SGIX 0x8022
++#define GLX_PBUFFER_SGIX 0x8023
++#endif
++
++#ifndef GLX_SGI_cushion
++#endif
++
++#ifndef GLX_SGIX_video_resize
++#define GLX_SYNC_FRAME_SGIX 0x00000000
++#define GLX_SYNC_SWAP_SGIX 0x00000001
++#endif
++
++#ifndef GLX_SGIX_dmbuffer
++#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
++#endif
++
++#ifndef GLX_SGIX_swap_group
++#endif
++
++#ifndef GLX_SGIX_swap_barrier
++#endif
++
++#ifndef GLX_SGIS_blended_overlay
++#define GLX_BLENDED_RGBA_SGIS 0x8025
++#endif
++
++#ifndef GLX_SGIS_shared_multisample
++#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
++#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
++#endif
++
++#ifndef GLX_SUN_get_transparent_index
++#endif
++
++#ifndef GLX_3DFX_multisample
++#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
++#define GLX_SAMPLES_3DFX 0x8051
++#endif
++
++#ifndef GLX_MESA_copy_sub_buffer
++#endif
++
++#ifndef GLX_MESA_pixmap_colormap
++#endif
++
++#ifndef GLX_MESA_release_buffers
++#endif
++
++#ifndef GLX_MESA_set_3dfx_mode
++#define GLX_3DFX_WINDOW_MODE_MESA 0x1
++#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
++#endif
++
++#ifndef GLX_SGIX_visual_select_group
++#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
++#endif
++
++#ifndef GLX_OML_swap_method
++#define GLX_SWAP_METHOD_OML 0x8060
++#define GLX_SWAP_EXCHANGE_OML 0x8061
++#define GLX_SWAP_COPY_OML 0x8062
++#define GLX_SWAP_UNDEFINED_OML 0x8063
++#endif
++
++#ifndef GLX_OML_sync_control
++#endif
++
++#ifndef GLX_NV_float_buffer
++#define GLX_FLOAT_COMPONENTS_NV 0x20B0
++#endif
++
++#ifndef GLX_SGIX_hyperpipe
++#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
++#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
++#define GLX_BAD_HYPERPIPE_SGIX 92
++#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
++#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
++#define GLX_PIPE_RECT_SGIX 0x00000001
++#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
++#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
++#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
++#define GLX_HYPERPIPE_ID_SGIX 0x8030
++#endif
++
++#ifndef GLX_MESA_agp_offset
++#endif
++
++#ifndef GLX_EXT_fbconfig_packed_float
++#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
++#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
++#endif
++
++#ifndef GLX_EXT_framebuffer_sRGB
++#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
++#endif
++
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
++#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
++#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
++#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
++#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
++#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
++#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
++#define GLX_Y_INVERTED_EXT 0x20D4
++#define GLX_TEXTURE_FORMAT_EXT 0x20D5
++#define GLX_TEXTURE_TARGET_EXT 0x20D6
++#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
++#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
++#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
++#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
++#define GLX_TEXTURE_1D_EXT 0x20DB
++#define GLX_TEXTURE_2D_EXT 0x20DC
++#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
++#define GLX_FRONT_LEFT_EXT 0x20DE
++#define GLX_FRONT_RIGHT_EXT 0x20DF
++#define GLX_BACK_LEFT_EXT 0x20E0
++#define GLX_BACK_RIGHT_EXT 0x20E1
++#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
++#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
++#define GLX_AUX0_EXT 0x20E2
++#define GLX_AUX1_EXT 0x20E3
++#define GLX_AUX2_EXT 0x20E4
++#define GLX_AUX3_EXT 0x20E5
++#define GLX_AUX4_EXT 0x20E6
++#define GLX_AUX5_EXT 0x20E7
++#define GLX_AUX6_EXT 0x20E8
++#define GLX_AUX7_EXT 0x20E9
++#define GLX_AUX8_EXT 0x20EA
++#define GLX_AUX9_EXT 0x20EB
++#endif
++
++
++/*************************************************************/
++
++#ifndef GLX_ARB_get_proc_address
++typedef void (*__GLXextFuncPtr)(void);
++#endif
++
++#ifndef GLX_SGIX_video_source
++typedef XID GLXVideoSourceSGIX;
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++typedef XID GLXFBConfigIDSGIX;
++typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++typedef XID GLXPbufferSGIX;
++typedef struct {
++ int type;
++ unsigned long serial; /* # of last request processed by server */
++ Bool send_event; /* true if this came for SendEvent request */
++ Display *display; /* display the event was read from */
++ GLXDrawable drawable; /* i.d. of Drawable */
++ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
++ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
++ unsigned int mask; /* mask indicating which buffers are affected*/
++ int x, y;
++ int width, height;
++ int count; /* if nonzero, at least this many more */
++} GLXBufferClobberEventSGIX;
++#endif
++
++#ifndef GLEXT_64_TYPES_DEFINED
++/* This code block is duplicated in glxext.h, so must be protected */
++#define GLEXT_64_TYPES_DEFINED
++/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
++/* (as used in the GLX_OML_sync_control extension). */
++#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++#include <inttypes.h>
++#elif defined(__sun__) || defined(__digital__)
++#include <inttypes.h>
++#if defined(__STDC__)
++#if defined(__arch64__)
++typedef long int int64_t;
++typedef unsigned long int uint64_t;
++#else
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#endif /* __arch64__ */
++#endif /* __STDC__ */
++#elif defined( __VMS )
++#include <inttypes.h>
++#elif defined(__SCO__) || defined(__USLC__)
++#include <stdint.h>
++#elif defined(__UNIXOS2__) || defined(__SOL64__)
++typedef long int int32_t;
++typedef long long int int64_t;
++typedef unsigned long long int uint64_t;
++#elif defined(_WIN32) && defined(__GNUC__)
++#include <stdint.h>
++#elif defined(_WIN32)
++typedef __int32 int32_t;
++typedef __int64 int64_t;
++typedef unsigned __int64 uint64_t;
++#else
++#include <inttypes.h> /* Fallback option */
++#endif
++#endif
++
++#ifndef GLX_VERSION_1_3
++#define GLX_VERSION_1_3 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
++extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
++extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
++extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
++extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
++extern void glXDestroyWindow (Display *, GLXWindow);
++extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
++extern void glXDestroyPixmap (Display *, GLXPixmap);
++extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
++extern void glXDestroyPbuffer (Display *, GLXPbuffer);
++extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
++extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
++extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
++extern GLXDrawable glXGetCurrentReadDrawable (void);
++extern Display * glXGetCurrentDisplay (void);
++extern int glXQueryContext (Display *, GLXContext, int, int *);
++extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
++extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
++typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
++typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
++typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
++typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
++typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
++typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
++typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
++typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
++typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
++typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
++typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
++typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
++typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
++typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
++typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
++#endif
++
++#ifndef GLX_VERSION_1_4
++#define GLX_VERSION_1_4 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
++#endif
++
++#ifndef GLX_ARB_get_proc_address
++#define GLX_ARB_get_proc_address 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
++#endif
++
++#ifndef GLX_ARB_multisample
++#define GLX_ARB_multisample 1
++#endif
++
++#ifndef GLX_ARB_fbconfig_float
++#define GLX_ARB_fbconfig_float 1
++#endif
++
++#ifndef GLX_SGIS_multisample
++#define GLX_SGIS_multisample 1
++#endif
++
++#ifndef GLX_EXT_visual_info
++#define GLX_EXT_visual_info 1
++#endif
++
++#ifndef GLX_SGI_swap_control
++#define GLX_SGI_swap_control 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXSwapIntervalSGI (int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
++#endif
++
++#ifndef GLX_SGI_video_sync
++#define GLX_SGI_video_sync 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXGetVideoSyncSGI (unsigned int *);
++extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
++typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
++#endif
++
++#ifndef GLX_SGI_make_current_read
++#define GLX_SGI_make_current_read 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
++extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
++typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
++#endif
++
++#ifndef GLX_SGIX_video_source
++#define GLX_SGIX_video_source 1
++#ifdef _VL_H
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
++extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
++typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
++#endif /* _VL_H */
++#endif
++
++#ifndef GLX_EXT_visual_rating
++#define GLX_EXT_visual_rating 1
++#endif
++
++#ifndef GLX_EXT_import_context
++#define GLX_EXT_import_context 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Display * glXGetCurrentDisplayEXT (void);
++extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
++extern GLXContextID glXGetContextIDEXT (const GLXContext);
++extern GLXContext glXImportContextEXT (Display *, GLXContextID);
++extern void glXFreeContextEXT (Display *, GLXContext);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
++typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
++typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
++typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
++typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
++#endif
++
++#ifndef GLX_SGIX_fbconfig
++#define GLX_SGIX_fbconfig 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
++extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
++extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
++extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
++extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
++extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
++typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
++typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
++typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
++typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
++typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
++#endif
++
++#ifndef GLX_SGIX_pbuffer
++#define GLX_SGIX_pbuffer 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
++extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
++extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
++extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
++extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
++typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
++typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
++typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
++typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
++#endif
++
++#ifndef GLX_SGI_cushion
++#define GLX_SGI_cushion 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXCushionSGI (Display *, Window, float);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
++#endif
++
++#ifndef GLX_SGIX_video_resize
++#define GLX_SGIX_video_resize 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
++extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
++extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
++extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
++extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
++typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
++typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
++typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
++typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
++#endif
++
++#ifndef GLX_SGIX_dmbuffer
++#define GLX_SGIX_dmbuffer 1
++#ifdef _DM_BUFFER_H_
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
++#endif /* _DM_BUFFER_H_ */
++#endif
++
++#ifndef GLX_SGIX_swap_group
++#define GLX_SGIX_swap_group 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
++#endif
++
++#ifndef GLX_SGIX_swap_barrier
++#define GLX_SGIX_swap_barrier 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
++extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
++typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
++#endif
++
++#ifndef GLX_SUN_get_transparent_index
++#define GLX_SUN_get_transparent_index 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
++#endif
++
++#ifndef GLX_MESA_copy_sub_buffer
++#define GLX_MESA_copy_sub_buffer 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
++#endif
++
++#ifndef GLX_MESA_pixmap_colormap
++#define GLX_MESA_pixmap_colormap 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
++#endif
++
++#ifndef GLX_MESA_release_buffers
++#define GLX_MESA_release_buffers 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
++#endif
++
++#ifndef GLX_MESA_set_3dfx_mode
++#define GLX_MESA_set_3dfx_mode 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXSet3DfxModeMESA (int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
++#endif
++
++#ifndef GLX_SGIX_visual_select_group
++#define GLX_SGIX_visual_select_group 1
++#endif
++
++#ifndef GLX_OML_swap_method
++#define GLX_OML_swap_method 1
++#endif
++
++#ifndef GLX_OML_sync_control
++#define GLX_OML_sync_control 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
++extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
++extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
++extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
++extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
++typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
++typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
++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);
++typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
++#endif
++
++#ifndef GLX_NV_float_buffer
++#define GLX_NV_float_buffer 1
++#endif
++
++#ifndef GLX_SGIX_hyperpipe
++#define GLX_SGIX_hyperpipe 1
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int networkId;
++} GLXHyperpipeNetworkSGIX;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int channel;
++ unsigned int
++ participationType;
++ int timeSlice;
++} GLXHyperpipeConfigSGIX;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
++ int destXOrigin, destYOrigin, destWidth, destHeight;
++} GLXPipeRect;
++
++typedef struct {
++ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
++ int XOrigin, YOrigin, maxHeight, maxWidth;
++} GLXPipeRectLimits;
++
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
++extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
++extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
++extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
++extern int glXBindHyperpipeSGIX (Display *, int);
++extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
++extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
++extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
++typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
++typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
++typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
++typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
++typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
++typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
++typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
++#endif
++
++#ifndef GLX_MESA_agp_offset
++#define GLX_MESA_agp_offset 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern unsigned int glXGetAGPOffsetMESA (const void *);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
++#endif
++
++#ifndef GLX_EXT_fbconfig_packed_float
++#define GLX_EXT_fbconfig_packed_float 1
++#endif
++
++#ifndef GLX_EXT_framebuffer_sRGB
++#define GLX_EXT_framebuffer_sRGB 1
++#endif
++
++#ifndef GLX_EXT_texture_from_pixmap
++#define GLX_EXT_texture_from_pixmap 1
++#ifdef GLX_GLXEXT_PROTOTYPES
++extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
++extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
++#endif /* GLX_GLXEXT_PROTOTYPES */
++typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
++typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
++#endif
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+Index: qemu-0.12.4/target-i386/mesa_mipmap.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/mesa_mipmap.c
+@@ -0,0 +1,824 @@
++
++/*
++ * Mesa 3-D graphics library
++ * Version: 3.4
++ * Copyright (C) 1995-2000 Brian Paul
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the Free
++ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++
++#ifdef PC_HEADER
++#include "all.h"
++#else
++#include <assert.h>
++#include <math.h>
++#include <stdio.h>
++#include <stdlib.h>
++//#include "gluP.h"
++#endif
++
++
++/*
++ * Compute ceiling of integer quotient of A divided by B:
++ */
++#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
++
++
++
++#ifdef EPSILON
++#undef EPSILON
++#endif
++#define EPSILON 0.001
++
++
++/* To work around optimizer bug in MSVC4.1 */
++#if defined(__WIN32__) && !defined(OPENSTEP)
++void
++dummy(GLuint j, GLuint k)
++{
++}
++#else
++#define dummy(J, K)
++#endif
++
++
++static GLint GLAPIENTRY
++mesa_gluScaleImage(GLenum format,
++ GLsizei widthin, GLsizei heightin,
++ GLenum typein, const void *datain,
++ GLsizei widthout, GLsizei heightout,
++ GLenum typeout, void *dataout)
++{
++ GLint components, i, j, k;
++ GLfloat *tempin, *tempout;
++ GLfloat sx, sy;
++ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
++ GLint packrowlength, packalignment, packskiprows, packskippixels;
++ GLint sizein, sizeout;
++ GLint rowstride, rowlen;
++
++
++ /* Determine number of components per pixel */
++ switch (format) {
++ case GL_COLOR_INDEX:
++ case GL_STENCIL_INDEX:
++ case GL_DEPTH_COMPONENT:
++ case GL_RED:
++ case GL_GREEN:
++ case GL_BLUE:
++ case GL_ALPHA:
++ case GL_LUMINANCE:
++ components = 1;
++ break;
++ case GL_LUMINANCE_ALPHA:
++ components = 2;
++ break;
++ case GL_RGB:
++ case GL_BGR:
++ components = 3;
++ break;
++ case GL_RGBA:
++ case GL_BGRA:
++#ifdef GL_EXT_abgr
++ case GL_ABGR_EXT:
++#endif
++ components = 4;
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++ /* Determine bytes per input datum */
++ switch (typein) {
++ case GL_UNSIGNED_BYTE:
++ sizein = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ sizein = sizeof(GLbyte);
++ break;
++ case GL_UNSIGNED_SHORT:
++ sizein = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ sizein = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ sizein = sizeof(GLuint);
++ break;
++ case GL_INT:
++ sizein = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ sizein = sizeof(GLfloat);
++ break;
++ case GL_BITMAP:
++ /* not implemented yet */
++ default:
++ return GL_INVALID_ENUM;
++ }
++
++ /* Determine bytes per output datum */
++ switch (typeout) {
++ case GL_UNSIGNED_BYTE:
++ sizeout = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ sizeout = sizeof(GLbyte);
++ break;
++ case GL_UNSIGNED_SHORT:
++ sizeout = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ sizeout = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ sizeout = sizeof(GLuint);
++ break;
++ case GL_INT:
++ sizeout = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ sizeout = sizeof(GLfloat);
++ break;
++ case GL_BITMAP:
++ /* not implemented yet */
++ default:
++ return GL_INVALID_ENUM;
++ }
++
++ /* Get glPixelStore state */
++ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
++ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
++ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
++ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
++ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
++ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
++ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
++ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
++
++ /* Allocate storage for intermediate images */
++ tempin = (GLfloat *) malloc(widthin * heightin
++ * components * sizeof(GLfloat));
++ if (!tempin) {
++ return GLU_OUT_OF_MEMORY;
++ }
++ tempout = (GLfloat *) malloc(widthout * heightout
++ * components * sizeof(GLfloat));
++ if (!tempout) {
++ free(tempin);
++ return GLU_OUT_OF_MEMORY;
++ }
++
++
++ /*
++ * Unpack the pixel data and convert to floating point
++ */
++
++ if (unpackrowlength > 0) {
++ rowlen = unpackrowlength;
++ }
++ else {
++ rowlen = widthin;
++ }
++ if (sizein >= unpackalignment) {
++ rowstride = components * rowlen;
++ }
++ else {
++ rowstride = unpackalignment / sizein
++ * CEILING(components * rowlen * sizein, unpackalignment);
++ }
++
++ switch (typein) {
++ case GL_UNSIGNED_BYTE:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLubyte *ubptr = (GLubyte *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * ubptr++;
++ }
++ }
++ break;
++ case GL_BYTE:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLbyte *bptr = (GLbyte *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * bptr++;
++ }
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLushort *usptr = (GLushort *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * usptr++;
++ }
++ }
++ break;
++ case GL_SHORT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLshort *sptr = (GLshort *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * sptr++;
++ }
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLuint *uiptr = (GLuint *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * uiptr++;
++ }
++ }
++ break;
++ case GL_INT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLint *iptr = (GLint *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = (GLfloat) * iptr++;
++ }
++ }
++ break;
++ case GL_FLOAT:
++ k = 0;
++ for (i = 0; i < heightin; i++) {
++ GLfloat *fptr = (GLfloat *) datain
++ + i * rowstride
++ + unpackskiprows * rowstride + unpackskippixels * components;
++ for (j = 0; j < widthin * components; j++) {
++ dummy(j, k);
++ tempin[k++] = *fptr++;
++ }
++ }
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++
++ /*
++ * Scale the image!
++ */
++
++ if (widthout > 1)
++ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
++ else
++ sx = (GLfloat) (widthin - 1);
++ if (heightout > 1)
++ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
++ else
++ sy = (GLfloat) (heightin - 1);
++
++/*#define POINT_SAMPLE*/
++#ifdef POINT_SAMPLE
++ for (i = 0; i < heightout; i++) {
++ GLint ii = i * sy;
++ for (j = 0; j < widthout; j++) {
++ GLint jj = j * sx;
++
++ GLfloat *src = tempin + (ii * widthin + jj) * components;
++ GLfloat *dst = tempout + (i * widthout + j) * components;
++
++ for (k = 0; k < components; k++) {
++ *dst++ = *src++;
++ }
++ }
++ }
++#else
++ if (sx < 1.0 && sy < 1.0) {
++ /* magnify both width and height: use weighted sample of 4 pixels */
++ GLint i0, i1, j0, j1;
++ GLfloat alpha, beta;
++ GLfloat *src00, *src01, *src10, *src11;
++ GLfloat s1, s2;
++ GLfloat *dst;
++
++ for (i = 0; i < heightout; i++) {
++ i0 = i * sy;
++ i1 = i0 + 1;
++ if (i1 >= heightin)
++ i1 = heightin - 1;
++/* i1 = (i+1) * sy - EPSILON;*/
++ alpha = i * sy - i0;
++ for (j = 0; j < widthout; j++) {
++ j0 = j * sx;
++ j1 = j0 + 1;
++ if (j1 >= widthin)
++ j1 = widthin - 1;
++/* j1 = (j+1) * sx - EPSILON; */
++ beta = j * sx - j0;
++
++ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
++ src00 = tempin + (i0 * widthin + j0) * components;
++ src01 = tempin + (i0 * widthin + j1) * components;
++ src10 = tempin + (i1 * widthin + j0) * components;
++ src11 = tempin + (i1 * widthin + j1) * components;
++
++ dst = tempout + (i * widthout + j) * components;
++
++ for (k = 0; k < components; k++) {
++ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
++ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
++ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
++ }
++ }
++ }
++ }
++ else {
++ /* shrink width and/or height: use an unweighted box filter */
++ GLint i0, i1;
++ GLint j0, j1;
++ GLint ii, jj;
++ GLfloat sum, *dst;
++
++ for (i = 0; i < heightout; i++) {
++ i0 = i * sy;
++ i1 = i0 + 1;
++ if (i1 >= heightin)
++ i1 = heightin - 1;
++/* i1 = (i+1) * sy - EPSILON; */
++ for (j = 0; j < widthout; j++) {
++ j0 = j * sx;
++ j1 = j0 + 1;
++ if (j1 >= widthin)
++ j1 = widthin - 1;
++/* j1 = (j+1) * sx - EPSILON; */
++
++ dst = tempout + (i * widthout + j) * components;
++
++ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
++ for (k = 0; k < components; k++) {
++ sum = 0.0;
++ for (ii = i0; ii <= i1; ii++) {
++ for (jj = j0; jj <= j1; jj++) {
++ sum += *(tempin + (ii * widthin + jj) * components + k);
++ }
++ }
++ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
++ *dst++ = sum;
++ }
++ }
++ }
++ }
++#endif
++
++
++ /*
++ * Return output image
++ */
++
++ if (packrowlength > 0) {
++ rowlen = packrowlength;
++ }
++ else {
++ rowlen = widthout;
++ }
++ if (sizeout >= packalignment) {
++ rowstride = components * rowlen;
++ }
++ else {
++ rowstride = packalignment / sizeout
++ * CEILING(components * rowlen * sizeout, packalignment);
++ }
++
++ switch (typeout) {
++ case GL_UNSIGNED_BYTE:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLubyte *ubptr = (GLubyte *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *ubptr++ = (GLubyte) tempout[k++];
++ }
++ }
++ break;
++ case GL_BYTE:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLbyte *bptr = (GLbyte *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *bptr++ = (GLbyte) tempout[k++];
++ }
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLushort *usptr = (GLushort *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *usptr++ = (GLushort) tempout[k++];
++ }
++ }
++ break;
++ case GL_SHORT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLshort *sptr = (GLshort *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *sptr++ = (GLshort) tempout[k++];
++ }
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLuint *uiptr = (GLuint *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *uiptr++ = (GLuint) tempout[k++];
++ }
++ }
++ break;
++ case GL_INT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLint *iptr = (GLint *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *iptr++ = (GLint) tempout[k++];
++ }
++ }
++ break;
++ case GL_FLOAT:
++ k = 0;
++ for (i = 0; i < heightout; i++) {
++ GLfloat *fptr = (GLfloat *) dataout
++ + i * rowstride
++ + packskiprows * rowstride + packskippixels * components;
++ for (j = 0; j < widthout * components; j++) {
++ dummy(j, k + i);
++ *fptr++ = tempout[k++];
++ }
++ }
++ break;
++ default:
++ return GLU_INVALID_ENUM;
++ }
++
++
++ /* free temporary image storage */
++ free(tempin);
++ free(tempout);
++
++ return 0;
++}
++
++
++
++/*
++ * Return the largest k such that 2^k <= n.
++ */
++static GLint
++ilog2(GLint n)
++{
++ GLint k;
++
++ if (n <= 0)
++ return 0;
++ for (k = 0; n >>= 1; k++);
++ return k;
++}
++
++
++
++/*
++ * Find the value nearest to n which is also a power of two.
++ */
++static GLint
++round2(GLint n)
++{
++ GLint m;
++
++ for (m = 1; m < n; m *= 2);
++
++ /* m>=n */
++ if (m - n <= n - m / 2) {
++ return m;
++ }
++ else {
++ return m / 2;
++ }
++}
++
++
++/*
++ * Given an pixel format and datatype, return the number of bytes to
++ * store one pixel.
++ */
++static GLint
++bytes_per_pixel(GLenum format, GLenum type)
++{
++ GLint n, m;
++
++ switch (format) {
++ case GL_COLOR_INDEX:
++ case GL_STENCIL_INDEX:
++ case GL_DEPTH_COMPONENT:
++ case GL_RED:
++ case GL_GREEN:
++ case GL_BLUE:
++ case GL_ALPHA:
++ case GL_LUMINANCE:
++ n = 1;
++ break;
++ case GL_LUMINANCE_ALPHA:
++ n = 2;
++ break;
++ case GL_RGB:
++ case GL_BGR:
++ n = 3;
++ break;
++ case GL_RGBA:
++ case GL_BGRA:
++#ifdef GL_EXT_abgr
++ case GL_ABGR_EXT:
++#endif
++ n = 4;
++ break;
++ default:
++ n = 0;
++ }
++
++ switch (type) {
++ case GL_UNSIGNED_BYTE:
++ m = sizeof(GLubyte);
++ break;
++ case GL_BYTE:
++ m = sizeof(GLbyte);
++ break;
++ case GL_BITMAP:
++ m = 1;
++ break;
++ case GL_UNSIGNED_SHORT:
++ m = sizeof(GLushort);
++ break;
++ case GL_SHORT:
++ m = sizeof(GLshort);
++ break;
++ case GL_UNSIGNED_INT:
++ m = sizeof(GLuint);
++ break;
++ case GL_INT:
++ m = sizeof(GLint);
++ break;
++ case GL_FLOAT:
++ m = sizeof(GLfloat);
++ break;
++ default:
++ m = 0;
++ }
++
++ return n * m;
++}
++
++
++
++/*
++ * WARNING: This function isn't finished and has never been tested!!!!
++ */
++GLint GLAPIENTRY
++mesa_gluBuild1DMipmaps(GLenum target, GLint components,
++ GLsizei width, GLenum format, GLenum type, const void *data)
++{
++ GLubyte *texture;
++ GLint levels, max_levels;
++ GLint new_width, max_width;
++ GLint i, j, k, l;
++
++ if (width < 1)
++ return GLU_INVALID_VALUE;
++
++ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
++ max_levels = ilog2(max_width) + 1;
++
++ /* Compute how many mipmap images to make */
++ levels = ilog2(width) + 1;
++ if (levels > max_levels) {
++ levels = max_levels;
++ }
++
++ new_width = 1 << (levels - 1);
++
++ texture = (GLubyte *) malloc(new_width * components);
++ if (!texture) {
++ return GLU_OUT_OF_MEMORY;
++ }
++
++ if (width != new_width) {
++ /* initial rescaling */
++ switch (type) {
++ case GL_UNSIGNED_BYTE:
++ {
++ GLubyte *ub_data = (GLubyte *) data;
++ for (i = 0; i < new_width; i++) {
++ j = i * width / new_width;
++ for (k = 0; k < components; k++) {
++ texture[i * components + k] = ub_data[j * components + k];
++ }
++ }
++ }
++ break;
++ default:
++ /* Not implemented */
++ return GLU_ERROR;
++ }
++ }
++
++ /* generate and load mipmap images */
++ for (l = 0; l < levels; l++) {
++ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
++ format, GL_UNSIGNED_BYTE, texture);
++
++ /* Scale image down to 1/2 size */
++ new_width = new_width / 2;
++ for (i = 0; i < new_width; i++) {
++ for (k = 0; k < components; k++) {
++ GLint sample1, sample2;
++ sample1 = (GLint) texture[i * 2 * components + k];
++ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
++ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
++ }
++ }
++ }
++
++ free(texture);
++
++ return 0;
++}
++
++
++
++GLint GLAPIENTRY
++mesa_gluBuild2DMipmaps(GLenum target, GLint components,
++ GLsizei width, GLsizei height, GLenum format,
++ GLenum type, const void *data)
++{
++ GLint w, h, maxsize;
++ void *image, *newimage;
++ GLint neww, newh, level, bpp;
++ int error;
++ GLboolean done;
++ GLint retval = 0;
++ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
++ GLint packrowlength, packalignment, packskiprows, packskippixels;
++
++ if (width < 1 || height < 1)
++ return GLU_INVALID_VALUE;
++
++ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
++
++ w = round2(width);
++ if (w > maxsize) {
++ w = maxsize;
++ }
++ h = round2(height);
++ if (h > maxsize) {
++ h = maxsize;
++ }
++
++ bpp = bytes_per_pixel(format, type);
++ if (bpp == 0) {
++ /* probably a bad format or type enum */
++ return GLU_INVALID_ENUM;
++ }
++
++ /* Get current glPixelStore values */
++ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
++ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
++ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
++ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
++ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
++ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
++ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
++ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
++
++ /* set pixel packing */
++ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
++ glPixelStorei(GL_PACK_ALIGNMENT, 1);
++ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
++
++ done = GL_FALSE;
++
++ if (w != width || h != height) {
++ /* must rescale image to get "top" mipmap texture image */
++ image = malloc((w + 4) * h * bpp);
++ if (!image) {
++ return GLU_OUT_OF_MEMORY;
++ }
++ error = mesa_gluScaleImage(format, width, height, type, data,
++ w, h, type, image);
++ if (error) {
++ retval = error;
++ done = GL_TRUE;
++ }
++ }
++ else {
++ image = (void *) data;
++ }
++
++ level = 0;
++ while (!done) {
++ if (image != data) {
++ /* set pixel unpacking */
++ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
++ }
++
++ glTexImage2D(target, level, components, w, h, 0, format, type, image);
++
++ if (w == 1 && h == 1)
++ break;
++
++ neww = (w < 2) ? 1 : w / 2;
++ newh = (h < 2) ? 1 : h / 2;
++ newimage = malloc((neww + 4) * newh * bpp);
++ if (!newimage) {
++ return GLU_OUT_OF_MEMORY;
++ }
++
++ error = mesa_gluScaleImage(format, w, h, type, image,
++ neww, newh, type, newimage);
++ if (error) {
++ retval = error;
++ done = GL_TRUE;
++ }
++
++ if (image != data) {
++ free(image);
++ }
++ image = newimage;
++
++ w = neww;
++ h = newh;
++ level++;
++ }
++
++ if (image != data) {
++ free(image);
++ }
++
++ /* Restore original glPixelStore state */
++ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
++ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
++ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
++ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
++ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
++
++ return retval;
++}
+Index: qemu-0.12.4/target-i386/opengl_exec.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/opengl_exec.c
+@@ -0,0 +1,3931 @@
++/*
++ * Host-side implementation of GL/GLX API
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <assert.h>
++#include <string.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define GL_GLEXT_PROTOTYPES
++#define GLX_GLXEXT_PROTOTYPES
++
++#include <mesa_gl.h>
++#include <mesa_glx.h>
++
++// TODO
++typedef long unsigned int target_phys_addr_t;
++
++#include "opengl_func.h"
++
++#include "mesa_glu.h"
++#include "mesa_mipmap.c"
++
++#include "../qemu-common.h"
++
++//#define SYSTEMATIC_ERROR_CHECK
++#define BUFFER_BEGINEND
++#define glGetError() 0
++
++#define GET_EXT_PTR(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
++ assert (ptr_func_##funcname); \
++ }
++
++#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
++ }
++
++#ifndef WIN32
++#include <dlfcn.h>
++#endif
++
++static void *get_glu_ptr(const char *name)
++{
++ static void *handle = (void *) -1;
++
++ if (handle == (void *) -1) {
++#ifndef WIN32
++ handle = dlopen("libGLU.so", RTLD_LAZY);
++ if (!handle)
++ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
++#else
++ handle = (void *) LoadLibrary("glu32.dll");
++ if (!handle)
++ fprintf(stderr, "can't load glu32.dll\n");
++#endif
++ }
++ if (handle) {
++#ifndef WIN32
++ return dlsym(handle, name);
++#else
++ return GetProcAddress(handle, name);
++#endif
++ }
++ return NULL;
++}
++
++#define GET_GLU_PTR(type, funcname, args_decl) \
++ static int detect_##funcname = 0; \
++ static type(*ptr_func_##funcname)args_decl = NULL; \
++ if (detect_##funcname == 0) \
++ { \
++ detect_##funcname = 1; \
++ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
++ }
++
++int display_function_call = 0;
++
++static const int defaultAttribList[] = {
++ GLX_RGBA,
++ GLX_RED_SIZE, 1,
++ GLX_GREEN_SIZE, 1,
++ GLX_BLUE_SIZE, 1,
++ GLX_DOUBLEBUFFER,
++ None
++};
++
++static XVisualInfo *get_default_visual(Display *dpy)
++{
++ static XVisualInfo *vis = NULL;
++ XVisualInfo theTemplate;
++ int numVisuals;
++
++ if (vis)
++ return vis;
++ fprintf(stderr, "get_default_visual\n");
++ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
++ * (int*)defaultAttribList); */
++ theTemplate.screen = 0;
++ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
++
++ return vis;
++}
++
++
++static Display *parent_dpy = NULL;
++static Window qemu_parent_window = 0;
++
++static Window active_win = 0; /* FIXME */
++static int active_win_x = 0;
++static int active_win_y = 0;
++
++void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
++{
++ parent_dpy = _dpy;
++ qemu_parent_window = _parent_window;
++ if (active_win)
++ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
++ active_win_y);
++}
++
++static int local_connection = 0;
++void opengl_exec_set_local_connection()
++{
++ local_connection = 1;
++}
++
++static GLXDrawable create_window(Display *dpy, Window local_parent_window,
++ XVisualInfo *vis, const char *name,
++ int x, int y, int width, int height)
++{
++ int scrnum;
++ XSetWindowAttributes attr = { 0 };
++ unsigned long mask;
++ Window root;
++ Window win;
++
++ scrnum = DefaultScreen(dpy);
++ root = RootWindow(dpy, scrnum);
++
++ /* window attributes */
++ attr.background_pixel = 0xff000000;
++ attr.border_pixel = 0;
++ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
++ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
++ attr.save_under = True;
++ // if (local_parent_window == NULL && qemu_parent_window == NULL)
++ attr.override_redirect = True;
++ // else
++ // attr.override_redirect = True;
++ attr.cursor = None;
++ mask =
++ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
++ CWOverrideRedirect | CWSaveUnder;
++
++ if (local_parent_window)
++ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
++ vis->depth, InputOutput, vis->visual, mask, &attr);
++ else if (qemu_parent_window)
++ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
++ vis->depth, InputOutput, vis->visual, mask, &attr);
++ else
++ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
++ InputOutput, vis->visual, mask, &attr);
++
++ /* set hints and properties */
++ {
++ XSizeHints sizehints;
++
++ sizehints.x = x;
++ sizehints.y = y;
++ sizehints.width = width;
++ sizehints.height = height;
++ sizehints.flags = USSize | USPosition;
++ XSetWMNormalHints(dpy, win, &sizehints);
++ XSetStandardProperties(dpy, win, name, name, None,
++ (char **) NULL, 0, &sizehints);
++ }
++
++ XSync(dpy, 0);
++
++ /*
++ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
++ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
++ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
++ * } } */
++
++ /* TODO */
++ if (!active_win)
++ active_win = win;
++
++ return win;
++}
++
++typedef struct {
++ void *key;
++ void *value;
++} Assoc;
++
++#define MAX_HANDLED_PROCESS 100
++#define MAX_ASSOC_SIZE 100
++
++#define MAX_FBCONFIG 10
++
++#include "opengl_utils.h"
++
++#define MAX(a, b) (((a) > (b)) ? (a) : (b))
++
++
++typedef struct {
++ int x;
++ int y;
++ int width;
++ int height;
++ int map_state;
++} WindowPosStruct;
++
++typedef struct {
++ GLbitfield mask;
++ int activeTextureIndex;
++} ClientState;
++
++#define MAX_CLIENT_STATE_STACK_SIZE 16
++
++typedef struct {
++ int ref;
++ int fake_ctxt;
++ int fake_shareList;
++ GLXContext context;
++ GLXDrawable drawable;
++
++ void *vertexPointer;
++ void *normalPointer;
++ void *colorPointer;
++ void *secondaryColorPointer;
++ void *indexPointer;
++ void *texCoordPointer[NB_MAX_TEXTURES];
++ void *edgeFlagPointer;
++ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
++ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
++ void *weightPointer;
++ void *matrixIndexPointer;
++ void *fogCoordPointer;
++ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
++ void *interleavedArrays;
++ void *elementPointerATI;
++
++ int vertexPointerSize;
++ int normalPointerSize;
++ int colorPointerSize;
++ int secondaryColorPointerSize;
++ int indexPointerSize;
++ int texCoordPointerSize[NB_MAX_TEXTURES];
++ int edgeFlagPointerSize;
++ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
++ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
++ int weightPointerSize;
++ int matrixIndexPointerSize;
++ int fogCoordPointerSize;
++ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
++ int interleavedArraysSize;
++ int elementPointerATISize;
++
++ int selectBufferSize;
++ void *selectBufferPtr;
++ int feedbackBufferSize;
++ void *feedbackBufferPtr;
++
++ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
++ int clientStateSp;
++ int activeTextureIndex;
++
++ unsigned int ownTabTextures[32768];
++ unsigned int *tabTextures;
++ RangeAllocator ownTextureAllocator;
++ RangeAllocator *textureAllocator;
++
++ unsigned int ownTabBuffers[32768];
++ unsigned int *tabBuffers;
++ RangeAllocator ownBufferAllocator;
++ RangeAllocator *bufferAllocator;
++
++ unsigned int ownTabLists[32768];
++ unsigned int *tabLists;
++ RangeAllocator ownListAllocator;
++ RangeAllocator *listAllocator;
++
++#ifdef SYSTEMATIC_ERROR_CHECK
++ int last_error;
++#endif
++} GLState;
++
++typedef struct {
++ int process_id;
++ int instr_counter;
++
++ int x, y, width, height;
++ WindowPosStruct currentDrawablePos;
++
++ int next_available_context_number;
++ int next_available_pbuffer_number;
++
++ int nb_states;
++ GLState default_state;
++ GLState **glstates;
++ GLState *current_state;
++
++ int nfbconfig;
++ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
++ int fbconfigs_max[MAX_FBCONFIG];
++ int nfbconfig_total;
++
++ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
++ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
++ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
++ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
++
++ Display *dpy;
++
++ int began;
++ int primitive;
++ int bufsize;
++ int bufstart;
++ arg_t *cmdbuf;
++} ProcessStruct;
++
++static ProcessStruct processes[MAX_HANDLED_PROCESS];
++
++void init_process_tab()
++{
++ memset(processes, 0, sizeof(processes));
++}
++
++#define ARG_TO_CHAR(x) (char)(x)
++#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
++#define ARG_TO_SHORT(x) (short)(x)
++#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
++#define ARG_TO_INT(x) (int)(x)
++#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
++#define ARG_TO_FLOAT(x) (*(float*)&(x))
++#define ARG_TO_DOUBLE(x) (*(double*)(x))
++
++#include "server_stub.c"
++
++/* ---- */
++
++#ifdef BUFFER_BEGINEND
++/* A user of the following two functions must not buffer any calls that
++ * may throw an error (i.e. errors conditions must be checked before
++ * storing in the buffer) or return values. */
++static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
++{
++ arg_t *ret;
++
++ if (unlikely(process->bufstart + elems > process->bufsize)) {
++ process->bufsize = (process->bufsize ?: 0x100) << 1;
++ process->cmdbuf = qemu_realloc(process->cmdbuf,
++ process->bufsize * sizeof(arg_t));
++ }
++
++ ret = process->cmdbuf + process->bufstart;
++ process->bufstart += elems;
++ return ret;
++}
++
++static inline void cmd_buffer_replay(ProcessStruct *process)
++{
++ Signature *sig;
++ int func_number;
++ int ret_int;
++ char ret_char;
++ arg_t *call = process->cmdbuf;
++
++ while (process->bufstart) {
++ func_number = *call ++;
++ sig = (Signature *) tab_opengl_calls[func_number];
++
++ execute_func(func_number, call, &ret_int, &ret_char);
++
++ call += sig->nb_args;
++ process->bufstart -= sig->nb_args + 1;
++ }
++}
++#endif
++
++/* ---- */
++
++typedef void *ClientGLXDrawable;
++static inline ClientGLXDrawable to_drawable(arg_t arg)
++{
++#ifdef TARGET_X86_64
++ if (arg > (unsigned long) -1) {
++ fprintf(stderr, "GLXDrawable too big for this implementation\n");
++ exit(-1);
++ }
++#endif
++ return (void *) (unsigned long) arg;
++}
++
++GLXContext get_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext)
++ return (GLXContext)
++ process->association_fakecontext_glxcontext[i].value;
++
++ return NULL;
++}
++
++void set_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakecontext_glxcontext[i].key =
++ (void *) (long) fakecontext;
++ process->association_fakecontext_glxcontext[i].value =
++ (void *) glxcontext;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++void unset_association_fakecontext_glxcontext(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i++)
++ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
++ fakecontext) {
++ memmove(&process->association_fakecontext_glxcontext[i],
++ &process->association_fakecontext_glxcontext[i + 1],
++ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
++ return;
++ }
++}
++
++/* ---- */
++
++XVisualInfo *get_association_fakecontext_visual(
++ ProcessStruct *process, int fakecontext)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
++ i++)
++ if ((int) (long) process->association_fakecontext_visual[i].key ==
++ fakecontext)
++ return process->association_fakecontext_visual[i].value;
++
++ return NULL;
++}
++
++void set_association_fakecontext_visual(ProcessStruct *process,
++ int fakecontext, XVisualInfo *visual)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
++ i++)
++ if ((int) (long) process->association_fakecontext_visual[i].key ==
++ fakecontext)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakecontext_visual[i].key =
++ (void *) (long) fakecontext;
++ process->association_fakecontext_visual[i].value = (void *) visual;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++/* ---- */
++
++GLXPbuffer get_association_fakepbuffer_pbuffer(
++ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i ++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer)
++ return (GLXPbuffer)
++ process->association_fakepbuffer_pbuffer[i].value;
++
++ return 0;
++}
++
++void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
++ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
++{
++ int i;
++
++ for (i = 0;
++ i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
++ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
++ ClientGLXDrawable fakepbuffer)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i++)
++ if ((ClientGLXDrawable)
++ process->association_fakepbuffer_pbuffer[i].key ==
++ fakepbuffer) {
++ memmove(&process->association_fakepbuffer_pbuffer[i],
++ &process->association_fakepbuffer_pbuffer[i + 1],
++ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
++ return;
++ }
++}
++
++/* ---- */
++
++GLXDrawable get_association_clientdrawable_serverdrawable(
++ ProcessStruct *process, ClientGLXDrawable clientdrawable)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_clientdrawable_serverdrawable[i].key;
++ i++)
++ if ((ClientGLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].key ==
++ clientdrawable)
++ return (GLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].value;
++
++ return (GLXDrawable) 0;
++}
++
++ClientGLXDrawable get_association_serverdrawable_clientdrawable(
++ ProcessStruct *process, GLXDrawable serverdrawable)
++{
++ int i;
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_clientdrawable_serverdrawable[i].key;
++ i ++)
++ if ((GLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].value ==
++ serverdrawable)
++ return (ClientGLXDrawable)
++ process->association_clientdrawable_serverdrawable[i].key;
++
++ return NULL;
++}
++
++void set_association_clientdrawable_serverdrawable(
++ ProcessStruct *process, ClientGLXDrawable clientdrawable,
++ GLXDrawable serverdrawable)
++{
++ int i;
++
++ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
++ i ++)
++ if ((ClientGLXDrawable) process->
++ association_clientdrawable_serverdrawable[i].key ==
++ clientdrawable)
++ break;
++
++ if (i < MAX_ASSOC_SIZE) {
++ process->association_clientdrawable_serverdrawable[i].key =
++ (void *) clientdrawable;
++ process->association_clientdrawable_serverdrawable[i].value =
++ (void *) serverdrawable;
++ } else
++ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
++}
++
++static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
++{
++ XWindowAttributes window_attributes_return;
++ Window child;
++ int x, y;
++ Window root = DefaultRootWindow(dpy);
++
++ XGetWindowAttributes(dpy, win, &window_attributes_return);
++ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
++ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
++ * window_attributes_return.height); */
++ pos->x = x;
++ pos->y = y;
++ pos->width = window_attributes_return.width;
++ pos->height = window_attributes_return.height;
++ pos->map_state = window_attributes_return.map_state;
++}
++
++static int is_gl_vendor_ati(Display *dpy)
++{
++ static int is_gl_vendor_ati_flag = 0;
++ static int has_init = 0;
++
++ if (has_init == 0) {
++ has_init = 1;
++ is_gl_vendor_ati_flag =
++ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
++ }
++ return is_gl_vendor_ati_flag;
++}
++
++static int get_server_texture(ProcessStruct *process,
++ unsigned int client_texture)
++{
++ unsigned int server_texture = 0;
++
++ if (client_texture < 32768) {
++ server_texture = process->current_state->tabTextures[client_texture];
++ } else {
++ fprintf(stderr, "invalid texture name %d\n", client_texture);
++ }
++ return server_texture;
++}
++
++static int get_server_buffer(ProcessStruct *process,
++ unsigned int client_buffer)
++{
++ unsigned int server_buffer = 0;
++
++ if (client_buffer < 32768) {
++ server_buffer = process->current_state->tabBuffers[client_buffer];
++ } else {
++ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
++ }
++ return server_buffer;
++}
++
++
++static int get_server_list(ProcessStruct *process, unsigned int client_list)
++{
++ unsigned int server_list = 0;
++
++ if (client_list < 32768) {
++ server_list = process->current_state->tabLists[client_list];
++ } else {
++ fprintf(stderr, "invalid list name %d\n", client_list);
++ }
++ return server_list;
++}
++
++GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
++{
++ int i;
++ int nbtotal = 0;
++
++ for (i = 0; i < process->nfbconfig; i++) {
++ assert(client_fbconfig >= 1 + nbtotal);
++ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
++ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
++ }
++ nbtotal += process->fbconfigs_max[i];
++ }
++ return 0;
++}
++
++typedef struct {
++ int attribListLength;
++ int *attribList;
++ XVisualInfo *visInfo;
++} AssocAttribListVisual;
++
++static int nTabAssocAttribListVisual = 0;
++static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
++
++static int _compute_length_of_attrib_list_including_zero(const int *attribList,
++ int
++ booleanMustHaveValue)
++{
++ int i = 0;
++
++ while (attribList[i]) {
++ if (booleanMustHaveValue ||
++ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
++ attribList[i] == GLX_DOUBLEBUFFER ||
++ attribList[i] == GLX_STEREO)) {
++ i += 2;
++ } else {
++ i++;
++ }
++ }
++ return i + 1;
++}
++
++static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
++{
++ if (_attribList == NULL)
++ return 0;
++ int attribListLength =
++ _compute_length_of_attrib_list_including_zero(_attribList, 0);
++ int i;
++
++ int *attribList = malloc(sizeof(int) * attribListLength);
++ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
++
++ i = 0;
++ while (attribList[i]) {
++ if (!
++ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
++ attribList[i] == GLX_DOUBLEBUFFER ||
++ attribList[i] == GLX_STEREO)) {
++ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
++ && getenv("DISABLE_SAMPLE_BUFFERS")) {
++ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
++ attribList[i + 1] = 0;
++ }
++ i += 2;
++ } else {
++ i++;
++ }
++ }
++
++ for (i = 0; i < nTabAssocAttribListVisual; i++) {
++ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
++ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
++ attribListLength * sizeof(int)) == 0) {
++ free(attribList);
++ return (tabAssocAttribListVisual[i].
++ visInfo) ? tabAssocAttribListVisual[i].visInfo->
++ visualid : 0;
++ }
++ }
++ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
++
++ tabAssocAttribListVisual = realloc(
++ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
++ (nTabAssocAttribListVisual + 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
++ attribListLength;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
++ (int *) malloc(sizeof(int) * attribListLength);
++ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
++ attribList, sizeof(int) * attribListLength);
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
++ nTabAssocAttribListVisual++;
++ free(attribList);
++ return (visInfo) ? visInfo->visualid : 0;
++}
++
++static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
++ int visualid)
++{
++ int i, n;
++ XVisualInfo template;
++ XVisualInfo *visInfo;
++
++ for (i = 0; i < nTabAssocAttribListVisual; i++) {
++ if (tabAssocAttribListVisual[i].visInfo &&
++ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
++ return tabAssocAttribListVisual[i].visInfo;
++ }
++ }
++ template.visualid = visualid;
++ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
++ tabAssocAttribListVisual =
++ realloc(tabAssocAttribListVisual,
++ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
++ 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
++ nTabAssocAttribListVisual++;
++ return visInfo;
++}
++
++typedef struct {
++ int x;
++ int y;
++ int width;
++ int height;
++ int xhot;
++ int yhot;
++ int *pixels;
++} ClientCursor;
++
++#if 0
++static ClientCursor client_cursor = { 0 };
++#endif
++
++static void do_glClientActiveTextureARB(int texture)
++{
++ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
++
++ if (ptr_func_glClientActiveTextureARB) {
++ ptr_func_glClientActiveTextureARB(texture);
++ }
++}
++
++#ifdef CURSOR_TRICK
++static void do_glActiveTextureARB(int texture)
++{
++ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
++
++ if (ptr_func_glActiveTextureARB) {
++ ptr_func_glActiveTextureARB(texture);
++ }
++}
++
++static void do_glUseProgramObjectARB(GLhandleARB programObj)
++{
++ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
++
++ if (ptr_func_glUseProgramObjectARB) {
++ ptr_func_glUseProgramObjectARB(programObj);
++ }
++}
++#endif
++
++static void destroy_gl_state(GLState *state)
++{
++ int i;
++
++ if (state->vertexPointer)
++ free(state->vertexPointer);
++ if (state->normalPointer)
++ free(state->normalPointer);
++ if (state->indexPointer)
++ free(state->indexPointer);
++ if (state->colorPointer)
++ free(state->colorPointer);
++ if (state->secondaryColorPointer)
++ free(state->secondaryColorPointer);
++ for (i = 0; i < NB_MAX_TEXTURES; i++) {
++ if (state->texCoordPointer[i])
++ free(state->texCoordPointer[i]);
++ }
++ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
++ if (state->vertexAttribPointer[i])
++ free(state->vertexAttribPointer[i]);
++ }
++ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
++ if (state->vertexAttribPointerNV[i])
++ free(state->vertexAttribPointerNV[i]);
++ }
++ if (state->weightPointer)
++ free(state->weightPointer);
++ if (state->matrixIndexPointer)
++ free(state->matrixIndexPointer);
++ if (state->fogCoordPointer)
++ free(state->fogCoordPointer);
++ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
++ if (state->variantPointerEXT[i])
++ free(state->variantPointerEXT[i]);
++ }
++ if (state->interleavedArrays)
++ free(state->interleavedArrays);
++ if (state->elementPointerATI)
++ free(state->elementPointerATI);
++}
++
++static void init_gl_state(GLState *state)
++{
++ state->textureAllocator = &state->ownTextureAllocator;
++ state->tabTextures = state->ownTabTextures;
++ state->bufferAllocator = &state->ownBufferAllocator;
++ state->tabBuffers = state->ownTabBuffers;
++ state->listAllocator = &state->ownListAllocator;
++ state->tabLists = state->ownTabLists;
++}
++
++/*
++ * Translate the nth element of list from type to GLuint.
++ */
++static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
++{
++ GLbyte *bptr;
++ GLubyte *ubptr;
++ GLshort *sptr;
++ GLushort *usptr;
++ GLint *iptr;
++ GLuint *uiptr;
++ GLfloat *fptr;
++
++ switch (type) {
++ case GL_BYTE:
++ bptr = (GLbyte *) list;
++ return (GLuint) *(bptr + n);
++ case GL_UNSIGNED_BYTE:
++ ubptr = (GLubyte *) list;
++ return (GLuint) *(ubptr + n);
++ case GL_SHORT:
++ sptr = (GLshort *) list;
++ return (GLuint) *(sptr + n);
++ case GL_UNSIGNED_SHORT:
++ usptr = (GLushort *) list;
++ return (GLuint) *(usptr + n);
++ case GL_INT:
++ iptr = (GLint *) list;
++ return (GLuint) *(iptr + n);
++ case GL_UNSIGNED_INT:
++ uiptr = (GLuint *) list;
++ return (GLuint) *(uiptr + n);
++ case GL_FLOAT:
++ fptr = (GLfloat *) list;
++ return (GLuint) *(fptr + n);
++ case GL_2_BYTES:
++ ubptr = ((GLubyte *) list) + 2 * n;
++ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
++ case GL_3_BYTES:
++ ubptr = ((GLubyte *) list) + 3 * n;
++ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
++ (GLuint) *(ubptr + 2);
++ case GL_4_BYTES:
++ ubptr = ((GLubyte *) list) + 4 * n;
++ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
++ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
++ default:
++ return 0;
++ }
++}
++
++void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
++ GLXContext shareList, int fake_shareList)
++{
++ process->glstates =
++ realloc(process->glstates,
++ (process->nb_states + 1) * sizeof(GLState *));
++ process->glstates[process->nb_states] = malloc(sizeof(GLState));
++ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
++ process->glstates[process->nb_states]->ref = 1;
++ process->glstates[process->nb_states]->context = ctxt;
++ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
++ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
++ init_gl_state(process->glstates[process->nb_states]);
++ if (shareList && fake_shareList) {
++ int i;
++
++ for (i = 0; i < process->nb_states; i++) {
++ if (process->glstates[i]->fake_ctxt == fake_shareList) {
++ process->glstates[i]->ref++;
++ process->glstates[process->nb_states]->textureAllocator =
++ process->glstates[i]->textureAllocator;
++ process->glstates[process->nb_states]->tabTextures =
++ process->glstates[i]->tabTextures;
++ process->glstates[process->nb_states]->bufferAllocator =
++ process->glstates[i]->bufferAllocator;
++ process->glstates[process->nb_states]->tabBuffers =
++ process->glstates[i]->tabBuffers;
++ process->glstates[process->nb_states]->listAllocator =
++ process->glstates[i]->listAllocator;
++ process->glstates[process->nb_states]->tabLists =
++ process->glstates[i]->tabLists;
++ break;
++ }
++ }
++ }
++ process->nb_states++;
++}
++
++static ProcessStruct *process;
++
++void do_disconnect_current(void)
++{
++ int i;
++ Display *dpy = process->dpy;
++
++ glXMakeCurrent(dpy, 0, NULL);
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakecontext_glxcontext[i].key; i ++) {
++ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
++
++ fprintf(stderr, "Destroy context corresponding to fake_context"
++ " = %ld\n", (long) process->
++ association_fakecontext_glxcontext[i].key);
++ glXDestroyContext(dpy, ctxt);
++ }
++
++ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
++
++ for (i = 0; i < MAX_ASSOC_SIZE &&
++ process->association_fakepbuffer_pbuffer[i].key; i ++) {
++ GLXPbuffer pbuffer = (GLXPbuffer)
++ process->association_fakepbuffer_pbuffer[i].value;
++
++ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
++ " = %ld\n", (long) process->
++ association_fakepbuffer_pbuffer[i].key);
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
++ }
++
++ for (i = 0; i < MAX_ASSOC_SIZE && process->
++ association_clientdrawable_serverdrawable[i].key; i ++) {
++ Window win = (Window) process->
++ association_clientdrawable_serverdrawable[i].value;
++
++ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
++ "= %p\n", (int) win, process->
++ association_clientdrawable_serverdrawable[i].key);
++
++ XDestroyWindow(dpy, win);
++ if (active_win == win)
++ active_win = 0;
++
++ int loop = 1; // 1;
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case DestroyNotify:
++ {
++ if (((XDestroyWindowEvent *) &event)->window == win)
++ loop = 0;
++ break;
++ }
++ }
++ }
++ break; /* TODO */
++ }
++ }
++
++ for (i = 0; i < process->nb_states; i++) {
++ destroy_gl_state(process->glstates[i]);
++ free(process->glstates[i]);
++ }
++ destroy_gl_state(&process->default_state);
++ free(process->glstates);
++
++ if (process->cmdbuf)
++ qemu_free(process->cmdbuf);
++
++ for (i = 0; &processes[i] != process; i ++);
++ memmove(&processes[i], &processes[i + 1],
++ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
++}
++
++static const int beginend_allowed[GL_N_CALLS] = {
++#undef MAGIC_MACRO
++#define MAGIC_MACRO(name) [name ## _func] = 1,
++#include "gl_beginend.h"
++};
++
++void do_context_switch(Display *dpy, pid_t pid, int call)
++{
++ int i;
++
++ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
++ if (processes[i].process_id == pid) {
++ process = &processes[i];
++ break;
++ } else if (processes[i].process_id == 0) {
++ process = &processes[i];
++ memset(process, 0, sizeof(ProcessStruct));
++ process->process_id = pid;
++ init_gl_state(&process->default_state);
++ process->current_state = &process->default_state;
++ process->dpy = dpy;
++ break;
++ }
++ if (process == NULL) {
++ fprintf(stderr, "Too many processes !\n");
++ exit(-1);
++ }
++
++ switch (call) {
++ case _init32_func:
++ case _init64_func:
++ case _exit_process_func:
++ case glXMakeCurrent_func:
++ /* Do nothing */
++ break;
++
++ default:
++#if 0
++ glFlush();
++ glFinish();
++ glXSwapBuffers(dpy, drawable);
++ if (process->current_state == &process->default_state)
++ /* Where do commands like glViewport go when no drawable or
++ * context are current - i.e. after a call to
++ * glXMakeCurrent(dpy, 0, 0) ? */;
++ else
++#endif
++ glXMakeCurrent(dpy, process->current_state->drawable,
++ process->current_state->context);
++ }
++}
++
++int do_function_call(int func_number, arg_t *args, char *ret_string)
++{
++ char ret_char = 0;
++ int ret_int = 0;
++ const char *ret_str = NULL;
++ Display *dpy = process->dpy;
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++
++ if (parent_dpy)
++ dpy = parent_dpy;
++
++ process->instr_counter++;
++ if (display_function_call)
++ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
++ tab_opengl_calls_name[func_number]);
++
++#ifdef BUFFER_BEGINEND
++ if (process->began) {
++ /* Need to check for any errors now because later we won't have
++ * a chance to report them. */
++ if (beginend_allowed[func_number]) {
++ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
++
++ /* TODO: pointer arguments */
++ buf[0] = func_number;
++ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
++ } else if (likely(func_number == glEnd_func)) {
++ process->began = 0;
++
++ glBegin(process->primitive);
++ cmd_buffer_replay(process);
++ glEnd();
++ } else {
++ /* TODO: properly report */
++#ifdef SYSTEMATIC_ERROR_CHECK
++ process->current_state->last_error = INVALID_OPERATION;
++#endif
++ }
++
++ func_number = -1;
++ }
++#endif
++
++ switch (func_number) {
++ case -1:
++ break;
++
++ case _init_func:
++ *(int *) args[1] = 1;
++ break;
++
++ case _synchronize_func:
++ ret_int = 1;
++ break;
++
++ case _exit_process_func:
++ do_disconnect_current();
++ break;
++
++ case _changeWindowState_func:
++ {
++ ClientGLXDrawable client_drawable = to_drawable(args[0]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ (void *) client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable) {
++ if (args[1] == IsViewable) {
++ WindowPosStruct pos;
++
++ _get_window_pos(dpy, drawable, &pos);
++ if (pos.map_state != args[1]) {
++ XMapWindow(dpy, drawable);
++
++ int loop = 1; // 1;
++
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case ConfigureNotify:
++ {
++ if (((XConfigureEvent *) &event)->
++ window == drawable) {
++ loop = 0;
++ }
++ break;
++ }
++ }
++ }
++ break; /* TODO */
++ }
++ }
++ }
++ }
++
++ break;
++ }
++
++ case _moveResizeWindow_func:
++ {
++ int *params = (int *) args[1];
++ ClientGLXDrawable client_drawable = to_drawable(args[0]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ (void *) client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable) {
++ WindowPosStruct pos;
++
++ _get_window_pos(dpy, drawable, &pos);
++ if (!
++ (params[0] == pos.x && params[1] == pos.y &&
++ params[2] == pos.width && params[3] == pos.height)) {
++ int redim = !(params[2] == pos.width &&
++ params[3] == pos.height);
++ active_win_x = params[0];
++ active_win_y = params[1];
++
++ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
++ pos.x, pos.y, pos.width, pos.height);
++ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
++ params[0], params[1], params[2], params[3]);
++ XMoveResizeWindow(dpy, drawable, params[0], params[1],
++ params[2], params[3]);
++ int loop = 0; // = 1
++
++ while (loop) {
++ while (XPending(dpy) > 0) {
++ XEvent event;
++
++ XNextEvent(dpy, &event);
++ switch (event.type) {
++ case ConfigureNotify:
++ {
++ if (((XConfigureEvent *) &event)->
++ window == drawable) {
++ loop = 0;
++ }
++ break;
++ }
++ }
++ }
++ }
++ /* The window should have resized by now, but force the
++ * new size anyway. */
++ _get_window_pos(dpy, drawable, &pos);
++ pos.width = params[2];
++ pos.height = params[3];
++ process->currentDrawablePos = pos;
++ // if (getenv("FORCE_GL_VIEWPORT"))
++ if (redim)
++ glViewport(0, 0, pos.width, pos.height);
++ }
++ }
++ break;
++ }
++
++ case _send_cursor_func:
++ {
++#if 0
++ int x = args[0];
++ int y = args[1];
++ int width = args[2];
++ int height = args[3];
++ int xhot = args[4];
++ int yhot = args[5];
++ int *pixels = (int *) args[6];
++
++ client_cursor.x = x;
++ client_cursor.y = y;
++ client_cursor.width = width;
++ client_cursor.height = height;
++ client_cursor.xhot = xhot;
++ client_cursor.yhot = yhot;
++ if (pixels) {
++ client_cursor.pixels =
++ realloc(client_cursor.pixels,
++ client_cursor.width * client_cursor.height *
++ sizeof(int));
++ memcpy(client_cursor.pixels, pixels,
++ client_cursor.width * client_cursor.height *
++ sizeof(int));
++ }
++ int in_window = (x >= 0 && y >= 0 &&
++ x < process->currentDrawablePos.width &&
++ y < process->currentDrawablePos.height);
++ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
++ // "in window" : "not in window");
++#endif
++ break;
++ }
++
++#ifdef BUFFER_BEGINEND
++ case glBegin_func:
++ process->began = 1;
++ process->primitive = args[0];
++ break;
++#endif
++
++ case glXWaitGL_func:
++ {
++ glXWaitGL();
++ ret_int = 0;
++ break;
++ }
++
++ case glXWaitX_func:
++ {
++ glXWaitX();
++ ret_int = 0;
++ break;
++ }
++
++ case glXChooseVisual_func:
++ {
++ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
++ break;
++ }
++
++ case glXQueryExtensionsString_func:
++ {
++ ret_str = glXQueryExtensionsString(dpy, 0);
++ break;
++ }
++
++ case glXQueryServerString_func:
++ {
++ ret_str = glXQueryServerString(dpy, 0, args[2]);
++ break;
++ }
++
++ case glXGetClientString_func:
++ {
++ ret_str = glXGetClientString(dpy, args[1]);
++ break;
++ }
++
++ case glXGetScreenDriver_func:
++ {
++ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
++
++ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
++ break;
++ }
++
++ case glXGetDriverConfig_func:
++ {
++ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
++
++ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
++ break;
++ }
++
++ case glXCreateContext_func:
++ {
++ int visualid = (int) args[1];
++ int fake_shareList = (int) args[2];
++
++ if (1 || display_function_call)
++ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
++ fake_shareList);
++
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, fake_shareList);
++ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
++ GLXContext ctxt;
++
++ if (vis) {
++ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
++ } else {
++ vis = get_default_visual(dpy);
++ int saved_visualid = vis->visualid;
++
++ vis->visualid = visualid ?: saved_visualid;
++ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
++ vis->visualid = saved_visualid;
++ }
++
++ if (ctxt) {
++ int fake_ctxt =++ process->next_available_context_number;
++
++ set_association_fakecontext_visual(process, fake_ctxt, vis);
++ set_association_fakecontext_glxcontext(process,
++ fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++
++ _create_context(process, ctxt, fake_ctxt, shareList,
++ fake_shareList);
++ } else {
++ ret_int = 0;
++ }
++
++ break;
++ }
++
++
++ case glXCreateNewContext_func:
++ {
++ GET_EXT_PTR(GLXContext, glXCreateNewContext,
++ (Display *, GLXFBConfig, int, GLXContext, int));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ int fake_shareList = args[3];
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, fake_shareList);
++ process->next_available_context_number++;
++ int fake_ctxt = process->next_available_context_number;
++ GLXContext ctxt = ptr_func_glXCreateNewContext(
++ dpy, fbconfig, args[2], shareList, args[4]);
++ set_association_fakecontext_glxcontext(
++ process, fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++
++ _create_context(process, ctxt, fake_ctxt, shareList,
++ fake_shareList);
++ }
++ break;
++ }
++
++ case glXCopyContext_func:
++ {
++ int fake_src_ctxt = (int) args[1];
++ int fake_dst_ctxt = (int) args[2];
++ GLXContext src_ctxt;
++ GLXContext dst_ctxt;
++
++ if (display_function_call)
++ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
++ fake_src_ctxt, fake_dst_ctxt);
++
++ if (!(src_ctxt = get_association_fakecontext_glxcontext(
++ process, fake_src_ctxt)))
++ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
++ fake_src_ctxt);
++ else
++ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
++ process, fake_dst_ctxt))) {
++ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
++ fake_dst_ctxt);
++ } else
++ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
++
++ break;
++ }
++
++ case glXDestroyContext_func:
++ {
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
++
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
++ (void *) (long) fake_ctxt);
++ } else {
++ int i;
++
++ for (i = 0; i < process->nb_states; i ++) {
++ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
++ if (ctxt == process->current_state->context)
++ process->current_state = &process->default_state;
++
++ int fake_shareList =
++ process->glstates[i]->fake_shareList;
++ process->glstates[i]->ref--;
++ if (process->glstates[i]->ref == 0) {
++ fprintf(stderr,
++ "destroy_gl_state fake_ctxt = %d\n",
++ process->glstates[i]->fake_ctxt);
++ destroy_gl_state(process->glstates[i]);
++ free(process->glstates[i]);
++ memmove(&process->glstates[i],
++ &process->glstates[i + 1],
++ (process->nb_states - i - 1) *
++ sizeof(GLState *));
++ process->nb_states --;
++ }
++
++ if (fake_shareList) {
++ for (i = 0; i < process->nb_states; i++) {
++ if (process->glstates[i]->fake_ctxt ==
++ fake_shareList) {
++ process->glstates[i]->ref--;
++ if (process->glstates[i]->ref == 0) {
++ fprintf(stderr,
++ "destroy_gl_state fake_ctxt = %d\n",
++ process->glstates[i]->
++ fake_ctxt);
++ destroy_gl_state(process->
++ glstates[i]);
++ free(process->glstates[i]);
++ memmove(&process->glstates[i],
++ &process->glstates[i + 1],
++ (process->nb_states - i - 1) *
++ sizeof(GLState *));
++ process->nb_states --;
++ }
++ break;
++ }
++ }
++ }
++
++ glXDestroyContext(dpy, ctxt);
++ unset_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++
++ break;
++ }
++ }
++ }
++ break;
++ }
++
++ case glXQueryVersion_func:
++ {
++ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
++ break;
++ }
++
++ case glGetString_func:
++ {
++ ret_str = (char *) glGetString(args[0]);
++ break;
++ }
++
++ case glXMakeCurrent_func:
++ {
++ int i;
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++ GLXDrawable drawable = 0;
++ int fake_ctxt = (int) args[2];
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
++ (void *) client_drawable, fake_ctxt);
++
++ if (client_drawable == 0 && fake_ctxt == 0) {
++ ret_int = glXMakeCurrent(dpy, 0, NULL);
++ process->current_state = &process->default_state;
++ } else if ((drawable = (GLXDrawable)
++ get_association_fakepbuffer_pbuffer(
++ process, client_drawable))) {
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
++ fake_ctxt);
++ ret_int = 0;
++ } else
++ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
++ } else {
++ GLXContext ctxt = get_association_fakecontext_glxcontext(
++ process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
++ ret_int = 0;
++ } else {
++ drawable = get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (drawable == 0) {
++ XVisualInfo *vis = get_association_fakecontext_visual(
++ process, fake_ctxt);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++ /* if (local_connection) drawable = client_drawable;
++ * else */
++ {
++ if ((int) (long) client_drawable ==
++ RootWindow(dpy, 0) &&
++ local_connection) {
++ drawable = (GLXDrawable) client_drawable;
++ } else {
++ drawable = create_window(
++ dpy, local_connection ?
++ (Window) client_drawable :
++ 0, vis, "", 0, 0, 16, 16);
++ }
++ }
++ set_association_clientdrawable_serverdrawable(process,
++ client_drawable, drawable);
++ }
++
++ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
++ }
++ }
++
++ if (ret_int) {
++ for (i = 0; i < process->nb_states; i ++) {
++ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
++ /* HACK !!! REMOVE */
++ process->current_state = process->glstates[i];
++ process->current_state->drawable = drawable;
++ break;
++ }
++ }
++
++ if (i == process->nb_states) {
++ fprintf(stderr, "error remembering the new context\n");
++ exit(-1);
++ }
++ }
++ break;
++ }
++
++ case glXSwapBuffers_func:
++ {
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n", client_drawable);
++
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++ if (!drawable) {
++ fprintf(stderr, "unknown client_drawable (%p) !\n",
++ (void *) client_drawable);
++ } else {
++#ifdef CURSOR_TRICK
++ if (client_cursor.pixels && local_connection == 0) {
++ glPushAttrib(GL_ALL_ATTRIB_BITS);
++ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
++
++ glMatrixMode(GL_PROJECTION);
++ glPushMatrix();
++ glLoadIdentity();
++ glOrtho(0, process->currentDrawablePos.width,
++ process->currentDrawablePos.height, 0, -1, 1);
++ glMatrixMode(GL_MODELVIEW);
++ glPushMatrix();
++ glLoadIdentity();
++ glPixelZoom(1, -1);
++
++ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
++ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
++ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
++ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
++ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
++ glShadeModel(GL_SMOOTH);
++
++ glEnable(GL_BLEND);
++ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
++ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
++
++ int i, numUnits;
++
++ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
++ for (i = 0; i < numUnits; i++) {
++ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
++ glDisable(GL_TEXTURE_1D);
++ glDisable(GL_TEXTURE_2D);
++ glDisable(GL_TEXTURE_3D);
++ }
++ glDisable(GL_ALPHA_TEST);
++ glDisable(GL_DEPTH_TEST);
++ glDisable(GL_STENCIL_TEST);
++ glDisable(GL_SCISSOR_TEST);
++ glDisable(GL_FRAGMENT_PROGRAM_ARB);
++ glDisable(GL_VERTEX_PROGRAM_ARB);
++ do_glUseProgramObjectARB(0);
++
++ // memset(client_cursor.pixels, 255, client_cursor.width
++ // * client_cursor.height * sizeof(int));
++
++ glRasterPos2d(client_cursor.x - client_cursor.xhot,
++ client_cursor.y - client_cursor.yhot);
++ glDrawPixels(client_cursor.width, client_cursor.height,
++ GL_BGRA, GL_UNSIGNED_BYTE,
++ client_cursor.pixels);
++
++ glMatrixMode(GL_MODELVIEW);
++ glPopMatrix();
++
++ glMatrixMode(GL_PROJECTION);
++ glPopMatrix();
++
++ glPopClientAttrib();
++ glPopAttrib();
++ }
++#endif
++
++ ////////// HORRIBLE HORRIBLE HACK
++ if (drawable != active_win && active_win) {
++ glXMakeCurrent(dpy, active_win,
++ processes[0].current_state->context);
++ glXSwapBuffers(dpy, active_win);
++ glXMakeCurrent(dpy, process->current_state->drawable,
++ process->current_state->context);
++ }
++ glXSwapBuffers(dpy, drawable);
++ }
++ break;
++ }
++
++ case glXIsDirect_func:
++ {
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
++ GLXContext ctxt =
++ get_association_fakecontext_glxcontext(process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
++ ret_char = False;
++ } else {
++ ret_char = glXIsDirect(dpy, ctxt);
++ }
++ break;
++ }
++
++ case glXGetConfig_func:
++ {
++ int visualid = args[1];
++ XVisualInfo *vis = NULL;
++
++ if (visualid)
++ vis = get_visual_info_from_visual_id(dpy, visualid);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
++ break;
++ }
++
++ case glXGetConfig_extended_func:
++ {
++ int visualid = args[1];
++ int n = args[2];
++ int i;
++ XVisualInfo *vis = NULL;
++ int *attribs = (int *) args[3];
++ int *values = (int *) args[4];
++ int *res = (int *) args[5];
++
++ if (visualid)
++ vis = get_visual_info_from_visual_id(dpy, visualid);
++ if (vis == NULL)
++ vis = get_default_visual(dpy);
++
++ for (i = 0; i < n; i++) {
++ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
++ }
++ break;
++ }
++
++ case glXUseXFont_func:
++ {
++ /* implementation is client-side only :-) */
++ break;
++ }
++
++ case glXQueryExtension_func:
++ {
++ ret_int =
++ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
++ break;
++ }
++
++ case glXChooseFBConfig_func:
++ {
++ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
++ (Display *, int, int *, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[3] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfig *fbconfigs =
++ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
++ (int *) args[3]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[3];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXChooseFBConfigSGIX_func:
++ {
++ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
++ (Display *, int, int *, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[3] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfigSGIX *fbconfigs =
++ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
++ (int *) args[2],
++ (int *) args[3]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[3];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXGetFBConfigs_func:
++ {
++ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
++ (Display *, int, int *));
++ if (process->nfbconfig == MAX_FBCONFIG) {
++ *(int *) args[2] = 0;
++ ret_int = 0;
++ } else {
++ GLXFBConfig *fbconfigs =
++ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
++ if (fbconfigs) {
++ process->fbconfigs[process->nfbconfig] = fbconfigs;
++ process->fbconfigs_max[process->nfbconfig] =
++ *(int *) args[2];
++ process->nfbconfig++;
++ ret_int = 1 + process->nfbconfig_total;
++ process->nfbconfig_total +=
++ process->fbconfigs_max[process->nfbconfig];
++ } else {
++ ret_int = 0;
++ }
++ }
++ break;
++ }
++
++ case glXCreatePbuffer_func:
++ {
++ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
++ (Display *, GLXFBConfig, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXPbuffer pbuffer =
++ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
++ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
++ if (pbuffer) {
++ ClientGLXDrawable fake_pbuffer = to_drawable(
++ ++ process->next_available_pbuffer_number);
++
++ set_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer, pbuffer);
++ fprintf(stderr,
++ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
++ fake_pbuffer, (int) (long) pbuffer);
++ ret_int = (int) (long) fake_pbuffer;
++ }
++ }
++ break;
++ }
++
++ case glXCreateGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
++ (Display *, GLXFBConfig, int, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
++ dpy, fbconfig,
++ args[2], args[3], (int *) args[4]);
++ if (pbuffer) {
++ ClientGLXDrawable fake_pbuffer = to_drawable(
++ ++ process->next_available_pbuffer_number);
++
++ set_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer, pbuffer);
++ ret_int = (int) (long) fake_pbuffer;
++ }
++ }
++ break;
++ }
++
++ case glXDestroyPbuffer_func:
++ {
++ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
++ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
++ }
++ break;
++ }
++
++ case glXDestroyGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
++ (Display *, GLXPbuffer));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ if (!is_gl_vendor_ati(dpy))
++ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
++ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
++ }
++ break;
++ }
++
++ case glXBindTexImageATI_func:
++ {
++ GET_EXT_PTR(void, glXBindTexImageATI,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n",
++ fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ } else {
++ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXReleaseTexImageATI_func:
++ {
++ GET_EXT_PTR(void, glXReleaseTexImageATI,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%d\n",
++ (int) (long) fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
++ (int) (long) fake_pbuffer);
++ } else {
++ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXBindTexImageARB_func:
++ {
++ GET_EXT_PTR(Bool, glXBindTexImageARB,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ ret_int = 0;
++ } else {
++ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXReleaseTexImageARB_func:
++ {
++ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
++ (Display *, GLXPbuffer, int));
++ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
++
++ if (display_function_call)
++ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
++
++ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
++ process, fake_pbuffer);
++ if (pbuffer == 0) {
++ fprintf(stderr,
++ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
++ fake_pbuffer);
++ ret_int = 0;
++ } else {
++ ret_int =
++ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
++ }
++ break;
++ }
++
++ case glXGetFBConfigAttrib_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttrib,
++ (Display *, GLXFBConfig, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int =
++ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
++ (int *) args[3]);
++ break;
++ }
++
++ case glXGetFBConfigAttrib_extended_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttrib,
++ (Display *, GLXFBConfig, int, int *));
++ int client_fbconfig = args[1];
++ int n = args[2];
++ int i;
++ int *attribs = (int *) args[3];
++ int *values = (int *) args[4];
++ int *res = (int *) args[5];
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ for (i = 0; i < n; i++) {
++ if (fbconfig) {
++ res[i] =
++ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
++ attribs[i], &values[i]);
++ } else {
++ res[i] = 0;
++ }
++ }
++ break;
++ }
++
++ case glXGetFBConfigAttribSGIX_func:
++ {
++ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
++ (Display *, GLXFBConfigSGIX, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int =
++ ptr_func_glXGetFBConfigAttribSGIX(dpy,
++ (GLXFBConfigSGIX)
++ fbconfig, args[2],
++ (int *) args[3]);
++ break;
++ }
++
++ case glXQueryContext_func:
++ {
++ GET_EXT_PTR(int, glXQueryContext,
++ (Display *, GLXContext, int, int *));
++ int fake_ctxt = (int) args[1];
++
++ if (display_function_call)
++ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
++ GLXContext ctxt =
++ get_association_fakecontext_glxcontext(process, fake_ctxt);
++ if (ctxt == NULL) {
++ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
++ ret_int = 0;
++ } else {
++ ret_int =
++ ptr_func_glXQueryContext(dpy, ctxt, args[2],
++ (int *) args[3]);
++ }
++ break;
++ }
++
++ case glXQueryDrawable_func:
++ {
++ GET_EXT_PTR(void, glXQueryDrawable,
++ (Display *, GLXDrawable, int, int *));
++ ClientGLXDrawable client_drawable = to_drawable(args[1]);
++ GLXDrawable drawable =
++ get_association_clientdrawable_serverdrawable(
++ process, client_drawable);
++
++ if (display_function_call)
++ fprintf(stderr, "client_drawable=%p\n",
++ client_drawable);
++
++ if (!drawable)
++ fprintf(stderr, "invalid client_drawable (%p) !\n",
++ client_drawable);
++ else
++ ptr_func_glXQueryDrawable(dpy, drawable,
++ args[2], (int *) args[3]);
++
++ break;
++ }
++
++ case glXQueryGLXPbufferSGIX_func:
++ {
++ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
++ (Display *, GLXFBConfigSGIX, int, int *));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig)
++ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
++ (GLXFBConfigSGIX) fbconfig,
++ args[2], (int *) args[3]);
++ break;
++ }
++
++ case glXCreateContextWithConfigSGIX_func:
++ {
++ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
++ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ GLXContext shareList = get_association_fakecontext_glxcontext(
++ process, (int) args[3]);
++ process->next_available_context_number++;
++ int fake_ctxt = process->next_available_context_number;
++ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
++ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
++ shareList, args[4]);
++ set_association_fakecontext_glxcontext(
++ process, fake_ctxt, ctxt);
++ ret_int = fake_ctxt;
++ }
++ break;
++ }
++
++ case glXGetVisualFromFBConfig_func:
++ {
++ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
++ (Display *, GLXFBConfig));
++ int client_fbconfig = args[1];
++
++ ret_int = 0;
++ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
++
++ if (fbconfig) {
++ XVisualInfo *vis =
++ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
++ ret_int = (vis) ? vis->visualid : 0;
++ if (vis) {
++ tabAssocAttribListVisual =
++ realloc(tabAssocAttribListVisual,
++ sizeof(AssocAttribListVisual) *
++ (nTabAssocAttribListVisual + 1));
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ attribListLength = 0;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ attribList = NULL;
++ tabAssocAttribListVisual[nTabAssocAttribListVisual].
++ visInfo = vis;
++ nTabAssocAttribListVisual++;
++ }
++ if (display_function_call)
++ fprintf(stderr, "visualid = %d\n", ret_int);
++ }
++ break;
++ }
++
++ case glXSwapIntervalSGI_func:
++ {
++ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
++
++ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
++ break;
++ }
++
++ case glXGetProcAddress_fake_func:
++ {
++ if (display_function_call)
++ fprintf(stderr, "%s\n", (char *) args[0]);
++ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
++ break;
++ }
++
++ case glXGetProcAddress_global_fake_func:
++ {
++ int nbElts = args[0];
++ char *huge_buffer = (char *) args[1];
++ char *result = (char *) args[2];
++ int i;
++
++ for (i = 0; i < nbElts; i++) {
++ int len = strlen(huge_buffer);
++
++ result[i] =
++ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
++ NULL;
++ huge_buffer += len + 1;
++ }
++ break;
++ }
++
++/* Begin of texture stuff */
++ case glBindTexture_func:
++ case glBindTextureEXT_func:
++ {
++ int target = args[0];
++ unsigned int client_texture = args[1];
++ unsigned int server_texture;
++
++ if (client_texture == 0) {
++ glBindTexture(target, 0);
++ } else {
++ alloc_value(process->current_state->textureAllocator,
++ client_texture);
++ server_texture =
++ process->current_state->tabTextures[client_texture];
++ if (server_texture == 0) {
++ glGenTextures(1, &server_texture);
++ process->current_state->tabTextures[client_texture] =
++ server_texture;
++ }
++ glBindTexture(target, server_texture);
++ }
++ break;
++ }
++
++ case glGenTextures_fake_func:
++ {
++ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabTextures = malloc(n * sizeof(int));
++ unsigned int *serverTabTextures = malloc(n * sizeof(int));
++
++ alloc_range(process->current_state->textureAllocator, n,
++ clientTabTextures);
++
++ ptr_func_glGenTextures(n, serverTabTextures);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabTextures[clientTabTextures[i]] =
++ serverTabTextures[i];
++ }
++
++ free(clientTabTextures);
++ free(serverTabTextures);
++ break;
++ }
++
++
++ case glDeleteTextures_func:
++ {
++ GET_EXT_PTR(void, glDeleteTextures,
++ (GLsizei n, const GLuint *textures));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabTextures = (unsigned int *) args[1];
++
++ delete_range(process->current_state->textureAllocator, n,
++ clientTabTextures);
++
++ unsigned int *serverTabTextures = malloc(n * sizeof(int));
++
++ for (i = 0; i < n; i++) {
++ serverTabTextures[i] =
++ get_server_texture(process, clientTabTextures[i]);
++ }
++ ptr_func_glDeleteTextures(n, serverTabTextures);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabTextures[clientTabTextures[i]] = 0;
++ }
++ free(serverTabTextures);
++ break;
++ }
++
++ case glPrioritizeTextures_func:
++ {
++ GET_EXT_PTR(void, glPrioritizeTextures,
++ (GLsizei n, const GLuint *textures,
++ const GLclampf *priorities));
++
++ int i;
++ int n = args[0];
++ unsigned int *textures = (unsigned int *) args[1];
++
++ for (i = 0; i < n; i++) {
++ textures[i] = get_server_texture(process, textures[i]);
++ }
++ ptr_func_glPrioritizeTextures(n, textures,
++ (const GLclampf *) args[2]);
++ break;
++ }
++
++ case glAreTexturesResident_func:
++ {
++ GET_EXT_PTR(void, glAreTexturesResident,
++ (GLsizei n, const GLuint *textures,
++ GLboolean *residences));
++ int i;
++ int n = args[0];
++ unsigned int *textures = (unsigned int *) args[1];
++
++ for (i = 0; i < n; i++) {
++ textures[i] = get_server_texture(process, textures[i]);
++ }
++ ptr_func_glAreTexturesResident(n, textures,
++ (GLboolean *) args[2]);
++ break;
++ }
++
++ case glIsTexture_func:
++ case glIsTextureEXT_func:
++ {
++ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
++ unsigned int client_texture = args[0];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ret_char = ptr_func_glIsTexture(server_texture);
++ else
++ ret_char = 0;
++ break;
++ }
++
++ case glFramebufferTexture1DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
++ (int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
++ server_texture, args[4]);
++ break;
++ }
++
++ case glFramebufferTexture2DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
++ (int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
++ server_texture, args[4]);
++ break;
++ }
++
++ case glFramebufferTexture3DEXT_func:
++ {
++ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
++ (int, int, int, int, int, int));
++ unsigned int client_texture = args[3];
++ unsigned int server_texture =
++ get_server_texture(process, client_texture);
++ if (server_texture)
++ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
++ server_texture, args[4],
++ args[5]);
++ break;
++ }
++/* End of texture stuff */
++
++/* Begin of list stuff */
++ case glIsList_func:
++ {
++ unsigned int client_list = args[0];
++ unsigned int server_list = get_server_list(process, client_list);
++
++ if (server_list)
++ ret_char = glIsList(server_list);
++ else
++ ret_char = 0;
++ break;
++ }
++
++ case glDeleteLists_func:
++ {
++ int i;
++ unsigned int first_client = args[0];
++ int n = args[1];
++
++ unsigned int first_server =
++ get_server_list(process, first_client);
++ for (i = 0; i < n; i++) {
++ if (get_server_list(process, first_client + i) !=
++ first_server + i)
++ break;
++ }
++ if (i == n) {
++ glDeleteLists(first_server, n);
++ } else {
++ for (i = 0; i < n; i++) {
++ glDeleteLists(get_server_list(process, first_client + i),
++ 1);
++ }
++ }
++
++ for (i = 0; i < n; i++) {
++ process->current_state->tabLists[first_client + i] = 0;
++ }
++ delete_consecutive_values(process->current_state->listAllocator,
++ first_client, n);
++ break;
++ }
++
++ case glGenLists_fake_func:
++ {
++ int i;
++ int n = args[0];
++ unsigned int server_first = glGenLists(n);
++
++ if (server_first) {
++ unsigned int client_first =
++ alloc_range(process->current_state->listAllocator, n,
++ NULL);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabLists[client_first + i] =
++ server_first + i;
++ }
++ }
++ break;
++ }
++
++ case glNewList_func:
++ {
++ unsigned int client_list = args[0];
++ int mode = args[1];
++
++ alloc_value(process->current_state->listAllocator, client_list);
++ unsigned int server_list = get_server_list(process, client_list);
++
++ if (server_list == 0) {
++ server_list = glGenLists(1);
++ process->current_state->tabLists[client_list] = server_list;
++ }
++ glNewList(server_list, mode);
++ break;
++ }
++
++ case glCallList_func:
++ {
++ unsigned int client_list = args[0];
++ unsigned int server_list = get_server_list(process, client_list);
++
++ glCallList(server_list);
++ break;
++ }
++
++ case glCallLists_func:
++ {
++ int i;
++ int n = args[0];
++ int type = args[1];
++ const GLvoid *lists = (const GLvoid *) args[2];
++ int *new_lists = malloc(sizeof(int) * n);
++
++ for (i = 0; i < n; i++) {
++ new_lists[i] =
++ get_server_list(process, translate_id(i, type, lists));
++ }
++ glCallLists(n, GL_UNSIGNED_INT, new_lists);
++ free(new_lists);
++ break;
++ }
++
++
++/* End of list stuff */
++
++/* Begin of buffer stuff */
++ case glBindBufferARB_func:
++ {
++ GET_EXT_PTR(void, glBindBufferARB, (int, int));
++ int target = args[0];
++ unsigned int client_buffer = args[1];
++ unsigned int server_buffer;
++
++ if (client_buffer == 0) {
++ ptr_func_glBindBufferARB(target, 0);
++ } else {
++ server_buffer = get_server_buffer(process, client_buffer);
++ ptr_func_glBindBufferARB(target, server_buffer);
++ }
++ break;
++ }
++
++ case glGenBuffersARB_fake_func:
++ {
++ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
++ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
++
++ alloc_range(process->current_state->bufferAllocator, n,
++ clientTabBuffers);
++
++ ptr_func_glGenBuffersARB(n, serverTabBuffers);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabBuffers[clientTabBuffers[i]] =
++ serverTabBuffers[i];
++ }
++
++ free(clientTabBuffers);
++ free(serverTabBuffers);
++ break;
++ }
++
++
++ case glDeleteBuffersARB_func:
++ {
++ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
++ int i;
++ int n = args[0];
++ unsigned int *clientTabBuffers = (unsigned int *) args[1];
++
++ delete_range(process->current_state->bufferAllocator, n,
++ clientTabBuffers);
++
++ int *serverTabBuffers = malloc(n * sizeof(int));
++
++ for (i = 0; i < n; i++) {
++ serverTabBuffers[i] =
++ get_server_buffer(process, clientTabBuffers[i]);
++ }
++ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
++ for (i = 0; i < n; i++) {
++ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
++ }
++ free(serverTabBuffers);
++ break;
++ }
++
++ case glIsBufferARB_func:
++ {
++ GET_EXT_PTR(int, glIsBufferARB, (int));
++ unsigned int client_buffer = args[0];
++ unsigned int server_buffer =
++ get_server_buffer(process, client_buffer);
++ if (server_buffer)
++ ret_int = ptr_func_glIsBufferARB(server_buffer);
++ else
++ ret_int = 0;
++ break;
++ }
++
++/* End of buffer stuff */
++
++ case glShaderSourceARB_fake_func:
++ {
++ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
++ int size = args[1];
++ int i;
++ int acc_length = 0;
++ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
++ int *tab_length = (int *) args[3];
++
++ for (i = 0; i < size; i++) {
++ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
++ acc_length += tab_length[i];
++ }
++ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
++ tab_length);
++ free(tab_prog);
++ break;
++ }
++
++ case glShaderSource_fake_func:
++ {
++ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
++ int size = args[1];
++ int i;
++ int acc_length = 0;
++ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
++ int *tab_length = (int *) args[3];
++
++ for (i = 0; i < size; i++) {
++ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
++ acc_length += tab_length[i];
++ }
++ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
++ free(tab_prog);
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ {
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
++ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
++ glVertexPointer(size, type, stride,
++ process->current_state->vertexPointer);
++ break;
++ }
++
++ case glNormalPointer_fake_func:
++ {
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->normalPointerSize =
++ MAX(process->current_state->normalPointerSize,
++ offset + bytes_size);
++ process->current_state->normalPointer =
++ realloc(process->current_state->normalPointer,
++ process->current_state->normalPointerSize);
++ memcpy(process->current_state->normalPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
++ // byte_size=%d\n", type, stride, bytes_size);
++ glNormalPointer(type, stride,
++ process->current_state->normalPointer);
++ break;
++ }
++
++ case glIndexPointer_fake_func:
++ {
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->indexPointerSize =
++ MAX(process->current_state->indexPointerSize,
++ offset + bytes_size);
++ process->current_state->indexPointer =
++ realloc(process->current_state->indexPointer,
++ process->current_state->indexPointerSize);
++ memcpy(process->current_state->indexPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
++ // byte_size=%d\n", type, stride, bytes_size);
++ glIndexPointer(type, stride,
++ process->current_state->indexPointer);
++ break;
++ }
++
++ case glEdgeFlagPointer_fake_func:
++ {
++ int offset = args[0];
++ int stride = args[1];
++ int bytes_size = args[2];
++
++ process->current_state->edgeFlagPointerSize =
++ MAX(process->current_state->edgeFlagPointerSize,
++ offset + bytes_size);
++ process->current_state->edgeFlagPointer =
++ realloc(process->current_state->edgeFlagPointer,
++ process->current_state->edgeFlagPointerSize);
++ memcpy(process->current_state->edgeFlagPointer + offset,
++ (void *) args[3], bytes_size);
++ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
++ // bytes_size=%d\n", stride, bytes_size);
++ glEdgeFlagPointer(stride,
++ process->current_state->edgeFlagPointer);
++ break;
++ }
++
++ case glVertexAttribPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerARB,
++ (int, int, int, int, int, void *));
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int normalized = args[4];
++ int stride = args[5];
++ int bytes_size = args[6];
++
++ process->current_state->vertexAttribPointerSize[index] =
++ MAX(process->current_state->vertexAttribPointerSize[index],
++ offset + bytes_size);
++ process->current_state->vertexAttribPointer[index] =
++ realloc(process->current_state->vertexAttribPointer[index],
++ process->current_state->
++ vertexAttribPointerSize[index]);
++ memcpy(process->current_state->vertexAttribPointer[index] +
++ offset, (void *) args[7], bytes_size);
++ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
++ stride,
++ process->current_state->
++ vertexAttribPointer[index]);
++ break;
++ }
++
++ case glVertexAttribPointerNV_fake_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerNV,
++ (int, int, int, int, void *));
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int stride = args[4];
++ int bytes_size = args[5];
++
++ process->current_state->vertexAttribPointerNVSize[index] =
++ MAX(process->current_state->vertexAttribPointerNVSize[index],
++ offset + bytes_size);
++ process->current_state->vertexAttribPointerNV[index] =
++ realloc(process->current_state->vertexAttribPointerNV[index],
++ process->current_state->
++ vertexAttribPointerNVSize[index]);
++ memcpy(process->current_state->vertexAttribPointerNV[index] +
++ offset, (void *) args[6], bytes_size);
++ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
++ process->current_state->
++ vertexAttribPointerNV[index]);
++ break;
++ }
++
++ case glColorPointer_fake_func:
++ {
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->colorPointerSize =
++ MAX(process->current_state->colorPointerSize,
++ offset + bytes_size);
++ process->current_state->colorPointer =
++ realloc(process->current_state->colorPointer,
++ process->current_state->colorPointerSize);
++ memcpy(process->current_state->colorPointer + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
++ // bytes_size);
++ glColorPointer(size, type, stride,
++ process->current_state->colorPointer);
++
++ break;
++ }
++
++ case glSecondaryColorPointer_fake_func:
++ {
++ GET_EXT_PTR(void, glSecondaryColorPointer,
++ (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->secondaryColorPointerSize =
++ MAX(process->current_state->secondaryColorPointerSize,
++ offset + bytes_size);
++ process->current_state->secondaryColorPointer =
++ realloc(process->current_state->secondaryColorPointer,
++ process->current_state->secondaryColorPointerSize);
++ memcpy(process->current_state->secondaryColorPointer + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
++ // = %d\n", bytes_size);
++ ptr_func_glSecondaryColorPointer(size, type, stride,
++ process->current_state->
++ secondaryColorPointer);
++
++ break;
++ }
++
++ case glPushClientAttrib_func:
++ {
++ int mask = args[0];
++
++ if (process->current_state->clientStateSp <
++ MAX_CLIENT_STATE_STACK_SIZE) {
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].mask =
++ mask;
++ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].
++ activeTextureIndex =
++ process->current_state->activeTextureIndex;
++ }
++ process->current_state->clientStateSp++;
++ }
++ glPushClientAttrib(mask);
++ break;
++ }
++
++ case glPopClientAttrib_func:
++ {
++ if (process->current_state->clientStateSp > 0) {
++ process->current_state->clientStateSp--;
++ if (process->current_state->
++ clientStateStack[process->current_state->clientStateSp].
++ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
++ process->current_state->activeTextureIndex =
++ process->current_state->clientStateStack[process->
++ current_state->
++ clientStateSp].
++ activeTextureIndex;
++ }
++ }
++ glPopClientAttrib();
++ break;
++ }
++
++ case glClientActiveTexture_func:
++ case glClientActiveTextureARB_func:
++ {
++ int activeTexture = args[0];
++
++ process->current_state->activeTextureIndex =
++ activeTexture - GL_TEXTURE0_ARB;
++ do_glClientActiveTextureARB(activeTexture);
++ break;
++ }
++
++ case glTexCoordPointer_fake_func:
++ {
++ int offset = args[0];
++ int index = args[1];
++ int size = args[2];
++ int type = args[3];
++ int stride = args[4];
++ int bytes_size = args[5];
++
++ process->current_state->texCoordPointerSize[index] =
++ MAX(process->current_state->texCoordPointerSize[index],
++ offset + bytes_size);
++ process->current_state->texCoordPointer[index] =
++ realloc(process->current_state->texCoordPointer[index],
++ process->current_state->texCoordPointerSize[index]);
++ memcpy(process->current_state->texCoordPointer[index] + offset,
++ (void *) args[6], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
++ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[index]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glWeightPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->weightPointerSize =
++ MAX(process->current_state->weightPointerSize,
++ offset + bytes_size);
++ process->current_state->weightPointer =
++ realloc(process->current_state->weightPointer,
++ process->current_state->weightPointerSize);
++ memcpy(process->current_state->weightPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ ptr_func_glWeightPointerARB(size, type, stride,
++ process->current_state->
++ weightPointer);
++ break;
++ }
++
++ case glMatrixIndexPointerARB_fake_func:
++ {
++ GET_EXT_PTR(void, glMatrixIndexPointerARB,
++ (int, int, int, void *));
++ int offset = args[0];
++ int size = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->matrixIndexPointerSize =
++ MAX(process->current_state->matrixIndexPointerSize,
++ offset + bytes_size);
++ process->current_state->matrixIndexPointer =
++ realloc(process->current_state->matrixIndexPointer,
++ process->current_state->matrixIndexPointerSize);
++ memcpy(process->current_state->matrixIndexPointer + offset,
++ (void *) args[5], bytes_size);
++ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ ptr_func_glMatrixIndexPointerARB(size, type, stride,
++ process->current_state->
++ matrixIndexPointer);
++ break;
++ }
++
++ case glFogCoordPointer_fake_func:
++ {
++ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
++ int offset = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->fogCoordPointerSize =
++ MAX(process->current_state->fogCoordPointerSize,
++ offset + bytes_size);
++ process->current_state->fogCoordPointer =
++ realloc(process->current_state->fogCoordPointer,
++ process->current_state->fogCoordPointerSize);
++ memcpy(process->current_state->fogCoordPointer + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
++ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
++ ptr_func_glFogCoordPointer(type, stride,
++ process->current_state->
++ fogCoordPointer);
++ break;
++ }
++
++ case glVariantPointerEXT_fake_func:
++ {
++ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
++ int offset = args[0];
++ int id = args[1];
++ int type = args[2];
++ int stride = args[3];
++ int bytes_size = args[4];
++
++ process->current_state->variantPointerEXTSize[id] =
++ MAX(process->current_state->variantPointerEXTSize[id],
++ offset + bytes_size);
++ process->current_state->variantPointerEXT[id] =
++ realloc(process->current_state->variantPointerEXT[id],
++ process->current_state->variantPointerEXTSize[id]);
++ memcpy(process->current_state->variantPointerEXT[id] + offset,
++ (void *) args[5], bytes_size);
++ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
++ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
++ ptr_func_glVariantPointerEXT(id, type, stride,
++ process->current_state->
++ variantPointerEXT[id]);
++ break;
++ }
++
++ case glInterleavedArrays_fake_func:
++ {
++ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
++ int offset = args[0];
++ int format = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->interleavedArraysSize =
++ MAX(process->current_state->interleavedArraysSize,
++ offset + bytes_size);
++ process->current_state->interleavedArrays =
++ realloc(process->current_state->interleavedArrays,
++ process->current_state->interleavedArraysSize);
++ memcpy(process->current_state->interleavedArrays + offset,
++ (void *) args[4], bytes_size);
++ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
++ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
++ ptr_func_glInterleavedArrays(format, stride,
++ process->current_state->
++ interleavedArrays);
++ break;
++ }
++
++ case glElementPointerATI_fake_func:
++ {
++ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
++ int type = args[0];
++ int bytes_size = args[1];
++
++ process->current_state->elementPointerATISize = bytes_size;
++ process->current_state->elementPointerATI =
++ realloc(process->current_state->elementPointerATI,
++ process->current_state->elementPointerATISize);
++ memcpy(process->current_state->elementPointerATI,
++ (void *) args[2], bytes_size);
++ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
++ // byte_size=%d\n", type, bytes_size);
++ ptr_func_glElementPointerATI(type,
++ process->current_state->
++ elementPointerATI);
++ break;
++ }
++
++ case glTexCoordPointer01_fake_func:
++ {
++ int size = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->texCoordPointerSize[0] = bytes_size;
++ process->current_state->texCoordPointer[0] =
++ realloc(process->current_state->texCoordPointer[0],
++ bytes_size);
++ memcpy(process->current_state->texCoordPointer[0],
++ (void *) args[4], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glTexCoordPointer012_fake_func:
++ {
++ int size = args[0];
++ int type = args[1];
++ int stride = args[2];
++ int bytes_size = args[3];
++
++ process->current_state->texCoordPointerSize[0] = bytes_size;
++ process->current_state->texCoordPointer[0] =
++ realloc(process->current_state->texCoordPointer[0],
++ bytes_size);
++ memcpy(process->current_state->texCoordPointer[0],
++ (void *) args[4], bytes_size);
++ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
++ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
++ * bytes_size); */
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(size, type, stride,
++ process->current_state->texCoordPointer[0]);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexAndNormalPointer_fake_func:
++ {
++ int vertexPointerSize = args[0];
++ int vertexPointerType = args[1];
++ int vertexPointerStride = args[2];
++ int normalPointerType = args[3];
++ int normalPointerStride = args[4];
++ int bytes_size = args[5];
++ void *ptr = (void *) args[6];
++
++ process->current_state->vertexPointerSize = bytes_size;
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer, bytes_size);
++ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType,
++ vertexPointerStride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, normalPointerStride,
++ process->current_state->vertexPointer);
++ break;
++ }
++
++ case glVertexNormalPointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ break;
++ }
++
++ case glTuxRacerDrawElements_fake_func:
++ {
++ int mode = args[0];
++ int count = args[1];
++ int isColorEnabled = args[2];
++ void *ptr = (void *) args[3];
++ int stride =
++ 6 * sizeof(float) +
++ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
++ glVertexPointer(3, GL_FLOAT, stride, ptr);
++ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
++ if (isColorEnabled)
++ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
++ ptr + 6 * sizeof(float));
++ glDrawArrays(mode, 0, count);
++ break;
++ }
++
++ case glVertexNormalColorPointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ break;
++ }
++
++ case glVertexColorTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int texCoord2PointerOffset = args[i++];
++ int texCoord2PointerSize = args[i++];
++ int texCoord2PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord2PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
++ {
++ int i = 0;
++ int offset = args[i++];
++ int vertexPointerSize = args[i++];
++ int vertexPointerType = args[i++];
++ int stride = args[i++];
++ int normalPointerOffset = args[i++];
++ int normalPointerType = args[i++];
++ int colorPointerOffset = args[i++];
++ int colorPointerSize = args[i++];
++ int colorPointerType = args[i++];
++ int texCoord0PointerOffset = args[i++];
++ int texCoord0PointerSize = args[i++];
++ int texCoord0PointerType = args[i++];
++ int texCoord1PointerOffset = args[i++];
++ int texCoord1PointerSize = args[i++];
++ int texCoord1PointerType = args[i++];
++ int texCoord2PointerOffset = args[i++];
++ int texCoord2PointerSize = args[i++];
++ int texCoord2PointerType = args[i++];
++ int bytes_size = args[i++];
++ void *ptr = (void *) args[i++];
++
++ process->current_state->vertexPointerSize =
++ MAX(process->current_state->vertexPointerSize,
++ offset + bytes_size);
++ process->current_state->vertexPointer =
++ realloc(process->current_state->vertexPointer,
++ process->current_state->vertexPointerSize);
++ memcpy(process->current_state->vertexPointer + offset, ptr,
++ bytes_size);
++ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
++ process->current_state->vertexPointer);
++ glNormalPointer(normalPointerType, stride,
++ process->current_state->vertexPointer +
++ normalPointerOffset);
++ glColorPointer(colorPointerSize, colorPointerType, stride,
++ process->current_state->vertexPointer +
++ colorPointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
++ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord0PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
++ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord1PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
++ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
++ stride,
++ process->current_state->vertexPointer +
++ texCoord2PointerOffset);
++ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
++ process->current_state->
++ activeTextureIndex);
++ break;
++ }
++
++ case _glVertexPointer_buffer_func:
++ {
++ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glNormalPointer_buffer_func:
++ {
++ glNormalPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glColorPointer_buffer_func:
++ {
++ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glSecondaryColorPointer_buffer_func:
++ {
++ GET_EXT_PTR(void, glSecondaryColorPointer,
++ (int, int, int, void *));
++ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glIndexPointer_buffer_func:
++ {
++ glIndexPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glTexCoordPointer_buffer_func:
++ {
++ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glEdgeFlagPointer_buffer_func:
++ {
++ glEdgeFlagPointer(args[0], (void *) args[1]);
++ break;
++ }
++
++ case _glVertexAttribPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glVertexAttribPointerARB,
++ (int, int, int, int, int, void *));
++ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
++ args[3], args[4],
++ (void *) args[5]);
++ break;
++ }
++
++ case _glWeightPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
++
++ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glMatrixIndexPointerARB_buffer_func:
++ {
++ GET_EXT_PTR(void, glMatrixIndexPointerARB,
++ (int, int, int, void *));
++ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glFogCoordPointer_buffer_func:
++ {
++ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
++
++ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
++ break;
++ }
++
++ case _glVariantPointerEXT_buffer_func:
++ {
++ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
++
++ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
++ (void *) args[3]);
++ break;
++ }
++
++ case _glDrawElements_buffer_func:
++ {
++ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
++ break;
++ }
++
++ case _glDrawRangeElements_buffer_func:
++ {
++ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
++ (void *) args[5]);
++ break;
++ }
++
++ case _glMultiDrawElements_buffer_func:
++ {
++ GET_EXT_PTR(void, glMultiDrawElements,
++ (int, int *, int, void **, int));
++ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
++ (void **) args[3], args[4]);
++ break;
++ }
++
++ case _glGetError_fake_func:
++ {
++ break;
++ }
++
++ case glGetIntegerv_func:
++ {
++ glGetIntegerv(args[0], (int *) args[1]);
++ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
++ *(int *) args[1]);
++ break;
++ }
++
++ case _glReadPixels_pbo_func:
++ {
++ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
++ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
++ ARG_TO_UNSIGNED_INT(args[4]),
++ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
++ break;
++ }
++
++ case _glDrawPixels_pbo_func:
++ {
++ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
++ ARG_TO_UNSIGNED_INT(args[2]),
++ ARG_TO_UNSIGNED_INT(args[3]),
++ (const void *) (args[4]));
++ break;
++ }
++
++ case _glMapBufferARB_fake_func:
++ {
++ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
++ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
++ int target = args[0];
++ int size = args[1];
++ void *dst_ptr = (void *) args[2];
++ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
++
++ if (src_ptr) {
++ memcpy(dst_ptr, src_ptr, size);
++ ret_int = ptr_func_glUnmapBufferARB(target);
++ } else {
++ ret_int = 0;
++ }
++ break;
++ }
++
++ case fake_gluBuild2DMipmaps_func:
++ {
++ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
++ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
++ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
++ const GLvoid *arg_6));
++ if (ptr_func_gluBuild2DMipmaps == NULL)
++ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
++ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
++ ARG_TO_INT(args[1]),
++ ARG_TO_INT(args[2]),
++ ARG_TO_INT(args[3]),
++ ARG_TO_UNSIGNED_INT(args[4]),
++ ARG_TO_UNSIGNED_INT(args[5]),
++ (const void *) (args[6]));
++ break;
++ }
++
++ case _glSelectBuffer_fake_func:
++ {
++ process->current_state->selectBufferSize = args[0] * 4;
++ process->current_state->selectBufferPtr =
++ realloc(process->current_state->selectBufferPtr,
++ process->current_state->selectBufferSize);
++ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
++ break;
++ }
++
++ case _glGetSelectBuffer_fake_func:
++ {
++ void *ptr = (void *) args[0];
++
++ memcpy(ptr, process->current_state->selectBufferPtr,
++ process->current_state->selectBufferSize);
++ break;
++ }
++
++ case _glFeedbackBuffer_fake_func:
++ {
++ process->current_state->feedbackBufferSize = args[0] * 4;
++ process->current_state->feedbackBufferPtr =
++ realloc(process->current_state->feedbackBufferPtr,
++ process->current_state->feedbackBufferSize);
++ glFeedbackBuffer(args[0], args[1],
++ process->current_state->feedbackBufferPtr);
++ break;
++ }
++
++ case _glGetFeedbackBuffer_fake_func:
++ {
++ void *ptr = (void *) args[0];
++
++ memcpy(ptr, process->current_state->feedbackBufferPtr,
++ process->current_state->feedbackBufferSize);
++ break;
++ }
++
++ /*
++ * case glEnableClientState_func: { if (display_function_call)
++ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
++ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
++ *
++ * case glDisableClientState_func: { if (display_function_call)
++ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
++ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
++ *
++ * case glClientActiveTexture_func: case
++ * glClientActiveTextureARB_func: { if (display_function_call)
++ * fprintf(stderr, "client activeTexture %d\n", args[0] -
++ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
++ *
++ * case glActiveTextureARB_func: { if (display_function_call)
++ * fprintf(stderr, "server activeTexture %d\n", args[0] -
++ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
++ *
++ * case glLockArraysEXT_func: break;
++ *
++ * case glUnlockArraysEXT_func: break;
++ *
++ * case glArrayElement_func: { glArrayElement(args[0]); break; }
++ *
++ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
++ * break; }
++ *
++ * case glDrawElements_func: {
++ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
++ *
++ * case glDrawRangeElements_func: {
++ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
++ * break; } */
++
++ case glGetError_func:
++ {
++#ifdef SYSTEMATIC_ERROR_CHECK
++ ret_int = process->current_state->last_error;
++#else
++ ret_int = glGetError();
++#endif
++ break;
++ }
++
++ case glNewObjectBufferATI_func:
++ {
++ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
++
++ ret_int = ptr_func_glNewObjectBufferATI(args[0],
++ (void *) args[1], args[2]);
++ break;
++ }
++
++ case glClear_func:
++ /* HACK workaround for an unexplainable issue */
++ if (args[0] & GL_COLOR_BUFFER_BIT)
++ glClear(GL_COLOR_BUFFER_BIT);
++ if (args[0] & GL_STENCIL_BUFFER_BIT)
++ glClear(GL_STENCIL_BUFFER_BIT);
++ if (args[0] & GL_DEPTH_BUFFER_BIT)
++ glClear(GL_DEPTH_BUFFER_BIT);
++ if (args[0] & GL_ACCUM_BUFFER_BIT)
++ glClear(GL_ACCUM_BUFFER_BIT);
++ break;
++
++ default:
++ execute_func(func_number, args, &ret_int, &ret_char);
++ break;
++ }
++
++#ifdef SYSTEMATIC_ERROR_CHECK
++ if (func_number == glGetError_func) {
++ process->current_state->last_error = 0;
++ } else {
++ process->current_state->last_error = glGetError();
++ if (process->current_state->last_error != 0) {
++ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
++ process->current_state->last_error);
++ }
++ }
++#endif
++
++ switch (ret_type) {
++ case TYPE_NONE:
++ break;
++
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_CHAR:
++ ret_int = ret_char;
++ break;
++
++ case TYPE_INT:
++ case TYPE_UNSIGNED_INT:
++ break;
++
++ case TYPE_CONST_CHAR:
++ {
++ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
++ break;
++ }
++
++ default:
++ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
++ exit(-1);
++ break;
++ }
++
++ if (display_function_call)
++ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
++ tab_opengl_calls_name[func_number]);
++
++ return ret_int;
++}
+Index: qemu-0.12.4/target-i386/opengl_func.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/opengl_func.h
+@@ -0,0 +1,1108 @@
++/*
++ * Main header for both host and guest sides
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++#include "mesa_gl.h"
++#include "mesa_glext.h"
++
++/* Argument list are internally of a type that can hold a target pointer
++ * or a host pointer. */
++typedef target_phys_addr_t arg_t;
++
++enum {
++ TYPE_NONE,
++ TYPE_CHAR,
++ TYPE_UNSIGNED_CHAR,
++ TYPE_SHORT,
++ TYPE_UNSIGNED_SHORT,
++ TYPE_INT,
++ TYPE_UNSIGNED_INT,
++ TYPE_FLOAT,
++ TYPE_DOUBLE,
++ TYPE_1CHAR,
++ TYPE_2CHAR,
++ TYPE_3CHAR,
++ TYPE_4CHAR,
++ TYPE_128UCHAR,
++ TYPE_1SHORT,
++ TYPE_2SHORT,
++ TYPE_3SHORT,
++ TYPE_4SHORT,
++ TYPE_1INT,
++ TYPE_2INT,
++ TYPE_3INT,
++ TYPE_4INT,
++ TYPE_1FLOAT,
++ TYPE_2FLOAT,
++ TYPE_3FLOAT,
++ TYPE_4FLOAT,
++ TYPE_16FLOAT,
++ TYPE_1DOUBLE,
++ TYPE_2DOUBLE,
++ TYPE_3DOUBLE,
++ TYPE_4DOUBLE,
++ TYPE_16DOUBLE,
++ TYPE_OUT_1INT,
++ TYPE_OUT_1FLOAT,
++ TYPE_OUT_4CHAR,
++ TYPE_OUT_4INT,
++ TYPE_OUT_4FLOAT,
++ TYPE_OUT_4DOUBLE,
++ TYPE_OUT_128UCHAR,
++ TYPE_CONST_CHAR,
++ TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_SHORT,
++ TYPE_ARRAY_INT,
++ TYPE_ARRAY_FLOAT,
++ TYPE_ARRAY_DOUBLE,
++ TYPE_IN_IGNORED_POINTER,
++ TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_SHORT,
++ TYPE_OUT_ARRAY_INT,
++ TYPE_OUT_ARRAY_FLOAT,
++ TYPE_OUT_ARRAY_DOUBLE,
++ TYPE_NULL_TERMINATED_STRING,
++
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ /* .... */
++ TYPE_LAST,
++ /* .... */
++ TYPE_1UCHAR = TYPE_CHAR,
++ TYPE_1USHORT = TYPE_1SHORT,
++ TYPE_1UINT = TYPE_1INT,
++ TYPE_OUT_1UINT = TYPE_OUT_1INT,
++ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
++ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
++ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
++ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
++ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
++ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
++ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
++ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
++ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
++};
++
++#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
++ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
++ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
++ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_IN_UNKNOWN_SIZE_POINTERS \
++ case TYPE_ARRAY_CHAR: \
++ case TYPE_ARRAY_SHORT: \
++ case TYPE_ARRAY_INT: \
++ case TYPE_ARRAY_FLOAT: \
++ case TYPE_ARRAY_DOUBLE
++
++#define CASE_IN_KNOWN_SIZE_POINTERS \
++ case TYPE_1CHAR:\
++ case TYPE_2CHAR:\
++ case TYPE_3CHAR:\
++ case TYPE_4CHAR:\
++ case TYPE_128UCHAR:\
++ case TYPE_1SHORT:\
++ case TYPE_2SHORT:\
++ case TYPE_3SHORT:\
++ case TYPE_4SHORT:\
++ case TYPE_1INT:\
++ case TYPE_2INT:\
++ case TYPE_3INT:\
++ case TYPE_4INT:\
++ case TYPE_1FLOAT:\
++ case TYPE_2FLOAT:\
++ case TYPE_3FLOAT:\
++ case TYPE_4FLOAT:\
++ case TYPE_16FLOAT:\
++ case TYPE_1DOUBLE:\
++ case TYPE_2DOUBLE:\
++ case TYPE_3DOUBLE:\
++ case TYPE_4DOUBLE:\
++ case TYPE_16DOUBLE
++
++#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
++ case TYPE_OUT_ARRAY_CHAR: \
++ case TYPE_OUT_ARRAY_SHORT: \
++ case TYPE_OUT_ARRAY_INT: \
++ case TYPE_OUT_ARRAY_FLOAT: \
++ case TYPE_OUT_ARRAY_DOUBLE
++
++#define CASE_OUT_KNOWN_SIZE_POINTERS \
++ case TYPE_OUT_1INT: \
++ case TYPE_OUT_1FLOAT: \
++ case TYPE_OUT_4CHAR: \
++ case TYPE_OUT_4INT: \
++ case TYPE_OUT_4FLOAT: \
++ case TYPE_OUT_4DOUBLE: \
++ case TYPE_OUT_128UCHAR \
++
++#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
++
++#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
++#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
++
++
++#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)
++#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)
++#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)
++#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)
++#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)
++
++#define NB_MAX_TEXTURES 16
++#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
++#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
++#define MY_GL_MAX_VARIANT_POINTER_EXT 16
++
++static int tab_args_type_length[] = {
++ 0,
++ sizeof(char),
++ sizeof(unsigned char),
++ sizeof(short),
++ sizeof(unsigned short),
++ sizeof(int),
++ sizeof(unsigned int),
++ sizeof(float),
++ sizeof(double),
++ 1 * sizeof(char),
++ 2 * sizeof(char),
++ 3 * sizeof(char),
++ 4 * sizeof(char),
++ 128 * sizeof(char),
++ 1 * sizeof(short),
++ 2 * sizeof(short),
++ 3 * sizeof(short),
++ 4 * sizeof(short),
++ 1 * sizeof(int),
++ 2 * sizeof(int),
++ 3 * sizeof(int),
++ 4 * sizeof(int),
++ 1 * sizeof(float),
++ 2 * sizeof(float),
++ 3 * sizeof(float),
++ 4 * sizeof(float),
++ 16 * sizeof(float),
++ 1 * sizeof(double),
++ 2 * sizeof(double),
++ 3 * sizeof(double),
++ 4 * sizeof(double),
++ 16 * sizeof(double),
++ sizeof(int),
++ sizeof(float),
++ 4 * sizeof(char),
++ 4 * sizeof(int),
++ 4 * sizeof(float),
++ 4 * sizeof(double),
++ 128 * sizeof(char),
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++
++ /* the following sizes are the size of 1 element of the array */
++ sizeof(char),
++ sizeof(short),
++ sizeof(int),
++ sizeof(float),
++ sizeof(double),
++ sizeof(char),
++ sizeof(short),
++ sizeof(int),
++ sizeof(float),
++ sizeof(double),
++};
++
++typedef struct {
++ int ret_type;
++ int has_out_parameters;
++ int nb_args;
++ int args_type[0];
++} Signature;
++
++static const int _init32_signature[] =
++ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
++static const int _init64_signature[] =
++ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
++
++static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
++
++static const int _serialized_calls_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
++
++static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
++
++static const int _changeWindowState_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++
++static const int _moveResizeWindow_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
++
++static const int _send_cursor_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
++ TYPE_INT, TYPE_INT,
++ TYPE_INT, TYPE_INT,
++ TYPE_ARRAY_INT
++};
++
++/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
++static const int glXChooseVisual_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
++
++/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
++ GLXContext shareList, Bool direct )*/
++static const int glXCreateContext_signature[] =
++ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
++
++static const int glXCopyContext_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
++static const int glXDestroyContext_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
++//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
++/* making it asynchronous */
++static const int glXMakeCurrent_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
++ int attrib, int *value )*/
++static const int glXGetConfig_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
++static const int glXGetConfig_extended_signature[] =
++ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
++
++/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
++static const int glXSwapBuffers_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
++static const int glXQueryVersion_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
++
++/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
++static const int glXQueryExtension_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
++
++static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
++static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
++
++/* GLX 1.1 and later */
++
++/* const char *glXGetClientString( Display *dpy, int name ) */
++static const int glXGetClientString_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
++static const int glXQueryExtensionsString_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
++static const int glXQueryServerString_signature[] =
++ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++
++static const int glXGetProcAddress_fake_signature[] =
++ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
++
++static const int glXGetProcAddress_global_fake_signature[] =
++ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
++
++
++/* GLX 1.3 and later */
++
++/*
++GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
++ const int *attribList, int *nitems ); */
++static const int glXChooseFBConfig_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_OUT_1INT };
++
++static const int glXChooseFBConfigSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_OUT_1INT };
++
++static const int glXGetFBConfigs_signature[] =
++ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
++
++/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
++static const int glXGetFBConfigAttrib_extended_signature[] =
++ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
++
++
++/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
++ const int *attribList ) */
++static const int glXCreatePbuffer_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
++
++static const int glXCreateGLXPbufferSGIX_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_INT };
++
++static const int glXDestroyPbuffer_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXDestroyGLXPbufferSGIX_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/* GLXContext glXCreateNewContext(Display * dpy
++ GLXFBConfig config
++ int renderType
++ GLXContext ShareList
++ Bool Direct) */
++static const int glXCreateNewContext_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++static const int glXCreateContextWithConfigSGIX_signature[] =
++ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++
++/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
++static const int glXGetVisualFromFBConfig_signature[] =
++ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
++static const int glXGetFBConfigAttrib_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXGetFBConfigAttribSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryContext_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryGLXPbufferSGIX_signature[] =
++ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++static const int glXQueryDrawable_signature[] =
++ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
++TYPE_OUT_1INT };
++
++/* void glXUseXFont( Font font, int first, int count, int list ) */
++static const int glXUseXFont_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++
++/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
++static const int glXIsDirect_signature[] =
++ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXGetScreenDriver_signature[] =
++ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
++
++static const int glXGetDriverConfig_signature[] =
++ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
++
++
++static const int glXWaitVideoSyncSGI_signature[] =
++ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
++
++static const int glXGetVideoSyncSGI_signature[] =
++ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
++
++static const int glXSwapIntervalSGI_signature[] =
++ { TYPE_INT, 0, 1, TYPE_INT };
++
++static const int glXBindTexImageATI_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXReleaseTexImageATI_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXBindTexImageARB_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++static const int glXReleaseTexImageARB_signature[] =
++ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
++
++/* const GLubyte * glGetString( GLenum name ) */
++static const int glGetString_signature[] =
++ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
++
++/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
++/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
++static const int glShaderSourceARB_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
++static const int glShaderSource_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
++
++static const int glVertexPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glNormalPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glColorPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glSecondaryColorPointer_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glIndexPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glEdgeFlagPointer_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAttribPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAttribPointerNV_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glWeightPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glMatrixIndexPointerARB_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glFogCoordPointer_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glInterleavedArrays_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glElementPointerATI_fake_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVariantPointerEXT_fake_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTuxRacerDrawElements_fake_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexAndNormalPointer_fake_signature[] =
++ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer01_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glTexCoordPointer012_fake_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_ARRAY_CHAR };
++static const int glVertexNormalPointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 12, 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 };
++static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
++static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, 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 };
++static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++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 };
++static const int
++ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, 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 };
++static const int
++ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++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 };
++static const int
++ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
++ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT, TYPE_INT, 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 };
++
++static const int glGenTextures_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int glGenBuffersARB_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
++
++static const int _glDrawElements_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glDrawRangeElements_buffer_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++static const int _glMultiDrawElements_buffer_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
++TYPE_INT };
++
++static const int _glVertexPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glNormalPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glColorPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glSecondaryColorPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glIndexPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glTexCoordPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glEdgeFlagPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++static const int _glVertexAttribPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT };
++static const int _glWeightPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glMatrixIndexPointerARB_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glFogCoordPointer_buffer_signature[] =
++ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glVariantPointerEXT_buffer_signature[] =
++ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++
++static const int _glReadPixels_pbo_signature[] =
++ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
++TYPE_INT, TYPE_INT };
++static const int _glDrawPixels_pbo_signature[] =
++ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
++static const int _glMapBufferARB_fake_signature[] =
++ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
++
++static const int _glSelectBuffer_fake_signature[] =
++ { TYPE_NONE, 0, 1, TYPE_INT };
++static const int _glGetSelectBuffer_fake_signature[] =
++ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
++static const int _glFeedbackBuffer_fake_signature[] =
++ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
++static const int _glGetFeedbackBuffer_fake_signature[] =
++ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
++
++static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
++
++#define timesynchro_func -1
++#define memorize_array_func -2
++#define reuse_array_func -3
++
++#include "gl_func.h"
++
++static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_TEXTURE_MAG_FILTER:
++ case GL_TEXTURE_MIN_FILTER:
++ case GL_TEXTURE_WRAP_S:
++ case GL_TEXTURE_WRAP_T:
++ case GL_TEXTURE_PRIORITY:
++ case GL_TEXTURE_WRAP_R:
++ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
++/* case GL_SHADOW_AMBIENT_SGIX:*/
++ case GL_TEXTURE_MIN_LOD:
++ case GL_TEXTURE_MAX_LOD:
++ case GL_TEXTURE_BASE_LEVEL:
++ case GL_TEXTURE_MAX_LEVEL:
++ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
++ case GL_TEXTURE_LOD_BIAS_S_SGIX:
++ case GL_TEXTURE_LOD_BIAS_T_SGIX:
++ case GL_TEXTURE_LOD_BIAS_R_SGIX:
++ case GL_GENERATE_MIPMAP:
++/* case GL_GENERATE_MIPMAP_SGIS:*/
++ case GL_TEXTURE_COMPARE_SGIX:
++ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
++ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
++ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
++ case GL_TEXTURE_LOD_BIAS:
++/* case GL_TEXTURE_LOD_BIAS_EXT:*/
++ case GL_DEPTH_TEXTURE_MODE:
++/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
++ case GL_TEXTURE_COMPARE_MODE:
++/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
++ case GL_TEXTURE_COMPARE_FUNC:
++/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
++ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
++ return 1;
++ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
++ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
++ return 2;
++ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
++ return 3;
++ case GL_TEXTURE_BORDER_COLOR:
++ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
++ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
++ return 4;
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static int __glLight_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_AMBIENT:
++ case GL_DIFFUSE:
++ case GL_SPECULAR:
++ case GL_POSITION:
++ return 4;
++ break;
++
++ case GL_SPOT_DIRECTION:
++ return 3;
++ break;
++
++ case GL_SPOT_EXPONENT:
++ case GL_SPOT_CUTOFF:
++ case GL_CONSTANT_ATTENUATION:
++ case GL_LINEAR_ATTENUATION:
++ case GL_QUADRATIC_ATTENUATION:
++ return 1;
++ break;
++
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static int __glMaterial_size(FILE *err_file, GLenum pname)
++{
++ switch (pname) {
++ case GL_AMBIENT:
++ case GL_DIFFUSE:
++ case GL_SPECULAR:
++ case GL_EMISSION:
++ case GL_AMBIENT_AND_DIFFUSE:
++ return 4;
++ break;
++
++ case GL_SHININESS:
++ return 1;
++ break;
++
++ case GL_COLOR_INDEXES:
++ return 3;
++ break;
++
++ default:
++ fprintf(err_file, "unhandled pname = %d\n", pname);
++ return 0;
++ }
++}
++
++static inline int compute_arg_length(FILE *err_file, int func_number,
++ int arg_i, arg_t *args)
++{
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int *args_type = signature->args_type;
++
++ switch (func_number) {
++ case glProgramNamedParameter4fNV_func:
++ case glProgramNamedParameter4dNV_func:
++ case glProgramNamedParameter4fvNV_func:
++ case glProgramNamedParameter4dvNV_func:
++ case glGetProgramNamedParameterfvNV_func:
++ case glGetProgramNamedParameterdvNV_func:
++ if (arg_i == 2)
++ return 1 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glProgramStringARB_func:
++ case glLoadProgramNV_func:
++ case glGenProgramsNV_func:
++ case glDeleteProgramsNV_func:
++ case glGenProgramsARB_func:
++ case glDeleteProgramsARB_func:
++ case glRequestResidentProgramsNV_func:
++ case glDrawBuffers_func:
++ case glDrawBuffersARB_func:
++ case glDrawBuffersATI_func:
++ case glDeleteBuffers_func:
++ case glDeleteBuffersARB_func:
++ case glDeleteTextures_func:
++ case glDeleteTexturesEXT_func:
++ case glGenFramebuffersEXT_func:
++ case glDeleteFramebuffersEXT_func:
++ case glGenRenderbuffersEXT_func:
++ case glDeleteRenderbuffersEXT_func:
++ case glGenQueries_func:
++ case glGenQueriesARB_func:
++ case glDeleteQueries_func:
++ case glDeleteQueriesARB_func:
++ case glGenOcclusionQueriesNV_func:
++ case glDeleteOcclusionQueriesNV_func:
++ case glGenFencesNV_func:
++ case glDeleteFencesNV_func:
++ case glUniform1fv_func:
++ case glUniform1iv_func:
++ case glUniform1fvARB_func:
++ case glUniform1ivARB_func:
++ case glUniform1uivEXT_func:
++ case glVertexAttribs1dvNV_func:
++ case glVertexAttribs1fvNV_func:
++ case glVertexAttribs1svNV_func:
++ case glVertexAttribs1hvNV_func:
++ case glWeightbvARB_func:
++ case glWeightsvARB_func:
++ case glWeightivARB_func:
++ case glWeightfvARB_func:
++ case glWeightdvARB_func:
++ case glWeightubvARB_func:
++ case glWeightusvARB_func:
++ case glWeightuivARB_func:
++ case glPixelMapfv_func:
++ case glPixelMapuiv_func:
++ case glPixelMapusv_func:
++ case glProgramBufferParametersfvNV_func:
++ case glProgramBufferParametersIivNV_func:
++ case glProgramBufferParametersIuivNV_func:
++ case glTransformFeedbackAttribsNV_func:
++ case glTransformFeedbackVaryingsNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 1 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform2fv_func:
++ case glUniform2iv_func:
++ case glUniform2fvARB_func:
++ case glUniform2ivARB_func:
++ case glUniform2uivEXT_func:
++ case glVertexAttribs2dvNV_func:
++ case glVertexAttribs2fvNV_func:
++ case glVertexAttribs2svNV_func:
++ case glVertexAttribs2hvNV_func:
++ case glDetailTexFuncSGIS_func:
++ case glSharpenTexFuncSGIS_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform3fv_func:
++ case glUniform3iv_func:
++ case glUniform3fvARB_func:
++ case glUniform3ivARB_func:
++ case glUniform3uivEXT_func:
++ case glVertexAttribs3dvNV_func:
++ case glVertexAttribs3fvNV_func:
++ case glVertexAttribs3svNV_func:
++ case glVertexAttribs3hvNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniform4fv_func:
++ case glUniform4iv_func:
++ case glUniform4fvARB_func:
++ case glUniform4ivARB_func:
++ case glUniform4uivEXT_func:
++ case glVertexAttribs4dvNV_func:
++ case glVertexAttribs4fvNV_func:
++ case glVertexAttribs4svNV_func:
++ case glVertexAttribs4hvNV_func:
++ case glVertexAttribs4ubvNV_func:
++ case glProgramParameters4fvNV_func:
++ case glProgramParameters4dvNV_func:
++ case glProgramLocalParameters4fvEXT_func:
++ case glProgramEnvParameters4fvEXT_func:
++ case glProgramLocalParametersI4ivNV_func:
++ case glProgramLocalParametersI4uivNV_func:
++ case glProgramEnvParametersI4ivNV_func:
++ case glProgramEnvParametersI4uivNV_func:
++ if (arg_i == signature->nb_args - 1)
++ return 4 * args[arg_i - 1] *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glPrioritizeTextures_func:
++ case glPrioritizeTexturesEXT_func:
++ case glAreProgramsResidentNV_func:
++ case glAreTexturesResident_func:
++ case glAreTexturesResidentEXT_func:
++ if (arg_i == 1 || arg_i == 2)
++ return args[0] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glLightfv_func:
++ case glLightiv_func:
++ case glGetLightfv_func:
++ case glGetLightiv_func:
++ case glFragmentLightfvSGIX_func:
++ case glFragmentLightivSGIX_func:
++ case glGetFragmentLightfvSGIX_func:
++ case glGetFragmentLightivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glLight_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glLightModelfv_func:
++ case glLightModeliv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glFragmentLightModelfvSGIX_func:
++ case glFragmentLightModelivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glMaterialfv_func:
++ case glMaterialiv_func:
++ case glGetMaterialfv_func:
++ case glGetMaterialiv_func:
++ case glFragmentMaterialfvSGIX_func:
++ case glFragmentMaterialivSGIX_func:
++ case glGetFragmentMaterialfvSGIX_func:
++ case glGetFragmentMaterialivSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glMaterial_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexParameterfv_func:
++ case glTexParameteriv_func:
++ case glGetTexParameterfv_func:
++ case glGetTexParameteriv_func:
++ case glTexParameterIivEXT_func:
++ case glTexParameterIuivEXT_func:
++ case glGetTexParameterIivEXT_func:
++ case glGetTexParameterIuivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return __glTexParameter_size(err_file,
++ args[arg_i -
++ 1]) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glFogiv_func:
++ case glFogfv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_FOG_COLOR) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexGendv_func:
++ case glTexGenfv_func:
++ case glTexGeniv_func:
++ case glGetTexGendv_func:
++ case glGetTexGenfv_func:
++ case glGetTexGeniv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glTexEnvfv_func:
++ case glTexEnviv_func:
++ case glGetTexEnvfv_func:
++ case glGetTexEnviv_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glConvolutionParameterfv_func:
++ case glConvolutionParameteriv_func:
++ case glGetConvolutionParameterfv_func:
++ case glGetConvolutionParameteriv_func:
++ case glConvolutionParameterfvEXT_func:
++ case glConvolutionParameterivEXT_func:
++ case glGetConvolutionParameterfvEXT_func:
++ case glGetConvolutionParameterivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
++ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
++ args[arg_i - 1] ==
++ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glGetVertexAttribfvARB_func:
++ case glGetVertexAttribfvNV_func:
++ case glGetVertexAttribfv_func:
++ case glGetVertexAttribdvARB_func:
++ case glGetVertexAttribdvNV_func:
++ case glGetVertexAttribdv_func:
++ case glGetVertexAttribivARB_func:
++ case glGetVertexAttribivNV_func:
++ case glGetVertexAttribiv_func:
++ case glGetVertexAttribIivEXT_func:
++ case glGetVertexAttribIuivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++
++ case glPointParameterfv_func:
++ case glPointParameterfvEXT_func:
++ case glPointParameterfvARB_func:
++ case glPointParameterfvSGIS_func:
++ case glPointParameteriv_func:
++ case glPointParameterivEXT_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2fv_func:
++ case glUniformMatrix2fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix3fv_func:
++ case glUniformMatrix3fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix4fv_func:
++ case glUniformMatrix4fvARB_func:
++ if (arg_i == signature->nb_args - 1)
++ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2x3fv_func:
++ case glUniformMatrix3x2fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix2x4fv_func:
++ case glUniformMatrix4x2fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glUniformMatrix3x4fv_func:
++ case glUniformMatrix4x3fv_func:
++ if (arg_i == signature->nb_args - 1)
++ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
++ break;
++
++ case glSpriteParameterivSGIX_func:
++ case glSpriteParameterfvSGIX_func:
++ if (arg_i == signature->nb_args - 1)
++ return ((args[arg_i - 1] ==
++ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
++ tab_args_type_length[args_type[arg_i]];
++ break;
++
++ default:
++ break;
++ }
++
++ fprintf(err_file,
++ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
++ func_number, arg_i);
++ return 0;
++}
++
++#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
++ (func_number == glBitmap_func || \
++ func_number == _send_cursor_func || \
++ func_number == glTexImage1D_func || \
++ func_number == glTexImage2D_func || \
++ func_number == glTexImage3D_func || \
++ func_number == glBufferDataARB_func || \
++ func_number == glNewObjectBufferATI_func)
++
++#ifdef __amd64__
++#define _init_func _init64_func
++#else
++#ifdef __i386__
++#define _init_func _init32_func
++#else
++#error Unsupported ABI
++#endif
++#endif
+Index: qemu-0.12.4/target-i386/opengl_player.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/opengl_player.c
+@@ -0,0 +1,1461 @@
++/*
++ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <assert.h>
++#include <unistd.h>
++#include <sys/time.h>
++#include <math.h>
++
++#include <GL/gl.h>
++#include <X11/Xlib.h>
++
++// TODO
++typedef long unsigned int target_phys_addr_t;
++
++#include "opengl_func.h"
++#include "opengl_utils.h"
++
++//#include "ffmpeg/avcodec.h"
++
++extern void init_process_tab(void);
++extern int do_function_call(int, arg_t *, char *);
++
++void do_disconnect_current(void);
++void do_context_switch(Display *dpy, pid_t pid, int call);
++
++typedef struct {
++ int n_used;
++ unsigned int crc;
++ int size;
++ long long last_use;
++} RecordBufferedArray;
++
++typedef struct {
++ int size;
++ long file_offset;
++} ReplayBufferedArray;
++
++#define N_BUFFERED_ARRAYS 1024
++RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
++
++#define INSTR_WINDOW_SIZE 65536
++short instrWindow[INSTR_WINDOW_SIZE];
++int instrWindowCount = 0;
++int instrWindowPtr = 0;
++int instrWindowBeginPtr = 0;
++
++#include "ghash.c"
++
++#define PRIME 131
++
++typedef struct {
++ int iFirstOccur;
++ int nbOccur;
++ int hash;
++} SeqDesc;
++
++typedef struct {
++ int hash;
++ int offset;
++} HashElt;
++
++int sort_hash_N;
++short *sort_hash_tab;
++int count_compar;
++int collision_detected;
++
++static int sort_hash(const void *ptrA, const void *ptrB)
++{
++ const HashElt *a = (const HashElt *) ptrA;
++ const HashElt *b = (const HashElt *) ptrB;
++
++ count_compar++;
++ if (a->hash == b->hash) {
++ int j;
++
++ for (j = 0; j < sort_hash_N; j++) {
++ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
++ collision_detected = 1;
++ // fprintf(stderr, "collision de hash !\n");
++ return sort_hash_tab[a->offset + j] <
++ sort_hash_tab[b->offset + j] ? -1 : 1;
++ }
++ }
++ return a->offset - b->offset;
++ } else if (a->hash < b->hash)
++ return -1;
++ else
++ return 1;
++}
++
++static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
++{
++ const SeqDesc *a = (const SeqDesc *) ptrA;
++ const SeqDesc *b = (const SeqDesc *) ptrB;
++
++ return b->nbOccur - a->nbOccur;
++}
++
++static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
++{
++ const SeqDesc *a = (const SeqDesc *) ptrA;
++ const SeqDesc *b = (const SeqDesc *) ptrB;
++
++ return a->iFirstOccur - b->iFirstOccur;
++}
++
++void find_repeated_seq(short *tab, int iStart, int length)
++{
++ // SimpleHashTable* tableHash = simple_hash_table_new(free);
++ int N = 10;
++ int i;
++ int hash = 0;
++ int primeN = 1;
++ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
++
++ short *new_tab = malloc(sizeof(short) * length);
++ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
++ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
++ tab = new_tab;
++
++ sort_hash_N = N;
++ sort_hash_tab = tab;
++
++ fprintf(stderr, "(start) iStart = %d\n", iStart);
++ for (i = 0; i < N; i++) {
++ primeN *= PRIME;
++ }
++ for (i = 0; i < length; i++) {
++ hash = hash * PRIME + tab[i];
++ if (i >= N) {
++ hash -= tab[i - N] * primeN;
++ }
++ if (i >= N - 1) {
++ tabHash[i - (N - 1)].offset = i - (N - 1);
++ tabHash[i - (N - 1)].hash =
++ /* (i == 100) ? tabHash[0].hash : */ hash;
++#if 0
++ void **p_n_occurences =
++ simple_hash_table_lookup_pointer(tableHash, hash);
++ if (p_n_occurences == NULL) {
++ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
++
++ seqDesc->iFirstOccur = i - (N - 1);
++ seqDesc->nbOccur = 1;
++ simple_hash_table_insert(tableHash, hash, seqDesc);
++ } else {
++ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
++ int j;
++
++ for (j = 0; j < N; j++) {
++ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
++ tab[(iStart + i - (N - 1) + j) % length])
++ break;
++ }
++ if (j != N)
++ fprintf(stderr, "arg\n");
++ seqDesc->nbOccur++;
++ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
++ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
++ // seqDesc->nbOccur);
++ }
++#endif
++ }
++ }
++ collision_detected = 0;
++ count_compar = 0;
++ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
++ if (!collision_detected) {
++ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
++ int nbSeqDesc = 0;
++ int lastI = 0;
++ int prevHash = tabHash[0].hash;
++
++ for (i = 1; i < length - N + 1; i++) {
++ if (tabHash[i].hash != prevHash) {
++ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
++ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
++ tabSeqDesc[nbSeqDesc].hash = prevHash;
++ nbSeqDesc++;
++ lastI = i;
++ prevHash = tabHash[i].hash;
++ }
++ }
++ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
++ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
++ nbSeqDesc++;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
++ for (i = 0; i < nbSeqDesc; i++) {
++ if (tabSeqDesc[i].nbOccur < 10)
++ break;
++ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
++ // tabSeqDesc[i].nbOccur);
++ }
++ nbSeqDesc = i;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
++ sort_seq_desc_by_offset);
++ lastI = tabSeqDesc[0].iFirstOccur;
++ int maxI = 0;
++ int j = 0;
++
++ for (i = 1; i < nbSeqDesc; i++) {
++ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
++ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
++ maxI = i;
++ }
++ } else {
++ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
++ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
++ j++;
++#define MAX(a,b) (((a)>(b)) ? (a) : (b))
++ lastI = tabSeqDesc[maxI].iFirstOccur;
++ while (i < nbSeqDesc &&
++ tabSeqDesc[i].iFirstOccur - lastI <= N)
++ i++;
++ if (i == nbSeqDesc)
++ break;
++ maxI = i;
++ }
++ }
++ nbSeqDesc = j;
++ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
++ for (i = 0; i < nbSeqDesc; i++) {
++ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
++ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
++ tabSeqDesc[i].hash);
++ for (j = 0; j < N; j++)
++ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
++ fprintf(stderr, "\n");
++ }
++ free(tabSeqDesc);
++ } else {
++ fprintf(stderr, "collision de hash !\n");
++ }
++
++ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
++ count_compar);
++ // simple_hash_table_foreach(tableHash,
++ free(tabHash);
++ free(tab);
++#if 0
++ simple_hash_table_destroy(tableHash);
++#endif
++#if 0
++ int i, j, k;
++
++ for (i = 0; i < length; i++) {
++ int nMaxContiguous = 0;
++ int jMax = 0;
++
++ for (j = 0; j < length; j++) {
++ int nContiguous = 0;
++
++ for (k = 0; k < j - i; k++) {
++ if (tab[(iStart + i + k) % length] ==
++ tab[(iStart + i + j + k) % length]) {
++ nContiguous++;
++ } else
++ break;
++ }
++ if (nContiguous >= nMaxContiguous) {
++ nMaxContiguous = nContiguous;
++ jMax = j;
++ }
++ }
++ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
++ iStart, i, i + jMax, nMaxContiguous);
++ }
++#endif
++}
++
++#define MAX_SERVER_STATE_STACK_SIZE 16
++
++typedef struct {
++ GLbitfield mask;
++ int matrixMode;
++ int lastMatrixOp;
++} ServerState;
++
++typedef struct {
++ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
++ int stackAttribPtr;
++ int matrixMode;
++ int lastMatrixOp;
++} GLState;
++
++#define NB_STATES 100
++GLState states[NB_STATES];
++
++void usage()
++{
++ printf("Usage : opengl_player [OPTION] filename\n\n");
++ printf
++ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
++ printf("'-' is supported and stands for standard input\n\n");
++ printf("The following options are available :\n");
++ printf
++ ("--debug : output debugging trace on stderr\n");
++ printf("--disable-real-time-play-back : play as fast as possible\n");
++ printf
++ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
++ printf("--h or --help : display this help\n");
++}
++
++int main(int argc, char *argv[])
++{
++ static int args_size[50];
++ int i;
++ int visualid_fbconfig_read = -1;
++ int visualid_fbconfig_real = 0;
++ char *filename = "/tmp/debug_gl.bin";
++ int slowdown = 0;
++ int debug = 0;
++ char *ret_string;
++ arg_t args[50];
++ struct timeval start_time, last_time, current_time;
++ int noplay = 0;
++ int count_last_time = 0, count_current = 0;
++ int refresh_rate = 500;
++ int disable_real_time_play_back = 0;
++ int show_hard_disk_bandwith = 0;
++ int last_offset = 0;
++ int resize = 0;
++ int window_width = 0, window_height = 0;
++ int orig_window_width = 0;
++ int show_offset = 0;
++ int show_diff_offset = 0;
++ int last_cmd_offset = 0;
++ FILE *compressed_file = NULL;
++ int sizeBufferedArraysPlay = 0;
++ ReplayBufferedArray *replayBufferedArrays = NULL;
++ int currentState = 0;
++
++ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
++ memset(states, 0, sizeof(states));
++ for (i = 0; i < NB_STATES; i++) {
++ states[i].matrixMode = GL_MODELVIEW;
++ states[i].lastMatrixOp = -1;
++ }
++
++ /* avcodec_init(); AVCodec* avCodec =
++ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
++ * avCodecContext = avcodec_alloc_context(); */
++
++ for (i = 1; i < argc; i++) {
++ if (argv[i][0] == '-' && argv[i][1] == '-')
++ argv[i] = argv[i] + 1;
++
++ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
++ slowdown = atoi(argv[i] + strlen("-slowdown="));
++ } else if (strcmp(argv[i], "-noplay") == 0) {
++ noplay = 1;
++ } else if (strcmp(argv[i], "-debug") == 0) {
++ debug = 1;
++ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
++ disable_real_time_play_back = 1;
++ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
++ show_hard_disk_bandwith = 1;
++ } else if (strcmp(argv[i], "-show-offset") == 0) {
++ show_offset = 1;
++ } else
++ if (strncmp
++ (argv[i], "-show-diff-offset",
++ strlen("-show-diff-offset")) == 0) {
++ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
++ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
++ window_width = atoi(argv[i] + strlen("-width="));
++ resize = 1;
++ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
++ == 0) {
++ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
++ } else
++ if (strncmp
++ (argv[i], "-output-compressed-filename=",
++ strlen("-output-compressed-filename=")) == 0) {
++ char *compressed_filename =
++ argv[i] + strlen("-output-compressed-filename=");
++ compressed_file = fopen(compressed_filename, "wb");
++ } else if (strcmp(argv[i], "-") == 0) {
++ filename = NULL;
++ } else if (strcmp(argv[i], "-h") == 0 ||
++ strcmp(argv[i], "-help") == 0) {
++ usage();
++ return 0;
++ } else
++ filename = argv[i];
++ }
++ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
++
++ if (f == NULL) {
++ fprintf(stderr, "cannot open %s\n", filename);
++ return 0;
++ }
++ // FILE* fout = fopen("/tmp/raw", "wb");
++
++ init_process_tab();
++ ret_string = malloc(32768);
++
++ gettimeofday(&start_time, NULL);
++ gettimeofday(&last_time, NULL);
++
++// void* buffer= NULL;
++#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
++#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
++
++ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
++ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
++
++ long long instr_count = 0;
++
++ while (1) {
++ short func_number;
++ short memorize_array_play = -1;
++ short reuse_array_play = -1;
++
++ begin:
++ if (fread(&func_number, sizeof(short), 1, f) == 0)
++ break;
++ if (func_number == _exit_process_func)
++ break;
++
++ if (func_number == _serialized_calls_func) {
++ continue;
++ }
++ // fwrite(&func_number, sizeof(short), 1, fopcodes);
++
++ /*
++ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
++ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
++ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
++ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
++ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
++ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
++ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
++
++ /* -1 is special code that indicates time synchro */
++ if (func_number == timesynchro_func) {
++ long long ts_file;
++ fread(&ts_file, sizeof(long long), 1, f);
++
++ if (compressed_file) {
++ WRITE_SHORT(timesynchro_func);
++ WRITE_LONGLONG(ts_file);
++ }
++
++ if (!disable_real_time_play_back) {
++ gettimeofday(&current_time, NULL);
++ long long ts_real =
++ (current_time.tv_sec -
++ start_time.tv_sec) * (long long) 1000000 +
++ current_time.tv_usec - start_time.tv_usec;
++ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
++ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
++ /* we're playing too fast */
++ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
++ // ts_real));
++ usleep((int) (ts_file - ts_real));
++ }
++ }
++ continue;
++ } else if (func_number == memorize_array_func) {
++ fread(&memorize_array_play, sizeof(short), 1, f);
++ goto begin;
++ } else if (func_number == reuse_array_func) {
++ fread(&reuse_array_play, sizeof(short), 1, f);
++ goto begin;
++ }
++
++ assert(func_number >= 0);
++
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++#if 0
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ char c;
++
++ fread(&c, sizeof(c), 1, f);
++ args[i] = c;
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ short s;
++
++ fread(&s, sizeof(s), 1, f);
++ args[i] = s;
++ break;
++ }
++
++ case TYPE_FLOAT:
++ fread(&args[i], sizeof(int), 1, f);
++ break;
++
++#endif
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ {
++ int n;
++ fread(&n, sizeof(int), 1, f);
++ args[i] = n;
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ fread(&args_size[i], sizeof(int), 1, f);
++ if (args_size[i]) {
++ args[i] = (long) malloc(args_size[i]);
++ fread((void *) args[i], args_size[i], 1, f);
++ } else {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ }
++ args[i] = 0;
++ }
++ if (reuse_array_play >= 0) {
++ long current_pos = ftell(f);
++
++ args_size[i] =
++ replayBufferedArrays[reuse_array_play].size;
++ args[i] = (long) malloc(args_size[i]);
++ fseek(f,
++ replayBufferedArrays[reuse_array_play].file_offset,
++ SEEK_SET);
++ fread((void *) args[i], args_size[i], 1, f);
++ fseek(f, current_pos, SEEK_SET);
++ }
++ if (memorize_array_play >= 0) {
++ assert(memorize_array_play <= sizeBufferedArraysPlay);
++ if (memorize_array_play == sizeBufferedArraysPlay) {
++ sizeBufferedArraysPlay++;
++ replayBufferedArrays =
++ realloc(replayBufferedArrays,
++ sizeBufferedArraysPlay *
++ sizeof(ReplayBufferedArray));
++ replayBufferedArrays[sizeBufferedArraysPlay -
++ 1].file_offset = 0;
++ }
++ replayBufferedArrays[memorize_array_play].file_offset =
++ ftell(f) - args_size[i];
++ replayBufferedArrays[memorize_array_play].size =
++ args_size[i];
++ }
++ break;
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] =
++ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
++ fread((void *) args[i], args_size[i], 1, f);
++ break;
++ }
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] =
++ compute_arg_length(stderr, func_number, i, args);
++ args[i] = (long) malloc(args_size[i]);
++ break;
++ }
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ fread(&args_size[i], sizeof(int), 1, f);
++ if (args_size[i]) {
++ args[i] = (long) malloc(args_size[i]);
++ } else {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
++ fprintf(stderr, "call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ }
++ args[i] = 0;
++ }
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = tab_args_type_length[args_type[i]];
++ assert(args_size[i]);
++ args[i] = (long) malloc(args_size[i]);
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args_size[i] = tab_args_type_length[args_type[i]];
++ args[i] = (long) malloc(args_size[i]);
++ fread((void *) args[i], args_size[i], 1, f);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ if (debug)
++ display_gl_call(stderr, func_number, args, args_size);
++
++ if (debug && reuse_array_play != -1)
++ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
++ if (debug && memorize_array_play != -1)
++ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
++
++ if (compressed_file) {
++ int reuse_array = -1;
++ int memorize_array = -1;
++ void *ptr = NULL;
++ int bytes_size = 0;
++ int do_default = 1;
++
++ switch (func_number) {
++ case glXMakeCurrent_func:
++ {
++ currentState = args[2];
++ assert(currentState >= 0 && currentState < NB_STATES);
++ break;
++ }
++
++ case glMatrixMode_func:
++ {
++ if (states[currentState].matrixMode == args[0]) {
++ do_default = 0;
++ } else {
++ states[currentState].matrixMode = args[0];
++ }
++ break;
++ }
++
++ case glLoadIdentity_func:
++ case glLoadMatrixd_func:
++ case glLoadMatrixf_func:
++ case glMultMatrixd_func:
++ case glMultMatrixf_func:
++ case glOrtho_func:
++ case glFrustum_func:
++ case glRotated_func:
++ case glRotatef_func:
++ case glScaled_func:
++ case glScalef_func:
++ case glTranslated_func:
++ case glTranslatef_func:
++ case glPushMatrix_func:
++ case glPopMatrix_func:
++ {
++ if (states[currentState].matrixMode == 5890) {
++ if (states[currentState].lastMatrixOp ==
++ glLoadIdentity_func &&
++ func_number == glLoadIdentity_func) {
++ do_default = 0;
++ }
++ states[currentState].lastMatrixOp = func_number;
++ }
++ break;
++ }
++
++ case glPushAttrib_func:
++ {
++ if (states[currentState].stackAttribPtr <
++ MAX_SERVER_STATE_STACK_SIZE) {
++ int mask = args[0];
++
++ states[currentState].stackAttrib[states[currentState].
++ stackAttribPtr].
++ mask = mask;
++ if (mask & GL_TRANSFORM_BIT) {
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].matrixMode =
++ states[currentState].matrixMode;
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].lastMatrixOp =
++ states[currentState].lastMatrixOp;
++ }
++ states[currentState].stackAttribPtr++;
++ }
++ break;
++ }
++
++ case glPopAttrib_func:
++ {
++ if (states[currentState].stackAttribPtr > 0) {
++ --states[currentState].stackAttribPtr;
++ if (states[currentState].
++ stackAttrib[states[currentState].stackAttribPtr].
++ mask & GL_TRANSFORM_BIT) {
++ states[currentState].matrixMode =
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].matrixMode;
++ states[currentState].lastMatrixOp =
++ states[currentState].
++ stackAttrib[states[currentState].
++ stackAttribPtr].lastMatrixOp;
++ }
++ }
++ break;
++ }
++
++ case glBufferDataARB_func:
++ {
++ ptr = (void *) args[2];
++ bytes_size = args_size[2];
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ case glTexCoordPointer_fake_func:
++ case glTexCoordPointer01_fake_func:
++ case glDrawElements_func:
++ {
++ ptr = (void *) args[nb_args - 1];
++ bytes_size = args_size[nb_args - 1];
++ break;
++ }
++
++ default:
++ break;
++ }
++
++ if (ptr) {
++ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
++ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
++ int iMinUsed = -1;
++
++ instr_count++;
++
++ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
++ if (recordBufferedArrays[i].crc == crc) {
++ // fprintf(stderr, "reusing %d for crc %d\n", i,
++ // crc);
++ reuse_array = i;
++ // fprintf(stderr, "reuse_array %d\n", i);
++ recordBufferedArrays[i].n_used++;
++ recordBufferedArrays[i].last_use = instr_count;
++ break;
++ } else if (recordBufferedArrays[i].n_used == 0) {
++ // fprintf(stderr, "memorize_array %d\n", i);
++ memorize_array = i;
++ recordBufferedArrays[i].n_used = 1;
++ recordBufferedArrays[i].crc = crc;
++ recordBufferedArrays[i].size = bytes_size;
++ recordBufferedArrays[i].last_use = instr_count;
++ break;
++ } else {
++ long long interest =
++ N_BUFFERED_ARRAYS *
++ recordBufferedArrays[i].n_used / (instr_count -
++ recordBufferedArrays
++ [i].
++ last_use)
++ /** recordBufferedArrays[i].size*/ ;
++ if (interest < minInterest) {
++ iMinUsed = i;
++ minInterest = interest;
++ }
++ }
++ }
++ static unsigned int *discardedCrcs = NULL;
++ static int nDiscardedCrcs = 0;
++
++ if (i == N_BUFFERED_ARRAYS) {
++ int j;
++
++ for (j = 0; j < nDiscardedCrcs; j++) {
++ if (discardedCrcs[j] == crc) {
++ fprintf(stderr,
++ "%x was discarded before and is asked now...\n",
++ crc);
++ discardedCrcs[j] =
++ recordBufferedArrays[iMinUsed].crc;
++ break;
++ }
++ }
++ if (j == nDiscardedCrcs) {
++ discardedCrcs =
++ realloc(discardedCrcs,
++ sizeof(int) * (nDiscardedCrcs + 1));
++ discardedCrcs[nDiscardedCrcs++] =
++ recordBufferedArrays[iMinUsed].crc;
++ }
++ fprintf(stderr, "discarding %x\n",
++ recordBufferedArrays[iMinUsed].crc);
++
++ memorize_array = iMinUsed;
++ recordBufferedArrays[iMinUsed].n_used = 1;
++ recordBufferedArrays[iMinUsed].crc = crc;
++ recordBufferedArrays[iMinUsed].size = bytes_size;
++ recordBufferedArrays[iMinUsed].last_use = instr_count;
++ }
++
++ if (reuse_array != -1) {
++ WRITE_SHORT(reuse_array_func);
++ WRITE_SHORT(reuse_array);
++ } else if (memorize_array != -1) {
++ WRITE_SHORT(memorize_array_func);
++ WRITE_SHORT(memorize_array);
++ }
++ }
++
++ switch (func_number) {
++ case glXChooseVisual_func:
++ case glXQueryVersion_func:
++ case glXQueryExtension_func:
++ case glXGetClientString_func:
++ case glXQueryExtensionsString_func:
++ case glXQueryServerString_func:
++ case glXGetProcAddress_fake_func:
++ case glXGetProcAddress_global_fake_func:
++ case glXGetConfig_func:
++ case glXGetConfig_extended_func:
++ case glGetIntegerv_func:
++ case glGetFloatv_func:
++ case glGetBooleanv_func:
++ case glGetDoublev_func:
++ case glIsEnabled_func:
++ case _glGetError_fake_func:
++ case glGetString_func:
++ {
++ do_default = 0;
++ break;
++ }
++
++ case glLoadMatrixd_func:
++ {
++ int j;
++
++ WRITE_SHORT(glLoadMatrixf_func);
++ double *ptr = (double *) args[0];
++
++ for (j = 0; j < 16; j++) {
++ WRITE_FLOAT(ptr[j]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glMultMatrixd_func:
++ {
++ int j;
++
++ WRITE_SHORT(glMultMatrixf_func);
++ double *ptr = (double *) args[0];
++
++ for (j = 0; j < 16; j++) {
++ WRITE_FLOAT(ptr[j]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glTranslated_func:
++ {
++ WRITE_SHORT(glTranslatef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glScalef_func:
++ {
++ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
++ && *(float *) &args[2] == 1)
++ do_default = 0;
++ break;
++ }
++
++ case glScaled_func:
++ {
++ if (!
++ (*(double *) args[0] == 1 && *(double *) args[1] == 1
++ && *(double *) args[2] == 1)) {
++ WRITE_SHORT(glScalef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glRotated_func:
++ {
++ WRITE_SHORT(glRotatef_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ WRITE_FLOAT(*(double *) args[3]);
++ do_default = 0;
++ break;
++ }
++#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
++
++ case glRasterPos2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glRasterPos2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertex2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glVertex2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glTexCoord2i_func:
++ {
++ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(args[0]);
++ WRITE_SHORT(args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glTexCoord2fv_func:
++ {
++ float *ptr = (float *) args[0];
++ float u = ptr[0];
++ float v = ptr[1];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi)) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glTexCoord2f_func:
++ {
++ float u = *(float *) &args[0];
++ float v = *(float *) &args[1];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi)) {
++ WRITE_SHORT(glTexCoord2s_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glColor3f_func:
++ {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glColor4f_func:
++ {
++ if (*(float *) &args[3] == 1) {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ } else {
++ WRITE_SHORT(glColor4ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
++ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glColor4fv_func:
++ {
++ float *ptr = (float *) args[0];
++
++ if (ptr[3] == 1) {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
++ } else {
++ WRITE_SHORT(glColor4ub_func);
++ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
++ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
++ }
++ do_default = 0;
++ break;
++ }
++
++ case glColor3d_func:
++ {
++ WRITE_SHORT(glColor3ub_func);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
++ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glVertex3f_func:
++ {
++ if (*(float *) &args[2] == 0) {
++ WRITE_SHORT(glVertex2f_func);
++ WRITE_FLOAT(*(float *) &args[0]);
++ WRITE_FLOAT(*(float *) &args[1]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertex3d_func:
++ {
++ WRITE_SHORT(glVertex3f_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glNormal3fv_func:
++ {
++ float *ptr = (float *) args[0];
++ float u = ptr[0];
++ float v = ptr[1];
++ float w = ptr[2];
++
++ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
++ && fabs(w - (int) w) < 1e-7) {
++ int ui = (int) u;
++ int vi = (int) v;
++ int wi = (int) w;
++
++ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
++ WRITE_SHORT(glNormal3sv_func);
++ WRITE_SHORT(ui);
++ WRITE_SHORT(vi);
++ WRITE_SHORT(wi);
++ do_default = 0;
++ }
++ }
++ break;
++ }
++
++ case glNormal3d_func:
++ {
++ WRITE_SHORT(glNormal3f_func);
++ WRITE_FLOAT(*(double *) args[0]);
++ WRITE_FLOAT(*(double *) args[1]);
++ WRITE_FLOAT(*(double *) args[2]);
++ do_default = 0;
++ break;
++ }
++
++ case glDrawElements_func:
++ {
++ int mode = args[0];
++ int count = args[1];
++ int type = args[2];
++
++ if (type == GL_UNSIGNED_INT) {
++ int j;
++ unsigned int *ptr = (unsigned int *) args[3];
++
++ for (j = 0; j < count; j++) {
++ if ((ptr[j] >> 16) != 0)
++ break;
++ }
++ if (j == count) {
++ WRITE_SHORT(func_number);
++ WRITE_INT(mode);
++ WRITE_INT(count);
++ WRITE_INT(GL_UNSIGNED_SHORT);
++ if (reuse_array != -1) {
++ WRITE_INT(0);
++ } else {
++ WRITE_INT(count * sizeof(short));
++ for (j = 0; j < count; j++) {
++ WRITE_SHORT(ptr[j]);
++ }
++ }
++ do_default = 0;
++ } else
++ do_default = 1;
++ } else if (reuse_array != -1) {
++ WRITE_SHORT(func_number);
++ WRITE_INT(mode);
++ WRITE_INT(count);
++ WRITE_INT(type);
++ WRITE_INT(0);
++ do_default = 0;
++ } else
++ do_default = 1;
++ break;
++ }
++
++ case glBufferDataARB_func:
++ {
++ if (reuse_array != -1) {
++ WRITE_SHORT(glBufferDataARB_func);
++ WRITE_INT(args[0]);
++ WRITE_INT(args[1]);
++ WRITE_INT(0);
++ WRITE_INT(args[3]);
++ do_default = 0;
++ }
++ break;
++ }
++
++ case glVertexPointer_fake_func:
++ case glTexCoordPointer_fake_func:
++ case glTexCoordPointer01_fake_func:
++ {
++ int offset = 0, index = 0, size, type, stride, bytes_size;
++ void *ptr;
++ int countarg = 0;
++
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ offset = args[countarg++];
++ if (func_number == glTexCoordPointer_fake_func)
++ index = args[countarg++];
++ size = args[countarg++];
++ type = args[countarg++];
++ stride = args[countarg++];
++ bytes_size = args[countarg++];
++ ptr = (void *) args[countarg++];
++ if (type == GL_DOUBLE) {
++ int count;
++ int j, k;
++
++ if (stride == 0)
++ stride = size * sizeof(double);
++ assert((bytes_size % stride) == 0);
++ assert((offset % stride) == 0);
++ offset = (offset / stride) * size * sizeof(float);
++ count = bytes_size / stride;
++ WRITE_SHORT(func_number);
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(offset);
++ if (func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(index);
++ WRITE_INT(size);
++ WRITE_INT(GL_FLOAT);
++ WRITE_INT(0);
++ WRITE_INT(count * size * sizeof(float));
++ if (reuse_array != -1) {
++ WRITE_INT(0);
++ } else {
++ WRITE_INT(count * size * sizeof(float));
++ for (j = 0; j < count; j++) {
++ for (k = 0; k < size; k++) {
++ WRITE_FLOAT(*(double *)
++ (ptr + j * stride +
++ k * sizeof(double)));
++ }
++ }
++ }
++ do_default = 0;
++ } else if (reuse_array != -1) {
++ WRITE_SHORT(func_number);
++ if (func_number == glVertexPointer_fake_func ||
++ func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(offset);
++ if (func_number == glTexCoordPointer_fake_func)
++ WRITE_INT(index);
++ WRITE_INT(size);
++ WRITE_INT(type);
++ WRITE_INT(stride);
++ WRITE_INT(bytes_size);
++ WRITE_INT(0);
++ do_default = 0;
++ } else
++ do_default = 1;
++ break;
++ }
++
++ default:
++ break;
++ }
++
++ if (do_default) {
++ fwrite(&func_number, sizeof(short), 1, compressed_file);
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ char c = args[i];
++
++ fwrite(&c, sizeof(c), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ short s = args[i];
++
++ fwrite(&s, sizeof(s), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:{
++ int n = args[i];
++ fwrite(&n, sizeof(int), 1, compressed_file);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ fwrite(&args_size[i], sizeof(int), 1,
++ compressed_file);
++ if (args_size[i]) {
++ fwrite((void *) args[i], args_size[i], 1,
++ compressed_file);
++ }
++ break;
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ fwrite(&args_size[i], sizeof(int), 1,
++ compressed_file);
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ fwrite((void *) args[i], args_size[i], 1,
++ compressed_file);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ }
++ }
++
++ int new_offset = ftell(f);
++
++ if (show_offset ||
++ (show_diff_offset &&
++ new_offset - last_cmd_offset >= show_diff_offset)) {
++ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
++ new_offset - last_cmd_offset);
++ }
++ last_cmd_offset = new_offset;
++
++ if (func_number == glXCreateContext_func &&
++ args[1] == visualid_fbconfig_read) {
++ args[1] = visualid_fbconfig_real;
++ }
++ if (debug) {
++ if (func_number == glBindProgramARB_func) {
++ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
++ (int) args[1]);
++ } else if (func_number == glXGetProcAddress_fake_func) {
++ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
++ (char *) args[0]);
++ }
++ }
++
++ if (debug && func_number == glEnable_func) {
++ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
++ } else if (debug && func_number == glDisable_func) {
++ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
++ }
++
++ if (resize) {
++ if (func_number == _moveResizeWindow_func) {
++ int *params = (int *) args[1];
++
++ orig_window_width = params[2];
++ window_height = params[3] =
++ params[3] * window_width / params[2];
++ params[2] = window_width;
++ // buffer = malloc(4 * window_width * window_height);
++ } else if (func_number == glViewport_func ||
++ func_number == glScissor_func) {
++ args[0] = args[0] * window_width / orig_window_width;
++ args[1] = args[1] * window_width / orig_window_width;
++ args[2] = args[2] * window_width / orig_window_width;
++ args[3] = args[3] * window_width / orig_window_width;
++ }
++ } else if (func_number == _moveResizeWindow_func) {
++ int *params = (int *) args[1];
++
++ window_width = params[2];
++ window_height = params[3];
++ // buffer = malloc(4 * window_width * window_height);
++ }
++
++ int ret =
++ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
++
++ if (func_number == glXSwapBuffers_func) {
++ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
++ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
++ * window_height, 1, fout); */
++
++ int diff_time;
++
++ count_current++;
++ gettimeofday(&current_time, NULL);
++ diff_time =
++ (current_time.tv_sec - last_time.tv_sec) * 1000 +
++ (current_time.tv_usec - last_time.tv_usec) / 1000;
++ if (diff_time > refresh_rate) {
++ printf("%d frames in %.1f seconds = %.3f FPS\n",
++ count_current - count_last_time, diff_time / 1000.,
++ (count_current - count_last_time) * 1000. / diff_time);
++ if (show_hard_disk_bandwith) {
++ int current_offset = ftell(f);
++
++ printf("bandwidth : %.1f MB/s\n",
++ (current_offset - last_offset) * 1e-6);
++ last_offset = current_offset;
++ }
++ last_time.tv_sec = current_time.tv_sec;
++ last_time.tv_usec = current_time.tv_usec;
++ count_last_time = count_current;
++ }
++ usleep(slowdown * 50000);
++ }
++ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
++ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
++ *(int *) args[1]);
++ }
++
++ if (func_number == glXGetVisualFromFBConfig_func) {
++ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
++ visualid_fbconfig_real = ret;
++ }
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_POINTERS:
++ case TYPE_DOUBLE:
++ if (args[i])
++ free((void *) args[i]);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ do_disconnect_current();
++ return 0;
++ }
++ }
++ }
++ return 0;
++}
+Index: qemu-0.12.4/target-i386/opengl_server.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/opengl_server.c
+@@ -0,0 +1,826 @@
++/*
++ * TCP/IP OpenGL server
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
++
++#include <stdio.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <assert.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <netinet/tcp.h>
++#include <netdb.h>
++#include <arpa/inet.h>
++#include <sys/time.h>
++#include <signal.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define PORT 5555
++
++#define ENABLE_GL_LOG
++
++#include "opengl_func.h"
++#include "opengl_utils.h"
++
++static int refresh_rate = 1000;
++static int must_save = 0;
++static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
++
++extern int display_function_call;
++extern void init_process_tab(void);
++extern int do_function_call(Display *, int, int, arg_t *, char *);
++extern void opengl_exec_set_local_connection(void);
++extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
++
++#ifdef ENABLE_GL_LOG
++static FILE* f = NULL;
++
++static char* filename = "/tmp/debug_gl.bin";
++
++#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
++
++static void inline write_gl_debug_cmd_char(char my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_short(short my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_int(int my_int)
++{
++ write_gl_debug_init();
++ fwrite(&my_int, sizeof(my_int), 1, f);
++}
++
++static void inline write_gl_debug_cmd_longlong(long long my_longlong)
++{
++ write_gl_debug_init();
++ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
++{
++ write_gl_debug_init();
++ fwrite(&size, sizeof(int), 1, f);
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
++{
++ write_gl_debug_init();
++ if (size)
++ fwrite(buffer, size, 1, f);
++}
++
++static void inline write_gl_debug_end()
++{
++ write_gl_debug_init();
++ fclose(f);
++ f = NULL;
++}
++
++#endif
++
++static void write_sock_data(int sock, void* data, int len)
++{
++ if (len && data)
++ {
++ int offset = 0;
++ while(offset < len)
++ {
++ int nwritten = write(sock, data + offset, len - offset);
++ if (nwritten == -1)
++ {
++ if (errno == EINTR)
++ continue;
++ perror("write");
++ assert(nwritten != -1);
++ }
++ offset += nwritten;
++ }
++ }
++}
++
++static void inline write_sock_int(int sock, int my_int)
++{
++ write_sock_data(sock, &my_int, sizeof(int));
++}
++
++static int total_read = 0;
++static void read_sock_data(int sock, void* data, int len)
++{
++ if (len)
++ {
++ int offset = 0;
++ while(offset < len)
++ {
++ int nread = read(sock, data + offset, len - offset);
++ if (nread == -1)
++ {
++ if (errno == EINTR)
++ continue;
++ perror("read");
++ assert(nread != -1);
++ }
++ if (nread == 0)
++ {
++ fprintf(stderr, "nread = 0\n");
++ }
++ assert(nread > 0);
++ offset += nread;
++ total_read += nread;
++ }
++ }
++}
++
++static int inline read_sock_int(int sock)
++{
++ int ret;
++ read_sock_data(sock, &ret, sizeof(int));
++ return ret;
++}
++
++static short inline read_sock_short(int sock)
++{
++ short ret;
++ read_sock_data(sock, &ret, sizeof(short));
++ return ret;
++}
++
++
++static Display* dpy = NULL;
++static int parent_xid = -1;
++
++
++static struct timeval last_time, current_time, time_stamp_start;
++static int count_last_time = 0, count_current = 0;
++
++static struct timeval last_read_time, current_read_time;
++
++int has_x_error = 0;
++
++int
++read_from_client (int sock)
++{
++ arg_t args[50];
++ int args_size[50];
++ char ret_string[32768];
++ char command_buffer[65536*16];
++
++ if (dpy == NULL)
++ {
++ init_process_tab();
++ dpy = XOpenDisplay(NULL);
++ if (parent_xid != -1)
++ {
++ opengl_exec_set_parent_window(dpy, parent_xid);
++ }
++ }
++
++ int i;
++ int func_number = read_sock_short(sock);
++
++ Signature* signature = (Signature*)tab_opengl_calls[func_number];
++ int ret_type = signature->ret_type;
++ int nb_args = signature->nb_args;
++ int* args_type = signature->args_type;
++ int pid = 0;
++
++ if (func_number == _serialized_calls_func)
++ {
++ int command_buffer_size = read_sock_int(sock);
++ int commmand_buffer_offset = 0;
++ read_sock_data(sock, command_buffer, command_buffer_size);
++ /* TODO: must convert if client is different word size */
++
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
++#endif
++
++ while(commmand_buffer_offset < command_buffer_size)
++ {
++ func_number = *(short*)(command_buffer + commmand_buffer_offset);
++ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
++ {
++ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
++ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
++ commmand_buffer_offset, command_buffer_size);
++ exit(-1);
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(func_number);
++#endif
++ commmand_buffer_offset += sizeof(short);
++
++
++ signature = (Signature*)tab_opengl_calls[func_number];
++ ret_type = signature->ret_type;
++ assert(ret_type == TYPE_NONE);
++ nb_args = signature->nb_args;
++ args_type = signature->args_type;
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_char(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:
++ {
++ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args[i]);
++#endif
++ commmand_buffer_offset += sizeof(int);
++ break;
++ }
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
++ commmand_buffer_offset += sizeof(int);
++
++ if (args_size[i] == 0)
++ {
++ args[i] = 0;
++ }
++ else
++ {
++ args[i] = (long)(command_buffer + commmand_buffer_offset);
++ }
++
++ if (args[i] == 0)
++ {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
++#endif
++ commmand_buffer_offset += args_size[i];
++
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
++#endif
++ commmand_buffer_offset += args_size[i];
++ break;
++ }
++
++ CASE_OUT_POINTERS:
++ {
++ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args[i] = (long)(command_buffer + commmand_buffer_offset);
++ args_size[i] = tab_args_type_length[args_type[i]];
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
++#endif
++ commmand_buffer_offset += tab_args_type_length[args_type[i]];
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ break;
++ }
++ }
++
++ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
++
++ do_function_call(dpy, func_number, 1, args, ret_string);
++ }
++ }
++ else
++ {
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
++#endif
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_char(args[i]);
++#endif
++ break;
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_short(args[i]);
++#endif
++ break;
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_FLOAT:
++ args[i] = read_sock_int(sock);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args[i]);
++#endif
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = read_sock_int(sock);
++ if (args_size[i])
++ {
++ args[i] = (long)malloc(args_size[i]);
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++ }
++ else
++ {
++ args[i] = 0;
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ }
++ }
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
++#endif
++ break;
++ }
++
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ {
++ args_size[i] = compute_arg_length(stderr, func_number, i, args);
++ args[i] = (long)malloc(args_size[i]);
++ break;
++ }
++
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = read_sock_int(sock);
++ if (func_number == glGetProgramLocalParameterdvARB_func)
++ {
++ fprintf(stderr, "size = %d\n", args_size[i]);
++ }
++ if (args_size[i])
++ {
++ args[i] = (long)malloc(args_size[i]);
++ }
++ else
++ {
++ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
++ {
++ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
++ return 0;
++ };
++ args[i] = 0;
++ }
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_int(args_size[i]);
++#endif
++ break;
++ }
++
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ args_size[i] = tab_args_type_length[args_type[i]];
++ assert(args_size[i]);
++ args[i] = (long)malloc(args_size[i]);
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++ break;
++ }
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ args_size[i] = tab_args_type_length[args_type[i]];
++ args[i] = (long)malloc(args_size[i]);
++ read_sock_data(sock, (void*)args[i], args_size[i]);
++#ifdef ENABLE_GL_LOG
++ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
++#endif
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ break;
++ }
++ }
++
++ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
++
++ if (getenv("ALWAYS_FLUSH")) fflush(f);
++
++ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number == glXGetVisualFromFBConfig_func)
++ {
++ write_gl_debug_cmd_int(ret);
++ }
++#endif
++
++ for(i=0;i<nb_args;i++)
++ {
++ switch(args_type[i])
++ {
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ case TYPE_FLOAT:
++ break;
++
++ case TYPE_NULL_TERMINATED_STRING:
++ case TYPE_DOUBLE:
++ CASE_IN_POINTERS:
++ if (args[i]) free((void*)args[i]);
++ break;
++
++ CASE_OUT_POINTERS:
++ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
++ write_sock_data(sock, (void*)args[i], args_size[i]);
++ if (display_function_call)
++ {
++ if (args_type[i] == TYPE_OUT_1INT)
++ {
++ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
++ }
++ else if (args_type[i] == TYPE_OUT_1FLOAT)
++ {
++ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
++ }
++ }
++ if (args[i]) free((void*)args[i]);
++ break;
++
++ case TYPE_IN_IGNORED_POINTER:
++ args[i] = 0;
++ break;
++
++ default:
++ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
++ return 0;
++ break;
++ }
++ }
++
++ if (signature->ret_type == TYPE_CONST_CHAR)
++ {
++ write_sock_int(sock, strlen(ret_string) + 1);
++ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
++ }
++ else if (signature->ret_type != TYPE_NONE)
++ {
++ write_sock_int(sock, ret);
++ }
++
++#ifdef ENABLE_GL_LOG
++ if (must_save && func_number == _exit_process_func)
++ {
++ write_gl_debug_end();
++ }
++#endif
++ if (func_number == _exit_process_func)
++ {
++ return -1;
++ }
++ else if (func_number == glXSwapBuffers_func)
++ {
++ int diff_time;
++ count_current++;
++ gettimeofday(&current_time, NULL);
++#ifdef ENABLE_GL_LOG
++ if (must_save && timestamp)
++ {
++ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
++ /* -1 is special code that indicates time synchro */
++ write_gl_debug_cmd_short(timesynchro_func);
++ write_gl_debug_cmd_longlong(ts);
++ }
++#endif
++ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
++ if (diff_time > refresh_rate)
++ {
++#ifdef ENABLE_GL_LOG
++ fflush(f);
++#endif
++ printf("%d frames in %.1f seconds = %.3f FPS\n",
++ count_current - count_last_time,
++ diff_time / 1000.,
++ (count_current - count_last_time) * 1000. / diff_time);
++ last_time.tv_sec = current_time.tv_sec;
++ last_time.tv_usec = current_time.tv_usec;
++ count_last_time = count_current;
++ }
++ }
++ }
++ return 0;
++}
++
++int
++make_socket (uint16_t port)
++{
++ int sock;
++ struct sockaddr_in name;
++
++ /* Create the socket. */
++ sock = socket (PF_INET, SOCK_STREAM, 0);
++ if (sock < 0)
++ {
++ perror ("socket");
++ exit (EXIT_FAILURE);
++ }
++
++ /* Give the socket a name. */
++ name.sin_family = AF_INET;
++ name.sin_port = htons (port);
++ name.sin_addr.s_addr = htonl (INADDR_ANY);
++ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
++ {
++ perror ("bind");
++ exit (EXIT_FAILURE);
++ }
++
++ return sock;
++}
++
++static int x_error_handler(Display *display,
++ XErrorEvent *error)
++{
++ char buf[64];
++ XGetErrorText(display, error->error_code, buf, 63);
++ fprintf (stderr, "The program received an X Window System error.\n"
++ "This probably reflects a bug in the program.\n"
++ "The error was '%s'.\n"
++ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
++ buf,
++ error->serial,
++ error->error_code,
++ error->request_code,
++ error->minor_code);
++ has_x_error = 1;
++ return 0;
++}
++
++void usage()
++{
++ printf("Usage : opengl_server [OPTION]\n\n");
++ printf("The following options are available :\n");
++ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
++ printf("--debug : output debugging trace on stderr\n");
++ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
++ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
++ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
++ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
++ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
++ printf(" or from another emulator, through TCP/IP\n");
++ printf("--h or --help : display this help\n");
++}
++
++int
++main (int argc, char* argv[])
++{
++ int sock;
++ fd_set active_fd_set, read_fd_set;
++ int i;
++ struct sockaddr_in clientname;
++ socklen_t size;
++ int port = PORT;
++ int different_windows = 0;
++
++ for(i=1;i<argc;i++)
++ {
++ if (argv[i][0] == '-' && argv[i][1] == '-')
++ argv[i] = argv[i]+1;
++
++ if (strcmp(argv[i], "-debug") == 0)
++ {
++ display_function_call = 1;
++ }
++ else if (strcmp(argv[i], "-save") == 0)
++ {
++ must_save = 1;
++ }
++ else if (strncmp(argv[i], "-port=",6) == 0)
++ {
++ port = atoi(argv[i] + 6);
++ }
++ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
++ {
++ filename = argv[i] + strlen("-filename=");
++ }
++ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
++ {
++ char* c = argv[i] + strlen("-parent-xid=");
++ parent_xid = strtol(c, NULL, 0);
++ different_windows = 1;
++ }
++ else if (strcmp(argv[i], "-different-windows") == 0)
++ {
++ different_windows = 1;
++ }
++ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
++ {
++ usage();
++ return 0;
++ }
++ else
++ {
++ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
++ usage();
++ return -1;
++ }
++ }
++
++ /* Create the socket and set it up to accept connections. */
++ sock = make_socket (port);
++
++ int flag = 1;
++ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
++ {
++ perror("setsockopt SO_REUSEADDR");
++ }
++ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
++ {
++ perror("setsockopt TCP_NODELAY");
++ }
++
++ if (listen (sock, 1) < 0)
++ {
++ perror ("listen");
++ exit (EXIT_FAILURE);
++ }
++
++ struct sigaction action;
++ action.sa_handler = SIG_IGN;
++ action.sa_flags = SA_NOCLDWAIT;
++ sigaction(SIGCHLD,&action,NULL);
++
++ FD_ZERO (&active_fd_set);
++ FD_SET (sock, &active_fd_set);
++
++ while(1)
++ {
++ int new, pid;
++
++ read_fd_set = active_fd_set;
++ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
++ {
++ perror ("select");
++ exit (EXIT_FAILURE);
++ }
++
++ size = sizeof (clientname);
++ new = accept (sock, (struct sockaddr *) &clientname, &size);
++ if (new < 0)
++ {
++ perror ("accept");
++ exit (EXIT_FAILURE);
++ }
++ pid = fork();
++ if (pid == -1)
++ {
++ perror ("fork");
++ exit(EXIT_FAILURE);
++ }
++ if (pid == 0)
++ {
++ close(sock);
++
++ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
++ inet_ntoa (clientname.sin_addr),
++ ntohs (clientname.sin_port));
++
++ gettimeofday(&last_time, NULL);
++ gettimeofday(&last_read_time, NULL);
++
++ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
++ different_windows == 0)
++ {
++ opengl_exec_set_local_connection();
++ }
++
++ if (timestamp)
++ {
++ gettimeofday(&time_stamp_start, NULL);
++ }
++
++ XSetErrorHandler(x_error_handler);
++
++ while(1)
++ {
++ if (read_from_client (new) < 0)
++ {
++ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
++
++ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
++ inet_ntoa (clientname.sin_addr),
++ ntohs (clientname.sin_port));
++
++ return 0;
++ }
++ }
++ }
++ else
++ {
++ close(new);
++ }
++ }
++
++ return 0;
++}
+Index: qemu-0.12.4/target-i386/opengl_utils.h
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/opengl_utils.h
+@@ -0,0 +1,453 @@
++/*
++ * Functions used by host & client sides
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++
++#ifndef _OPENGL_UTILS
++#define _OPENGL_UTILS
++
++typedef struct {
++ unsigned int *values;
++ int nbValues;
++} RangeAllocator;
++
++/*
++static void print_range(RangeAllocator* range)
++{
++ int i;
++ printf("%s", "table : ");
++ for(i=0;i<range->nbValues;i++)
++ {
++ printf("%d ", range->values[i]);
++ }
++ printf("\n");
++}
++*/
++
++static inline void alloc_value(RangeAllocator *range, unsigned int value)
++{
++ if (value == 0)
++ return;
++ if (range->nbValues >= 1) {
++ int lower = 0;
++ int upper = range->nbValues - 1;
++
++ while (1) {
++ int mid = (lower + upper) / 2;
++
++ if (range->values[mid] > value)
++ upper = mid;
++ else if (range->values[mid] < value)
++ lower = mid;
++ else
++ break;
++ if (upper - lower <= 1) {
++ if (value < range->values[lower]) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[lower + 1], &range->values[lower],
++ (range->nbValues - lower) * sizeof(int));
++ range->values[lower] = value;
++ range->nbValues++;
++ } else if (value == range->values[lower]) {
++ } else if (value < range->values[upper]) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[upper + 1], &range->values[upper],
++ (range->nbValues - upper) * sizeof(int));
++ range->values[upper] = value;
++ range->nbValues++;
++ } else if (value == range->values[upper]) {
++ } else {
++ upper++;
++
++ range->values =
++ realloc(range->values,
++ (range->nbValues + 1) * sizeof(int));
++ memmove(&range->values[upper + 1], &range->values[upper],
++ (range->nbValues - upper) * sizeof(int));
++ range->values[upper] = value;
++ range->nbValues++;
++ }
++ break;
++ }
++ }
++ } else {
++ range->values = malloc(sizeof(int));
++ range->values[0] = value;
++ range->nbValues = 1;
++ }
++}
++
++/* return first value */
++static inline unsigned int alloc_range(RangeAllocator *range, int n,
++ unsigned int *values)
++{
++ int i, j;
++
++ if (range->nbValues == 0) {
++ range->nbValues = n;
++ range->values = malloc(n * sizeof(int));
++ for (i = 0; i < n; i++) {
++ range->values[i] = i + 1;
++ if (values)
++ values[i] = range->values[i];
++ }
++ return 1;
++ } else {
++ int lastValue = 1;
++
++ for (i = 0; i < range->nbValues; i++) {
++ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
++ range->values =
++ realloc(range->values,
++ (range->nbValues + n) * sizeof(int));
++ memmove(&range->values[i + n], &range->values[i],
++ (range->nbValues - i) * sizeof(int));
++ for (j = 0; j < n; j++) {
++ range->values[i + j] = lastValue + 1 + j;
++ if (values)
++ values[j] = range->values[i + j];
++ }
++ range->nbValues += n;
++ break;
++ } else
++ lastValue = range->values[i];
++ }
++ if (i == range->nbValues) {
++ range->values =
++ realloc(range->values, (range->nbValues + n) * sizeof(int));
++ for (j = 0; j < n; j++) {
++ range->values[i + j] = lastValue + 1 + j;
++ if (values)
++ values[j] = range->values[i + j];
++ }
++ range->nbValues += n;
++ }
++ return lastValue + 1;
++ }
++}
++
++static inline void delete_value(RangeAllocator *range, unsigned int value)
++{
++ if (value == 0)
++ return;
++ if (range->nbValues >= 1) {
++ int lower = 0;
++ int upper = range->nbValues - 1;
++
++ while (1) {
++ int mid = (lower + upper) / 2;
++
++ if (range->values[mid] > value)
++ upper = mid;
++ else if (range->values[mid] < value)
++ lower = mid;
++ else {
++ lower = upper = mid;
++ }
++ if (upper - lower <= 1) {
++ if (value == range->values[lower]) {
++ memmove(&range->values[lower], &range->values[lower + 1],
++ (range->nbValues - lower - 1) * sizeof(int));
++ range->nbValues--;
++ } else if (value == range->values[upper]) {
++ memmove(&range->values[upper], &range->values[upper + 1],
++ (range->nbValues - upper - 1) * sizeof(int));
++ range->nbValues--;
++ }
++ break;
++ }
++ }
++ }
++}
++
++static inline void delete_range(RangeAllocator *range, int n,
++ const unsigned int *values)
++{
++ int i;
++
++ for (i = 0; i < n; i++) {
++ delete_value(range, values[i]);
++ }
++}
++
++static inline void delete_consecutive_values(RangeAllocator *range,
++ unsigned int first, int n)
++{
++ int i;
++
++ for (i = 0; i < n; i++) {
++ delete_value(range, first + i);
++ }
++}
++
++
++/*****************************************************************/
++/* */
++/* CRC LOOKUP TABLE */
++/* ================ */
++/* The following CRC lookup table was generated automagically */
++/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
++/* Program V1.0 using the following model parameters: */
++/* */
++/* Width : 4 bytes. */
++/* Poly : 0x04C11DB7L */
++/* Reverse : TRUE. */
++/* */
++/* For more information on the Rocksoft^tm Model CRC Algorithm, */
++/* see the document titled "A Painless Guide to CRC Error */
++/* Detection Algorithms" by Ross Williams */
++/* (ross@guest.adelaide.edu.au.). This document is likely to be */
++/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
++/* */
++/*****************************************************************/
++
++static const unsigned int crctable[256] = {
++ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
++ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
++ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
++ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
++ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
++ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
++ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
++ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
++ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
++ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
++ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
++ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
++ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
++ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
++ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
++ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
++ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
++ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
++ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
++ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
++ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
++ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
++ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
++ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
++ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
++ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
++ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
++ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
++ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
++ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
++ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
++ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
++ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
++ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
++ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
++ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
++ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
++ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
++ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
++ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
++ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
++ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
++ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
++ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
++ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
++ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
++ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
++ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
++ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
++ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
++ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
++ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
++ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
++ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
++ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
++ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
++ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
++ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
++ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
++ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
++ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
++ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
++ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
++ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
++};
++
++static unsigned int calc_checksum(const void *_ptr, int length,
++ unsigned int seed)
++{
++ int i;
++ unsigned int crc = seed;
++ unsigned char *ptr = (unsigned char *) _ptr;
++
++ if (ptr == NULL)
++ return -1;
++ for (i = 0; i < length; i++) {
++ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
++ }
++ return crc;
++}
++
++
++static inline void display_gl_call(FILE *f,
++ int func_number, arg_t *args, int *args_size)
++{
++ int i;
++
++ if (func_number < 0) {
++ fprintf(f, "unknown call : %d\n", func_number);
++ return;
++ }
++ Signature *signature = (Signature *) tab_opengl_calls[func_number];
++ int nb_args = signature->nb_args;
++ int *args_type = signature->args_type;
++
++ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
++
++ for (i = 0; i < nb_args; i++) {
++ switch (args_type[i]) {
++ case TYPE_UNSIGNED_CHAR:
++ case TYPE_CHAR:
++ {
++ fprintf(f, "%d", (char) args[i]);
++ break;
++ }
++
++ case TYPE_UNSIGNED_SHORT:
++ case TYPE_SHORT:
++ {
++ fprintf(f, "%d", (short) args[i]);
++ break;
++ }
++
++ case TYPE_UNSIGNED_INT:
++ case TYPE_INT:
++ {
++ fprintf(f, "%d", (int) args[i]);
++ break;
++ }
++
++ case TYPE_FLOAT:
++ fprintf(f, "%f", *(float *) &args[i]);
++ break;
++
++ case TYPE_DOUBLE:
++ CASE_IN_KNOWN_SIZE_POINTERS:
++ case TYPE_NULL_TERMINATED_STRING:
++ CASE_IN_UNKNOWN_SIZE_POINTERS:
++ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
++ fprintf(f, "\"%s\"", (char *) args[i]);
++ } else if (args_type[i] == TYPE_DOUBLE)
++ fprintf(f, "%f", *(double *) args[i]);
++ else if (IS_ARRAY_CHAR(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(char)) {
++ int j;
++ int n = args_size[i] / sizeof(char);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_SHORT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(short)) {
++ int j;
++ int n = args_size[i] / sizeof(short);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((short *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_INT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(int)) {
++ int j;
++ int n = args_size[i] / sizeof(int);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%d", ((int *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(float)) {
++ int j;
++ int n = args_size[i] / sizeof(float);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%f", ((float *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
++ args_size[i] <= 4 * sizeof(double)) {
++ int j;
++ int n = args_size[i] / sizeof(double);
++
++ fprintf(f, "(");
++ for (j = 0; j < n; j++) {
++ fprintf(f, "%f", ((double *) args[i])[j]);
++ if (j != n - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")");
++ } else {
++ fprintf(f, "%d bytes", args_size[i]);
++ fprintf(f, "(crc = 0x%x)",
++ calc_checksum((void *) args[i], args_size[i],
++ 0xFFFFFFFF));
++ }
++ break;
++
++ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
++ CASE_OUT_UNKNOWN_SIZE_POINTERS:
++ CASE_OUT_KNOWN_SIZE_POINTERS:
++ {
++ fprintf(f, "%d bytes (OUT)", args_size[i]);
++ break;
++ }
++
++ case TYPE_IN_IGNORED_POINTER:
++ break;
++
++ default:
++ fprintf(f, "shouldn't happen : call %s arg %d\n",
++ tab_opengl_calls_name[func_number], i);
++ return;
++ break;
++ }
++ if (i < nb_args - 1)
++ fprintf(f, ", ");
++ }
++ fprintf(f, ")\n");
++}
++
++#endif
+Index: qemu-0.12.4/target-i386/parse_gl_h.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/parse_gl_h.c
+@@ -0,0 +1,1496 @@
++/*
++ * Parse gl.h et glx.h to auto-generate source code
++ *
++ * Copyright (c) 2006,2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <assert.h>
++
++int isExtByName(const char* name)
++{
++ return (strstr(name, "ARB") != NULL) ||
++ (strstr(name, "IBM") != NULL) ||
++ (strstr(name, "EXT") != NULL) ||
++ (strstr(name, "ATI") != NULL) ||
++ (strstr(name, "NV") != NULL) ||
++ (strstr(name, "MESA") != NULL) ||
++ (strstr(name, "APPLE") != NULL) ||
++ (strstr(name, "SUN") != NULL) ||
++ (strstr(name, "SGI") != NULL);
++}
++
++char* get_arg_type(char* s)
++{
++ while(*s == ' ' || *s == '\t') s++;
++ char* n = s;
++ char* c = strstr(n, "const");
++ if (c)
++ n += 6;
++
++ char* t = strstr(n, " ");
++ if (t)
++ {
++ if (t[1] == '*')
++ t += 2;
++ t[0] = 0;
++ char* ori = t;
++ t = strstr(t+1, "[");
++ if (t)
++ {
++ memmove(ori, t, strlen(t));
++ strstr(ori, "]")[1] = 0;
++ }
++ }
++ return strdup(s);
++}
++
++typedef struct
++{
++ char* type;
++ char* name;
++ int nargs;
++ char** args;
++ int ok;
++ int just_for_server_side;
++ int has_out_parameters;
++ int isExt;
++} FuncDesc;
++
++int isExt(FuncDesc* func)
++{
++ return func->isExt;
++}
++
++char* get_type_string(char* type)
++{
++ if (strstr(type, "[16]"))
++ {
++ if (strstr(type, "float"))
++ return ("TYPE_16FLOAT");
++ else if (strstr(type, "double"))
++ return ("TYPE_16DOUBLE");
++ else
++ {
++ printf("inconnu %s\n", type);
++ exit(-1);
++ }
++ }
++ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
++ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
++ else if (strstr(type, "const GLvoid *"))
++ return "TYPE_ARRAY_VOID";
++ else if (strstr(type, "const GLchar *") ||
++ strstr(type, "const GLcharARB *"))
++ return "TYPE_NULL_TERMINATED_STRING";
++ else if (strstr(type, "const GLbyte *"))
++ return "TYPE_ARRAY_SIGNED_CHAR";
++ else if (strstr(type, "const GLubyte *"))
++ return "TYPE_ARRAY_UNSIGNED_CHAR";
++ else if (strstr(type, "const GLshort *"))
++ return "TYPE_ARRAY_SHORT";
++ else if (strstr(type, "const GLushort *") ||
++ strstr(type, "const GLhalfNV *"))
++ return "TYPE_ARRAY_UNSIGNED_SHORT";
++ else if (strstr(type, "const GLint *"))
++ return "TYPE_ARRAY_INT";
++ else if (strstr(type, "const GLuint *") ||
++ strstr(type, "const GLenum *"))
++ return "TYPE_ARRAY_UNSIGNED_INT";
++ else if (strstr(type, "const GLfloat *") ||
++ strstr(type, "const GLclampf *"))
++ return "TYPE_ARRAY_FLOAT";
++ else if (strstr(type, "const GLdouble *"))
++ return "TYPE_ARRAY_DOUBLE";
++ else if (strstr(type, "GLvoid *"))
++ return "TYPE_OUT_ARRAY_VOID";
++ else if (strstr(type, "GLboolean *") ||
++ strstr(type, "GLubyte *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
++ else if (strstr(type, "GLcharARB *") ||
++ strstr(type, "GLchar *"))
++ return "TYPE_OUT_ARRAY_CHAR";
++ else if (strstr(type, "GLshort *"))
++ return "TYPE_OUT_ARRAY_SHORT";
++ else if (strstr(type, "GLushort *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
++ else if (strstr(type, "GLint *")||
++ strstr(type, "GLsizei *"))
++ return "TYPE_OUT_ARRAY_INT";
++ else if (strstr(type, "GLuint *") ||
++ strstr(type, "GLenum *") ||
++ strstr(type, "GLhandleARB *"))
++ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
++ else if (strstr(type, "GLfloat *"))
++ return "TYPE_OUT_ARRAY_FLOAT";
++ else if (strstr(type, "GLdouble *"))
++ return "TYPE_OUT_ARRAY_DOUBLE";
++ else if (strcmp(type, "void") == 0)
++ return("TYPE_NONE");
++ else if (strcmp(type, "GLbyte") == 0)
++ return("TYPE_CHAR");
++ else if (strcmp(type, "GLubyte") == 0 ||
++ strcmp(type, "GLboolean") == 0)
++ return("TYPE_UNSIGNED_CHAR");
++ else if (strcmp(type, "GLshort") == 0)
++ return("TYPE_SHORT");
++ else if (strcmp(type, "GLushort") == 0 ||
++ strcmp(type, "GLhalfNV") == 0)
++ return("TYPE_UNSIGNED_SHORT");
++ else if (strcmp(type, "GLint") == 0 ||
++ strcmp(type, "GLsizei") == 0 ||
++ strcmp(type, "GLintptr") == 0 ||
++ strcmp(type, "GLsizeiptr") == 0 ||
++ strcmp(type, "GLintptrARB") == 0 ||
++ strcmp(type, "GLsizeiptrARB") == 0)
++ return("TYPE_INT");
++ else if (strcmp(type, "GLenum") == 0 ||
++ strcmp(type, "GLuint") == 0 ||
++ strcmp(type, "GLhandleARB") == 0 ||
++ strcmp(type, "GLbitfield") == 0)
++ return("TYPE_UNSIGNED_INT");
++ else if (strcmp(type, "GLfloat") == 0 ||
++ strcmp(type, "GLclampf") == 0)
++ return("TYPE_FLOAT");
++ else if (strcmp(type, "GLdouble") == 0 ||
++ strcmp(type, "GLclampd") == 0)
++ return("TYPE_DOUBLE");
++ else
++ {
++ printf("inconnu %s\n", type);
++ exit(-1);
++ }
++}
++
++typedef struct
++{
++ char* letter;
++ char* signature_type_name;
++ char* gl_c_type_name;
++ char* c_type_name;
++} ForIsKnownArgVector;
++
++#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
++#define N_FIELDS_IN_ARG_VECTOR 4
++
++
++typedef struct
++{
++ char* func_name;
++ char* signature_type_name;
++} KnownLastArgFunc;
++
++static KnownLastArgFunc knownLastArgFuncs[] =
++{
++{"glFogCoordfv", "TYPE_1FLOAT"},
++{"glFogCoorddv", "TYPE_1DOUBLE"},
++{"glFogCoordfvEXT", "TYPE_1FLOAT"},
++{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
++{"glFogCoordhvNV", "TYPE_1USHORT"},
++
++{"glGetFenceivNV", "TYPE_OUT_1INT"},
++
++{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
++{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
++
++{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
++{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
++{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
++{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
++{"glGetQueryivARB", "TYPE_OUT_1INT"},
++{"glGetQueryiv", "TYPE_OUT_1INT"},
++{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
++{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
++{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
++{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
++{"glGetProgramivARB", "TYPE_OUT_1INT"},
++{"glGetProgramiv", "TYPE_OUT_1INT"},
++{"glGetProgramivNV", "TYPE_OUT_1INT"},
++{"glGetShaderiv", "TYPE_OUT_1INT"},
++
++{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
++{"glCombinerParameterivNV", "TYPE_1INT"},
++
++{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
++{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
++
++{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
++{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
++
++{"glTexBumpParameterivATI", "TYPE_1INT"},
++{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
++{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
++{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
++
++{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
++{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
++{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
++{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
++{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
++{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
++
++{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
++{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
++{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
++{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
++
++{"glCullParameterfvEXT", "TYPE_4FLOAT"},
++{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
++
++{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
++{"glExecuteProgramNV", "TYPE_4FLOAT"},
++
++{"glEdgeFlagv", "TYPE_1UCHAR"},
++
++{"glClipPlane", "TYPE_4DOUBLE"},
++{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
++
++{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
++
++{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
++{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
++{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
++{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
++{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
++
++{"glPixelTransformParameterivEXT", "TYPE_1INT"},
++{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
++{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
++
++{"glColorTableParameterfv", "TYPE_4FLOAT"},
++{"glColorTableParameteriv", "TYPE_4INT"},
++{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
++{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
++{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
++{"glColorTableParameterivEXT", "TYPE_4INT"},
++{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
++{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
++
++{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
++{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
++{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
++{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
++{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
++{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
++{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
++{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
++
++/* Not sure at all for the 2 followingo ones ! */
++{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
++{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
++
++{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
++
++{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
++
++};
++
++int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
++{
++ static ForIsKnownArgVector my_tab[] =
++ {
++ { "b", "CHAR", "GLbyte", "signed char" },
++ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
++ { "s", "SHORT", "GLshort", "short" },
++ { "i", "INT", "GLint", "int" },
++ { "Integer", "INT", "GLint", "int" },
++ { "ub", "CHAR", "GLubyte", "unsigned char" },
++ { "h", "SHORT", "GLhalf", "unsigned short" },
++ { "us", "SHORT", "GLushort", "unsigned short" },
++ { "ui", "INT", "GLuint", "unsigned int" },
++ { "Nb", "CHAR", "GLbyte", "signed char" },
++ { "Ns", "SHORT", "GLshort", "short" },
++ { "Ni", "INT", "GLint", "int" },
++ { "Nub", "CHAR", "GLubyte", "unsigned char" },
++ { "Nus", "SHORT", "GLushort", "unsigned short" },
++ { "Nui", "INT", "GLuint", "unsigned int" },
++
++ { "f", "FLOAT", "GLfloat", "float" },
++ { "Float", "FLOAT", "GLfloat", "float" },
++ { "d", "DOUBLE", "GLdouble", "double" },
++ };
++
++ if (desc->nargs == 0)
++ return 0;
++
++ int i , j;
++
++ if (strstr(desc->name, "glVertexAttribs") ||
++ strstr(desc->name, "glProgramParameters") ||
++ strstr(desc->name, "glProgramEnvParameters") ||
++ strstr(desc->name, "glProgramLocalParameters") ||
++ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
++ return 0;
++
++ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
++ char signature[10];
++
++ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
++ {
++ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
++ {
++ if (p_signature_type_name)
++ {
++ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
++ }
++ if (p_c_type_name)
++ {
++ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
++ *p_c_type_name = "float";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
++ *p_c_type_name = "double";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
++ *p_c_type_name = "unsigned int";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
++ *p_c_type_name = "int";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
++ *p_c_type_name = "unsigned short";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
++ *p_c_type_name = "short";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
++ *p_c_type_name = "unsigned char";
++ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
++ *p_c_type_name = "char";
++ else
++ assert(0);
++ }
++ return 1;
++ }
++ }
++
++ for(i=0;i<N_ELEMENTS(my_tab);i++)
++ {
++ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
++ {
++ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
++ sprintf(signature, "%sv", my_tab[i].letter);
++ else
++ sprintf(signature, "%d%sv", j, my_tab[i].letter);
++ if (strstr(desc->name, signature) &&
++ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
++ strstr(desc->args[desc->nargs - 1], "*"))
++ {
++ if (p_signature_type_name)
++ {
++ if (signatures[i][j-1][0] == 0)
++ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
++ *p_signature_type_name = signatures[i][j-1];
++ }
++ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
++ return 1;
++ }
++ }
++ }
++ return 0;
++}
++
++static void print_server_side_argument(FILE* server_stub, int j, char* glType)
++{
++ const char* symbolic_type = get_type_string(glType);
++ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
++ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
++ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
++ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
++ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
++ fprintf(server_stub, "(const float*)(args[%d])", j);
++ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
++ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
++ fprintf(server_stub, "(const double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
++ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
++ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
++ fprintf(server_stub, "(const char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
++ fprintf(server_stub, "(const short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
++ fprintf(server_stub, "(const int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
++ fprintf(server_stub, "(const float*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
++ fprintf(server_stub, "(const double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
++ fprintf(server_stub, "(const char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
++ fprintf(server_stub, "(const signed char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
++ fprintf(server_stub, "(const void*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
++ fprintf(server_stub, "(short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
++ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
++ fprintf(server_stub, "(int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
++ fprintf(server_stub, "(float*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
++ fprintf(server_stub, "(double*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
++ fprintf(server_stub, "(void*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
++ fprintf(server_stub, "(char*)(args[%d])", j);
++ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
++
++ else
++ {
++ fprintf(stderr, "Unknown : %s\n", symbolic_type);
++ assert(0);
++ }
++}
++
++static const char* func_dealt_by_hand[500] = { NULL };
++
++
++static const char* ignore_func[] =
++{
++ "glGetPointerv",
++ "glRectdv",
++ "glRectfv",
++ "glRectiv",
++ "glRectsv",
++ "glMultiDrawArrays",
++ "glMultiDrawArraysEXT",
++ "glMultiDrawElements",
++ "glMultiDrawElementsEXT",
++ "glUnmapBuffer",
++ "glUnmapBufferARB",
++ "glLoadTransposeMatrixf",
++ "glLoadTransposeMatrixd",
++ "glMultTransposeMatrixf",
++ "glMultTransposeMatrixd",
++ "glLoadTransposeMatrixfARB",
++ "glLoadTransposeMatrixdARB",
++ "glMultTransposeMatrixfARB",
++ "glMultTransposeMatrixdARB",
++
++ "glPixelDataRangeNV",
++ "glFlushPixelDataRangeNV",
++ "glVertexArrayRangeNV",
++ "glFlushVertexArrayRangeNV",
++ "glVertexWeightfEXT",
++
++ "glGetBufferPointerv",
++ "glGetBufferPointervARB",
++ "glGetVertexAttribPointerv",
++ "glGetVertexAttribPointervARB",
++ "glVertexAttribPointer",
++ "glVertexAttribPointerARB",
++ "glGetVariantPointervEXT",
++ NULL,
++};
++
++void get_func_dealt_by_hand()
++{
++ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
++ char buffer[256];
++ int i = 0;
++ char* c;
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, "MAGIC_MACRO("))
++ {
++ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
++ * strstr(func_dealt_by_hand[i], ")") = 0;
++ c = strstr(func_dealt_by_hand[i], "_");
++ if (c && c != func_dealt_by_hand[i]) *c = 0;
++ i ++;
++ }
++ }
++ fclose(f);
++
++ int j = 0;
++ while(ignore_func[j])
++ {
++ func_dealt_by_hand[i] = ignore_func[j];
++ i++;
++ j++;
++ }
++}
++
++static const char* just_for_server_side_list[] =
++{
++ "glEnableClientState",
++ "glDisableClientState",
++ "glPushClientAttrib",
++ "glPopClientAttrib",
++ "glPixelStorei",
++ "glPixelStoref",
++ "glClientActiveTexture",
++ "glClientActiveTextureARB",
++ "glEnableVertexAttribArray",
++ "glEnableVertexAttribArrayARB",
++ "glDisableVertexAttribArray",
++ "glDisableVertexAttribArrayARB",
++ "glDrawElementArrayATI",
++ "glDrawRangeElementArrayATI",
++ "glGenSymbolsEXT",
++ "glFreeObjectBufferATI",
++ "glUnmapObjectBufferATI",
++ "glLockArraysEXT",
++ "glUnlockArraysEXT",
++ "glDepthFunc",
++ "glFogf",
++ "glFogi",
++ "glClipPlane",
++ "glGetClipPlane",
++
++/* begin of openquartz optimization */
++#if 1
++ "glMatrixMode",
++ "glOrtho",
++ "glFrustum",
++ "glPushMatrix",
++ "glPopMatrix",
++ "glLoadIdentity",
++ "glLoadMatrixd",
++ "glLoadMatrixf",
++ "glMultMatrixd",
++ "glMultMatrixf",
++ "glRotated",
++ "glRotatef",
++ "glScaled",
++ "glScalef",
++ "glTranslated",
++ "glTranslatef",
++#endif
++/* end of openquartz optimization */
++
++ "glGetError",
++ "glActiveTextureARB",
++
++ "glViewport",
++ "glScissor",
++
++ "glBindBufferARB",
++ "glDeleteBuffersARB",
++ "glGenBuffersARB",
++ "glBufferDataARB",
++ "glBufferSubDataARB",
++ "glGetBufferSubDataARB",
++ "glGetBufferParameterivARB",
++ "glBindBuffer",
++ "glDeleteBuffers",
++ "glGenBuffers",
++ "glBufferData",
++ "glBufferSubData",
++ "glGetBufferSubData",
++ "glGetBufferParameteriv",
++
++ "glPushAttrib",
++ "glPopAttrib",
++ "glEnable",
++ "glDisable",
++ "glIsEnabled",
++ "glBindTexture",
++ "glBindTextureEXT",
++ "glFogfv",
++ "glFogiv",
++ "glBitmap",
++ "glGetTexImage",
++ "glReadPixels",
++ "glDrawPixels",
++ "glSelectBuffer",
++ "glFeedbackBuffer",
++
++ "glTexImage1D",
++ "glTexImage2D",
++ "glTexImage3D",
++ "glTexSubImage1D",
++ "glTexSubImage2D",
++ "glTexSubImage3D",
++
++ "glTexImage3DEXT",
++ "glTexSubImage1DEXT",
++ "glTexSubImage2DEXT",
++ "glTexSubImage3DEXT",
++
++ "glGetCompressedTexImage",
++ "glCompressedTexImage1D",
++ "glCompressedTexImage2D",
++ "glCompressedTexImage3D",
++ "glCompressedTexSubImage1D",
++ "glCompressedTexSubImage2D",
++ "glCompressedTexSubImage3D",
++
++ "glGetCompressedTexImageARB",
++ "glCompressedTexImage1DARB",
++ "glCompressedTexImage2DARB",
++ "glCompressedTexImage3DARB",
++ "glCompressedTexSubImage1DARB",
++ "glCompressedTexSubImage2DARB",
++ "glCompressedTexSubImage3DARB",
++
++ "glCallLists",
++ "glNewList",
++ "glDeleteLists",
++ "glGenLists",
++
++ "glGenTextures",
++ "glDeleteTextures",
++ "glDeleteTexturesEXT",
++ "glMap1f",
++ "glMap1d",
++ "glMap2f",
++ "glMap2d",
++ "glGetMapdv",
++ "glGetMapfv",
++ "glGetMapiv",
++ "glGetBooleanv",
++ "glGetIntegerv",
++ "glGetFloatv",
++ "glGetDoublev",
++
++ "glGetPixelMapfv",
++ "glGetPixelMapuiv",
++ "glGetPixelMapusv",
++ "glGetProgramStringARB",
++ "glGetProgramStringNV",
++ "glArrayElement",
++ "glDrawArrays",
++ "glDrawElements",
++ "glDrawRangeElements",
++ "glDrawRangeElementsEXT",
++ "glGetProgramInfoLog",
++ "glGetTexLevelParameteriv",
++ "glGetInfoLogARB",
++ "glGetShaderInfoLog",
++ "glGetAttachedObjectsARB",
++ "glGetAttachedShaders",
++ "glGetActiveUniformARB",
++ "glGetActiveUniform",
++ "glGetUniformLocationARB",
++ "glGetUniformLocation",
++ "glGetUniformfvARB",
++ "glGetUniformfv",
++ "glGetUniformivARB",
++ "glGetUniformiv",
++ "glGetUniformuivEXT",
++ "glGetShaderSourceARB",
++ "glGetShaderSource",
++ "glGetActiveAttribARB",
++ "glGetActiveAttrib",
++ "glGetAttribLocationARB",
++ "glGetAttribLocation",
++
++ "glNewObjectBufferATI",
++ "glUpdateObjectBufferATI",
++
++ "glSetLocalConstantEXT",
++ "glSetInvariantEXT",
++ "glVariantbvEXT",
++ "glVariantsvEXT",
++ "glVariantivEXT",
++ "glVariantfvEXT",
++ "glVariantdvEXT",
++ "glVariantubvEXT",
++ "glVariantusvEXT",
++ "glVariantuivEXT",
++ "glGetVariantBooleanvEXT",
++ "glGetVariantIntegervEXT",
++ "glGetVariantFloatvEXT",
++ "glGetInvariantBooleanvEXT",
++ "glGetInvariantIntegervEXT",
++ "glGetInvariantFloatvEXT",
++ "glGetLocalConstantBooleanvEXT",
++ "glGetLocalConstantIntegervEXT",
++ "glGetLocalConstantFloatvEXT",
++
++ "glMatrixIndexubvARB",
++ "glMatrixIndexusvARB",
++ "glMatrixIndexuivARB",
++
++ "glColorTable",
++ "glColorSubTable",
++ "glGetColorTable",
++ "glConvolutionFilter1D",
++ "glConvolutionFilter2D",
++ "glGetConvolutionFilter",
++ "glSeparableFilter2D",
++ "glGetSeparableFilter",
++ "glGetHistogram",
++ "glGetMinmax",
++ "glColorTableEXT",
++ "glColorSubTableEXT",
++ "glGetColorTableEXT",
++ "glConvolutionFilter1DEXT",
++ "glConvolutionFilter2DEXT",
++ "glGetConvolutionFilterEXT",
++ "glSeparableFilter2DEXT",
++ "glGetSeparableFilterEXT",
++ "glGetHistogramEXT",
++ "glGetMinmaxEXT",
++
++ "glGetTexParameterfv",
++
++ "glGetVertexAttribivARB",
++ "glGetVertexAttribfvARB",
++ "glGetVertexAttribdvARB",
++ "glGetVertexAttribiv",
++ "glGetVertexAttribfv",
++ "glGetVertexAttribdv",
++
++ "glGetDetailTexFuncSGIS",
++ "glGetSharpenTexFuncSGIS",
++
++ "fake_gluBuild2DMipmaps",
++
++ "glRenderMode",
++
++ "glEnableVariantClientStateEXT",
++ "glDisableVariantClientStateEXT",
++
++ "glGetActiveVaryingNV",
++
++ NULL,
++};
++
++static int just_for_server_side_func(char* funcname)
++{
++ int i;
++ for(i=0;just_for_server_side_list[i];i++)
++ {
++ if (strcmp(just_for_server_side_list[i], funcname) == 0)
++ return 1;
++ }
++ return 0;
++}
++
++int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
++{
++ char buffer[256];
++ while(fgets(buffer, 256, f))
++ {
++
++ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
++ {
++ int i = 0;
++ int skip = 0;
++ if (func_dealt_by_hand[0] == 0)
++ {
++ get_func_dealt_by_hand();
++ }
++ while (func_dealt_by_hand[i])
++ {
++ if (strstr(buffer, func_dealt_by_hand[i]))
++ {
++ skip = 1;
++ break;
++ }
++ i++;
++ }
++ if (skip)
++ continue;
++
++ char** args = malloc(15 * sizeof(char*));
++ int narg = 0;
++ char* type = buffer + 6;
++ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
++ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
++ n[-1] = 0;
++ type = strdup(type);
++ n += skip_length;
++ char* fonc = n;
++ n = strstr(n, "(");
++ if (n[-1] == ' ') n[-1] = 0;
++ n[0] = 0;
++ fonc = strdup(fonc);
++ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
++ {
++ }
++ else*/
++
++
++ if (ignoreEXT == 1 && isExtByName(fonc))
++ {
++ free(type);
++ free(fonc);
++ continue;
++ }
++ n++;
++ while(1)
++ {
++ char* virg = strstr(n, ",");
++ if (virg)
++ {
++ args[narg] = n;
++ virg[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++ n = virg+1;
++ }
++ else
++ break;
++ }
++ while (strstr(n, ")") == 0)
++ {
++ fgets(buffer, 256, f);
++ n = buffer;
++ while(1)
++ {
++ char* virg = strstr(n, ",");
++ if (virg)
++ {
++ args[narg] = n;
++ virg[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++ n = virg+1;
++ }
++ else
++ break;
++ }
++ }
++ char* par = strstr(n, ")");
++ args[narg] = n;
++ par[0] = 0;
++ args[narg] = get_arg_type(args[narg]);
++ narg++;
++
++
++ /*printf("%s %s (", type, fonc);
++ for(i=0;i<narg;i++)
++ {
++ printf("%s,", args[i]);
++ }
++ printf(")\n");*/
++
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (strcmp(funcDesc[i].name, fonc) == 0)
++ {
++ if (ignoreEXT == 0)
++ funcDesc[i].isExt = 1;
++ break;
++ }
++ }
++ if (i == funcDescCount)
++ {
++ funcDesc[funcDescCount].type = type;
++ funcDesc[funcDescCount].name = fonc;
++ funcDesc[funcDescCount].nargs = narg;
++ funcDesc[funcDescCount].args = args;
++ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
++ funcDescCount++;
++ }
++ else
++ {
++ free(fonc);
++ free(args);
++ free(type);
++ }
++ /*
++ for(i=0;i<narg;i++)
++ {
++ free(args[i]);
++ }
++ free(fonc);
++ free(type);*/
++ }
++ }
++ return funcDescCount;
++}
++
++typedef struct
++{
++ char* str;
++ int i;
++} StringIntStruct;
++
++StringIntStruct argDependingOnPreviousArgTab[] =
++{
++ { "glLoadProgramNV", 3},
++ { "ProgramNamedParameter", 2},
++ { "glDeleteBuffers", 1},
++ { "glDrawBuffers", 1},
++ { "glGenPrograms", 1},
++ { "glDeletePrograms", 1},
++ { "glGenQueries", 1},
++ { "glDeleteQueries", 1},
++ { "glGenFencesNV", 1},
++ { "glDeleteFencesNV", 1},
++ { "glGenOcclusionQueriesNV", 1},
++ { "glDeleteOcclusionQueriesNV", 1},
++ { "glRequestResidentProgramsNV", 1},
++ { "glDeleteTextures", 1},
++ { "glGenFramebuffersEXT", 1},
++ { "glDeleteFramebuffersEXT", 1},
++ { "glGenRenderbuffersEXT", 1},
++ { "glDeleteRenderbuffersEXT", 1},
++ { "glUniform1fv", 2},
++ { "glUniform2fv", 2},
++ { "glUniform3fv", 2},
++ { "glUniform4fv", 2},
++ { "glUniform1iv", 2},
++ { "glUniform2iv", 2},
++ { "glUniform3iv", 2},
++ { "glUniform4iv", 2},
++ { "glUniform1uivEXT", 2},
++ { "glUniform2uivEXT", 2},
++ { "glUniform3uivEXT", 2},
++ { "glUniform4uivEXT", 2},
++ { "glProgramParameters4fvNV", 3},
++ { "glProgramParameters4dvNV", 3},
++ { "glProgramLocalParameters4fvEXT", 3},
++ { "glProgramLocalParametersI4ivNV", 3},
++ { "glProgramLocalParametersI4uivNV", 3},
++ { "glProgramEnvParameters4fvEXT", 3},
++ { "glProgramEnvParametersI4ivNV", 3},
++ { "glProgramEnvParametersI4uivNV", 3},
++ { "glAreProgramsResidentNV", 1} ,
++ { "glAreProgramsResidentNV", 2} ,
++ { "glAreTexturesResident", 1} ,
++ { "glAreTexturesResident", 2} ,
++ { "glPrioritizeTextures", 1} ,
++ { "glPrioritizeTextures", 2} ,
++ { "glProgramStringARB", 3} ,
++
++ { "glVertexAttribs", 2},
++
++ { "glUniformMatrix", 3 },
++
++ { "glGetVertexAttribfv", 2},
++ { "glGetVertexAttribiv", 2},
++ { "glGetVertexAttribdv", 2},
++ { "glGetVertexAttribIivEXT", 2},
++ { "glGetVertexAttribIuivEXT", 2},
++
++ { "glPointParameterfv", 1},
++ { "glPointParameteriv", 1},
++
++ { "glWeightbvARB", 1},
++ { "glWeightsvARB", 1},
++ { "glWeightivARB", 1},
++ { "glWeightfvARB", 1},
++ { "glWeightdvARB", 1},
++ { "glWeightubvARB", 1},
++ { "glWeightusvARB", 1},
++ { "glWeightuivARB", 1},
++
++ { "glTexEnvfv", 2},
++ { "glTexEnviv", 2},
++ { "glGetTexEnvfv", 2},
++ { "glGetTexEnviv", 2},
++ { "glTexGendv", 2},
++ { "glTexGenfv", 2},
++ { "glTexGeniv", 2},
++ { "glGetTexGendv", 2},
++ { "glGetTexGenfv", 2},
++ { "glGetTexGeniv", 2},
++
++ { "glLightfv", 2},
++ { "glLightiv", 2},
++ { "glGetLightfv", 2},
++ { "glGetLightiv", 2},
++ { "glFragmentLightfvSGIX", 2},
++ { "glFragmentLightivSGIX", 2},
++ { "glGetFragmentLightfvSGIX", 2},
++ { "glGetFragmentLightivSGIX", 2},
++
++
++ { "glLightModelfv", 1},
++ { "glLightModeliv", 1},
++ { "glFragmentLightModelfvSGIX", 1},
++ { "glFragmentLightModelivSGIX", 1},
++
++ { "glMaterialfv", 2},
++ { "glMaterialiv", 2},
++ { "glGetMaterialfv", 2},
++ { "glGetMaterialiv", 2},
++ { "glFragmentMaterialfvSGIX", 2},
++ { "glFragmentMaterialivSGIX", 2},
++ { "glGetFragmentMaterialfvSGIX", 2},
++ { "glGetFragmentMaterialivSGIX", 2},
++
++ { "glFogiv", 1},
++ { "glFogfv", 1},
++
++ { "glTexParameterfv", 2},
++ { "glTexParameteriv", 2},
++ { "glGetTexParameterfv", 2},
++ { "glGetTexParameteriv", 2},
++
++ { "glTexParameterIivEXT", 2},
++ { "glTexParameterIuivEXT", 2},
++ { "glGetTexParameterIivEXT", 2},
++ { "glGetTexParameterIuivEXT", 2},
++
++ { "glPixelMapfv", 2},
++ { "glPixelMapuiv", 2},
++ { "glPixelMapusv", 2},
++
++ { "glDetailTexFuncSGIS", 2 },
++ { "glSharpenTexFuncSGIS", 2 },
++
++ { "glSpriteParameterfvSGIX", 1 },
++ { "glSpriteParameterivSGIX", 1 },
++
++ { "ConvolutionParameter", 2},
++
++ { "glProgramBufferParametersfvNV", 4},
++ { "glProgramBufferParametersIivNV", 4},
++ { "glProgramBufferParametersIuivNV", 4},
++
++ { "glTransformFeedbackAttribsNV", 1},
++ { "glTransformFeedbackVaryingsNV", 2},
++};
++
++int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
++{
++ int i;
++ if (strstr(funcDesc->args[j], "*") == NULL)
++ return 0;
++ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
++ {
++ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
++ return 1;
++ }
++ return 0;
++}
++
++static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
++{
++ int j;
++ for(j=0;j<funcDesc->nargs;j++)
++ {
++ if (j != 0) fprintf(f,", ");
++ if (strstr(funcDesc->args[j], "[16]"))
++ {
++ if (strstr(funcDesc->args[j], "float"))
++ {
++ fprintf(f, "const GLfloat arg_%d[16]", j);
++ }
++ else if (strstr(funcDesc->args[j], "double"))
++ {
++ fprintf(f, "const GLdouble arg_%d[16]", j);
++ }
++ else
++ {
++ exit(-1);
++ }
++ }
++ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
++ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
++ else
++ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
++ }
++}
++
++int main(int argc, char* argv[])
++{
++ FuncDesc funcDesc[3000];
++ int funcDescCount = 0;
++ FILE* f;
++
++ f = fopen("../target-i386/mesa_gl.h", "r");
++ assert(f);
++ /*if (!f)
++ f = fopen("/usr/include/GL/gl.h", "r");*/
++ funcDescCount = parse(f, funcDesc, 0, 1);
++ fclose(f);
++
++ f = fopen("../target-i386/mesa_glext.h", "r");
++ assert(f);
++ /*if (!f)
++ f = fopen("/usr/include/GL/glext.h", "r");*/
++ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
++ fclose(f);
++
++ FILE* header = fopen("gl_func.h", "w");
++ FILE* client_stub = fopen("client_stub.c", "w");
++ FILE* server_stub = fopen("server_stub.c", "w");
++
++ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++ fprintf(header, "#define COMPOSE(x,y) x##y\n");
++ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
++ fprintf(header, "enum {\n"
++ "#include \"gl_func_perso.h\"\n");
++
++ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++
++ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
++
++ int i;
++ for(i=0;i<funcDescCount;i++)
++ {
++ funcDesc[i].ok = 0;
++ char* name = funcDesc[i].name;
++ char* type = funcDesc[i].type;
++ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
++ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
++ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
++ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
++ {
++ int pointer_of_unknown_size = 0;
++ int j;
++
++ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
++ {
++ funcDesc[i].nargs = 0;
++ }
++ for(j=0;j<funcDesc[i].nargs-1;j++)
++ {
++ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
++ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
++ strstr(funcDesc[i].args[j], "[16]") == NULL)
++ {
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
++ }
++ }
++
++ if (pointer_of_unknown_size == 0)
++ {
++ char* signature_type_name;
++ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
++ {
++ if (strstr(signature_type_name, "TYPE_OUT"))
++ funcDesc[i].has_out_parameters = 1;
++ }
++ else
++ {
++ if (funcDesc[i].nargs-1 >= 0)
++ {
++ j = funcDesc[i].nargs-1;
++ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
++ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
++ strstr(funcDesc[i].args[j], "[16]") == NULL)
++ {
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
++ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
++ }
++ }
++ }
++ }
++ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
++ {
++ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
++ {
++ free(funcDesc[i].args[0]);
++ if (strstr(funcDesc[i].name, "Matrixf"))
++ funcDesc[i].args[0] = strdup("GLfloat m[16]");
++ else
++ funcDesc[i].args[0] = strdup("GLdouble m[16]");
++ pointer_of_unknown_size = 0;
++ }
++ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
++ {
++ free(funcDesc[i].args[0]);
++ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
++ pointer_of_unknown_size = 0;
++ }
++ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
++ {
++ free(funcDesc[i].args[0]);
++ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
++ funcDesc[i].has_out_parameters = 1;
++ pointer_of_unknown_size = 0;
++ }
++ }
++ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
++ {
++ fprintf(header, " %s_func,\n", funcDesc[i].name);
++ funcDesc[i].ok = 1;
++ if (just_for_server_side_func(name))
++ funcDesc[i].just_for_server_side = 1;
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
++ funcDesc[i].has_out_parameters = 1;
++ }
++ }
++ else
++ {
++ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
++ }
++ }
++ }
++
++ fprintf(header, " GL_N_CALLS\n};\n");
++
++
++ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
++ fprintf(server_stub, "{\n");
++ fprintf(server_stub, " switch(func_number)\n");
++ fprintf(server_stub, " {\n");
++
++
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
++ funcDesc[i].name,
++ get_type_string(funcDesc[i].type),
++ funcDesc[i].has_out_parameters);
++ fprintf(header, "%d", funcDesc[i].nargs);
++ int j;
++ char* signature_type_name;
++ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
++
++ for(j=0;j<n_args_to_check;j++)
++ {
++ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
++ {
++ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
++ }
++ else
++ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
++ }
++
++ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
++ {
++ fprintf(header, ", %s", signature_type_name);
++ }
++ fprintf(header, "};\n");
++
++
++ if (funcDesc[i].just_for_server_side == 0)
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
++ else
++ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
++ fprintf_prototype_args(client_stub, &funcDesc[i]);
++ fprintf(client_stub, ")\n");
++ fprintf(client_stub, "{\n");
++ if (strcmp(funcDesc[i].type, "void") != 0)
++ {
++ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
++ }
++ else
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
++ }
++
++ /*
++ fprintf(client_stub, " do_opengl_call(%s_func, %s",
++ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ fprintf(client_stub, ", arg_%d", j);
++ }
++ fprintf(client_stub, ");\n");
++ */
++
++ if (funcDesc[i].nargs)
++ {
++ fprintf(client_stub, " long args[] = { ");
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (j > 0) fprintf(client_stub, ", ");
++ if (strstr(funcDesc[i].args[j], "*"))
++ {
++ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
++ }
++ else
++ {
++ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
++ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
++ fprintf(client_stub, "CHAR_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
++ fprintf(client_stub, "SHORT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
++ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
++ fprintf(client_stub, "INT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
++ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
++ fprintf(client_stub, "FLOAT_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
++ fprintf(client_stub, "DOUBLE_TO_ARG");
++ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
++ fprintf(client_stub, "POINTER_TO_ARG");
++ else
++ {
++ fprintf(stderr, "Unknown : %s\n", symbolic_type);
++ assert(0);
++ }
++ fprintf(client_stub, "(arg_%d)", j);
++ }
++ }
++ fprintf(client_stub, "};\n");
++ }
++
++ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
++ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
++ (funcDesc[i].nargs) ? "args" : "NULL");
++
++ if (strcmp(funcDesc[i].type, "void") != 0)
++ {
++ fprintf(client_stub, " return ret;\n");
++ }
++ fprintf(client_stub, "}\n\n");
++ }
++
++ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
++ fprintf(server_stub, " {\n");
++
++ if (isExt(&funcDesc[i]))
++ {
++ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
++ fprintf_prototype_args(server_stub, &funcDesc[i]);
++ fprintf(server_stub, "));\n");
++ }
++
++ fprintf(server_stub, " ");
++
++ if (strcmp(funcDesc[i].type, "void") == 0)
++ ;
++ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
++ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
++ fprintf(server_stub, "*pret_int = ");
++ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
++ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
++ fprintf(server_stub, "*pret_char = ");
++ else
++ {
++ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
++ exit(-1);
++ }
++ /*if (strstr(funcDesc[i].name, "EXT"))
++ {
++ char* dup = strdup(funcDesc[i].name);
++ *strstr(dup, "EXT") = 0;
++ fprintf(server_stub, "%s(", dup);
++ free(dup);
++ }
++ else*/
++ {
++ if (isExt(&funcDesc[i]))
++ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
++ else
++ fprintf(server_stub, "%s(", funcDesc[i].name);
++ }
++ char* c_type_name;
++ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
++ {
++ for(j=0;j<funcDesc[i].nargs - 1;j++)
++ {
++ if (j != 0) fprintf(server_stub,", ");
++ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
++ }
++ if (j != 0) fprintf(server_stub,", ");
++ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
++ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
++ else
++ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
++ }
++ else
++ {
++ for(j=0;j<funcDesc[i].nargs;j++)
++ {
++ if (j != 0) fprintf(server_stub,", ");
++ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
++ }
++ }
++ fprintf(server_stub, ");\n");
++
++ fprintf(server_stub, " break;\n");
++ fprintf(server_stub, " }\n");
++ }
++ }
++
++ fprintf(server_stub, " default:\n");
++ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
++ fprintf(server_stub, " break;\n");
++ fprintf(server_stub, " }\n");
++ fprintf(server_stub, "}\n");
++
++ fprintf(header, "#undef MAGIC_MACRO\n");
++ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
++ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
++ fprintf(header, "{\n");
++ fprintf(header, "#include \"gl_func_perso.h\"\n");
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, " %s_signature,\n", funcDesc[i].name);
++ }
++ }
++ fprintf(header, "};\n\n");
++
++ fprintf(header, "#undef MAGIC_MACRO\n");
++ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
++ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
++ fprintf(header, "{\n");
++ fprintf(header, "#include \"gl_func_perso.h\"\n");
++ for(i=0;i<funcDescCount;i++)
++ {
++ if (funcDesc[i].ok)
++ {
++ fprintf(header, " \"%s\",\n", funcDesc[i].name);
++ }
++ }
++ fprintf(header, "};\n\n");
++
++ fclose(header);
++ fclose(server_stub);
++ fclose(client_stub);
++
++ return 0;
++}
+Index: qemu-0.12.4/target-i386/parse_mesa_get_c.c
+===================================================================
+--- /dev/null
++++ qemu-0.12.4/target-i386/parse_mesa_get_c.c
+@@ -0,0 +1,225 @@
++/*
++ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
++ *
++ * Copyright (c) 2007 Even Rouault
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to deal
++ * in the Software without restriction, including without limitation the rights
++ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++ * copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++ * THE SOFTWARE.
++ */
++
++// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <assert.h>
++
++#include "mesa_gl.h"
++#include "mesa_glext.h"
++
++/* #include "mesa_enums.c" */
++
++int gl_lookup_enum_by_name(const char* name)
++{
++ FILE* f;
++ char buffer[256];
++ char template1[256];
++ char template2[256];
++ int i;
++ sprintf(template1, "#define %s\t", name);
++ sprintf(template2, "#define %s ", name);
++ for(i=0;i<2;i++)
++ {
++ if (i == 0)
++ f = fopen("mesa_gl.h", "r");
++ else
++ f = fopen("mesa_glext.h", "r");
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, template1) || strstr(buffer, template2))
++ {
++ char* c = strstr(buffer, "0x");
++ assert(c);
++ int ret;
++ ret = strtol(c, NULL, 16);
++ return ret;
++ }
++ }
++ fclose(f);
++ }
++
++ return -1;
++}
++
++typedef struct
++{
++ int value;
++ char* name;
++ int nb_elts;
++} Token;
++
++int compare_func(Token* a, Token* b)
++{
++ return a->value - b->value;
++}
++
++typedef struct
++{
++ int i;
++ char* str;
++} Cpl;
++#define CPL(x) {x, #x}
++
++Cpl constantsOneVal[] =
++{
++ CPL(GL_MAX_GENERAL_COMBINERS_NV),
++ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
++};
++#define NB_CONSTANTS_ONE_VAL 11
++
++int main(int argc, char* argv[])
++{
++ FILE* f = fopen("mesa_get.c", "r");
++ char buffer[256];
++ int state = 0;
++ char name[256];
++ int count = 0;
++ char template[256];
++ Token tokens[1000];
++ int ntoken = 0;
++ int i;
++ FILE* outf = fopen("glgetv_cst.h", "w");
++
++ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
++ fprintf(outf, "typedef struct {\n");
++ fprintf(outf, " GLuint count;\n");
++ fprintf(outf, " GLenum token;\n");
++ fprintf(outf, " const char *name;\n");
++ fprintf(outf, "} GlGetConstant ;\n");
++ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
++
++ while(fgets(buffer, 256, f))
++ {
++ if (strstr(buffer, "_mesa_GetBooleanv"))
++ {
++ state = 1;
++ }
++ else if (state == 1)
++ {
++ if (strstr(buffer, "_mesa_GetFloatv"))
++ {
++ break;
++ }
++ else if (strstr(buffer, "case GL_"))
++ {
++ strcpy(name, strstr(buffer, "case GL_") + 5);
++ *strstr(name, ":") = 0;
++ count = 0;
++ strcpy(template, "params[0]");
++ }
++ else if (strstr(buffer, template))
++ {
++ count ++;
++ sprintf(template, "params[%d]", count);
++ }
++ else if (strstr(buffer, "break"))
++ {
++ if (count > 0)
++ {
++ int gl_lookup = gl_lookup_enum_by_name(name);
++ /*
++ int mesa_lookup = _mesa_lookup_enum_by_name(name);
++ if (mesa_lookup != -1)
++ {
++ if(mesa_lookup != gl_lookup)
++ {
++ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
++ exit(-1);
++ }
++ }*/
++ if (gl_lookup == -1)
++ {
++ fprintf(stderr, "not found in includes : %s\n", name);
++ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
++ }
++ else
++ {
++ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
++ tokens[ntoken].value = gl_lookup;
++ tokens[ntoken].nb_elts = count;
++ tokens[ntoken].name = strdup(name);
++ ntoken++;
++ }
++ /*fprintf(outf, "#ifdef %s\n", name);
++ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
++ fprintf(outf, "#endif\n");*/
++ }
++ else
++ fprintf(stderr, "not recognized : %s\n", name);
++ }
++ }
++ }
++
++ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
++ {
++ tokens[ntoken].value = constantsOneVal[i].i;
++ tokens[ntoken].nb_elts = 1;
++ tokens[ntoken].name = strdup(constantsOneVal[i].str);
++ ntoken++;
++ }
++
++ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
++ tokens[ntoken].nb_elts = 1;
++ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
++ ntoken++;
++
++ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
++ tokens[ntoken].nb_elts = 3;
++ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
++ ntoken++;
++
++ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
++ tokens[ntoken].nb_elts = 3;
++ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
++ ntoken++;
++
++ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
++ tokens[ntoken].nb_elts = 4;
++ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
++ ntoken++;
++
++
++ qsort(tokens, ntoken, sizeof(Token), compare_func);
++ for(i=0;i<ntoken;i++)
++ {
++ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
++ }
++ fprintf(outf, "};\n");
++ fclose(f);
++ fclose(outf);
++ return 0;
++}
+Index: qemu-0.12.4/target-i386/translate.c
+===================================================================
+--- qemu-0.12.4.orig/target-i386/translate.c
++++ qemu-0.12.4/target-i386/translate.c
+@@ -743,6 +743,8 @@ static void gen_check_io(DisasContext *s
+ int state_saved;
+ target_ulong next_eip;
+
++ return;
++
+ state_saved = 0;
+ if (s->pe && (s->cpl > s->iopl || s->vm86)) {
+ if (s->cc_op != CC_OP_DYNAMIC)
+@@ -2676,11 +2678,18 @@ static void gen_exception(DisasContext *
+ s->is_jmp = 3;
+ }
+
++int enable_gl = 0;
++
+ /* an interrupt is different from an exception because of the
+ privilege checks */
+ static void gen_interrupt(DisasContext *s, int intno,
+ target_ulong cur_eip, target_ulong next_eip)
+ {
++ if (enable_gl && intno == 0x99) {
++ gen_helper_opengl();
++ return;
++ }
++
+ if (s->cc_op != CC_OP_DYNAMIC)
+ gen_op_set_cc_op(s->cc_op);
+ gen_jmp_im(cur_eip);
+Index: qemu-0.12.4/vl.c
+===================================================================
+--- qemu-0.12.4.orig/vl.c
++++ qemu-0.12.4/vl.c
+@@ -238,6 +238,7 @@ int semihosting_enabled = 0;
+ #ifdef TARGET_ARM
+ int old_param = 0;
+ #endif
++int force_pointer = 0;
+ const char *qemu_name;
+ int alt_grab = 0;
+ int ctrl_grab = 0;
+@@ -246,6 +247,7 @@ unsigned int nb_prom_envs = 0;
+ const char *prom_envs[MAX_PROM_ENVS];
+ #endif
+ int boot_menu;
++extern int enable_gl;
+
+ int nb_numa_nodes;
+ uint64_t node_mem[MAX_NODES];
+@@ -4432,6 +4434,8 @@ static void select_vgahw (const char *p)
+ } else if (strstart(p, "xenfb", &opts)) {
+ vga_interface_type = VGA_XENFB;
+ } else if (!strstart(p, "none", &opts)) {
++ }
++ else {
+ invalid_vga:
+ fprintf(stderr, "Unknown vga type: %s\n", p);
+ exit(1);
+@@ -5563,6 +5567,9 @@ int main(int argc, char **argv, char **e
+ old_param = 1;
+ break;
+ #endif
++ case QEMU_OPTION_force_pointer:
++ force_pointer = 1;
++ break;
+ case QEMU_OPTION_clock:
+ configure_alarms(optarg);
+ break;
+@@ -5577,6 +5584,12 @@ int main(int argc, char **argv, char **e
+ }
+ configure_rtc(opts);
+ break;
++#ifdef TARGET_OPENGL_OK
++ case QEMU_OPTION_enable_gl:
++ fprintf(stderr, "Enabling opengl\n");
++ enable_gl = 1;
++ break;
++#endif
+ case QEMU_OPTION_tb_size:
+ tb_size = strtol(optarg, NULL, 0);
+ if (tb_size < 0)
+@@ -5933,6 +5946,14 @@ int main(int argc, char **argv, char **e
+ }
+ }
+ }
++#ifdef TARGET_OPENGL_OK
++ if (enable_gl) {
++ /* Use second serial port */
++ int opengl_serial = 1;
++
++ add_device_config(DEV_SERIAL, "opengl");
++ }
++#endif
+
+ if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
+ exit(1);
+Index: qemu-0.12.4/qemu-options.hx
+===================================================================
+--- qemu-0.12.4.orig/qemu-options.hx
++++ qemu-0.12.4/qemu-options.hx
+@@ -1789,6 +1789,18 @@ many timer interrupts were not processed
+ re-inject them.
+ ETEXI
+
++DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
++ "-enable-gl\n")
++STEXI
++@item -enable-gl
++ETEXI
++
++DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
++ "-force-pointer\n")
++STEXI
++@item -force-pointer
++ETEXI
++
+ DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
+ "-icount [N|auto]\n" \
+ " 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 0000000..3ed227e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch
@@ -0,0 +1,136 @@
+Quick fixes to get the ppc system model to boot a 603e based
+kernel.
+
+diff --git a/hw/m48t59.c b/hw/m48t59.c
+index ce38f8b..d99054f 100644
+--- a/hw/m48t59.c
++++ b/hw/m48t59.c
+@@ -50,6 +50,7 @@
+ */
+
+ struct m48t59_t {
++ SysBusDevice busdev;
+ /* Model parameters */
+ uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59
+ /* Hardware parameters */
+@@ -74,11 +75,6 @@ typedef struct M48t59ISAState {
+ m48t59_t state;
+ } M48t59ISAState;
+
+-typedef struct M48t59SysBusState {
+- SysBusDevice busdev;
+- m48t59_t state;
+-} M48t59SysBusState;
+-
+ /* Fake timer functions */
+
+ /* Alarm management */
+@@ -629,8 +625,7 @@ static void m48t59_reset_isa(DeviceState *d)
+
+ static void m48t59_reset_sysbus(DeviceState *d)
+ {
+- M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev);
+- m48t59_t *NVRAM = &sys->state;
++ m48t59_t *NVRAM = container_of(d, m48t59_t, busdev.qdev);
+
+ m48t59_reset_common(NVRAM);
+ }
+@@ -642,7 +637,7 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
+ {
+ DeviceState *dev;
+ SysBusDevice *s;
+- M48t59SysBusState *d;
++ m48t59_t *d;
+
+ dev = qdev_create(NULL, "m48t59");
+ qdev_prop_set_uint32(dev, "type", type);
+@@ -659,9 +654,9 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
+ sysbus_mmio_map(s, 0, mem_base);
+ }
+
+- d = FROM_SYSBUS(M48t59SysBusState, s);
++ d = FROM_SYSBUS(m48t59_t, s);
+
+- return &d->state;
++ return d;
+ }
+
+ m48t59_t *m48t59_init_isa(uint32_t io_base, uint16_t size, int type)
+@@ -711,8 +706,7 @@ static int m48t59_init_isa1(ISADevice *dev)
+
+ static int m48t59_init1(SysBusDevice *dev)
+ {
+- M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev);
+- m48t59_t *s = &d->state;
++ m48t59_t *s = FROM_SYSBUS(m48t59_t, dev);
+ int mem_index;
+
+ sysbus_init_irq(dev, &s->IRQ);
+@@ -741,12 +735,12 @@ static ISADeviceInfo m48t59_isa_info = {
+ static SysBusDeviceInfo m48t59_info = {
+ .init = m48t59_init1,
+ .qdev.name = "m48t59",
+- .qdev.size = sizeof(M48t59SysBusState),
++ .qdev.size = sizeof(m48t59_t),
+ .qdev.reset = m48t59_reset_sysbus,
+ .qdev.props = (Property[]) {
+- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
+- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
+- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
++ DEFINE_PROP_UINT32("size", m48t59_t, size, -1),
++ DEFINE_PROP_UINT32("type", m48t59_t, type, -1),
++ DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base, 0),
+ DEFINE_PROP_END_OF_LIST(),
+ }
+ };
+diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
+index eb758f2..08db51b 100644
+--- a/hw/ppc_prep.c
++++ b/hw/ppc_prep.c
+@@ -73,7 +73,7 @@ qemu_log_mask(CPU_LOG_IOPORT, fmt, ## __VA_ARGS__)
+ /* Constants for devices init */
+ static const int ide_iobase[2] = { 0x1f0, 0x170 };
+ static const int ide_iobase2[2] = { 0x3f6, 0x376 };
+-static const int ide_irq[2] = { 13, 13 };
++static const int ide_irq[2] = { 13, 14 };
+
+ #define NE2000_NB_MAX 6
+
+@@ -620,9 +620,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
+ if (filename) {
+ qemu_free(filename);
+ }
+- if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
+- hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
+- }
+
+ if (linux_boot) {
+ kernel_base = KERNEL_LOAD_ADDR;
+diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
+index e3bd29c..1cb2e07 100644
+--- a/target-ppc/op_helper.c
++++ b/target-ppc/op_helper.c
+@@ -1646,20 +1646,20 @@ static inline void do_rfi(target_ulong nip, target_ulong msr,
+ void helper_rfi (void)
+ {
+ do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
+- ~((target_ulong)0x0), 1);
++ ~((target_ulong)0xFFFF0000), 1);
+ }
+
+ #if defined(TARGET_PPC64)
+ void helper_rfid (void)
+ {
+ do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
+- ~((target_ulong)0x0), 0);
++ ~((target_ulong)0xFFFF0000), 0);
+ }
+
+ void helper_hrfid (void)
+ {
+ do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
+- ~((target_ulong)0x0), 0);
++ ~((target_ulong)0xFFFF0000), 0);
+ }
+ #endif
+ #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 0000000..4307186
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch
@@ -0,0 +1,115 @@
+# fix VMware VGA driver depth calculation error, which may cause segmentation fault
+#
+# ktian1, 06/29/2010
+diff --git a/console.h b/console.h
+index dfc8ae4..05fbf17 100644
+--- a/console.h
++++ b/console.h
+@@ -122,6 +122,12 @@ struct DisplayAllocator {
+ void (*free_displaysurface)(DisplaySurface *surface);
+ };
+
++struct DisplayPostCallback {
++ void (*postcall) (void *);
++ void *parm;
++ struct DisplayPostCallback *next;
++};
++
+ struct DisplayState {
+ struct DisplaySurface *surface;
+ void *opaque;
+@@ -129,6 +135,7 @@ struct DisplayState {
+
+ struct DisplayAllocator* allocator;
+ struct DisplayChangeListener* listeners;
++ struct DisplayPostCallback* postcalls;
+
+ void (*mouse_set)(int x, int y, int on);
+ void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y,
+@@ -185,6 +192,12 @@ static inline void register_displaychangelistener(DisplayState *ds, DisplayChang
+ ds->listeners = dcl;
+ }
+
++static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
++{
++ dpc->next = ds->postcalls;
++ ds->postcalls = dpc;
++}
++
+ static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
+ {
+ struct DisplayChangeListener *dcl = s->listeners;
+diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
+index 01bb85b..d73cca6 100644
+--- a/hw/vmware_vga.c
++++ b/hw/vmware_vga.c
+@@ -927,8 +927,9 @@ static void vmsvga_update_display(void *opaque)
+ }
+ }
+
+-static void vmsvga_reset(struct vmsvga_state_s *s)
++static void vmsvga_reset(void *parm)
+ {
++ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
+ s->index = 0;
+ s->enable = 0;
+ s->config = 0;
+@@ -1133,6 +1134,8 @@ static const VMStateDescription vmstate_vmware_vga = {
+
+ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
+ {
++ DisplayPostCallback *dpc;
++
+ s->scratch_size = SVGA_SCRATCH_SIZE;
+ s->scratch = qemu_malloc(s->scratch_size * 4);
+
+@@ -1160,7 +1163,10 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
+
+ rom_add_vga(VGABIOS_FILENAME);
+
+- vmsvga_reset(s);
++ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
++ dpc->postcall = vmsvga_reset;
++ dpc->parm = s;
++ register_displaypostcallback(s->vga.ds, dpc);
+ }
+
+ static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
+diff --git a/qemu-common.h b/qemu-common.h
+index a23afbc..19f107a 100644
+--- a/qemu-common.h
++++ b/qemu-common.h
+@@ -198,6 +198,7 @@ typedef struct DisplayState DisplayState;
+ typedef struct DisplayChangeListener DisplayChangeListener;
+ typedef struct DisplaySurface DisplaySurface;
+ typedef struct DisplayAllocator DisplayAllocator;
++typedef struct DisplayPostCallback DisplayPostCallback;
+ typedef struct PixelFormat PixelFormat;
+ typedef struct TextConsole TextConsole;
+ typedef TextConsole QEMUConsole;
+diff --git a/vl.c b/vl.c
+index 39182ea..9a3e9fd 100644
+--- a/vl.c
++++ b/vl.c
+@@ -4863,6 +4863,7 @@ int main(int argc, char **argv, char **envp)
+ char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
+ DisplayState *ds;
+ DisplayChangeListener *dcl;
++ DisplayPostCallback *dpc;
+ int cyls, heads, secs, translation;
+ QemuOpts *hda_opts = NULL, *opts;
+ int optind;
+@@ -6053,6 +6053,13 @@ int main(int argc, char **argv, char **envp)
+ }
+ dpy_resize(ds);
+
++ dpc = ds->postcalls;
++ while (dpc != NULL) {
++ if (dpc->postcall != NULL)
++ dpc->postcall(dpc->parm);
++ dpc = dpc->next;
++ }
++
+ dcl = ds->listeners;
+ while (dcl != NULL) {
+ 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 0000000..43acc36
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch
@@ -0,0 +1,63 @@
+Allow releasing the GLXContext/Drawable with glXMakeCurrent.
+
+---
+commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
+tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
+parent 93619e6be184f8de08759d347825ee0d678a6f9c
+author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
+committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
+
+ target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
+ 1 files changed, 16 insertions(+), 15 deletions(-)
+
+Index: qemu/target-i386/opengl_exec.c
+===================================================================
+--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
++++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
+@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
+ (void *) client_drawable, fake_ctxt);
+
+- if (client_drawable == 0 && fake_ctxt == 0) {
++ if (client_drawable == 0 && fake_ctxt == 0)
+ ret_int = glXMakeCurrent(dpy, 0, NULL);
+- process->current_state = &process->default_state;
+- } else if ((drawable = (GLXDrawable)
++ else if ((drawable = (GLXDrawable)
+ get_association_fakepbuffer_pbuffer(
+ process, client_drawable))) {
+ GLXContext ctxt = get_association_fakecontext_glxcontext(
+@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
+ }
+
+ if (ret_int) {
+- for (i = 0; i < process->nb_states; i ++) {
+- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+- /* HACK !!! REMOVE */
+- process->current_state = process->glstates[i];
+- process->current_state->drawable = drawable;
+- break;
+- }
+- }
++ if (fake_ctxt) {
++ for (i = 0; i < process->nb_states; i ++)
++ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
++ /* HACK !!! REMOVE */
++ process->current_state = process->glstates[i];
++ process->current_state->drawable = drawable;
++ break;
++ }
+
+- if (i == process->nb_states) {
+- fprintf(stderr, "error remembering the new context\n");
+- exit(-1);
+- }
++ if (i == process->nb_states) {
++ fprintf(stderr, "error remembering the new context\n");
++ exit(-1);
++ }
++ } else
++ process->current_state = &process->default_state;
+ }
+ break;
+ }
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 0000000..7727a39
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch
@@ -0,0 +1,24 @@
+---
+ linux-user/syscall.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+Index: qemu/linux-user/syscall.c
+===================================================================
+--- qemu.orig/linux-user/syscall.c 2010-05-11 16:52:16.929785275 -0400
++++ qemu/linux-user/syscall.c 2010-05-11 16:52:25.174783517 -0400
+@@ -94,6 +94,15 @@
+ #define CLONE_NPTL_FLAGS2 0
+ #endif
+
++#define FUTEX_WAIT 0
++#define FUTEX_WAKE 1
++#define FUTEX_FD 2
++#define FUTEX_REQUEUE 3
++#define FUTEX_CMP_REQUEUE 4
++#define FUTEX_WAKE_OP 5
++#define FUTEX_LOCK_PI 6
++#define FUTEX_UNLOCK_PI 7
++
+ //#define DEBUG
+
+ //#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 0000000..19fb6f4
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Qemu helper utilities from Poky"
+LICENSE = "GPLv2"
+RDEPENDS = "qemu-native"
+PR = "r0"
+
+FILESPATH = "${FILE_DIRNAME}/qemu-helper"
+
+SRC_URI = "file://tunctl.c"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_compile() {
+ ${CC} tunctl.c -o tunctl
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install tunctl ${D}${bindir}/
+}
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 0000000..473411d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "Qemu helper scripts from Poky"
+LICENSE = "GPL"
+RDEPENDS = "qemu-nativesdk"
+PR = "r7"
+
+FILESPATH = "${FILE_DIRNAME}/qemu-helper"
+
+SRC_URI = "file://${POKYBASE}/scripts/poky-qemu \
+ file://${POKYBASE}/scripts/poky-qemu-internal \
+ file://${POKYBASE}/scripts/poky-addptable2image \
+ file://${POKYBASE}/scripts/poky-qemu-ifup \
+ file://${POKYBASE}/scripts/poky-qemu-ifdown \
+ file://${POKYBASE}/scripts/poky-find-native-sysroot \
+ file://${POKYBASE}/scripts/poky-extract-sdk \
+ file://${POKYBASE}/scripts/poky-export-rootfs \
+ file://${POKYBASE}/scripts/runqemu-nfs \
+ file://tunctl.c \
+ file://raw2flash.c \
+ "
+
+S = "${WORKDIR}"
+
+inherit nativesdk
+
+do_compile() {
+ ${CC} tunctl.c -o tunctl
+ ${CC} raw2flash.c -o raw2flash.spitz
+ ${CC} raw2flash.c -o flash2raw.spitz -Dflash2raw
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}${POKYBASE}/scripts/poky-* ${D}${bindir}/
+ install -m 0755 ${WORKDIR}${POKYBASE}/scripts/runqemu-nfs ${D}${bindir}/
+ install tunctl ${D}${bindir}/
+ install raw2flash.spitz ${D}${bindir}/
+ install flash2raw.spitz ${D}${bindir}/
+ ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
+ ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.borzoi
+ ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.terrier
+ ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.akita
+ ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.borzoi
+ ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.terrier
+}
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 0000000..19faf62
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2006 OpenedHand Ltd.
+ *
+ * This file is licensed under GNU GPL v2.
+ */
+#include <string.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#define TFR(_) _
+#define VERBOSE
+#define PBAR_LEN 40
+
+#define PARTITION_START 0x00700000
+
+static const int ecc_pos8[] = {
+ 0x0, 0x1, 0x2,
+};
+
+static const int ecc_pos16[] = {
+ 0x0, 0x1, 0x2, 0x3, 0x6, 0x7,
+};
+
+static const int ecc_pos64[] = {
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+};
+
+static const int ecc_akita[] = {
+ 0x05, 0x01, 0x02, 0x03, 0x06, 0x07, 0x15, 0x11,
+ 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
+ 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37,
+};
+
+struct jffs_marker_s {
+ int pos;
+ uint8_t value;
+};
+
+static const struct jffs_marker_s free_pos8[] = {
+ { 0x03, 0xff }, { 0x04, 0xff }, { 0x06, 0x85 }, { 0x07, 0x19 },
+ { -1 },
+};
+
+static const struct jffs_marker_s free_pos16[] = {
+ { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
+ { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
+ { -1 },
+};
+
+static const struct jffs_marker_s free_pos64[] = {
+ { 0x02, 0xff }, { 0x03, 0xff }, { 0x04, 0xff }, { 0x05, 0xff },
+ { 0x06, 0xff }, { 0x07, 0xff }, { 0x08, 0xff }, { 0x09, 0xff },
+ { 0x0a, 0xff }, { 0x0b, 0xff }, { 0x0c, 0xff }, { 0x0d, 0xff },
+ { 0x0e, 0xff }, { 0x0f, 0xff }, { 0x10, 0x85 }, { 0x11, 0x19 },
+ { 0x12, 0x03 }, { 0x13, 0x20 }, { 0x14, 0x08 }, { 0x15, 0x00 },
+ { 0x16, 0x00 }, { 0x17, 0x00 }, { 0x18, 0xff }, { 0x19, 0xff },
+ { 0x1a, 0xff }, { 0x1b, 0xff }, { 0x1c, 0xff }, { 0x1d, 0xff },
+ { 0x1e, 0xff }, { 0x1f, 0xff }, { 0x20, 0xff }, { 0x21, 0xff },
+ { 0x22, 0xff }, { 0x23, 0xff }, { 0x24, 0xff }, { 0x25, 0xff },
+ { 0x26, 0xff }, { 0x27, 0xff },
+ { -1 },
+};
+
+static const struct jffs_marker_s free_akita[] = {
+ { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
+ { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
+ { 0x10, 0xff },
+ { -1 },
+};
+
+#define LEN(array) (sizeof(array) / sizeof(*array))
+
+static const struct ecc_style_s {
+ int page_size;
+ int oob_size;
+ int eccbytes;
+ int eccsize;
+ const int *eccpos;
+ int romsize;
+ const struct jffs_marker_s *freepos;
+} spitz = {
+ 0x200, 0x10, 0x100, LEN(ecc_pos16), ecc_pos16, 0x01000000, free_pos16
+}, akita = {
+ 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
+}, borzoi = {
+ 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
+}, terrier = {
+ 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
+};
+
+struct ecc_state_s {
+ int count;
+ uint8_t cp;
+ uint8_t lp[2];
+ const struct ecc_style_s *style;
+};
+
+#ifndef flash2raw
+/*
+ * Pre-calculated 256-way 1 byte column parity. Table borrowed from Linux.
+ */
+static const uint8_t ecc_precalc_table[] = {
+ 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
+ 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
+ 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
+ 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
+ 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
+ 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
+ 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
+ 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
+ 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
+ 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
+ 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
+ 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
+ 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
+ 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
+ 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
+ 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
+ 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
+ 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
+ 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
+ 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
+ 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
+ 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
+ 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
+ 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
+ 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
+ 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
+ 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
+ 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
+ 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
+ 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
+ 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
+ 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
+};
+
+/* Update ECC parity count */
+static inline uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample) {
+ uint8_t idx = ecc_precalc_table[sample];
+
+ s->cp ^= idx & 0x3f;
+ if (idx & 0x40) {
+ s->lp[0] ^= ~(s->count & 0xff);
+ s->lp[1] ^= s->count & 0xff;
+ }
+ s->count ++;
+
+ return sample;
+}
+
+static void buffer_digest(struct ecc_state_s *ecc,
+ const uint8_t *buf, uint8_t *out) {
+ int i, lp_a[2];
+
+ ecc->lp[0] = 0x00;
+ ecc->lp[1] = 0x00;
+ ecc->cp = 0x00;
+ ecc->count = 0;
+ for (i = 0; i < ecc->style->eccbytes; i ++)
+ ecc_digest(ecc, buf[i]);
+
+# define BSHR(byte, from, to) ((ecc->lp[byte] >> (from - to)) & (1 << to))
+ lp_a[0] =
+ BSHR(0, 4, 0) | BSHR(0, 5, 2) |
+ BSHR(0, 6, 4) | BSHR(0, 7, 6) |
+ BSHR(1, 4, 1) | BSHR(1, 5, 3) |
+ BSHR(1, 6, 5) | BSHR(1, 7, 7);
+
+# define BSHL(byte, from, to) ((ecc->lp[byte] << (to - from)) & (1 << to))
+ lp_a[1] =
+ BSHL(0, 0, 0) | BSHL(0, 1, 2) |
+ BSHL(0, 2, 4) | BSHL(0, 3, 6) |
+ BSHL(1, 0, 1) | BSHL(1, 1, 3) |
+ BSHL(1, 2, 5) | BSHL(1, 3, 7);
+
+ out[0] = ~lp_a[1];
+ out[1] = ~lp_a[0];
+ out[2] = (~ecc->cp << 2) | 0x03;
+}
+
+static void jffs2_format(const struct ecc_state_s *ecc, uint8_t oob[]) {
+ const struct jffs_marker_s *byte;
+ for (byte = ecc->style->freepos; byte->pos >= 0; byte ++)
+ oob[byte->pos] = byte->value;
+}
+
+static void buffer_fill(const struct ecc_state_s *ecc, uint8_t buffer[],
+ int *len, int *partition, int count, uint8_t jffs_buffer[]) {
+ int ret;
+
+ switch (*partition) {
+ case 0:
+ if (count < PARTITION_START) {
+ memcpy(buffer, jffs_buffer + count,
+ ecc->style->eccbytes);
+ *len = ecc->style->eccbytes;
+ break;
+ }
+ *partition = 1;
+ case 1:
+ if (count - PARTITION_START < PARTITION_START) {
+ memcpy(buffer, jffs_buffer + count - PARTITION_START,
+ ecc->style->eccbytes);
+ *len = ecc->style->eccbytes;
+ break;
+ }
+
+ while (*len < ecc->style->eccbytes) {
+ ret = TFR(read(0, buffer + *len, 0x800 - *len));
+ if (ret <= 0)
+ break;
+ *len += ret;
+ }
+
+ if (*len == 0)
+ *partition = 2;
+ else if (*len < ecc->style->eccbytes) {
+ fprintf(stderr, "\nWarning: %i stray bytes\n", *len);
+ memset(buffer + *len, 0xff,
+ ecc->style->eccbytes - *len);
+ *len = ecc->style->eccbytes;
+ break;
+ } else
+ break;
+ case 2:
+ memset(buffer, 0xff, ecc->style->eccbytes);
+ *len = ecc->style->eccbytes;
+ break;
+ }
+}
+
+int main(int argc, char *argv[], char *envp[]) {
+ struct ecc_state_s ecc;
+ uint8_t buffer[0x1000], ecc_payload[0x40], regs[3], *jffs;
+ int ret, len, eccbyte, count, partition;
+
+ /* Check if we're called by "raw2flash.spitz" or similar */
+ len = strlen(argv[0]);
+ if (!strcasecmp(argv[0] + len - 5, "akita"))
+ ecc.style = &akita;
+ else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
+ ecc.style = &borzoi;
+ else if (!strcasecmp(argv[0] + len - 7, "terrier"))
+ ecc.style = &terrier;
+ else
+ ecc.style = &spitz;
+
+# ifdef VERBOSE
+ fprintf(stderr, "[");
+# endif
+
+ /* Skip first 10 bytes */
+ TFR(read(0, buffer, 0x10));
+
+ len = 0;
+ jffs = (uint8_t *) malloc(PARTITION_START);
+ while (len < PARTITION_START) {
+ ret = TFR(read(0, jffs + len, PARTITION_START - len));
+ if (ret <= 0)
+ break;
+ len += ret;
+ }
+
+ /* Convert data from stdin */
+ partition = len = eccbyte = count = 0;
+ memset(ecc_payload, 0xff, ecc.style->oob_size);
+ jffs2_format(&ecc, ecc_payload);
+ while (count < ecc.style->romsize) {
+ buffer_fill(&ecc, buffer, &len, &partition, count, jffs);
+ buffer_digest(&ecc, buffer, regs);
+
+ ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[0];
+ ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[1];
+ ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[2];
+
+ TFR(write(1, buffer, ecc.style->eccbytes));
+ count += ecc.style->eccbytes;
+ len -= ecc.style->eccbytes;
+ memmove(buffer, buffer + ecc.style->eccbytes, len);
+
+ if (eccbyte >= ecc.style->eccsize) {
+ TFR(write(1, ecc_payload, ecc.style->oob_size));
+ eccbyte = 0;
+ memset(ecc_payload, 0xff, ecc.style->oob_size);
+ if (partition < 2)
+ jffs2_format(&ecc, ecc_payload);
+ }
+
+# ifdef VERBOSE
+ if (count * PBAR_LEN / ecc.style->romsize >
+ (count - ecc.style->eccbytes) *
+ PBAR_LEN / ecc.style->romsize)
+ fprintf(stderr, "#");
+# endif
+ }
+
+# ifdef VERBOSE
+ fprintf(stderr, "]\n");
+# endif
+ free(jffs);
+ return 0;
+}
+#else
+int main(int argc, char *argv[], char *envp[]) {
+ struct ecc_state_s ecc;
+ uint8_t buffer[0x1000];
+ int ret, len, count;
+
+ /* Check if we're called by "flash2raw.spitz" or similar */
+ len = strlen(argv[0]);
+ if (!strcasecmp(argv[0] + len - 5, "akita"))
+ ecc.style = &akita;
+ else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
+ ecc.style = &borzoi;
+ else if (!strcasecmp(argv[0] + len - 7, "terrier"))
+ ecc.style = &terrier;
+ else
+ ecc.style = &spitz;
+
+# ifdef VERBOSE
+ fprintf(stderr, "[");
+# endif
+
+ /* Convert data from stdin */
+ count = 0;
+ while (count < ecc.style->romsize) {
+ len = 0;
+ while (len < ecc.style->page_size) {
+ ret = TFR(read(0, buffer + len,
+ ecc.style->page_size - len));
+ if (ret <= 0)
+ break;
+ len += ret;
+ }
+ if (len == 0)
+ break;
+ if (len < ecc.style->page_size) {
+ fprintf(stderr, "\nWarning: %i stray bytes\n", len);
+ }
+
+ TFR(write(1, buffer, ecc.style->page_size));
+
+ count += len;
+ len = 0;
+ while (len < ecc.style->oob_size) {
+ ret = TFR(read(0, buffer, ecc.style->oob_size - len));
+ if (ret <= 0)
+ break;
+ len += ret;
+ }
+
+# ifdef VERBOSE
+ if (count * PBAR_LEN / ecc.style->romsize >
+ (count - ecc.style->page_size) *
+ PBAR_LEN / ecc.style->romsize)
+ fprintf(stderr, "#");
+# endif
+ }
+
+# ifdef VERBOSE
+ fprintf(stderr, "]\n");
+# endif
+ return 0;
+}
+#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 0000000..16e24a2
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
@@ -0,0 +1,156 @@
+/* Copyright 2002 Jeff Dike
+ * Licensed under the GPL
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
+#include <linux/if_tun.h>
+
+/* TUNSETGROUP appeared in 2.6.23 */
+#ifndef TUNSETGROUP
+#define TUNSETGROUP _IOW('T', 206, int)
+#endif
+
+static void Usage(char *name)
+{
+ fprintf(stderr, "Create: %s [-b] [-u owner] [-g group] [-t device-name] "
+ "[-f tun-clone-device]\n", name);
+ fprintf(stderr, "Delete: %s -d device-name [-f tun-clone-device]\n\n",
+ name);
+ fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems"
+ " use\n/dev/misc/net/tun instead\n\n");
+ fprintf(stderr, "-b will result in brief output (just the device name)\n");
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ struct ifreq ifr;
+ struct passwd *pw;
+ struct group *gr;
+ uid_t owner = -1;
+ gid_t group = -1;
+ int tap_fd, opt, delete = 0, brief = 0;
+ char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end;
+
+ while((opt = getopt(argc, argv, "bd:f:t:u:g:")) > 0){
+ switch(opt) {
+ case 'b':
+ brief = 1;
+ break;
+ case 'd':
+ delete = 1;
+ tun = optarg;
+ break;
+ case 'f':
+ file = optarg;
+ break;
+ case 'u':
+ pw = getpwnam(optarg);
+ if(pw != NULL){
+ owner = pw->pw_uid;
+ break;
+ }
+ owner = strtol(optarg, &end, 0);
+ if(*end != '\0'){
+ fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n",
+ optarg);
+ Usage(name);
+ }
+ break;
+ case 'g':
+ gr = getgrnam(optarg);
+ if(gr != NULL){
+ group = gr->gr_gid;
+ break;
+ }
+ group = strtol(optarg, &end, 0);
+ if(*end != '\0'){
+ fprintf(stderr, "'%s' is neither a groupname nor a numeric group.\n",
+ optarg);
+ Usage(name);
+ }
+ break;
+
+ case 't':
+ tun = optarg;
+ break;
+ case 'h':
+ default:
+ Usage(name);
+ }
+ }
+
+ argv += optind;
+ argc -= optind;
+
+ if(argc > 0)
+ Usage(name);
+
+ if((tap_fd = open(file, O_RDWR)) < 0){
+ fprintf(stderr, "Failed to open '%s' : ", file);
+ perror("");
+ exit(1);
+ }
+
+ memset(&ifr, 0, sizeof(ifr));
+
+ ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+ strncpy(ifr.ifr_name, tun, sizeof(ifr.ifr_name) - 1);
+ if(ioctl(tap_fd, TUNSETIFF, (void *) &ifr) < 0){
+ perror("TUNSETIFF");
+ exit(1);
+ }
+
+ if(delete){
+ if(ioctl(tap_fd, TUNSETPERSIST, 0) < 0){
+ perror("disabling TUNSETPERSIST");
+ exit(1);
+ }
+ printf("Set '%s' nonpersistent\n", ifr.ifr_name);
+ }
+ else {
+ /* emulate behaviour prior to TUNSETGROUP */
+ if(owner == -1 && group == -1) {
+ owner = geteuid();
+ }
+
+ if(owner != -1) {
+ if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){
+ perror("TUNSETOWNER");
+ exit(1);
+ }
+ }
+ if(group != -1) {
+ if(ioctl(tap_fd, TUNSETGROUP, group) < 0){
+ perror("TUNSETGROUP");
+ exit(1);
+ }
+ }
+
+ if(ioctl(tap_fd, TUNSETPERSIST, 1) < 0){
+ perror("enabling TUNSETPERSIST");
+ exit(1);
+ }
+
+ if(brief)
+ printf("%s\n", ifr.ifr_name);
+ else {
+ printf("Set '%s' persistent and owned by", ifr.ifr_name);
+ if(owner != -1)
+ printf(" uid %d", owner);
+ if(group != -1)
+ printf(" gid %d", group);
+ printf("\n");
+ }
+ }
+ return(0);
+}
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
new file mode 100644
index 0000000..5425aaf
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -0,0 +1,39 @@
+DESCRIPTION = "open source processor emulator"
+HOMEPAGE = "http://qemu.org"
+LICENSE = "GPL"
+DEPENDS = "zlib"
+
+EXTRA_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"
+#EXTRA_OECONF += "--disable-sdl"
+
+inherit autotools
+
+# For our gl powered QEMU you need libGL and SDL headers
+do_configure_prepend_virtclass-native() {
+ libgl='no'
+ libsdl='no'
+
+ test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
+ test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
+
+ test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc -o -e /usr/include/SDL/SDL.h && libsdl='yes'
+
+
+ if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
+ 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.
+ Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
+ exit 1;
+ fi
+}
+
+do_configure() {
+ ${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
+ chmod a+x ${S}/target-i386/beginend_funcs.sh
+}
+
+SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
+DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
+RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
+EXTRA_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}"
+
+BBCLASSEXTEND = "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 0000000..c253b03
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_0.12.4.bb
@@ -0,0 +1,27 @@
+require qemu.inc
+
+PR = "r16"
+
+FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
+FILESDIR = "${WORKDIR}"
+
+SRC_URI = "\
+ http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
+ file://workaround_bad_futex_headers.patch \
+ file://qemu-git-qemugl-host.patch \
+ file://no-strip.patch \
+ file://fix-dirent.patch \
+ file://fix-nogl.patch \
+ file://qemugl-allow-glxcontext-release.patch \
+ file://linker-flags.patch \
+ file://init-info.patch \
+ file://qemu-vmware-vga-depth.patch \
+ file://qemu-ppc-hack.patch \
+ file://powerpc_rom.bin"
+
+do_install_append () {
+ install -d ${D}${datadir}/qemu
+ install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+}
+
+S = "${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 0000000..00b3610
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -0,0 +1,21 @@
+require qemu.inc
+
+PV = "0.12.4"
+PR = "r9"
+
+FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
+FILESDIR = "${WORKDIR}"
+
+SRC_URI = "\
+ git://git.sv.gnu.org/qemu.git;protocol=git \
+ file://workaround_bad_futex_headers.patch \
+ file://qemu-git-qemugl-host.patch \
+ file://no-strip.patch \
+ file://fix-dirent.patch \
+ file://fix-nogl.patch \
+ file://qemugl-allow-glxcontext-release.patch \
+ file://linker-flags.patch \
+ file://qemu-vmware-vga-depth.patch"
+
+S = "${WORKDIR}/git"
+
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
new file mode 100644
index 0000000..7efea02
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -0,0 +1,13 @@
+SRC_URI_append_build-darwin = "? file://non-gnu.patch "
+RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
+
+INHIBIT_AUTOTOOLS_DEPS = "1"
+
+inherit native
+
+PATCHTOOL = "patch"
+EXTRA_OECONF = "--disable-nls"
+
+do_configure () {
+ oe_runconf
+}
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 0000000..d1dd576
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt-native_0.48.bb
@@ -0,0 +1,4 @@
+require quilt.inc
+require quilt-native.inc
+
+PR = "r0"
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
new file mode 100644
index 0000000..e5e0a4f
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "Tool to work with series of patches."
+HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/"
+SECTION = "devel"
+LICENSE = "GPLv2"
+LIC_CHKSUM_FILES = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz \
+ file://install.patch"
+
+inherit autotools
+
+PACKAGES += "guards guards-doc"
+FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
+ ${bindir}/quilt ${libdir}/quilt"
+FILES_guards = "${bindir}/guards"
+FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${P}"
+FILES_guards-doc = "${mandir}/man1/guards.1"
+
+# quilt ignores DESTDIR
+do_install () {
+ oe_runmake 'BUILD_ROOT=${D}' install
+ if [ "${BUILD_ARCH}" == "${HOST_ARCH}" ]; then
+ # Dummy quiltrc file for patch.bbclass
+ install -d ${D}${bindir}/
+ touch ${D}${bindir}/quiltrc
+ fi
+}
diff --git a/meta/recipes-devtools/quilt/quilt/aclocal.patch b/meta/recipes-devtools/quilt/quilt/aclocal.patch
new file mode 100644
index 0000000..15b174c
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/aclocal.patch
@@ -0,0 +1,126 @@
+Add the aclocal.m4 as acinclude.m4
+
+Index: quilt-0.47/acinclude.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ quilt-0.47/acinclude.m4 2006-10-10 17:05:56.000000000 +0100
+@@ -0,0 +1,119 @@
++dnl Allow configure to specify a specific binary
++dnl 1: Environment variable
++dnl 2: binary name
++dnl 3: optional list of alternative binary names
++dnl 4: optional list of additional search directories
++AC_DEFUN([QUILT_COMPAT_PROG_PATH],[
++ m4_define([internal_$2_cmd],[esyscmd(ls compat/$2.in 2>/dev/null)])
++
++ AC_ARG_WITH($2, AC_HELP_STRING(
++ [--with-$2], [name of the $2 executable to use]
++ m4_if(internal_$2_cmd,[],[],[ (use --without-$2
++ to use an internal mechanism)])),
++ [
++ if test x"$withval" = xnone; then
++ AC_MSG_ERROR([Invalid configure argument. use --without-$2])
++ fi
++ if test x"$withval" != xno; then
++ AC_MSG_CHECKING(for $2)
++ $1="$withval"
++ if test -e "$$1"; then
++ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
++ AC_MSG_ERROR([$$1 is not an executable file])
++ fi
++ fi
++ AC_MSG_RESULT([$$1])
++ if test ! -e "$$1"; then
++ AC_MSG_WARN([$$1 does not exist])
++ fi
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ fi
++ ],[
++ m4_if([$3],[],[
++ AC_PATH_PROG($1,$2,,$PATH:$4)
++ ],[
++ AC_PATH_PROGS($1,$3,,$PATH:$4)
++ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ fi
++ ])
++ m4_if([$4],[],[],[
++ if test -n "$$1"; then
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++ for dir in "$4"; do
++ if test "`dirname $$1`" = "$dir"; then
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ break
++ fi
++ done
++ IFS="$as_save_IFS"
++ fi
++ ])
++ ])
++ if test -z "$$1"; then
++ m4_if(internal_$2_cmd,[],[
++ AC_MSG_ERROR([Please specify the location of $2 with the option '--with-$2'])
++ ],[
++ AC_MSG_WARN([Using internal $2 mechanism. Use option '--with-$2' to override])
++ COMPAT_PROGRAMS="$COMPAT_PROGRAMS $2"
++ $1=$2
++ INTERNAL_$1=1
++ ])
++ fi
++ AC_SUBST($1)
++])
++
++dnl Allow configure to specify a specific binary
++dnl This variant is for optional binaries.
++dnl 1: Environment variable
++dnl 2: binary name
++dnl 3: optional list of alternative binary names
++dnl 4: optional list of additional search directories
++AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
++ AC_ARG_WITH($2, AC_HELP_STRING(
++ [--with-$2], [name of the $2 executable to use]),
++ [
++ if test x"$withval" != xno; then
++ AC_MSG_CHECKING(for $2)
++ $1="$withval"
++ if test -e "$$1"; then
++ if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
++ AC_MSG_ERROR([$$1 is not an executable file])
++ fi
++ fi
++ AC_MSG_RESULT([$$1])
++ if test ! -e "$$1"; then
++ AC_MSG_WARN([$$1 does not exist])
++ fi
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ fi
++ ],[
++ m4_if([$3],[],[
++ AC_PATH_PROG($1,$2,,$PATH:$4)
++ ],[
++ AC_PATH_PROGS($1,$3,,$PATH:$4)
++ if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ fi
++ ])
++ m4_if([$4],[],[],[
++ if test -n "$$1"; then
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++ for dir in "$4"; do
++ if test "`dirname $$1`" = "$dir"; then
++ COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
++ break
++ fi
++ done
++ IFS="$as_save_IFS"
++ fi
++ ])
++ if test -z "$$1"; then
++ AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
++ fi
++ ])
++ if test -z "$$1"; then
++ $1=$2
++ fi
++ AC_SUBST($1)
++])
diff --git a/meta/recipes-devtools/quilt/quilt/install.patch b/meta/recipes-devtools/quilt/quilt/install.patch
new file mode 100644
index 0000000..0b1e58d
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/install.patch
@@ -0,0 +1,11 @@
+--- quilt-0.47/Makefile.in 2008-12-31 19:09:13.000000000 +0000
++++ quilt-0.47/Makefile.in.orig 2008-08-21 13:21:32.000000000 +0100
+@@ -13,7 +13,7 @@
+ mandir := @mandir@
+ localedir := $(datadir)/locale
+ emacsdir := $(datadir)/emacs/site-lisp
+-etcdir := $(subst /usr/etc,/etc,$(prefix)/etc)
++etcdir := @sysconfdir@
+
+ INSTALL := @INSTALL@
+ 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 0000000..c1cbfb3
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/non-gnu.patch
@@ -0,0 +1,223 @@
+Patch is from the Fink projetc (http://fink.sf.net)
+
+diff -r 7b51c215fc54 Makefile.in
+--- a/Makefile.in Sat Mar 4 17:16:21 2006 -0800
++++ b/Makefile.in Sat Mar 4 17:59:09 2006 -0800
+@@ -256,7 +256,7 @@ bin/guards.1 : bin/guards
+ -e 's:@VERSION''@:$(VERSION):g' \
+ -e 's:@RELEASE''@:$(RELEASE):g' \
+ -e 's:@LOCALEDIR''@:$(localedir):g' \
+- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
++ -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g' \
+ $< > $@
+ @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
+
+@@ -320,11 +320,11 @@ endif
+ $(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
+ $(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
+
+- $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++ $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+ $(INSTALL) -m 644 doc/README \
+- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+ $(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL \
+- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+
+ $(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
+ $(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
+@@ -367,7 +367,7 @@ uninstall ::
+ $(notdir $(MAN1))) \
+ $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
+ $(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
+- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
++ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
+
+ check: $(TESTS:test/%.test=test/.%.ok)
+ check-all: $(TESTS:test/%.test=check-%)
+diff -r 7b51c215fc54 configure
+--- a/configure Sat Mar 4 17:16:21 2006 -0800
++++ b/configure Sat Mar 4 17:59:09 2006 -0800
+@@ -3882,29 +3882,6 @@ echo "$as_me: error: Please specify the
+ fi
+
+
+-echo "$as_me:$LINENO: checking whether $CP -l works" >&5
+-echo $ECHO_N "checking whether $CP -l works... $ECHO_C" >&6
+-touch conftest.1
+-if $CP -l conftest.1 conftest.2 2>/dev/null; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+-else
+- { { echo "$as_me:$LINENO: error: no
+-
+-You appear to have a \`cp' that does not support hard links.
+-You can download GNU fileutils from ftp.gnu.org
+-" >&5
+-echo "$as_me: error: no
+-
+-You appear to have a \`cp' that does not support hard links.
+-You can download GNU fileutils from ftp.gnu.org
+-" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-
+-
+-
+-
+
+ # Check whether --with-date or --without-date was given.
+ if test "${with_date+set}" = set; then
+@@ -3999,32 +3976,6 @@ echo "$as_me: WARNING: Using internal da
+ INTERNAL_DATE=1
+
+ fi
+-
+-
+-
+-if test -z "$INTERNAL_DATE"; then
+- echo "$as_me:$LINENO: checking whether $DATE --rfc-822 works" >&5
+-echo $ECHO_N "checking whether $DATE --rfc-822 works... $ECHO_C" >&6
+- if $DATE --rfc-822 >/dev/null 2>/dev/null; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
+- else
+- { { echo "$as_me:$LINENO: error: no
+-
+-If you don't have a version of \`date' that supports --rfc-822, you
+-can specify '--without-date' and $PACKAGE_NAME will use its own
+-internal date.
+-" >&5
+-echo "$as_me: error: no
+-
+-If you don't have a version of \`date' that supports --rfc-822, you
+-can specify '--without-date' and $PACKAGE_NAME will use its own
+-internal date.
+-" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+-fi
+-
+
+
+
+diff -r 7b51c215fc54 quilt/diff.in
+--- a/quilt/diff.in Sat Mar 4 17:16:21 2006 -0800
++++ b/quilt/diff.in Sat Mar 4 17:59:09 2006 -0800
+@@ -303,7 +303,7 @@ then
+
+ if [ ${#files[@]} -gt 0 ] \
+ && ! ( cd $QUILT_PC/$last_patch &&
+- cp -l --parents "${files[@]}" $workdir/ )
++ mycpl $workdir/ "${files[@]}" )
+ then
+ printf $"Failed to copy files to temporary directory\n" >&2
+ die 1
+diff -r 7b51c215fc54 quilt/mail.in
+--- a/quilt/mail.in Sat Mar 4 17:16:21 2006 -0800
++++ b/quilt/mail.in Sat Mar 4 17:59:09 2006 -0800
+@@ -64,7 +64,7 @@ with a template for the introduction. Pl
+
+ msgid()
+ {
+- local timestamp=$(date --utc "+%Y%m%d%H%M%S.%N")
++ local timestamp=$(date -u "+%Y%m%d%H%M%S.000000000")
+ echo "$timestamp@${opt_sender#*@}"
+ }
+
+@@ -334,7 +334,7 @@ introduction="$(gen_tempfile)"
+ cat <<-EOF
+ Message-Id: <$(msgid)>
+ User-Agent: quilt/@VERSION@-@RELEASE@
+- Date: $(date --rfc-822)
++ Date: $(date '+%a, %d %b %Y %H:%M:%S %z')
+ From: ${opt_from:-$opt_sender}
+ To: $(IFS=,; echo "${opt_to[*]}")
+ Cc: $(IFS=,; echo "${opt_cc[*]}")
+@@ -401,7 +401,11 @@ fi
+ # increment the timestamp by one second and wait with sending until
+ # that time has arrived. This allows MUAs to show the messages in the
+ # correct order.
+-last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
++#last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
++# fink has no date available that does -d, so we fudge with the time now.
++# If the user edits the date field in the message patch 0 could end up
++# out of order wrt the actual patches. just a minor cosmetic nit.
++last_ts=$(date '+%s')
+
+ num=1
+ for patch in "${patches[@]}"; do
+@@ -412,7 +416,7 @@ for patch in "${patches[@]}"; do
+ # sleep 1
+ #done
+ ((last_ts++))
+- new_date="$(date --rfc-822 -d "1970/01/01 UTC $last_ts seconds")"
++ new_date="$(date -r $last_ts '+%a, %d %b %Y %H:%M:%S %z')"
+
+ modify="$(awk '
+ sub(/^Recipient-/, "") { r = $0
+diff -r 7b51c215fc54 quilt/pop.in
+--- a/quilt/pop.in Sat Mar 4 17:16:21 2006 -0800
++++ b/quilt/pop.in Sat Mar 4 17:59:09 2006 -0800
+@@ -93,7 +93,7 @@ check_for_pending_changes()
+ if [ -d $QUILT_PC/$patch ]
+ then
+ if ! rmdir $workdir || # note that this is racey...
+- ! cp -rl $QUILT_PC/$patch $workdir
++ ! (for i in "$(find "$QUILT_PC/$patch" -type f)"; do mycpl $workdir $i; done)
+ then
+ printf $"Failed to copy files to temporary directory\n" >&2
+ rm -rf $workdir
+diff -r 7b51c215fc54 quilt/scripts/patchfns.in
+--- a/quilt/scripts/patchfns.in Sat Mar 4 17:16:21 2006 -0800
++++ b/quilt/scripts/patchfns.in Sat Mar 4 17:59:09 2006 -0800
+@@ -45,6 +45,28 @@ fi
+ fi
+
+ # ========================================================
++
++dater()
++{
++ ts=$(perl -e '@st = stat($ARGV[0]); print $st[9];' "$1")
++ fmt=$(date -r $ts "$2")
++
++ echo $fmt
++}
++
++mycpl ()
++{
++ target=$1
++ shift;
++
++ for src in "$@"
++ do
++ srcdir="${src%/*}"
++ test -n "$srcdir" && mkdir -p "$target/$srcdir"
++ ln $src "$target/$src"
++ done
++}
++
+
+ #declare -a exit_handlers
+ #
+@@ -669,8 +691,7 @@ diff_file()
+ || old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
+ else
+ [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
+- || old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
+- -r "$old_file")
++ || old_date=$'\t'$(dater "$old_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
+ fi
+ if ! [ -s "$new_file" ]
+ then
+@@ -682,8 +703,7 @@ diff_file()
+ || new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
+ else
+ [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
+- || new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
+- -r "$new_file")
++ || new_date=$'\t'$(dater "$new_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
+ fi
+
+ 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 0000000..5db67b2
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt_0.48.bb
@@ -0,0 +1,7 @@
+require quilt.inc
+
+RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
+PR = "r0"
+SRC_URI += "file://aclocal.patch"
+
+inherit 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 0000000..b72c9f0
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/perfile_rpmdeps.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+: ${RPMDEPS:=rpmdeps}
+
+process() {
+ while read file_name ; do
+ printf "%s\t" ${file_name}
+ if [ ! -d $file_name ]; then
+ printf "%s " $($RPMDEPS $1 $file_name | sed -e 's,rpmlib(.*,,' -e 's,\([<>\=]\+ \+[^ ]*\),(\1),g')
+ fi
+ printf "\n"
+ done
+}
+
+usage() {
+ echo "$0 {-P|--provides} {-R|--requires} FILE ..."
+}
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --rpmdeps)
+ RPMDEPS=$2
+ shift
+ shift
+ ;;
+ -R|--requires)
+ process_type=--requires
+ shift
+ ;;
+ -P|--provides)
+ process_type=--provides
+ shift
+ ;;
+ *)
+ break;
+ ;;
+ esac
+done
+
+if [ -z "$process_type" ]; then
+ usage
+ exit 1
+fi
+
+if [ $# -gt 0 ]; then
+ find "$@" | process $process_type
+ exit $?
+fi
+
+process $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 0000000..69b7130
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch
@@ -0,0 +1,440 @@
+Index: rpm-5.1.9/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/configure.ac 2009-04-18 17:47:02.000000000 +0100
++++ rpm-5.1.9/configure.ac 2010-07-06 14:47:28.985462456 +0100
+@@ -643,38 +643,22 @@
+ dnl look for libc features
+ PROVIDES_ERRNO=no
+ AC_MSG_CHECKING(if <netdb.h> defines h_errno)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
+-AC_MSG_RESULT($PROVIDES_ERRNO)
+-if test $PROVIDES_ERRNO = yes; then
+- AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
+-fi
++AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
+
+ dnl If a system doesn't have S_IFSOCK, define it as 0 which will
+ dnl make S_ISSOCK always return false (nice, eh?)
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
+-AC_MSG_RESULT($HAS_S_IFSOCK)
+-if test $HAS_S_IFSOCK = yes; then
+- AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
+-fi
++AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
+
+ dnl Some Unix's are missing S_ISLNK, S_ISSOCK
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
+-AC_MSG_RESULT($HAS_S_ISLNK)
+-if test $HAS_S_ISLNK = yes; then
+- AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
+-fi
++AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
+
+ AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
+-AC_MSG_RESULT($HAS_S_ISSOCK)
+-if test $HAS_S_ISSOCK = yes; then
+- AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
+-fi
++AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
+
+ AC_MSG_CHECKING(if timezone is defined)
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
++$HAS_TIMEZONE=yes
+ AC_MSG_RESULT($HAS_TIMEZONE)
+
+ dnl check for missing typedefs
+@@ -726,53 +710,12 @@
+ AC_MSG_RESULT(yes)
+ AC_CHECK_HEADERS([libelf.h gelf.h])
+ if test ".$ac_cv_header_libelf_h" = .no; then
+- dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't
+- dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is
+- dnl # set for non-LFS. Same applies for <gelf.h>, since it probably
+- dnl # includes <libelf.h>
+- AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE])
+- AC_COMPILE_IFELSE([
+- AC_LANG_PROGRAM([[
+-#undef _LARGEFILE64_SOURCE
+-#undef _LARGEFILE_SOURCE
+-#if !defined(_LP64)
+-# undef _FILE_OFFSET_BITS
+-# define _FILE_OFFSET_BITS 32
+-#endif
+-#include <libelf.h>
+- ]], [[
+- Elf_Data foo;
+- ]])
+- ], [
+- AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
+- ac_cv_header_libelf_h=yes
+- AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API])
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ])
++ AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
++ ac_cv_header_libelf_h=yes
+ fi
+ if test ".$ac_cv_header_gelf_h" = .no; then
+- AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE])
+- AC_COMPILE_IFELSE([
+- AC_LANG_PROGRAM([[
+-#undef _LARGEFILE64_SOURCE
+-#undef _LARGEFILE_SOURCE
+-#if !defined(_LP64)
+-# undef _FILE_OFFSET_BITS
+-# define _FILE_OFFSET_BITS 32
+-#endif
+-#include <gelf.h>
+- ]], [[
+- Elf32_Verdef foo;
+- ]])
+- ], [
+- AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
+- ac_cv_header_gelf_h=yes
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ])
++ AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
++ ac_cv_header_gelf_h=yes
+ fi
+ if test ".$ac_cv_header_gelf_h" = .yes; then
+ AC_CHECK_LIB([elf], [elf_version], [
+@@ -854,78 +797,9 @@
+ python_version=""
+ ;;
+ esac
+- for python_ver in $python_version ; do
+- if test "$python_ver" != "2.x" ; then
+- AC_MSG_CHECKING([for Python ${python_ver} API])
+- save_CFLAGS="${CFLAGS}"
+- for i in "$prefix" "/usr/local" "/usr"; do
+- CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}"
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include "Python.h"
+- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
+- ], [
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- PYTHON_PREFIX="${i}"
+- break
+- ], [
+- ], [
+- dnl if we're cross compiling, assume the user has a clue
+- if test "$withval" = "$python_ver"; then
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- break
+- fi
+- ])
+- done
+- CFLAGS="${save_CFLAGS}"
+- if test ".$PYTHON_VERSION" == "."; then
+- dnl check Mac OS X framework
+- save_CFLAGS="${CFLAGS}"
+- for f in "~" "" "/System" "/Network"; do
+- CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}"
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include "Python.h"
+- main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
+- ], [
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT([yes (using Python.framework)])
+- PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}"
+- break
+- ], [
+- ])
+- done
+- CFLAGS="${save_CFLAGS}"
+- fi
+- if test ".$PYTHON_VERSION" == "."; then
+- AC_MSG_RESULT(no)
+- fi
+- else
+- AC_MSG_CHECKING([for Python 2.x API])
+- AC_RUN_IFELSE([AC_LANG_SOURCE(
+- [[#include <python/Python.h>
+- main() { exit(strncmp("2.", PY_VERSION, 2)); } ]])
+- ], [
+- PYTHON_VERSION=""
+- AC_MSG_RESULT(yes)
+- ], [
+- AC_MSG_RESULT(no)
+- ], [
+- dnl if we're cross compiling, assume the user has a clue
+- if test "$withval" = "$python_ver"; then
+- PYTHON_VERSION="${python_ver}"
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_RESULT(no)
+- fi
+- ])
+- fi
+- if test ".$PYTHON_VERSION" != "."; then
+- WITH_PYTHON_SUBDIR=python
+- WITH_PYTHON_SUBPACKAGE=1
+- break
+- fi
+- done
++ PYTHON_VERSION="${python_ver}"
++ WITH_PYTHON_SUBDIR=python
++ WITH_PYTHON_SUBPACKAGE=1
+ fi
+ AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
+ [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"])
+@@ -1157,15 +1031,8 @@
+ AC_SUBST(WITH_PCRE_LIBS)
+ else
+ dnl # make sure PCRE POSIX API can be really _USED_ by RPM
+- LIBS_SAVED="$LIBS"
+ LIBS="-lpcreposix $LIBS"
+- AC_LINK_IFELSE([
+- AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)])
+- ], [
+- AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
+- ], [
+- LIBS="$LIBS_SAVED"
+- ])
++ AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
+ fi
+ dnl # enable PCRE native API support for embedded Lua
+ if test ".$WITH_LUA" = .yes; then
+@@ -1234,30 +1101,7 @@
+
+ dnl # figure out what root's primary group is
+ AC_MSG_CHECKING([root's primary group])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
+-#include <sys/types.h>
+-#include <pwd.h>
+-#include <grp.h>
+-int main()
+-{
+- struct passwd *root = NULL;
+- struct group *roots_group = NULL;
+- FILE * tempfile = NULL;
+- root = getpwuid( (uid_t) 0 );
+- if (root != NULL) {
+- roots_group = getgrgid(root->pw_gid);
+- if (roots_group != NULL) {
+- tempfile = fopen("conftest_rootg", "w");
+- if (tempfile != NULL) {
+- fprintf(tempfile, "%s\n", roots_group->gr_name);
+- fclose(tempfile);
+- exit(0);
+- }
+- }
+- }
+- exit(1);
+-}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root"
+-])
++$ROOT_GROUP="root"
+ AC_MSG_RESULT([$ROOT_GROUP])
+ AC_SUBST(ROOT_GROUP)
+
+Index: rpm-5.1.9/pcre/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/pcre/configure.ac 2009-01-14 20:19:31.000000000 +0000
++++ rpm-5.1.9/pcre/configure.ac 2010-07-06 14:51:50.769586089 +0100
+@@ -278,34 +278,6 @@
+ # The files below are C++ header files.
+ pcre_have_type_traits="0"
+ pcre_have_bits_type_traits="0"
+-if test "x$enable_cpp" = "xyes" -a -n "$CXX"
+-then
+-AC_LANG_PUSH(C++)
+-
+-# Older versions of pcre defined pcrecpp::no_arg, but in new versions
+-# it's called pcrecpp::RE::no_arg. For backwards ABI compatibility,
+-# we want to make one an alias for the other. Different systems do
+-# this in different ways. Some systems, for instance, can do it via
+-# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4).
+-OLD_LDFLAGS="$LDFLAGS"
+-for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \
+- "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do
+- AC_MSG_CHECKING([for alias support in the linker])
+- LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
+- # We try to run the linker with this new ld flag. If the link fails,
+- # we give up and remove the new flag from LDFLAGS.
+- AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp {
+- class RE { static int no_arg; };
+- int RE::no_arg;
+- }],
+- []),
+- [AC_MSG_RESULT([yes]);
+- EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
+- break;],
+- AC_MSG_RESULT([no]))
+-done
+-LDFLAGS="$OLD_LDFLAGS"
+-
+ # We could be more clever here, given we're doing AC_SUBST with this
+ # (eg set a var to be the name of the include file we want). But we're not
+ # so it's easy to change back to 'regular' autoconf vars if we needed to.
+@@ -316,7 +288,6 @@
+ AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"],
+ [pcre_have_type_traits="0"])
+
+-AC_LANG_POP
+ fi
+ # Using AC_SUBST eliminates the need to include config.h in a public .h file
+ AC_SUBST(pcre_have_type_traits)
+Index: rpm-5.1.9/db/dist/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/db/dist/configure.ac 2008-06-15 08:16:21.000000000 +0100
++++ rpm-5.1.9/db/dist/configure.ac 2010-07-06 15:36:39.262461127 +0100
+@@ -602,24 +602,6 @@
+ aux*) AC_LIBOBJ([getopt]);;
+ esac
+
+-# Linux has a broken O_DIRECT flag, but you can't detect it at configure time.
+-# Linux and SGI require buffer alignment we may not match, otherwise writes
+-# will fail. Default to not using the O_DIRECT flag.
+-if test "$db_cv_o_direct" = "yes"; then
+- AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
+- AC_TRY_LINK([
+- #include <sys/types.h>
+- #include <fcntl.h>], [
+- open("a", O_RDONLY | O_DIRECT, 0);
+- ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])])
+- if test \
+- "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then
+- AC_DEFINE(HAVE_O_DIRECT)
+- AH_TEMPLATE(HAVE_O_DIRECT,
+- [Define to 1 if you have the O_DIRECT flag.])
+- fi
+-fi
+-
+ # Check for largefile support.
+ AC_SYS_LARGEFILE
+
+Index: rpm-5.1.9/xz/configure.ac
+===================================================================
+--- rpm-5.1.9.orig/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000
++++ rpm-5.1.9/xz/configure.ac 2010-07-06 15:41:22.632467951 +0100
+@@ -457,26 +457,9 @@
+ #endif
+ ])
+
+-# Even if we have byteswap.h, we may lack the specific macros/functions.
+-if test x$ac_cv_header_byteswap_h = xyes ; then
+- m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
+- AC_MSG_CHECKING([if FUNC is available])
+- AC_LINK_IFELSE([AC_LANG_SOURCE([
+-#include <byteswap.h>
+-int
+-main(void)
+-{
+- FUNC[](42);
+- return 0;
+-}
+- ])], [
+- AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
+- [Define to 1 if] FUNC [is available.])
+- AC_MSG_RESULT([yes])
+- ], [AC_MSG_RESULT([no])])
+-
+- ])dnl
+-fi
++AC_DEFINE(HAVE_BSWAP_16, 1)
++AC_DEFINE(HAVE_BSWAP_32, 1)
++AC_DEFINE(HAVE_BSWAP_64, 1)
+
+
+ ###############################################################################
+@@ -527,90 +510,16 @@
+ # xz command line tool uses this to automatically limit its memory usage.
+ # - sysconf() gives all the needed info on GNU+Linux and Solaris.
+ # - BSDs use sysctl().
+-AC_MSG_CHECKING([how to detect the amount of physical memory])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <unistd.h>
+-int
+-main()
+-{
+- long i;
+- i = sysconf(_SC_PAGESIZE);
+- i = sysconf(_SC_PHYS_PAGES);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
++AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
+ [Define to 1 if the amount of physical memory can be detected
+ with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
+- AC_MSG_RESULT([sysconf])
+-], [
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <sys/types.h>
+-#ifdef HAVE_SYS_PARAM_H
+-# include <sys/param.h>
+-#endif
+-#include <sys/sysctl.h>
+-int
+-main()
+-{
+- int name[2] = { CTL_HW, HW_PHYSMEM };
+- unsigned long mem;
+- size_t mem_ptr_size = sizeof(mem);
+- sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1],
+- [Define to 1 if the amount of physical memory can be detected
+- with sysctl().])
+- AC_MSG_RESULT([sysctl])
+-], [
+- AC_MSG_RESULT([unknown])
+-])])
+
+ # Check how to find out the number of available CPU cores in the system.
+ # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
+ # use sysctl().
+-AC_MSG_CHECKING([how to detect the number of available CPU cores])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <unistd.h>
+-int
+-main()
+-{
+- long i;
+- i = sysconf(_SC_NPROCESSORS_ONLN);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
++AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
+ [Define to 1 if the number of available CPU cores can be
+ detected with sysconf(_SC_NPROCESSORS_ONLN).])
+- AC_MSG_RESULT([sysconf])
+-], [
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+-#include <sys/types.h>
+-#ifdef HAVE_SYS_PARAM_H
+-# include <sys/param.h>
+-#endif
+-#include <sys/sysctl.h>
+-int
+-main()
+-{
+- int name[2] = { CTL_HW, HW_NCPU };
+- int cpus;
+- size_t cpus_size = sizeof(cpus);
+- sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
+- return 0;
+-}
+-]])], [
+- AC_DEFINE([HAVE_NCPU_SYSCTL], [1],
+- [Define to 1 if the number of available CPU cores can be
+- detected with sysctl().])
+- AC_MSG_RESULT([sysctl])
+-], [
+- AC_MSG_RESULT([unknown])
+-])])
+-
+
+ ###############################################################################
+ # 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 0000000..a7097f7
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
@@ -0,0 +1,137 @@
+DESCRIPTION = "The RPM Package Manager - relaunched"
+DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
+HOMEPAGE = "http://rpm5.org/"
+LICENSE = "LGPL 2.1"
+DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
+PR = "r2"
+
+SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/SNAPSHOT/${BPN}-${PV}.tar.gz \
+ file://remove-compiled-tests.patch;apply=no \
+ file://perfile_rpmdeps.sh \
+ "
+inherit autotools gettext
+
+acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
+
+# Specify the default rpm macros in terms of adjustable variables
+rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+
+EXTRA_OECONF = "--with-python=$PYTHONVER \
+ --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \
+ --with-python-lib-dir=${libdir}/python$PYTHONVER \
+ --with-db=internal \
+ --with-db-tools-integrated \
+ --with-libelf \
+ --with-file=internal \
+ --without-apidocs \
+ --without-selinux \
+ --without-lua \
+ --without-dmalloc \
+ --without-efence \
+ --without-neon \
+ --with-pcre=${libdir} \
+ --with-path-macros=${rpm_macros} \
+ --with-bugreport=http://bugzilla.pokylinux.org"
+
+CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
+
+PACKAGES =+ "rpm-build python-rpm python-rpm-dbg"
+
+SOLIBS = "5.0.so"
+
+FILES_rpm-build = "${bindir}/*-rpmbuild \
+ ${bindir}/*-gendiff \
+ ${bindir}/*-rpmspecdump \
+ ${libdir}/rpm/helpers/* \
+ ${libdir}/rpm/*brp* \
+ ${libdir}/rpm/*check-files \
+ ${libdir}/rpm/*cross-build \
+ ${libdir}/rpm/*debugedit \
+ ${libdir}/rpm/*dep* \
+ ${libdir}/rpm/*prov* \
+ ${libdir}/rpm/*req* \
+ ${libdir}/rpm/*find* \
+ ${libdir}/rpm/qf/* \
+ "
+
+FILES_python-rpm = "${libdir}/python*/rpm/_*"
+FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
+
+# The mutex needs to be POSIX/pthreads/library or we can't
+# share a database between host and target environments
+# (there is a minor performance penalty, but not one great enough
+# to justify the pain of a more optimized approach!)
+EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
+
+do_configure() {
+ rm ${S}/db/dist/configure.in -f
+ for i in `find ${S} -name *.ac`; do
+ j=`echo $i | sed 's/.ac/.m4/g'`
+ mv $i $j
+ done
+ export ac_cv_va_copy=C99
+ autotools_do_configure
+ cd ${S}/db3
+ ${S}/db3/configure \
+ --build=${BUILD_SYS} \
+ --host=${HOST_SYS} \
+ --target=${TARGET_SYS} \
+ --prefix=${prefix} \
+ --exec_prefix=${exec_prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --oldincludedir=${oldincludedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ ${EXTRA_OECONF}
+}
+
+INSTALL_ACTIONS=""
+
+# When installing the native version, the rpm components are renamed with a
+# naming transform. We need to adjust the rpmpopt file with the same transform
+INSTALL_ACTIONS_virtclass-native="sed -i -e 's,rpm,${HOST_SYS}-rpm,' ${D}/${libdir}/rpm/rpmpopt"
+
+do_install_append() {
+ ${INSTALL_ACTIONS}
+ sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,pythondeps.sh,${HOST_SYS}-pythondeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,phpdeps.sh,${HOST_SYS}-phpdeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,javadeps.sh,${HOST_SYS}-javadeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,libtooldeps.sh,${HOST_SYS}-libtooldeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,pkgconfigdeps.sh,${HOST_SYS}-pkgconfigdeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,executabledeps.sh,${HOST_SYS}-executabledeps.sh,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,perl.prov,${HOST_SYS}-perl.prov,' ${D}/${libdir}/rpm/macros
+ sed -i -e 's,perl.req,${HOST_SYS}-perl.req,' ${D}/${libdir}/rpm/macros
+
+ install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
+
+ mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \
+ ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py
+
+}
+
+def rpm_python_version(d):
+ import os, bb
+ staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
+ if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
+ if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
+ if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
+ if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
+ raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
+
+# Use a shell variable here since otherwise gettext trys to expand this at
+# parse time when it manipulates EXTRA_OECONF which fails
+export PYTHONVER = "${@rpm_python_version(d)}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rsync/files/acinclude.m4 b/meta/recipes-devtools/rsync/files/acinclude.m4
new file mode 100644
index 0000000..735b41d
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/acinclude.m4
@@ -0,0 +1,95 @@
+dnl verbatim renamed from aclocal.m4 in rsync_3.0.7
+dnl 07/06/2010 - qhe
+
+dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
+dnl if the cache file is inconsistent with the current host,
+dnl target and build system types, execute CMD or print a default
+dnl error message.
+AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
+ AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_MSG_CHECKING([config.cache system type])
+ if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; } ||
+ { test x"${ac_cv_build_system_type+set}" = x"set" &&
+ test x"$ac_cv_build_system_type" != x"$build"; } ||
+ { test x"${ac_cv_target_system_type+set}" = x"set" &&
+ test x"$ac_cv_target_system_type" != x"$target"; }; then
+ AC_MSG_RESULT([different])
+ ifelse($#, 1, [$1],
+ [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
+ else
+ AC_MSG_RESULT([same])
+ fi
+ ac_cv_host_system_type="$host"
+ ac_cv_build_system_type="$build"
+ ac_cv_target_system_type="$target"
+])
+
+dnl Check for socklen_t: historically on BSD it is an int, and in
+dnl POSIX 1g it is a type of its own, but some platforms use different
+dnl types for the argument to getsockopt, getpeername, etc. So we
+dnl have to test to find something that will work.
+
+dnl This is no good, because passing the wrong pointer on C compilers is
+dnl likely to only generate a warning, not an error. We don't call this at
+dnl the moment.
+
+AC_DEFUN([TYPE_SOCKLEN_T],
+[
+ AC_CHECK_TYPE([socklen_t], ,[
+ AC_MSG_CHECKING([for socklen_t equivalent])
+ AC_CACHE_VAL([rsync_cv_socklen_t_equiv],
+ [
+ # Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ rsync_cv_socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t unsigned long "unsigned long"; do
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+
+ int getpeername (int, $arg2 *, $t *);
+ ],[
+ $t len;
+ getpeername(0,0,&len);
+ ],[
+ rsync_cv_socklen_t_equiv="$t"
+ break
+ ])
+ done
+ done
+
+ if test "x$rsync_cv_socklen_t_equiv" = x; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ ])
+ AC_MSG_RESULT($rsync_cv_socklen_t_equiv)
+ AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined])],
+ [#include <sys/types.h>
+#include <sys/socket.h>])
+])
+
+dnl AC_HAVE_TYPE(TYPE,INCLUDES)
+AC_DEFUN([AC_HAVE_TYPE], [
+AC_REQUIRE([AC_HEADER_STDC])
+cv=`echo "$1" | sed 'y%./+- %__p__%'`
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL([ac_cv_type_$cv],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+AC_INCLUDES_DEFAULT
+$2]],
+[[$1 foo;]])],
+[eval "ac_cv_type_$cv=yes"],
+[eval "ac_cv_type_$cv=no"]))dnl
+ac_foo=`eval echo \\$ac_cv_type_$cv`
+AC_MSG_RESULT($ac_foo)
+if test "$ac_foo" = yes; then
+ ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
+if false; then
+ AC_CHECK_TYPES($1)
+fi
+ AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
+fi
+])
diff --git a/meta/recipes-devtools/rsync/files/rsyncd.conf b/meta/recipes-devtools/rsync/files/rsyncd.conf
new file mode 100644
index 0000000..845f5b3
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/rsyncd.conf
@@ -0,0 +1,15 @@
+# /etc/rsyncd.conf
+
+# Minimal configuration file for rsync daemon
+# See rsync(1) and rsyncd.conf(5) man pages for help
+
+# This file is required by rsync --daemon
+pid file = /var/run/rsyncd.pid
+use chroot = yes
+read only = yes
+
+# Simple example for enabling your own local rsync server
+#[everything]
+# path = /
+# comment = Everything except /etc exposed
+# exclude = /etc
diff --git a/meta/recipes-devtools/rsync/rsync.inc b/meta/recipes-devtools/rsync/rsync.inc
new file mode 100644
index 0000000..fdc7e37
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync.inc
@@ -0,0 +1,24 @@
+DESCRIPTION = "A file-synchronization tool"
+HOMEPAGE = "http://rsync.samba.org/"
+BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
+SECTION = "console/network"
+PRIORITY = "optional"
+
+# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+# needs to add acl and attr
+DEPENDS = "popt"
+
+SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
+ file://rsyncd.conf"
+
+inherit autotools
+
+do_install_append() {
+ install -d ${D}/etc
+ install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
+}
+
+EXTRA_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 0000000..4337982
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_2.6.9.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "A file-synchronization tool"
+HOMEPAGE = "http://rsync.samba.org/"
+BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
+SECTION = "console/network"
+PRIORITY = "optional"
+
+# needs to add acl and attr
+DEPENDS = "popt"
+
+SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
+ file://rsyncd.conf"
+
+inherit autotools
+
+do_install_append() {
+ install -d ${D}/etc
+ install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
+}
+
+EXTRA_OEMAKE='STRIP=""'
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c"
+
+PR = "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 0000000..3a1e48a
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync_3.0.7.bb
@@ -0,0 +1,18 @@
+require rsync.inc
+
+PR = "r1"
+
+SRC_URI += "file://acinclude.m4"
+
+EXTRA_OECONF += "--disable-xattr-support --disable-acl-support"
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+ rm -f configure configure.sh
+ cp -f ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_configure_append () {
+ cp -f configure configure.sh
+}
diff --git a/meta/recipes-devtools/shasum/files/main.c b/meta/recipes-devtools/shasum/files/main.c
new file mode 100644
index 0000000..0748a94
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/main.c
@@ -0,0 +1,60 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "mhash_sha256.h"
+
+/*
+ * from driver.c of mhash
+ */
+static const char hexconvtab[] = "0123456789abcdef";
+
+static char *
+bin2hex(const unsigned char *old, const size_t oldlen, size_t * newlen)
+{
+ unsigned char *new = NULL;
+ int i, j;
+
+ new = (char *) malloc(oldlen * 2 * sizeof(char) + 1);
+ if (!new)
+ return (new);
+
+ for (i = j = 0; i < oldlen; i++) {
+ new[j++] = hexconvtab[old[i] >> 4];
+ new[j++] = hexconvtab[old[i] & 15];
+ }
+ new[j] = '\0';
+
+ if (newlen)
+ *newlen = oldlen * 2 * sizeof(char);
+
+ return (new);
+}
+
+
+int main(int argc, char** argv)
+{
+ FILE *file;
+ size_t n;
+ SHA256_CTX ctx;
+ unsigned char buf[1024];
+ byte output[33];
+
+ if ( argc <= 1 ) {
+ return EXIT_FAILURE;
+ }
+
+ if ( (file=fopen(argv[1], "rb")) == NULL ) {
+ return EXIT_FAILURE;
+ }
+
+ sha256_init(&ctx);
+
+ while ( (n=fread( buf, 1, sizeof(buf), file)) > 0 )
+ sha256_update(&ctx, buf, n );
+
+ sha256_final(&ctx);
+ sha256_digest(&ctx, output);
+
+ printf("%s ?%s\n", bin2hex(output, 32, &n), argv[1]);
+ return EXIT_SUCCESS;
+}
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 0000000..46090c5
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/mhash_sha256.h
@@ -0,0 +1,64 @@
+/* sha.h
+ *
+ * The sha1 and sha256 hash functions.
+ */
+
+/* nettle, low-level cryptographics library
+ *
+ * Copyright (C) 2001 Niels Möller
+ *
+ * The nettle library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version.
+ *
+ * The nettle library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the nettle library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifndef NETTLE_SHA_H_INCLUDED
+#define NETTLE_SHA_H_INCLUDED
+
+#include <inttypes.h>
+
+typedef uint32_t word32;
+typedef unsigned char byte;
+
+
+/* SHA256 */
+
+#define SHA256_DIGEST_SIZE 32
+#define SHA256_DATA_SIZE 64
+
+/* Digest is kept internally as 8 32-bit words. */
+#define _SHA256_DIGEST_LENGTH 8
+
+typedef struct sha256_ctx
+{
+ word32 state[_SHA256_DIGEST_LENGTH]; /* State variables */
+ word32 count_low, count_high; /* 64-bit block count */
+ byte block[SHA256_DATA_SIZE]; /* SHA256 data buffer */
+ unsigned int index; /* index into buffer */
+} SHA256_CTX;
+
+void
+sha256_init(struct sha256_ctx *ctx);
+
+void
+sha256_update(struct sha256_ctx *ctx, const byte *data, unsigned length);
+
+void
+sha256_final(struct sha256_ctx *ctx);
+
+void
+sha256_digest(const struct sha256_ctx *ctx, byte *digest);
+
+
+#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 0000000..e2ee2c6
--- /dev/null
+++ b/meta/recipes-devtools/shasum/files/sha256.c
@@ -0,0 +1,322 @@
+/* sha256.h
+ *
+ * The sha256 hash function.
+ */
+
+/* nettle, low-level cryptographics library
+ *
+ * Copyright (C) 2001 Niels Möller
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * The nettle library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the nettle library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+/* Modelled after the sha1.c code by Peter Gutmann. */
+
+#include "mhash_sha256.h"
+#include <stdlib.h>
+#include <string.h>
+
+
+#ifndef EXTRACT_UCHAR
+#define EXTRACT_UCHAR(p) (*(unsigned char *)(p))
+#endif
+
+#define STRING2INT(s) ((((((EXTRACT_UCHAR(s) << 8) \
+ | EXTRACT_UCHAR(s+1)) << 8) \
+ | EXTRACT_UCHAR(s+2)) << 8) \
+ | EXTRACT_UCHAR(s+3))
+
+/* This has been modified in order to fit in mhash.
+ * --nmav.
+ */
+
+/* A block, treated as a sequence of 32-bit words. */
+#define SHA256_DATA_LENGTH 16
+
+#define ROTR(n,x) ((x)>>(n) | ((x)<<(32-(n))))
+#define SHR(n,x) ((x)>>(n))
+
+/* The SHA256 functions. The Choice function is the same as the SHA1
+ function f1, and the majority function is the same as the SHA1 f3
+ function. They can be optimized to save one boolean operation each
+ - thanks to Rich Schroeppel, rcs@cs.arizona.edu for discovering
+ this */
+
+/* #define Choice(x,y,z) ( ( (x) & (y) ) | ( ~(x) & (z) ) ) */
+#define Choice(x,y,z) ( (z) ^ ( (x) & ( (y) ^ (z) ) ) )
+/* #define Majority(x,y,z) ( ((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)) ) */
+#define Majority(x,y,z) ( ((x) & (y)) ^ ((z) & ((x) ^ (y))) )
+
+#define S0(x) (ROTR(2,(x)) ^ ROTR(13,(x)) ^ ROTR(22,(x)))
+#define S1(x) (ROTR(6,(x)) ^ ROTR(11,(x)) ^ ROTR(25,(x)))
+
+#define s0(x) (ROTR(7,(x)) ^ ROTR(18,(x)) ^ SHR(3,(x)))
+#define s1(x) (ROTR(17,(x)) ^ ROTR(19,(x)) ^ SHR(10,(x)))
+
+/* Generated by the shadata program. */
+static const word32 K[64] = {
+ 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
+ 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
+ 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
+ 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
+ 0xe49b69c1UL, 0xefbe4786UL, 0xfc19dc6UL, 0x240ca1ccUL,
+ 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
+ 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
+ 0xc6e00bf3UL, 0xd5a79147UL, 0x6ca6351UL, 0x14292967UL,
+ 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
+ 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
+ 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
+ 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
+ 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
+ 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
+ 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
+ 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL,
+};
+
+/* The initial expanding function. The hash function is defined over an
+ 64-word expanded input array W, where the first 16 are copies of the input
+ data, and the remaining 64 are defined by
+
+ W[ t ] = s1(W[t-2] + W[t-7] + s0(W[i-15] + W[i-16]
+
+ This implementation generates these values on the fly in a circular
+ buffer - thanks to Colin Plumb, colin@nyx10.cs.du.edu for this
+ optimization.
+*/
+
+#define EXPAND(W,i) \
+( W[(i) & 15 ] += (s1(W[((i)-2) & 15]) + W[((i)-7) & 15] + s0(W[((i)-15) & 15])) )
+
+/* The prototype SHA sub-round. The fundamental sub-round is:
+
+ T1 = h + S1(e) + Choice(e,f,g) + K[t] + W[t]
+ T2 = S0(a) + Majority(a,b,c)
+ a' = T1+T2
+ b' = a
+ c' = b
+ d' = c
+ e' = d + T1
+ f' = e
+ g' = f
+ h' = g
+
+ but this is implemented by unrolling the loop 8 times and renaming
+ the variables
+ ( h, a, b, c, d, e, f, g ) = ( a, b, c, d, e, f, g, h ) each
+ iteration. This code is then replicated 8, using the next 8 values
+ from the W[] array each time */
+
+/* FIXME: We can probably reorder this to optimize away at least one
+ * of T1 and T2. It's crucial that DATA is only used once, as that
+ * argument will have side effects. */
+#define ROUND(a,b,c,d,e,f,g,h,k,data) do { \
+ word32 T1 = h + S1(e) + Choice(e,f,g) + k + data; \
+ word32 T2 = S0(a) + Majority(a,b,c); \
+ d += T1; \
+ h = T1 + T2; \
+} while (0)
+
+/* Initialize the SHA values */
+
+void sha256_init(struct sha256_ctx *ctx)
+{
+ /* Initial values, also generated by the shadata program. */
+ static const word32 H0[_SHA256_DIGEST_LENGTH] = {
+ 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL,
+ 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL,
+ };
+
+ memcpy(ctx->state, H0, sizeof(H0));
+
+ /* Initialize bit count */
+ ctx->count_low = ctx->count_high = 0;
+
+ /* Initialize buffer */
+ ctx->index = 0;
+}
+
+/* Perform the SHA transformation. Note that this code, like MD5, seems to
+ break some optimizing compilers due to the complexity of the expressions
+ and the size of the basic block. It may be necessary to split it into
+ sections, e.g. based on the four subrounds
+
+ Note that this function destroys the data area */
+
+static void sha256_transform(word32 * state, word32 * data)
+{
+ word32 A, B, C, D, E, F, G, H; /* Local vars */
+ unsigned i;
+ const word32 *k;
+ word32 *d;
+
+ /* Set up first buffer and local data buffer */
+ A = state[0];
+ B = state[1];
+ C = state[2];
+ D = state[3];
+ E = state[4];
+ F = state[5];
+ G = state[6];
+ H = state[7];
+
+ /* Heavy mangling */
+ /* First 16 subrounds that act on the original data */
+
+ for (i = 0, k = K, d = data; i < 16; i += 8, k += 8, d += 8) {
+ ROUND(A, B, C, D, E, F, G, H, k[0], d[0]);
+ ROUND(H, A, B, C, D, E, F, G, k[1], d[1]);
+ ROUND(G, H, A, B, C, D, E, F, k[2], d[2]);
+ ROUND(F, G, H, A, B, C, D, E, k[3], d[3]);
+ ROUND(E, F, G, H, A, B, C, D, k[4], d[4]);
+ ROUND(D, E, F, G, H, A, B, C, k[5], d[5]);
+ ROUND(C, D, E, F, G, H, A, B, k[6], d[6]);
+ ROUND(B, C, D, E, F, G, H, A, k[7], d[7]);
+ }
+
+ for (; i < 64; i += 16, k += 16) {
+ ROUND(A, B, C, D, E, F, G, H, k[0], EXPAND(data, 0));
+ ROUND(H, A, B, C, D, E, F, G, k[1], EXPAND(data, 1));
+ ROUND(G, H, A, B, C, D, E, F, k[2], EXPAND(data, 2));
+ ROUND(F, G, H, A, B, C, D, E, k[3], EXPAND(data, 3));
+ ROUND(E, F, G, H, A, B, C, D, k[4], EXPAND(data, 4));
+ ROUND(D, E, F, G, H, A, B, C, k[5], EXPAND(data, 5));
+ ROUND(C, D, E, F, G, H, A, B, k[6], EXPAND(data, 6));
+ ROUND(B, C, D, E, F, G, H, A, k[7], EXPAND(data, 7));
+ ROUND(A, B, C, D, E, F, G, H, k[8], EXPAND(data, 8));
+ ROUND(H, A, B, C, D, E, F, G, k[9], EXPAND(data, 9));
+ ROUND(G, H, A, B, C, D, E, F, k[10], EXPAND(data, 10));
+ ROUND(F, G, H, A, B, C, D, E, k[11], EXPAND(data, 11));
+ ROUND(E, F, G, H, A, B, C, D, k[12], EXPAND(data, 12));
+ ROUND(D, E, F, G, H, A, B, C, k[13], EXPAND(data, 13));
+ ROUND(C, D, E, F, G, H, A, B, k[14], EXPAND(data, 14));
+ ROUND(B, C, D, E, F, G, H, A, k[15], EXPAND(data, 15));
+ }
+
+ /* Update state */
+ state[0] += A;
+ state[1] += B;
+ state[2] += C;
+ state[3] += D;
+ state[4] += E;
+ state[5] += F;
+ state[6] += G;
+ state[7] += H;
+}
+
+static void sha256_block(struct sha256_ctx *ctx, const byte * block)
+{
+ word32 data[SHA256_DATA_LENGTH];
+ int i;
+
+ /* Update block count */
+ if (!++ctx->count_low)
+ ++ctx->count_high;
+
+ /* Endian independent conversion */
+ for (i = 0; i < SHA256_DATA_LENGTH; i++, block += 4)
+ data[i] = STRING2INT(block);
+
+ sha256_transform(ctx->state, data);
+}
+
+void
+sha256_update(struct sha256_ctx *ctx, const byte * buffer, unsigned length)
+{
+ if (ctx->index) { /* Try to fill partial block */
+ unsigned left = SHA256_DATA_SIZE - ctx->index;
+ if (length < left) {
+ memcpy(ctx->block + ctx->index, buffer, length);
+ ctx->index += length;
+ return; /* Finished */
+ } else {
+ memcpy(ctx->block + ctx->index, buffer, left);
+ sha256_block(ctx, ctx->block);
+ buffer += left;
+ length -= left;
+ }
+ }
+ while (length >= SHA256_DATA_SIZE) {
+ sha256_block(ctx, buffer);
+ buffer += SHA256_DATA_SIZE;
+ length -= SHA256_DATA_SIZE;
+ }
+ /* Buffer leftovers */
+ /* NOTE: The corresponding sha1 code checks for the special case length == 0.
+ * That seems supoptimal, as I suspect it increases the number of branches. */
+
+ memcpy(ctx->block, buffer, length);
+ ctx->index = length;
+}
+
+/* Final wrapup - pad to SHA1_DATA_SIZE-byte boundary with the bit pattern
+ 1 0* (64-bit count of bits processed, MSB-first) */
+
+void sha256_final(struct sha256_ctx *ctx)
+{
+ word32 data[SHA256_DATA_LENGTH];
+ int i;
+ int words;
+
+ i = ctx->index;
+
+ /* Set the first char of padding to 0x80. This is safe since there is
+ always at least one byte free */
+
+/* assert(i < SHA256_DATA_SIZE);
+ */
+ ctx->block[i++] = 0x80;
+
+ /* Fill rest of word */
+ for (; i & 3; i++)
+ ctx->block[i] = 0;
+
+ /* i is now a multiple of the word size 4 */
+ words = i >> 2;
+ for (i = 0; i < words; i++)
+ data[i] = STRING2INT(ctx->block + 4 * i);
+
+ if (words > (SHA256_DATA_LENGTH - 2)) { /* No room for length in this block. Process it and
+ * pad with another one */
+ for (i = words; i < SHA256_DATA_LENGTH; i++)
+ data[i] = 0;
+ sha256_transform(ctx->state, data);
+ for (i = 0; i < (SHA256_DATA_LENGTH - 2); i++)
+ data[i] = 0;
+ } else
+ for (i = words; i < SHA256_DATA_LENGTH - 2; i++)
+ data[i] = 0;
+
+ /* There are 512 = 2^9 bits in one block */
+ data[SHA256_DATA_LENGTH - 2] =
+ (ctx->count_high << 9) | (ctx->count_low >> 23);
+ data[SHA256_DATA_LENGTH - 1] =
+ (ctx->count_low << 9) | (ctx->index << 3);
+ sha256_transform(ctx->state, data);
+}
+
+void sha256_digest(const struct sha256_ctx *ctx, byte * s)
+{
+ int i;
+
+ if (s!=NULL)
+ for (i = 0; i < _SHA256_DIGEST_LENGTH; i++) {
+ *s++ = ctx->state[i] >> 24;
+ *s++ = 0xff & (ctx->state[i] >> 16);
+ *s++ = 0xff & (ctx->state[i] >> 8);
+ *s++ = 0xff & ctx->state[i];
+ }
+}
+
diff --git a/meta/recipes-devtools/shasum/shasum-native.bb b/meta/recipes-devtools/shasum/shasum-native.bb
new file mode 100644
index 0000000..d39a6c3
--- /dev/null
+++ b/meta/recipes-devtools/shasum/shasum-native.bb
@@ -0,0 +1,8 @@
+require shasum.inc
+
+inherit native
+
+INHIBIT_DEFAULT_DEPS = "1"
+PATCHTOOL = "patch"
+
+do_fetch[depends] = ""
diff --git a/meta/recipes-devtools/shasum/shasum.inc b/meta/recipes-devtools/shasum/shasum.inc
new file mode 100644
index 0000000..d5f1e8b
--- /dev/null
+++ b/meta/recipes-devtools/shasum/shasum.inc
@@ -0,0 +1,23 @@
+SUMMARY = "A simple tool to create sha256 hashes from a file"
+LICENSE = "LGPL"
+
+PR = "r1"
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://main.c \
+ file://mhash_sha256.h \
+ file://sha256.c "
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ $CC $CFLAGS $CPPFLAGS -o oe_sha256sum main.c sha256.c
+}
+
+do_install() {
+ install -d ${D}${bindir}/
+ install ${S}/oe_sha256sum ${D}${bindir}/
+}
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 0000000..a1c6065
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/disable-revision-install.patch
@@ -0,0 +1,22 @@
+--- subversion-1.2.0-r0/Makefile.in.old 2005-07-17 22:28:21.898728312 +0200
++++ subversion-1.2.0-r0/Makefile.in 2005-07-17 22:30:05.361999504 +0200
+@@ -260,7 +260,7 @@
+ clean: external-clean local-clean
+ distclean: external-distclean local-distclean
+ extraclean: external-extraclean local-extraclean
+-install: external-install local-install revision-install
++install: external-install local-install #revision-install
+
+ @INCLUDE_OUTPUTS@
+
+@@ -320,8 +320,8 @@
+ local-install: @INSTALL_RULES@
+
+ ### HACK!! Find a better way to do this
+-revision-install:
+- subversion/svnversion/svnversion $(top_srcdir) /repos/svn/trunk > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
++#revision-install:
++# subversion/svnversion/svnversion $(top_srcdir) /repos/svn/trunk > $(DESTDIR)$(includedir)/subversion-1/svn-revision.txt
+
+ install-static: @INSTALL_STATIC_RULES@
+
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 0000000..08343b0
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/libtool2.patch
@@ -0,0 +1,15 @@
+Index: subversion-1.5.5/configure.ac
+===================================================================
+--- subversion-1.5.5.orig/configure.ac 2008-08-26 18:27:56.000000000 +0100
++++ subversion-1.5.5/configure.ac 2009-01-07 18:00:47.000000000 +0000
+@@ -153,8 +153,8 @@
+ LIBTOOL="$sh_libtool"
+ SVN_LIBTOOL="$sh_libtool"
+ else
+- sh_libtool="$abs_builddir/libtool"
+- SVN_LIBTOOL="\$(SHELL) $sh_libtool"
++ sh_libtool="$abs_builddir/$host_alias-libtool"
++ SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
+ dnl libtoolize requires that the following line not be indented
+ ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+ 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 0000000..b567d5c
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion-1.5.5/neon-detection.patch
@@ -0,0 +1,36 @@
+diff --git a/build/ac-macros/neon.m4 b/build/ac-macros/neon.m4
+index 9fcf859..8d964f3 100644
+--- a/build/ac-macros/neon.m4
++++ b/build/ac-macros/neon.m4
+@@ -38,7 +38,7 @@ AC_DEFUN(SVN_LIB_NEON,
+ if test "$withval" = "yes" ; then
+ AC_MSG_ERROR([--with-neon requires an argument.])
+ else
+- neon_config="$withval/bin/neon-config"
++ neon_config="env env PKG_CONFIG_PATH=${withval}:${PKG_CONFIG_PATH} pkg-config neon"
+ fi
+
+ SVN_NEON_CONFIG()
+@@ -117,10 +117,10 @@ dnl SVN_NEON_CONFIG()
+ dnl neon-config found, gather relevant information from it
+ AC_DEFUN(SVN_NEON_CONFIG,
+ [
+- if test -f "$neon_config"; then
+- if test "$neon_config" != ""; then
++ if true; then
++ if true; then
+ AC_MSG_CHECKING([neon library version])
+- NEON_VERSION=`$neon_config --version | sed -e 's/^neon //'`
++ NEON_VERSION=`$neon_config --modversion | sed -e 's/^neon //'`
+ AC_MSG_RESULT([$NEON_VERSION])
+
+ if test -n "`echo \"$NEON_VERSION\" | grep '^0\.25\.'`" ; then
+@@ -133,7 +133,7 @@ AC_DEFUN(SVN_NEON_CONFIG,
+ test "$svn_allowed_neon" = "any"; then
+ svn_allowed_neon_on_system="yes"
+ SVN_NEON_INCLUDES=[`$neon_config --cflags | sed -e 's/-D[^ ]*//g'`]
+- NEON_LIBS=`$neon_config --la-file`
++ NEON_LIBS=`$neon_config --libs`
+ CFLAGS=["$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"]
+ svn_lib_neon="yes"
+ 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 0000000..8adac8a
--- /dev/null
+++ b/meta/recipes-devtools/subversion/subversion_1.5.5.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "The Subversion (svn) client"
+SECTION = "console/network"
+DEPENDS = "apr-util neon"
+RDEPENDS = "neon"
+LICENSE = "Apache BSD"
+HOMEPAGE = "http://subversion.tigris.org"
+
+PR = "r6"
+
+SRC_URI = "http://subversion.tigris.org/downloads/${P}.tar.bz2 \
+ file://disable-revision-install.patch;patch=1 \
+ file://neon-detection.patch;patch=1 \
+ file://libtool2.patch;patch=1"
+
+EXTRA_OECONF = "--with-neon=${STAGING_EXECPREFIXDIR} \
+ --without-berkeley-db --without-apxs --without-apache \
+ --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+ --with-apr-util=${STAGING_BINDIR_CROSS}"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+ rm -f ${S}/libtool
+ rm -f ${S}/build/libtool.m4
+}
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 0000000..c90c7af
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/files/cross-build.patch
@@ -0,0 +1,64 @@
+Use ?= for Makefile variables to use poky environment variables.
+Original method to sed s/CC =/CC ?=/ is not applicable anymore
+because of the Makefile changes.
+
+against 3.86
+
+06/28/2010 - qhe
+
+also AUXDIR stays in $(LIBDIR)/syslinux rather than $(DATADIR)/syslinux
+
+07/08/2010 - qhe
+
+---
+diff --git a/MCONFIG b/MCONFIG
+index e9c16d3..4d49f33 100644
+--- a/MCONFIG
++++ b/MCONFIG
+@@ -18,13 +18,13 @@
+ MAKEFLAGS += -r
+ MAKE += -r
+
+-BINDIR = /usr/bin
+-SBINDIR = /sbin
+-LIBDIR = /usr/lib
+-DATADIR = /usr/share
+-AUXDIR = $(DATADIR)/syslinux
+-MANDIR = /usr/man
+-INCDIR = /usr/include
++BINDIR ?= /usr/bin
++SBINDIR ?= /sbin
++LIBDIR ?= /usr/lib
++DATADIR ?= /usr/share
++AUXDIR = $(LIBDIR)/syslinux
++MANDIR ?= /usr/man
++INCDIR ?= /usr/include
+ TFTPBOOT = /tftpboot
+ COM32DIR = $(AUXDIR)/com32
+
+@@ -38,18 +38,18 @@ PERL = perl
+
+ CHMOD = chmod
+
+-CC = gcc
++CC ?= gcc
+ gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \
+ if $(CC) $(1) -c $(topdir)/dummy.c -o $$tmpf 2>/dev/null ; \
+ then echo '$(1)'; else echo '$(2)'; fi; \
+ rm -f $$tmpf)
+
+-LD = ld
+-OBJDUMP = objdump
+-OBJCOPY = objcopy
+-AR = ar
+-NM = nm
+-RANLIB = ranlib
++LD ?= ld
++OBJDUMP ?= objdump
++OBJCOPY ?= objcopy
++AR ?= ar
++NM ?= nm
++RANLIB ?= ranlib
+ GZIPPROG = gzip
+ PNGTOPNM = pngtopnm
+ 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 0000000..5edbd24
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux_3.86.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "A multi-purpose linux bootloader"
+HOMEPAGE = "http://syslinux.zytor.com/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://README;beginline=28;endline=34;md5=a4607efd4a6392017186d08099e7d546"
+
+# If you really want to run syslinux, you need mtools. We just want the
+# ldlinux.* stuff for now, so skip mtools-native
+DEPENDS = "nasm-native"
+PR = "r1"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/boot/syslinux/syslinux-${PV}.tar.bz2 \
+ file://cross-build.patch"
+
+COMPATIBLE_HOST = '(x86_64|i.86.*)-(linux|freebsd.*)'
+
+EXTRA_OEMAKE = " \
+ BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
+ DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
+"
+# syslinux uses $LD for linking, strip `-Wl,' so it can work
+export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`"
+
+do_configure() {
+ # drop win32 targets or build fails
+ sed -e 's,win32/\S*,,g' -i Makefile
+
+ # clean installer executables included in source tarball
+ oe_runmake clean
+}
+
+do_compile() {
+ # Rebuild only the installer; keep precompiled bootloaders
+ # as per author's request (doc/distrib.txt)
+ oe_runmake CC="${CC}" installer
+}
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+
+ install -d ${D}${libdir}/syslinux/
+ install -m 644 ${S}/core/ldlinux.sys ${D}${libdir}/syslinux/
+ install -m 644 ${S}/core/ldlinux.bss ${D}${libdir}/syslinux/
+}
+
+BBCLASSEXTEND = "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 0000000..8b2654b
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/fix-configure.patch
@@ -0,0 +1,44 @@
+Index: unix/tcl.m4
+===================================================================
+--- tcl8.4.11/unix.orig/tcl.m4
++++ tcl8.4.11/unix/tcl.m4
+@@ -845,7 +845,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2250,7 +2250,7 @@ AC_DEFUN(SC_BLOCKING_STYLE, [
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+Index: unix/configure
+===================================================================
+--- tcl8.4.11/unix.orig/configure
++++ tcl8.4.11/unix/configure
+@@ -2130,7 +2130,7 @@ echo "configure:2121: checking system ve
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -7608,7 +7608,7 @@ echo "configure:7600: checking FIONBIO v
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ 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 0000000..b2d98c1
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch
@@ -0,0 +1,63 @@
+Index: unix/Makefile.in
+===================================================================
+--- unix.orig/Makefile.in
++++ unix/Makefile.in
+@@ -622,20 +622,20 @@ ro-test: tcltest
+ shell: tclsh
+ @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
+- ./tclsh $(SCRIPT)
++ tclsh $(SCRIPT)
+
+ # This target can be used to run tclsh inside either gdb or insight
+ gdb: tclsh
+ @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
+ @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
+- $(GDB) ./tclsh --command=gdb.run
++ $(GDB) tclsh --command=gdb.run
+ rm gdb.run
+
+ # This target can be used to run tclsh inside ddd
+ ddd: tclsh
+ @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
+ @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run
+- $(DDD) -command=gdb.run ./tclsh
++ $(DDD) -command=gdb.run tclsh
+ rm gdb.run
+
+ VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v
+@@ -648,7 +648,7 @@ valgrind: tclsh tcltest
+ valgrindshell: tclsh
+ @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
+- valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT)
++ valgrind $(VALGRINDARGS) tclsh $(SCRIPT)
+
+ # The following target outputs the name of the top-level source directory for
+ # Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL
+@@ -817,14 +817,14 @@ install-tzdata: tclsh
+ @echo "Installing time zone data"
+ @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
+- ./tclsh $(TOOL_DIR)/installData.tcl \
++ tclsh $(TOOL_DIR)/installData.tcl \
+ $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
+
+ install-msgs: tclsh
+ @echo "Installing message catalogs"
+ @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
+- ./tclsh $(TOOL_DIR)/installData.tcl \
++ tclsh $(TOOL_DIR)/installData.tcl \
+ $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
+
+ install-doc: doc
+@@ -1764,7 +1764,7 @@ html-tk: tclsh
+ BUILD_HTML = \
+ @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
+- ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
++ tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
+ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
+
+ #
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 0000000..9cb816d
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch
@@ -0,0 +1,50 @@
+Index: unix/configure
+===================================================================
+--- unix.orig/configure
++++ unix/configure
+@@ -6726,6 +6726,7 @@ fi
+ # symbols when dynamically loaded into tclsh.
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
++ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.so.0'
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+Index: unix/tcl.m4
+===================================================================
+--- unix.orig/tcl.m4
++++ unix/tcl.m4
+@@ -1424,6 +1424,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
++ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.0'
+
+ CFLAGS_OPTIMIZE="-O2"
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+@@ -1431,12 +1432,15 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
++ # following line added by CW for Debian GNU/Linux
++ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
++
+ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ AS_IF([test $doRpath = yes], [
+- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++ CC_SEARCH_FLAGS=''])
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+ AS_IF([test $do64bit = yes], [
+@@ -2079,7 +2083,7 @@ dnl # preprocessing tests use only CPPFL
+
+ AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
+ LIB_SUFFIX=${SHARED_LIB_SUFFIX}
+- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
++ MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)'
+ ], [
+ 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 0000000..8803400
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl_8.5.8.bb
@@ -0,0 +1,62 @@
+DESCRIPTION = "Tool Command Language"
+LICENSE = "tcl"
+SECTION = "devel/tcltk"
+HOMEPAGE = "http://tcl.sourceforge.net"
+DEPENDS = "tcl-native"
+LIC_CHKSUM_FILES = "file://../license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ file://../compat/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ file://../library/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ file://../macosx/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ file://../tests/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ file://../win/license.terms;md5=7b4d3c71b2d9a8c1b373609867975570 \
+ "
+
+PR = "r2"
+
+BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \
+ file://tcl-add-soname.patch"
+
+SRC_URI = "${BASE_SRC_URI} \
+ file://fix_non_native_build_issue.patch"
+
+SRC_URI_virtclass-native = "${BASE_SRC_URI}"
+
+S = "${WORKDIR}/tcl${PV}/unix"
+
+inherit autotools
+
+DEPENDS_virtclass-native = ""
+
+EXTRA_OECONF = "--enable-threads"
+
+do_configure() {
+ gnu-configize
+ oe_runconf
+}
+
+do_compile_prepend() {
+ echo > ../compat/fixstrtod.c
+}
+
+do_install() {
+ autotools_do_install
+ oe_libinstall -so libtcl8.5 ${STAGING_LIBDIR}
+ ln -sf ./tclsh8.5 ${D}${bindir}/tclsh
+ sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
+ sed -i "s,-L${libdir},," tclConfig.sh
+ install -d ${STAGING_BINDIR_CROSS}/
+ install -m 0755 tclConfig.sh ${STAGING_BINDIR_CROSS}
+ cd ..
+ for dir in compat generic unix
+ do
+ install -d ${STAGING_INCDIR}/tcl${PV}/$dir
+ install -m 0644 $dir/*.h ${STAGING_INCDIR}/tcl${PV}/$dir/
+ done
+}
+
+PACKAGES =+ "${PN}-lib"
+FILES_${PN}-lib = "${libdir}/libtcl8.5.so.*"
+FILES_${PN} += "${libdir}/tcl8.5"
+FILES_${PN}-dev += "${libdir}/tclConfig.sh"
+
+BBCLASSEXTEND = "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 0000000..886ce92
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/001-2.2b47-2.2b51.patch
@@ -0,0 +1,2344 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+diff -urN nfs-server-2.2beta47/.version nfs-server-2.2beta51/.version
+--- nfs-server-2.2beta47/.version Tue Sep 7 09:47:27 1999
++++ nfs-server-2.2beta51/.version Fri Nov 8 14:45:36 2002
+@@ -1 +1 @@
+-2.2beta46
++2.2beta51
+diff -urN nfs-server-2.2beta47/ChangeLog nfs-server-2.2beta51/ChangeLog
+--- nfs-server-2.2beta47/ChangeLog Wed Nov 10 10:17:51 1999
++++ nfs-server-2.2beta51/ChangeLog Fri Nov 8 14:45:36 2002
+@@ -1,8 +1,59 @@
++Thu Nov 9 17:03:05 2000
++
++ * No longer use OPEN_MAX
++
++ * Reworked configure.in, BUILD script no longer needed
++ (nor functioning)
++
++ * Be more anal about matching cached fh's and real files.
++ In addition to the psi, we also store dev/ino/type now
++ and match that in fh_find.
++
++ * Write pidfiles
++
++ * Support nosetuid
++
++Wed Feb 9 14:52:34 2000
++
++ * auth_init.c didn't properly parse options--rot_squash
++ which is obviously a typo was parsed as ro.
++ Thanks to Jan Steffan for complaining about this :-)
++
++Mon Jan 31 11:48:34 2000
++
++ * Fixed Y2K bug in logging.c.
++ Thanks to Jonathan Hankins <jhankins@homewood.k12.al.us>.
++
++Thu Dec 9 11:14:21 1999
++
++ * Fix handling of NFS-mounted and /proc directories.
++ They weren't properly hidden.
++ Thanks to Dick Streefland <dick_streefland@tasking.com>
++ for the report and a first patch.
++
+ Wed Nov 10 10:17:16 1999
+
+ * Security fix for buffer overflow in fh_buildpath
+ No thanks to Mariusz who reported it to bugtraq
+ rather than me.
++
++Wed Nov 09 17:10:00 1999
++
++ * Workaround for broken Solaris clients that can't handle
++ atime/mtime/ctime of 0.
++ Thanks to Frank Wuebbelin for his problem report and
++ testing the fix.
++
++ * Fixed typo in exports.man
++
++Tue Nov 2 10:31:14 1999
++
++ * Patch for mode 0100 and 0100 executables by
++ Michael Deutschmann <michael@talamasca.wkpowerlink.com>
++
++ * Common startup stuff for all daemons.
++ Inspired by code sent to me by someone (sorry, I forgot
++ your name, and the mail's gone!)
+
+ Wed Sep 8 09:07:38 1999
+
+diff -urN nfs-server-2.2beta47/Makefile.in nfs-server-2.2beta51/Makefile.in
+--- nfs-server-2.2beta47/Makefile.in Tue Jun 22 14:53:10 1999
++++ nfs-server-2.2beta51/Makefile.in Fri Nov 8 14:45:36 2002
+@@ -17,23 +17,30 @@
+
+ #### Start of system configuration section. ####
+
+-srcdir = @srcdir@
+-VPATH = @srcdir@
++srcdir = @srcdir@
++VPATH = @srcdir@
+
+-CC = @CC@
+-AR = ar
+-RANLIB = @RANLIB@
+-
+-INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
+-INSTALL_DATA = @INSTALL_DATA@
+-MAKEINFO = makeinfo
+-TEXI2DVI = texi2dvi
+-RPCGEN = @RPCGEN@ @RPCGEN_C@
++CC = @CC@
++AR = ar
++RANLIB = @RANLIB@
++
++INSTALL = @INSTALL@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
++INSTALL_DATA = @INSTALL_DATA@
++MAKEINFO = makeinfo
++TEXI2DVI = texi2dvi
++RPCGEN = @RPCGEN@ @RPCGEN_C@
+
+ # General compile options and libs:
+-DEFS = @DEFS@ $(NFSD_DEFS)
+-LIBS = libnfs.a @LIBS@
++DEFS = @DEFS@ $(NFSD_DEFS)
++LIBS = libnfs.a @LIBS@
++
++# Ugidd support
++UGIDD_PROG = @UGIDD_PROG@
++UGIDD_MAN = @UGIDD_MAN@
++
++# New inode mapping scheme
++DEVTAB_FILE = $(install_prefix)@PATH_DEVTAB@
+
+ # Compile options for nfsd:
+ # CALL_PROFILING
+@@ -80,9 +87,6 @@
+
+ #### End of system configuration section. ####
+
+-# include site-specific defintions generated by BUILD.
+-include site.mk
+-
+ SHELL = /bin/sh
+
+ SRCS = version.c logging.c fh.c devtab.c \
+@@ -96,19 +100,19 @@
+ utimes.c mkdir.c rename.c getopt.c getopt_long.c \
+ alloca.c mountlist.c xmalloc.c \
+ xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
+- haccess.c failsafe.c signals.c
++ haccess.c daemon.c signals.c
+ XDRFILES = mount.x nfs_prot.x
+ GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
+ ugid.h ugid_xdr.c ugid_clnt.c
+ HDRS = system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \
+ rpcmisc.h faccess.h rquotad.h rquota.h haccess.h
+-LIBHDRS = fsusage.h getopt.h mountlist.h failsafe.h signals.h
++LIBHDRS = fsusage.h getopt.h mountlist.h daemon.h signals.h
+ MANPAGES5 = exports
+ MANPAGES8p = mountd nfsd $(UGIDD_MAN)
+ MANPAGES8 = showmount
+ MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8)
+ LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \
+- nfsmounted.o faccess.o haccess.o failsafe.o \
++ nfsmounted.o faccess.o haccess.o daemon.o \
+ signals.o @LIBOBJS@ @ALLOCA@
+ OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o
+ NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
+@@ -174,15 +178,13 @@
+ ${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)
+
+ $(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
+- $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS) \
+- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
++ $(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS)
+
+ $(rpcprefix)nfsd: $(NFSD_OBJS) libnfs.a
+ $(CC) $(LDFLAGS) -o $@ $(NFSD_OBJS) $(LIBS)
+
+ $(rpcprefix)ugidd: $(UGIDD_OBJS) libnfs.a
+- $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS) \
+- $(LIBWRAP_DIR) $(LIBWRAP_LIB)
++ $(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS)
+
+ showmount: $(SHOWMOUNT_OBJS) libnfs.a
+ $(CC) $(LDFLAGS) -o $@ $(SHOWMOUNT_OBJS) $(LIBS)
+diff -urN nfs-server-2.2beta47/aclocal.m4 nfs-server-2.2beta51/aclocal.m4
+--- nfs-server-2.2beta47/aclocal.m4 Fri Jun 11 12:04:22 1999
++++ nfs-server-2.2beta51/aclocal.m4 Fri Nov 8 14:45:36 2002
+@@ -221,20 +221,14 @@
+ ])dnl
+ dnl *********** libwrap bug **************
+ define(AC_LIBWRAP_BUG,
+- [if test -f site.mk; then
+- . ./site.mk
+- fi
+- if test ! -z "$LIBWRAP_DIR"; then
++ [if test "$ac_cv_lib_wrap_main" = yes; then
+ AC_MSG_CHECKING(for link problem with libwrap.a)
+ AC_CACHE_VAL(nfsd_cv_lib_wrap_bug,
+- [ac_save_LIBS=$LIBS
+- LIBS="$LIBS $LIBWRAP_DIR $LIBWRAP_LIB"
+- AC_TRY_LINK([
++ [AC_TRY_LINK([
+ extern int deny_severity;
+ ],[
+ deny_severity=1;
+ ], nfsd_cv_lib_wrap_bug=no, nfsd_cv_lib_wrap_bug=yes)
+- LIBS=$ac_save_LIBS
+ ]) dnl
+ AC_MSG_RESULT($nfsd_cv_lib_wrap_bug)
+ test $nfsd_cv_lib_wrap_bug = yes && AC_DEFINE(HAVE_LIBWRAP_BUG)
+diff -urN nfs-server-2.2beta47/auth.c nfs-server-2.2beta51/auth.c
+--- nfs-server-2.2beta47/auth.c Mon Sep 13 16:56:03 1999
++++ nfs-server-2.2beta51/auth.c Fri Nov 8 14:45:36 2002
+@@ -84,8 +84,9 @@
+ 0, /* relative links */
+ 0, /* noaccess */
+ 1, /* cross_mounts */
+- (uid_t)-2, /* default uid */
+- (gid_t)-2, /* default gid */
++ 1, /* allow setuid */
++ 65534, /* default uid */
++ 65534, /* default gid */
+ 0, /* no NIS domain */
+ };
+
+@@ -99,8 +100,9 @@
+ 0, /* relative links */
+ 0, /* noaccess */
+ 1, /* cross_mounts */
+- (uid_t)-2, /* default uid */
+- (gid_t)-2, /* default gid */
++ 0, /* allow setuid */
++ 65534, /* default uid */
++ 65534, /* default gid */
+ 0, /* no NIS domain */
+ };
+
+@@ -673,6 +675,7 @@
+ cpp = &unknown_clients;
+ } else {
+ cpp = &known_clients;
++ cp->clnt_addr = *(struct in_addr *) hp->h_addr;
+ auth_hash_host(cp, hp);
+ }
+ cp->next = *cpp;
+diff -urN nfs-server-2.2beta47/auth.h nfs-server-2.2beta51/auth.h
+--- nfs-server-2.2beta47/auth.h Thu Apr 8 14:47:56 1999
++++ nfs-server-2.2beta51/auth.h Fri Nov 8 14:45:36 2002
+@@ -23,14 +23,6 @@
+ extern char * public_root_path;
+ extern struct nfs_fh public_root;
+
+-#if defined(linux) && defined(i386) && !defined(HAVE_SETFSUID)
+-# define MAYBE_HAVE_SETFSUID
+-#endif
+-
+-#ifdef MAYBE_HAVE_SETFSUID
+-extern int have_setfsuid;
+-#endif
+-
+ /*
+ * These externs are set in the dispatcher (dispatch.c) and auth_fh
+ * (nfsd.c) so that we can determine access rights, export options,
+@@ -59,6 +51,7 @@
+ int link_relative;
+ int noaccess;
+ int cross_mounts;
++ int allow_setuid;
+ uid_t nobody_uid;
+ gid_t nobody_gid;
+ char * clnt_nisdomain;
+@@ -112,7 +105,7 @@
+ extern void auth_free_lists(void);
+ extern nfs_client *auth_clnt(struct svc_req *rqstp);
+ extern nfs_mount *auth_path(nfs_client *, struct svc_req *, char *);
+-extern void auth_user(nfs_mount *, struct svc_req *);
++extern int auth_user(nfs_mount *, struct svc_req *);
+
+ extern nfs_client *auth_get_client(char *);
+ extern nfs_mount *auth_match_mount(nfs_client *, char *);
+diff -urN nfs-server-2.2beta47/auth_clnt.c nfs-server-2.2beta51/auth_clnt.c
+--- nfs-server-2.2beta47/auth_clnt.c Wed Nov 10 10:18:06 1999
++++ nfs-server-2.2beta51/auth_clnt.c Fri Nov 8 14:45:36 2002
+@@ -12,20 +12,17 @@
+ */
+
+
++#include <sys/fsuid.h>
+ #include "system.h"
+ #include "nfsd.h"
+-#include "fakefsuid.h"
+-
+-#ifndef svc_getcaller
+-#define svc_getcaller(x) ((struct sockaddr_in *) &(x)->xp_rtaddr.buf)
+-#endif
++#include "rpcmisc.h"
+
+
+-#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
+-static void setfsids(uid_t, gid_t, gid_t *, int);
++#if defined(HAVE_SETFSUID)
++static int setfsids(uid_t, gid_t, gid_t *, int);
+ #endif
+ #ifndef HAVE_SETFSUID
+-static void seteids(uid_t, gid_t, gid_t *, int);
++static int seteids(uid_t, gid_t, gid_t *, int);
+ #endif
+
+ uid_t auth_uid = 0; /* Current effective user ids */
+@@ -43,6 +40,17 @@
+ short *gid, short *nrgids, int *groups);
+ #endif
+
++/*
++ * The following crap is required for glibc 2.1 which has 32bit uids
++ * in user land mapped to 16bit uids in the Linux kernel
++ */
++#if defined(HAVE_BROKEN_SETFSUID)
++# define native_uid(u) ((unsigned short)(u))
++# define native_gid(g) ((unsigned short)(g))
++#else
++# define native_uid(u) (u)
++# define native_gid(g) (g)
++#endif
+
+ /*
+ * For an RPC request, look up the NFS client info along with the
+@@ -92,8 +100,9 @@
+ }
+
+ if (logging_enabled(D_AUTH)) {
+- Dprintf(D_AUTH, "auth_path(%s): mount point %s, (%s%s%s%s%s)\n",
+- path, mp->path,
++ Dprintf(D_AUTH, "auth_path(%s, %s): "
++ "mount point %s, (%s%s%s%s%s)\n",
++ inet_ntoa(cp->clnt_addr), path, mp->path,
+ mp->o.all_squash? "all_squash " : (
+ mp->o.root_squash? "root_squash " : ""),
+ (mp->o.uidmap == map_daemon)? "uidmap " : "",
+@@ -105,7 +114,8 @@
+ return mp;
+ }
+
+-void auth_user(nfs_mount *mp, struct svc_req *rqstp)
++int
++auth_user(nfs_mount *mp, struct svc_req *rqstp)
+ {
+ uid_t cuid;
+ gid_t cgid;
+@@ -160,23 +170,18 @@
+ else if (cred_len > NGRPS)
+ cred_len = NGRPS;
+
+- cuid = luid(cred_uid, mp, rqstp);
+- cgid = lgid(cred_gid, mp, rqstp);
++ cuid = luid(native_uid(cred_uid), mp, rqstp);
++ cgid = lgid(native_gid(cred_gid), mp, rqstp);
+ clen = cred_len;
+ for (i = 0; i < cred_len; i++)
+- cgids[i] = lgid(cred_gids[i], mp, rqstp);
++ cgids[i] = lgid(native_gid(cred_gids[i]), mp, rqstp);
+ } else {
+ /* On systems that have 32bit uid_t in user space but
+ * 16bit in the kernel, we need to truncate the
+ * nobody ID (default -2).
+ */
+-#if !defined(HAVE_BROKEN_SETFSUID)
+- cuid = mp->o.nobody_uid;
+- cgid = mp->o.nobody_gid;
+-#else
+- cuid = (unsigned short) mp->o.nobody_uid;
+- cgid = (unsigned short) mp->o.nobody_gid;
+-#endif
++ cuid = native_uid(mp->o.nobody_uid);
++ cgid = native_gid(mp->o.nobody_gid);
+ /* Construct a list of one gid. */
+ cgids[0] = cgid;
+ clen = 1;
+@@ -193,14 +198,9 @@
+ * upper 16 bits set (including our default nobody uid -2).
+ */
+ #if defined(HAVE_SETFSUID)
+- setfsids(cuid, cgid, cgids, clen);
++ return setfsids(cuid, cgid, cgids, clen);
+ #else
+-#if defined(MAYBE_HAVE_SETFSUID)
+- if (have_setfsuid)
+- setfsids(cuid, cgid, cgids, clen);
+- else
+-#endif
+- seteids(cuid, cgid, cgids, clen);
++ return seteids(cuid, cgid, cgids, clen);
+ #endif
+ }
+
+@@ -210,6 +210,8 @@
+ void
+ auth_override_uid(uid_t uid)
+ {
++ int res;
++
+ /* extension hooks: */
+ efs_setfsuid(uid);
+
+@@ -217,19 +219,18 @@
+ uid = (unsigned short) uid;
+ #endif
+ #if defined(HAVE_SETFSUID)
+- setfsuid(uid);
++ res = setfsuid(uid);
+ #else
+-#if defined(MAYBE_HAVE_SETFSUID)
+- if (have_setfsuid)
+- setfsuid(uid);
+- else
+-#endif
+- seteuid(uid);
++ res = seteuid(uid);
+ #endif
++ /* should never happen */
++ if (res < 0)
++ Dprintf(L_FATAL, "auth_override_uid(%d) failed: %s",
++ uid, strerror(errno));
+ }
+
+-#if defined(HAVE_SETFSUID) || defined(MAYBE_HAVE_SETFSUID)
+-static void
++#if defined(HAVE_SETFSUID)
++static int
+ setfsids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
+ {
+ /* extension hooks: */
+@@ -238,43 +239,47 @@
+
+ /* First, set the user ID. */
+ if (auth_uid != cred_uid) {
+- if (setfsuid(cred_uid) < 0)
++ if (setfsuid(cred_uid) < 0) {
+ Dprintf(L_ERROR, "Unable to setfsuid %d: %s\n",
+ cred_uid, strerror(errno));
+- else
+- auth_uid = cred_uid;
++ return 0;
++ }
++ auth_uid = cred_uid;
+ }
+
+ /* Next, the group ID. */
+ if (auth_gid != cred_gid) {
+- if (setfsgid(cred_gid) < 0)
++ if (setfsgid(cred_gid) < 0) {
+ Dprintf(L_ERROR, "Unable to setfsgid %d: %s\n",
+ cred_gid, strerror(errno));
+- else
+- auth_gid = cred_gid;
++ return 0;
++ }
++ auth_gid = cred_gid;
+ }
+
+ #ifdef HAVE_SETGROUPS
+ /* Finally, set the supplementary group IDs if possible. */
+- if (cred_len < 0 || cred_len > NGRPS)
++ if (cred_len < 0 || cred_len > NGRPS) {
+ Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
+- else if (cred_len != auth_gidlen
+- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
+- if (setgroups(cred_len, cred_gids) < 0)
++ return 0;
++ }
++ if (cred_len != auth_gidlen
++ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
++ if (setgroups(cred_len, cred_gids) < 0) {
+ Dprintf(L_ERROR, "Unable to setgroups: %s\n",
+ strerror(errno));
+- else {
+- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
+- auth_gidlen = cred_len;
++ return 0;
+ }
++ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
++ auth_gidlen = cred_len;
+ }
+ #endif /* HAVE_SETGROUPS */
+-
++ return 1;
+ }
+ #endif
+
+ #if !defined(HAVE_SETFSUID)
+-static void
++static int
+ seteids(uid_t cred_uid, gid_t cred_gid, gid_t *cred_gids, int cred_len)
+ {
+ /* extension hooks: */
+@@ -286,52 +291,62 @@
+ /* First set the group ID. */
+ if (auth_gid != cred_gid) {
+ if (auth_uid != ROOT_UID) {
+- if (seteuid(ROOT_UID) < 0)
++ if (seteuid(ROOT_UID) < 0) {
+ Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
+ ROOT_UID, strerror(errno));
+- else
+- auth_uid = ROOT_UID;
++ return 0;
++ }
++ auth_uid = ROOT_UID;
+ }
+- if (setegid(cred_gid) < 0)
++ if (setegid(cred_gid) < 0) {
+ Dprintf(L_ERROR, "Unable to setegid(%d): %s\n",
+ cred_gid, strerror(errno));
+- else
+- auth_gid = cred_gid;
++ return 0;
++ }
++ auth_gid = cred_gid;
+ }
+
+ #ifdef HAVE_SETGROUPS
+ /* Next set the supplementary group IDs if possible. */
+- if (cred_len < 0 || cred_len > NGRPS)
++ if (cred_len < 0 || cred_len > NGRPS) {
+ Dprintf(L_ERROR, "Negative or huge cred_len: %d\n", cred_len);
+- else if (cred_len != auth_gidlen
+- || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
++ return 0;
++ }
++ if (cred_len != auth_gidlen
++ || memcmp(cred_gids, auth_gids, auth_gidlen*sizeof(gid_t))) {
+ if (auth_uid != ROOT_UID) {
+- if (seteuid(ROOT_UID) < 0)
++ if (seteuid(ROOT_UID) < 0) {
+ Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
+ ROOT_UID, strerror(errno));
+- else
+- auth_uid = ROOT_UID;
++ return 0;
++ }
++ auth_uid = ROOT_UID;
+ }
+- if (setgroups(cred_len, cred_gids) < 0)
++ if (setgroups(cred_len, cred_gids) < 0) {
+ Dprintf(L_ERROR, "Unable to setgroups: %s\n",
+ strerror(errno));
+- else {
+- memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
+- auth_gidlen = cred_len;
++ return 0;
+ }
++ memcpy(auth_gids, cred_gids, cred_len*sizeof(gid_t));
++ auth_gidlen = cred_len;
+ }
+ #endif /* HAVE_SETGROUPS */
+
+ /* Finally, set the user ID. */
+ if (auth_uid != cred_uid) {
+- if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0)
++ if (auth_uid != ROOT_UID && seteuid(ROOT_UID) < 0) {
+ Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
+ ROOT_UID, strerror(errno));
+- if (seteuid(cred_uid) < 0)
++ return 0;
++ }
++ if (seteuid(cred_uid) < 0) {
+ Dprintf(L_ERROR, "Unable to seteuid(%d): %s\n",
+ cred_uid, strerror(errno));
+- else
+- auth_uid = cred_uid;
++ return 0;
++ }
++ auth_uid = cred_uid;
+ }
++
++ return 1;
+ }
+ #endif
+diff -urN nfs-server-2.2beta47/auth_init.c nfs-server-2.2beta51/auth_init.c
+--- nfs-server-2.2beta47/auth_init.c Mon Apr 19 14:01:21 1999
++++ nfs-server-2.2beta51/auth_init.c Fri Nov 8 14:45:36 2002
+@@ -13,7 +13,6 @@
+ */
+
+ #include "nfsd.h"
+-#include "fakefsuid.h"
+ #include <pwd.h>
+
+ #define LINE_SIZE 1024
+@@ -263,55 +262,63 @@
+ cp++;
+ while (*cp != terminator) {
+ kwd = cp;
+- while (isalpha(*cp) || *cp == '_' || *cp == '=') {
+- /* break out of loop after = sign */
+- if (*cp++ == '=')
+- break;
+- }
++ /* Gobble up keyword and "=" if there is one */
++ while (isalpha(*cp) || *cp == '_')
++ ++cp;
++ if (*cp == '=')
++ ++cp;
++
+ klen = cp - kwd;
+
+ /* process keyword */
+- if (strncmp(kwd, "secure", 6) == 0)
++#define ifkwd(n, string) \
++ if (klen == (n) && !strncmp(kwd, string, (n)))
++
++ ifkwd(2, "ro")
++ mp->o.read_only = 1;
++ else ifkwd(2, "rw")
++ mp->o.read_only = 0;
++ else ifkwd(6, "secure")
+ mp->o.secure_port = 1;
+- else if (strncmp(kwd, "insecure", 8) == 0)
++ else ifkwd(8, "insecure")
+ mp->o.secure_port = 0;
+- else if (strncmp(kwd, "root_squash", 11) == 0)
++ else ifkwd(11, "root_squash")
+ mp->o.root_squash = 1;
+- else if (strncmp(kwd, "no_root_squash", 14) == 0)
++ else ifkwd(14, "no_root_squash")
+ mp->o.root_squash = 0;
+- else if (strncmp(kwd, "ro", 2) == 0)
+- mp->o.read_only = 1;
+- else if (strncmp(kwd, "rw", 2) == 0)
+- mp->o.read_only = 0;
+- else if (strncmp(kwd, "link_relative", 13) == 0)
++ else ifkwd(13, "link_relative")
+ mp->o.link_relative = 1;
+- else if (strncmp(kwd, "link_absolute", 13) == 0)
++ else ifkwd(13, "link_absolute")
+ mp->o.link_relative = 0;
+- else if (strncmp(kwd, "map_daemon", 10) == 0)
++ else ifkwd(10, "map_daemon")
+ mp->o.uidmap = map_daemon;
+- else if (strncmp(kwd, "map_nis=", 8) == 0)
++ else ifkwd(8, "map_nis=")
+ parse_nis_uidmap(mp, &cp);
+- else if (strncmp(kwd, "map_static=", 11) == 0)
++ else ifkwd(11, "map_static=")
+ parse_static_uidmap(mp, &cp);
+- else if (strncmp(kwd, "map_identity", 12) == 0)
++ else ifkwd(12, "map_identity")
+ mp->o.uidmap = identity;
+- else if (strncmp(kwd, "all_squash", 10) == 0)
++ else ifkwd(10, "all_squash")
+ mp->o.all_squash = 1;
+- else if (strncmp(kwd, "no_all_squash", 13) == 0)
++ else ifkwd(13, "no_all_squash")
+ mp->o.all_squash = 0;
+- else if (strncmp(kwd, "noaccess", 8) == 0)
++ else ifkwd(8, "noaccess")
+ mp->o.noaccess = 1;
+- else if (strncmp(kwd, "squash_uids=", 12) == 0)
++ else ifkwd(12, "squash_uids=")
+ parse_squash(mp, 1, &cp);
+- else if (strncmp(kwd, "squash_gids=", 12) == 0)
++ else ifkwd(12, "squash_gids=")
+ parse_squash(mp, 0, &cp);
+- else if (strncmp(kwd, "anonuid=", 8) == 0)
++ else ifkwd(8, "anonuid=")
+ mp->o.nobody_uid = parse_num(&cp);
+- else if (strncmp(kwd, "anongid=", 8) == 0)
++ else ifkwd(8, "anongid=")
+ mp->o.nobody_gid = parse_num(&cp);
+- else if (strncmp(kwd, "async", 5) == 0)
++ else ifkwd(6, "setuid")
++ mp->o.allow_setuid = 1;
++ else ifkwd(8, "nosetuid")
++ mp->o.allow_setuid = 0;
++ else ifkwd(5, "async")
+ /* knfsd compatibility, ignore */;
+- else if (strncmp(kwd, "sync", 4) == 0)
++ else ifkwd(4, "sync")
+ /* knfsd compatibility, ignore */;
+ else {
+ Dprintf(L_ERROR,
+@@ -566,11 +573,6 @@
+ auth_check_all_wildcards();
+ auth_sort_all_mountlists();
+ auth_log_all();
+-
+-#if defined(MAYBE_HAVE_SETFSUID) && !defined(HAVE_SETFSUID)
+- /* check if the a.out setfsuid syscall works on this machine */
+- have_setfsuid = (setfsuid(0) >= 0);
+-#endif
+
+ auth_initialized = 1;
+ }
+diff -urN nfs-server-2.2beta47/config.h.in nfs-server-2.2beta51/config.h.in
+--- nfs-server-2.2beta47/config.h.in Fri Jun 11 12:01:22 1999
++++ nfs-server-2.2beta51/config.h.in Fri Nov 8 14:45:36 2002
+@@ -3,7 +3,7 @@
+ /* Define if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+-#ifndef _ALL_SOURCE
++#ifdef _ALL_SOURCE
+ #undef _ALL_SOURCE
+ #endif
+
+diff -urN nfs-server-2.2beta47/configure.in nfs-server-2.2beta51/configure.in
+--- nfs-server-2.2beta47/configure.in Fri Jun 11 11:58:10 1999
++++ nfs-server-2.2beta51/configure.in Fri Nov 8 14:45:36 2002
+@@ -2,7 +2,36 @@
+ dnl Updated for autoconf 2.
+ dnl
+ AC_INIT(nfsd.c)
+-AC_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADER(config.h site.h)
++
++dnl **************************************************************
++dnl * handle --enable options
++dnl **************************************************************
++AC_ARG_ENABLE(new-inodes,
++ [ --enable-new-inodes Enable new-style inode inodes])
++AC_ARG_WITH(devtab,
++ [ --with-devtab=file Specify location for devtab [/var/lib/nfs/devtab]],
++ PATH_DEVTAB=$withval,
++ PATH_DEVTAB=/var/lib/nfs/devtab)
++AC_ARG_ENABLE(ugid-dynamic,
++ [ --enable-ugid-dynamic Enable uid mapping using rpc.ugidd (not recommended)])
++AC_ARG_ENABLE(ugid-nis,
++ [ --enable-ugid-nis Enable NIS-based uid mapping])
++AC_ARG_ENABLE(host-access,
++ [ --enable-host-access Enable host access checking])
++AC_ARG_ENABLE(mount-logging,
++ [ --disable-mount-logging Do not log mount operations to syslog],,
++ enable_mount_logging=yes)
++AC_ARG_WITH(exports-uid,
++ [ --with-exports-uid=N Make sure that /etc/exports is owned by uid N],,
++ with_exports_uid=0)
++AC_ARG_WITH(exports-gid,
++ [ --with-exports-gid=N Make sure that /etc/exports is owned by gid N],,
++ with_exports_gid=0)
++
++dnl **************************************************************
++dnl * Check for all kinds of stuff
++dnl **************************************************************
+ AC_PROG_CC
+ # If we're using gcc, we want warning flags
+ test -n "$GCC" &&
+@@ -19,7 +48,7 @@
+ AC_MINIX
+ AC_ISC_POSIX
+ AC_PROG_INSTALL
+-AC_CROSS_CHECK
++dnl AC_CROSS_CHECK
+ AC_STDC_HEADERS
+ AC_GNULIBC
+ AC_CONST
+@@ -52,14 +81,45 @@
+ AC_CHECK_LIB(rpc, main)
+ AC_CHECK_LIB(crypt, main)
+ AC_CHECK_LIB(nys, main)
+-AC_REPLACE_FUNCS(strerror realpath mkdir rename utimes strdup strstr getopt getopt_long)
+ AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred)
+ AC_AUTHDES_GETUCRED
+ AC_BROKEN_SETFSUID
+ AC_MOUNTLIST
+ AC_FSUSAGE
++AC_CHECK_LIB(wrap, main)
+ AC_LIBWRAP_BUG
+ AC_BSD_SIGNALS
++
++dnl **************************************************************
++dnl * Munge user specified options
++dnl **************************************************************
++if test "$enable_new_inodes" = yes; then
++ AC_DEFINE(ENABLE_DEVTAB)
++fi
++if test "$enable_ugid_dynamic" = yes; then
++ AC_DEFINE(ENABLE_UGID_DAEMON)
++ UGIDD_PROG=\${rpcprefix}.ugidd
++ UGIDD_MAN=ugidd
++fi
++if test "$enable_ugid_nis" = yes; then
++ AC_DEFINE(ENABLE_UGID_NIS)
++fi
++if test "$enable_host_access" = yes; then
++ AC_DEFINE(HOSTS_ACCESS)
++fi
++if test "$enable_mount_logging" = yes; then
++ AC_DEFINE(WANT_LOG_MOUNTS)
++fi
++AC_DEFINE_UNQUOTED(EXPORTSOWNERUID, $with_exports_uid)
++AC_DEFINE_UNQUOTED(EXPORTSOWNERGID, $with_exports_gid)
++AC_SUBST(PATH_DEVTAB)
++AC_SUBST(UGIDD_PROG)
++AC_SUBST(UGIDD_MAN)
++
++dnl **************************************************************
++dnl * Output CFLAGS and LDFLAGS
++dnl **************************************************************
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(CFLAGS)
++
+ AC_OUTPUT(Makefile)
+diff -urN nfs-server-2.2beta47/daemon.c nfs-server-2.2beta51/daemon.c
+--- nfs-server-2.2beta47/daemon.c Thu Jan 1 01:00:00 1970
++++ nfs-server-2.2beta51/daemon.c Fri Nov 8 14:45:52 2002
+@@ -0,0 +1,270 @@
++/*
++ * daemon.c
++ *
++ * Copyright (C) 1998, <okir@monad.swb.de>
++ *
++ * Implements common daemon stuff and
++ * fail-safe mode for nfsd/mountd.
++ */
++
++#include "system.h"
++#include "logging.h"
++#include "signals.h"
++#include <sys/wait.h>
++
++static const char * pidfilename = 0;
++static const char * get_signame(int signo);
++
++/*
++ * Do the Crawley Thing
++ */
++void
++daemonize(void)
++{
++ int c;
++
++ /* Ignore SIGHUP so the parent can exit while we're still
++ * in limbo */
++ ignore_signal(SIGHUP);
++
++ /* Now fork */
++ c = fork();
++ if (c < 0)
++ Dprintf(L_FATAL, "unable to fork: %s", strerror(errno));
++
++ /* Parent process: exit */
++ if (c > 0)
++ exit(0);
++
++ /* Do the session stuff */
++ close(0);
++ close(1);
++ close(2);
++#ifdef HAVE_SETSID
++ setsid();
++#else
++ if ((c = open("/dev/tty", O_RDWR)) >= 0) {
++ ioctl(c, TIOCNOTTY, (char *) NULL);
++ close(c);
++ }
++#endif
++
++ /* Stop stderr logging */
++ background_logging();
++}
++
++void
++setpidpath(const char *filename)
++{
++ pidfilename = filename;
++}
++
++void
++writepid(pid_t pid, int clear)
++{
++ FILE *fp;
++
++ fp = fopen(pidfilename, clear? "w" : "a");
++ if (fp == NULL)
++ Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
++ fprintf(fp, "%d\n", pid);
++ fclose(fp);
++ return;
++}
++
++void
++failsafe(int level, int ncopies)
++{
++ int *servers, running, child, i;
++ int pid, signo, status;
++ time_t last_restart = 0, now;
++ int restarts = 0, backoff = 60;
++
++ servers = (int *) xmalloc(ncopies * sizeof(int));
++ memset(servers, 0, ncopies * sizeof(int));
++
++ /* Loop forever, until we get SIGTERM */
++ running = 0;
++ while (1) {
++ /* Rewrite the pidfile */
++ writepid(getpid(), 1);
++ for (i = 0; i < ncopies; i++) {
++ if (servers[i] != 0)
++ writepid(servers[i], 0);
++ }
++
++ while (running < ncopies) {
++ if ((now = time(NULL)) == last_restart) {
++ if (++restarts > 2 * ncopies) {
++ Dprintf(L_ERROR,
++ "Servers restarting too "
++ "quickly, backing off.");
++ if (backoff < 60 * 60)
++ backoff <<= 1;
++ sleep(backoff);
++ }
++ } else {
++ last_restart = now;
++ restarts = 0;
++ backoff = 60;
++ }
++
++ /* Locate a free pid slot */
++ for (i = 0, child = -1; i < ncopies; i++) {
++ if (servers[i] == 0) {
++ child = i;
++ break;
++ }
++ }
++
++ if (child < 0)
++ Dprintf(L_FATAL, "failsafe: no pid slot?!");
++
++ Dprintf(D_GENERAL,
++ "starting server thread %d...\n", child + 1);
++
++ pid = fork();
++ if (pid < 0)
++ Dprintf(L_FATAL,
++ "Unable to fork for failsafe: %s",
++ strerror(errno));
++
++ if (pid == 0) {
++ /* Child process: continue with execution. */
++ return;
++ }
++
++ writepid(pid, 0);
++ servers[child] = pid;
++ running++;
++ }
++
++ /* Ignore some signals */
++ ignore_signal(SIGTERM);
++ ignore_signal(SIGHUP);
++ ignore_signal(SIGINT);
++ ignore_signal(SIGCHLD);
++
++ if ((pid = wait(&status)) < 0) {
++ Dprintf((errno == ECHILD)? L_FATAL : L_WARNING,
++ "failsafe: wait(): %s", strerror(errno));
++ continue;
++ }
++
++ /* Locate the child */
++ for (i = 0, child = -1; i < ncopies; i++) {
++ if (servers[i] == pid) {
++ child = i;
++ break;
++ }
++ }
++
++ if (child < 0) {
++ Dprintf(L_WARNING,
++ "failsafe: unknown child (pid %d) terminated",
++ pid);
++ continue;
++ }
++
++ /* Book-keeping */
++ servers[child] = 0;
++ running--;
++
++ if (WIFSIGNALED(status)) {
++ signo = WTERMSIG(status);
++ if (signo == SIGTERM) {
++ Dprintf(L_NOTICE, "failsafe: "
++ "child %d terminated by SIGTERM. %s.",
++ pid, running? "Continue" : "Exit");
++ } else {
++ Dprintf(L_WARNING, "failsafe: "
++ "child %d terminated by %s. "
++ "Restarting.",
++ pid, get_signame(signo));
++ child = -1; /* Restart */
++ }
++ } else if (WIFEXITED(status)) {
++ Dprintf(L_NOTICE, "failsafe: "
++ "child %d exited, status %d.",
++ pid, WEXITSTATUS(status));
++ } else {
++ Dprintf(L_ERROR, "failsafe: "
++ "abnormal child termination, "
++ "pid=%d status=%d. Restarting.",
++ pid, status);
++ child = -1; /* Restart */
++ }
++
++ /* If child >= 0, we should not restart */
++ if (child >= 0) {
++ if (!running) {
++ Dprintf(D_GENERAL,
++ "No more children, exiting.");
++ exit(0);
++ }
++ for (i = child; i < ncopies-1; i++)
++ servers[i] = servers[i+1];
++ ncopies--; /* Make sure we start no new servers */
++ }
++ }
++}
++
++/*
++ * Failsafe session, catch core file.
++ *
++ * Not yet implemented.
++ * General outline: we need to fork first, because nfsd changes
++ * uids frequently, and the kernel won't write out a core file after
++ * that. The forked proc starts out with a clean dumpable flag though.
++ *
++ * After the fork, we might want to make sure we end up in some common
++ * directory that the failsafe loop knows about.
++ */
++void
++failsafe_loop(int level, void (*function)(void))
++{
++ /* NOP */
++}
++
++static const char *
++get_signame(int signo)
++{
++ static char namebuf[30];
++
++ switch (signo) {
++ case SIGHUP: return "SIGHUP";
++ case SIGINT: return "SIGINT";
++ case SIGQUIT: return "SIGQUIT";
++ case SIGILL: return "SIGILL";
++ case SIGTRAP: return "SIGTRAP";
++ case SIGIOT: return "SIGIOT";
++ case SIGBUS: return "SIGBUS";
++ case SIGFPE: return "SIGFPE";
++ case SIGKILL: return "SIGKILL";
++ case SIGUSR1: return "SIGUSR1";
++ case SIGSEGV: return "SIGSEGV";
++ case SIGUSR2: return "SIGUSR2";
++ case SIGPIPE: return "SIGPIPE";
++ case SIGALRM: return "SIGALRM";
++ case SIGTERM: return "SIGTERM";
++ case SIGCHLD: return "SIGCHLD";
++ case SIGCONT: return "SIGCONT";
++ case SIGSTOP: return "SIGSTOP";
++ case SIGTSTP: return "SIGTSTP";
++ case SIGTTIN: return "SIGTTIN";
++ case SIGTTOU: return "SIGTTOU";
++ case SIGURG: return "SIGURG";
++ case SIGXCPU: return "SIGXCPU";
++ case SIGXFSZ: return "SIGXFSZ";
++ case SIGVTALRM: return "SIGVTALRM";
++ case SIGPROF: return "SIGPROF";
++ case SIGWINCH: return "SIGWINCH";
++ case SIGIO: return "SIGIO";
++#ifdef SIGPWR
++ case SIGPWR: return "SIGPWR";
++#endif
++ }
++
++ sprintf(namebuf, "signal #%d", signo);
++ return namebuf;
++}
+diff -urN nfs-server-2.2beta47/daemon.h nfs-server-2.2beta51/daemon.h
+--- nfs-server-2.2beta47/daemon.h Thu Jan 1 01:00:00 1970
++++ nfs-server-2.2beta51/daemon.h Fri Nov 8 14:45:52 2002
+@@ -0,0 +1,18 @@
++/*
++ * daemon.h
++ *
++ * Daemon support
++ */
++
++#ifndef CRAWLEY_H
++#define CRAWLEY_H
++
++#define _PATH_NFSD_PIDFILE "/var/run/nfsd.pid"
++#define _PATH_MOUNTD_PIDFILE "/var/run/mountd.pid"
++
++extern void daemonize(void);
++extern void setpidpath(const char *);
++extern void writepid(pid_t, int);
++extern void failsafe(int level, int ncopies);
++
++#endif /* CRAWLEY_H */
+diff -urN nfs-server-2.2beta47/exports.man nfs-server-2.2beta51/exports.man
+--- nfs-server-2.2beta47/exports.man Wed Nov 10 10:18:49 1999
++++ nfs-server-2.2beta51/exports.man Fri Nov 8 14:45:36 2002
+@@ -45,6 +45,12 @@
+ simultaneously. This is done by specifying an IP address and netmask pair
+ as
+ .IR address/netmask .
++.IP "world
++You can export a directory to the world (i.e. to all computers that
++are able to reach your NFS server network-wise) by using the empty
++hostname. When exporting to the world, the
++.BR root_squash ", " all_squash ", " ro " and " nosetuid
++options are turned on by default.
+ .TP
+ .B =public
+ This is a special ``hostname'' that identifies the given directory name
+@@ -81,6 +87,12 @@
+ by using the
+ .IR ro " option.
+ .TP
++.I setuid
++This allows clients to assert the setuid and setgid bits on regular
++files. For non-anonymous exports, this option is on by default.
++For anonymous exports, the default is
++.IR nosetuid .
++.TP
+ .I noaccess
+ This makes everything below the directory inaccessible for the named
+ client. This is useful when you want to export a directory hierarchy to
+@@ -296,6 +308,22 @@
+ .I /usr/X11R6
+ entry apply. This is also true when the latter is a wildcard or netgroup
+ entry.
++.PP
++You should also be careful about where you place spaces in the
++exports file. For instance, the following may appear as if you've
++exported
++.BR /pub " readonly to host " foozle ,
++but what this does in fact is export the directory to
++.B foozle
++with the default options,
++.I and
++export it to the world with the readonly option:
++.PP
++.nf
++.ta +3i
++# bad: export to the world
++/pub foozle (ro)
++.fi
+ .SH FILES
+ /etc/exports
+ .SH DIAGNOSTICS
+diff -urN nfs-server-2.2beta47/fh.c nfs-server-2.2beta51/fh.c
+--- nfs-server-2.2beta47/fh.c Wed Nov 10 10:41:14 1999
++++ nfs-server-2.2beta51/fh.c Fri Nov 8 14:45:36 2002
+@@ -95,17 +95,14 @@
+ static int fh_list_size;
+ static time_t curtime;
+
+-#ifndef FOPEN_MAX
+-#define FOPEN_MAX 256
+-#endif
+-
+ #ifndef FHTRACE
+ #undef D_FHTRACE
+ #define D_FHTRACE D_FHCACHE
+ #endif
+
+-static fhcache * fd_cache[FOPEN_MAX] = { NULL };
++static fhcache ** fd_cache = NULL;
+ static int fd_cache_size = 0;
++static int fd_cache_max = 0;
+
+ #ifndef NFSERR_INVAL /* that Sun forgot */
+ #define NFSERR_INVAL 22
+@@ -141,10 +138,13 @@
+
+ /* Forward declared local functions */
+ static psi_t path_psi(char *, nfsstat *, struct stat *, int);
++static psi_t path_psi_m(char *, nfsstat *, struct stat *,
++ struct stat *, int);
+ static int fh_flush_fds(void);
+ static char * fh_dump(svc_fh *);
+ static void fh_insert_fdcache(fhcache *fhc);
+ static void fh_unlink_fdcache(fhcache *fhc);
++static void fh_complain(const char *msg, fhcache *fhc);
+
+ static void
+ fh_move_to_front(fhcache *fhc)
+@@ -192,6 +192,13 @@
+ static void
+ fh_insert_fdcache(fhcache *fhc)
+ {
++#ifdef FHTRACE
++ Dprintf(D_FHTRACE, "insert fh %x into fdcache @%d\n", fhc->h.psi, fhc->fd);
++ if (fhc->fd < 0) {
++ fh_complain("fd cache bug: bad fd", fhc);
++ return;
++ }
++#endif
+ if (fhc == fd_lru_head)
+ return;
+ if (fhc->fd_next || fhc->fd_prev)
+@@ -203,9 +210,20 @@
+ fhc->fd_next = fd_lru_head;
+ fd_lru_head = fhc;
+
++ if (fhc->fd >= fd_cache_max) {
++ int oldmax = fd_cache_max, newmax;
++
++ newmax = (fhc->fd + 8) & ~7;
++ fd_cache = (fhcache **) xrealloc(fd_cache, newmax * sizeof(fhcache *));
++ memset(fd_cache + oldmax, 0, (newmax - oldmax) * sizeof(fhcache *));
++ fd_cache_max = newmax;
++ }
++
+ #ifdef FHTRACE
+ if (fd_cache[fhc->fd] != NULL) {
+- Dprintf(L_ERROR, "fd cache inconsistency!\n");
++ Dprintf(L_ERROR, "fd cache inconsistency (two fh's for same fd)");
++ fh_complain("new fh", fhc);
++ fh_complain("old fh", fd_cache[fhc->fd]);
+ return;
+ }
+ #endif
+@@ -225,7 +243,7 @@
+ } else if (fd_lru_tail == fhc) {
+ fd_lru_tail = prev;
+ } else {
+- Dprintf(L_ERROR, "fd cache inconsistency\n");
++ fh_complain("fd cache inconsistency (no next and not at tail)", fhc);
+ return;
+ }
+ if (prev) {
+@@ -233,13 +251,13 @@
+ } else if (fd_lru_head == fhc) {
+ fd_lru_head = next;
+ } else {
+- Dprintf(L_ERROR, "fd cache inconsistency\n");
++ fh_complain("fd cache inconsistency (no prev and not at head)", fhc);
+ return;
+ }
+
+ #ifdef FHTRACE
+ if (fd_cache[fhc->fd] != fhc) {
+- Dprintf(L_ERROR, "fd cache inconsistency!\n");
++ fh_complain("fd cache inconsistency (fd cache ptr mismatch)", fhc);
+ return;
+ }
+ #endif
+@@ -285,7 +303,7 @@
+ hash_slot = &((*hash_slot)->hash_next);
+ if (*hash_slot == NULL)
+ Dprintf(L_ERROR,
+- "internal inconsistency -- fhc(%x) not in hash table\n",
++ "internal inconsistency -- fhc(%x) not in hash table!\n",
+ fhc);
+ else
+ *hash_slot = fhc->hash_next;
+@@ -572,7 +590,7 @@
+ efs_seekdir(dir, cookie_stack[i]);
+ while ((dp = efs_readdir(dir))) {
+ char *name = dp->d_name;
+- int n = strlen(name);
++ int n = strlen(name); /* or: dp->d_reclen */
+
+ if (pathlen + n + 1 >= NFS_MAXPATHLEN
+ || (name[0] == '.'
+@@ -738,7 +756,16 @@
+ static psi_t
+ path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid)
+ {
+- struct stat sbuf;
++ struct stat smounted;
++
++ return path_psi_m(path, status, sbp, &smounted, svalid);
++}
++
++static psi_t
++path_psi_m(char *path, nfsstat *status,
++ struct stat *sbp, struct stat *mbp, int svalid)
++{
++ struct stat sbuf, ddbuf;
+
+ if (sbp == NULL)
+ sbp = &sbuf;
+@@ -746,10 +773,10 @@
+ *status = nfs_errno();
+ return (0);
+ }
++ *mbp = *sbp;
+ if (S_ISDIR(sbp->st_mode) && strcmp(path, "/") != 0) {
+ /* Special case for directories--test for mount point. */
+- struct stat ddbuf;
+- char *fname;
++ char *fname;
+
+ /* Find start of last component of path. */
+ #if 1
+@@ -819,6 +846,19 @@
+ return (pseudo_inode(sbp->st_ino, sbp->st_dev));
+ }
+
++/*
++ * Match attributes to make sure we're still referring to the original file
++ */
++static inline int
++fh_attrmatch(struct fhcache *fhc, struct stat *attr)
++{
++ if (fhc->dev == attr->st_dev
++ && fhc->ino == attr->st_ino
++ && fhc->type == (attr->st_mode & S_IFMT))
++ return 1;
++ return 0;
++}
++
+ fhcache *
+ fh_find(svc_fh *h, int mode)
+ {
+@@ -838,6 +878,9 @@
+ ex_state = active;
+ time(&curtime);
+ while ((fhc = fh_lookup(h->psi)) != NULL) {
++ struct stat sbuf, *s = NULL;
++ nfsstat dummy;
++
+ Dprintf(D_FHCACHE, "fh_find: psi=%lx... found '%s', fd=%d\n",
+ (unsigned long) h->psi,
+ fhc->path ? fhc->path : "<unnamed>",
+@@ -857,33 +900,27 @@
+ * If it doesn't try to rebuild the path.
+ */
+ if (check) {
+- struct stat *s = &fhc->attrs;
+- psi_t psi;
+- nfsstat dummy;
+-
++ s = &sbuf;
+ if (efs_lstat(fhc->path, s) < 0) {
+ Dprintf(D_FHTRACE,
+ "fh_find: stale fh: lstat: %m\n");
+ } else {
+- fhc->flags |= FHC_ATTRVALID;
+- /* If pseudo-inos don't match, we fhc->path
+- * may be a mount point (hence lstat() returns
++ /* If device/ino don't match, fhc->path may
++ * be a mount point (hence lstat() returns
+ * a different inode number than the readdir()
+ * stuff used in path_psi)
+ */
+- psi = pseudo_inode(s->st_ino, s->st_dev);
+- if (h->psi == psi)
++ if (fh_attrmatch(fhc, s))
+ goto fh_return;
+
+- /* Try again by computing the path psi */
+- psi = path_psi(fhc->path, &dummy, s, 1);
+- if (h->psi == psi)
++ /* Get the dev/ino of the underlying
++ * mount point. */
++ path_psi(fhc->path, &dummy, s, 1);
++ if (fh_attrmatch(fhc, s))
+ goto fh_return;
+
+- Dprintf(D_FHTRACE, "fh_find: stale fh: "
+- "dev/ino %x/%lx psi %lx",
+- s->st_dev, s->st_ino,
+- (unsigned long) psi);
++ Dprintf(D_FHTRACE, "fh_find: stale fh: %lx",
++ (unsigned long) h->psi);
+ }
+
+ fh_discard:
+@@ -896,6 +933,12 @@
+ }
+
+ fh_return:
++ /* Valid attributes; cache them */
++ if (s != NULL) {
++ memcpy(&fhc->attrs, s, sizeof(*s));
++ fhc->flags |= FHC_ATTRVALID;
++ }
++
+ /* The cached fh seems valid */
+ if (fhc != fh_head.next)
+ fh_move_to_front(fhc);
+@@ -905,7 +948,8 @@
+ }
+
+ Dprintf(D_FHCACHE, "fh_find: psi=%lx... not found\n",
+- (unsigned long) h->psi);
++ (unsigned long) h->psi);
++
+ if (mode == FHFIND_FCACHED) {
+ ex_state = inactive;
+ return NULL;
+@@ -918,6 +962,7 @@
+ fhc = flush->prev;
+ fh_delete(flush);
+ }
++
+ fhc = (fhcache *) xmalloc(sizeof *fhc);
+ if (mode == FHFIND_FCREATE) {
+ /* File will be created */
+@@ -937,11 +982,31 @@
+ }
+ fhc->path = path;
+ }
++
+ fhc->flags = 0;
+ if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
+- if (re_export && nfsmounted(fhc->path, &fhc->attrs))
++ if (nfsmounted(fhc->path, &fhc->attrs)) {
+ fhc->flags |= FHC_NFSMOUNTED;
++#if 0
++ /* We must allow the client to send us the
++ * file handle for the NFS mount point itself,
++ * but not for entries within an NFS mount.
++ * XXX: needs fixing.
++ */
++ if (!re_export) {
++ Dprintf(D_FHTRACE,
++ "Attempt to use %s (non-exportable)\n",
++ fhc->path);
++ free(fhc);
++ ex_state = inactive;
++ return NULL;
++ }
++#endif
++ }
+ fhc->flags |= FHC_ATTRVALID;
++ fhc->dev = fhc->attrs.st_dev;
++ fhc->ino = fhc->attrs.st_ino;
++ fhc->type = fhc->attrs.st_mode & S_IFMT;
+ }
+ fhc->fd = -1;
+ fhc->last_used = curtime;
+@@ -993,6 +1058,14 @@
+ return buf;
+ }
+
++static void
++fh_complain(const char *msg, fhcache *fhc)
++{
++ Dprintf(L_ERROR, "%s: ptr=%p fd=%d path=%s\n", msg,
++ fhc, fhc->fd,
++ fhc->path? fhc->path : "<unnamed>");
++}
++
+ /*
+ * This routine is only used by the mount daemon.
+ * It creates the initial file handle.
+@@ -1000,23 +1073,25 @@
+ int
+ fh_create(nfs_fh *fh, char *path)
+ {
+- svc_fh key;
+- fhcache *h;
+- psi_t psi;
+- nfsstat status;
+- char *s;
++ struct stat stb;
++ svc_fh key;
++ fhcache *h;
++ psi_t psi;
++ nfsstat status;
++ char *s;
+
+ memset(&key, 0, sizeof(key));
+ status = NFS_OK;
+- if ((psi = path_psi("/", &status, NULL, 0)) == 0)
++ if ((psi = path_psi("/", &status, &stb, 0)) == 0)
+ return ((int) status);
++
+ s = path;
+ while ((s = strchr(s + 1, '/')) != NULL) {
+ if (++(key.hash_path[0]) >= HP_LEN)
+ return ((int) NFSERR_NAMETOOLONG);
+ key.hash_path[key.hash_path[0]] = hash_psi(psi);
+ *s = '\0';
+- if ((psi = path_psi(path, &status, NULL, 0)) == 0)
++ if ((psi = path_psi(path, &status, &stb, 0)) == 0)
+ return ((int) status);
+ *s = '/';
+ }
+@@ -1024,7 +1099,7 @@
+ if (++(key.hash_path[0]) >= HP_LEN)
+ return ((int) NFSERR_NAMETOOLONG);
+ key.hash_path[key.hash_path[0]] = hash_psi(psi);
+- if ((psi = path_psi(path, &status, NULL, 0)) == 0)
++ if ((psi = path_psi(path, &status, &stb, 0)) == 0)
+ return ((int) status);
+ }
+ key.psi = psi;
+@@ -1037,9 +1112,12 @@
+
+ /* assert(h != NULL); */
+ if (h->path == NULL) {
+- h->fd = -1;
+- h->path = xstrdup(path);
++ h->fd = -1;
++ h->path = xstrdup(path);
+ h->flags = 0;
++ h->dev = stb.st_dev;
++ h->ino = stb.st_ino;
++ h->type = stb.st_mode & S_IFMT;
+ }
+ memcpy(fh, &key, sizeof(key));
+ return ((int) status);
+@@ -1064,6 +1142,44 @@
+ return ((nfs_fh*)&(h->h));
+ }
+
++
++static inline int
++access_override(int omode, int perm, struct stat *buf)
++{
++ /* Be suspicous of flags, particularly O_CREAT/O_TRUNC. A previous
++ * comment said:
++ *
++ * "[Not checking this] would truncate read-only files on creat()
++ * calls. Of course, ftruncate(fd, 0) should still be legal for
++ * the user when the file was chmoded *after* opening it, but we
++ * have no way to tell, and a semi-succeding `cp foo readonly-file'
++ * is much more unintuitive and destructive than a failing
++ * ftruncate()."
++ */
++ if (omode & ~O_ACCMODE)
++ return 0;
++
++ /* Users can do anything to their own files. Harmless (since they
++ * could chown anyway), and helps to mask NFSes statelessness.
++ *
++ * (in passing, this also handles mode 0100 execution)
++ */
++ if (buf->st_uid == auth_uid)
++ return 1;
++
++ /* Henceforth, we are considering granting read access to facilitate
++ * exec access. This is read only */
++ if (omode != O_RDONLY)
++ return 0;
++
++ /* Mode 0110 execution */
++ if (buf->st_gid == auth_gid)
++ return (buf->st_mode & S_IXGRP) != 0;
++
++ /* Mode 0111 execution */
++ return (buf->st_mode & S_IXOTH) != 0;
++}
++
+ int
+ path_open(char *path, int omode, int perm)
+ {
+@@ -1113,30 +1229,15 @@
+ * lishes two things: first, it gives the file owner r/w access to
+ * the file whatever the permissions are, so that files are still
+ * accessible after an fchown(fd, 0). The second part of the
+- * condition allows read access to mode 0111 executables.
+- *
+- * The old conditon read like this:
+- * if (fd < 0 && oerrno == EACCES) {
+- * if (oerrno == EACCES && (buf.st_uid == auth_uid
+- * || (omode == O_RDONLY && (buf.st_mode & S_IXOTH)))) {
+- * override uid; etc...
+- * }
+- * }
+- * This would truncate read-only files on creat() calls. Now
+- * ftruncate(fd, 0) should still be legal for the user when the
+- * file was chmoded *after* opening it, but we have no way to tell,
+- * and a semi-succeding `cp foo readonly-file' is much more
+- * unintuitive and destructive than a failing ftruncate().
++ * condition allows read access to `execute-only' files.
+ */
+- if (fd < 0 && oerrno == EACCES && !(omode & (O_CREAT|O_TRUNC))) {
+- if ((buf.st_uid == auth_uid && (omode & O_ACCMODE) == omode)
+- || ((buf.st_mode & S_IXOTH) && omode == O_RDONLY)) {
+- auth_override_uid(ROOT_UID);
+- fd = efs_open(path, omode, perm);
+- oerrno = errno;
+- auth_override_uid(auth_uid);
+- }
++ if (fd < 0 && oerrno == EACCES && access_override(omode, perm, &buf)) {
++ auth_override_uid(ROOT_UID);
++ fd = efs_open(path, omode, perm);
++ oerrno = errno;
++ auth_override_uid(auth_uid);
+ }
++
+
+ if (fd < 0) {
+ Dprintf(D_FHCACHE,
+@@ -1241,7 +1342,7 @@
+ char *sindx;
+ int is_dd;
+ nfsstat ret;
+- struct stat sbuf;
++ struct stat sbuf, smount;
+ char pathbuf[PATH_MAX + NAME_MAX + 1], *fname;
+
+ /* should not happen */
+@@ -1318,7 +1419,7 @@
+
+ *new_fh = dopa->dir;
+ key = (svc_fh *) new_fh;
+- if ((key->psi = path_psi(pathbuf, &ret, sbp, 0)) == 0)
++ if ((key->psi = path_psi_m(pathbuf, &ret, sbp, &smount, 0)) == 0)
+ return (ret);
+
+ if (is_dd) {
+@@ -1344,6 +1445,10 @@
+ h->h.hash_path[0]);
+ return NFSERR_STALE;
+ }
++ if (sbp->st_dev != smount.st_dev) {
++ Dprintf(D_FHTRACE, "fh_compose: %s hit%s mount point\n",
++ pathbuf, nfsmounted(pathbuf, &smount)? " NFS" : "");
++ }
+ #endif
+
+ /* New code added by Don Becker */
+@@ -1356,7 +1461,8 @@
+ if (!h) return NFSERR_STALE;
+ #endif
+ if (h->path)
+- Dprintf(L_ERROR, "Internal inconsistency: double entry (path '%s', now '%s').\n",
++ Dprintf(L_ERROR,
++ "internal inconsistency: double entry (path '%s', now '%s').\n",
+ h->path, pathbuf);
+ }
+ Dprintf(D_FHCACHE, "fh_compose: using handle %x ('%s', fd=%d)\n",
+@@ -1365,9 +1471,18 @@
+
+ /* assert(h != NULL); */
+ if (h->path == 0) {
+- h->path = xstrdup(pathbuf);
++ h->path = xstrdup(pathbuf);
+ h->flags = 0;
+- if (!re_export && nfsmounted(pathbuf, sbp))
++ h->dev = sbp->st_dev;
++ h->ino = sbp->st_ino;
++ h->type = sbp->st_mode & S_IFMT;
++
++ /* Note: in the case of a mount point,
++ * sbp contains the stats of the mount point, while
++ * ddbuf has the dev/ino of the underlying directory
++ */
++ if (sbp->st_dev != smount.st_dev
++ && nfsmounted(pathbuf, &smount))
+ h->flags |= FHC_NFSMOUNTED;
+ #ifdef FHTRACE
+ Dprintf(D_FHTRACE, "fh_compose: created handle %s\n", h->path);
+diff -urN nfs-server-2.2beta47/fh.h nfs-server-2.2beta51/fh.h
+--- nfs-server-2.2beta47/fh.h Mon Nov 23 12:15:43 1998
++++ nfs-server-2.2beta51/fh.h Fri Nov 8 14:45:36 2002
+@@ -97,7 +97,13 @@
+ struct fhcache * hash_next;
+ struct fhcache * fd_next;
+ struct fhcache * fd_prev;
++
++ /* These are fixed during the lifetime of this object */
+ svc_fh h;
++ dev_t dev;
++ ino_t ino;
++ mode_t type; /* st_mode & S_IFMT */
++
+ int fd;
+ int omode;
+ char * path;
+diff -urN nfs-server-2.2beta47/getattr.c nfs-server-2.2beta51/getattr.c
+--- nfs-server-2.2beta47/getattr.c Fri Oct 30 18:10:11 1998
++++ nfs-server-2.2beta51/getattr.c Fri Nov 8 14:45:36 2002
+@@ -115,6 +115,16 @@
+ attr->fsid = 1;
+ attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
+ #endif
++
++ /* This may be needed by some Suns... testing */
++#define MINTIME (24 * 2600)
++ if (s->st_atime < MINTIME)
++ s->st_atime = MINTIME;
++ if (s->st_mtime < MINTIME)
++ s->st_mtime = MINTIME;
++ if (s->st_ctime < MINTIME)
++ s->st_ctime = MINTIME;
++
+ attr->atime.seconds = s->st_atime;
+ attr->atime.useconds = 0;
+ attr->mtime.seconds = s->st_mtime;
+diff -urN nfs-server-2.2beta47/logging.c nfs-server-2.2beta51/logging.c
+--- nfs-server-2.2beta47/logging.c Fri Oct 30 17:11:22 1998
++++ nfs-server-2.2beta51/logging.c Fri Nov 8 14:45:36 2002
+@@ -147,8 +147,9 @@
+ (void) time(&now);
+ tm = localtime(&now);
+ fprintf(log_fp, "%s %02d/%02d/%02d %02d:%02d %s",
+- log_name, tm->tm_mon + 1, tm->tm_mday, tm->tm_year,
+- tm->tm_hour, tm->tm_min, buff);
++ log_name, tm->tm_mon + 1, tm->tm_mday,
++ tm->tm_year % 100,
++ tm->tm_hour, tm->tm_min, buff);
+ if (strchr(buff, '\n') == NULL)
+ fputc('\n', log_fp);
+ }
+@@ -182,7 +183,8 @@
+ tm = localtime(&unix_cred->aup_time);
+ snprintf(buffer + len, total - len,
+ "%d/%d/%d %02d:%02d:%02d %s %d.%d",
+- tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
++ tm->tm_year %100,
++ tm->tm_mon + 1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ unix_cred->aup_machname,
+ unix_cred->aup_uid,
+diff -urN nfs-server-2.2beta47/mountd.c nfs-server-2.2beta51/mountd.c
+--- nfs-server-2.2beta47/mountd.c Wed Jun 2 14:10:33 1999
++++ nfs-server-2.2beta51/mountd.c Fri Nov 8 14:45:36 2002
+@@ -32,7 +32,7 @@
+ #include "rpcmisc.h"
+ #include "rmtab.h"
+ #include "haccess.h"
+-#include "failsafe.h"
++#include "daemon.h"
+ #include "signals.h"
+ #include <rpc/pmap_clnt.h>
+
+@@ -44,6 +44,8 @@
+ /*
+ * Option table for mountd
+ */
++#define OPT_NOTCP 300
++#define OPT_LOOPBACK 301
+ static struct option longopts[] =
+ {
+ { "debug", required_argument, 0, 'd' },
+@@ -56,6 +58,8 @@
+ { "no-spoof-trace", 0, 0, 't' },
+ { "version", 0, 0, 'v' },
+ { "fail-safe", optional_argument, 0, 'z' },
++ { "no-tcp", 0, 0, OPT_NOTCP },
++ { "loopback-only", 0, 0, OPT_LOOPBACK },
+
+ { NULL, 0, 0, 0 }
+ };
+@@ -358,6 +362,12 @@
+ break;
+ case 0:
+ break;
++ case OPT_NOTCP:
++ udp_only = 1;
++ break;
++ case OPT_LOOPBACK:
++ loopback_only = 1;
++ break;
+ case '?':
+ default:
+ usage(stderr, 1);
+@@ -384,38 +394,27 @@
+ /* Create services and register with portmapper */
+ rpc_init("mountd", MOUNTPROG, mountd_versions, mount_dispatch, port, 0);
+
+- if (!foreground && !_rpcpmstart) {
+-#ifndef RPC_SVC_FG
+- /* We first fork off a child. */
+- if ((c = fork()) > 0)
+- exit(0);
+- if (c < 0) {
+- Dprintf(L_FATAL, "mountd: cannot fork: %s\n",
+- strerror(errno));
+- }
+- /* No more logging to stderr */
+- background_logging();
++ if (_rpcpmstart) {
++ /* Always foreground mode */
++ foreground = 1;
+
+- /* Now we remove ourselves from the foreground. */
+- (void) close(0);
+- (void) close(1);
+- (void) close(2);
+-#ifdef TIOCNOTTY
+- if ((c = open("/dev/tty", O_RDWR)) >= 0) {
+- (void) ioctl(c, TIOCNOTTY, (char *) NULL);
+- (void) close(c);
+- }
+-#else
+- setsid();
+-#endif
+-#endif /* not RPC_SVC_FG */
++ /* ... but no logging */
++ background_logging();
+ }
+
++ /* Become a daemon */
++ if (!foreground)
++ daemonize();
++
+ /* Initialize the FH module. */
+ fh_init();
+
+ /* Initialize the AUTH module. */
+ auth_init(auth_file);
++
++ /* Write pidfile */
++ setpidpath(_PATH_MOUNTD_PIDFILE);
++ writepid(getpid(), 1);
+
+ /* Failsafe mode */
+ if (failsafe_level)
+diff -urN nfs-server-2.2beta47/mountd.man nfs-server-2.2beta51/mountd.man
+--- nfs-server-2.2beta47/mountd.man Wed Jun 2 14:12:21 1999
++++ nfs-server-2.2beta51/mountd.man Fri Nov 8 14:45:36 2002
+@@ -14,6 +14,8 @@
+ .B "[\ \-\-allow\-non\-root\ ]"
+ .B "[\ \-\-re\-export\ ]"
+ .B "[\ \-\-no\-spoof\-trace\ ]"
++.B "[\ \-\-no\-tcp ]"
++.B "[\ \-\-loopback\-only ]"
+ .B "[\ \-\-version\ ]"
+ .ad b
+ .SH DESCRIPTION
+@@ -123,6 +125,18 @@
+ .TP
+ .BR \-v " or " \-\-version
+ Report the current version number of the program.
++.TP
++.BR \-\-no\-tcp
++Force
++.I mountd
++to register only the UDP transport, but no TCP.
++This is an experimental option.
++.TP
++.BR \-\-loopback\-only
++Force
++.I mountd
++to bind to the loopback interface.
++This is an experimental option.
+ .SS Access Control
+ For enhanced security, access to
+ .I mountd
+diff -urN nfs-server-2.2beta47/nfsd.c nfs-server-2.2beta51/nfsd.c
+--- nfs-server-2.2beta47/nfsd.c Wed Nov 10 10:33:28 1999
++++ nfs-server-2.2beta51/nfsd.c Fri Nov 8 14:45:36 2002
+@@ -21,7 +21,7 @@
+ #include "getopt.h"
+ #include "fsusage.h"
+ #include "rpcmisc.h"
+-#include "failsafe.h"
++#include "daemon.h"
+ #include "signals.h"
+ #ifdef __linux__ /* XXX - MvS: for UNIX sockets. */
+ # include <sys/un.h>
+@@ -30,7 +30,6 @@
+ # include <syslog.h>
+ #endif
+
+-#define MULTIPLE_SERVERS
+
+ /* Flags for auth_fh */
+ #define CHK_READ 0
+@@ -51,6 +50,8 @@
+ /*
+ * Option table
+ */
++#define OPT_NOTCP 300
++#define OPT_LOOPBACK 301
+ static struct option longopts[] = {
+ { "auth-deamon", required_argument, 0, 'a' },
+ { "debug", required_argument, 0, 'd' },
+@@ -68,6 +69,9 @@
+ { "version", 0, 0, 'v' },
+ { "no-cross-mounts", 0, 0, 'x' },
+ { "fail-safe", optional_argument, 0, 'z' },
++ { "no-tcp", 0, 0, OPT_NOTCP },
++ { "udp-only", 0, 0, OPT_NOTCP },
++ { "loopback-only", 0, 0, OPT_LOOPBACK },
+
+ { NULL, 0, 0, 0 }
+ };
+@@ -173,7 +177,10 @@
+ return NULL;
+ }
+
+- auth_user(nfsmount, rqstp);
++ if (!auth_user(nfsmount, rqstp)) {
++ *statp = NFSERR_ACCES;
++ return NULL;
++ }
+
+ *statp = NFS_OK;
+ return fhc;
+@@ -211,7 +218,11 @@
+
+ if ((nfsmount = auth_path(nfsclient, rqstp, path)) == NULL)
+ return NFSERR_ACCES;
+- auth_user(nfsmount, rqstp);
++
++ /* XXX: really need to call it again here?
++ * Already invoked in auth_fh */
++ if (!auth_user(nfsmount, rqstp))
++ return NFSERR_ACCES;
+
+ return (NFS_OK);
+ }
+@@ -575,7 +586,8 @@
+ #endif
+
+ /* MvS: Some clients use chardev 0xFFFF for a FIFO. */
+- if (S_ISCHR(argp->attributes.mode) && dev == 0xFFFF) {
++ if (S_ISCHR(argp->attributes.mode)
++ && (dev == 0xFFFF || dev == (dev_t) -1)) {
+ is_borc = 0;
+ dev = 0;
+ argp->attributes.mode &= ~S_IFMT;
+@@ -623,7 +635,7 @@
+ flags = (argp->attributes.size == 0 ?
+ CREATE_OMODE | O_TRUNC : CREATE_OMODE);
+ if (!exists)
+- flags |= O_CREAT;
++ flags |= O_CREAT|O_EXCL;
+ tmpfd = path_open(pathbuf, flags,
+ argp->attributes.mode & ~S_IFMT);
+ if (tmpfd < 0)
+@@ -965,9 +977,7 @@
+ int nfsport = 0;
+ int failsafe_level = 0;
+ int c;
+-#ifdef MULTIPLE_SERVERS
+ int i, ncopies = 1;
+-#endif
+
+ program_name = argv[0];
+ chdir("/");
+@@ -1031,12 +1041,17 @@
+ break;
+ case 0:
+ break;
++ case OPT_NOTCP:
++ udp_only = 1;
++ break;
++ case OPT_LOOPBACK:
++ loopback_only = 1;
++ break;
+ case '?':
+ default:
+ usage(stderr, 1);
+ }
+
+-#ifdef MULTIPLE_SERVERS
+ if (optind == argc-1 && isdigit(argv[optind][0])) {
+ ncopies = atoi(argv[optind++]);
+ if (ncopies <= 0) {
+@@ -1051,7 +1066,6 @@
+ ncopies = 1;
+ }
+ }
+-#endif
+
+ /* No more arguments allowed. */
+ if (optind != argc)
+@@ -1075,72 +1089,54 @@
+ rpc_init("nfsd", NFS_PROGRAM, nfsd_versions, nfs_dispatch,
+ nfsport, NFS_MAXDATA);
+
+- /* No more than 1 copy when run from inetd */
+- if (_rpcpmstart && ncopies > 1) {
+- Dprintf(L_WARNING,
+- "nfsd: warning: can run only "
+- "one server in inetd mode\n");
+- ncopies = 1;
++ if (_rpcpmstart) {
++ /* Always do foreground mode */
++ foreground = 1;
++
++ /* ... but don't log to stderr */
++ background_logging();
++
++ /* No more than 1 copy when run from inetd */
++ if (ncopies > 1) {
++ Dprintf(L_WARNING,
++ "nfsd: warning: can run only "
++ "one server in inetd mode\n");
++ ncopies = 1;
++ }
+ }
+
+-#ifndef MULTIPLE_SERVERS_READWRITE
+ if (ncopies > 1)
+ read_only = 1;
+-#endif
+
+- /* We first fork off a child. */
+- if (!foreground) {
+- if ((c = fork()) > 0)
+- exit(0);
+- if (c < 0) {
+- Dprintf(L_FATAL, "nfsd: cannot fork: %s\n",
+- strerror(errno));
+- }
+- }
++ /*
++ * We first fork off a child and detach from tty
++ */
++ if (!foreground)
++ daemonize();
+
+ /* Initialize the AUTH module. */
+ auth_init(auth_file);
+
++ setpidpath(_PATH_NFSD_PIDFILE);
+ if (failsafe_level == 0) {
+ /* Start multiple copies of the server */
++ writepid(getpid(), 1);
+ for (i = 1; i < ncopies; i++) {
++ pid_t pid;
++
+ Dprintf(D_GENERAL, "Forking server thread...\n");
+- if ((c = fork()) < 0) {
++ if ((pid = fork()) < 0) {
+ Dprintf(L_ERROR, "Unable to fork: %s",
+ strerror(errno));
+- } else if (c == 0) {
+- /* Child process */
+- break;
++ } else if (pid != 0) {
++ writepid(pid, 0);
++ } else {
++ break; /* Child process */
+ }
+ }
+ } else {
+ /* Init for failsafe mode */
+ failsafe(failsafe_level, ncopies);
+- }
+-
+- /* Now that we've done all the required forks, we make do all the
+- * session magic.
+- */
+- if (!foreground) {
+- /* No more logging to stderr */
+- background_logging();
+-
+- /* Now we remove ourselves from the foreground. */
+- close(0);
+- close(1);
+- close(2);
+-#ifdef HAVE_SETSID
+- setsid();
+-#else
+- {
+- int fd;
+-
+- if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
+- ioctl(fd, TIOCNOTTY, (char *) NULL);
+- close(fd);
+- }
+- }
+-#endif
+ }
+
+ /*
+diff -urN nfs-server-2.2beta47/nfsd.man nfs-server-2.2beta51/nfsd.man
+--- nfs-server-2.2beta47/nfsd.man Wed Jun 2 14:13:37 1999
++++ nfs-server-2.2beta51/nfsd.man Fri Nov 8 14:45:36 2002
+@@ -8,7 +8,7 @@
+ .B "[\ \-d\ facility\ ]"
+ .B "[\ \-P\ port\ ]"
+ .B "[\ \-R\ dirname\ ]"
+-.B "[\ \-Fhlnprstv\ ]"
++.B "[\ \-Fhlnprstuv\ ]"
+ .B "[\ \-\-debug\ facility\ ]"
+ .B "[\ \-\-exports\-file=file\ ]"
+ .B "[\ \-\-foreground\ ]"
+@@ -18,6 +18,8 @@
+ .B "[\ \-\-public\-root\ dirname\ ]"
+ .\".B "[\ \-\-synchronous\-writes\ ]"
+ .B "[\ \-\-no\-spoof\-trace\ ]"
++.B "[\ \-\-no\-tcp ]"
++.B "[\ \-\-loopback-only ]"
+ .B "[\ \-\-port\ port\ ]"
+ .B "[\ \-\-log-transfers\ ]"
+ .B "[\ \-\-version\ ]"
+@@ -56,7 +58,7 @@
+ .PP
+ When run from
+ .IR inetd ,
+-.i nfsd
++.I nfsd
+ will terminate after a certain period of inactivity.
+ .SH OPTIONS
+ .TP
+@@ -167,6 +169,14 @@
+ .BR \-v " or " \-\-version
+ Report the current version number of the program.
+ .TP
++.BR \-\-no\-tcp
++Force nfsd to only register a UDP transport, but not TCP.
++This is an experimental option.
++.TP
++.BR \-\-loopback\-only
++Force nfsd to bind to the loopback interface.
++This is an experimental option.
++.TP
+ .BR numcopies
+ This is an experimental feature that lets you run several instances of
+ .I nfsd
+@@ -174,15 +184,8 @@
+ .B numcopies
+ greater than one,
+ .I nfsd
+-will fork as many times as specified by this value.
+-However, the servers do not share a common file handle
+-cache, which makes certain file operations impossible.
+-.IP
+-For this reason,
+-.I nfsd
+-will disallow all write operations when invoked with this option. Although
+-this is very limiting, this feature may still prove useful for exporting
+-public FTP areas or Usenet News spools.
++will fork as many times as specified by this value so it is able to
++handle that many NFS requests in parallel.
+ .SS WebNFS Support
+ WebNFS is an extension to the normal NFS protocol developed by Sun
+ that is particularly well-suited for file retrieval over the
+@@ -268,6 +271,19 @@
+ .I nfsd
+ writes out a transfer record whenever it encounters a READ or WRITE
+ request at offset zero.
++.SS Generating a debug trace
++When suspecting a bug in nfsd, it is helpful to look at a debug trace
++of what's going on. You can create such a trace by first killing nfsd,
++and then restarting it as
++.PP
++.nf
++.ta +3i
++/usr/sbin/rpc.nfsd -F -d all
++.fi
++.PP
++Instead of
++.BR all ,
++you can use less verbose debug facilities as described above.
+ .SH "SEE ALSO"
+ exports(5), mountd(8), ugidd(8C)
+ .SH AUTHORS
+diff -urN nfs-server-2.2beta47/rmtab.c nfs-server-2.2beta51/rmtab.c
+--- nfs-server-2.2beta47/rmtab.c Fri Feb 6 09:43:25 1998
++++ nfs-server-2.2beta51/rmtab.c Fri Nov 8 14:45:36 2002
+@@ -8,6 +8,7 @@
+
+ #include "nfsd.h"
+ #include "rmtab.h"
++#include "rpcmisc.h"
+
+ static char * rmtab_gethost(struct svc_req *);
+ static int rmtab_insert(char *, char *);
+diff -urN nfs-server-2.2beta47/rpcmisc.c nfs-server-2.2beta51/rpcmisc.c
+--- nfs-server-2.2beta47/rpcmisc.c Tue Sep 7 10:42:58 1999
++++ nfs-server-2.2beta51/rpcmisc.c Fri Nov 8 14:45:36 2002
+@@ -39,6 +39,8 @@
+ int _rpcfdtype = 0;
+ int _rpcsvcdirty = 0;
+ const char * auth_daemon = 0;
++int udp_only = 0;
++int loopback_only = 0;
+
+ #ifdef AUTH_DAEMON
+ static bool_t (*tcp_rendevouser)(SVCXPRT *, struct rpc_msg *);
+@@ -96,7 +98,7 @@
+ }
+ }
+
+- if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_STREAM)) {
++ if ((_rpcfdtype == 0 && !udp_only) || (_rpcfdtype == SOCK_STREAM)) {
+ if (_rpcfdtype == 0 && defport != 0)
+ sock = makesock(defport, IPPROTO_TCP, bufsiz);
+ transp = svctcp_create(sock, 0, 0);
+@@ -199,6 +201,9 @@
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_port = htons(port);
++
++ if (loopback_only)
++ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+ #ifdef DEBUG
+ {
+diff -urN nfs-server-2.2beta47/rpcmisc.h nfs-server-2.2beta51/rpcmisc.h
+--- nfs-server-2.2beta47/rpcmisc.h Tue Sep 7 10:37:38 1999
++++ nfs-server-2.2beta51/rpcmisc.h Fri Nov 8 14:45:36 2002
+@@ -9,6 +9,8 @@
+ extern int _rpcpmstart;
+ extern int _rpcfdtype;
+ extern int _rpcsvcdirty;
++extern int udp_only;
++extern int loopback_only;
+ extern const char * auth_daemon;
+
+ extern void rpc_init(const char *name, int prog, int *verstbl,
+@@ -16,5 +18,13 @@
+ int defport, int bufsize);
+ extern void rpc_exit(int prog, int *verstbl);
+ extern void rpc_closedown(void);
++
++/*
++ * Some older systems don't have svc_getcaller.
++ * Some, like glibc 2.2, have it but it returns some type that's
++ * not a sockaddr_in anymore.
++ */
++#undef svc_getcaller
++#define svc_getcaller(xprt) ((struct sockaddr_in *) (&(xprt)->xp_raddr))
+
+ #endif /* RPCMISC_H */
+diff -urN nfs-server-2.2beta47/setattr.c nfs-server-2.2beta51/setattr.c
+--- nfs-server-2.2beta47/setattr.c Fri Oct 30 18:29:42 1998
++++ nfs-server-2.2beta51/setattr.c Fri Nov 8 14:45:36 2002
+@@ -103,6 +103,10 @@
+ if (flags & SATTR_CHMOD) {
+ unsigned int mode = attr->mode;
+
++ /* If setuid is not allowed, silently squash them */
++ if (!nfsmount->o.allow_setuid && S_ISREG(s->st_mode))
++ mode &= ~(S_ISUID|S_ISGID) | s->st_mode;
++
+ if (mode != -1 && mode != 0xFFFF /* ultrix bug */
+ && (mode & 07777) != (s->st_mode & 07777)) {
+ if (efs_chmod(path, mode) < 0)
+diff -urN nfs-server-2.2beta47/showmount.c nfs-server-2.2beta51/showmount.c
+--- nfs-server-2.2beta47/showmount.c Wed Jun 12 22:31:04 1996
++++ nfs-server-2.2beta51/showmount.c Fri Nov 8 14:45:36 2002
+@@ -162,17 +162,13 @@
+ break;
+ }
+
+- if (hostname[0] >= '0' && hostname[0] <= '9') {
+- server_addr.sin_family = AF_INET;
+- server_addr.sin_addr.s_addr = inet_addr(hostname);
+- }
+- else {
++ server_addr.sin_family = AF_INET;
++ if (!inet_aton(hostname, &server_addr.sin_addr)) {
+ if ((hp = gethostbyname(hostname)) == NULL) {
+ fprintf(stderr, "%s: can't get address for %s\n",
+ program_name, hostname);
+ exit(1);
+ }
+- server_addr.sin_family = AF_INET;
+ memcpy(&server_addr.sin_addr, hp->h_addr, hp->h_length);
+ }
+
+diff -urN nfs-server-2.2beta47/site.h.in nfs-server-2.2beta51/site.h.in
+--- nfs-server-2.2beta47/site.h.in Thu Jan 1 01:00:00 1970
++++ nfs-server-2.2beta51/site.h.in Fri Nov 8 14:45:57 2002
+@@ -0,0 +1,50 @@
++/*
++ * Site-specific configuration options generated by BUILD.
++ * Please do not edit.
++ */
++
++/*
++ * If ENABLE_DEVTAB is defined, nfsd will use the new inode
++ * number generation scheme for avoiding inode number clashes
++ * on big hard disks.
++ */
++#undef ENABLE_DEVTAB
++
++/*
++ * If MULTIPLE_SERVER_READWRITE is defined, you will be able
++ * to run several nfsd process in parallel servicing all NFS
++ * requests.
++ */
++#define MULTIPLE_SERVERS_READWRITE
++
++/*
++ * If ENABLE_UGID_DAEMON is defined, the real rpc.ugidd is built,
++ * nfsd is built to support ugidd queries.
++ * Otherwise, a dummy program is created
++ */
++#undef ENABLE_UGID_DAEMON
++
++/*
++ * If ENABLE_UGID_NIS is defined, nfsd will support user mapping
++ * vie the client's NIS server.
++ */
++#undef ENABLE_UGID_NIS
++
++/*
++ * if HOSTS_ACCESS is defined, ugidd uses host access control
++ * provided by libwrap.a from tcp_wrappers
++ */
++#define HOSTS_ACCESS
++
++/*
++ * Define correct ownership of export control file
++ */
++#define EXPORTSOWNERUID 0
++#define EXPORTSOWNERGID 0
++
++/*
++ * If WANT_LOG_MOUNTS is defined, every mount request will be logged
++ * to syslogd with the name of source site and a path that was
++ * it requested
++ */
++#define WANT_LOG_MOUNTS
+diff -urN nfs-server-2.2beta47/ugidd.c nfs-server-2.2beta51/ugidd.c
+--- nfs-server-2.2beta47/ugidd.c Wed Dec 10 12:34:16 1997
++++ nfs-server-2.2beta51/ugidd.c Fri Nov 8 14:45:36 2002
+@@ -43,9 +43,7 @@
+ };
+
+ int
+-main(argc, argv)
+-int argc;
+-char **argv;
++main(int argc, char **argv)
+ {
+ SVCXPRT *transp;
+ int c, longind;
+@@ -92,32 +90,11 @@
+ exit(1);
+ }
+
+- if (!foreground) {
+- if ((c = fork()) > 0)
+- exit(0);
+- if (c < 0) {
+- fprintf(stderr, "ugidd: cannot fork: %s\n",
+- strerror(errno));
+- exit(-1);
+- }
+- close(0);
+- close(1);
+- close(2);
+-#ifdef HAVE_SETSID
+- setsid();
+-#else
+- {
+- int fd;
+-
+- if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
+- ioctl(fd, TIOCNOTTY, (char *) NULL);
+- close(fd);
+- }
+- }
+-#endif
+- }
+-
+ log_open("ugidd", foreground);
++
++ /* Become a daemon */
++ if (!foreground)
++ daemonize();
+
+ svc_run();
+ Dprintf(L_ERROR, "svc_run returned\n");
+diff -urN nfs-server-2.2beta47/version.c nfs-server-2.2beta51/version.c
+--- nfs-server-2.2beta47/version.c Wed Nov 10 10:33:33 1999
++++ nfs-server-2.2beta51/version.c Fri Nov 8 14:45:36 2002
+@@ -1 +1 @@
+-char version[] = "Universal NFS Server 2.2beta47";
++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 0000000..9388332
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/002-destdir.patch
@@ -0,0 +1,68 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/Makefile.in 2002/11/07 16:56:07 1.1
++++ nfs-server/Makefile.in 2002/11/07 17:08:41
+@@ -74,10 +74,10 @@
+
+ bindir = $(exec_prefix)/sbin
+ #vardir = $(install_prefix)/var/lib/nfs
+-infodir = $(prefix)/info
+-man5dir = $(prefix)/man/man5
++infodir = $(prefix)/share/info
++man5dir = $(prefix)/share/man/man5
+ man5ext = .5
+-man8dir = $(prefix)/man/man8
++man8dir = $(prefix)/share/man/man8
+ man8ext = .8
+
+ # Prefix to be prepended to each installed RPC program, normally `rpc.'.
+@@ -145,37 +145,37 @@
+ .PHONY: install installdirs
+ install: $(DAEMONS) $(CLIENTS) installdirs
+ @for prog in $(DAEMONS) $(CLIENTS); do \
+- echo "installing $$prog in $(bindir)"; \
+- $(INSTALL_PROGRAM) $$prog $(bindir)/$$prog; \
++ echo "installing $$prog in $(DESTDIR)$(bindir)"; \
++ $(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir)/$$prog; \
+ done
+ @for manp in $(MANPAGES5); do \
+- echo "installing $$manp$(man5ext) in $(man5dir)"; \
++ echo "installing $$manp$(man5ext) in $(DESTDIR)$(man5dir)"; \
+ $(INSTALL_DATA) $(srcdir)/$$manp.man \
+- $(man5dir)/$$manp$(man5ext); \
++ $(DESTDIR)$(man5dir)/$$manp$(man5ext); \
+ done
+ @for manp in $(MANPAGES8p); do \
+- echo "installing $$manp$(man8ext) in $(man8dir)"; \
++ echo "installing $$manp$(man8ext) in $(DESTDIR)$(man8dir)"; \
+ $(INSTALL_DATA) $(srcdir)/$$manp.man \
+- $(man8dir)/$$manp$(man8ext); \
++ $(DESTDIR)$(man8dir)/$$manp$(man8ext); \
+ if [ 'x$(rpcprefix)' != 'x' ]; then \
+ rm -f $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
+ ln -s $$manp$(man8ext) \
+- $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
++ $(DESTDIR)$(man8dir)/$(rpcprefix)$$manp$(man8ext); \
+ fi; \
+ done
+ @for manp in $(MANPAGES8); do \
+- echo "installing $$manp$(man8ext) in $(man8dir)"; \
++ echo "installing $$manp$(man8ext) in $(DESTDIR)$(man8dir)"; \
+ $(INSTALL_DATA) $(srcdir)/$$manp.man \
+- $(man8dir)/$$manp$(man8ext); \
++ $(DESTDIR)$(man8dir)/$$manp$(man8ext); \
+ done
+ @if [ -n "$(DEVTAB_FILE)" -a ! -f "$(DEVTAB_FILE)" ]; then \
+ echo "Initializing $(DEVTAB_FILE)"; \
+- $(INSTALL) -m 755 -d `dirname $(DEVTAB_FILE)`; \
+- echo "# Device mapping for unfsd" > "$(DEVTAB_FILE)"; \
++ $(INSTALL) -m 755 -d `dirname $(DESTDIR)$(DEVTAB_FILE)`; \
++ echo "# Device mapping for unfsd" > $(DESTDIR)"$(DEVTAB_FILE)"; \
+ fi
+
+ installdirs:
+- ${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)
++ ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
+
+ $(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
+ $(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 0000000..a17a8dc
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/003-manpages.patch
@@ -0,0 +1,28 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/exports.man 2002/11/07 17:15:59 1.1
++++ nfs-server/exports.man 2002/11/07 17:17:19
+@@ -110,6 +110,14 @@
+ .TP
+ .IR link_absolute
+ Leave all symbolic link as they are. This is the default operation.
++.SS Anonymous Entries
++.PP
++Entries where hosts are not specified are known as anonymous entries. They
++have different default settings compared to normal entries. The differences
++include
++.IR all_squash ,
++.IR no_secure ", and"
++.IR ro .
+ .SS User ID Mapping
+ .PP
+ .I nfsd
+@@ -231,7 +239,7 @@
+ # Mapping for client foobar:
+ # remote local
+ uid 0-99 - # squash these
+-uid 100-500 1000 # map 100-500 to 1000-1500
++uid 100-500 1000 # map 100-500 to 1000-1400
+ gid 0-49 - # squash these
+ gid 50-100 700 # map 50-100 to 700-750
+ .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 0000000..3ac4ed7
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
@@ -0,0 +1,48 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/failsafe.c 2002/11/07 17:12:46 1.1
++++ nfs-server/failsafe.c 2002/11/07 17:15:16
+@@ -10,8 +10,12 @@
+ #include "logging.h"
+ #include "signals.h"
+ #include <sys/wait.h>
++#ifdef HAVE_STRSIGNAL
++#include <string.h>
++#else
+
+ static const char * get_signame(int signo);
++#endif
+
+ void
+ failsafe(int level, int ncopies)
+@@ -111,9 +115,17 @@
+ pid, running? "Continue" : "Exit");
+ } else {
+ Dprintf(L_WARNING, "failsafe: "
++#ifdef HAVE_STRSIGNAL
++ "child %d terminated by: %s. "
++#else
+ "child %d terminated by %s. "
++#endif
+ "Restarting.",
++#ifdef HAVE_STRSIGNAL
++ pid, strsignal(signo));
++#else
+ pid, get_signame(signo));
++#endif
+ child = -1; /* Restart */
+ }
+ } else if (WIFEXITED(status)) {
+@@ -159,6 +171,7 @@
+ /* NOP */
+ }
+
++#ifndef HAVE_STRSIGNAL
+ static const char *
+ get_signame(int signo)
+ {
+@@ -199,3 +212,4 @@
+ sprintf(namebuf, "signal #%d", signo);
+ return namebuf;
+ }
++#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 0000000..c21fb05
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/005-sys-time.patch
@@ -0,0 +1,29 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/system.h 2002/11/07 17:10:47 1.1
++++ nfs-server/system.h 2002/11/07 17:11:53
+@@ -66,20 +66,16 @@
+ # include <grp.h> /* for setgroups */
+ #endif
+
+-#ifdef TIME_WITH_SYS_TIME
++#ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # include <time.h>
+-#else /* not TIME_WITH_SYS_TIME */
+-# ifdef HAVE_SYS_TIME_H
+-# include <sys/time.h>
+-# else /* not HAVE_SYS_TIME_H */
+-# include <time.h>
++#else /* not HAVE_SYS_TIME_H */
++# include <time.h>
+ struct timeval {
+ long tv_sec;
+ long tv_usec;
+ };
+-# endif /* not HAVE_SYS_TIME_H */
+-#endif /* not TIME_WITH_SYS_TIME */
++#endif /* not HAVE_SYS_TIME_H */
+ #ifdef HAVE_SYS_FILE_H
+ # include <sys/file.h>
+ #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 0000000..abdc674
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/006-reiserfs.patch
@@ -0,0 +1,1272 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/Makefile.in
++++ nfs-server/Makefile.in 2002/11/08 13:59:16
+@@ -100,7 +100,7 @@
+ utimes.c mkdir.c rename.c getopt.c getopt_long.c \
+ alloca.c mountlist.c xmalloc.c \
+ xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
+- haccess.c daemon.c signals.c
++ haccess.c daemon.c signals.c teahash3.c
+ XDRFILES = mount.x nfs_prot.x
+ GENFILES = mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
+ ugid.h ugid_xdr.c ugid_clnt.c
+@@ -112,7 +112,7 @@
+ MANPAGES8 = showmount
+ MANPAGES = $(MANPAGES5) $(MANPAGES8p) $(MANPAGES8)
+ LIBOBJS = version.o fsusage.o mountlist.o xmalloc.o xstrdup.o \
+- nfsmounted.o faccess.o haccess.o daemon.o \
++ nfsmounted.o faccess.o haccess.o daemon.o teahash3.o \
+ signals.o @LIBOBJS@ @ALLOCA@
+ OBJS = logging.o fh.o devtab.o auth_init.o auth_clnt.o auth.o
+ NFSD_OBJS = nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
+--- nfs-server/auth.c
++++ nfs-server/auth.c 2002/11/08 13:59:16
+@@ -83,6 +83,7 @@
+ 0, /* read-only */
+ 0, /* relative links */
+ 0, /* noaccess */
++ 0, /* hashed inodes */
+ 1, /* cross_mounts */
+ 1, /* allow setuid */
+ 65534, /* default uid */
+@@ -100,6 +101,7 @@
+ 0, /* relative links */
+ 0, /* noaccess */
+ 1, /* cross_mounts */
++ 0, /* hashed inodes */
+ 0, /* allow setuid */
+ 65534, /* default uid */
+ 65534, /* default gid */
+@@ -991,6 +993,7 @@
+ if (mp == 0) {
+ mp = (nfs_mount*) xmalloc(sizeof(nfs_mount));
+ memset(mp, 0, sizeof(*mp));
++ mp->mount_dev = 0;
+ mp->origin = cp;
+ mp->client = cp;
+ mp->path = xstrdup(path);
+@@ -1169,6 +1172,8 @@
+ default_options.nobody_gid = anon_gid;
+ anonymous_options.nobody_uid = anon_uid;
+ anonymous_options.nobody_gid = anon_gid;
++ default_options.cross_mounts = cross_mounts;
++ default_options.hashed_inodes = hashed_inodes;
+
+ memset(cached_clients, 0, sizeof(cached_clients));
+ cached_next = 0;
+--- nfs-server/auth.h
++++ nfs-server/auth.h 2002/11/08 13:59:16
+@@ -43,15 +43,16 @@
+
+ typedef struct nfs_options {
+ ugid_mapping_t uidmap; /* uid/gid mapping behavior */
+- int root_squash;
+- int all_squash;
+- int some_squash; /* speed up luid() etc. */
+- int secure_port;
+- int read_only;
+- int link_relative;
+- int noaccess;
+- int cross_mounts;
+- int allow_setuid;
++ unsigned root_squash : 1;
++ unsigned all_squash : 1;
++ unsigned some_squash : 1; /* speed up luid() etc. */
++ unsigned secure_port : 1;
++ unsigned read_only : 1;
++ unsigned link_relative : 1;
++ unsigned noaccess : 1;
++ unsigned cross_mounts : 1;
++ unsigned hashed_inodes : 1;
++ unsigned allow_setuid : 1;
+ uid_t nobody_uid;
+ gid_t nobody_gid;
+ char * clnt_nisdomain;
+@@ -64,6 +65,7 @@
+ int length;
+ char * path;
+ nfs_options o;
++ dev_t mount_dev;
+ /* Original NFS client */
+ struct nfs_client * origin;
+ } nfs_mount;
+@@ -121,6 +123,8 @@
+ extern void auth_check_all_netmasks(void);
+ extern void auth_sort_all_mountlists(void);
+ extern void auth_log_all(void);
++extern int auth_checkdev(nfs_mount *, dev_t dev);
++extern int auth_checkpathdev(char *, dev_t dev);
+
+ /* This function lets us set our euid/fsuid temporarily */
+ extern void auth_override_uid(uid_t);
+--- nfs-server/auth_clnt.c
++++ nfs-server/auth_clnt.c 2002/11/08 13:59:16
+@@ -89,6 +89,13 @@
+ return NULL;
+ }
+
++ if (!mp->o.cross_mounts && !mp->mount_dev) {
++ struct stat st;
++ if (!lstat(mp->path, &st) < 0)
++ return NULL;
++ mp->mount_dev = st.st_dev;
++ }
++
+ /* Check request originated on a privileged port. */
+ if (!allow_non_root && mp->o.secure_port
+ && !SECURE_PORT(svc_getcaller(rqstp->rq_xprt)->sin_port)) {
+@@ -350,3 +357,28 @@
+ return 1;
+ }
+ #endif
++
++int auth_checkpathdev(char *path, dev_t dev)
++{
++ nfs_mount *mp = auth_match_mount(nfsclient, path);
++ if (!mp)
++ return 0;
++ return auth_checkdev(mp, dev);
++}
++
++int auth_checkdev(nfs_mount *mp, dev_t dev)
++{
++ if (!mp->mount_dev)
++ return 1;
++ if (mp->mount_dev != dev) {
++ struct stat st;
++ /* Restat in case the cd switched */
++ if (efs_lstat(mp->path, &st) < 0) {
++ Dprintf(L_ERROR, "Unable to stat mount point %s\n", mp->path);
++ return 0;
++ }
++ mp->mount_dev = st.st_dev;
++ }
++ return mp->mount_dev == dev;
++}
++
+--- nfs-server/auth_init.c
++++ nfs-server/auth_init.c 2002/11/08 13:59:16
+@@ -320,6 +320,14 @@
+ /* knfsd compatibility, ignore */;
+ else ifkwd(4, "sync")
+ /* knfsd compatibility, ignore */;
++ else ifkwd(13, "hashed_inodes")
++ mp->o.hashed_inodes = 1;
++ else ifkwd(16, "no_hashed_inodes")
++ mp->o.hashed_inodes = 0;
++ else ifkwd(12, "cross_mounts")
++ mp->o.cross_mounts = 1;
++ else ifkwd(15, "no_cross_mounts")
++ mp->o.cross_mounts = 0;
+ else {
+ Dprintf(L_ERROR,
+ "Unknown keyword \"%.*s\" in export file\n",
+--- nfs-server/exports.man
++++ nfs-server/exports.man 2002/11/08 13:59:16
+@@ -208,6 +208,17 @@
+ .IR no_all_squash ,
+ which is the default setting.
+ .TP
++.IR hashed_inodes
++Use a special scheme to generate inode numbers that may work better with
++reiserfs filesystems.
++.IR no_hashed_inodes
++which uses a direct mapping is the default.
++.TP
++.IR cross_mounts
++Do not cross mount points in exports. Turning this off with
++.IR no_cross_mounts
++avoids inode number space conflicts when there are too many files.
++.TP
+ .IR map_daemon
+ This option turns on dynamic uid/gid mapping. Each uid in an NFS request
+ will be translated to the equivalent server uid, and each uid in an
+--- nfs-server/fh.c
++++ nfs-server/fh.c 2002/11/08 14:11:31
+@@ -4,8 +4,9 @@
+ *
+ * Interfaces:
+ * pseudo_inode
+- * mostly used internally, but also called from unfsd.c
+- * when reporting directory contents.
++ * mostly used internally, for hash tables
++ * visible_inode
++ * generate visible inode shown to the client in the fattr.
+ * fh_init
+ * Initializes the queues and 'flush' timer
+ * fh_pr
+@@ -47,6 +48,8 @@
+ * Note: the original code mistakenly assumes that the overall path
+ * length remains within the value given by PATH_MAX... that leads
+ * to interesting buffer overflows all over the place.
++ *
++ * Depends that dev_t only uses 16bits.
+ */
+
+ #include <assert.h>
+@@ -137,9 +140,9 @@
+ };
+
+ /* Forward declared local functions */
+-static psi_t path_psi(char *, nfsstat *, struct stat *, int);
++static psi_t path_psi(char *, nfsstat *, struct stat *, int, int *);
+ static psi_t path_psi_m(char *, nfsstat *, struct stat *,
+- struct stat *, int);
++ struct stat *, int, int *);
+ static int fh_flush_fds(void);
+ static char * fh_dump(svc_fh *);
+ static void fh_insert_fdcache(fhcache *fhc);
+@@ -173,19 +176,22 @@
+ fh_list_size++;
+
+ /* Insert into hash tab. */
+- hash_slot = &(fh_hashed[fhc->h.psi % HASH_TAB_SIZE]);
++ hash_slot = &(fh_hashed[pseudo_inode(fhc->h.ino,fhc->h.dev) % HASH_TAB_SIZE]);
+ fhc->hash_next = *hash_slot;
+ *hash_slot = fhc;
+ }
+
+ static fhcache *
+-fh_lookup(psi_t psi)
++fh_lookup(ino_t ino, dev_t dev)
+ {
+ register fhcache *fhc;
+
+- fhc = fh_hashed[psi % HASH_TAB_SIZE];
+- while (fhc != NULL && fhc->h.psi != psi)
++ fhc = fh_hashed[pseudo_inode(ino,dev) % HASH_TAB_SIZE];
++ while (fhc != NULL) {
++ if (fhc->h.ino == ino && fhc->h.dev == dev)
++ break;
+ fhc = fhc->hash_next;
++ }
+ return (fhc);
+ }
+
+@@ -193,7 +199,8 @@
+ fh_insert_fdcache(fhcache *fhc)
+ {
+ #ifdef FHTRACE
+- Dprintf(D_FHTRACE, "insert fh %x into fdcache @%d\n", fhc->h.psi, fhc->fd);
++ Dprintf(D_FHTRACE, "insert fh %x,%x into fdcache @%d\n",
++ fhc->h.ino, fhc->h.dev, fhc->fd);
+ if (fhc->fd < 0) {
+ fh_complain("fd cache bug: bad fd", fhc);
+ return;
+@@ -289,8 +296,9 @@
+ #endif
+
+ Dprintf(D_FHTRACE|D_FHCACHE,
+- "fh_delete: deleting handle %x ('%s', fd=%d)\n",
+- fhc, fhc->path ? fhc->path : "<unnamed>", fhc->fd);
++ "fh_delete: deleting handle %x [%x,%x] ('%s', fd=%d)\n",
++ fhc, fhc->h.dev, fhc->h.ino, fhc->path ? fhc->path : "<unnamed>",
++ fhc->fd);
+
+ /* Remove from current posn */
+ fhc->prev->next = fhc->next;
+@@ -298,7 +306,7 @@
+ fh_list_size--;
+
+ /* Remove from hash tab */
+- hash_slot = &(fh_hashed[fhc->h.psi % HASH_TAB_SIZE]);
++ hash_slot = &(fh_hashed[pseudo_inode(fhc->h.ino,fhc->h.dev) % HASH_TAB_SIZE]);
+ while (*hash_slot != NULL && *hash_slot != fhc)
+ hash_slot = &((*hash_slot)->hash_next);
+ if (*hash_slot == NULL)
+@@ -528,6 +536,7 @@
+ index -= 8;
+ }
+
++#if 0
+ /* If we have an XXL inode number, spew out warning (but at most
+ * once a second) */
+ if (inode & ~mask) {
+@@ -541,14 +550,34 @@
+ }
+ inode &= mask;
+ }
+-
++#endif
+ return (psi_t) (prefix | inode);
+ #endif
+ }
+
++/* Inode as handed out by attr calls. */
++psi_t
++visible_inode(ino_t ino, dev_t dev, nfs_mount *mount)
++{
++ if (!mount->o.cross_mounts)
++ return ino;
++
++ if (mount->o.hashed_inodes) {
++ extern __u32 teahash3(/*u32 k[2], *//*u8*/const char *msg, int len);
++
++ struct {
++ ino_t ino;
++ dev_t dev;
++ } tup = { ino,dev };
++ return teahash3((char *) &tup, sizeof tup);
++ }
++
++ return pseudo_inode(ino, dev);
++}
++
+ #if 1
+ static char *
+-fh_buildpath(svc_fh *h)
++fh_buildpath(svc_fh *h, dev_t basedev)
+ {
+ char pathbuf[PATH_MAX + NAME_MAX + 1], *path;
+ long cookie_stack[HP_LEN + 1];
+@@ -565,13 +594,17 @@
+
+ if (efs_stat("/", &sbuf) < 0)
+ return (NULL);
+- psi = pseudo_inode(sbuf.st_ino, sbuf.st_dev);
+ if (h->hash_path[0] == 0) {
+- if (psi != h->psi)
+- return (NULL);
+- return xstrdup("/");
++ if (sbuf.st_ino == h->ino && sbuf.st_dev == h->dev)
++ ;
++ else
++ return NULL;
++ strcpy(pathbuf,"/");
++ path = xstrdup(pathbuf);
++ return (path);
+ }
+
++ psi = pseudo_inode(sbuf.st_ino, sbuf.st_dev);
+ if (hash_psi(psi) != h->hash_path[1])
+ return (NULL);
+
+@@ -599,11 +632,18 @@
+
+ psi = pseudo_inode(dp->d_ino, sbuf.st_dev);
+ if (i == h->hash_path[0] + 1) {
+- if (psi != h->psi)
++ if (sbuf.st_dev != h->dev || dp->d_ino != h->ino)
+ continue;
+ /* GOT IT */
+ strcpy(pathbuf + pathlen, dp->d_name);
+- path = xstrdup(pathbuf);
++ if (!basedev || sbuf.st_dev == basedev ||
++ auth_checkpathdev(pathbuf, sbuf.st_dev)) {
++ path = xstrdup(pathbuf);
++ } else {
++ dprintf(L_ERROR, "fh_buildpath: basedev %x != dev %x for %s\n",
++ (unsigned)basedev,(unsigned)sbuf.st_dev,pathbuf);
++ path = NULL;
++ }
+ efs_closedir(dir);
+ auth_override_uid(auth_uid);
+ return (path);
+@@ -754,16 +794,16 @@
+ #endif
+
+ static psi_t
+-path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid)
++path_psi(char *path, nfsstat *status, struct stat *sbp, int svalid, int *mp)
+ {
+ struct stat smounted;
+
+- return path_psi_m(path, status, sbp, &smounted, svalid);
++ return path_psi_m(path, status, sbp, &smounted, svalid, mp);
+ }
+
+ static psi_t
+ path_psi_m(char *path, nfsstat *status,
+- struct stat *sbp, struct stat *mbp, int svalid)
++ struct stat *sbp, struct stat *mbp, int svalid, int *mp)
+ {
+ struct stat sbuf, ddbuf;
+
+@@ -815,6 +855,8 @@
+ DIR *dirp;
+ struct dirent *dp;
+
++ if (mp) *mp = 1;
++
+ errno = 0;
+ dirp = efs_opendir(dname);
+ fname[-1] = '/'; /* Restore path */
+@@ -860,9 +902,70 @@
+ }
+
+ fhcache *
+-fh_find(svc_fh *h, int mode)
++fh_newfh(svc_fh *h, int mode, dev_t basedev)
++{
++ fhcache *fhc, *flush;
++
++ ex_state = active;
++ for (flush = fh_tail.prev; fh_list_size > FH_CACHE_LIMIT; flush = fhc) {
++ /* Don't flush current head. */
++ if (flush == &fh_head)
++ break;
++ fhc = flush->prev;
++ fh_delete(flush);
++ }
++ fhc = (fhcache *) xmalloc(sizeof *fhc);
++ if (mode == FHFIND_FCREATE) {
++ /* File will be created */
++ fhc->path = NULL;
++ } else {
++ /* File must exist. Attempt to construct from hash_path */
++ char *path;
++
++ if ((path = fh_buildpath(h, basedev)) == NULL) {
++#ifdef FHTRACE
++ Dprintf(D_FHTRACE, "fh_find: stale fh (hash path)\n");
++ Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
++#endif
++ free(fhc);
++ ex_state = inactive;
++ return NULL;
++ }
++ fhc->path = path;
++ }
++ fhc->flags = 0;
++ if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
++ if (re_export && nfsmounted(fhc->path, &fhc->attrs))
++ fhc->flags |= FHC_NFSMOUNTED;
++ fhc->flags |= FHC_ATTRVALID;
++ }
++ fhc->fd = -1;
++ fhc->last_used = curtime;
++ fhc->h = *h;
++ fhc->last_clnt = NULL;
++ fhc->last_mount = NULL;
++ fhc->last_uid = (uid_t)-1;
++ fhc->fd_next = fhc->fd_prev = NULL;
++ fh_inserthead(fhc);
++ Dprintf(D_FHCACHE,
++ "fh_find: created new handle %x (path `%s' ino:%x dev:%x)\n",
++ fhc, fhc->path ? fhc->path : "<unnamed>", fhc->h.ino, fhc->h.dev);
++ ex_state = inactive;
++ if (fh_list_size > FH_CACHE_LIMIT)
++ flush_cache(0);
++#ifdef FHTRACE
++ if (fhc->h.hash_path[0] == 0xFF) {
++ Dprintf(L_ERROR, "newly created fh instantly flushed?!");
++ return NULL;
++ }
++#endif
++ return (fhc);
++}
++
++fhcache *
++fh_find(svc_fh *h, int mode, dev_t basedev)
+ {
+- register fhcache *fhc, *flush;
++ register fhcache *fhc;
+ int check;
+
+ check = (mode & FHFIND_CHECK);
+@@ -877,12 +980,12 @@
+
+ ex_state = active;
+ time(&curtime);
+- while ((fhc = fh_lookup(h->psi)) != NULL) {
++ while ((fhc = fh_lookup(h->ino,h->dev)) != NULL) {
+ struct stat sbuf, *s = NULL;
+ nfsstat dummy;
+
+- Dprintf(D_FHCACHE, "fh_find: psi=%lx... found '%s', fd=%d\n",
+- (unsigned long) h->psi,
++ Dprintf(D_FHCACHE, "fh_find: (%u,%u)... found '%s', fd=%d\n",
++ h->ino, h->dev,
+ fhc->path ? fhc->path : "<unnamed>",
+ fhc->fd);
+
+@@ -905,6 +1008,7 @@
+ Dprintf(D_FHTRACE,
+ "fh_find: stale fh: lstat: %m\n");
+ } else {
++ int mp = 0;
+ /* If device/ino don't match, fhc->path may
+ * be a mount point (hence lstat() returns
+ * a different inode number than the readdir()
+@@ -915,19 +1019,26 @@
+
+ /* Get the dev/ino of the underlying
+ * mount point. */
+- path_psi(fhc->path, &dummy, s, 1);
+- if (fh_attrmatch(fhc, s))
+- goto fh_return;
++ if (path_psi(fhc->path, &dummy, s, 1, &mp) &&
++ fh_attrmatch(fhc, s)) {
++ if (!mp)
++ Dprintf(D_FHTRACE,"fh_find: should be mount point %x,%x\n",
++ h->dev,h->ino);
++
++ }
+
+- Dprintf(D_FHTRACE, "fh_find: stale fh: %lx",
+- (unsigned long) h->psi);
++ Dprintf(D_FHTRACE, "fh_find: stale fh: "
++ "dev/ino %x/%lx ino:%x dev:%x",
++ s->st_dev, s->st_ino,
++ (unsigned)h->ino, (unsigned)h->dev);
+ }
+
+ fh_discard:
+ #ifdef FHTRACE
+ Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
+ #endif
+- Dprintf(D_FHCACHE, "fh_find: delete cached handle\n");
++ Dprintf(D_FHCACHE, "fh_find: delete cached handle %x,%x <%x>\n",
++ fhc->h.dev,fhc->h.ino,fhc->path ? fhc->path : "no path");
+ fh_delete(fhc);
+ break;
+ }
+@@ -947,88 +1058,13 @@
+ return (fhc);
+ }
+
+- Dprintf(D_FHCACHE, "fh_find: psi=%lx... not found\n",
+- (unsigned long) h->psi);
+-
+- if (mode == FHFIND_FCACHED) {
+- ex_state = inactive;
+- return NULL;
+- }
+-
+- for (flush = fh_tail.prev; fh_list_size > FH_CACHE_LIMIT; flush = fhc) {
+- /* Don't flush current head. */
+- if (flush == &fh_head)
+- break;
+- fhc = flush->prev;
+- fh_delete(flush);
+- }
+-
+- fhc = (fhcache *) xmalloc(sizeof *fhc);
+- if (mode == FHFIND_FCREATE) {
+- /* File will be created */
+- fhc->path = NULL;
+- } else {
+- /* File must exist. Attempt to construct from hash_path */
+- char *path;
+-
+- if ((path = fh_buildpath(h)) == NULL) {
+-#ifdef FHTRACE
+- Dprintf(D_FHTRACE, "fh_find: stale fh (hash path)\n");
+- Dprintf(D_FHTRACE, "\tdata: %s\n", fh_dump(h));
+-#endif
+- free(fhc);
+- ex_state = inactive;
+- return NULL;
+- }
+- fhc->path = path;
+- }
+-
+- fhc->flags = 0;
+- if (fhc->path && efs_lstat(fhc->path, &fhc->attrs) >= 0) {
+- if (nfsmounted(fhc->path, &fhc->attrs)) {
+- fhc->flags |= FHC_NFSMOUNTED;
+-#if 0
+- /* We must allow the client to send us the
+- * file handle for the NFS mount point itself,
+- * but not for entries within an NFS mount.
+- * XXX: needs fixing.
+- */
+- if (!re_export) {
+- Dprintf(D_FHTRACE,
+- "Attempt to use %s (non-exportable)\n",
+- fhc->path);
+- free(fhc);
+- ex_state = inactive;
+- return NULL;
+- }
+-#endif
+- }
+- fhc->flags |= FHC_ATTRVALID;
+- fhc->dev = fhc->attrs.st_dev;
+- fhc->ino = fhc->attrs.st_ino;
+- fhc->type = fhc->attrs.st_mode & S_IFMT;
+- }
+- fhc->fd = -1;
+- fhc->last_used = curtime;
+- fhc->h = *h;
+- fhc->last_clnt = NULL;
+- fhc->last_mount = NULL;
+- fhc->last_uid = (uid_t)-1;
+- fhc->fd_next = fhc->fd_prev = NULL;
+- fh_inserthead(fhc);
+- Dprintf(D_FHCACHE,
+- "fh_find: created new handle %x (path `%s' psi %08x)\n",
+- fhc, fhc->path ? fhc->path : "<unnamed>", fhc->h.psi);
+ ex_state = inactive;
+- if (fh_list_size > FH_CACHE_LIMIT)
+- flush_cache(0);
+-#ifdef FHTRACE
+- if (fhc->h.hash_path[0] == 0xFF) {
+- Dprintf(L_ERROR, "newly created fh instantly flushed?!");
++
++ Dprintf(D_FHCACHE, "fh_find: (%u,%u) ... not found\n",
++ h->ino, h->dev);
++ if (mode == FHFIND_FCACHED)
+ return NULL;
+- }
+-#endif
+- return (fhc);
++ return fh_newfh(h, mode, basedev);
+ }
+
+ /*
+@@ -1040,7 +1076,7 @@
+ {
+ fhcache *h;
+
+- if ((h = fh_find((svc_fh *) fh, FHFIND_FCACHED)) == NULL)
++ if ((h = fh_find((svc_fh *) fh, FHFIND_FCACHED, 0)) == NULL)
+ return fh_dump((svc_fh *) fh);
+ return (h->path);
+ }
+@@ -1050,10 +1086,10 @@
+ {
+ static char buf[65];
+ char *sp;
+- int i, n = fh->hash_path[0];
++ int i, n = fh->hash_path[0], l;
+
+- sprintf(buf, "%08x %02x ", fh->psi, fh->hash_path[0]);
+- for (i = 1, sp = buf + 12; i <= n && i < HP_LEN; i++, sp += 2)
++ l = sprintf(buf, "%08x %04x %02x ", fh->ino, fh->dev, fh->hash_path[0]);
++ for (i = 1, sp = buf + l; i <= n && i < HP_LEN; i++, sp += 2)
+ sprintf(sp, "%02x", fh->hash_path[i]);
+ return buf;
+ }
+@@ -1082,7 +1118,7 @@
+
+ memset(&key, 0, sizeof(key));
+ status = NFS_OK;
+- if ((psi = path_psi("/", &status, &stb, 0)) == 0)
++ if ((psi = path_psi("/", &status, &stb, 0, NULL)) == 0)
+ return ((int) status);
+
+ s = path;
+@@ -1091,7 +1127,7 @@
+ return ((int) NFSERR_NAMETOOLONG);
+ key.hash_path[key.hash_path[0]] = hash_psi(psi);
+ *s = '\0';
+- if ((psi = path_psi(path, &status, &stb, 0)) == 0)
++ if ((psi = path_psi(path, &status, &stb, 0, NULL)) == 0)
+ return ((int) status);
+ *s = '/';
+ }
+@@ -1099,11 +1135,12 @@
+ if (++(key.hash_path[0]) >= HP_LEN)
+ return ((int) NFSERR_NAMETOOLONG);
+ key.hash_path[key.hash_path[0]] = hash_psi(psi);
+- if ((psi = path_psi(path, &status, &stb, 0)) == 0)
++ if ((psi = path_psi(path, &status, &stb, 0, NULL)) == 0)
+ return ((int) status);
+ }
+- key.psi = psi;
+- h = fh_find(&key, FHFIND_FCREATE);
++ key.dev = stb.st_dev;
++ key.ino = stb.st_ino;
++ h = fh_find(&key, FHFIND_FCREATE, 0);
+
+ #ifdef FHTRACE
+ if (!h)
+@@ -1123,6 +1160,7 @@
+ return ((int) status);
+ }
+
++#if 0
+ char *
+ fh_path(nfs_fh *fh, nfsstat *status)
+ {
+@@ -1135,6 +1173,7 @@
+ *status = NFS_OK;
+ return (h->path);
+ }
++#endif
+
+ nfs_fh *
+ fh_handle(fhcache *h)
+@@ -1349,7 +1388,7 @@
+ if (sbp == NULL)
+ sbp = &sbuf;
+
+- if ((dirh = fh_find((svc_fh *) &dopa->dir, FHFIND_FEXISTS)) == NULL)
++ if ((dirh = fh_find((svc_fh *) &dopa->dir, FHFIND_FEXISTS, 0)) == NULL)
+ return NFSERR_STALE;
+
+ /*
+@@ -1419,8 +1458,22 @@
+
+ *new_fh = dopa->dir;
+ key = (svc_fh *) new_fh;
+- if ((key->psi = path_psi_m(pathbuf, &ret, sbp, &smount, 0)) == 0)
++
++ if (path_psi_m(pathbuf, &ret, sbp, &smount, 0, NULL) == 0)
+ return (ret);
++ key->ino = sbp->st_ino;
++ key->dev = sbp->st_dev;
++
++ if (sbp->st_dev != dirh->h.dev) {
++ nfs_mount *mp = dirh->last_mount;
++ if (!mp)
++ Dprintf(L_ERROR, "no last mount in fh_compose for %s\n", pathbuf);
++ else if (auth_checkdev(mp, sbp->st_dev) == 0) {
++ Dprintf(L_ERROR, "access to no cross path below mountpoint (<%s>, %x<->%x)\n",
++ pathbuf, mp->mount_dev, sbp->st_dev);
++ return NFSERR_STALE;
++ }
++ }
+
+ if (is_dd) {
+ /* Don't cd .. from root, or mysterious ailments will
+@@ -1430,11 +1483,12 @@
+ } else {
+ if (++(key->hash_path[0]) >= HP_LEN)
+ return NFSERR_NAMETOOLONG;
+- key->hash_path[key->hash_path[0]] = hash_psi(dirh->h.psi);
++ key->hash_path[key->hash_path[0]] = hash_psi(pseudo_inode(dirh->h.ino,
++ dirh->h.dev));
+ }
+ /* FIXME: when crossing a mount point, we'll find the real
+ * dev/ino in sbp and can store it in h... */
+- h = fh_find(key, FHFIND_FCREATE);
++ h = fh_find(key, FHFIND_FCREATE, 0);
+
+ #ifdef FHTRACE
+ if (h == NULL)
+@@ -1456,7 +1510,7 @@
+ /* We must have cached an old file under the same inode # */
+ Dprintf(D_FHTRACE, "Disposing of fh with bad path.\n");
+ fh_delete(h);
+- h = fh_find(key, FHFIND_FCREATE);
++ h = fh_find(key, FHFIND_FCREATE, dirh->last_mount ? dirh->last_mount->mount_dev : 0);
+ #ifdef FHTRACE
+ if (!h) return NFSERR_STALE;
+ #endif
+@@ -1511,12 +1565,14 @@
+ return (NFS_OK);
+ }
+
++#if 0
+ psi_t
+ fh_psi(nfs_fh *fh)
+ {
+ svc_fh *h = (svc_fh *) fh;
+ return (h->psi);
+ }
++#endif
+
+ void
+ fh_remove(char *path)
+@@ -1524,12 +1580,13 @@
+ psi_t psi;
+ nfsstat status;
+ fhcache *fhc;
++ struct stat st;
+
+- psi = path_psi(path, &status, NULL, 0);
++ psi = path_psi(path, &status, &st, 0, NULL);
+ if (psi == 0)
+ return;
+ ex_state = active;
+- fhc = fh_lookup(psi);
++ fhc = fh_lookup(st.st_ino,st.st_dev);
+ if (fhc != NULL)
+ fh_delete(fhc);
+
+@@ -1634,6 +1691,11 @@
+ fh_init(void)
+ {
+ static int initialized = 0;
++
++ if (sizeof(svc_fh) > 32) {
++ fprintf(stderr, "filehandle wrong size %d\n", sizeof(svc_fh));
++ exit(10);
++ }
+
+ if (initialized)
+ return;
+--- nfs-server/fh.h
++++ nfs-server/fh.h 2002/11/08 13:59:16
+@@ -20,6 +20,7 @@
+ #define FHC_XONLY_PATH 001 /* NOT USED ANYMORE */
+ #define FHC_ATTRVALID 002
+ #define FHC_NFSMOUNTED 004
++#define FHC_CROSS 010
+
+ /* Modes for fh_find */
+ #define FHFIND_FEXISTS 0 /* file must exist */
+@@ -65,11 +66,12 @@
+ *
+ * hash_path[hash_path[0]+1] ... hash_path[HP_LEN-1] == 0
+ */
+-#define HP_LEN (NFS_FHSIZE - sizeof(psi_t))
++#define HP_LEN (NFS_FHSIZE-sizeof(u_int32_t)-sizeof(u_int16_t))
+ typedef struct {
+- psi_t psi;
++ u_int32_t ino;
++ u_int16_t dev;
+ __u8 hash_path[HP_LEN];
+-} svc_fh;
++} svc_fh __attribute__((packed));
+
+ typedef enum { inactive, active } mutex;
+
+@@ -100,6 +102,7 @@
+
+ /* These are fixed during the lifetime of this object */
+ svc_fh h;
++ psi_t psi;
+ dev_t dev;
+ ino_t ino;
+ mode_t type; /* st_mode & S_IFMT */
+@@ -122,10 +125,11 @@
+ /* Global function prototypes. */
+ extern nfsstat nfs_errno(void);
+ extern psi_t pseudo_inode(ino_t inode, dev_t dev);
++extern psi_t visible_inode(ino_t inode, dev_t dev, nfs_mount *);
+ extern void fh_init(void);
+ extern char *fh_pr(nfs_fh *fh);
+ extern int fh_create(nfs_fh *fh, char *path);
+-extern fhcache *fh_find(svc_fh *h, int create);
++extern fhcache *fh_find(svc_fh *h, int create, dev_t basedev);
+ extern char *fh_path(nfs_fh *fh, nfsstat *status);
+ extern int path_open(char *path, int omode, int perm);
+ extern int fh_fd(fhcache *fhc, nfsstat *status, int omode);
+@@ -139,6 +143,7 @@
+ extern void fh_flush(int force);
+ extern RETSIGTYPE flush_cache(int sig);
+ extern int nfsmounted(const char *path, struct stat *sbp);
++extern fhcache *fh_newfh(svc_fh *fh, int mode, dev_t basedev);
+
+ #ifdef ENABLE_DEVTAB
+ extern unsigned int devtab_index(dev_t);
+--- nfs-server/getattr.c
++++ nfs-server/getattr.c 2002/11/08 13:59:16
+@@ -43,7 +43,7 @@
+ {
+ fhcache *fhc;
+
+- if ((fhc = fh_find((svc_fh*)fh, FHFIND_FEXISTS)) == NULL) {
++ if ((fhc = fh_find((svc_fh*)fh, FHFIND_FEXISTS, 0)) == NULL) {
+ Dprintf(D_CALL, "getattr: failed! No such file.\n");
+ return (NFSERR_STALE);
+ }
+@@ -103,18 +103,8 @@
+ #else
+ attr->blocks = st_blocks(s);
+ #endif
+-#if 0
+- if (nfsmount->o.cross_mounts) {
+- attr->fsid = 1;
+- attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
+- } else {
+- attr->fsid = s->st_dev;
+- attr->fileid = covered_ino(fhc->path);
+- }
+-#else
+- attr->fsid = 1;
+- attr->fileid = fh_psi((nfs_fh *)&(fhc->h));
+-#endif
++ attr->fsid = 1; // XXX
++ attr->fileid = visible_inode(fhc->h.ino, fhc->h.dev, nfsmount);
+
+ /* This may be needed by some Suns... testing */
+ #define MINTIME (24 * 2600)
+--- nfs-server/mountd.c
++++ nfs-server/mountd.c 2002/11/08 13:59:16
+@@ -36,6 +36,8 @@
+ #include "signals.h"
+ #include <rpc/pmap_clnt.h>
+
++int cross_mounts = 1;
++int hashed_inodes; /* dummy */
+
+ static void usage(FILE *, int);
+ static void terminate(void);
+@@ -58,9 +60,9 @@
+ { "no-spoof-trace", 0, 0, 't' },
+ { "version", 0, 0, 'v' },
+ { "fail-safe", optional_argument, 0, 'z' },
++ { "no-cross-mounts", 0, 0, 'x' },
+ { "no-tcp", 0, 0, OPT_NOTCP },
+ { "loopback-only", 0, 0, OPT_LOOPBACK },
+-
+ { NULL, 0, 0, 0 }
+ };
+ static const char * shortopts = "Fd:f:hnpP:rtvz::";
+@@ -80,6 +82,7 @@
+ int need_reinit = 0;
+ int need_flush = 0;
+ extern char version[];
++nfs_client *nfsclient; /* dummy */
+
+ /*
+ * NULL
+@@ -319,6 +322,9 @@
+ opterr = 0;
+ while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != EOF)
+ switch (c) {
++ case 'x':
++ cross_mounts = 0;
++ break;
+ case 'F':
+ foreground = 1;
+ break;
+@@ -444,7 +450,7 @@
+ program_name);
+ fprintf(fp, " [--debug kind] [--help] [--allow-non-root]\n");
+ fprintf(fp, " [--promiscuous] [--version] [--port portnum]\n");
+- fprintf(fp, " [--exports-file=file]\n");
++ fprintf(fp, " [--exports-file=file] [--no-cross-mounts]\n");
+ exit(n);
+ }
+
+--- nfs-server/nfsd.c
++++ nfs-server/nfsd.c 2002/11/08 14:20:57
+@@ -72,7 +72,7 @@
+ { "no-tcp", 0, 0, OPT_NOTCP },
+ { "udp-only", 0, 0, OPT_NOTCP },
+ { "loopback-only", 0, 0, OPT_LOOPBACK },
+-
++ { "hashed-inodes", 0, 0, 'I' },
+ { NULL, 0, 0, 0 }
+ };
+ static const char * shortopts = "a:d:Ff:hlnP:prR:tvz::";
+@@ -91,6 +91,7 @@
+ int need_flush = 0; /* flush fh cache */
+ int read_only = 0; /* Global ro forced */
+ int cross_mounts = 1; /* Transparently cross mnts */
++int hashed_inodes = 0;
+ int log_transfers = 0; /* Log transfers */
+ static svc_fh public_fh; /* Public NFSv2 FH */
+
+@@ -122,12 +123,17 @@
+ {
+ static int total = 0, cached = 0;
+ fhcache *fhc;
++ int newfh = 0;
+
+- /* Try to map FH. If not cached, reconstruct path with root priv */
+- fhc = fh_find((svc_fh *)fh, FHFIND_FEXISTS|FHFIND_CHECK);
+- if (fhc == NULL) {
+- *statp = NFSERR_STALE;
+- return NULL;
++ /* Try to map FH. */
++ fhc = fh_find((svc_fh *)fh, FHFIND_FCACHED|FHFIND_CHECK, 0);
++ if (!fhc) {
++ fhc = fh_newfh((svc_fh*)fh, FHFIND_FEXISTS|FHFIND_CHECK, 0);
++ if (!fhc) {
++ *statp = NFSERR_STALE;
++ return NULL;
++ }
++ newfh = 1;
+ }
+
+ /* Try to retrieve last client who accessed this fh */
+@@ -163,6 +169,16 @@
+ 100 * (double) cached / total);
+ */
+
++ /* Trust the crossmount check of the parent directory for creates */
++ if (newfh &&
++ (fhc->flags & FHC_ATTRVALID) &&
++ auth_checkdev(nfsmount, fhc->attrs.st_dev) == 0) {
++ Dprintf(L_ERROR, "auth_fh: fh crossed mount %s: %x<->%x\n",
++ fhc->path ? fhc->path : "???", nfsmount->mount_dev, fhc->attrs.st_dev);
++ *statp = NFSERR_STALE; /* or ACCES? */
++ return NULL;
++ }
++
+ if (nfsmount->o.noaccess &&
+ ((flags & CHK_NOACCESS) || strcmp(nfsmount->path, fhc->path))) {
+ struct in_addr addr = svc_getcaller(rqstp->rq_xprt)->sin_addr;
+@@ -195,6 +211,7 @@
+ fhcache *fhc;
+ nfsstat status;
+ char *path = buf, *sp;
++ struct stat st;
+
+ /* Authenticate directory file handle */
+ if ((fhc = auth_fh(rqstp, &dopa->dir, &status, flags)) == NULL)
+@@ -219,6 +236,9 @@
+ if ((nfsmount = auth_path(nfsclient, rqstp, path)) == NULL)
+ return NFSERR_ACCES;
+
++ if (efs_lstat(path, &st) >= 0 && !auth_checkdev(nfsmount, st.st_dev))
++ return NFSERR_ACCES;
++
+ /* XXX: really need to call it again here?
+ * Already invoked in auth_fh */
+ if (!auth_user(nfsmount, rqstp))
+@@ -318,7 +338,8 @@
+ int ispublic = 0;
+
+ /* First check whether this is the public FH */
+- if (((svc_fh *) fh)->psi == 0 && !memcmp(fh, &public_fh, FHSIZE)) {
++ if (((svc_fh *) fh)->dev == 0 && ((svc_fh*)fh)->ino == 0 &&
++ !memcmp(fh, &public_fh, FHSIZE)) {
+ if (public_root_path == NULL)
+ return NFSERR_ACCES;
+ memcpy(&argp->dir, &public_root, NFS_FHSIZE);
+@@ -333,6 +354,7 @@
+ if (!(fhc = auth_fh(rqstp, fh, &status, CHK_READ)))
+ return status;
+
++ /* FIXME: does too many stats */
+ status = fh_compose(argp, &dp->file, &sbuf, -1, -1, ispublic);
+ if (status != NFS_OK)
+ return status;
+@@ -896,6 +918,9 @@
+ errno = 0;
+ if (efs_lstat(h->path, &sbuf) < 0 || !(S_ISDIR(sbuf.st_mode)))
+ return (NFSERR_NOTDIR);
++ if (!auth_checkdev(h->last_mount, sbuf.st_dev))
++ dotsonly = 1;
++
+ if ((dirp = efs_opendir(h->path)) == NULL)
+ return ((errno ? nfs_errno() : NFSERR_NAMETOOLONG));
+
+@@ -923,7 +948,7 @@
+ }
+
+ e = *ep = (entry *) xmalloc(sizeof(entry));
+- e->fileid = pseudo_inode(dp->d_ino, sbuf.st_dev);
++ e->fileid = visible_inode(dp->d_ino, sbuf.st_dev, h->last_mount);
+ e->name = xmalloc(NLENGTH(dp) + 1);
+ strcpy(e->name, dp->d_name);
+ dloc = htonl(efs_telldir(dirp));
+@@ -1033,6 +1058,9 @@
+ case 'x':
+ cross_mounts = 0;
+ break;
++ case 'I':
++ hashed_inodes = 1;
++ break;
+ case 'z':
+ if (optarg)
+ failsafe_level = atoi(optarg);
+@@ -1189,7 +1217,7 @@
+ " [--debug kind] [--exports-file=file] [--port port]\n"
+ " [--allow-non-root] [--promiscuous] [--version] [--foreground]\n"
+ " [--re-export] [--log-transfers] [--public-root path]\n"
+-" [--no-spoof-trace] [--help]\n"
++" [--no-spoof-trace] [--no-cross-mounts] [--hashed-inodes] [--help]\n"
+ , program_name);
+ exit(n);
+ }
+--- nfs-server/nfsd.h
++++ nfs-server/nfsd.h 2002/11/08 13:59:16
+@@ -51,6 +51,7 @@
+ extern int need_reinit;
+ extern int need_flush;
+ extern time_t nfs_dispatch_time;
++extern int cross_mounts, hashed_inodes;
+
+ /* Include the other module definitions. */
+ #include "auth.h"
+--- nfs-server/setattr.c
++++ nfs-server/setattr.c 2002/11/08 13:59:16
+@@ -17,6 +17,7 @@
+
+ #define IGNORE_TIME ((unsigned int) -1)
+
++#if 0
+ /*
+ * Set file attributes based on file handle
+ */
+@@ -33,6 +34,7 @@
+ }
+ return setattr(path, attr, s, rqstp, flags);
+ }
++#endif
+
+ /*
+ * Set file attributes given the path. The flags argument
+--- nfs-server/teahash3.c
++++ nfs-server/teahash3.c 2002/11/08 13:59:16
+@@ -0,0 +1,168 @@
++/* Taken from the reiserfs source code and hacked slightly by AK.
++ * This is GPLed. */
++/*
++ * Keyed 32-bit hash function using TEA in a Davis-Meyer function
++ * H0 = Key
++ * Hi = E Mi(Hi-1) + Hi-1
++ *
++ * (see Applied Cryptography, 2nd edition, p448).
++ *
++ * Jeremy Fitzhardinge <jeremy@zip.com.au> 1998
++ *
++ * Jeremy has agreed to the contents of reiserfs/README. -Hans
++ */
++
++#include <assert.h>
++
++#if 0
++/* OK for Intel */
++typedef unsigned long u32;
++typedef const unsigned char u8;
++#else
++#include <inttypes.h>
++typedef uint32_t u32;
++typedef uint8_t u8;
++#endif
++
++
++#define DELTA 0x9E3779B9
++#define FULLROUNDS 10 /* 32 is overkill, 16 is strong crypto */
++#define PARTROUNDS 6 /* 6 gets complete mixing */
++
++/* a, b, c, d - data; h0, h1 - accumulated hash */
++#define TEACORE(rounds) \
++ do { \
++ u32 sum = 0; \
++ int n = rounds; \
++ u32 b0, b1; \
++ \
++ b0 = h0; \
++ b1 = h1; \
++ \
++ do \
++ { \
++ sum += DELTA; \
++ b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b); \
++ b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d); \
++ } while(--n); \
++ \
++ h0 += b0; \
++ h1 += b1; \
++ } while(0)
++
++u32 teahash3(/*u32 k[2], *//*u8*/const char *msg, int len)
++{
++ u32 k[] = { 0x9464a485, 0x542e1a94, 0x3e846bff, 0xb75bcfc3};
++
++ u32 h0 = k[0], h1 = k[1];
++ u32 a, b, c, d;
++ u32 pad;
++ int i;
++
++ assert(len >= 0 && len < 256);
++
++ pad = (u32)len | ((u32)len << 8);
++ pad |= pad << 16;
++
++ while(len >= 16)
++ {
++ a = (u32)msg[ 0] |
++ (u32)msg[ 1] << 8 |
++ (u32)msg[ 2] << 16|
++ (u32)msg[ 3] << 24;
++ b = (u32)msg[ 4] |
++ (u32)msg[ 5] << 8 |
++ (u32)msg[ 6] << 16|
++ (u32)msg[ 7] << 24;
++ c = (u32)msg[ 8] |
++ (u32)msg[ 9] << 8 |
++ (u32)msg[10] << 16|
++ (u32)msg[11] << 24;
++ d = (u32)msg[12] |
++ (u32)msg[13] << 8 |
++ (u32)msg[14] << 16|
++ (u32)msg[15] << 24;
++
++ TEACORE(PARTROUNDS);
++
++ len -= 16;
++ msg += 16;
++ }
++
++ if (len >= 12)
++ {
++ assert(len < 16);
++
++ a = (u32)msg[ 0] |
++ (u32)msg[ 1] << 8 |
++ (u32)msg[ 2] << 16|
++ (u32)msg[ 3] << 24;
++ b = (u32)msg[ 4] |
++ (u32)msg[ 5] << 8 |
++ (u32)msg[ 6] << 16|
++ (u32)msg[ 7] << 24;
++ c = (u32)msg[ 8] |
++ (u32)msg[ 9] << 8 |
++ (u32)msg[10] << 16|
++ (u32)msg[11] << 24;
++
++ d = pad;
++ for(i = 12; i < len; i++)
++ {
++ d <<= 8;
++ d |= msg[i];
++ }
++ }
++ else if (len >= 8)
++ {
++ assert(len < 12);
++
++ a = (u32)msg[ 0] |
++ (u32)msg[ 1] << 8 |
++ (u32)msg[ 2] << 16|
++ (u32)msg[ 3] << 24;
++ b = (u32)msg[ 4] |
++ (u32)msg[ 5] << 8 |
++ (u32)msg[ 6] << 16|
++ (u32)msg[ 7] << 24;
++
++ c = d = pad;
++ for(i = 8; i < len; i++)
++ {
++ c <<= 8;
++ c |= msg[i];
++ }
++ }
++ else if (len >= 4)
++ {
++ assert(len < 8);
++
++ a = (u32)msg[ 0] |
++ (u32)msg[ 1] << 8 |
++ (u32)msg[ 2] << 16|
++ (u32)msg[ 3] << 24;
++
++ b = c = d = pad;
++ for(i = 4; i < len; i++)
++ {
++ b <<= 8;
++ b |= msg[i];
++ }
++ }
++ else
++ {
++ assert(len < 4);
++
++ a = b = c = d = pad;
++ for(i = 0; i < len; i++)
++ {
++ a <<= 8;
++ a |= msg[i];
++ }
++ }
++
++ TEACORE(FULLROUNDS);
++
++/* return 0;*/
++ return h0^h1;
++}
+--- nfs-server/ugid_map.c
++++ nfs-server/ugid_map.c 2002/11/08 13:59:16
+@@ -276,8 +276,10 @@
+ if ((gid == 0 && mountp->o.root_squash) || mountp->o.all_squash)
+ retgid = mountp->o.nobody_gid;
+
++#if 0
+ Dprintf(D_UGID, "lgid(%s, %d) = %d\n",
+ inet_ntoa(mountp->client->clnt_addr), gid, retgid);
++#endif
+ return retgid;
+ }
+
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 0000000..89baabe
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/007-map.patch
@@ -0,0 +1,78 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/auth.c
++++ nfs-server/auth.c 2002/11/08 12:49:13
+@@ -595,7 +595,6 @@
+ cp->clnt_addr.s_addr = INADDR_ANY;
+ cp->flags = 0;
+ cp->m = NULL;
+- cp->umap = NULL;
+
+ if (hname == NULL) {
+ if (anonymous_client != NULL) {
+@@ -1200,10 +1199,9 @@
+ free (mp->path);
+ if (mp->o.clnt_nisdomain)
+ free(mp->o.clnt_nisdomain);
++ if (mp->umap)
++ ugid_free_map(mp->umap);
+ free (mp);
+- }
+- if (cp->umap != NULL) {
+- ugid_free_map(cp->umap);
+ }
+ free (cp);
+ }
+--- nfs-server/auth.h
++++ nfs-server/auth.h 2002/11/08 12:50:24
+@@ -66,6 +66,11 @@
+ char * path;
+ nfs_options o;
+ dev_t mount_dev;
++ /*
++ * This is the uid/gid map.
++ * See ugid_map.c for details
++ */
++ struct ugid_map * umap;
+ /* Original NFS client */
+ struct nfs_client * origin;
+ } nfs_mount;
+@@ -77,12 +82,6 @@
+ char * clnt_name;
+ unsigned short flags;
+ nfs_mount * m;
+-
+- /*
+- * This is the uid/gid map.
+- * See ugid_map.c for details
+- */
+- struct ugid_map * umap;
+ } nfs_client;
+
+ #define AUTH_CLNT_WILDCARD 0x0001
+--- nfs-server/ugid_map.c
++++ nfs-server/ugid_map.c 2002/11/08 12:49:14
+@@ -401,12 +401,11 @@
+ static ugid_map *
+ ugid_get_map(nfs_mount *mountp)
+ {
+- nfs_client *clientp = mountp->client;
+ struct ugid_map *umap;
+ unsigned int how;
+
+- if (clientp->umap == NULL) {
+- clientp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
++ if (mountp->umap == NULL) {
++ mountp->umap = umap = (ugid_map *) xmalloc(sizeof(ugid_map));
+ memset(umap, 0, sizeof(ugid_map));
+
+ for (how = 0; how < 4; how++) {
+@@ -415,7 +414,7 @@
+ }
+ }
+
+- return clientp->umap;
++ return mountp->umap;
+ }
+
+ 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 0000000..a6d4599
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/008-configure.patch
@@ -0,0 +1,13 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/configure.in 2002/11/08 14:24:55 1.1
++++ nfs-server/configure.in 2002/11/08 14:25:27
+@@ -98,7 +98,7 @@
+ fi
+ if test "$enable_ugid_dynamic" = yes; then
+ AC_DEFINE(ENABLE_UGID_DAEMON)
+- UGIDD_PROG=\${rpcprefix}.ugidd
++ UGIDD_PROG=\${rpcprefix}ugidd
+ UGIDD_MAN=ugidd
+ fi
+ 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 0000000..65b0b9e
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/009-multirw.patch
@@ -0,0 +1,15 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/nfsd.c
++++ nfs-server/nfsd.c
+@@ -1133,8 +1133,8 @@
+ }
+ }
+
+- if (ncopies > 1)
+- read_only = 1;
++ /* if (ncopies > 1)
++ read_only = 1; */
+
+ /*
+ * 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 0000000..c3b5d58
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/010-realpath.patch
@@ -0,0 +1,30 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/configure.in
++++ nfs-server/configure.in
+@@ -81,7 +81,7 @@
+ AC_CHECK_LIB(rpc, main)
+ AC_CHECK_LIB(crypt, main)
+ AC_CHECK_LIB(nys, main)
+-AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred)
++AC_HAVE_FUNCS(getcwd seteuid setreuid getdtablesize setgroups lchown setsid setfsuid setfsgid innetgr quotactl authdes_getucred realpath)
+ AC_AUTHDES_GETUCRED
+ AC_BROKEN_SETFSUID
+ AC_MOUNTLIST
+--- nfs-server/realpath.c
++++ nfs-server/realpath.c
+@@ -53,6 +53,8 @@
+
+ #define MAX_READLINKS 32
+
++#ifndef HAVE_REALPATH
++
+ #ifdef __STDC__
+ char *realpath(const char *path, char resolved_path [])
+ #else
+@@ -173,3 +175,5 @@
+ strcpy (resolved_path, got_path);
+ return resolved_path;
+ }
++
++#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 0000000..695b8c7
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/011-fno-strict-aliasing.patch
@@ -0,0 +1,13 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/Makefile.in
++++ nfs-server/Makefile.in
+@@ -225,7 +225,7 @@
+ $(RPCGEN) -l -o $@ $?
+
+ nfs_prot_xdr.o: nfs_prot_xdr.c
+- $(COMPILE) $(RPC_WARNFLAGS) -c nfs_prot_xdr.c
++ $(COMPILE) $(RPC_WARNFLAGS) -fno-strict-aliasing -c nfs_prot_xdr.c
+ mount_xdr.o: mount_xdr.c
+ $(COMPILE) $(RPC_WARNFLAGS) -c mount_xdr.c
+ 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 0000000..a815ee4
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/012-nostrip.patch
@@ -0,0 +1,13 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/Makefile.in.xx 2006-01-12 12:43:09.000000000 +0100
++++ nfs-server/Makefile.in 2006-01-12 12:43:10.000000000 +0100
+@@ -64,7 +64,7 @@
+ NFSD_DEFS =
+
+ CFLAGS = @CFLAGS@
+-LDFLAGS = @LDFLAGS@ -s
++LDFLAGS = @LDFLAGS@
+ WARNFLAGS = @WARNFLAGS@
+ RPC_WARNFLAGS = @RPC_WARNFLAGS@
+ 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 0000000..1f10d3c
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/013-mntpathlen.patch
@@ -0,0 +1,32 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/mountd.c 2006/01/12 14:00:13 1.13
++++ nfs-server/mountd.c 2006/01/12 14:37:35
+@@ -76,7 +76,7 @@
+ 0
+ };
+
+-char argbuf[MNTPATHLEN + 1];
++char argbuf[PATH_MAX + 1];
+ char *auth_file = NULL;
+ static char *program_name;
+ int need_reinit = 0;
+@@ -97,6 +97,9 @@
+ /*
+ * MOUNT
+ * This is what the whole protocol is all about
++ *
++ * Note: librpc gets us MNTPATHLEN length strings, but realpath
++ * needs a PATH_MAX length output buffer.
+ */
+ fhstatus *
+ mountproc_mnt_1_svc(dirpath *argp, struct svc_req *rqstp)
+@@ -105,7 +108,7 @@
+ struct stat stbuf;
+ nfs_client *cp;
+ nfs_mount *mp;
+- char nargbuf[MNTPATHLEN + 1];
++ char nargbuf[PATH_MAX + 1];
+ int saved_errno = 0;
+ #ifdef WANT_LOG_MOUNTS
+ 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 0000000..233c08a
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/014-uninitialized.patch
@@ -0,0 +1,12 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/mountd.c
++++ nfs-server/mountd.c
+@@ -278,6 +278,7 @@
+ || (mp = auth_path(cp, rqstp, dir)) == NULL
+ || mp->o.noaccess) {
+ #ifdef WANT_LOG_MOUNTS
++ addr = svc_getcaller(rqstp->rq_xprt)->sin_addr;
+ Dprintf(L_WARNING, "Blocked attempt of %s to pathconf(%s)\n",
+ inet_ntoa(addr), dir);
+ #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 0000000..cbfb8e8
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/015-setattr.patch
@@ -0,0 +1,26 @@
+# Patch origin: nfs-server source RPM from openSUSE 10.3
+
+--- nfs-server/setattr.c.orig 2006-07-28 16:38:26.000000000 +0200
++++ nfs-server/setattr.c 2006-07-28 16:42:28.000000000 +0200
+@@ -97,7 +97,20 @@
+ tvp[1].tv_sec = s->st_mtime;
+ tvp[1].tv_usec = 0;
+ }
+- if (efs_utimes(path, tvp) < 0)
++ if (m_secs != IGNORE_TIME && attr->mtime.useconds == 1000000) {
++ /*
++ * from kernel/fs/nfsd/nfsxdr.c:
++ * Passing the invalid value useconds=1000000 for mtime
++ * is a Sun convention for "set both mtime and atime to
++ * current server time". It's needed to make permissions
++ * checks for the "touch" program across v2 mounts to
++ * Solaris and Irix boxes work correctly. See description of
++ * sattr in section 6.1 of "NFS Illustrated" by
++ * Brent Callaghan, Addison-Wesley, ISBN 0-201-32750-5
++ */
++ if (utime(path, (struct utimbuf *)0) < 0)
++ goto failure;
++ } else if (efs_utimes(path, tvp) < 0)
+ goto failure;
+ }
+ }
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 0000000..634ce46
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/016-makefile.in.patch
@@ -0,0 +1,14 @@
+# Makefile fix for staging to work correctly.
+# Scott Garman <scott.a.garman@intel.com>
+
+--- nfs-server-2.2beta47/Makefile.in.orig 2010-08-03 20:55:05.000000000 -0700
++++ nfs-server-2.2beta47/Makefile.in 2010-08-03 20:55:42.000000000 -0700
+@@ -69,7 +69,7 @@
+ RPC_WARNFLAGS = @RPC_WARNFLAGS@
+ TRANSPORTFLAGS = @RPCGEN_I@ -s udp -s tcp
+
+-prefix = $(install_prefix)/usr
++prefix = @prefix@
+ exec_prefix = $(prefix)
+
+ 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 0000000..18e12de
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/017-wrs-dynamic-rpc.patch
@@ -0,0 +1,258 @@
+# Add the ability to choose alternate RPC ports at runtime and disable
+# security so that it can run as a userland process
+# Patch origin: Wind River
+
+Index: nfs-server-2.2beta47/auth_init.c
+===================================================================
+--- nfs-server-2.2beta47.orig/auth_init.c
++++ nfs-server-2.2beta47/auth_init.c
+@@ -409,6 +409,7 @@ auth_init(char *fname)
+ fname = EXPORTSFILE;
+ auth_file = fname; /* Save for re-initialization */
+
++#ifdef ROOT_LEVEL_SECURITY
+ /* Check protection of exports file. */
+ switch(iCheckAccess(auth_file, EXPORTSOWNERUID, EXPORTSOWNERGID)) {
+ case FACCESSWRITABLE:
+@@ -424,6 +425,7 @@ auth_init(char *fname)
+ Dprintf(L_ERROR, "exiting because of security violation.\n");
+ exit(1);
+ }
++#endif
+
+ if ((ef = fopen(fname, "r")) == NULL) {
+ Dprintf(L_ERROR, "Could not open exports file %s: %s\n",
+Index: nfs-server-2.2beta47/nfsd.c
+===================================================================
+--- nfs-server-2.2beta47.orig/nfsd.c
++++ nfs-server-2.2beta47/nfsd.c
+@@ -46,6 +46,7 @@ static char pathbuf_1[NFS_MAXPATHLEN + N
+
+ extern char version[];
+ static char *program_name;
++static int nfs_prog = NFS_PROGRAM;
+
+ /*
+ * Option table
+@@ -60,6 +61,7 @@ static struct option longopts[] = {
+ { "help", 0, 0, 'h' },
+ { "log-transfers", 0, 0, 'l' },
+ { "allow-non-root", 0, 0, 'n' },
++ { "prog", required_argument, 0, 'g' },
+ { "port", required_argument, 0, 'P' },
+ { "promiscuous", 0, 0, 'p' },
+ { "re-export", 0, 0, 'r' },
+@@ -73,9 +75,10 @@ static struct option longopts[] = {
+ { "udp-only", 0, 0, OPT_NOTCP },
+ { "loopback-only", 0, 0, OPT_LOOPBACK },
+ { "hashed-inodes", 0, 0, 'I' },
++ { "nfs-pid", required_argument, 0, 'N' },
+ { NULL, 0, 0, 0 }
+ };
+-static const char * shortopts = "a:d:Ff:hlnP:prR:tvz::";
++static const char * shortopts = "a:d:Ff:g:hlnN:P:prR:tvz::";
+
+ /*
+ * Table of supported versions
+@@ -1003,6 +1006,8 @@ main(int argc, char **argv)
+ int failsafe_level = 0;
+ int c;
+ int i, ncopies = 1;
++ char *nfs_pid_file = NULL;
++
+
+ program_name = argv[0];
+ chdir("/");
+@@ -1026,9 +1031,15 @@ main(int argc, char **argv)
+ case 'f':
+ auth_file = optarg;
+ break;
++ case 'g':
++ nfs_prog = atoi(optarg);
++ break;
+ case 'l':
+ log_transfers = 1;
+ break;
++ case 'N':
++ nfs_pid_file = strdup(optarg);
++ break;
+ case 'n':
+ allow_non_root = 1;
+ break;
+@@ -1114,7 +1125,7 @@ main(int argc, char **argv)
+ log_open("nfsd", foreground);
+
+ /* Initialize RPC stuff */
+- rpc_init("nfsd", NFS_PROGRAM, nfsd_versions, nfs_dispatch,
++ rpc_init("nfsd", nfs_prog, nfsd_versions, nfs_dispatch,
+ nfsport, NFS_MAXDATA);
+
+ if (_rpcpmstart) {
+@@ -1145,7 +1156,10 @@ main(int argc, char **argv)
+ /* Initialize the AUTH module. */
+ auth_init(auth_file);
+
+- setpidpath(_PATH_NFSD_PIDFILE);
++ if (nfs_pid_file == 0)
++ nfs_pid_file = _PATH_NFSD_PIDFILE;
++ setpidpath(nfs_pid_file);
++
+ if (failsafe_level == 0) {
+ /* Start multiple copies of the server */
+ writepid(getpid(), 1);
+@@ -1215,9 +1229,11 @@ usage(FILE *fp, int n)
+ fprintf(fp,
+ "Usage: %s [-Fhnpv] [-d kind] [-f exports-file] [-P port] [--version]\n"
+ " [--debug kind] [--exports-file=file] [--port port]\n"
++" [--prog alternate_rpc_port_nubmer]\n"
+ " [--allow-non-root] [--promiscuous] [--version] [--foreground]\n"
+ " [--re-export] [--log-transfers] [--public-root path]\n"
+ " [--no-spoof-trace] [--no-cross-mounts] [--hashed-inodes] [--help]\n"
++" [--nfs-pid file]\n"
+ , program_name);
+ exit(n);
+ }
+@@ -1234,7 +1250,7 @@ sigterm(int sig)
+ static void
+ terminate(void)
+ {
+- rpc_exit(NFS_PROGRAM, nfsd_versions);
++ rpc_exit(nfs_prog, nfsd_versions);
+ efs_shutdown();
+ }
+
+Index: nfs-server-2.2beta47/mountd.c
+===================================================================
+--- nfs-server-2.2beta47.orig/mountd.c
++++ nfs-server-2.2beta47/mountd.c
+@@ -42,6 +42,7 @@ int hashed_inodes; /* dummy */
+ static void usage(FILE *, int);
+ static void terminate(void);
+ static RETSIGTYPE sigterm(int sig);
++int mount_prog = MOUNTPROG;
+
+ /*
+ * Option table for mountd
+@@ -55,6 +56,7 @@ static struct option longopts[] =
+ { "help", 0, 0, 'h' },
+ { "allow-non-root", 0, 0, 'n' },
+ { "port", required_argument, 0, 'P' },
++ { "prog", required_argument, 0, 'g' },
+ { "promiscous", 0, 0, 'p' },
+ { "re-export", 0, 0, 'r' },
+ { "no-spoof-trace", 0, 0, 't' },
+@@ -63,9 +65,11 @@ static struct option longopts[] =
+ { "no-cross-mounts", 0, 0, 'x' },
+ { "no-tcp", 0, 0, OPT_NOTCP },
+ { "loopback-only", 0, 0, OPT_LOOPBACK },
++ { "mount-pid", required_argument, 0, 'N' },
++ { "rmtab", required_argument, 0, 'R' },
+ { NULL, 0, 0, 0 }
+ };
+-static const char * shortopts = "Fd:f:hnpP:rtvz::";
++static const char * shortopts = "Fd:f:g:hnN:pP:rRtvz::";
+
+ /*
+ * Table of supported versions
+@@ -318,6 +322,7 @@ main(int argc, char **argv)
+ int failsafe_level = 0;
+ int port = 0;
+ int c;
++ char *mount_pid_file = NULL;
+
+ program_name = argv[0];
+
+@@ -340,9 +345,15 @@ main(int argc, char **argv)
+ case 'f':
+ auth_file = optarg;
+ break;
++ case 'g':
++ mount_prog = port = atoi(optarg);
++ break;
+ case 'n':
+ allow_non_root = 1;
+ break;
++ case 'N':
++ mount_pid_file = strdup(optarg);
++ break;
+ case 'P':
+ port = atoi(optarg);
+ if (port <= 0 || port > 65535) {
+@@ -354,6 +365,9 @@ main(int argc, char **argv)
+ case 'p':
+ promiscuous = 1;
+ break;
++ case 'R':
++ _PATH_RMTAB = strdup(optarg);
++ break;
+ case 'r':
+ re_export = 1;
+ break;
+@@ -401,7 +415,7 @@ main(int argc, char **argv)
+ log_open("mountd", foreground);
+
+ /* Create services and register with portmapper */
+- rpc_init("mountd", MOUNTPROG, mountd_versions, mount_dispatch, port, 0);
++ rpc_init("mountd", mount_prog, mountd_versions, mount_dispatch, port, 0);
+
+ if (_rpcpmstart) {
+ /* Always foreground mode */
+@@ -422,7 +436,9 @@ main(int argc, char **argv)
+ auth_init(auth_file);
+
+ /* Write pidfile */
+- setpidpath(_PATH_MOUNTD_PIDFILE);
++ if (mount_pid_file == 0)
++ mount_pid_file = _PATH_MOUNTD_PIDFILE;
++ setpidpath(mount_pid_file);
+ writepid(getpid(), 1);
+
+ /* Failsafe mode */
+@@ -453,7 +469,9 @@ usage(FILE *fp, int n)
+ program_name);
+ fprintf(fp, " [--debug kind] [--help] [--allow-non-root]\n");
+ fprintf(fp, " [--promiscuous] [--version] [--port portnum]\n");
++ fprintf(fp, " [--prog alternate_rpc_port_nubmer]\n");
+ fprintf(fp, " [--exports-file=file] [--no-cross-mounts]\n");
++ fprintf(fp, " [--mount-pid file] [--rmtab file]\n");
+ exit(n);
+ }
+
+@@ -467,7 +485,7 @@ sigterm(int sig)
+ static void
+ terminate(void)
+ {
+- rpc_exit(MOUNTPROG, mountd_versions);
++ rpc_exit(mount_prog, mountd_versions);
+ }
+
+ RETSIGTYPE
+Index: nfs-server-2.2beta47/rmtab.c
+===================================================================
+--- nfs-server-2.2beta47.orig/rmtab.c
++++ nfs-server-2.2beta47/rmtab.c
+@@ -14,6 +14,8 @@ static char * rmtab_gethost(struct svc_r
+ static int rmtab_insert(char *, char *);
+ static void rmtab_file(char);
+
++char *_PATH_RMTAB = _PATH_RMTAB_VAL;
++
+ /*
+ * global top to linklist
+ */
+Index: nfs-server-2.2beta47/rmtab.h
+===================================================================
+--- nfs-server-2.2beta47.orig/rmtab.h
++++ nfs-server-2.2beta47/rmtab.h
+@@ -11,8 +11,9 @@
+ * Location of rmtab file. /etc/rmtab is the standard on most systems.
+ */
+ #include <paths.h>
+-#ifndef _PATH_RMTAB
+-#define _PATH_RMTAB "/etc/rmtab"
++extern char *_PATH_RMTAB;
++#ifndef _PATH_RMTAB_VAL
++#define _PATH_RMTAB_VAL "/etc/rmtab"
+ #endif
+
+ 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 0000000..95ecdee
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/018-remove-tcp-wrappers.patch
@@ -0,0 +1,20 @@
+# Remove the requirement to link with libwrap
+# Patch origin: Wind River
+
+Index: nfs-server-2.2beta47/haccess.c
+===================================================================
+--- nfs-server-2.2beta47.orig/haccess.c 1999-04-08 08:47:19.000000000 -0400
++++ nfs-server-2.2beta47/haccess.c 2006-08-07 17:05:31.868221639 -0400
+@@ -79,8 +79,12 @@
+ clients[hash] = hp;
+
+ hp->clnt_addr = addr;
++#ifdef USE_TCP_WRAPPERS
+ hp->status = hosts_ctl(rpcprog, "unknown",
+ inet_ntoa(addr), "root");
++#else
++ hp->status = 1;
++#endif
+ nrhosts++;
+ }
+
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 0000000..960ca8e
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/019-pid-before-fork.patch
@@ -0,0 +1,125 @@
+# Write a pid file before forking
+# Patch origin: Wind River
+
+Index: nfs-server-2.2beta47/daemon.c
+===================================================================
+--- nfs-server-2.2beta47.orig/daemon.c
++++ nfs-server-2.2beta47/daemon.c
+@@ -15,6 +15,19 @@
+ static const char * pidfilename = 0;
+ static const char * get_signame(int signo);
+
++void
++writepid(pid_t pid, int clear)
++{
++ FILE *fp;
++
++ fp = fopen(pidfilename, clear? "w" : "a");
++ if (fp == NULL)
++ Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
++ fprintf(fp, "%d\n", pid);
++ fclose(fp);
++ return;
++}
++
+ /*
+ * Do the Crawley Thing
+ */
+@@ -33,8 +46,10 @@ daemonize(void)
+ Dprintf(L_FATAL, "unable to fork: %s", strerror(errno));
+
+ /* Parent process: exit */
+- if (c > 0)
++ if (c > 0) {
++ writepid(c, 1);
+ exit(0);
++ }
+
+ /* Do the session stuff */
+ close(0);
+@@ -60,19 +75,6 @@ setpidpath(const char *filename)
+ }
+
+ void
+-writepid(pid_t pid, int clear)
+-{
+- FILE *fp;
+-
+- fp = fopen(pidfilename, clear? "w" : "a");
+- if (fp == NULL)
+- Dprintf(L_FATAL, "Unable to open %s: %m", pidfilename);
+- fprintf(fp, "%d\n", pid);
+- fclose(fp);
+- return;
+-}
+-
+-void
+ failsafe(int level, int ncopies)
+ {
+ int *servers, running, child, i;
+Index: nfs-server-2.2beta47/mountd.c
+===================================================================
+--- nfs-server-2.2beta47.orig/mountd.c
++++ nfs-server-2.2beta47/mountd.c
+@@ -425,9 +425,6 @@ main(int argc, char **argv)
+ background_logging();
+ }
+
+- /* Become a daemon */
+- if (!foreground)
+- daemonize();
+
+ /* Initialize the FH module. */
+ fh_init();
+@@ -435,11 +432,15 @@ main(int argc, char **argv)
+ /* Initialize the AUTH module. */
+ auth_init(auth_file);
+
+- /* Write pidfile */
+ if (mount_pid_file == 0)
+ mount_pid_file = _PATH_MOUNTD_PIDFILE;
+ setpidpath(mount_pid_file);
+- writepid(getpid(), 1);
++
++ /* Become a daemon */
++ if (!foreground)
++ daemonize();
++ else
++ writepid(getpid(), 1);
+
+ /* Failsafe mode */
+ if (failsafe_level)
+Index: nfs-server-2.2beta47/nfsd.c
+===================================================================
+--- nfs-server-2.2beta47.orig/nfsd.c
++++ nfs-server-2.2beta47/nfsd.c
+@@ -1147,11 +1147,6 @@ main(int argc, char **argv)
+ /* if (ncopies > 1)
+ read_only = 1; */
+
+- /*
+- * We first fork off a child and detach from tty
+- */
+- if (!foreground)
+- daemonize();
+
+ /* Initialize the AUTH module. */
+ auth_init(auth_file);
+@@ -1160,9 +1155,16 @@ main(int argc, char **argv)
+ nfs_pid_file = _PATH_NFSD_PIDFILE;
+ setpidpath(nfs_pid_file);
+
++ /*
++ * We first fork off a child and detach from tty
++ */
++ if (!foreground)
++ daemonize();
++ else
++ writepid(getpid(), 1);
++
+ if (failsafe_level == 0) {
+ /* Start multiple copies of the server */
+- writepid(getpid(), 1);
+ for (i = 1; i < ncopies; i++) {
+ pid_t pid;
+
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 0000000..0f1108c
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/020-undefined-chmod-fix.patch
@@ -0,0 +1,18 @@
+# Fix a problem with chmod attributes when using no_squash_all
+# Patch origin: Wind River
+
+---
+ setattr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/setattr.c
++++ b/setattr.c
+@@ -115,7 +115,7 @@ nfsstat setattr(char *path, sattr *attr,
+ }
+ }
+
+- if (flags & SATTR_CHMOD) {
++ if (flags & SATTR_CHMOD && attr->mode != -1) {
+ unsigned int mode = attr->mode;
+
+ /* 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 0000000..c0901fa
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/021-nolibwrap.patch
@@ -0,0 +1,20 @@
+# Remove libwrap linkage
+# Patch origin: Wind River
+
+---
+ configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/configure.in
++++ b/configure.in
+@@ -86,8 +86,8 @@ AC_AUTHDES_GETUCRED
+ AC_BROKEN_SETFSUID
+ AC_MOUNTLIST
+ AC_FSUSAGE
+-AC_CHECK_LIB(wrap, main)
+-AC_LIBWRAP_BUG
++dnl AC_CHECK_LIB(wrap, main)
++dnl AC_LIBWRAP_BUG
+ AC_BSD_SIGNALS
+
+ 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 0000000..011ae74
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/022-add-close-on-exec-descriptors.patch
@@ -0,0 +1,61 @@
+# Force socket fds to close on exec when used in conjunction with pseudo
+# Patch origin: Wind River
+
+---
+ nfsd.c | 8 ++++++++
+ rpcmisc.c | 9 +++++++++
+ ugidd.c | 8 ++++++++
+ 3 files changed, 25 insertions(+)
+
+--- a/nfsd.c
++++ b/nfsd.c
+@@ -630,6 +630,14 @@ nfsd_nfsproc_create_2(createargs *argp,
+ if (S_ISSOCK(argp->attributes.mode)) {
+ if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+ return(nfs_errno());
++ /* if there is a pseudo exec mark the socket to be
++ * closed automatically
++ */
++ {
++ long f_flags;
++ f_flags = fcntl(s, F_GETFD);
++ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
++ }
+ sa.sun_family = AF_UNIX;
+ strncpy(sa.sun_path, pathbuf, sizeof(sa.sun_path));
+ sa.sun_path[sizeof(sa.sun_path)-1] = '\0';
+--- a/rpcmisc.c
++++ b/rpcmisc.c
+@@ -197,6 +197,15 @@ makesock(int port, int proto, int socksz
+ Dprintf(L_FATAL, "Could not make a %s socket: %s\n",
+ prot_name, strerror(errno));
+
++ /* if there is a pseudo exec mark the socket to be
++ * closed automatically
++ */
++ {
++ long f_flags;
++ f_flags = fcntl(s, F_GETFD);
++ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
++ }
++ fcntl(s, FD_CLOEXEC, 1);
+ memset((char *) &sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = INADDR_ANY;
+--- a/ugidd.c
++++ b/ugidd.c
+@@ -195,6 +195,14 @@ authenticate_1_svc(argp, rqstp)
+ destaddr.sin_port = htons(*argp);
+ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ goto bad;
++ /* if there is a pseudo exec mark the socket to be
++ * closed automatically
++ */
++ {
++ long f_flags;
++ f_flags = fcntl(s, F_GETFD);
++ f_flags = fcntl(s, F_SETFD, f_flags | FD_CLOEXEC);
++ }
+ setsockopt(s, SOL_SOCKET, SO_LINGER, 0, 0);
+ bzero((char *) &sendaddr, sizeof sendaddr);
+ /* 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 0000000..ecba452
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server_2.2beta47.bb
@@ -0,0 +1,71 @@
+DESCRIPTION = "Userspace NFS server"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+PR = "r0"
+
+SRC_URI = "ftp://linux.mathematik.tu-darmstadt.de/pub/linux/oldstuff/people/okir/nfs-server-${PV}.tar.gz \
+ file://001-2.2b47-2.2b51.patch \
+ file://002-destdir.patch \
+ file://003-manpages.patch \
+ file://004-strsignal.patch \
+ file://005-sys-time.patch \
+ file://006-reiserfs.patch \
+ file://007-map.patch \
+ file://008-configure.patch \
+ file://009-multirw.patch \
+ file://010-realpath.patch \
+ file://011-fno-strict-aliasing.patch \
+ file://012-nostrip.patch \
+ file://013-mntpathlen.patch \
+ file://014-uninitialized.patch \
+ file://015-setattr.patch \
+ file://016-makefile.in.patch \
+ file://017-wrs-dynamic-rpc.patch \
+ file://018-remove-tcp-wrappers.patch \
+ file://019-pid-before-fork.patch \
+ file://020-undefined-chmod-fix.patch \
+ file://021-nolibwrap.patch \
+ file://022-add-close-on-exec-descriptors.patch \
+ "
+
+SRC_URI[md5sum] = "79a29fe9f79b2f3241d4915767b8c511"
+SRC_URI[sha256sum] = "7eeaf3cf0b9d96167a5ba03bf1046e39b4585de1339a55b285e673c06ba415cb"
+
+S = "${WORKDIR}/nfs-server-${PV}/"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
+
+CFLAGS = "-fPIE -fstack-protector-all"
+LDFLAGS = "-pie"
+
+EXTRA_OECONF = "--enable-ugid-dynamic \
+ --enable-ugid-nis \
+ --enable-host-access \
+ --with-exports-uid=0 \
+ --with-exports-gid=0 \
+ --enable-mount-logging \
+ --with-devtab=${DESTDIR}${base_prefix}/var/lib/nfs/devtab \
+ "
+
+do_configure_prepend () {
+ # Remove pregenerated xdr functions. They use long
+ # instead of u32, which produces incorrect code on
+ # 64-bit architectures:
+ rm -f *_xdr.c
+
+ mv aclocal.m4 acinclude.m4
+}
+
+# This recipe is intended for -native and -nativesdk builds only,
+# not target installs:
+python __anonymous () {
+ import re
+
+ pn = bb.data.getVar("PN", d, 1)
+ if not pn.endswith('-native') and not pn.endswith('-nativesdk'):
+ raise bb.parse.SkipPackage("unfs-server is intended for native/nativesdk builds only")
+}
diff --git a/meta/recipes-devtools/unifdef/files/unifdef.c b/meta/recipes-devtools/unifdef/files/unifdef.c
new file mode 100644
index 0000000..5cbac15
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/files/unifdef.c
@@ -0,0 +1,1005 @@
+/*
+ * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by Dave Yost.
+ * It was rewritten to support ANSI C by Tony Finch. The original version of
+ * unifdef carried the following copyright notice. None of its code remains
+ * in this version (though some of the names remain).
+ *
+ * Copyright (c) 1985, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+
+#ifndef lint
+#if 0
+static const char copyright[] =
+"@(#) Copyright (c) 1985, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif
+#ifdef __IDSTRING
+__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
+__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
+#endif
+#endif /* not lint */
+#ifdef __FBSDID
+__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
+#endif
+
+/*
+ * unifdef - remove ifdef'ed lines
+ *
+ * Wishlist:
+ * provide an option which will append the name of the
+ * appropriate symbol after #else's and #endif's
+ * provide an option which will check symbols after
+ * #else's and #endif's to see that they match their
+ * corresponding #ifdef or #ifndef
+ *
+ * The first two items above require better buffer handling, which would
+ * also make it possible to handle all "dodgy" directives correctly.
+ */
+
+#include <ctype.h>
+#include <err.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+size_t strlcpy(char *dst, const char *src, size_t siz);
+
+/* types of input lines: */
+typedef enum {
+ LT_TRUEI, /* a true #if with ignore flag */
+ LT_FALSEI, /* a false #if with ignore flag */
+ LT_IF, /* an unknown #if */
+ LT_TRUE, /* a true #if */
+ LT_FALSE, /* a false #if */
+ LT_ELIF, /* an unknown #elif */
+ LT_ELTRUE, /* a true #elif */
+ LT_ELFALSE, /* a false #elif */
+ LT_ELSE, /* #else */
+ LT_ENDIF, /* #endif */
+ LT_DODGY, /* flag: directive is not on one line */
+ LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
+ LT_PLAIN, /* ordinary line */
+ LT_EOF, /* end of file */
+ LT_COUNT
+} Linetype;
+
+static char const * const linetype_name[] = {
+ "TRUEI", "FALSEI", "IF", "TRUE", "FALSE",
+ "ELIF", "ELTRUE", "ELFALSE", "ELSE", "ENDIF",
+ "DODGY TRUEI", "DODGY FALSEI",
+ "DODGY IF", "DODGY TRUE", "DODGY FALSE",
+ "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
+ "DODGY ELSE", "DODGY ENDIF",
+ "PLAIN", "EOF"
+};
+
+/* state of #if processing */
+typedef enum {
+ IS_OUTSIDE,
+ IS_FALSE_PREFIX, /* false #if followed by false #elifs */
+ IS_TRUE_PREFIX, /* first non-false #(el)if is true */
+ IS_PASS_MIDDLE, /* first non-false #(el)if is unknown */
+ IS_FALSE_MIDDLE, /* a false #elif after a pass state */
+ IS_TRUE_MIDDLE, /* a true #elif after a pass state */
+ IS_PASS_ELSE, /* an else after a pass state */
+ IS_FALSE_ELSE, /* an else after a true state */
+ IS_TRUE_ELSE, /* an else after only false states */
+ IS_FALSE_TRAILER, /* #elifs after a true are false */
+ IS_COUNT
+} Ifstate;
+
+static char const * const ifstate_name[] = {
+ "OUTSIDE", "FALSE_PREFIX", "TRUE_PREFIX",
+ "PASS_MIDDLE", "FALSE_MIDDLE", "TRUE_MIDDLE",
+ "PASS_ELSE", "FALSE_ELSE", "TRUE_ELSE",
+ "FALSE_TRAILER"
+};
+
+/* state of comment parser */
+typedef enum {
+ NO_COMMENT = false, /* outside a comment */
+ C_COMMENT, /* in a comment like this one */
+ CXX_COMMENT, /* between // and end of line */
+ STARTING_COMMENT, /* just after slash-backslash-newline */
+ FINISHING_COMMENT, /* star-backslash-newline in a C comment */
+ CHAR_LITERAL, /* inside '' */
+ STRING_LITERAL /* inside "" */
+} Comment_state;
+
+static char const * const comment_name[] = {
+ "NO", "C", "CXX", "STARTING", "FINISHING", "CHAR", "STRING"
+};
+
+/* state of preprocessor line parser */
+typedef enum {
+ LS_START, /* only space and comments on this line */
+ LS_HASH, /* only space, comments, and a hash */
+ LS_DIRTY /* this line can't be a preprocessor line */
+} Line_state;
+
+static char const * const linestate_name[] = {
+ "START", "HASH", "DIRTY"
+};
+
+/*
+ * Minimum translation limits from ISO/IEC 9899:1999 5.2.4.1
+ */
+#define MAXDEPTH 64 /* maximum #if nesting */
+#define MAXLINE 4096 /* maximum length of line */
+#define MAXSYMS 4096 /* maximum number of symbols */
+
+/*
+ * Sometimes when editing a keyword the replacement text is longer, so
+ * we leave some space at the end of the tline buffer to accommodate this.
+ */
+#define EDITSLOP 10
+
+/*
+ * Globals.
+ */
+
+static bool complement; /* -c: do the complement */
+static bool debugging; /* -d: debugging reports */
+static bool iocccok; /* -e: fewer IOCCC errors */
+static bool killconsts; /* -k: eval constant #ifs */
+static bool lnblank; /* -l: blank deleted lines */
+static bool lnnum; /* -n: add #line directives */
+static bool symlist; /* -s: output symbol list */
+static bool text; /* -t: this is a text file */
+
+static const char *symname[MAXSYMS]; /* symbol name */
+static const char *value[MAXSYMS]; /* -Dsym=value */
+static bool ignore[MAXSYMS]; /* -iDsym or -iUsym */
+static int nsyms; /* number of symbols */
+
+static FILE *input; /* input file pointer */
+static const char *filename; /* input file name */
+static int linenum; /* current line number */
+
+static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
+static char *keyword; /* used for editing #elif's */
+
+static Comment_state incomment; /* comment parser state */
+static Line_state linestate; /* #if line parser state */
+static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
+static bool ignoring[MAXDEPTH]; /* ignore comments state */
+static int stifline[MAXDEPTH]; /* start of current #if */
+static int depth; /* current #if nesting */
+static int delcount; /* count of deleted lines */
+static bool keepthis; /* don't delete constant #if */
+
+static int exitstat; /* program exit status */
+
+static void addsym(bool, bool, char *);
+static void debug(const char *, ...);
+static void done(void);
+static void error(const char *);
+static int findsym(const char *);
+static void flushline(bool);
+static Linetype getline34(void);
+static Linetype ifeval(const char **);
+static void ignoreoff(void);
+static void ignoreon(void);
+static void keywordedit(const char *);
+static void nest(void);
+static void process(void);
+static const char *skipcomment(const char *);
+static const char *skipsym(const char *);
+static void state(Ifstate);
+static int strlcmp(const char *, const char *, size_t);
+static void unnest(void);
+static void usage(void);
+
+#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
+
+/*
+ * The main program.
+ */
+int
+main(int argc, char *argv[])
+{
+ int opt;
+
+ while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
+ switch (opt) {
+ case 'i': /* treat stuff controlled by these symbols as text */
+ /*
+ * For strict backwards-compatibility the U or D
+ * should be immediately after the -i but it doesn't
+ * matter much if we relax that requirement.
+ */
+ opt = *optarg++;
+ if (opt == 'D')
+ addsym(true, true, optarg);
+ else if (opt == 'U')
+ addsym(true, false, optarg);
+ else
+ usage();
+ break;
+ case 'D': /* define a symbol */
+ addsym(false, true, optarg);
+ break;
+ case 'U': /* undef a symbol */
+ addsym(false, false, optarg);
+ break;
+ case 'I':
+ /* no-op for compatibility with cpp */
+ break;
+ case 'c': /* treat -D as -U and vice versa */
+ complement = true;
+ break;
+ case 'd':
+ debugging = true;
+ break;
+ case 'e': /* fewer errors from dodgy lines */
+ iocccok = true;
+ break;
+ case 'k': /* process constant #ifs */
+ killconsts = true;
+ break;
+ case 'l': /* blank deleted lines instead of omitting them */
+ lnblank = true;
+ break;
+ case 'n': /* add #line directive after deleted lines */
+ lnnum = true;
+ break;
+ case 's': /* only output list of symbols that control #ifs */
+ symlist = true;
+ break;
+ case 't': /* don't parse C comments */
+ text = true;
+ break;
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+ if (argc > 1) {
+ errx(2, "can only do one file");
+ } else if (argc == 1 && strcmp(*argv, "-") != 0) {
+ filename = *argv;
+ input = fopen(filename, "r");
+ if (input == NULL)
+ err(2, "can't open %s", filename);
+ } else {
+ filename = "[stdin]";
+ input = stdin;
+ }
+ process();
+ abort(); /* bug */
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
+ " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
+ exit(2);
+}
+
+/*
+ * A state transition function alters the global #if processing state
+ * in a particular way. The table below is indexed by the current
+ * processing state and the type of the current line.
+ *
+ * Nesting is handled by keeping a stack of states; some transition
+ * functions increase or decrease the depth. They also maintain the
+ * ignore state on a stack. In some complicated cases they have to
+ * alter the preprocessor directive, as follows.
+ *
+ * When we have processed a group that starts off with a known-false
+ * #if/#elif sequence (which has therefore been deleted) followed by a
+ * #elif that we don't understand and therefore must keep, we edit the
+ * latter into a #if to keep the nesting correct.
+ *
+ * When we find a true #elif in a group, the following block will
+ * always be kept and the rest of the sequence after the next #elif or
+ * #else will be discarded. We edit the #elif into a #else and the
+ * following directive to #endif since this has the desired behaviour.
+ *
+ * "Dodgy" directives are split across multiple lines, the most common
+ * example being a multi-line comment hanging off the right of the
+ * directive. We can handle them correctly only if there is no change
+ * from printing to dropping (or vice versa) caused by that directive.
+ * If the directive is the first of a group we have a choice between
+ * failing with an error, or passing it through unchanged instead of
+ * evaluating it. The latter is not the default to avoid questions from
+ * users about unifdef unexpectedly leaving behind preprocessor directives.
+ */
+typedef void state_fn(void);
+
+/* report an error */
+static void Eelif (void) { error("Inappropriate #elif"); }
+static void Eelse (void) { error("Inappropriate #else"); }
+static void Eendif(void) { error("Inappropriate #endif"); }
+static void Eeof (void) { error("Premature EOF"); }
+static void Eioccc(void) { error("Obfuscated preprocessor control line"); }
+/* plain line handling */
+static void print (void) { flushline(true); }
+static void drop (void) { flushline(false); }
+/* output lacks group's start line */
+static void Strue (void) { drop(); ignoreoff(); state(IS_TRUE_PREFIX); }
+static void Sfalse(void) { drop(); ignoreoff(); state(IS_FALSE_PREFIX); }
+static void Selse (void) { drop(); state(IS_TRUE_ELSE); }
+/* print/pass this block */
+static void Pelif (void) { print(); ignoreoff(); state(IS_PASS_MIDDLE); }
+static void Pelse (void) { print(); state(IS_PASS_ELSE); }
+static void Pendif(void) { print(); unnest(); }
+/* discard this block */
+static void Dfalse(void) { drop(); ignoreoff(); state(IS_FALSE_TRAILER); }
+static void Delif (void) { drop(); ignoreoff(); state(IS_FALSE_MIDDLE); }
+static void Delse (void) { drop(); state(IS_FALSE_ELSE); }
+static void Dendif(void) { drop(); unnest(); }
+/* first line of group */
+static void Fdrop (void) { nest(); Dfalse(); }
+static void Fpass (void) { nest(); Pelif(); }
+static void Ftrue (void) { nest(); Strue(); }
+static void Ffalse(void) { nest(); Sfalse(); }
+/* variable pedantry for obfuscated lines */
+static void Oiffy (void) { if (!iocccok) Eioccc(); Fpass(); ignoreon(); }
+static void Oif (void) { if (!iocccok) Eioccc(); Fpass(); }
+static void Oelif (void) { if (!iocccok) Eioccc(); Pelif(); }
+/* ignore comments in this block */
+static void Idrop (void) { Fdrop(); ignoreon(); }
+static void Itrue (void) { Ftrue(); ignoreon(); }
+static void Ifalse(void) { Ffalse(); ignoreon(); }
+/* edit this line */
+static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
+static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
+static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
+static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
+
+static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
+/* IS_OUTSIDE */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
+ print, done },
+/* IS_FALSE_PREFIX */
+{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
+ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
+ drop, Eeof },
+/* IS_TRUE_PREFIX */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
+ print, Eeof },
+/* IS_PASS_MIDDLE */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
+ print, Eeof },
+/* IS_FALSE_MIDDLE */
+{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
+ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
+ drop, Eeof },
+/* IS_TRUE_MIDDLE */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
+ print, Eeof },
+/* IS_PASS_ELSE */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
+ print, Eeof },
+/* IS_FALSE_ELSE */
+{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
+ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
+ drop, Eeof },
+/* IS_TRUE_ELSE */
+{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
+ Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
+ print, Eeof },
+/* IS_FALSE_TRAILER */
+{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
+ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
+ drop, Eeof }
+/*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
+ TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
+ PLAIN EOF */
+};
+
+/*
+ * State machine utility functions
+ */
+static void
+done(void)
+{
+ if (incomment)
+ error("EOF in comment");
+ exit(exitstat);
+}
+static void
+ignoreoff(void)
+{
+ if (depth == 0)
+ abort(); /* bug */
+ ignoring[depth] = ignoring[depth-1];
+}
+static void
+ignoreon(void)
+{
+ ignoring[depth] = true;
+}
+static void
+keywordedit(const char *replacement)
+{
+ size_t size = tline + sizeof(tline) - keyword;
+ char *dst = keyword;
+ const char *src = replacement;
+ if (size != 0) {
+ while ((--size != 0) && (*src != '\0'))
+ *dst++ = *src++;
+ *dst = '\0';
+ }
+ print();
+}
+static void
+nest(void)
+{
+ depth += 1;
+ if (depth >= MAXDEPTH)
+ error("Too many levels of nesting");
+ stifline[depth] = linenum;
+}
+static void
+unnest(void)
+{
+ if (depth == 0)
+ abort(); /* bug */
+ depth -= 1;
+}
+static void
+state(Ifstate is)
+{
+ ifstate[depth] = is;
+}
+
+/*
+ * Write a line to the output or not, according to command line options.
+ */
+static void
+flushline(bool keep)
+{
+ if (symlist)
+ return;
+ if (keep ^ complement) {
+ if (lnnum && delcount > 0)
+ printf("#line %d\n", linenum);
+ fputs(tline, stdout);
+ delcount = 0;
+ } else {
+ if (lnblank)
+ putc('\n', stdout);
+ exitstat = 1;
+ delcount += 1;
+ }
+}
+
+/*
+ * The driver for the state machine.
+ */
+static void
+process(void)
+{
+ Linetype lineval;
+
+ for (;;) {
+ linenum++;
+ lineval = getline34();
+ trans_table[ifstate[depth]][lineval]();
+ debug("process %s -> %s depth %d",
+ linetype_name[lineval],
+ ifstate_name[ifstate[depth]], depth);
+ }
+}
+
+/*
+ * Parse a line and determine its type. We keep the preprocessor line
+ * parser state between calls in the global variable linestate, with
+ * help from skipcomment().
+ */
+static Linetype
+getline34(void)
+{
+ const char *cp;
+ int cursym;
+ int kwlen;
+ Linetype retval;
+ Comment_state wascomment;
+
+ if (fgets(tline, MAXLINE, input) == NULL)
+ return (LT_EOF);
+ retval = LT_PLAIN;
+ wascomment = incomment;
+ cp = skipcomment(tline);
+ if (linestate == LS_START) {
+ if (*cp == '#') {
+ linestate = LS_HASH;
+ cp = skipcomment(cp + 1);
+ } else if (*cp != '\0')
+ linestate = LS_DIRTY;
+ }
+ if (!incomment && linestate == LS_HASH) {
+ keyword = tline + (cp - tline);
+ cp = skipsym(cp);
+ kwlen = cp - keyword;
+ /* no way can we deal with a continuation inside a keyword */
+ if (strncmp(cp, "\\\n", 2) == 0)
+ Eioccc();
+ if (strlcmp("ifdef", keyword, kwlen) == 0 ||
+ strlcmp("ifndef", keyword, kwlen) == 0) {
+ cp = skipcomment(cp);
+ if ((cursym = findsym(cp)) < 0)
+ retval = LT_IF;
+ else {
+ retval = (keyword[2] == 'n')
+ ? LT_FALSE : LT_TRUE;
+ if (value[cursym] == NULL)
+ retval = (retval == LT_TRUE)
+ ? LT_FALSE : LT_TRUE;
+ if (ignore[cursym])
+ retval = (retval == LT_TRUE)
+ ? LT_TRUEI : LT_FALSEI;
+ }
+ cp = skipsym(cp);
+ } else if (strlcmp("if", keyword, kwlen) == 0)
+ retval = ifeval(&cp);
+ else if (strlcmp("elif", keyword, kwlen) == 0)
+ retval = ifeval(&cp) - LT_IF + LT_ELIF;
+ else if (strlcmp("else", keyword, kwlen) == 0)
+ retval = LT_ELSE;
+ else if (strlcmp("endif", keyword, kwlen) == 0)
+ retval = LT_ENDIF;
+ else {
+ linestate = LS_DIRTY;
+ retval = LT_PLAIN;
+ }
+ cp = skipcomment(cp);
+ if (*cp != '\0') {
+ linestate = LS_DIRTY;
+ if (retval == LT_TRUE || retval == LT_FALSE ||
+ retval == LT_TRUEI || retval == LT_FALSEI)
+ retval = LT_IF;
+ if (retval == LT_ELTRUE || retval == LT_ELFALSE)
+ retval = LT_ELIF;
+ }
+ if (retval != LT_PLAIN && (wascomment || incomment)) {
+ retval += LT_DODGY;
+ if (incomment)
+ linestate = LS_DIRTY;
+ }
+ /* skipcomment should have changed the state */
+ if (linestate == LS_HASH)
+ abort(); /* bug */
+ }
+ if (linestate == LS_DIRTY) {
+ while (*cp != '\0')
+ cp = skipcomment(cp + 1);
+ }
+ debug("parser %s comment %s line",
+ comment_name[incomment], linestate_name[linestate]);
+ return (retval);
+}
+
+/*
+ * These are the binary operators that are supported by the expression
+ * evaluator. Note that if support for division is added then we also
+ * need short-circuiting booleans because of divide-by-zero.
+ */
+static int op_lt(int a, int b) { return (a < b); }
+static int op_gt(int a, int b) { return (a > b); }
+static int op_le(int a, int b) { return (a <= b); }
+static int op_ge(int a, int b) { return (a >= b); }
+static int op_eq(int a, int b) { return (a == b); }
+static int op_ne(int a, int b) { return (a != b); }
+static int op_or(int a, int b) { return (a || b); }
+static int op_and(int a, int b) { return (a && b); }
+
+/*
+ * An evaluation function takes three arguments, as follows: (1) a pointer to
+ * an element of the precedence table which lists the operators at the current
+ * level of precedence; (2) a pointer to an integer which will receive the
+ * value of the expression; and (3) a pointer to a char* that points to the
+ * expression to be evaluated and that is updated to the end of the expression
+ * when evaluation is complete. The function returns LT_FALSE if the value of
+ * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
+ * expression could not be evaluated.
+ */
+struct ops;
+
+typedef Linetype eval_fn(const struct ops *, int *, const char **);
+
+static eval_fn eval_table, eval_unary;
+
+/*
+ * The precedence table. Expressions involving binary operators are evaluated
+ * in a table-driven way by eval_table. When it evaluates a subexpression it
+ * calls the inner function with its first argument pointing to the next
+ * element of the table. Innermost expressions have special non-table-driven
+ * handling.
+ */
+static const struct ops {
+ eval_fn *inner;
+ struct op {
+ const char *str;
+ int (*fn)(int, int);
+ } op[5];
+} eval_ops[] = {
+ { eval_table, { { "||", op_or } } },
+ { eval_table, { { "&&", op_and } } },
+ { eval_table, { { "==", op_eq },
+ { "!=", op_ne } } },
+ { eval_unary, { { "<=", op_le },
+ { ">=", op_ge },
+ { "<", op_lt },
+ { ">", op_gt } } }
+};
+
+/*
+ * Function for evaluating the innermost parts of expressions,
+ * viz. !expr (expr) defined(symbol) symbol number
+ * We reset the keepthis flag when we find a non-constant subexpression.
+ */
+static Linetype
+eval_unary(const struct ops *ops, int *valp, const char **cpp)
+{
+ const char *cp;
+ char *ep;
+ int sym;
+
+ cp = skipcomment(*cpp);
+ if (*cp == '!') {
+ debug("eval%d !", ops - eval_ops);
+ cp++;
+ if (eval_unary(ops, valp, &cp) == LT_IF)
+ return (LT_IF);
+ *valp = !*valp;
+ } else if (*cp == '(') {
+ cp++;
+ debug("eval%d (", ops - eval_ops);
+ if (eval_table(eval_ops, valp, &cp) == LT_IF)
+ return (LT_IF);
+ cp = skipcomment(cp);
+ if (*cp++ != ')')
+ return (LT_IF);
+ } else if (isdigit((unsigned char)*cp)) {
+ debug("eval%d number", ops - eval_ops);
+ *valp = strtol(cp, &ep, 0);
+ cp = skipsym(cp);
+ } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
+ cp = skipcomment(cp+7);
+ debug("eval%d defined", ops - eval_ops);
+ if (*cp++ != '(')
+ return (LT_IF);
+ cp = skipcomment(cp);
+ sym = findsym(cp);
+ if (sym < 0)
+ return (LT_IF);
+ *valp = (value[sym] != NULL);
+ cp = skipsym(cp);
+ cp = skipcomment(cp);
+ if (*cp++ != ')')
+ return (LT_IF);
+ keepthis = false;
+ } else if (!endsym(*cp)) {
+ debug("eval%d symbol", ops - eval_ops);
+ sym = findsym(cp);
+ if (sym < 0)
+ return (LT_IF);
+ if (value[sym] == NULL)
+ *valp = 0;
+ else {
+ *valp = strtol(value[sym], &ep, 0);
+ if (*ep != '\0' || ep == value[sym])
+ return (LT_IF);
+ }
+ cp = skipsym(cp);
+ keepthis = false;
+ } else {
+ debug("eval%d bad expr", ops - eval_ops);
+ return (LT_IF);
+ }
+
+ *cpp = cp;
+ debug("eval%d = %d", ops - eval_ops, *valp);
+ return (*valp ? LT_TRUE : LT_FALSE);
+}
+
+/*
+ * Table-driven evaluation of binary operators.
+ */
+static Linetype
+eval_table(const struct ops *ops, int *valp, const char **cpp)
+{
+ const struct op *op;
+ const char *cp;
+ int val;
+
+ debug("eval%d", ops - eval_ops);
+ cp = *cpp;
+ if (ops->inner(ops+1, valp, &cp) == LT_IF)
+ return (LT_IF);
+ for (;;) {
+ cp = skipcomment(cp);
+ for (op = ops->op; op->str != NULL; op++)
+ if (strncmp(cp, op->str, strlen(op->str)) == 0)
+ break;
+ if (op->str == NULL)
+ break;
+ cp += strlen(op->str);
+ debug("eval%d %s", ops - eval_ops, op->str);
+ if (ops->inner(ops+1, &val, &cp) == LT_IF)
+ return (LT_IF);
+ *valp = op->fn(*valp, val);
+ }
+
+ *cpp = cp;
+ debug("eval%d = %d", ops - eval_ops, *valp);
+ return (*valp ? LT_TRUE : LT_FALSE);
+}
+
+/*
+ * Evaluate the expression on a #if or #elif line. If we can work out
+ * the result we return LT_TRUE or LT_FALSE accordingly, otherwise we
+ * return just a generic LT_IF.
+ */
+static Linetype
+ifeval(const char **cpp)
+{
+ int ret;
+ int val;
+
+ debug("eval %s", *cpp);
+ keepthis = killconsts ? false : true;
+ ret = eval_table(eval_ops, &val, cpp);
+ debug("eval = %d", val);
+ return (keepthis ? LT_IF : ret);
+}
+
+/*
+ * Skip over comments, strings, and character literals and stop at the
+ * next character position that is not whitespace. Between calls we keep
+ * the comment state in the global variable incomment, and we also adjust
+ * the global variable linestate when we see a newline.
+ * XXX: doesn't cope with the buffer splitting inside a state transition.
+ */
+static const char *
+skipcomment(const char *cp)
+{
+ if (text || ignoring[depth]) {
+ for (; isspace((unsigned char)*cp); cp++)
+ if (*cp == '\n')
+ linestate = LS_START;
+ return (cp);
+ }
+ while (*cp != '\0')
+ /* don't reset to LS_START after a line continuation */
+ if (strncmp(cp, "\\\n", 2) == 0)
+ cp += 2;
+ else switch (incomment) {
+ case NO_COMMENT:
+ if (strncmp(cp, "/\\\n", 3) == 0) {
+ incomment = STARTING_COMMENT;
+ cp += 3;
+ } else if (strncmp(cp, "/*", 2) == 0) {
+ incomment = C_COMMENT;
+ cp += 2;
+ } else if (strncmp(cp, "//", 2) == 0) {
+ incomment = CXX_COMMENT;
+ cp += 2;
+ } else if (strncmp(cp, "\'", 1) == 0) {
+ incomment = CHAR_LITERAL;
+ linestate = LS_DIRTY;
+ cp += 1;
+ } else if (strncmp(cp, "\"", 1) == 0) {
+ incomment = STRING_LITERAL;
+ linestate = LS_DIRTY;
+ cp += 1;
+ } else if (strncmp(cp, "\n", 1) == 0) {
+ linestate = LS_START;
+ cp += 1;
+ } else if (strchr(" \t", *cp) != NULL) {
+ cp += 1;
+ } else
+ return (cp);
+ continue;
+ case CXX_COMMENT:
+ if (strncmp(cp, "\n", 1) == 0) {
+ incomment = NO_COMMENT;
+ linestate = LS_START;
+ }
+ cp += 1;
+ continue;
+ case CHAR_LITERAL:
+ case STRING_LITERAL:
+ if ((incomment == CHAR_LITERAL && cp[0] == '\'') ||
+ (incomment == STRING_LITERAL && cp[0] == '\"')) {
+ incomment = NO_COMMENT;
+ cp += 1;
+ } else if (cp[0] == '\\') {
+ if (cp[1] == '\0')
+ cp += 1;
+ else
+ cp += 2;
+ } else if (strncmp(cp, "\n", 1) == 0) {
+ if (incomment == CHAR_LITERAL)
+ error("unterminated char literal");
+ else
+ error("unterminated string literal");
+ } else
+ cp += 1;
+ continue;
+ case C_COMMENT:
+ if (strncmp(cp, "*\\\n", 3) == 0) {
+ incomment = FINISHING_COMMENT;
+ cp += 3;
+ } else if (strncmp(cp, "*/", 2) == 0) {
+ incomment = NO_COMMENT;
+ cp += 2;
+ } else
+ cp += 1;
+ continue;
+ case STARTING_COMMENT:
+ if (*cp == '*') {
+ incomment = C_COMMENT;
+ cp += 1;
+ } else if (*cp == '/') {
+ incomment = CXX_COMMENT;
+ cp += 1;
+ } else {
+ incomment = NO_COMMENT;
+ linestate = LS_DIRTY;
+ }
+ continue;
+ case FINISHING_COMMENT:
+ if (*cp == '/') {
+ incomment = NO_COMMENT;
+ cp += 1;
+ } else
+ incomment = C_COMMENT;
+ continue;
+ default:
+ abort(); /* bug */
+ }
+ return (cp);
+}
+
+/*
+ * Skip over an identifier.
+ */
+static const char *
+skipsym(const char *cp)
+{
+ while (!endsym(*cp))
+ ++cp;
+ return (cp);
+}
+
+/*
+ * Look for the symbol in the symbol table. If is is found, we return
+ * the symbol table index, else we return -1.
+ */
+static int
+findsym(const char *str)
+{
+ const char *cp;
+ int symind;
+
+ cp = skipsym(str);
+ if (cp == str)
+ return (-1);
+ if (symlist) {
+ printf("%.*s\n", (int)(cp-str), str);
+ /* we don't care about the value of the symbol */
+ return (0);
+ }
+ for (symind = 0; symind < nsyms; ++symind) {
+ if (strlcmp(symname[symind], str, cp-str) == 0) {
+ debug("findsym %s %s", symname[symind],
+ value[symind] ? value[symind] : "");
+ return (symind);
+ }
+ }
+ return (-1);
+}
+
+/*
+ * Add a symbol to the symbol table.
+ */
+static void
+addsym(bool ignorethis, bool definethis, char *sym)
+{
+ int symind;
+ char *val;
+
+ symind = findsym(sym);
+ if (symind < 0) {
+ if (nsyms >= MAXSYMS)
+ errx(2, "too many symbols");
+ symind = nsyms++;
+ }
+ symname[symind] = sym;
+ ignore[symind] = ignorethis;
+ val = sym + (skipsym(sym) - sym);
+ if (definethis) {
+ if (*val == '=') {
+ value[symind] = val+1;
+ *val = '\0';
+ } else if (*val == '\0')
+ value[symind] = "";
+ else
+ usage();
+ } else {
+ if (*val != '\0')
+ usage();
+ value[symind] = NULL;
+ }
+}
+
+/*
+ * Compare s with n characters of t.
+ * The same as strncmp() except that it checks that s[n] == '\0'.
+ */
+static int
+strlcmp(const char *s, const char *t, size_t n)
+{
+ while (n-- && *t != '\0')
+ if (*s != *t)
+ return ((unsigned char)*s - (unsigned char)*t);
+ else
+ ++s, ++t;
+ return ((unsigned char)*s);
+}
+
+/*
+ * Diagnostics.
+ */
+static void
+debug(const char *msg, ...)
+{
+ va_list ap;
+
+ if (debugging) {
+ va_start(ap, msg);
+ vwarnx(msg, ap);
+ va_end(ap);
+ }
+}
+
+static void
+error(const char *msg)
+{
+ if (depth == 0)
+ warnx("%s: %d: %s", filename, linenum, msg);
+ else
+ warnx("%s: %d: %s (#if line %d depth %d)",
+ filename, linenum, msg, stifline[depth], depth);
+ errx(2, "output may be truncated");
+}
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 0000000..d879782
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Kernel header preprocessor"
+SECTION = "devel"
+LICENSE = "GPL"
+
+SRC_URI = "file://unifdef.c"
+
+inherit native
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef ${WORKDIR}/unifdef.c
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 unifdef ${D}${bindir}
+}
+
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 0000000..106fa25
--- /dev/null
+++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc
@@ -0,0 +1,30 @@
+LICENSE = "GPL"
+SECTION = "base"
+SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.gz"
+S = "${WORKDIR}/dpkg-${PV}"
+PACKAGE_ARCH = "all"
+PR = "r2"
+
+do_patch () {
+ cat ${S}/scripts/update-alternatives.pl | \
+ sed -n -e '
+ /^\$admindir=.*staging/{
+ x
+ s/^.*$/$D=$ENV{"D"} || ""\;/;
+ p;
+ x;
+ s,^\$admindir=.*staging.*$,$admindir="$D${localstatedir}/dpkg"\;,;
+ };
+ s,^\$altdir=.*$,$altdir="$D${sysconfdir}/alternatives"\;,;
+ p;' > ${S}/scripts/update-alternatives
+}
+
+do_install () {
+ install -d ${D}${sbindir} \
+ ${D}${localstatedir}/dpkg/alternatives \
+ ${D}${sysconfdir}/alternatives
+
+ install -m 0755 scripts/update-alternatives ${D}${sbindir}/update-alternatives
+}
+
+BBCLASSEXTEND = "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 0000000..5d38d5d
--- /dev/null
+++ b/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.13.22.bb
@@ -0,0 +1,7 @@
+require update-alternatives-dpkg.inc
+
+PROVIDES += "virtual/update-alternatives"
+RPROVIDES_${PN} += "update-alternatives"
+EXTRA_RDEPENDS = "perl dpkg"
+EXTRA_RDEPENDS_virtclass-native = ""
+RDEPENDS_${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 0000000..a5c273c
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/fix_issue_caused_by_ccache.patch
@@ -0,0 +1,30 @@
+The script does not expect use of ccache, hence fix it to recognise it.
+
+2010/08/17
+Nitin A Kamble <nitin.a.kamble@intel.com>
+
+Index: valgrind-3.5.0/coregrind/link_tool_exe_linux.in
+===================================================================
+--- valgrind-3.5.0.orig/coregrind/link_tool_exe_linux.in
++++ valgrind-3.5.0/coregrind/link_tool_exe_linux.in
+@@ -62,6 +62,11 @@ die "Bogus alt-load address"
+
+ # The cc invokation to do the final link
+ my $cc = $ARGV[1];
++my $next = 2;
++if ("$cc" eq "ccache") {
++ $cc = "$cc $ARGV[2]";
++ $next = 3;
++}
+
+ # and the 'restargs' are argv[2 ..]
+
+@@ -71,7 +76,7 @@ my $cc = $ARGV[1];
+ my $cmd="$cc -static -Wl,-Ttext=$ala";
+
+ # Add the rest of the parameters
+-foreach my $n (2 .. $#ARGV) {
++foreach my $n ($next .. $#ARGV) {
+ $cmd = "$cmd $ARGV[$n]";
+ }
+
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 0000000..66b3698
--- /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 0000000..c1a73f8
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind_3.5.0.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Valgrind memory debugger"
+HOMEPAGE = "http://valgrind.org/"
+BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
+LICENSE = "GPLv2+ & BSD & FDLv1.2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
+ file://include/pub_tool_basics.h;beginline=1;endline=29;md5=b4765f122b7672cdf9b2e8fd75a33172 \
+ file://include/valgrind.h;beginline=1;endline=56;md5=13a71cedba99112334d8596162aec37e \
+ file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
+DEPENDS = "virtual/libx11"
+PR = "r3"
+
+SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
+ file://valgrind_3.5.0-svn_r11264.patch.bz2 \
+ file://fix_issue_caused_by_ccache.patch "
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-tls"
+EXTRA_OEMAKE = "-w"
+PARALLEL_MAKE = ""
+
+FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
OpenPOWER on IntegriCloud