summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-core
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/base-files/base-files/filesystems8
-rw-r--r--meta/recipes-core/base-files/base-files/fstab12
-rw-r--r--meta/recipes-core/base-files/base-files/host.conf2
-rw-r--r--meta/recipes-core/base-files/base-files/inputrc61
-rw-r--r--meta/recipes-core/base-files/base-files/issue0
-rw-r--r--meta/recipes-core/base-files/base-files/issue.net0
-rw-r--r--meta/recipes-core/base-files/base-files/licenses/GPL-2340
-rw-r--r--meta/recipes-core/base-files/base-files/motd0
-rw-r--r--meta/recipes-core/base-files/base-files/nsswitch.conf19
-rw-r--r--meta/recipes-core/base-files/base-files/profile32
-rw-r--r--meta/recipes-core/base-files/base-files/rotation1
-rw-r--r--meta/recipes-core/base-files/base-files/share/dot.bashrc16
-rw-r--r--meta/recipes-core/base-files/base-files/share/dot.profile10
-rw-r--r--meta/recipes-core/base-files/base-files/shells8
-rw-r--r--meta/recipes-core/base-files/base-files/usbd0
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb147
-rw-r--r--meta/recipes-core/base-passwd/base-passwd-3.5.26/add_shutdown.patch19
-rw-r--r--meta/recipes-core/base-passwd/base-passwd-3.5.26/input.patch22
-rw-r--r--meta/recipes-core/base-passwd/base-passwd-3.5.26/nobash.patch23
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.26.bb95
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/busybox-appletlib-dependency.patch37
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/busybox-list-suid-and-non-suid-app-configs.patch179
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/busybox-sulogin-empty-root-password.patch58
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/busybox-udhcpc-no_deconfig.patch137
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/defconfig1020
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/fail_on_no_media.patch31
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/get_header_tar.patch22
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/login-utilities.cfg13
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/run-parts.in.usr-bin.patch29
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/stat-usr-bin.patch21
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/testsuite-du-du-k-works-fix-false-positive.patch35
-rw-r--r--meta/recipes-core/busybox/busybox-1.21.1/watch.in.usr-bin.patch29
-rw-r--r--meta/recipes-core/busybox/busybox.inc403
-rw-r--r--meta/recipes-core/busybox/busybox_1.21.1.bb47
-rwxr-xr-xmeta/recipes-core/busybox/files/busybox-cron39
-rwxr-xr-xmeta/recipes-core/busybox/files/busybox-httpd44
-rw-r--r--meta/recipes-core/busybox/files/busybox-klogd.service.in8
-rw-r--r--meta/recipes-core/busybox/files/busybox-syslog.default1
-rw-r--r--meta/recipes-core/busybox/files/busybox-syslog.service.in13
-rwxr-xr-xmeta/recipes-core/busybox/files/busybox-udhcpd43
-rw-r--r--meta/recipes-core/busybox/files/default.script4
-rw-r--r--meta/recipes-core/busybox/files/find-touchscreen.sh9
-rw-r--r--meta/recipes-core/busybox/files/hwclock.sh83
-rw-r--r--meta/recipes-core/busybox/files/inetd33
-rw-r--r--meta/recipes-core/busybox/files/inetd.conf20
-rwxr-xr-xmeta/recipes-core/busybox/files/mdev7
-rw-r--r--meta/recipes-core/busybox/files/mdev.conf37
-rwxr-xr-xmeta/recipes-core/busybox/files/mount.busybox3
-rw-r--r--meta/recipes-core/busybox/files/run-ptest7
-rw-r--r--meta/recipes-core/busybox/files/simple.script86
-rw-r--r--meta/recipes-core/busybox/files/syslog77
-rw-r--r--meta/recipes-core/busybox/files/syslog-startup.conf13
-rw-r--r--meta/recipes-core/busybox/files/syslog.conf1
-rwxr-xr-xmeta/recipes-core/busybox/files/umount.busybox3
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/Makevars41
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch17
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch12
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch29
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch56
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch75
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m424
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch22
-rw-r--r--meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch49
-rw-r--r--meta/recipes-core/console-tools/console-tools_0.3.2.bb36
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch120
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch28
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch101
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch4051
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch117
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch19
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch32
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch85
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/futimens.patch63
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch21
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch24
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.21/coreutils-build-with-acl.patch28
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.21/dummy_help2man.patch22
-rw-r--r--meta/recipes-core/coreutils/coreutils-8.21/remove-usr-local-lib-from-m4.patch31
-rw-r--r--meta/recipes-core/coreutils/coreutils_6.9.bb105
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.21.bb103
-rw-r--r--meta/recipes-core/dbus-wait/dbus-wait_git.bb17
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init123
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/os-test.patch35
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/ptest.patch154
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/python-config.patch25
-rwxr-xr-xmeta/recipes-core/dbus/dbus-1.6.10/run-ptest3
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch26
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch44
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch48
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc44
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.100.2.bb6
-rw-r--r--meta/recipes-core/dbus/dbus-ptest_1.6.10.bb51
-rw-r--r--meta/recipes-core/dbus/dbus.inc148
-rw-r--r--meta/recipes-core/dbus/dbus_1.6.10.bb6
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0001-urandom-xauth-changes-to-options.h.patch23
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0002-static_build_fix.patch64
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0003-configure.patch40
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0004-fix-2kb-keys.patch22
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0005-dropbear-enable-pam.patch31
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0006-dropbear-configuration-file.patch28
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/0007-dropbear-fix-for-x32-abi.patch140
-rw-r--r--meta/recipes-core/dropbear/dropbear-2013.58/build_test.patch229
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc104
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear4
-rwxr-xr-xmeta/recipes-core/dropbear/dropbear/init113
-rw-r--r--meta/recipes-core/dropbear/dropbear/run-ptest2
-rw-r--r--meta/recipes-core/dropbear/dropbear_2013.58.bb6
-rw-r--r--meta/recipes-core/eglibc/cross-localedef-native_2.17.bb49
-rw-r--r--meta/recipes-core/eglibc/cross-localedef-native_2.18.bb49
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch56
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-menuconfig-support.patch1007
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch36
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0002-eglibc-menuconfig-hex-string-options.patch169
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/0003-eglibc-menuconfig-build-instructions.patch176
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/GLRO_dl_debug_mask.patch143
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/IO-acquire-lock-fix.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/add_resource_h_to_wait_h.patch20
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-PR15003-r22243.patch207
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-r22178.patch9472
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/eglibc_fix_findidx_parameters.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/etc/ld.so.conf0
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/fileops-without-wchar-io.patch22
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/fix-tibetian-locales.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/fix_for_centos_5.8.patch18
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/fsl-ppc-no-fsqrt.patch100
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/generate-supported.mk11
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/glibc.fix_sqrt2.patch1491
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/initgroups_keys.patch20
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/ld-search-order.patch56
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/mips-rld-map-check.patch26
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/multilib_readlib.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/ppc-sqrt_finite.patch184
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/ppc_slow_ieee754_sqrt.patch365
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk.patch108
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch41
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/tzselect-awk.patch42
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.17/tzselect-sh.patch156
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch43
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch56
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch912
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch36
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch169
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch176
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch143
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch20
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch21
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf0
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch22
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch38
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch18
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch100
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk11
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch1491
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch20
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch56
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch26
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch17
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch184
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch365
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch108
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch41
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch42
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch156
-rw-r--r--meta/recipes-core/eglibc/eglibc-collateral.inc12
-rw-r--r--meta/recipes-core/eglibc/eglibc-common.inc9
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial.inc80
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial_2.17.bb11
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial_2.18.bb11
-rw-r--r--meta/recipes-core/eglibc/eglibc-ld.inc54
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale.inc92
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale_2.17.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale_2.18.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace.inc13
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace_2.17.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-options.inc128
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc155
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts.inc16
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts_2.17.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-scripts_2.18.bb1
-rw-r--r--meta/recipes-core/eglibc/eglibc-testing.inc79
-rw-r--r--meta/recipes-core/eglibc/eglibc.inc84
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.17.bb155
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.18.bb148
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch331
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/README8
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch454
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch113
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch24
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2bin0 -> 21491 bytes
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch471
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch36
-rw-r--r--meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb30
-rw-r--r--meta/recipes-core/eglibc/site_config/funcs474
-rw-r--r--meta/recipes-core/eglibc/site_config/headers156
-rw-r--r--meta/recipes-core/eglibc/site_config/types21
-rw-r--r--meta/recipes-core/expat/expat-2.1.0/autotools.patch24
-rw-r--r--meta/recipes-core/expat/expat.inc20
-rw-r--r--meta/recipes-core/expat/expat_2.1.0.bb6
-rw-r--r--meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb44
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch39
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch110
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch348
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/fixchicken.patch33
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/getline.m4.patch39
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch19
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/gettext-error_print_progname.patch19
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch20
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch51
-rw-r--r--meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch720
-rw-r--r--meta/recipes-core/gettext/gettext-0.18.3.1/parallel.patch36
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.1/COPYING4
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makefile.in.in454
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makevars.template53
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.1/aclocal.tgzbin0 -> 37591 bytes
-rwxr-xr-xmeta/recipes-core/gettext/gettext-minimal-0.18.3.1/config.rpath690
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-0.18.3.1/remove-potcdate.sin19
-rw-r--r--meta/recipes-core/gettext/gettext-minimal-native_0.18.3.1.bb31
-rw-r--r--meta/recipes-core/gettext/gettext_0.16.1.bb97
-rw-r--r--meta/recipes-core/gettext/gettext_0.18.3.1.bb106
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch61
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch60
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch35
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch29
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-2.0_fix_for_x32.patch42
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch24
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.36.4.bb66
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc50
-rw-r--r--meta/recipes-core/glib-networking/glib-networking_2.36.2.bb26
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx52
-rw-r--r--meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf8
-rw-r--r--meta/recipes-core/images/build-appliance-image_8.0.bb93
-rw-r--r--meta/recipes-core/images/core-image-base.bb8
-rw-r--r--meta/recipes-core/images/core-image-minimal-dev.bb7
-rw-r--r--meta/recipes-core/images/core-image-minimal-initramfs.bb21
-rw-r--r--meta/recipes-core/images/core-image-minimal-mtdutils.bb7
-rw-r--r--meta/recipes-core/images/core-image-minimal.bb12
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/copyright11
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/init90
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces31
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/nfsroot39
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm/interfaces5
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv6/interfaces5
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv7/interfaces5
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips64/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuppc/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemush4/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86-64/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86/interfaces8
-rw-r--r--meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb39
-rw-r--r--meta/recipes-core/initrdscripts/files/init-boot.sh10
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh178
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh208
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh218
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb14
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/debug82
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/e2fs28
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/finish47
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/init140
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/mdev30
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/udev45
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb59
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb17
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb22
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb22
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch347
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh13
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/banner.sh24
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh71
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/checkfs.sh50
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/checkroot.sh148
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/devpts5
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/devpts.sh28
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh17
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/functions60
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/halt29
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/hostname.sh22
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/logrotate-dmesg.conf9
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/mountall.sh39
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh90
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh220
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh38
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/reboot15
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/rmnologin.sh20
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh13
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/sendsigs21
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/single24
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh23
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/umountfs24
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh33
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/urandom46
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/volatiles36
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb130
-rwxr-xr-xmeta/recipes-core/jpeg/jpeg-8d/debian-libjpeg7_7-1.diff1070
-rw-r--r--meta/recipes-core/jpeg/jpeg-8d/fix_for_automake_1.12.1.patch44
-rw-r--r--meta/recipes-core/jpeg/jpeg_8d.bb56
-rw-r--r--meta/recipes-core/kbd/kbd-1.15.2/Allow-resizecons-on-x86_64.patch28
-rw-r--r--meta/recipes-core/kbd/kbd_1.15.2.bb32
-rw-r--r--meta/recipes-core/libcgroup/libcgroup_0.38.bb43
-rw-r--r--meta/recipes-core/libxml/libxml2.inc60
-rw-r--r--meta/recipes-core/libxml/libxml2/ansidecl.patch25
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-64bit.patch22
-rw-r--r--meta/recipes-core/libxml/libxml2/run-ptest3
-rw-r--r--meta/recipes-core/libxml/libxml2/runtest.patch820
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.1.bb8
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb69
-rw-r--r--meta/recipes-core/meta/external-sourcery-toolchain.bb149
-rw-r--r--meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED257
-rw-r--r--meta/recipes-core/meta/meta-environment.bb51
-rw-r--r--meta/recipes-core/meta/meta-ide-support.bb17
-rw-r--r--meta/recipes-core/meta/meta-toolchain-gmae.bb7
-rw-r--r--meta/recipes-core/meta/meta-toolchain.bb9
-rw-r--r--meta/recipes-core/meta/package-index.bb30
-rw-r--r--meta/recipes-core/ncurses/ncurses-5.9/config.cache4
-rw-r--r--meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch27
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc294
-rw-r--r--meta/recipes-core/ncurses/ncurses_5.9.bb10
-rw-r--r--meta/recipes-core/ncurses/site_config/headers5
-rw-r--r--meta/recipes-core/netbase/netbase/hosts2
-rw-r--r--meta/recipes-core/netbase/netbase_5.1.bb23
-rw-r--r--meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb33
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-base.bb372
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-boot.bb53
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb30
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb10
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-nfs.bb22
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-sdk.bb77
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb12
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb21
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb27
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb83
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb51
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb19
-rw-r--r--meta/recipes-core/packagegroups/packagegroup-self-hosted.bb226
-rwxr-xr-xmeta/recipes-core/psplash/files/psplash-init29
-rw-r--r--meta/recipes-core/psplash/files/psplash-poky-img.h1259
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb111
-rw-r--r--meta/recipes-core/readline/files/configure-fix.patch26
-rw-r--r--meta/recipes-core/readline/readline-5.2/acinclude.m41815
-rw-r--r--meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch21
-rw-r--r--meta/recipes-core/readline/readline-6.2/acinclude.m41871
-rw-r--r--meta/recipes-core/readline/readline-6.2/norpath.patch21
-rw-r--r--meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch114
-rw-r--r--meta/recipes-core/readline/readline.inc37
-rw-r--r--meta/recipes-core/readline/readline_5.2.bb82
-rw-r--r--meta/recipes-core/readline/readline_6.2.bb22
-rw-r--r--meta/recipes-core/sysfsutils/sysfsutils-2.1.0/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/sysfsutils/sysfsutils-2.1.0/separatebuild.patch65
-rw-r--r--meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch23
-rw-r--r--meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb29
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb56
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units/machineid.service16
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service17
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty.bb49
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service36
-rw-r--r--meta/recipes-core/systemd/systemd-systemctl-native.bb15
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl127
-rw-r--r--meta/recipes-core/systemd/systemd/00-create-volatile.conf7
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch31
-rw-r--r--meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch37
-rw-r--r--meta/recipes-core/systemd/systemd/0001-use-CAP_MKNOD-ConditionCapability.patch32
-rw-r--r--meta/recipes-core/systemd/systemd/binfmt-install.patch56
-rw-r--r--meta/recipes-core/systemd/systemd/init104
-rw-r--r--meta/recipes-core/systemd/systemd/optional_secure_getenv.patch19
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest2
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch85
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch170
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch349
-rw-r--r--meta/recipes-core/systemd/systemd/touchscreen.rules18
-rw-r--r--meta/recipes-core/systemd/systemd/use-rootlibdir.patch107
-rw-r--r--meta/recipes-core/systemd/systemd_206.bb327
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch25
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch83
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch189
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab/inittab30
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb82
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/bootlogd.init92
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/rc179
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/rcS34
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/rcS-default29
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb94
-rw-r--r--meta/recipes-core/uclibc/site_config/funcs474
-rw-r--r--meta/recipes-core/uclibc/site_config/headers156
-rw-r--r--meta/recipes-core/uclibc/site_config/types21
-rw-r--r--meta/recipes-core/uclibc/uclibc-config.inc142
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc26
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch319
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-add-posix_fadvise-for-arm.patch68
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-atexit_old-Do-not-add-it-to-shared-libc.patch44
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch33
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch28
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch74
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/argp-headers.patch583
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/argp-support.patch5192
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch21
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/locale.cfg3
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/obstack.cfg1
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/orign_path.patch186
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/powerpc_copysignl.patch113
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch140
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/uClibc.distro192
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/uClibc.machine14
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/uclibc_enable_log2_test.patch35
-rw-r--r--meta/recipes-core/uclibc/uclibc-initial_git.bb36
-rw-r--r--meta/recipes-core/uclibc/uclibc-package.inc37
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc165
-rw-r--r--meta/recipes-core/uclibc/uclibc_git.bb22
-rw-r--r--meta/recipes-core/udev/udev-extraconf/automount.rules19
-rw-r--r--meta/recipes-core/udev/udev-extraconf/autonet.rules19
-rw-r--r--meta/recipes-core/udev/udev-extraconf/localextra.rules23
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.blacklist5
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh91
-rw-r--r--meta/recipes-core/udev/udev-extraconf/network.sh54
-rw-r--r--meta/recipes-core/udev/udev-extraconf_1.0.bb41
-rw-r--r--meta/recipes-core/udev/udev.inc110
-rw-r--r--meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch35
-rw-r--r--meta/recipes-core/udev/udev/add-install-ptest.patch60
-rw-r--r--meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch25
-rw-r--r--meta/recipes-core/udev/udev/devfs-udev.rules108
-rw-r--r--meta/recipes-core/udev/udev/init131
-rw-r--r--meta/recipes-core/udev/udev/links.conf21
-rw-r--r--meta/recipes-core/udev/udev/local.rules21
-rw-r--r--meta/recipes-core/udev/udev/permissions.rules131
-rw-r--r--meta/recipes-core/udev/udev/run-ptest3
-rw-r--r--meta/recipes-core/udev/udev/run.rules14
-rw-r--r--meta/recipes-core/udev/udev/udev-cache32
-rw-r--r--meta/recipes-core/udev/udev/udev-cache.default4
-rw-r--r--meta/recipes-core/udev/udev/udev.rules116
-rw-r--r--meta/recipes-core/udev/udev_182.bb9
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch49
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch53
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d_0.7.bb30
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc261
-rw-r--r--meta/recipes-core/util-linux/util-linux/MCONFIG223
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch38
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch57
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/configure-sbindir.patch23
-rw-r--r--meta/recipes-core/util-linux/util-linux/defines.h10
-rw-r--r--meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch17
-rw-r--r--meta/recipes-core/util-linux/util-linux/fix-configure.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/make_include17
-rw-r--r--meta/recipes-core/util-linux/util-linux/ptest.patch16
-rw-r--r--meta/recipes-core/util-linux/util-linux/remove-lscpu.patch37
-rw-r--r--meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch35
-rw-r--r--meta/recipes-core/util-linux/util-linux/run-ptest10
-rw-r--r--meta/recipes-core/util-linux/util-linux/swapargs.h3
-rw-r--r--meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch32
-rw-r--r--meta/recipes-core/util-linux/util-linux/uclibc-compile.patch15
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native.patch210
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch27
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch27
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.23.2.bb22
-rw-r--r--meta/recipes-core/zlib/site_config/headers1
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch38
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch20
-rw-r--r--meta/recipes-core/zlib/zlib-1.2.8/run-ptest7
-rw-r--r--meta/recipes-core/zlib/zlib_1.2.8.bb61
470 files changed, 61468 insertions, 0 deletions
diff --git a/meta/recipes-core/base-files/base-files/filesystems b/meta/recipes-core/base-files/base-files/filesystems
new file mode 100644
index 0000000000..7e6c41c38f
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/filesystems
@@ -0,0 +1,8 @@
1ext4
2ext3
3ext2
4vfat
5fat
6btrfs
7minix
8*
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
new file mode 100644
index 0000000000..e625ebc8ff
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -0,0 +1,12 @@
1# stock fstab - you probably want to override this with a machine specific one
2
3rootfs / auto defaults 1 1
4proc /proc proc defaults 0 0
5devpts /dev/pts devpts mode=0620,gid=5 0 0
6usbdevfs /proc/bus/usb usbdevfs noauto 0 0
7tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
8tmpfs /var/volatile tmpfs defaults 0 0
9
10# uncomment this if your device has a SD/MMC/Transflash slot
11#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0
12
diff --git a/meta/recipes-core/base-files/base-files/host.conf b/meta/recipes-core/base-files/base-files/host.conf
new file mode 100644
index 0000000000..1a8c1e1517
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/host.conf
@@ -0,0 +1,2 @@
1order hosts,bind
2multi on
diff --git a/meta/recipes-core/base-files/base-files/inputrc b/meta/recipes-core/base-files/base-files/inputrc
new file mode 100644
index 0000000000..b5c4c8af24
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/inputrc
@@ -0,0 +1,61 @@
1# /etc/inputrc - global inputrc for libreadline
2# See readline(3readline) and `info rluserman' for more information.
3
4# Be 8 bit clean.
5set input-meta on
6set output-meta on
7
8# To allow the use of 8bit-characters like the german umlauts, comment out
9# the line below. However this makes the meta key not work as a meta key,
10# which is annoying to those which don't need to type in 8-bit characters.
11
12# set convert-meta off
13
14# try to enable the application keypad when it is called. Some systems
15# need this to enable the arrow keys.
16# set enable-keypad on
17
18# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
19
20# do not bell on tab-completion
21# set bell-style none
22
23# some defaults / modifications for the emacs mode
24$if mode=emacs
25
26# allow the use of the Home/End keys
27# "\e[1~": beginning-of-line
28# "\e[4~": end-of-line
29
30# allow the use of the Delete/Insert keys
31# "\e[3~": delete-char
32# "\e[2~": quoted-insert
33
34# mappings for "page up" and "page down" to step to the beginning/end
35# of the history
36# "\e[5~": beginning-of-history
37# "\e[6~": end-of-history
38
39# alternate mappings for "page up" and "page down" to search the history
40# "\e[5~": history-search-backward
41# "\e[6~": history-search-forward
42
43# # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
44# "\e[5C": forward-word
45# "\e[5D": backward-word
46# "\e\e[C": forward-word
47# "\e\e[D": backward-word
48
49# $if term=rxvt
50# "\e[8~": end-of-line
51# $endif
52
53# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
54# "\eOH": beginning-of-line
55# "\eOF": end-of-line
56
57# for freebsd console
58# "\e[H": beginning-of-line
59# "\e[F": end-of-line
60
61$endif
diff --git a/meta/recipes-core/base-files/base-files/issue b/meta/recipes-core/base-files/base-files/issue
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/issue
diff --git a/meta/recipes-core/base-files/base-files/issue.net b/meta/recipes-core/base-files/base-files/issue.net
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/issue.net
diff --git a/meta/recipes-core/base-files/base-files/licenses/GPL-2 b/meta/recipes-core/base-files/base-files/licenses/GPL-2
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/licenses/GPL-2
@@ -0,0 +1,340 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License
307 along with this program; if not, write to the Free Software
308 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
309
310
311Also add information on how to contact you by electronic and paper mail.
312
313If the program is interactive, make it output a short notice like this
314when it starts in an interactive mode:
315
316 Gnomovision version 69, Copyright (C) year name of author
317 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 This is free software, and you are welcome to redistribute it
319 under certain conditions; type `show c' for details.
320
321The hypothetical commands `show w' and `show c' should show the appropriate
322parts of the General Public License. Of course, the commands you use may
323be called something other than `show w' and `show c'; they could even be
324mouse-clicks or menu items--whatever suits your program.
325
326You should also get your employer (if you work as a programmer) or your
327school, if any, to sign a "copyright disclaimer" for the program, if
328necessary. Here is a sample; alter the names:
329
330 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
333 <signature of Ty Coon>, 1 April 1989
334 Ty Coon, President of Vice
335
336This General Public License does not permit incorporating your program into
337proprietary programs. If your program is a subroutine library, you may
338consider it more useful to permit linking proprietary applications with the
339library. If this is what you want to do, use the GNU Library General
340Public License instead of this License.
diff --git a/meta/recipes-core/base-files/base-files/motd b/meta/recipes-core/base-files/base-files/motd
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/motd
diff --git a/meta/recipes-core/base-files/base-files/nsswitch.conf b/meta/recipes-core/base-files/base-files/nsswitch.conf
new file mode 100644
index 0000000000..06f03d22a6
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/nsswitch.conf
@@ -0,0 +1,19 @@
1# /etc/nsswitch.conf
2#
3# Example configuration of GNU Name Service Switch functionality.
4# If you have the `glibc-doc' and `info' packages installed, try:
5# `info libc "Name Service Switch"' for information about this file.
6
7passwd: compat
8group: compat
9shadow: compat
10
11hosts: files dns
12networks: files
13
14protocols: db files
15services: db files
16ethers: db files
17rpc: db files
18
19netgroup: nis
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
new file mode 100644
index 0000000000..8eeaac3693
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -0,0 +1,32 @@
1# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
2# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
3
4PATH="/usr/local/bin:/usr/bin:/bin"
5EDITOR="/bin/vi" # needed for packages like cron
6test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
7
8if [ ! -e /etc/localtime ]; then
9 TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
10 # for an explanation of how to set this to your local timezone.
11 export TZ
12fi
13
14if [ "$HOME" = "ROOTHOME" ]; then
15 PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
16fi
17if [ "$PS1" ]; then
18# works for bash and ash (no other shells known to be in use here)
19 PS1='\u@\h:\w\$ '
20fi
21
22if [ -d /etc/profile.d ]; then
23 for i in /etc/profile.d/* ; do
24 . $i
25 done
26 unset i
27fi
28
29export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
30
31umask 022
32
diff --git a/meta/recipes-core/base-files/base-files/rotation b/meta/recipes-core/base-files/base-files/rotation
new file mode 100644
index 0000000000..c227083464
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/rotation
@@ -0,0 +1 @@
0 \ No newline at end of file
diff --git a/meta/recipes-core/base-files/base-files/share/dot.bashrc b/meta/recipes-core/base-files/base-files/share/dot.bashrc
new file mode 100644
index 0000000000..4be63686c2
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/share/dot.bashrc
@@ -0,0 +1,16 @@
1# ~/.bashrc: executed by bash(1) for non-login shells.
2
3export PS1='\h:\w\$ '
4umask 022
5
6# You may uncomment the following lines if you want `ls' to be colorized:
7# export LS_OPTIONS='--color=auto'
8# eval `dircolors`
9# alias ls='ls $LS_OPTIONS'
10# alias ll='ls $LS_OPTIONS -l'
11# alias l='ls $LS_OPTIONS -lA'
12#
13# Some more alias to avoid making mistakes:
14# alias rm='rm -i'
15# alias cp='cp -i'
16# alias mv='mv -i'
diff --git a/meta/recipes-core/base-files/base-files/share/dot.profile b/meta/recipes-core/base-files/base-files/share/dot.profile
new file mode 100644
index 0000000000..979793e8b5
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/share/dot.profile
@@ -0,0 +1,10 @@
1# ~/.profile: executed by Bourne-compatible login shells.
2
3if [ -f ~/.bashrc ]; then
4 . ~/.bashrc
5fi
6
7# path set by /etc/profile
8# export PATH
9
10mesg n
diff --git a/meta/recipes-core/base-files/base-files/shells b/meta/recipes-core/base-files/base-files/shells
new file mode 100644
index 0000000000..ce39b3dde7
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/shells
@@ -0,0 +1,8 @@
1# /etc/shells: valid login shells
2/bin/sh
3/bin/ash
4/bin/bash
5/bin/dash
6/bin/ksh
7/usr/bin/ksh
8/usr/bin/screen
diff --git a/meta/recipes-core/base-files/base-files/usbd b/meta/recipes-core/base-files/base-files/usbd
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/usbd
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
new file mode 100644
index 0000000000..054fefa050
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -0,0 +1,147 @@
1SUMMARY = "Miscellaneous files for the base system."
2DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system."
3SECTION = "base"
4PR = "r73"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
7# Removed all license related tasks in this recipe as license.bbclass
8# now deals with this. In order to get accurate licensing on to the image:
9# Set COPY_LIC_MANIFEST to just copy just the license.manifest to the image
10# For the manifest and the license text for each package:
11# Set COPY_LIC_MANIFEST and COPY_LIC_DIRS
12
13SRC_URI = "file://rotation \
14 file://nsswitch.conf \
15 file://motd \
16 file://inputrc \
17 file://host.conf \
18 file://profile \
19 file://shells \
20 file://fstab \
21 file://filesystems \
22 file://issue.net \
23 file://issue \
24 file://usbd \
25 file://share/dot.bashrc \
26 file://share/dot.profile \
27 file://licenses/GPL-2 \
28 "
29S = "${WORKDIR}"
30
31INHIBIT_DEFAULT_DEPS = "1"
32
33docdir_append = "/${P}"
34dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
35dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
36dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
37 ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
38 ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
39 ${libdir} ${sbindir} ${datadir} \
40 ${datadir}/common-licenses ${datadir}/dict ${infodir} \
41 ${mandir} ${datadir}/misc ${localstatedir} \
42 ${localstatedir}/backups ${localstatedir}/lib \
43 /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
44 ${localstatedir}/volatile \
45 ${localstatedir}/volatile/log \
46 /media"
47dirs3755 = "/srv \
48 ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
49 ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \
50 ${prefix}/local/share ${prefix}/local/src \
51 ${prefix}/lib/locale"
52dirs4775 = "/var/mail"
53
54volatiles = "log tmp"
55conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
56 ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \
57 ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
58 ${sysconfdir}/default"
59
60#
61# set standard hostname, might be a candidate for a DISTRO variable? :M:
62#
63hostname = "openembedded"
64
65BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
66
67do_install () {
68 for d in ${dirs755}; do
69 install -m 0755 -d ${D}$d
70 done
71 for d in ${dirs1777}; do
72 install -m 1777 -d ${D}$d
73 done
74 for d in ${dirs2775}; do
75 install -m 2755 -d ${D}$d
76 done
77 for d in ${volatiles}; do
78 ln -sf volatile/$d ${D}${localstatedir}/$d
79 done
80 ln -snf ../run ${D}${localstatedir}/run
81 ln -snf ../run/lock ${D}${localstatedir}/lock
82
83 ${BASEFILESISSUEINSTALL}
84
85 rotation=`cat ${WORKDIR}/rotation`
86 if [ "$rotation" != "0" ]; then
87 install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation
88 fi
89
90 install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
91 install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
92 install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
93 sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
94 install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
95 install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
96 install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
97 install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
98 install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
99 install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
100 install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
101 install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
102
103 ln -sf /proc/mounts ${D}${sysconfdir}/mtab
104}
105
106do_install_basefilesissue () {
107 if [ "${hostname}" != "" ]; then
108 if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then
109 echo ${MACHINE} > ${D}${sysconfdir}/hostname
110 else
111 echo ${hostname} > ${D}${sysconfdir}/hostname
112 fi
113 fi
114
115 install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
116 if [ -n "${DISTRO_NAME}" ]; then
117 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
118 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
119 if [ -n "${DISTRO_VERSION}" ]; then
120 printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
121 printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
122 fi
123 printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
124 echo >> ${D}${sysconfdir}/issue
125 echo "%h" >> ${D}${sysconfdir}/issue.net
126 echo >> ${D}${sysconfdir}/issue.net
127 fi
128}
129
130do_install_append_linuxstdbase() {
131 for d in ${dirs3755}; do
132 install -m 0755 -d ${D}$d
133 done
134
135 for d in ${dirs4775}; do
136 install -m 2755 -d ${D}$d
137 done
138}
139
140PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
141FILES_${PN} = "/"
142FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
143
144PACKAGE_ARCH = "${MACHINE_ARCH}"
145
146CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]}"
147
diff --git a/meta/recipes-core/base-passwd/base-passwd-3.5.26/add_shutdown.patch b/meta/recipes-core/base-passwd/base-passwd-3.5.26/add_shutdown.patch
new file mode 100644
index 0000000000..eb75559c49
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd-3.5.26/add_shutdown.patch
@@ -0,0 +1,19 @@
1
2We need to have a shutdown group to allow the shutdown icon
3to work correctly. Any users that want to use shutdown like
4the xuser should be added to this group.
5
6Upstream-Status: Inapporpriate [Embedded]
7
8Signed-off-by: Saul Wold <sgw@linux.intel.com>
9Index: base-passwd-3.5.26/group.master
10===================================================================
11--- base-passwd-3.5.26.orig/group.master
12+++ base-passwd-3.5.26/group.master
13@@ -36,5 +36,6 @@ sasl:*:45:
14 plugdev:*:46:
15 staff:*:50:
16 games:*:60:
17+shutdown:*:70:
18 users:*:100:
19 nogroup:*:65534:
diff --git a/meta/recipes-core/base-passwd/base-passwd-3.5.26/input.patch b/meta/recipes-core/base-passwd/base-passwd-3.5.26/input.patch
new file mode 100644
index 0000000000..f1bfc2f604
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd-3.5.26/input.patch
@@ -0,0 +1,22 @@
1Add an input group for the /dev/input/* devices.
2
3Upstream-Status: Invalid [configuration]
4
5Signed-off-by: Darren Hart <dvhart@linux.intel.com>
6
7---
8 group.master | 1 +
9 1 file changed, 1 insertion(+)
10
11Index: base-passwd-3.5.26/group.master
12===================================================================
13--- base-passwd-3.5.26.orig/group.master
14+++ base-passwd-3.5.26/group.master
15@@ -12,6 +12,7 @@ uucp:*:10:
16 man:*:12:
17 proxy:*:13:
18 kmem:*:15:
19+input:*:19:
20 dialout:*:20:
21 fax:*:21:
22 voice:*:22:
diff --git a/meta/recipes-core/base-passwd/base-passwd-3.5.26/nobash.patch b/meta/recipes-core/base-passwd/base-passwd-3.5.26/nobash.patch
new file mode 100644
index 0000000000..6371576440
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd-3.5.26/nobash.patch
@@ -0,0 +1,23 @@
1use /bin/sh instead of /bin/bash, since the latter may not be included in
2some images such as minimal
3
4comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
5
6remove "*" for root since we don't have a /etc/shadow so far.
7
8by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
9
10Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
11
12Upstream-Status: Invalid [configuration]
13
14Signed-off-by: Scott Garman <scott.a.garman@intel.com>
15
16--- base-passwd/passwd.master~nobash
17+++ base-passwd/passwd.master
18@@ -1,4 +1,4 @@
19-root:*:0:0:root:/root:/bin/bash
20+root::0:0:root:/root:/bin/sh
21 daemon:*:1:1:daemon:/usr/sbin:/bin/sh
22 bin:*:2:2:bin:/bin:/bin/sh
23 sys:*:3:3:sys:/dev:/bin/sh
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb
new file mode 100644
index 0000000000..4d94dcca65
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.26.bb
@@ -0,0 +1,95 @@
1SUMMARY = "Base system master password/group files."
2DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group). The update-passwd tool is also provided to keep the system databases synchronized with these master files."
3SECTION = "base"
4PR = "r2"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
7
8SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
9 file://add_shutdown.patch \
10 file://nobash.patch \
11 file://input.patch"
12
13SRC_URI[md5sum] = "74245e5c21dc74d9675c77cd8dfa02e6"
14SRC_URI[sha256sum] = "258a78317aa563143d10375c6e1e63a60898e503887f00fffd70b6b297c1b429"
15
16inherit autotools
17
18SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
19
20do_install () {
21 install -d -m 755 ${D}${sbindir}
22 install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/
23 install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8
24 install -p -m 644 ${S}/man/update-passwd.8 ${D}${mandir}/man8/
25 install -p -m 644 ${S}/man/update-passwd.pl.8 \
26 ${D}${mandir}/pl/man8/update-passwd.8
27 gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
28 install -d -m 755 ${D}${datadir}/base-passwd
29 sed -i 's#:/root:#:${ROOT_HOME}:#' ${S}/passwd.master
30 install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
31 install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
32
33 install -d -m 755 ${D}${docdir}/${BPN}
34 install -p -m 644 ${S}/debian/changelog ${D}${docdir}/${BPN}/
35 gzip -9 ${D}${docdir}/${BPN}/*
36 install -p -m 644 ${S}/README ${D}${docdir}/${BPN}/
37 install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/
38}
39
40base_passwd_sstate_postinst() {
41 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
42 then
43 # Staging does not copy ${sysconfdir} files into the
44 # target sysroot, so we need to do so manually. We
45 # put these files in the target sysroot so they can
46 # be used by recipes which use custom user/group
47 # permissions.
48 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
49 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ${STAGING_DIR_TARGET}${sysconfdir}/passwd
50 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ${STAGING_DIR_TARGET}${sysconfdir}/group
51 fi
52}
53
54python populate_packages_prepend() {
55 # Add in the preinst function for ${PN}
56 # We have to do this here as prior to this, passwd/group.master
57 # would be unavailable. We need to create these files at preinst
58 # time before the files from the package may be available, hence
59 # storing the data from the files in the preinst directly.
60
61 f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r')
62 passwd = "".join(f.readlines())
63 f.close()
64 f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r')
65 group = "".join(f.readlines())
66 f.close()
67
68 preinst = """#!/bin/sh
69mkdir -p $D${sysconfdir}
70if [ ! -e $D${sysconfdir}/passwd ]; then
71\tcat << EOF > $D${sysconfdir}/passwd
72""" + passwd + """EOF
73fi
74if [ ! -e $D${sysconfdir}/group ]; then
75\tcat << EOF > $D${sysconfdir}/group
76""" + group + """EOF
77fi
78"""
79 d.setVar('pkg_preinst_${PN}', preinst)
80}
81
82addtask do_package after do_populate_sysroot
83
84ALLOW_EMPTY_${PN} = "1"
85
86PACKAGES =+ "${PN}-update"
87FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}"
88
89pkg_postinst_${PN}-update () {
90#!/bin/sh
91if [ -n "$D" ]; then
92 exit 0
93fi
94${sbindir}/update-passwd
95}
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/busybox-appletlib-dependency.patch b/meta/recipes-core/busybox/busybox-1.21.1/busybox-appletlib-dependency.patch
new file mode 100644
index 0000000000..de2dbcceb1
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/busybox-appletlib-dependency.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Pending
2
3# copy commit message from OE as the patch comment:
4# commit 98c24291aa165f53423c27ae033831ce0b3bb676
5# Author: Roman I Khimov <khimov@altell.ru>
6# Date: Thu Mar 26 23:03:58 2009 +0000
7#
8# busybox: update appletlib dependency patch
9#
10# Previous version still failed from time to time on clean-start builds
11# with 4 bitbake threads and '-j16'. Building busybox as sole target worked
12# well.
13#
14# The reason is that previous version introduced a race between applets make
15# processes spawned from top-level Makefile and from libbb Makefile.
16#
17# Fix it with high-level dependency that doesn't create races.
18#
19# Signed-off-by: Koen Kooi <koen@openembedded.org>
20#
21# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
22
23Index: busybox-1.13.2/Makefile
24===================================================================
25--- busybox-1.13.2.orig/Makefile 2009-03-19 15:44:37.419270265 +0300
26+++ busybox-1.13.2/Makefile 2009-03-19 15:45:57.737521296 +0300
27@@ -471,6 +471,10 @@
28 util-linux/ \
29 util-linux/volume_id/ \
30
31+# Lib interdeps
32+# libbb uses headers generated in applets
33+libbb: applets
34+
35 endif # KBUILD_EXTMOD
36
37 ifeq ($(dot-config),1)
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/busybox-list-suid-and-non-suid-app-configs.patch b/meta/recipes-core/busybox/busybox-1.21.1/busybox-list-suid-and-non-suid-app-configs.patch
new file mode 100644
index 0000000000..753a044481
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/busybox-list-suid-and-non-suid-app-configs.patch
@@ -0,0 +1,179 @@
1Make busybox have the ability to list configuration items regarding suid
2apps and non-suid apps separately.
3
4From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
5Date: Mon, 17 Jun 2013 11:06:05 +0800
6Subject: [PATCH] busybox: list suid and non-suid app configs
7
8Upstream-Status: Pending
9
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11
12---
13 Makefile.custom | 4 ++++
14 applets/busybox.mksuid | 53 ++++++++++++++++++++++++++++++++++++++++++++
15 include/applets.src.h | 9 +++++++-
16 scripts/kconfig/confdata.c | 24 ++++++++++++++++----
17 4 files changed, 85 insertions(+), 5 deletions(-)
18 create mode 100644 applets/busybox.mksuid
19
20diff --git a/Makefile.custom b/Makefile.custom
21index 6da79e6..a276d6f 100644
22--- a/Makefile.custom
23+++ b/Makefile.custom
24@@ -4,6 +4,10 @@
25
26 busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h
27 $(Q)-$(SHELL) $^ >$@
28+busybox.cfg.suid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h
29+ $(Q)-SUID="yes" $(SHELL) $^ > $@
30+busybox.cfg.nosuid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h
31+ $(Q)-SUID="DROP" $(SHELL) $^ > $@
32
33 .PHONY: install
34 ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y)
35diff --git a/applets/busybox.mksuid b/applets/busybox.mksuid
36new file mode 100644
37index 0000000..e11a7a1
38--- /dev/null
39+++ b/applets/busybox.mksuid
40@@ -0,0 +1,53 @@
41+#!/bin/sh
42+# Make list of configuration variables regarding suid handling
43+
44+# input $1: full path to autoconf.h
45+# input $2: full path to applets.h
46+# input $3: full path to .config
47+# output (stdout): list of CONFIG_ that do or may require suid
48+
49+# If the environment variable SUID is not set or set to DROP,
50+# lists all config options that do not require suid permissions.
51+# Otherwise, lists all config options for applets that DO or MAY require
52+# suid permissions.
53+
54+# Maintainer: Bernhard Reutner-Fischer
55+
56+export LC_ALL=POSIX
57+export LC_CTYPE=POSIX
58+
59+CONFIG_H=${1:-include/autoconf.h}
60+APPLETS_H=${2:-include/applets.h}
61+DOT_CONFIG=${3:-.config}
62+
63+case ${SUID:-DROP} in
64+ [dD][rR][oO][pP]) USE="DROP" ;;
65+ *) USE="suid" ;;
66+esac
67+
68+$HOSTCC -E -DMAKE_SUID -include $CONFIG_H $APPLETS_H |
69+ awk -v USE=${USE} '
70+ /^SUID[ \t]/{
71+ if (USE == "DROP") {
72+ if ($2 != "BB_SUID_DROP") next
73+ } else {
74+ if ($2 == "BB_SUID_DROP") next
75+ }
76+ cfg = $NF
77+ gsub("\"", "", cfg)
78+ cfg = substr(cfg, 8)
79+ s[i++] = "CONFIG_" cfg
80+ s[i++] = "CONFIG_FEATURE_" cfg "_.*"
81+ }
82+ END{
83+ while (getline < ARGV[2]) {
84+ for (j in s) {
85+ if ($0 ~ "^" s[j] "=y$") {
86+ sub(/=.*/, "")
87+ print
88+ if (s[j] !~ /\*$/) delete s[j] # can drop this applet now
89+ }
90+ }
91+ }
92+ }
93+' - $DOT_CONFIG
94diff --git a/include/applets.src.h b/include/applets.src.h
95index 02b995b..8386c84 100644
96--- a/include/applets.src.h
97+++ b/include/applets.src.h
98@@ -52,6 +52,12 @@ s - suid type:
99 # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name
100 # define APPLET_NOFORK(name,main,l,s,name2) LINK l name
101
102+#elif defined(MAKE_SUID)
103+# define APPLET(name,l,s) SUID s l name
104+# define APPLET_ODDNAME(name,main,l,s,name2) SUID s l name
105+# define APPLET_NOEXEC(name,main,l,s,name2) SUID s l name
106+# define APPLET_NOFORK(name,main,l,s,name2) SUID s l name
107+
108 #else
109 static struct bb_applet applets[] = { /* name, main, location, need_suid */
110 # define APPLET(name,l,s) { #name, #name, l, s },
111@@ -414,7 +420,8 @@ IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))
112 IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat))
113 IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
114
115-#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
116+#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \
117+ && !defined(MAKE_LINKS) && !defined(MAKE_SUID)
118 };
119 #endif
120
121diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
122index bd2d70e..303df0b 100644
123--- a/scripts/kconfig/confdata.c
124+++ b/scripts/kconfig/confdata.c
125@@ -474,7 +474,11 @@ int conf_write(const char *name)
126 fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
127 /* bbox */
128 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
129- fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
130+ fprintf(out_h, "#ifdef MAKE_SUID\n");
131+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name);
132+ fprintf(out_h, "#else\n");
133+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name);
134+ fprintf(out_h, "#endif\n");
135 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
136 }
137 break;
138@@ -506,7 +510,11 @@ int conf_write(const char *name)
139 fputs("\"\n", out_h);
140 /* bbox */
141 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
142- fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
143+ fprintf(out_h, "#ifdef MAKE_SUID\n");
144+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name);
145+ fprintf(out_h, "#else\n");
146+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name);
147+ fprintf(out_h, "#endif\n");
148 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
149 }
150 break;
151@@ -518,7 +526,11 @@ int conf_write(const char *name)
152 fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
153 /* bbox */
154 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
155- fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
156+ fprintf(out_h, "#ifdef MAKE_SUID\n");
157+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name);
158+ fprintf(out_h, "#else\n");
159+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name);
160+ fprintf(out_h, "#endif\n");
161 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
162 }
163 break;
164@@ -532,7 +544,11 @@ int conf_write(const char *name)
165 fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
166 /* bbox */
167 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
168- fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
169+ fprintf(out_h, "#ifdef MAKE_SUID\n");
170+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name);
171+ fprintf(out_h, "#else\n");
172+ fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name);
173+ fprintf(out_h, "#endif\n");
174 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
175 }
176 break;
177--
1781.7.9.5
179
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/busybox-sulogin-empty-root-password.patch b/meta/recipes-core/busybox/busybox-1.21.1/busybox-sulogin-empty-root-password.patch
new file mode 100644
index 0000000000..baad298a3f
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/busybox-sulogin-empty-root-password.patch
@@ -0,0 +1,58 @@
1Upstream-Status: Backport
2Signed-off-by: Jonathan Liu <net147@gmail.com>
3
4From b6dc13c2d3754704b1bf5af4e6b957b48585102f Mon Sep 17 00:00:00 2001
5From: Jonathan Liu <net147@gmail.com>
6Date: Tue, 21 May 2013 17:01:55 +0200
7Subject: [PATCH] sulogin: allow system maintenance login if root password is
8 empty
9
10The current password checking is unable to distinguish between the user
11entering an empty password or pressing Control-D. As a result, an empty
12password always results in normal startup.
13
14We modify bb_ask to return NULL if Control-D is pressed without entering
15a password. The sulogin applet is then modified to only proceed to
16normal startup if bb_ask returns NULL. This covers EOF with no password,
17interrupt by timeout and ^C.
18
19Signed-off-by: Jonathan Liu <net147@gmail.com>
20Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
21---
22 libbb/bb_askpass.c | 4 +++-
23 loginutils/sulogin.c | 4 ++--
24 2 files changed, 5 insertions(+), 3 deletions(-)
25
26diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c
27index fe2b506..77c1bcd 100644
28--- a/libbb/bb_askpass.c
29+++ b/libbb/bb_askpass.c
30@@ -65,7 +65,9 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
31 i = 0;
32 while (1) {
33 int r = read(fd, &ret[i], 1);
34- if (r < 0) {
35+ if ((i == 0 && r == 0) /* EOF (^D) with no password */
36+ || r < 0
37+ ) {
38 /* read is interrupted by timeout or ^C */
39 ret = NULL;
40 break;
41diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
42index f79802a..65e6384 100644
43--- a/loginutils/sulogin.c
44+++ b/loginutils/sulogin.c
45@@ -83,8 +83,8 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv)
46 cp = bb_ask(STDIN_FILENO, timeout,
47 "Give root password for system maintenance\n"
48 "(or type Control-D for normal startup):");
49-
50- if (!cp || !*cp) {
51+ if (!cp) {
52+ /* ^D, ^C, timeout, or read error */
53 bb_info_msg("Normal startup");
54 return 0;
55 }
56--
571.8.2.3
58
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/busybox-udhcpc-no_deconfig.patch b/meta/recipes-core/busybox/busybox-1.21.1/busybox-udhcpc-no_deconfig.patch
new file mode 100644
index 0000000000..4c9ce3b711
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/busybox-udhcpc-no_deconfig.patch
@@ -0,0 +1,137 @@
1From 53626cd06a3ef05ed847daea802ef0aa9661caa7 Mon Sep 17 00:00:00 2001
2From: Anders Darander <anders@chargestorm.se>
3Date: Thu, 3 Nov 2011 08:51:31 +0100
4Subject: [PATCH] busybox-udhcpc-no_deconfig.patch
5
6Upstream-Status: Pending
7
8Add a new option -D to the udhcpc client that allows for
9dhcp renewal to occur without having to down the interface
10in the process.
11
12Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com>
13
14Updated to latest Busybox 1.17.3
15
16Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
17
18Updated to Busybox 1.18.4
19option spec is changed
20
21Signed-off-by: Qing He <qing.he@intel.com>
22
23Updated to Busybox 1.19.3
24
25Signed-off-by: Anders Darander <anders@chargestorm.se>
26
27Fixed options -b, -a and -P.
28
29Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
30---
31 networking/udhcp/dhcpc.c | 29 +++++++++++++++++++++--------
32 1 files changed, 21 insertions(+), 8 deletions(-)
33
34Index: busybox-1.20.2/networking/udhcp/dhcpc.c
35===================================================================
36--- busybox-1.20.2.orig/networking/udhcp/dhcpc.c
37+++ busybox-1.20.2/networking/udhcp/dhcpc.c
38@@ -29,6 +29,9 @@
39 #include <netpacket/packet.h>
40 #include <linux/filter.h>
41
42+/* option whether to down the interface when reconfiguring */
43+static int allow_deconfig = 1;
44+
45 /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
46
47
48@@ -81,8 +84,9 @@ enum {
49 OPT_x = 1 << 18,
50 OPT_f = 1 << 19,
51 OPT_B = 1 << 20,
52+ OPT_D = 1 << 21,
53 /* The rest has variable bit positions, need to be clever */
54- OPTBIT_B = 20,
55+ OPTBIT_D = 21,
56 USE_FOR_MMU( OPTBIT_b,)
57 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
58 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
59@@ -1040,7 +1044,8 @@ static void perform_renew(void)
60 state = RENEW_REQUESTED;
61 break;
62 case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
63- udhcp_run_script(NULL, "deconfig");
64+ if (allow_deconfig)
65+ udhcp_run_script(NULL, "deconfig");
66 case REQUESTING:
67 case RELEASED:
68 change_listen_mode(LISTEN_RAW);
69@@ -1064,7 +1069,8 @@ static void perform_release(uint32_t ser
70 bb_info_msg("Unicasting a release of %s to %s",
71 inet_ntoa(temp_addr), buffer);
72 send_release(server_addr, requested_ip); /* unicast */
73- udhcp_run_script(NULL, "deconfig");
74+ if (allow_deconfig)
75+ udhcp_run_script(NULL, "deconfig");
76 }
77 bb_info_msg("Entering released state");
78
79@@ -1215,7 +1221,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
80 /* O,x: list; -T,-t,-A take numeric param */
81 opt_complementary = "O::x::T+:t+:A+" IF_UDHCP_VERBOSE(":vv") ;
82 IF_LONG_OPTS(applet_long_options = udhcpc_longopts;)
83- opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fB"
84+ opt = getopt32(argv, "CV:H:h:F:i:np:qRr:s:T:t:SA:O:ox:fBD"
85 USE_FOR_MMU("b")
86 IF_FEATURE_UDHCPC_ARPING("a")
87 IF_FEATURE_UDHCP_PORT("P:")
88@@ -1316,6 +1322,9 @@ int udhcpc_main(int argc UNUSED_PARAM, c
89 logmode |= LOGMODE_SYSLOG;
90 }
91
92+ if (opt & OPT_D)
93+ allow_deconfig = 0;
94+
95 /* Make sure fd 0,1,2 are open */
96 bb_sanitize_stdio();
97 /* Equivalent of doing a fflush after every \n */
98@@ -1330,7 +1339,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
99 srand(monotonic_us());
100
101 state = INIT_SELECTING;
102- udhcp_run_script(NULL, "deconfig");
103+ if (allow_deconfig)
104+ udhcp_run_script(NULL, "deconfig");
105 change_listen_mode(LISTEN_RAW);
106 packet_num = 0;
107 timeout = 0;
108@@ -1484,7 +1494,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
109 }
110 /* Timed out, enter init state */
111 bb_info_msg("Lease lost, entering init state");
112- udhcp_run_script(NULL, "deconfig");
113+ if (allow_deconfig)
114+ udhcp_run_script(NULL, "deconfig");
115 state = INIT_SELECTING;
116 client_config.first_secs = 0; /* make secs field count from 0 */
117 /*timeout = 0; - already is */
118@@ -1667,7 +1678,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
119 send_decline(/*xid,*/ server_addr, packet.yiaddr);
120
121 if (state != REQUESTING)
122- udhcp_run_script(NULL, "deconfig");
123+ if (allow_deconfig)
124+ udhcp_run_script(NULL, "deconfig");
125 change_listen_mode(LISTEN_RAW);
126 state = INIT_SELECTING;
127 client_config.first_secs = 0; /* make secs field count from 0 */
128@@ -1711,7 +1723,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
129 bb_info_msg("Received DHCP NAK");
130 udhcp_run_script(&packet, "nak");
131 if (state != REQUESTING)
132- udhcp_run_script(NULL, "deconfig");
133+ if (allow_deconfig)
134+ udhcp_run_script(NULL, "deconfig");
135 change_listen_mode(LISTEN_RAW);
136 sleep(3); /* avoid excessive network traffic */
137 state = INIT_SELECTING;
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/defconfig b/meta/recipes-core/busybox/busybox-1.21.1/defconfig
new file mode 100644
index 0000000000..4526121a44
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/defconfig
@@ -0,0 +1,1020 @@
1#
2# Automatically generated make config: don't edit
3# Busybox version: 1.20.2
4# Mon Aug 20 17:01:45 2012
5#
6CONFIG_HAVE_DOT_CONFIG=y
7
8#
9# Busybox Settings
10#
11
12#
13# General Configuration
14#
15# CONFIG_DESKTOP is not set
16# CONFIG_EXTRA_COMPAT is not set
17# CONFIG_INCLUDE_SUSv2 is not set
18# CONFIG_USE_PORTABLE_CODE is not set
19CONFIG_PLATFORM_LINUX=y
20CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
21# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
22# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
23CONFIG_SHOW_USAGE=y
24# CONFIG_FEATURE_VERBOSE_USAGE is not set
25CONFIG_FEATURE_COMPRESS_USAGE=y
26# CONFIG_FEATURE_INSTALLER is not set
27# CONFIG_INSTALL_NO_USR is not set
28# CONFIG_LOCALE_SUPPORT is not set
29# CONFIG_UNICODE_SUPPORT is not set
30# CONFIG_UNICODE_USING_LOCALE is not set
31# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
32CONFIG_SUBST_WCHAR=0
33CONFIG_LAST_SUPPORTED_WCHAR=0
34# CONFIG_UNICODE_COMBINING_WCHARS is not set
35# CONFIG_UNICODE_WIDE_WCHARS is not set
36# CONFIG_UNICODE_BIDI_SUPPORT is not set
37# CONFIG_UNICODE_NEUTRAL_TABLE is not set
38# CONFIG_UNICODE_PRESERVE_BROKEN is not set
39CONFIG_LONG_OPTS=y
40CONFIG_FEATURE_DEVPTS=y
41# CONFIG_FEATURE_CLEAN_UP is not set
42CONFIG_FEATURE_UTMP=y
43# CONFIG_FEATURE_WTMP is not set
44CONFIG_FEATURE_PIDFILE=y
45CONFIG_FEATURE_SUID=y
46CONFIG_FEATURE_SUID_CONFIG=y
47CONFIG_FEATURE_SUID_CONFIG_QUIET=y
48# CONFIG_SELINUX is not set
49# CONFIG_FEATURE_PREFER_APPLETS is not set
50CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
51CONFIG_FEATURE_SYSLOG=y
52CONFIG_FEATURE_HAVE_RPC=y
53
54#
55# Build Options
56#
57# CONFIG_STATIC is not set
58# CONFIG_PIE is not set
59# CONFIG_NOMMU is not set
60# CONFIG_BUILD_LIBBUSYBOX is not set
61# CONFIG_FEATURE_INDIVIDUAL is not set
62# CONFIG_FEATURE_SHARED_BUSYBOX is not set
63CONFIG_LFS=y
64# CONFIG_CROSS_COMPILER_PREFIX is not set
65CONFIG_SYSROOT=""
66# CONFIG_EXTRA_CFLAGS is not set
67CONFIG_EXTRA_LDFLAGS=""
68CONFIG_EXTRA_LDLIBS=""
69
70#
71# Debugging Options
72#
73# CONFIG_DEBUG is not set
74# CONFIG_DEBUG_PESSIMIZE is not set
75# CONFIG_WERROR is not set
76CONFIG_NO_DEBUG_LIB=y
77# CONFIG_DMALLOC is not set
78# CONFIG_EFENCE is not set
79
80#
81# Installation Options ("make install" behavior)
82#
83CONFIG_INSTALL_APPLET_SYMLINKS=y
84# CONFIG_INSTALL_APPLET_HARDLINKS is not set
85# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
86# CONFIG_INSTALL_APPLET_DONT is not set
87# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
88# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
89# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
90CONFIG_PREFIX="./_install"
91
92#
93# Busybox Library Tuning
94#
95CONFIG_FEATURE_SYSTEMD=y
96CONFIG_FEATURE_RTMINMAX=y
97CONFIG_PASSWORD_MINLEN=6
98CONFIG_MD5_SMALL=1
99CONFIG_FEATURE_FAST_TOP=y
100# CONFIG_FEATURE_ETC_NETWORKS is not set
101CONFIG_FEATURE_USE_TERMIOS=y
102CONFIG_FEATURE_EDITING=y
103CONFIG_FEATURE_EDITING_MAX_LEN=1024
104# CONFIG_FEATURE_EDITING_VI is not set
105CONFIG_FEATURE_EDITING_HISTORY=15
106CONFIG_FEATURE_EDITING_SAVEHISTORY=y
107# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
108# CONFIG_FEATURE_REVERSE_SEARCH is not set
109CONFIG_FEATURE_TAB_COMPLETION=y
110CONFIG_FEATURE_USERNAME_COMPLETION=y
111CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
112# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
113CONFIG_FEATURE_NON_POSIX_CP=y
114# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
115CONFIG_FEATURE_COPYBUF_KB=4
116CONFIG_FEATURE_SKIP_ROOTFS=y
117CONFIG_MONOTONIC_SYSCALL=y
118CONFIG_IOCTL_HEX2STR_ERROR=y
119CONFIG_FEATURE_HWIB=y
120
121#
122# Applets
123#
124
125#
126# Archival Utilities
127#
128# CONFIG_FEATURE_SEAMLESS_XZ is not set
129CONFIG_FEATURE_SEAMLESS_LZMA=y
130CONFIG_FEATURE_SEAMLESS_BZ2=y
131CONFIG_FEATURE_SEAMLESS_GZ=y
132CONFIG_FEATURE_SEAMLESS_Z=y
133CONFIG_AR=y
134# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
135# CONFIG_FEATURE_AR_CREATE is not set
136CONFIG_BUNZIP2=y
137# CONFIG_BZIP2 is not set
138CONFIG_CPIO=y
139# CONFIG_FEATURE_CPIO_O is not set
140# CONFIG_FEATURE_CPIO_P is not set
141# CONFIG_DPKG is not set
142# CONFIG_DPKG_DEB is not set
143# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
144CONFIG_GUNZIP=y
145CONFIG_GZIP=y
146# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
147CONFIG_GZIP_FAST=0
148# CONFIG_LZOP is not set
149# CONFIG_LZOP_COMPR_HIGH is not set
150# CONFIG_RPM2CPIO is not set
151# CONFIG_RPM is not set
152CONFIG_TAR=y
153CONFIG_FEATURE_TAR_CREATE=y
154CONFIG_FEATURE_TAR_AUTODETECT=y
155CONFIG_FEATURE_TAR_FROM=y
156CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
157# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
158CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
159# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
160# CONFIG_FEATURE_TAR_TO_COMMAND is not set
161# CONFIG_FEATURE_TAR_UNAME_GNAME is not set
162# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set
163# CONFIG_FEATURE_TAR_SELINUX is not set
164# CONFIG_UNCOMPRESS is not set
165# CONFIG_UNLZMA is not set
166# CONFIG_FEATURE_LZMA_FAST is not set
167# CONFIG_LZMA is not set
168# CONFIG_UNXZ is not set
169# CONFIG_XZ is not set
170CONFIG_UNZIP=y
171
172#
173# Coreutils
174#
175CONFIG_BASENAME=y
176CONFIG_CAT=y
177CONFIG_DATE=y
178# CONFIG_FEATURE_DATE_ISOFMT is not set
179# CONFIG_FEATURE_DATE_NANO is not set
180CONFIG_FEATURE_DATE_COMPAT=y
181# CONFIG_HOSTID is not set
182CONFIG_ID=y
183CONFIG_GROUPS=y
184CONFIG_TEST=y
185CONFIG_FEATURE_TEST_64=y
186CONFIG_TOUCH=y
187CONFIG_FEATURE_TOUCH_SUSV3=y
188CONFIG_TR=y
189CONFIG_FEATURE_TR_CLASSES=y
190# CONFIG_FEATURE_TR_EQUIV is not set
191# CONFIG_BASE64 is not set
192CONFIG_WHO=y
193CONFIG_USERS=y
194# CONFIG_CAL is not set
195# CONFIG_CATV is not set
196CONFIG_CHGRP=y
197CONFIG_CHMOD=y
198CONFIG_CHOWN=y
199# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
200CONFIG_CHROOT=y
201# CONFIG_CKSUM is not set
202# CONFIG_COMM is not set
203CONFIG_CP=y
204# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
205CONFIG_CUT=y
206CONFIG_DD=y
207CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
208# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
209# CONFIG_FEATURE_DD_IBS_OBS is not set
210CONFIG_DF=y
211# CONFIG_FEATURE_DF_FANCY is not set
212CONFIG_DIRNAME=y
213# CONFIG_DOS2UNIX is not set
214# CONFIG_UNIX2DOS is not set
215CONFIG_DU=y
216CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
217CONFIG_ECHO=y
218CONFIG_FEATURE_FANCY_ECHO=y
219CONFIG_ENV=y
220CONFIG_FEATURE_ENV_LONG_OPTIONS=y
221# CONFIG_EXPAND is not set
222# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
223CONFIG_EXPR=y
224CONFIG_EXPR_MATH_SUPPORT_64=y
225CONFIG_FALSE=y
226# CONFIG_FOLD is not set
227# CONFIG_FSYNC is not set
228CONFIG_HEAD=y
229# CONFIG_FEATURE_FANCY_HEAD is not set
230# CONFIG_INSTALL is not set
231# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
232CONFIG_LN=y
233CONFIG_LOGNAME=y
234CONFIG_LS=y
235CONFIG_FEATURE_LS_FILETYPES=y
236CONFIG_FEATURE_LS_FOLLOWLINKS=y
237CONFIG_FEATURE_LS_RECURSIVE=y
238CONFIG_FEATURE_LS_SORTFILES=y
239CONFIG_FEATURE_LS_TIMESTAMPS=y
240CONFIG_FEATURE_LS_USERNAME=y
241CONFIG_FEATURE_LS_COLOR=y
242# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
243CONFIG_MD5SUM=y
244CONFIG_MKDIR=y
245CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
246CONFIG_MKFIFO=y
247CONFIG_MKNOD=y
248CONFIG_MV=y
249# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
250# CONFIG_NICE is not set
251CONFIG_NOHUP=y
252CONFIG_OD=y
253# CONFIG_PRINTENV is not set
254CONFIG_PRINTF=y
255CONFIG_PWD=y
256CONFIG_READLINK=y
257CONFIG_FEATURE_READLINK_FOLLOW=y
258CONFIG_REALPATH=y
259CONFIG_RM=y
260CONFIG_RMDIR=y
261# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
262CONFIG_SEQ=y
263# CONFIG_SHA1SUM is not set
264# CONFIG_SHA256SUM is not set
265# CONFIG_SHA512SUM is not set
266CONFIG_SLEEP=y
267CONFIG_FEATURE_FANCY_SLEEP=y
268# CONFIG_FEATURE_FLOAT_SLEEP is not set
269CONFIG_SORT=y
270CONFIG_FEATURE_SORT_BIG=y
271# CONFIG_SPLIT is not set
272# CONFIG_FEATURE_SPLIT_FANCY is not set
273CONFIG_STAT=y
274CONFIG_FEATURE_STAT_FORMAT=y
275CONFIG_STTY=y
276# CONFIG_SUM is not set
277CONFIG_SYNC=y
278# CONFIG_TAC is not set
279CONFIG_TAIL=y
280CONFIG_FEATURE_FANCY_TAIL=y
281CONFIG_TEE=y
282# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
283CONFIG_TRUE=y
284CONFIG_TTY=y
285CONFIG_UNAME=y
286# CONFIG_UNEXPAND is not set
287# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
288CONFIG_UNIQ=y
289CONFIG_USLEEP=y
290# CONFIG_UUDECODE is not set
291# CONFIG_UUENCODE is not set
292CONFIG_WC=y
293# CONFIG_FEATURE_WC_LARGE is not set
294CONFIG_WHOAMI=y
295CONFIG_YES=y
296
297#
298# Common options for cp and mv
299#
300# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
301
302#
303# Common options for ls, more and telnet
304#
305CONFIG_FEATURE_AUTOWIDTH=y
306
307#
308# Common options for df, du, ls
309#
310CONFIG_FEATURE_HUMAN_READABLE=y
311
312#
313# Common options for md5sum, sha1sum, sha256sum, sha512sum
314#
315CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
316
317#
318# Console Utilities
319#
320CONFIG_CHVT=y
321# CONFIG_FGCONSOLE is not set
322CONFIG_CLEAR=y
323CONFIG_DEALLOCVT=y
324CONFIG_DUMPKMAP=y
325# CONFIG_KBD_MODE is not set
326CONFIG_LOADFONT=y
327CONFIG_LOADKMAP=y
328CONFIG_OPENVT=y
329CONFIG_RESET=y
330# CONFIG_RESIZE is not set
331# CONFIG_FEATURE_RESIZE_PRINT is not set
332CONFIG_SETCONSOLE=y
333# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
334# CONFIG_SETFONT is not set
335# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
336CONFIG_DEFAULT_SETFONT_DIR=""
337# CONFIG_SETKEYCODES is not set
338# CONFIG_SETLOGCONS is not set
339# CONFIG_SHOWKEY is not set
340
341#
342# Common options for loadfont and setfont
343#
344# CONFIG_FEATURE_LOADFONT_PSF2 is not set
345# CONFIG_FEATURE_LOADFONT_RAW is not set
346
347#
348# Debian Utilities
349#
350CONFIG_MKTEMP=y
351# CONFIG_PIPE_PROGRESS is not set
352CONFIG_RUN_PARTS=y
353CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
354# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
355CONFIG_START_STOP_DAEMON=y
356CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
357CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
358CONFIG_WHICH=y
359
360#
361# Editors
362#
363CONFIG_PATCH=y
364CONFIG_VI=y
365CONFIG_FEATURE_VI_MAX_LEN=1024
366CONFIG_FEATURE_VI_8BIT=y
367CONFIG_FEATURE_VI_COLON=y
368CONFIG_FEATURE_VI_YANKMARK=y
369CONFIG_FEATURE_VI_SEARCH=y
370# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
371CONFIG_FEATURE_VI_USE_SIGNALS=y
372# CONFIG_FEATURE_VI_DOT_CMD is not set
373# CONFIG_FEATURE_VI_READONLY is not set
374# CONFIG_FEATURE_VI_SETOPTS is not set
375# CONFIG_FEATURE_VI_SET is not set
376CONFIG_FEATURE_VI_WIN_RESIZE=y
377# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
378CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
379CONFIG_AWK=y
380# CONFIG_FEATURE_AWK_LIBM is not set
381CONFIG_CMP=y
382CONFIG_DIFF=y
383# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
384CONFIG_FEATURE_DIFF_DIR=y
385# CONFIG_ED is not set
386CONFIG_SED=y
387CONFIG_FEATURE_ALLOW_EXEC=y
388
389#
390# Finding Utilities
391#
392CONFIG_FIND=y
393CONFIG_FEATURE_FIND_PRINT0=y
394CONFIG_FEATURE_FIND_MTIME=y
395CONFIG_FEATURE_FIND_MMIN=y
396CONFIG_FEATURE_FIND_PERM=y
397CONFIG_FEATURE_FIND_TYPE=y
398CONFIG_FEATURE_FIND_XDEV=y
399CONFIG_FEATURE_FIND_MAXDEPTH=y
400CONFIG_FEATURE_FIND_NEWER=y
401# CONFIG_FEATURE_FIND_INUM is not set
402CONFIG_FEATURE_FIND_EXEC=y
403CONFIG_FEATURE_FIND_USER=y
404CONFIG_FEATURE_FIND_GROUP=y
405CONFIG_FEATURE_FIND_NOT=y
406CONFIG_FEATURE_FIND_DEPTH=y
407CONFIG_FEATURE_FIND_PAREN=y
408CONFIG_FEATURE_FIND_SIZE=y
409CONFIG_FEATURE_FIND_PRUNE=y
410# CONFIG_FEATURE_FIND_DELETE is not set
411CONFIG_FEATURE_FIND_PATH=y
412CONFIG_FEATURE_FIND_REGEX=y
413# CONFIG_FEATURE_FIND_CONTEXT is not set
414# CONFIG_FEATURE_FIND_LINKS is not set
415CONFIG_GREP=y
416CONFIG_FEATURE_GREP_EGREP_ALIAS=y
417CONFIG_FEATURE_GREP_FGREP_ALIAS=y
418CONFIG_FEATURE_GREP_CONTEXT=y
419CONFIG_XARGS=y
420# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
421# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
422# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
423# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
424
425#
426# Init Utilities
427#
428# CONFIG_BOOTCHARTD is not set
429# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
430# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
431CONFIG_HALT=y
432# CONFIG_FEATURE_CALL_TELINIT is not set
433CONFIG_TELINIT_PATH=""
434# CONFIG_INIT is not set
435# CONFIG_FEATURE_USE_INITTAB is not set
436# CONFIG_FEATURE_KILL_REMOVED is not set
437CONFIG_FEATURE_KILL_DELAY=0
438# CONFIG_FEATURE_INIT_SCTTY is not set
439# CONFIG_FEATURE_INIT_SYSLOG is not set
440# CONFIG_FEATURE_EXTRA_QUIET is not set
441# CONFIG_FEATURE_INIT_COREDUMPS is not set
442# CONFIG_FEATURE_INITRD is not set
443CONFIG_INIT_TERMINAL_TYPE=""
444# CONFIG_MESG is not set
445# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
446
447#
448# Login/Password Management Utilities
449#
450# CONFIG_ADD_SHELL is not set
451# CONFIG_REMOVE_SHELL is not set
452# CONFIG_FEATURE_SHADOWPASSWDS is not set
453# CONFIG_USE_BB_PWD_GRP is not set
454# CONFIG_USE_BB_SHADOW is not set
455CONFIG_USE_BB_CRYPT=y
456# CONFIG_USE_BB_CRYPT_SHA is not set
457# CONFIG_ADDUSER is not set
458# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
459# CONFIG_FEATURE_CHECK_NAMES is not set
460CONFIG_FIRST_SYSTEM_ID=100
461CONFIG_LAST_SYSTEM_ID=999
462# CONFIG_ADDGROUP is not set
463# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
464# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
465# CONFIG_DELUSER is not set
466# CONFIG_DELGROUP is not set
467# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
468# CONFIG_GETTY is not set
469# CONFIG_LOGIN is not set
470# CONFIG_LOGIN_SESSION_AS_CHILD is not set
471# CONFIG_PAM is not set
472# CONFIG_LOGIN_SCRIPTS is not set
473# CONFIG_FEATURE_NOLOGIN is not set
474# CONFIG_FEATURE_SECURETTY is not set
475# CONFIG_PASSWD is not set
476# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
477# CONFIG_CRYPTPW is not set
478# CONFIG_CHPASSWD is not set
479CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
480# CONFIG_SU is not set
481# CONFIG_FEATURE_SU_SYSLOG is not set
482# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
483# CONFIG_SULOGIN is not set
484# CONFIG_VLOCK is not set
485
486#
487# Linux Ext2 FS Progs
488#
489CONFIG_CHATTR=y
490CONFIG_FSCK=y
491# CONFIG_LSATTR is not set
492# CONFIG_TUNE2FS is not set
493
494#
495# Linux Module Utilities
496#
497# CONFIG_MODINFO is not set
498# CONFIG_MODPROBE_SMALL is not set
499# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
500# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
501CONFIG_INSMOD=y
502CONFIG_RMMOD=y
503CONFIG_LSMOD=y
504# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
505CONFIG_MODPROBE=y
506# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
507# CONFIG_DEPMOD is not set
508
509#
510# Options common to multiple modutils
511#
512# CONFIG_FEATURE_2_4_MODULES is not set
513# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
514# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
515# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
516# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
517# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
518# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
519CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
520CONFIG_FEATURE_MODUTILS_ALIAS=y
521CONFIG_FEATURE_MODUTILS_SYMBOLS=y
522CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
523CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
524
525#
526# Linux System Utilities
527#
528# CONFIG_BLOCKDEV is not set
529# CONFIG_MDEV is not set
530# CONFIG_FEATURE_MDEV_CONF is not set
531# CONFIG_FEATURE_MDEV_RENAME is not set
532# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
533# CONFIG_FEATURE_MDEV_EXEC is not set
534# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
535# CONFIG_REV is not set
536# CONFIG_ACPID is not set
537# CONFIG_FEATURE_ACPID_COMPAT is not set
538# CONFIG_BLKID is not set
539# CONFIG_FEATURE_BLKID_TYPE is not set
540CONFIG_DMESG=y
541CONFIG_FEATURE_DMESG_PRETTY=y
542CONFIG_FBSET=y
543CONFIG_FEATURE_FBSET_FANCY=y
544CONFIG_FEATURE_FBSET_READMODE=y
545# CONFIG_FDFLUSH is not set
546# CONFIG_FDFORMAT is not set
547CONFIG_FDISK=y
548# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
549CONFIG_FEATURE_FDISK_WRITABLE=y
550# CONFIG_FEATURE_AIX_LABEL is not set
551# CONFIG_FEATURE_SGI_LABEL is not set
552# CONFIG_FEATURE_SUN_LABEL is not set
553# CONFIG_FEATURE_OSF_LABEL is not set
554# CONFIG_FEATURE_GPT_LABEL is not set
555# CONFIG_FEATURE_FDISK_ADVANCED is not set
556# CONFIG_FINDFS is not set
557CONFIG_FLOCK=y
558# CONFIG_FREERAMDISK is not set
559CONFIG_FSCK_MINIX=y
560# CONFIG_MKFS_EXT2 is not set
561CONFIG_MKFS_MINIX=y
562CONFIG_FEATURE_MINIX2=y
563# CONFIG_MKFS_REISER is not set
564# CONFIG_MKFS_VFAT is not set
565# CONFIG_GETOPT is not set
566# CONFIG_FEATURE_GETOPT_LONG is not set
567CONFIG_HEXDUMP=y
568# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
569# CONFIG_HD is not set
570CONFIG_HWCLOCK=y
571CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
572CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
573# CONFIG_IPCRM is not set
574# CONFIG_IPCS is not set
575CONFIG_LOSETUP=y
576# CONFIG_LSPCI is not set
577# CONFIG_LSUSB is not set
578CONFIG_MKSWAP=y
579# CONFIG_FEATURE_MKSWAP_UUID is not set
580CONFIG_MORE=y
581CONFIG_MOUNT=y
582# CONFIG_FEATURE_MOUNT_FAKE is not set
583# CONFIG_FEATURE_MOUNT_VERBOSE is not set
584# CONFIG_FEATURE_MOUNT_HELPERS is not set
585# CONFIG_FEATURE_MOUNT_LABEL is not set
586CONFIG_FEATURE_MOUNT_NFS=y
587# CONFIG_FEATURE_MOUNT_CIFS is not set
588CONFIG_FEATURE_MOUNT_FLAGS=y
589CONFIG_FEATURE_MOUNT_FSTAB=y
590CONFIG_PIVOT_ROOT=y
591CONFIG_RDATE=y
592# CONFIG_RDEV is not set
593# CONFIG_READPROFILE is not set
594# CONFIG_RTCWAKE is not set
595# CONFIG_SCRIPT is not set
596# CONFIG_SCRIPTREPLAY is not set
597# CONFIG_SETARCH is not set
598CONFIG_SWAPONOFF=y
599CONFIG_FEATURE_SWAPON_PRI=y
600CONFIG_SWITCH_ROOT=y
601CONFIG_UMOUNT=y
602CONFIG_FEATURE_UMOUNT_ALL=y
603
604#
605# Common options for mount/umount
606#
607CONFIG_FEATURE_MOUNT_LOOP=y
608CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
609# CONFIG_FEATURE_MTAB_SUPPORT is not set
610# CONFIG_VOLUMEID is not set
611# CONFIG_FEATURE_VOLUMEID_EXT is not set
612# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
613# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
614# CONFIG_FEATURE_VOLUMEID_FAT is not set
615# CONFIG_FEATURE_VOLUMEID_HFS is not set
616# CONFIG_FEATURE_VOLUMEID_JFS is not set
617# CONFIG_FEATURE_VOLUMEID_XFS is not set
618# CONFIG_FEATURE_VOLUMEID_NTFS is not set
619# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
620# CONFIG_FEATURE_VOLUMEID_UDF is not set
621# CONFIG_FEATURE_VOLUMEID_LUKS is not set
622# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
623# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
624# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
625# CONFIG_FEATURE_VOLUMEID_SYSV is not set
626# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
627# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
628
629#
630# Miscellaneous Utilities
631#
632# CONFIG_CONSPY is not set
633CONFIG_LESS=y
634CONFIG_FEATURE_LESS_MAXLINES=9999999
635CONFIG_FEATURE_LESS_BRACKETS=y
636CONFIG_FEATURE_LESS_FLAGS=y
637# CONFIG_FEATURE_LESS_MARKS is not set
638# CONFIG_FEATURE_LESS_REGEXP is not set
639# CONFIG_FEATURE_LESS_WINCH is not set
640# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
641# CONFIG_FEATURE_LESS_DASHCMD is not set
642# CONFIG_FEATURE_LESS_LINENUMS is not set
643# CONFIG_NANDWRITE is not set
644# CONFIG_NANDDUMP is not set
645# CONFIG_SETSERIAL is not set
646# CONFIG_UBIATTACH is not set
647# CONFIG_UBIDETACH is not set
648# CONFIG_UBIMKVOL is not set
649# CONFIG_UBIRMVOL is not set
650# CONFIG_UBIRSVOL is not set
651# CONFIG_UBIUPDATEVOL is not set
652# CONFIG_ADJTIMEX is not set
653# CONFIG_BBCONFIG is not set
654# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
655# CONFIG_BEEP is not set
656CONFIG_FEATURE_BEEP_FREQ=0
657CONFIG_FEATURE_BEEP_LENGTH_MS=0
658# CONFIG_CHAT is not set
659# CONFIG_FEATURE_CHAT_NOFAIL is not set
660# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
661# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set
662# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
663# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
664# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
665# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
666# CONFIG_CHRT is not set
667# CONFIG_CROND is not set
668# CONFIG_FEATURE_CROND_D is not set
669# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
670CONFIG_FEATURE_CROND_DIR=""
671# CONFIG_CRONTAB is not set
672CONFIG_DC=y
673# CONFIG_FEATURE_DC_LIBM is not set
674# CONFIG_DEVFSD is not set
675# CONFIG_DEVFSD_MODLOAD is not set
676# CONFIG_DEVFSD_FG_NP is not set
677# CONFIG_DEVFSD_VERBOSE is not set
678# CONFIG_FEATURE_DEVFS is not set
679# CONFIG_DEVMEM is not set
680# CONFIG_EJECT is not set
681# CONFIG_FEATURE_EJECT_SCSI is not set
682# CONFIG_FBSPLASH is not set
683# CONFIG_FLASHCP is not set
684# CONFIG_FLASH_LOCK is not set
685# CONFIG_FLASH_UNLOCK is not set
686# CONFIG_FLASH_ERASEALL is not set
687# CONFIG_IONICE is not set
688# CONFIG_INOTIFYD is not set
689# CONFIG_LAST is not set
690# CONFIG_FEATURE_LAST_SMALL is not set
691# CONFIG_FEATURE_LAST_FANCY is not set
692# CONFIG_HDPARM is not set
693# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
694# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
695# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
696# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
697# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
698# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
699# CONFIG_MAKEDEVS is not set
700# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
701# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
702# CONFIG_MAN is not set
703CONFIG_MICROCOM=y
704# CONFIG_MOUNTPOINT is not set
705# CONFIG_MT is not set
706# CONFIG_RAIDAUTORUN is not set
707# CONFIG_READAHEAD is not set
708CONFIG_RFKILL=y
709# CONFIG_RUNLEVEL is not set
710# CONFIG_RX is not set
711# CONFIG_SETSID is not set
712CONFIG_STRINGS=y
713# CONFIG_TASKSET is not set
714# CONFIG_FEATURE_TASKSET_FANCY is not set
715CONFIG_TIME=y
716# CONFIG_TIMEOUT is not set
717# CONFIG_TTYSIZE is not set
718# CONFIG_VOLNAME is not set
719# CONFIG_WALL is not set
720# CONFIG_WATCHDOG is not set
721
722#
723# Networking Utilities
724#
725# CONFIG_NAMEIF is not set
726# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
727# CONFIG_NBDCLIENT is not set
728CONFIG_NC=y
729# CONFIG_NC_SERVER is not set
730# CONFIG_NC_EXTRA is not set
731# CONFIG_NC_110_COMPAT is not set
732CONFIG_PING=y
733CONFIG_PING6=y
734CONFIG_FEATURE_FANCY_PING=y
735# CONFIG_WHOIS is not set
736CONFIG_FEATURE_IPV6=y
737# CONFIG_FEATURE_UNIX_LOCAL is not set
738CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
739# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
740# CONFIG_ARP is not set
741# CONFIG_ARPING is not set
742# CONFIG_BRCTL is not set
743# CONFIG_FEATURE_BRCTL_FANCY is not set
744# CONFIG_FEATURE_BRCTL_SHOW is not set
745# CONFIG_DNSD is not set
746# CONFIG_ETHER_WAKE is not set
747# CONFIG_FAKEIDENTD is not set
748# CONFIG_FTPD is not set
749# CONFIG_FEATURE_FTP_WRITE is not set
750# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
751# CONFIG_FTPGET is not set
752# CONFIG_FTPPUT is not set
753# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
754CONFIG_HOSTNAME=y
755# CONFIG_HTTPD is not set
756# CONFIG_FEATURE_HTTPD_RANGES is not set
757# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
758# CONFIG_FEATURE_HTTPD_SETUID is not set
759# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
760# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
761# CONFIG_FEATURE_HTTPD_CGI is not set
762# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
763# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
764# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
765# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
766# CONFIG_FEATURE_HTTPD_PROXY is not set
767# CONFIG_FEATURE_HTTPD_GZIP is not set
768CONFIG_IFCONFIG=y
769CONFIG_FEATURE_IFCONFIG_STATUS=y
770# CONFIG_FEATURE_IFCONFIG_SLIP is not set
771# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
772CONFIG_FEATURE_IFCONFIG_HW=y
773# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
774# CONFIG_IFENSLAVE is not set
775# CONFIG_IFPLUGD is not set
776CONFIG_IFUPDOWN=y
777CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
778# CONFIG_FEATURE_IFUPDOWN_IP is not set
779# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
780CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
781CONFIG_FEATURE_IFUPDOWN_IPV4=y
782CONFIG_FEATURE_IFUPDOWN_IPV6=y
783CONFIG_FEATURE_IFUPDOWN_MAPPING=y
784# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
785# CONFIG_INETD is not set
786# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
787# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
788# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
789# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
790# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
791# CONFIG_FEATURE_INETD_RPC is not set
792CONFIG_IP=y
793CONFIG_FEATURE_IP_ADDRESS=y
794CONFIG_FEATURE_IP_LINK=y
795CONFIG_FEATURE_IP_ROUTE=y
796CONFIG_FEATURE_IP_TUNNEL=y
797# CONFIG_FEATURE_IP_RULE is not set
798# CONFIG_FEATURE_IP_SHORT_FORMS is not set
799# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
800# CONFIG_IPADDR is not set
801# CONFIG_IPLINK is not set
802# CONFIG_IPROUTE is not set
803# CONFIG_IPTUNNEL is not set
804# CONFIG_IPRULE is not set
805# CONFIG_IPCALC is not set
806# CONFIG_FEATURE_IPCALC_FANCY is not set
807# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
808CONFIG_NETSTAT=y
809# CONFIG_FEATURE_NETSTAT_WIDE is not set
810# CONFIG_FEATURE_NETSTAT_PRG is not set
811CONFIG_NSLOOKUP=y
812# CONFIG_NTPD is not set
813# CONFIG_FEATURE_NTPD_SERVER is not set
814# CONFIG_PSCAN is not set
815CONFIG_ROUTE=y
816# CONFIG_SLATTACH is not set
817# CONFIG_TCPSVD is not set
818CONFIG_TELNET=y
819# CONFIG_FEATURE_TELNET_TTYPE is not set
820CONFIG_FEATURE_TELNET_AUTOLOGIN=y
821# CONFIG_TELNETD is not set
822# CONFIG_FEATURE_TELNETD_STANDALONE is not set
823# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
824CONFIG_TFTP=y
825# CONFIG_TFTPD is not set
826
827#
828# Common options for tftp/tftpd
829#
830CONFIG_FEATURE_TFTP_GET=y
831CONFIG_FEATURE_TFTP_PUT=y
832# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
833# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
834# CONFIG_TFTP_DEBUG is not set
835CONFIG_TRACEROUTE=y
836# CONFIG_TRACEROUTE6 is not set
837# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
838# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
839# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
840# CONFIG_TUNCTL is not set
841# CONFIG_FEATURE_TUNCTL_UG is not set
842# CONFIG_UDHCPC6 is not set
843CONFIG_UDHCPD=y
844# CONFIG_DHCPRELAY is not set
845CONFIG_DUMPLEASES=y
846# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
847# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
848CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
849CONFIG_UDHCPC=y
850CONFIG_FEATURE_UDHCPC_ARPING=y
851# CONFIG_FEATURE_UDHCP_PORT is not set
852CONFIG_UDHCP_DEBUG=0
853# CONFIG_FEATURE_UDHCP_RFC3397 is not set
854# CONFIG_FEATURE_UDHCP_8021Q is not set
855CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
856CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
857CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
858# CONFIG_UDPSVD is not set
859# CONFIG_VCONFIG is not set
860CONFIG_WGET=y
861CONFIG_FEATURE_WGET_STATUSBAR=y
862CONFIG_FEATURE_WGET_AUTHENTICATION=y
863CONFIG_FEATURE_WGET_LONG_OPTIONS=y
864CONFIG_FEATURE_WGET_TIMEOUT=y
865# CONFIG_ZCIP is not set
866
867#
868# Print Utilities
869#
870# CONFIG_LPD is not set
871# CONFIG_LPR is not set
872# CONFIG_LPQ is not set
873
874#
875# Mail Utilities
876#
877# CONFIG_MAKEMIME is not set
878CONFIG_FEATURE_MIME_CHARSET=""
879# CONFIG_POPMAILDIR is not set
880# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
881# CONFIG_REFORMIME is not set
882# CONFIG_FEATURE_REFORMIME_COMPAT is not set
883# CONFIG_SENDMAIL is not set
884
885#
886# Process Utilities
887#
888# CONFIG_IOSTAT is not set
889# CONFIG_LSOF is not set
890# CONFIG_MPSTAT is not set
891# CONFIG_NMETER is not set
892# CONFIG_PMAP is not set
893# CONFIG_POWERTOP is not set
894# CONFIG_PSTREE is not set
895# CONFIG_PWDX is not set
896# CONFIG_SMEMCAP is not set
897CONFIG_UPTIME=y
898# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
899CONFIG_FREE=y
900CONFIG_FUSER=y
901CONFIG_KILL=y
902CONFIG_KILLALL=y
903# CONFIG_KILLALL5 is not set
904# CONFIG_PGREP is not set
905CONFIG_PIDOF=y
906# CONFIG_FEATURE_PIDOF_SINGLE is not set
907# CONFIG_FEATURE_PIDOF_OMIT is not set
908# CONFIG_PKILL is not set
909CONFIG_PS=y
910CONFIG_FEATURE_PS_WIDE=y
911CONFIG_FEATURE_PS_LONG=y
912# CONFIG_FEATURE_PS_TIME is not set
913# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
914# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
915CONFIG_RENICE=y
916CONFIG_BB_SYSCTL=y
917CONFIG_TOP=y
918CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
919CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
920# CONFIG_FEATURE_TOP_SMP_CPU is not set
921# CONFIG_FEATURE_TOP_DECIMALS is not set
922# CONFIG_FEATURE_TOP_SMP_PROCESS is not set
923# CONFIG_FEATURE_TOPMEM is not set
924# CONFIG_FEATURE_SHOW_THREADS is not set
925CONFIG_WATCH=y
926
927#
928# Runit Utilities
929#
930# CONFIG_RUNSV is not set
931# CONFIG_RUNSVDIR is not set
932# CONFIG_FEATURE_RUNSVDIR_LOG is not set
933# CONFIG_SV is not set
934CONFIG_SV_DEFAULT_SERVICE_DIR=""
935# CONFIG_SVLOGD is not set
936# CONFIG_CHPST is not set
937# CONFIG_SETUIDGID is not set
938# CONFIG_ENVUIDGID is not set
939# CONFIG_ENVDIR is not set
940# CONFIG_SOFTLIMIT is not set
941# CONFIG_CHCON is not set
942# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
943# CONFIG_GETENFORCE is not set
944# CONFIG_GETSEBOOL is not set
945# CONFIG_LOAD_POLICY is not set
946# CONFIG_MATCHPATHCON is not set
947# CONFIG_RESTORECON is not set
948# CONFIG_RUNCON is not set
949# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
950# CONFIG_SELINUXENABLED is not set
951# CONFIG_SETENFORCE is not set
952# CONFIG_SETFILES is not set
953# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
954# CONFIG_SETSEBOOL is not set
955# CONFIG_SESTATUS is not set
956
957#
958# Shells
959#
960CONFIG_ASH=y
961CONFIG_ASH_BASH_COMPAT=y
962# CONFIG_ASH_IDLE_TIMEOUT is not set
963CONFIG_ASH_JOB_CONTROL=y
964CONFIG_ASH_ALIAS=y
965CONFIG_ASH_GETOPTS=y
966CONFIG_ASH_BUILTIN_ECHO=y
967CONFIG_ASH_BUILTIN_PRINTF=y
968CONFIG_ASH_BUILTIN_TEST=y
969# CONFIG_ASH_CMDCMD is not set
970# CONFIG_ASH_MAIL is not set
971CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
972# CONFIG_ASH_RANDOM_SUPPORT is not set
973CONFIG_ASH_EXPAND_PRMT=y
974# CONFIG_CTTYHACK is not set
975# CONFIG_HUSH is not set
976# CONFIG_HUSH_BASH_COMPAT is not set
977# CONFIG_HUSH_BRACE_EXPANSION is not set
978# CONFIG_HUSH_HELP is not set
979# CONFIG_HUSH_INTERACTIVE is not set
980# CONFIG_HUSH_SAVEHISTORY is not set
981# CONFIG_HUSH_JOB is not set
982# CONFIG_HUSH_TICK is not set
983# CONFIG_HUSH_IF is not set
984# CONFIG_HUSH_LOOPS is not set
985# CONFIG_HUSH_CASE is not set
986# CONFIG_HUSH_FUNCTIONS is not set
987# CONFIG_HUSH_LOCAL is not set
988# CONFIG_HUSH_RANDOM_SUPPORT is not set
989# CONFIG_HUSH_EXPORT_N is not set
990# CONFIG_HUSH_MODE_X is not set
991# CONFIG_MSH is not set
992CONFIG_FEATURE_SH_IS_ASH=y
993# CONFIG_FEATURE_SH_IS_HUSH is not set
994# CONFIG_FEATURE_SH_IS_NONE is not set
995# CONFIG_FEATURE_BASH_IS_ASH is not set
996# CONFIG_FEATURE_BASH_IS_HUSH is not set
997CONFIG_FEATURE_BASH_IS_NONE=y
998CONFIG_SH_MATH_SUPPORT=y
999# CONFIG_SH_MATH_SUPPORT_64 is not set
1000CONFIG_FEATURE_SH_EXTRA_QUIET=y
1001# CONFIG_FEATURE_SH_STANDALONE is not set
1002# CONFIG_FEATURE_SH_NOFORK is not set
1003CONFIG_FEATURE_SH_HISTFILESIZE=y
1004
1005#
1006# System Logging Utilities
1007#
1008CONFIG_SYSLOGD=y
1009CONFIG_FEATURE_ROTATE_LOGFILE=y
1010CONFIG_FEATURE_REMOTE_LOG=y
1011CONFIG_FEATURE_SYSLOGD_DUP=y
1012CONFIG_FEATURE_SYSLOGD_CFG=y
1013CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
1014CONFIG_FEATURE_IPC_SYSLOG=y
1015CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=64
1016CONFIG_LOGREAD=y
1017CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
1018CONFIG_KLOGD=y
1019CONFIG_FEATURE_KLOGD_KLOGCTL=y
1020CONFIG_LOGGER=y
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/fail_on_no_media.patch b/meta/recipes-core/busybox/busybox-1.21.1/fail_on_no_media.patch
new file mode 100644
index 0000000000..6745f169fe
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/fail_on_no_media.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Pending
2
3The current behaviour of busybox is to try all fstype when automounting
4even when no media exists. The util-linux mount command bails when no
5media exists, so change the behaviour of busybox to do the same.
6
7It could also be argued that the KERN_INFO message from btrfs could be
8removed, but that would be harder to accomplish.
9
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11
12
13Index: busybox-1.20.2/util-linux/mount.c
14===================================================================
15--- busybox-1.20.2.orig/util-linux/mount.c
16+++ busybox-1.20.2/util-linux/mount.c
17@@ -598,7 +598,13 @@ static int mount_it_now(struct mntent *m
18 break;
19 errno = errno_save;
20 }
21-
22+ /*
23+ * Break if there is no media, no point retrying for all
24+ * fs types since there is no media available
25+ */
26+ if (rc == -1 && errno == ENOMEDIUM) {
27+ bb_perror_msg_and_die("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir);
28+ }
29 if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS))
30 break;
31 if (!(vfsflags & MS_SILENT))
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/get_header_tar.patch b/meta/recipes-core/busybox/busybox-1.21.1/get_header_tar.patch
new file mode 100644
index 0000000000..0e528ff91f
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/get_header_tar.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Pending
2
3# copy commit message from OE as the patch comment:
4# commit 5a0e1d473ca7aca5ffefffe9a2ec44ae7a1f35bc
5# Author: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
6# Date: Wed Feb 11 22:40:21 2009 +0100
7#
8# busybox: fix tar problem with filenames that are exactly 100 bytes
9#
10# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
11
12--- busybox-1.13.2/archival/libarchive/get_header_tar.c.orig 2008-11-09 18:28:02.000000000 +0100
13+++ busybox-1.13.2/archival/libarchive/get_header_tar.c 2009-02-11 22:34:52.000000000 +0100
14@@ -252,6 +252,8 @@
15 file_header->name = concat_path_file(tar.prefix, tar.name);
16 } else
17 file_header->name = xstrdup(tar.name);
18+ if (strlen(file_header->name) > 100)
19+ file_header->name[100] = 0;
20 }
21
22 /* Set bits 12-15 of the files mode */
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/login-utilities.cfg b/meta/recipes-core/busybox/busybox-1.21.1/login-utilities.cfg
new file mode 100644
index 0000000000..cc9b2db502
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/login-utilities.cfg
@@ -0,0 +1,13 @@
1CONFIG_FEATURE_SHADOWPASSWDS=y
2CONFIG_ADDUSER=y
3CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
4CONFIG_ADDGROUP=y
5CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
6CONFIG_DELUSER=y
7CONFIG_DELGROUP=y
8CONFIG_GETTY=y
9CONFIG_LOGIN=y
10CONFIG_PASSWD=y
11CONFIG_SU=y
12CONFIG_SULOGIN=y
13CONFIG_VLOCK=y
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/run-parts.in.usr-bin.patch b/meta/recipes-core/busybox/busybox-1.21.1/run-parts.in.usr-bin.patch
new file mode 100644
index 0000000000..45f69a937c
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/run-parts.in.usr-bin.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Inappropriate [configuration]
2
3# copy commit message from OE as the patch comment:
4# commit f1b326c83be0d95571b991d8d2ee239982380b6b
5# Author: Martin Jansa <Martin.Jansa@gmail.com>
6# Date: Fri Apr 30 15:37:38 2010 +0200
7#
8# busybox: add patch for installing run-parts to /usr/bin/ instead of /bin
9#
10# * otherwise debianutils install will fail with
11# update-alternatives: Error: cannot register alternative run-parts to /usr/bin/run-parts since it is
12#
13# Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14#
15# Poky doesn't have debianutils, but let's keep it for safety
16# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
17
18diff -uNr busybox-1.15.3.orig//include/applets.src.h busybox-1.15.3/include/applets.src.h
19--- busybox-1.15.3.orig//include/applets.src.h 2009-12-12 22:13:28.000000000 +0100
20+++ busybox-1.15.3/include/applets.src.h 2010-04-30 15:35:40.000000000 +0200
21@@ -304,7 +304,7 @@
22 IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP))
23 IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP))
24 IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
25-IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts))
26+IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_USR_BIN, BB_SUID_DROP, run_parts))
27 IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
28 IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP))
29 IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, _BB_SUID_DROP))
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/stat-usr-bin.patch b/meta/recipes-core/busybox/busybox-1.21.1/stat-usr-bin.patch
new file mode 100644
index 0000000000..4049324e8b
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/stat-usr-bin.patch
@@ -0,0 +1,21 @@
1busybox: move /bin/stat to /usr/bin/stat to match coreutils
2
3The coreutils stat binary lives in /usr/bin, fix busybox to use the same path so
4they can be properly tracked by alternatives.
5
6Upstream-Status: Inappropriate [embedded]
7Signed-off-by: Andy Ross <andy.ross@windriver.com>
8
9diff --git a/include/applets.src.h b/include/applets.src.h
10index 0d33bfc..30ae3ad 100644
11--- a/include/applets.src.h
12+++ b/include/applets.src.h
13@@ -340,7 +340,7 @@ IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, soft
14 IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort))
15 IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP))
16 IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon))
17-IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
18+IF_STAT(APPLET(stat, BB_DIR_USR_BIN, BB_SUID_DROP))
19 IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
20 IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
21 /* Needs to be run by root or be suid root - needs to change uid and gid: */
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/testsuite-du-du-k-works-fix-false-positive.patch b/meta/recipes-core/busybox/busybox-1.21.1/testsuite-du-du-k-works-fix-false-positive.patch
new file mode 100644
index 0000000000..070c41be07
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/testsuite-du-du-k-works-fix-false-positive.patch
@@ -0,0 +1,35 @@
1Upstream-Status: Accepted
2
3[Yocto 2896]
4
5Signed-off-by: Kang Kai <kai.kang@windriver.com>
6---
7From 03b614739b923994ff0bef74622973ad18fefebd Mon Sep 17 00:00:00 2001
8From: Kang Kai <kai.kang@windriver.com>
9Date: Mon, 28 Jan 2013 14:02:51 +0100
10Subject: [PATCH] testsuite/du/du-k-works: fix false positive
11
12Signed-off-by: Kang Kai <kai.kang@windriver.com>
13Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14---
15 testsuite/du/du-k-works | 4 ++++
16 1 files changed, 4 insertions(+), 0 deletions(-)
17
18diff --git a/testsuite/du/du-k-works b/testsuite/du/du-k-works
19index 36dcaa8..417b0da 100644
20--- a/testsuite/du/du-k-works
21+++ b/testsuite/du/du-k-works
22@@ -2,6 +2,10 @@ mkdir du.testdir
23 cd du.testdir
24 dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
25 dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
26+# ext4 on images <512M gives 81kb
27+# ext3 on images <512M gives 83kb
28 test x"`busybox du -k .`" = x"80 ." \
29+ -o x"`busybox du -k .`" = x"81 ." \
30+ -o x"`busybox du -k .`" = x"83 ." \
31 -o x"`busybox du -k .`" = x"84 ." \
32 -o x"`busybox du -k .`" = x"88 ."
33--
341.7.5.4
35
diff --git a/meta/recipes-core/busybox/busybox-1.21.1/watch.in.usr-bin.patch b/meta/recipes-core/busybox/busybox-1.21.1/watch.in.usr-bin.patch
new file mode 100644
index 0000000000..e8e1edfb7e
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.21.1/watch.in.usr-bin.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Inappropriate [configuration]
2
3From f2372ab626a395d067704f4c318180fb6039de15 Mon Sep 17 00:00:00 2001
4From: Andreas Oberritter <obi@opendreambox.org>
5Date: Sat, 24 Mar 2012 17:36:48 +0100
6Subject: [PATCH] watch: move from /bin to /usr/bin for compatibility with
7 procps
8
9Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
10---
11 include/applets.src.h | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-)
13
14diff --git a/include/applets.src.h b/include/applets.src.h
15index 87d9cbb..c148a8c 100644
16--- a/include/applets.src.h
17+++ b/include/applets.src.h
18@@ -404,7 +404,7 @@ IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
19 IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP))
20 /* Needs to be run by root or be suid root - needs to write to /dev/TTY: */
21 IF_WALL(APPLET(wall, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
22-IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
23+IF_WATCH(APPLET(watch, BB_DIR_USR_BIN, BB_SUID_DROP))
24 IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP))
25 IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
26 IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
27--
281.7.5.4
29
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
new file mode 100644
index 0000000000..cefc7d405a
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -0,0 +1,403 @@
1SUMMARY = "Tiny versions of many common UNIX utilities in a single small executable."
2DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete POSIX environment for any small or embedded system."
3HOMEPAGE = "http://www.busybox.net"
4BUGTRACKER = "https://bugs.busybox.net/"
5
6DEPENDS += "kern-tools-native"
7
8# bzip2 applet in busybox is based on lightly-modified bzip2 source
9# the GPL is version 2 only
10LICENSE = "GPLv2 & bzip2"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb"
12
13SECTION = "base"
14
15# Whether to split the suid apps into a seperate binary
16BUSYBOX_SPLIT_SUID ?= "1"
17
18export EXTRA_CFLAGS = "${CFLAGS}"
19export EXTRA_LDFLAGS = "${LDFLAGS}"
20
21PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
22
23FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
24FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
25FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
26FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
27FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
28FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
29
30INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
31
32INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
33INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
34INITSCRIPT_NAME_${PN}-mdev = "mdev"
35INITSCRIPT_PARAMS_${PN}-mdev = "start 03 S ."
36INITSCRIPT_NAME_${PN}-syslog = "syslog"
37INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
38
39SYSTEMD_PACKAGES = "${PN}-syslog"
40SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service"
41
42CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
43CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
44
45RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
46
47inherit cml1 systemd update-rc.d ptest
48
49# internal helper
50def busybox_cfg(feature, features, tokens, cnf, rem):
51 if type(tokens) == type(""):
52 tokens = [tokens]
53 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
54 if type(features) == type([]) and feature in features:
55 cnf.extend([token + '=y' for token in tokens])
56 else:
57 cnf.extend(['# ' + token + ' is not set' for token in tokens])
58
59# Map distro features to config settings
60def features_to_busybox_settings(d):
61 cnf, rem = ([], [])
62 distro_features = d.getVar('DISTRO_FEATURES', True).split()
63 busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IPV6', cnf, rem)
64 busybox_cfg('largefile', distro_features, 'CONFIG_LFS', cnf, rem)
65 busybox_cfg('largefile', distro_features, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem)
66 busybox_cfg('nls', distro_features, 'CONFIG_LOCALE_SUPPORT', cnf, rem)
67 busybox_cfg('ipv4', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
68 busybox_cfg('ipv6', distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
69 busybox_cfg('wifi', distro_features, 'CONFIG_RFKILL', cnf, rem)
70 busybox_cfg('bluetooth', distro_features, 'CONFIG_RFKILL', cnf, rem)
71 busybox_cfg('ext2', distro_features, 'CONFIG_MKFS_EXT2', cnf, rem)
72 return "\n".join(cnf), "\n".join(rem)
73
74# X, Y = ${@features_to_uclibc_settings(d)}
75# unfortunately doesn't seem to work with bitbake, workaround:
76def features_to_busybox_conf(d):
77 cnf, rem = features_to_busybox_settings(d)
78 return cnf
79def features_to_busybox_del(d):
80 cnf, rem = features_to_busybox_settings(d)
81 return rem
82
83configmangle = '/CROSS_COMPILER_PREFIX/d; \
84 /CONFIG_EXTRA_CFLAGS/d; \
85 '
86OE_FEATURES := "${@features_to_busybox_conf(d)}"
87OE_DEL := "${@features_to_busybox_del(d)}"
88DO_IPv4 := "${@base_contains('DISTRO_FEATURES', 'ipv4', 1, 0, d)}"
89DO_IPv6 := "${@base_contains('DISTRO_FEATURES', 'ipv6', 1, 0, d)}"
90
91python () {
92 if "${OE_DEL}":
93 d.setVar('configmangle_append', "${OE_DEL}" + "\n")
94 if "${OE_FEATURES}":
95 d.setVar('configmangle_append',
96 "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
97 ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
98 d.setVar('configmangle_append',
99 "/^### CROSS$/a\\\n%s\n" %
100 ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
101 "CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\""
102 ])
103 ))
104}
105
106do_prepare_config () {
107 sed -e 's#@DATADIR@#${datadir}#g' \
108 < ${WORKDIR}/defconfig > ${S}/.config
109 sed -i -e '/CONFIG_STATIC/d' .config
110 echo "# CONFIG_STATIC is not set" >> .config
111 for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \
112 ${S}/.config
113 sed -i -e '${configmangle}' ${S}/.config
114 if test ${DO_IPv4} -eq 0 && test ${DO_IPv6} -eq 0; then
115 # disable networking applets
116 mv ${S}/.config ${S}/.config.oe-tmp
117 awk 'BEGIN{net=0}
118 /^# Networking Utilities/{net=1}
119 /^#$/{if(net){net=net+1}}
120 {if(net==2&&$0 !~ /^#/&&$1){print("# "$1" is not set")}else{print}}' \
121 ${S}/.config.oe-tmp > ${S}/.config
122 fi
123}
124
125# returns all the elements from the src uri that are .cfg files
126def find_cfgs(d):
127 sources=src_patches(d, True)
128 sources_list=[]
129 for s in sources:
130 if s.endswith('.cfg'):
131 sources_list.append(s)
132
133 return sources_list
134
135do_configure () {
136 do_prepare_config
137 merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
138 cml1_do_configure
139}
140
141do_compile() {
142 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
143 if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
144 # split the .config into two parts, and make two busybox binaries
145 cp .config .config.orig
146 oe_runmake busybox.cfg.suid
147 oe_runmake busybox.cfg.nosuid
148 for i in `cat busybox.cfg.suid busybox.cfg.nosuid`; do
149 echo "# $i is not set" >> .config.disable.apps
150 done
151 merge_config.sh -m .config.orig .config.disable.apps
152 cp .config .config.nonapps
153 for s in suid nosuid; do
154 cat busybox.cfg.$s | while read item; do
155 grep -w "$item" .config.orig
156 done > .config.app.$s
157 merge_config.sh -m .config.nonapps .config.app.$s
158 oe_runmake busybox_unstripped
159 mv busybox_unstripped busybox.$s
160 oe_runmake busybox.links
161 mv busybox.links busybox.links.$s
162 done
163 # copy .config.orig back to .config, because the install process may check this file
164 cp .config.orig .config
165 # cleanup
166 rm .config.orig .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps
167 else
168 oe_runmake busybox_unstripped
169 cp busybox_unstripped busybox
170 oe_runmake busybox.links
171 fi
172}
173
174do_install () {
175 if [ "${prefix}" != "/usr" ]; then
176 sed -i "s:^/usr/:${prefix}/:" busybox.links*
177 fi
178 if [ "${base_sbindir}" != "/sbin" ]; then
179 sed -i "s:^/sbin/:${base_sbindir}/:" busybox.links*
180 fi
181
182 install -d ${D}${sysconfdir}/init.d
183
184 if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${B}/.config; then
185 # Install /bin/busybox, and the /bin/sh link so the postinst script
186 # can run. Let update-alternatives handle the rest.
187 install -d ${D}${base_bindir}
188 if [ "${BUSYBOX_SPLIT_SUID}" = "1" ]; then
189 install -m 4755 ${B}/busybox.suid ${D}${base_bindir}
190 install -m 0755 ${B}/busybox.nosuid ${D}${base_bindir}
191 install -m 0644 ${S}/busybox.links.suid ${D}${sysconfdir}
192 install -m 0644 ${S}/busybox.links.nosuid ${D}${sysconfdir}
193 ln -sf busybox.nosuid ${D}${base_bindir}/sh
194 # Keep a default busybox for people who want to invoke busybox directly.
195 # This is also useful for the on device upgrade. Because we want
196 # to use the busybox command in postinst.
197 ln -sf busybox.nosuid ${D}${base_bindir}/busybox
198 else
199 if grep -q "CONFIG_FEATURE_SUID=y" ${B}/.config; then
200 install -m 4755 ${B}/busybox ${D}${base_bindir}
201 else
202 install -m 0755 ${B}/busybox ${D}${base_bindir}
203 fi
204 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
205 ln -sf busybox ${D}${base_bindir}/sh
206 # We make this symlink here to eliminate the error when upgrading together
207 # with busybox-syslog. Without this symlink, the opkg may think of the
208 # busybox.nosuid as obsolete and remove it, resulting in dead links like
209 # /bin/sed -> /bin/busybox.nosuid. This will make upgrading busybox-syslog fail.
210 # This symlink will be safely deleted in postinst, thus no negative effect.
211 ln -sf busybox ${D}${base_bindir}/busybox.nosuid
212 fi
213 else
214 install -d ${D}${base_bindir} ${D}${base_sbindir}
215 install -d ${D}${libdir} ${D}${bindir} ${D}${sbindir}
216 cat busybox.links | while read FILE; do
217 NAME=`basename "$FILE"`
218 install -m 0755 "0_lib/$NAME" "${D}$FILE.${BPN}"
219 done
220 # add suid bit where needed
221 for i in `grep -E "APPLET.*BB_SUID_((MAYBE|REQUIRE))" include/applets.h | grep -v _BB_SUID_DROP | cut -f 3 -d '(' | cut -f 1 -d ','`; do
222 find ${D} -name $i.${BPN} -exec chmod a+s {} \;
223 done
224 install -m 0755 0_lib/libbusybox.so.${PV} ${D}${libdir}/libbusybox.so.${PV}
225 ln -sf sh.${BPN} ${D}${base_bindir}/sh
226 ln -sf ln.${BPN} ${D}${base_bindir}/ln
227 ln -sf test.${BPN} ${D}${bindir}/test
228 if [ -f ${D}/linuxrc.${BPN} ]; then
229 mv ${D}/linuxrc.${BPN} ${D}/linuxrc
230 fi
231 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
232 fi
233
234 if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
235 install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
236 install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
237 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
238 fi
239 if grep "CONFIG_CROND=y" ${B}/.config; then
240 install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
241 fi
242 if grep "CONFIG_HTTPD=y" ${B}/.config; then
243 install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
244 install -d ${D}/srv/www
245 fi
246 if grep "CONFIG_UDHCPD=y" ${B}/.config; then
247 install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
248 fi
249 if grep "CONFIG_HWCLOCK=y" ${B}/.config; then
250 install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
251 fi
252 if grep "CONFIG_UDHCPC=y" ${B}/.config; then
253 install -d ${D}${sysconfdir}/udhcpc.d
254 install -d ${D}${datadir}/udhcpc
255 install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
256 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
257 fi
258 if grep "CONFIG_INETD=y" ${B}/.config; then
259 install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN}
260 sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN}
261 install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/
262 fi
263 if grep "CONFIG_MDEV=y" ${B}/.config; then
264 install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev
265 if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then
266 install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf
267 fi
268 fi
269
270 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
271 install -d ${D}${systemd_unitdir}/system
272 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
273 > ${D}${systemd_unitdir}/system/busybox-syslog.service
274 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
275 > ${D}${systemd_unitdir}/system/busybox-klogd.service
276
277 if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
278 install -d ${D}${sysconfdir}/default
279 install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
280 fi
281
282 ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
283 fi
284
285 # Remove the sysvinit specific configuration file for systemd systems to avoid confusion
286 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
287 rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN}
288 fi
289}
290
291inherit update-alternatives
292
293ALTERNATIVE_PRIORITY = "50"
294
295ALTERNATIVE_${PN}-syslog += "syslog-conf"
296ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
297
298python () {
299 if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split():
300 pn = d.getVar('PN', True)
301 d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
302 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir', True)))
303 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
304 d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
305 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir', True)))
306 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
307}
308
309python do_package_prepend () {
310 # We need to load the full set of busybox provides from the /etc/busybox.links
311 # Use this to see the update-alternatives with the right information
312
313 dvar = d.getVar('D', True)
314 pn = d.getVar('PN', True)
315 def set_alternative_vars(links, target):
316 f = open('%s%s' % (dvar, links), 'r')
317 for alt_link_name in f:
318 alt_link_name = alt_link_name.strip()
319 alt_name = os.path.basename(alt_link_name)
320 # Match coreutils
321 if alt_name == '[':
322 alt_name = 'lbracket'
323 d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name)
324 d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name)
325 if os.path.exists('%s%s' % (dvar, target)):
326 d.setVarFlag('ALTERNATIVE_TARGET', alt_name, target)
327 f.close()
328 return
329
330 if os.path.exists('%s/etc/busybox.links' % (dvar)):
331 set_alternative_vars("/etc/busybox.links", "/bin/busybox")
332 else:
333 set_alternative_vars("/etc/busybox.links.nosuid", "/bin/busybox.nosuid")
334 set_alternative_vars("/etc/busybox.links.suid", "/bin/busybox.suid")
335}
336
337pkg_postinst_${PN} () {
338 # This part of code is dedicated to the on target upgrade problem.
339 # It's known that if we don't make appropriate symlinks before update-alternatives calls,
340 # there will be errors indicating missing commands such as 'sed'.
341 # These symlinks will later be updated by update-alternatives calls.
342 test -n 2 > /dev/null || alias test='busybox test'
343 if test "x$D" = "x"; then
344 # Remove busybox.nosuid if it's a symlink, because this situation indicates
345 # that we're installing or upgrading to a one-binary busybox.
346 if test -h /bin/busybox.nosuid; then
347 rm -f /bin/busybox.nosuid
348 fi
349 for suffix in "" ".nosuid" ".suid"; do
350 if test -e /etc/busybox.links$suffix; then
351 while read link; do
352 if test ! -e "$link"; then
353 case "$link" in
354 /*/*/*)
355 to="../../bin/busybox$suffix"
356 ;;
357 /bin/*)
358 to="busybox$suffix"
359 ;;
360 /*/*)
361 to="../bin/busybox$suffix"
362 ;;
363 esac
364 # we can use busybox here because even if we are using splitted busybox
365 # we've made a symlink from /bin/busybox to /bin/busybox.nosuid.
366 busybox rm -f $link
367 busybox ln -s $to $link
368 fi
369 done < /etc/busybox.links$suffix
370 fi
371 done
372 fi
373}
374
375pkg_prerm_${PN} () {
376 # This is so you can make busybox commit suicide - removing busybox with no other packages
377 # providing its files, this will make update-alternatives work, but the update-rc.d part
378 # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
379 tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
380 ln -s /bin/busybox $tmpdir/[
381 ln -s /bin/busybox $tmpdir/test
382 ln -s /bin/busybox $tmpdir/head
383 ln -s /bin/busybox $tmpdir/sh
384 ln -s /bin/busybox $tmpdir/basename
385 ln -s /bin/busybox $tmpdir/echo
386 ln -s /bin/busybox $tmpdir/mv
387 ln -s /bin/busybox $tmpdir/ln
388 ln -s /bin/busybox $tmpdir/dirname
389 ln -s /bin/busybox $tmpdir/rm
390 ln -s /bin/busybox $tmpdir/sed
391 ln -s /bin/busybox $tmpdir/sort
392 ln -s /bin/busybox $tmpdir/grep
393 export PATH=$PATH:$tmpdir
394}
395
396pkg_prerm_${PN}-syslog () {
397 # remove syslog
398 if test "x$D" = "x"; then
399 if test "$1" = "upgrade" -o "$1" = "remove"; then
400 /etc/init.d/syslog stop
401 fi
402 fi
403}
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.21.1.bb
new file mode 100644
index 0000000000..5c0527397e
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox_1.21.1.bb
@@ -0,0 +1,47 @@
1require busybox.inc
2PR = "r0"
3
4SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
5 file://get_header_tar.patch \
6 file://busybox-appletlib-dependency.patch \
7 file://run-parts.in.usr-bin.patch \
8 file://watch.in.usr-bin.patch \
9 file://busybox-udhcpc-no_deconfig.patch \
10 file://find-touchscreen.sh \
11 file://busybox-cron \
12 file://busybox-httpd \
13 file://busybox-udhcpd \
14 file://default.script \
15 file://simple.script \
16 file://hwclock.sh \
17 file://mount.busybox \
18 file://syslog \
19 file://syslog-startup.conf \
20 file://syslog.conf \
21 file://busybox-syslog.default \
22 file://mdev \
23 file://mdev.conf \
24 file://umount.busybox \
25 file://defconfig \
26 file://stat-usr-bin.patch \
27 file://busybox-syslog.service.in \
28 file://busybox-klogd.service.in \
29 file://testsuite-du-du-k-works-fix-false-positive.patch \
30 file://fail_on_no_media.patch \
31 file://busybox-sulogin-empty-root-password.patch \
32 file://run-ptest \
33 file://inetd.conf \
34 file://inetd \
35 file://login-utilities.cfg \
36 file://busybox-list-suid-and-non-suid-app-configs.patch"
37
38SRC_URI[tarball.md5sum] = "795394f83903b5eec6567d51eebb417e"
39SRC_URI[tarball.sha256sum] = "cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303"
40
41EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
42
43do_install_ptest () {
44 cp -r ${B}/testsuite ${D}${PTEST_PATH}/
45 cp ${B}/.config ${D}${PTEST_PATH}/
46 ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
47}
diff --git a/meta/recipes-core/busybox/files/busybox-cron b/meta/recipes-core/busybox/files/busybox-cron
new file mode 100755
index 0000000000..f0e6b15629
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-cron
@@ -0,0 +1,39 @@
1#!/bin/sh
2DAEMON=/usr/sbin/crond
3NAME=crond
4DESC="Busybox Periodic Command Scheduler"
5ARGS="-c /etc/cron/crontabs"
6
7test -f $DAEMON || exit 0
8
9set -e
10
11case "$1" in
12 start)
13 echo -n "starting $DESC: $NAME... "
14 start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
15 echo "done."
16 ;;
17 stop)
18 echo -n "stopping $DESC: $NAME... "
19 start-stop-daemon -K -n $NAME
20 echo "done."
21 ;;
22 restart)
23 echo -n "restarting $DESC: $NAME... "
24 $0 stop
25 $0 start
26 echo "done."
27 ;;
28 reload)
29 echo -n "reloading $DESC: $NAME... "
30 killall -HUP $(basename ${DAEMON})
31 echo "done."
32 ;;
33 *)
34 echo "Usage: $0 {start|stop|restart|reload}"
35 exit 1
36 ;;
37esac
38
39exit 0
diff --git a/meta/recipes-core/busybox/files/busybox-httpd b/meta/recipes-core/busybox/files/busybox-httpd
new file mode 100755
index 0000000000..c8348e54a7
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-httpd
@@ -0,0 +1,44 @@
1#!/bin/sh
2DAEMON=/usr/sbin/httpd
3NAME=httpd
4DESC="Busybox HTTP Daemon"
5HTTPROOT="/srv/www"
6ARGS="-h $HTTPROOT"
7
8test -f $DAEMON || exit 0
9
10set -e
11
12case "$1" in
13 start)
14 echo -n "starting $DESC: $NAME... "
15 if [ ! -d $HTTPROOT ]; then
16 echo "$HTTPROOT is missing."
17 exit 1
18 fi
19 start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
20 echo "done."
21 ;;
22 stop)
23 echo -n "stopping $DESC: $NAME... "
24 start-stop-daemon -K -n $NAME
25 echo "done."
26 ;;
27 restart)
28 echo "restarting $DESC: $NAME... "
29 $0 stop
30 $0 start
31 echo "done."
32 ;;
33 reload)
34 echo -n "reloading $DESC: $NAME... "
35 killall -HUP $(basename ${DAEMON})
36 echo "done."
37 ;;
38 *)
39 echo "Usage: $0 {start|stop|restart|reload}"
40 exit 1
41 ;;
42esac
43
44exit 0
diff --git a/meta/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in
new file mode 100644
index 0000000000..d7c77558f3
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-klogd.service.in
@@ -0,0 +1,8 @@
1[Unit]
2Description=Kernel Logging Service
3
4[Service]
5ExecStart=@base_sbindir@/klogd -n
6
7[Install]
8WantedBy=multi-user.target
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.default b/meta/recipes-core/busybox/files/busybox-syslog.default
new file mode 100644
index 0000000000..a3d51caa50
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-syslog.default
@@ -0,0 +1 @@
OPTIONS="-C"
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
new file mode 100644
index 0000000000..2e04321385
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -0,0 +1,13 @@
1[Unit]
2Description=System Logging Service
3Wants=busybox-klogd.service
4
5[Service]
6EnvironmentFile=-/etc/default/busybox-syslog
7ExecStart=@base_sbindir@/syslogd -n $OPTIONS
8Sockets=syslog.socket
9
10[Install]
11WantedBy=multi-user.target
12Also=busybox-klogd.service
13Alias=syslog.service
diff --git a/meta/recipes-core/busybox/files/busybox-udhcpd b/meta/recipes-core/busybox/files/busybox-udhcpd
new file mode 100755
index 0000000000..c43903e8dc
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-udhcpd
@@ -0,0 +1,43 @@
1#!/bin/sh
2DAEMON=/usr/sbin/udhcpd
3NAME=udhcpd
4DESC="Busybox UDHCP Server"
5ARGS="/etc/udhcpd.conf"
6
7test -f $DAEMON || exit 1
8
9set -e
10
11case "$1" in
12 start)
13 echo -n "starting $DESC: $NAME... "
14 if [ ! -f /etc/udhcpd.conf ]; then
15 echo "error: /etc/udhcpd.conf is missing."
16 exit 1
17 fi
18 /sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
19 echo "done."
20 ;;
21 stop)
22 echo -n "stopping $DESC: $NAME... "
23 /sbin/start-stop-daemon -K -n $NAME
24 echo "done."
25 ;;
26 restart)
27 echo "restarting $DESC: $NAME... "
28 $0 stop
29 $0 start
30 echo "done."
31 ;;
32 reload)
33 echo -n "reloading $DESC: $NAME... "
34 killall -HUP $(basename ${DAEMON})
35 echo "done."
36 ;;
37 *)
38 echo "Usage: $0 {start|stop|restart|reload}"
39 exit 1
40 ;;
41esac
42
43exit 0
diff --git a/meta/recipes-core/busybox/files/default.script b/meta/recipes-core/busybox/files/default.script
new file mode 100644
index 0000000000..f2ac987a27
--- /dev/null
+++ b/meta/recipes-core/busybox/files/default.script
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3exec run-parts -a "$1" /etc/udhcpc.d
4
diff --git a/meta/recipes-core/busybox/files/find-touchscreen.sh b/meta/recipes-core/busybox/files/find-touchscreen.sh
new file mode 100644
index 0000000000..1582ea891c
--- /dev/null
+++ b/meta/recipes-core/busybox/files/find-touchscreen.sh
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
4 ln -sf /dev/input/$MDEV /dev/input/touchscreen0
5fi
6
7if [ `egrep "ads7846" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
8 ln -sf /dev/input/$MDEV /dev/input/touchscreen0
9fi
diff --git a/meta/recipes-core/busybox/files/hwclock.sh b/meta/recipes-core/busybox/files/hwclock.sh
new file mode 100644
index 0000000000..be5f94d86c
--- /dev/null
+++ b/meta/recipes-core/busybox/files/hwclock.sh
@@ -0,0 +1,83 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: hwclock
4# Required-Start:
5# Required-Stop: $local_fs
6# Default-Start: S
7# Default-Stop: 0 6
8# Short-Description: Set system clock
9# Description: Set system clock to hardware clock, according to the UTC
10# setting in /etc/default/rcS (see also rcS(5)).
11### END INIT INFO
12#
13# WARNING: If your hardware clock is not in UTC/GMT, this script
14# must know the local time zone. This information is
15# stored in /etc/localtime. This might be a problem if
16# your /etc/localtime is a symlink to something in
17# /usr/share/zoneinfo AND /usr isn't in the root
18# partition! The workaround is to define TZ either
19# in /etc/default/rcS, or in the proper place below.
20
21[ ! -x /sbin/hwclock ] && exit 0
22
23[ -f /etc/default/rcS ] && . /etc/default/rcS
24
25[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
26case "$1" in
27 start)
28 if [ "$VERBOSE" != no ]
29 then
30 echo "System time was `date`."
31 echo "Setting the System Clock using the Hardware Clock as reference..."
32 fi
33
34 if [ "$HWCLOCKACCESS" != no ]
35 then
36 if [ -z "$TZ" ]
37 then
38 hwclock $tz --hctosys
39 else
40 TZ="$TZ" hwclock $tz --hctosys
41 fi
42 fi
43
44 if [ "$VERBOSE" != no ]
45 then
46 echo "System Clock set. System local time is now `date`."
47 fi
48 ;;
49 stop|restart|reload|force-reload)
50 #
51 # Updates the Hardware Clock with the System Clock time.
52 # This will *override* any changes made to the Hardware Clock.
53 #
54 # WARNING: If you disable this, any changes to the system
55 # clock will not be carried across reboots.
56 #
57 if [ "$VERBOSE" != no ]
58 then
59 echo "Saving the System Clock time to the Hardware Clock..."
60 fi
61 if [ "$HWCLOCKACCESS" != no ]
62 then
63 hwclock $tz --systohc
64 fi
65 if [ "$VERBOSE" != no ]
66 then
67 echo "Hardware Clock updated to `date`."
68 fi
69 exit 0
70 ;;
71 show)
72 if [ "$HWCLOCKACCESS" != no ]
73 then
74 hwclock $tz --show
75 fi
76 ;;
77 *)
78 echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
79 echo " start sets kernel (system) clock from hardware (RTC) clock" >&2
80 echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
81 exit 1
82 ;;
83esac
diff --git a/meta/recipes-core/busybox/files/inetd b/meta/recipes-core/busybox/files/inetd
new file mode 100644
index 0000000000..cf50bcd546
--- /dev/null
+++ b/meta/recipes-core/busybox/files/inetd
@@ -0,0 +1,33 @@
1#!/bin/sh
2#
3# start/stop inetd super server.
4
5if ! [ -x /usr/sbin/inetd ]; then
6 exit 0
7fi
8
9case "$1" in
10 start)
11 echo -n "Starting internet superserver:"
12 echo -n " inetd" ; start-stop-daemon -S -x /usr/sbin/inetd > /dev/null
13 echo "."
14 ;;
15 stop)
16 echo -n "Stopping internet superserver:"
17 echo -n " inetd" ; start-stop-daemon -K -x /usr/sbin/inetd > /dev/null
18 echo "."
19 ;;
20 restart)
21 echo -n "Restarting internet superserver:"
22 echo -n " inetd "
23 killall -HUP inetd
24 echo "."
25 ;;
26 *)
27 echo "Usage: /etc/init.d/inetd {start|stop|restart}"
28 exit 1
29 ;;
30esac
31
32exit 0
33
diff --git a/meta/recipes-core/busybox/files/inetd.conf b/meta/recipes-core/busybox/files/inetd.conf
new file mode 100644
index 0000000000..b02fe850c9
--- /dev/null
+++ b/meta/recipes-core/busybox/files/inetd.conf
@@ -0,0 +1,20 @@
1# /etc/inetd.conf: see inetd(8) for further informations.
2#
3# Internet server configuration database
4#
5# If you want to disable an entry so it isn't touched during
6# package updates just comment it out with a single '#' character.
7#
8# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
9#
10#:INTERNAL: Internal services
11#echo stream tcp nowait root internal
12#echo dgram udp wait root internal
13#chargen stream tcp nowait root internal
14#chargen dgram udp wait root internal
15#discard stream tcp nowait root internal
16#discard dgram udp wait root internal
17#daytime stream tcp nowait root internal
18#daytime dgram udp wait root internal
19#time stream tcp nowait root internal
20#time dgram udp wait root internal
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev
new file mode 100755
index 0000000000..4eba6190c7
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
4mkdir /dev/pts /dev/shm
5mount -t devpts devpts /dev/pts
6echo "/sbin/mdev" > /proc/sys/kernel/hotplug
7mdev -s
diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf
new file mode 100644
index 0000000000..e688911ff1
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mdev.conf
@@ -0,0 +1,37 @@
1console 0:0 0600
2cpu_dma_latency 0:0 0660
3fb0:0 44 0660
4full 0:0 0666
5initctl 0:0 0600
6ircomm[0-9].* 0:20 0660
7kmem 0:15 0640
8kmsg 0:0 0660
9log 0:0 0666
10loop[0-9].* 0:6 0640
11mem 0:15 0640
12network_latency 0:0 0660
13network_throughput 0:0 0660
14null 0:0 0666
15port 0:15 0640
16ptmx 0:5 0666
17ram[0-9].* 0:6 0640
18random 0:0 0666
19sda 0:6 0640
20tty 0:5 0666
21tty.* 0:0 0620
22urandom 0:0 0666
23usbdev.* 0:0 0660 */etc/mdev/usb.sh
24vcs.* 0:5 0660
25zero 0:0 0666
26
27snd/pcm.* 0:0 0660
28snd/control.* 0:0 0660
29snd/timer 0:0 0660
30snd/seq 0:0 0660
31snd/mini.* 0:00 0660
32
33input/event.* 0:0 0660 @/etc/mdev/find-touchscreen.sh
34input/mice 0:0 0660
35input/mouse.* 0:0 0660
36
37tun[0-9]* 0:0 0660 =net/
diff --git a/meta/recipes-core/busybox/files/mount.busybox b/meta/recipes-core/busybox/files/mount.busybox
new file mode 100755
index 0000000000..fef945b7b2
--- /dev/null
+++ b/meta/recipes-core/busybox/files/mount.busybox
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3exec /bin/busybox mount $@
diff --git a/meta/recipes-core/busybox/files/run-ptest b/meta/recipes-core/busybox/files/run-ptest
new file mode 100644
index 0000000000..3608a8eb65
--- /dev/null
+++ b/meta/recipes-core/busybox/files/run-ptest
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3current_dir=$(readlink -f $0)
4export bindir=$(dirname $current_dir)
5
6cd testsuite || exit 1
7./runtest -v | sed -r 's/^(SKIPPED|UNTESTED):/SKIP:/'
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
new file mode 100644
index 0000000000..78ac4242a8
--- /dev/null
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -0,0 +1,86 @@
1#!/bin/sh
2
3# udhcpc script edited by Tim Riker <Tim@Rikers.org>
4
5[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
6
7RESOLV_CONF="/etc/resolv.conf"
8[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
9[ -n "$subnet" ] && NETMASK="netmask $subnet"
10
11# return 0 if root is mounted on a network filesystem
12root_is_nfs() {
13 sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
14 grep -q "^/ \(nfs\|smbfs\|ncp\|coda\)$"
15}
16
17have_bin_ip=0
18if [ -x /sbin/ip ]; then
19 have_bin_ip=1
20fi
21
22case "$1" in
23 deconfig)
24 if [ -x /sbin/resolvconf ]; then
25 /sbin/resolvconf -d "${interface}.udhcpc"
26 fi
27 if ! root_is_nfs ; then
28 if [ $have_bin_ip -eq 1 ]; then
29 ip addr flush dev $interface
30 ip link set dev $interface up
31 else
32 /sbin/ifconfig $interface 0.0.0.0
33 fi
34 fi
35 ;;
36
37 renew|bound)
38 if [ $have_bin_ip -eq 1 ]; then
39 ip addr add dev $interface local $ip/$mask $BROADCAST
40 else
41 /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
42 fi
43
44 if [ -n "$router" ] ; then
45 if ! root_is_nfs ; then
46 if [ $have_bin_ip -eq 1 ]; then
47 while ip route del default 2>/dev/null ; do
48 :
49 done
50 else
51 while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
52 :
53 done
54 fi
55 fi
56
57 metric=0
58 for i in $router ; do
59 if [ $have_bin_ip -eq 1 ]; then
60 ip route add default via $i metric $metric
61 else
62 route add default gw $i dev $interface metric $metric 2>/dev/null
63 fi
64 metric=$(($metric + 1))
65 done
66 fi
67
68 # Update resolver configuration file
69 R=""
70 [ -n "$domain" ] && R="domain $domain
71"
72 for i in $dns; do
73 echo "$0: Adding DNS $i"
74 R="${R}nameserver $i
75"
76 done
77
78 if [ -x /sbin/resolvconf ]; then
79 echo -n "$R" | /sbin/resolvconf -a "${interface}.udhcpc"
80 else
81 echo -n "$R" > "$RESOLV_CONF"
82 fi
83 ;;
84esac
85
86exit 0
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
new file mode 100644
index 0000000000..2944d3d06c
--- /dev/null
+++ b/meta/recipes-core/busybox/files/syslog
@@ -0,0 +1,77 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: sysklogd
4# Required-Start: $remote_fs $time
5# Required-Stop: $remote_fs $time
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: System logger
9### END INIT INFO
10
11set -e
12
13if [ -f /etc/syslog-startup.conf ]; then
14 . /etc/syslog-startup.conf
15 LOG_LOCAL=0
16 LOG_REMOTE=0
17 for D in $DESTINATION; do
18 if [ "$D" = "buffer" ]; then
19 SYSLOG_ARGS="$SYSLOG_ARGS -C$BUFFERSIZE"
20 LOG_LOCAL=1
21 elif [ "$D" = "file" ]; then
22 if [ -n "$LOGFILE" ]; then
23 SYSLOG_ARGS="$SYSLOG_ARGS -O $LOGFILE"
24 fi
25 if [ -n "$ROTATESIZE" ]; then
26 SYSLOG_ARGS="$SYSLOG_ARGS -s $ROTATESIZE"
27 fi
28 if [ -n "$ROTATEGENS" ]; then
29 SYSLOG_ARGS="$SYSLOG_ARGS -b $ROTATEGENS"
30 fi
31 LOCAL=0
32 elif [ "$D" = "remote" ]; then
33 SYSLOG_ARGS="$SYSLOG_ARGS -R $REMOTE"
34 LOG_REMOTE=1
35 fi
36 done
37 if [ "$LOG_LOCAL" = "1" -a "$LOG_REMOTE" = "1" ]; then
38 SYSLOG_ARGS="$SYSLOG_ARGS -L"
39 fi
40 if [ "$REDUCE" = "yes" ]; then
41 SYSLOG_ARGS="$SYSLOG_ARGS -S"
42 fi
43 if [ "$DROPDUPLICATES" = "yes" ]; then
44 SYSLOG_ARGS="$SYSLOG_ARGS -D"
45 fi
46 if [ -n "$LOGLEVEL" ]; then
47 SYSLOG_ARGS="$SYSLOG_ARGS -l $LOGLEVEL"
48 fi
49else
50 # default: log to 16K shm circular buffer
51 SYSLOG_ARGS="-C"
52fi
53
54case "$1" in
55 start)
56 echo -n "Starting syslogd/klogd: "
57 start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
58 start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
59 echo "done"
60 ;;
61 stop)
62 echo -n "Stopping syslogd/klogd: "
63 start-stop-daemon -K -n syslogd
64 start-stop-daemon -K -n klogd
65 echo "done"
66 ;;
67 restart)
68 $0 stop
69 $0 start
70 ;;
71 *)
72 echo "Usage: syslog { start | stop | restart }" >&2
73 exit 1
74 ;;
75esac
76
77exit 0
diff --git a/meta/recipes-core/busybox/files/syslog-startup.conf b/meta/recipes-core/busybox/files/syslog-startup.conf
new file mode 100644
index 0000000000..fda450aa0d
--- /dev/null
+++ b/meta/recipes-core/busybox/files/syslog-startup.conf
@@ -0,0 +1,13 @@
1# This configuration file is used by the busybox syslog init script,
2# /etc/init.d/syslog[.busybox] to set syslog configuration at start time.
3
4DESTINATION=file # log destinations (buffer file remote)
5LOGFILE=/var/log/messages # where to log (file)
6REMOTE=loghost:514 # where to log (syslog remote)
7REDUCE=no # reduce-size logging
8DROPDUPLICATES=no # whether to drop duplicate log entries
9#ROTATESIZE=0 # rotate log if grown beyond X [kByte]
10#ROTATEGENS=3 # keep X generations of rotated logs
11BUFFERSIZE=64 # size of circular buffer [kByte]
12FOREGROUND=no # run in foreground (don't use!)
13#LOGLEVEL=5 # local log level (between 1 and 8)
diff --git a/meta/recipes-core/busybox/files/syslog.conf b/meta/recipes-core/busybox/files/syslog.conf
new file mode 100644
index 0000000000..75bb6309ab
--- /dev/null
+++ b/meta/recipes-core/busybox/files/syslog.conf
@@ -0,0 +1 @@
# /etc/syslog.conf Configuration file for busybox's syslogd utility
diff --git a/meta/recipes-core/busybox/files/umount.busybox b/meta/recipes-core/busybox/files/umount.busybox
new file mode 100755
index 0000000000..f3731626e6
--- /dev/null
+++ b/meta/recipes-core/busybox/files/umount.busybox
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3exec /bin/busybox umount $@
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars b/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars
new file mode 100644
index 0000000000..32692ab4b9
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/Makevars
@@ -0,0 +1,41 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS =
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch
new file mode 100644
index 0000000000..c287014767
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/codepage.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3#
4# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
5#
6
7--- console-tools-0.3.2/contrib/codepage.c~codepage
8+++ console-tools-0.3.2/contrib/codepage.c
9@@ -229,7 +229,7 @@
10 return 0;
11
12 fprintf(stderr, "\
13-Warning: CP format is a hack!\n
14+Warning: CP format is a hack!\n\
15 The files produced may or may not be usable!\n");
16
17 sprintf(outfile, "%d.cp", CPEntryHeader.codepage);
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch
new file mode 100644
index 0000000000..c93f511950
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/compile.patch
@@ -0,0 +1,12 @@
1Upstream-Status: Pending
2
3--- console-tools-0.3.2/kbdtools/showkey.c~compile 1999-08-25 17:20:08.000000000 -0400
4+++ console-tools-0.3.2/kbdtools/showkey.c 2004-05-09 03:03:23.000000000 -0400
5@@ -264,7 +264,6 @@
6 break;
7 case cmd_keymap:
8 printf(")\n");
9- default:
10 }
11 }
12
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch
new file mode 100644
index 0000000000..15c100c908
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/configure.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Pending
2
3--- console-tools-0.3.2/configure.in~configure
4+++ console-tools-0.3.2/configure.in
5@@ -2,13 +2,14 @@
6 dnl Process this file with autoconf to produce a configure script.
7
8 # Initialize
9-AC_INIT(kbdtools/loadkeys.y)
10+AC_INIT
11+AC_CONFIG_SRCDIR([kbdtools/loadkeys.y])
12
13 define(ct_unicodedata_default,/usr/share/unidata/UnicodeData-2.txt)
14 ct_localdatadir_default=/usr/local/share # iff --enable-localdatadir without specific dir
15
16 #AC_CONFIG_AUX_DIR(autoconf)
17-AC_CANONICAL_SYSTEM
18+AC_CANONICAL_TARGET([])
19 AM_INIT_AUTOMAKE(console-tools, 0.3.2)
20
21 # Defaults
22@@ -25,7 +26,6 @@
23 # i18n stuff
24 ALL_LINGUAS="cs de ru ga fr"
25 AM_GNU_GETTEXT
26-AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
27
28 AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/share/locale")
29
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch
new file mode 100644
index 0000000000..be61eb846b
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/fix-libconsole-linking.patch
@@ -0,0 +1,56 @@
1Fix the following error detected with i586-pokymllib32-linux-gcc (the
2multilib x86-64 lib32 compiler):
3 ../lib/ctutils/.libs/libctutils.so: undefined reference to `get_kernel_sfm'
4 collect2: error: ld returned 1 exit status
5
6It seems that libctutils.so (the library that uses get_kernel_sfm) must
7be stated before libconsole.so (the library that exports the function) when
8using multilib gcc
9
10Upstream-Status: Pending
11Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
12
13Index: console-tools-0.3.2/fontfiletools/Makefile.am
14===================================================================
15--- console-tools-0.3.2.orig/fontfiletools/Makefile.am
16+++ console-tools-0.3.2/fontfiletools/Makefile.am
17@@ -10,5 +10,5 @@ EXTRA_DIST = fonts2virfont.c virfont.h
18
19 # libconsole is needed by ctutils
20 LDADD = ../lib/ctlocal/libctlocal.a ../lib/cfont/libcfont.la \
21- ../lib/console/libconsole.la \
22- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
23+ ../lib/ctutils/libctutils.la \
24+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
25Index: console-tools-0.3.2/vttools/Makefile.am
26===================================================================
27--- console-tools-0.3.2.orig/vttools/Makefile.am
28+++ console-tools-0.3.2/vttools/Makefile.am
29@@ -7,9 +7,9 @@ bin_PROGRAMS = chvt deallocvt writevt fg
30 vcstime vt-is-UTF8 openvt @RESIZECONS@
31 EXTRA_PROGRAMS = resizecons
32
33-LDADD = ../lib/ctlocal/libctlocal.a ../lib/console/libconsole.la \
34+LDADD = ../lib/ctlocal/libctlocal.a ../lib/ctutils/libctutils.la \
35 ../lib/cfont/libcfont.la \
36- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
37+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
38
39 vcstime_LDADD = ../lib/ctlocal/libctlocal.a
40 screendump_LDADD = ../lib/ctlocal/libctlocal.a
41Index: console-tools-0.3.2/kbdtools/Makefile.am
42===================================================================
43--- console-tools-0.3.2.orig/kbdtools/Makefile.am
44+++ console-tools-0.3.2/kbdtools/Makefile.am
45@@ -15,9 +15,9 @@ EXTRA_PROGRAMS = getkeycodes setkeycodes
46 loadkeys_SOURCES = loadkeys.y analyze.l
47
48 YFLAGS = -d
49-LDADD = ../lib/ctlocal/libctlocal.a ../lib/console/libconsole.la \
50+LDADD = ../lib/ctlocal/libctlocal.a ../lib/ctutils/libctutils.la \
51 ../lib/cfont/libcfont.la \
52- ../lib/ctutils/libctutils.la ../lib/generic/libctgeneric.la
53+ ../lib/console/libconsole.la ../lib/generic/libctgeneric.la
54
55 loadkeys_LDADD = $(LDADD) @LEXLIB@
56
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch
new file mode 100644
index 0000000000..f370be8592
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/kbdrate.patch
@@ -0,0 +1,75 @@
1Patch from Matthias Goebl <oe@m.goebl.net>
2Added via OE bugtracker: bug #478
3
4Upstream-Status: Pending
5
6--- console-tools-0.3.2/kbdtools/kbd_mode.c.orig
7+++ console-tools-0.3.2/kbdtools/kbd_mode.c
8@@ -29,11 +29,16 @@
9 OPT("-u --unicode ", _("UTF-8 mode (UNICODE)"));
10 OPT("-s --scancode ", _("scancode mode (RAW)"));
11 OPT(" --mode={8bit,keycode,unicode,scancode} ", _("set mode"));
12+ OPT("-r --rate=RATE ", _("set repeat rate (default: 33)"));
13+ OPT("-d --delay=DELAY ", _("set repeat delay (default: 250)"));
14
15 OPT("-h --help ", HELPDESC);
16 OPT("-V --version ", VERSIONDESC);
17 }
18
19+int rate=-1;
20+int delay=-1;
21+
22 static int parse_cmdline (int argc, char *argv[])
23 {
24 int mode = -1;
25@@ -46,11 +51,13 @@
26 { "mode" , required_argument, NULL, 'm' },
27 { "scancode" , no_argument, NULL, 's' },
28 { "unicode" , no_argument, NULL, 'u' },
29+ { "rate" , required_argument, NULL, 'r' },
30+ { "delay" , required_argument, NULL, 'd' },
31 { NULL, 0, NULL, 0 }
32 };
33 int c;
34
35- while ( (c = getopt_long (argc, argv, "Vhaksu", long_opts, NULL)) != EOF)
36+ while ( (c = getopt_long (argc, argv, "Vhaksur:d:", long_opts, NULL)) != EOF)
37 switch (c) {
38 case 'h':
39 usage ();
40@@ -58,6 +65,14 @@
41 case 'V':
42 version ();
43 exit(0);
44+ case 'r':
45+ rate = atoi(optarg);
46+ mode = -2;
47+ break;
48+ case 'd':
49+ delay = atoi(optarg);
50+ mode = -2;
51+ break;
52 case 'a':
53 mode = K_XLATE;
54 break;
55@@ -129,6 +144,20 @@
56 exit(0);
57 }
58
59+ if ( rate != -1 || delay != -1 )
60+ {
61+ struct kbd_repeat kbd_rep;
62+ kbd_rep.delay = delay;
63+ kbd_rep.period = rate;
64+ if (ioctl(fd, KDKBDREP, &kbd_rep))
65+ {
66+ fprintf(stderr, progname);
67+ perror(_(": error setting keyboard repeat mode\n"));
68+ exit(1);
69+ }
70+ if(mode==-2) exit(0);
71+ }
72+
73 if (ioctl(fd, KDSKBMODE, mode))
74 {
75 fprintf(stderr, progname);
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4 b/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4
new file mode 100644
index 0000000000..18d47a94f7
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/lcmessage.m4
@@ -0,0 +1,24 @@
1# Check whether LC_MESSAGES is available in <locale.h>.
2# Ulrich Drepper <drepper@cygnus.com>, 1995.
3#
4# This file can be copied and used freely without restrictions. It can
5# be used in projects which are not available under the GNU General Public
6# License or the GNU Library General Public License but which still want
7# to provide support for the GNU gettext functionality.
8# Please note that the actual code of the GNU gettext library is covered
9# by the GNU Library General Public License, and the rest of the GNU
10# gettext package package is covered by the GNU General Public License.
11# They are *not* in the public domain.
12
13# serial 2
14
15AC_DEFUN([AM_LC_MESSAGES],
16 [if test $ac_cv_header_locale_h = yes; then
17 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
18 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
19 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
20 if test $am_cv_val_LC_MESSAGES = yes; then
21 AC_DEFINE(HAVE_LC_MESSAGES, 1,
22 [Define if your <locale.h> file defines LC_MESSAGES.])
23 fi
24 fi])
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch
new file mode 100644
index 0000000000..2ed609219c
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/nodocs.patch
@@ -0,0 +1,22 @@
1The docs need tools we don't have to build so disable them.
2
3Also remove intl since the Makefile doesn't work with 3.82 and we
4don't want to build libintl anyway.
5
6Upstream-Status: Inappropriate [configuration]
7RP 2012/10/17
8
9Index: console-tools-0.3.2/Makefile.am
10===================================================================
11--- console-tools-0.3.2.orig/Makefile.am 1999-04-15 01:33:24.000000000 +0000
12+++ console-tools-0.3.2/Makefile.am 2012-10-17 11:48:14.107069145 +0000
13@@ -1,7 +1,7 @@
14 # -*- makefile -*-
15 AUTOMAKE_OPTIONS = foreign
16
17-SUBDIRS = lib fontfiletools vttools kbdtools screenfonttools contrib doc \
18- compat include examples po intl
19+SUBDIRS = lib fontfiletools vttools kbdtools screenfonttools contrib \
20+ compat include examples po
21
22 EXTRA_DIST = BUGS RELEASE CREDITS COPYING.kbd local-scripts/* debian/* *.lsm
diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch
new file mode 100644
index 0000000000..0c95068a36
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/uclibc-fileno.patch
@@ -0,0 +1,49 @@
1Fixing the locale issues isn't enough, console-tools also does a couple of
2other pretty stupid things (like FILE *f; f->_fileno instead of fileno(f)),
3
4Upstream-Status: Pending
5
6--- console-tools-0.3.2/lib/cfont/fontstruct.c.ark 2005-05-22 19:12:38.000000000 +0000
7+++ console-tools-0.3.2/lib/cfont/fontstruct.c 2005-05-22 19:13:23.000000000 +0000
8@@ -50,8 +50,7 @@
9 * get filesize
10 */
11
12- /* FIXME: should not use _fileno ! */
13- if (fstat(fontfile->_fileno, &stbuf) == -1)
14+ if (fstat(fileno(fontfile), &stbuf) == -1)
15 goto rsf_return_error;
16
17 if (S_ISREG(stbuf.st_mode))
18@@ -211,8 +210,7 @@
19 * get filesize
20 */
21
22- /* FIXME: should not use _fileno ! */
23- if (fstat(fontfile->_fileno, &stbuf) == -1)
24+ if (fstat(fileno(fontfile), &stbuf) == -1)
25 goto rfg_return_error;
26
27 if (S_ISREG(stbuf.st_mode))
28--- console-tools-0.3.2/lib/console/acm.c.ark 2005-05-22 19:17:15.000000000 +0000
29+++ console-tools-0.3.2/lib/console/acm.c 2005-05-22 19:17:23.000000000 +0000
30@@ -30,7 +30,7 @@
31 lct_boolean parse_failed = False;
32 lct_boolean is_unicode;
33
34- if (fstat(fp->_fileno, &stbuf))
35+ if (fstat(fileno(fp), &stbuf))
36 perror(_("Cannot stat ACM file")), exit(1);
37
38 /* first try a wg15-charmap (glibc) file format */
39--- console-tools-0.3.2/include/lct/local.h.ark 2005-05-22 19:08:54.000000000 +0000
40+++ console-tools-0.3.2/include/lct/local.h 2005-05-22 19:09:12.000000000 +0000
41@@ -8,7 +8,7 @@
42 #include <locale.h>
43
44
45-#ifdef HAVE_LOCALE_H
46+#if defined(HAVE_LOCALE_H) && defined(HAVE_LIBINTL_H)
47 # include <libintl.h>
48 # define _(String) gettext (String)
49 # ifdef gettext_noop
diff --git a/meta/recipes-core/console-tools/console-tools_0.3.2.bb b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
new file mode 100644
index 0000000000..8f2f116483
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
@@ -0,0 +1,36 @@
1SECTION = "base"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING.kbd;md5=9b2d91511d3d80d4d20ac6e6b0137fe9"
4SUMMARY = "Allows you to set-up and manipulate the Linux console."
5DESCRIPTION = "Provides tools that enable the set-up and manipulation of the linux console and console-font files."
6PR = "r8"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
9 file://codepage.patch \
10 file://configure.patch \
11 file://compile.patch \
12 file://kbdrate.patch \
13 file://uclibc-fileno.patch \
14 file://nodocs.patch \
15 file://fix-libconsole-linking.patch \
16 file://lcmessage.m4 \
17 file://Makevars"
18
19SRC_URI[md5sum] = "bf21564fc38b3af853ef724babddbacd"
20SRC_URI[sha256sum] = "eea6b441672dacd251079fc85ed322e196282e0e66c16303ec64c3a2b1c126c2"
21
22do_configure_prepend () {
23 mkdir -p ${S}/m4
24 cp ${WORKDIR}/lcmessage.m4 ${S}/m4/
25 rm -f ${S}/acinclude.m4
26 cp ${WORKDIR}/Makevars ${S}/po/
27}
28
29inherit autotools gettext update-alternatives
30
31ALTERNATIVE_PRIORITY = "100"
32
33bindir_progs = "chvt deallocvt fgconsole openvt"
34ALTERNATIVE_${PN} = "${bindir_progs}"
35
36RDEPENDS_${PN} = "bash"
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
new file mode 100644
index 0000000000..5452b46bbc
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
@@ -0,0 +1,120 @@
1Upstream-Status: Inappropriate [legacy version]
2
3This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
4
5The package is stated as being Licensed as GPLv2+.
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9----
10
11When "cp -i --update old new" would do nothing because "new" is
12newer than "old", cp would nonetheless prompt for whether it is
13ok to overwrite "new". Then, regardless of the response (because
14of the --update option), cp would do nothing.
15
16The following patch eliminates the unnecessary prompt in that case.
17
18diff --git a/src/copy.c b/src/copy.c
19index b7bf73b..0e549d2 100644
20--- a/src/copy.c
21+++ b/src/copy.c
22@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name,
23 return false;
24 }
25
26+ if (!S_ISDIR (src_mode) && x->update)
27+ {
28+ /* When preserving time stamps (but not moving within a file
29+ system), don't worry if the destination time stamp is
30+ less than the source merely because of time stamp
31+ truncation. */
32+ int options = ((x->preserve_timestamps
33+ && ! (x->move_mode
34+ && dst_sb.st_dev == src_sb.st_dev))
35+ ? UTIMECMP_TRUNCATE_SOURCE
36+ : 0);
37+
38+ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
39+ {
40+ /* We're using --update and the destination is not older
41+ than the source, so do not copy or move. Pretend the
42+ rename succeeded, so the caller (if it's mv) doesn't
43+ end up removing the source file. */
44+ if (rename_succeeded)
45+ *rename_succeeded = true;
46+ return true;
47+ }
48+ }
49+
50 /* When there is an existing destination file, we may end up
51 returning early, and hence not copying/moving the file.
52 This may be due to an interactive `negative' reply to the
53@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name,
54 return false;
55 }
56 }
57-
58- if (x->update)
59- {
60- /* When preserving time stamps (but not moving within a file
61- system), don't worry if the destination time stamp is
62- less than the source merely because of time stamp
63- truncation. */
64- int options = ((x->preserve_timestamps
65- && ! (x->move_mode
66- && dst_sb.st_dev == src_sb.st_dev))
67- ? UTIMECMP_TRUNCATE_SOURCE
68- : 0);
69-
70- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
71- {
72- /* We're using --update and the destination is not older
73- than the source, so do not copy or move. Pretend the
74- rename succeeded, so the caller (if it's mv) doesn't
75- end up removing the source file. */
76- if (rename_succeeded)
77- *rename_succeeded = true;
78- return true;
79- }
80- }
81 }
82
83 if (x->move_mode)
84diff --git a/tests/mv/update b/tests/mv/update
85index 0c06024..6c3d149 100755
86--- a/tests/mv/update
87+++ b/tests/mv/update
88@@ -1,7 +1,7 @@
89 #!/bin/sh
90 # make sure --update works as advertised
91
92-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
93+# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
94
95 # This program is free software; you can redistribute it and/or modify
96 # it under the terms of the GNU General Public License as published by
97@@ -46,11 +46,16 @@ fi
98
99 fail=0
100
101-for cp_or_mv in cp mv; do
102- # This is a no-op.
103- $cp_or_mv --update old new || fail=1
104- case "`cat new`" in new) ;; *) fail=1 ;; esac
105- case "`cat old`" in old) ;; *) fail=1 ;; esac
106+for interactive in '' -i; do
107+ for cp_or_mv in cp mv; do
108+ # This is a no-op, with no prompt.
109+ # With coreutils-6.9 and earlier, using --update with -i would
110+ # mistakenly elicit a prompt.
111+ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1
112+ test -s out && fail=1
113+ case "`cat new`" in new) ;; *) fail=1 ;; esac
114+ case "`cat old`" in old) ;; *) fail=1 ;; esac
115+ done
116 done
117
118 # This will actually perform the rename.
119--
1201.5.3.rc1.16.g9d6f
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch
new file mode 100644
index 0000000000..8273d78eb3
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Fix the following issue so that coreutils can build with ACL:
4
5configure: WARNING: libacl development library was not found or not usable.
6configure: WARNING: GNU coreutils will be built without ACL support.
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 m4/acl.m4 | 2 +-
11 1 files changed, 1 insertions(+), 1 deletions(-)
12
13diff --git a/m4/acl.m4 b/m4/acl.m4
14index d6a448a..a9d4836 100644
15--- a/m4/acl.m4
16+++ b/m4/acl.m4
17@@ -159,7 +159,7 @@ AC_DEFUN([gl_ACL_GET_FILE],
18 ]])],
19 [gl_cv_func_working_acl_get_file=yes],
20 [gl_cv_func_working_acl_get_file=no],
21- [gl_cv_func_working_acl_get_file=cross-compiling])])
22+ [gl_cv_func_working_acl_get_file=yes])])
23
24 AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
25 ])
26--
271.7.7
28
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch
new file mode 100644
index 0000000000..88f61fa108
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-fix-install.patch
@@ -0,0 +1,101 @@
1Upstream-Status: Inappropriate [legacy version]
2
3The install command doesn't over write the dangling symlink, for
4example:
5
6$ install fileA /tmp/fileA
7
8If /tmp/fileA is a dangling symlink, there would be an error:
9
10install: cannot create regular file '/tmp/fileA': File exists
11
12This is because of the following code in copy.c:
13
14 if (!new_dst)
15 {
16 if (XSTAT (x, dst_name, &dst_sb) != 0)
17 {
18 if (errno != ENOENT)
19 {
20 error (0, errno, _("cannot stat %s"), quote (dst_name));
21 return false;
22 }
23 else
24 {
25 new_dst = true;
26 }
27 }
28
29XSTAT() use stat() for dst_name(the dangling symlink /tmp/fileA) when
30install.c invokes it, and stat will set errno to ENOENT, and then
31new_dst will be set to true which means that /tmp/fileA doesn't exist,
32then we will create /tmp/fileA without remove it first, so the error
33comes.
34
35This is fixed in a way which adds the member cmd_install in
36struct cp_options to make sure my change only affected to the install
37command and use lstat to fix the problem.
38
39Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
40Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
41
42---
43 src/copy.c | 10 +++++++++-
44 src/copy.h | 3 +++
45 src/install.c | 1 +
46 3 files changed, 13 insertions(+), 1 deletions(-)
47
48diff --git a/src/copy.c b/src/copy.c
49--- a/src/copy.c
50+++ b/src/copy.c
51@@ -1029,6 +1029,7 @@ copy_internal (char const *src_name, char const *dst_name,
52 bool delayed_ok;
53 bool copied_as_regular = false;
54 bool preserve_metadata;
55+ int dst_stat_result;
56
57 if (x->move_mode && rename_succeeded)
58 *rename_succeeded = false;
59@@ -1069,7 +1070,14 @@ copy_internal (char const *src_name, char const *dst_name,
60
61 if (!new_dst)
62 {
63- if (XSTAT (x, dst_name, &dst_sb) != 0)
64+ if ( x->cmd_install && ( x->backup_type == no_backups))
65+ dst_stat_result = lstat (dst_name, &dst_sb);
66+ else
67+ {
68+ dst_stat_result = XSTAT (x, dst_name, &dst_sb);
69+ }
70+
71+ if (dst_stat_result != 0)
72 {
73 if (errno != ENOENT)
74 {
75diff --git a/src/copy.h b/src/copy.h
76--- a/src/copy.h
77+++ b/src/copy.h
78@@ -114,6 +114,9 @@ struct cp_options
79 If that fails, then resort to copying. */
80 bool move_mode;
81
82+ /* For the install command */
83+ bool cmd_install;
84+
85 /* Whether this process has appropriate privileges to chown a file
86 whose owner is not the effective user ID. */
87 bool chown_privileges;
88diff --git a/src/install.c b/src/install.c
89--- a/src/install.c
90+++ b/src/install.c
91@@ -149,6 +149,7 @@ cp_option_init (struct cp_options *x)
92 x->hard_link = false;
93 x->interactive = I_UNSPECIFIED;
94 x->move_mode = false;
95+ x->cmd_install = true;
96 x->chown_privileges = chown_privileges ();
97 x->one_file_system = false;
98 x->preserve_ownership = false;
99--
1001.7.0.1
101
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch
new file mode 100644
index 0000000000..653722348a
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-i18n.patch
@@ -0,0 +1,4051 @@
1Upstream-Status: Inappropriate [legacy version]
2
3This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
4
5The package is stated as being Licensed as GPLv2+.
6
7The comment indicates that the purpose is lin18nux/lsb compliance.
8
9Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10
11--- /dev/null 2007-03-01 09:16:39.219409909 +0000
12+++ coreutils-6.8+/tests/sort/sort-mb-tests 2007-03-01 15:08:24.000000000 +0000
13@@ -0,0 +1,58 @@
14+#! /bin/sh
15+case $# in
16+ 0) xx='../../src/sort';;
17+ *) xx="$1";;
18+esac
19+test "$VERBOSE" && echo=echo || echo=:
20+$echo testing program: $xx
21+errors=0
22+test "$srcdir" || srcdir=.
23+test "$VERBOSE" && $xx --version 2> /dev/null
24+
25+export LC_ALL=en_US.UTF-8
26+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77
27+errors=0
28+
29+$xx -t @ -k2 -n mb1.I > mb1.O
30+code=$?
31+if test $code != 0; then
32+ $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2
33+ errors=`expr $errors + 1`
34+else
35+ cmp mb1.O $srcdir/mb1.X > /dev/null 2>&1
36+ case $? in
37+ 0) if test "$VERBOSE"; then $echo "passed mb1"; fi;;
38+ 1) $echo "Test mb1 failed: files mb1.O and $srcdir/mb1.X differ" 1>&2
39+ (diff -c mb1.O $srcdir/mb1.X) 2> /dev/null
40+ errors=`expr $errors + 1`;;
41+ 2) $echo "Test mb1 may have failed." 1>&2
42+ $echo The command "cmp mb1.O $srcdir/mb1.X" failed. 1>&2
43+ errors=`expr $errors + 1`;;
44+ esac
45+fi
46+
47+$xx -t @ -k4 -n mb2.I > mb2.O
48+code=$?
49+if test $code != 0; then
50+ $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2
51+ errors=`expr $errors + 1`
52+else
53+ cmp mb2.O $srcdir/mb2.X > /dev/null 2>&1
54+ case $? in
55+ 0) if test "$VERBOSE"; then $echo "passed mb2"; fi;;
56+ 1) $echo "Test mb2 failed: files mb2.O and $srcdir/mb2.X differ" 1>&2
57+ (diff -c mb2.O $srcdir/mb2.X) 2> /dev/null
58+ errors=`expr $errors + 1`;;
59+ 2) $echo "Test mb2 may have failed." 1>&2
60+ $echo The command "cmp mb2.O $srcdir/mb2.X" failed. 1>&2
61+ errors=`expr $errors + 1`;;
62+ esac
63+fi
64+
65+if test $errors = 0; then
66+ $echo Passed all 113 tests. 1>&2
67+else
68+ $echo Failed $errors tests. 1>&2
69+fi
70+test $errors = 0 || errors=1
71+exit $errors
72--- /dev/null 2007-03-01 09:16:39.219409909 +0000
73+++ coreutils-6.8+/tests/sort/mb2.I 2007-03-01 15:08:24.000000000 +0000
74@@ -0,0 +1,4 @@
75+Apple@AA10@@20
76+Banana@AA5@@30
77+Citrus@AA20@@5
78+Cherry@AA30@@10
79--- /dev/null 2007-03-01 09:16:39.219409909 +0000
80+++ coreutils-6.8+/tests/sort/mb2.X 2007-03-01 15:08:24.000000000 +0000
81@@ -0,0 +1,4 @@
82+Citrus@AA20@@5
83+Cherry@AA30@@10
84+Apple@AA10@@20
85+Banana@AA5@@30
86--- /dev/null 2007-03-01 09:16:39.219409909 +0000
87+++ coreutils-6.8+/tests/sort/mb1.I 2007-03-01 15:08:24.000000000 +0000
88@@ -0,0 +1,4 @@
89+Apple@10
90+Banana@5
91+Citrus@20
92+Cherry@30
93--- /dev/null 2007-03-01 09:16:39.219409909 +0000
94+++ coreutils-6.8+/tests/sort/mb1.X 2007-03-01 15:08:24.000000000 +0000
95@@ -0,0 +1,4 @@
96+Banana@5
97+Apple@10
98+Citrus@20
99+Cherry@30
100--- coreutils-6.8+/tests/sort/Makefile.am.i18n 2007-01-24 07:47:37.000000000 +0000
101+++ coreutils-6.8+/tests/sort/Makefile.am 2007-03-01 15:09:59.000000000 +0000
102@@ -66,15 +66,17 @@
103 bigfield.O bigfield.E
104 ##test-files-end
105
106-EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
107-noinst_SCRIPTS = $x-tests
108+run_gen += mb1.0 mb2.0
109+
110+EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen) mb1.I mb1.X mb2.I mb2.X
111+noinst_SCRIPTS = $x-tests # $x-mb-tests
112 TESTS_ENVIRONMENT = \
113 CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
114 PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
115
116 editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
117
118-TESTS = $x-tests
119+TESTS = $x-tests $x-mb-tests
120
121 mk_script = $(srcdir)/../mk-script
122 $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
123--- coreutils-6.8+/lib/linebuffer.h.i18n 2005-05-14 07:44:24.000000000 +0100
124+++ coreutils-6.8+/lib/linebuffer.h 2007-03-01 15:08:24.000000000 +0000
125@@ -22,6 +22,11 @@
126
127 # include <stdio.h>
128
129+/* Get mbstate_t. */
130+# if HAVE_WCHAR_H
131+# include <wchar.h>
132+# endif
133+
134 /* A `struct linebuffer' holds a line of text. */
135
136 struct linebuffer
137@@ -29,6 +34,9 @@
138 size_t size; /* Allocated. */
139 size_t length; /* Used. */
140 char *buffer;
141+# if HAVE_WCHAR_H
142+ mbstate_t state;
143+# endif
144 };
145
146 /* Initialize linebuffer LINEBUFFER for use. */
147--- coreutils-6.8+/src/expand.c.i18n 2007-01-14 15:41:28.000000000 +0000
148+++ coreutils-6.8+/src/expand.c 2007-03-01 15:08:24.000000000 +0000
149@@ -38,11 +38,28 @@
150 #include <stdio.h>
151 #include <getopt.h>
152 #include <sys/types.h>
153+
154+/* Get mbstate_t, mbrtowc(), wcwidth(). */
155+#if HAVE_WCHAR_H
156+# include <wchar.h>
157+#endif
158+
159 #include "system.h"
160 #include "error.h"
161 #include "quote.h"
162 #include "xstrndup.h"
163
164+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
165+ installation; work around this configuration error. */
166+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
167+# define MB_LEN_MAX 16
168+#endif
169+
170+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
171+#if HAVE_MBRTOWC && defined mbstate_t
172+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
173+#endif
174+
175 /* The official name of this program (e.g., no `g' prefix). */
176 #define PROGRAM_NAME "expand"
177
178@@ -183,6 +200,7 @@
179 stops = num_start + len - 1;
180 }
181 }
182+
183 else
184 {
185 error (0, 0, _("tab size contains invalid character(s): %s"),
186@@ -365,6 +383,142 @@
187 }
188 }
189
190+#if HAVE_MBRTOWC
191+static void
192+expand_multibyte (void)
193+{
194+ FILE *fp; /* Input strem. */
195+ mbstate_t i_state; /* Current shift state of the input stream. */
196+ mbstate_t i_state_bak; /* Back up the I_STATE. */
197+ mbstate_t o_state; /* Current shift state of the output stream. */
198+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
199+ char *bufpos; /* Next read position of BUF. */
200+ size_t buflen = 0; /* The length of the byte sequence in buf. */
201+ wchar_t wc; /* A gotten wide character. */
202+ size_t mblength; /* The byte size of a multibyte character
203+ which shows as same character as WC. */
204+ int tab_index = 0; /* Index in `tab_list' of next tabstop. */
205+ int column = 0; /* Column on screen of the next char. */
206+ int next_tab_column; /* Column the next tab stop is on. */
207+ int convert = 1; /* If nonzero, perform translations. */
208+
209+ fp = next_file ((FILE *) NULL);
210+ if (fp == NULL)
211+ return;
212+
213+ memset (&o_state, '\0', sizeof(mbstate_t));
214+ memset (&i_state, '\0', sizeof(mbstate_t));
215+
216+ for (;;)
217+ {
218+ /* Refill the buffer BUF. */
219+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp))
220+ {
221+ memmove (buf, bufpos, buflen);
222+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp);
223+ bufpos = buf;
224+ }
225+
226+ /* No character is left in BUF. */
227+ if (buflen < 1)
228+ {
229+ fp = next_file (fp);
230+
231+ if (fp == NULL)
232+ break; /* No more files. */
233+ else
234+ {
235+ memset (&i_state, '\0', sizeof(mbstate_t));
236+ continue;
237+ }
238+ }
239+
240+ /* Get a wide character. */
241+ i_state_bak = i_state;
242+ mblength = mbrtowc (&wc, bufpos, buflen, &i_state);
243+
244+ switch (mblength)
245+ {
246+ case (size_t)-1: /* illegal byte sequence. */
247+ case (size_t)-2:
248+ mblength = 1;
249+ i_state = i_state_bak;
250+ if (convert)
251+ {
252+ ++column;
253+ if (convert_entire_line == 0)
254+ convert = 0;
255+ }
256+ putchar (*bufpos);
257+ break;
258+
259+ case 0: /* null. */
260+ mblength = 1;
261+ if (convert && convert_entire_line == 0)
262+ convert = 0;
263+ putchar ('\0');
264+ break;
265+
266+ default:
267+ if (wc == L'\n') /* LF. */
268+ {
269+ tab_index = 0;
270+ column = 0;
271+ convert = 1;
272+ putchar ('\n');
273+ }
274+ else if (wc == L'\t' && convert) /* Tab. */
275+ {
276+ if (tab_size == 0)
277+ {
278+ /* Do not let tab_index == first_free_tab;
279+ stop when it is 1 less. */
280+ while (tab_index < first_free_tab - 1
281+ && column >= tab_list[tab_index])
282+ tab_index++;
283+ next_tab_column = tab_list[tab_index];
284+ if (tab_index < first_free_tab - 1)
285+ tab_index++;
286+ if (column >= next_tab_column)
287+ next_tab_column = column + 1;
288+ }
289+ else
290+ next_tab_column = column + tab_size - column % tab_size;
291+
292+ while (column < next_tab_column)
293+ {
294+ putchar (' ');
295+ ++column;
296+ }
297+ }
298+ else /* Others. */
299+ {
300+ if (convert)
301+ {
302+ if (wc == L'\b')
303+ {
304+ if (column > 0)
305+ --column;
306+ }
307+ else
308+ {
309+ int width; /* The width of WC. */
310+
311+ width = wcwidth (wc);
312+ column += (width > 0) ? width : 0;
313+ if (convert_entire_line == 0)
314+ convert = 0;
315+ }
316+ }
317+ fwrite (bufpos, sizeof(char), mblength, stdout);
318+ }
319+ }
320+ buflen -= mblength;
321+ bufpos += mblength;
322+ }
323+}
324+#endif
325+
326 int
327 main (int argc, char **argv)
328 {
329@@ -429,7 +583,12 @@
330
331 file_list = (optind < argc ? &argv[optind] : stdin_argv);
332
333- expand ();
334+#if HAVE_MBRTOWC
335+ if (MB_CUR_MAX > 1)
336+ expand_multibyte ();
337+ else
338+#endif
339+ expand ();
340
341 if (have_read_stdin && fclose (stdin) != 0)
342 error (EXIT_FAILURE, errno, "-");
343--- coreutils-6.8+/src/join.c.i18n 2007-01-14 15:41:28.000000000 +0000
344+++ coreutils-6.8+/src/join.c 2007-03-01 15:08:24.000000000 +0000
345@@ -23,16 +23,30 @@
346 #include <sys/types.h>
347 #include <getopt.h>
348
349+/* Get mbstate_t, mbrtowc(), mbrtowc(), wcwidth(). */
350+#if HAVE_WCHAR_H
351+# include <wchar.h>
352+#endif
353+
354+/* Get iswblank(), towupper. */
355+#if HAVE_WCTYPE_H
356+# include <wctype.h>
357+#endif
358+
359 #include "system.h"
360 #include "error.h"
361 #include "hard-locale.h"
362 #include "linebuffer.h"
363-#include "memcasecmp.h"
364 #include "quote.h"
365 #include "stdio--.h"
366 #include "xmemcoll.h"
367 #include "xstrtol.h"
368
369+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
370+#if HAVE_MBRTOWC && defined mbstate_t
371+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
372+#endif
373+
374 /* The official name of this program (e.g., no `g' prefix). */
375 #define PROGRAM_NAME "join"
376
377@@ -104,10 +118,12 @@
378 /* Last element in `outlist', where a new element can be added. */
379 static struct outlist *outlist_end = &outlist_head;
380
381-/* Tab character separating fields. If negative, fields are separated
382- by any nonempty string of blanks, otherwise by exactly one
383- tab character whose value (when cast to unsigned char) equals TAB. */
384-static int tab = -1;
385+/* Tab character separating fields. If NULL, fields are separated
386+ by any nonempty string of blanks. */
387+static char *tab = NULL;
388+
389+/* The number of bytes used for tab. */
390+static size_t tablen = 0;
391
392 static struct option const longopts[] =
393 {
394@@ -190,6 +206,8 @@
395
396 /* Fill in the `fields' structure in LINE. */
397
398+/* Fill in the `fields' structure in LINE. */
399+
400 static void
401 xfields (struct line *line)
402 {
403@@ -199,10 +217,11 @@
404 if (ptr == lim)
405 return;
406
407- if (0 <= tab)
408+ if (tab != NULL)
409 {
410+ unsigned char t = tab[0];
411 char *sep;
412- for (; (sep = memchr (ptr, tab, lim - ptr)) != NULL; ptr = sep + 1)
413+ for (; (sep = memchr (ptr, t, lim - ptr)) != NULL; ptr = sep + 1)
414 extract_field (line, ptr, sep - ptr);
415 }
416 else
417@@ -229,6 +248,148 @@
418 extract_field (line, ptr, lim - ptr);
419 }
420
421+#if HAVE_MBRTOWC
422+static void
423+xfields_multibyte (struct line *line)
424+{
425+ char *ptr = line->buf.buffer;
426+ char const *lim = ptr + line->buf.length - 1;
427+ wchar_t wc = 0;
428+ size_t mblength = 1;
429+ mbstate_t state, state_bak;
430+
431+ memset (&state, 0, sizeof (mbstate_t));
432+
433+ if (ptr == lim)
434+ return;
435+
436+ if (tab != NULL)
437+ {
438+ unsigned char t = tab[0];
439+ char *sep = ptr;
440+ for (; ptr < lim; ptr = sep + mblength)
441+ {
442+ sep = ptr;
443+ while (sep < lim)
444+ {
445+ state_bak = state;
446+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
447+
448+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
449+ {
450+ mblength = 1;
451+ state = state_bak;
452+ }
453+ mblength = (mblength < 1) ? 1 : mblength;
454+
455+ if (mblength == tablen && !memcmp (sep, tab, mblength))
456+ break;
457+ else
458+ {
459+ sep += mblength;
460+ continue;
461+ }
462+ }
463+
464+ if (sep == lim)
465+ break;
466+
467+ extract_field (line, ptr, sep - ptr);
468+ }
469+ }
470+ else
471+ {
472+ /* Skip leading blanks before the first field. */
473+ while(ptr < lim)
474+ {
475+ state_bak = state;
476+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
477+
478+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
479+ {
480+ mblength = 1;
481+ state = state_bak;
482+ break;
483+ }
484+ mblength = (mblength < 1) ? 1 : mblength;
485+
486+ if (!iswblank(wc))
487+ break;
488+ ptr += mblength;
489+ }
490+
491+ do
492+ {
493+ char *sep;
494+ state_bak = state;
495+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
496+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
497+ {
498+ mblength = 1;
499+ state = state_bak;
500+ break;
501+ }
502+ mblength = (mblength < 1) ? 1 : mblength;
503+
504+ sep = ptr + mblength;
505+ while (sep != lim)
506+ {
507+ state_bak = state;
508+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
509+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
510+ {
511+ mblength = 1;
512+ state = state_bak;
513+ break;
514+ }
515+ mblength = (mblength < 1) ? 1 : mblength;
516+
517+ if (iswblank (wc))
518+ break;
519+
520+ sep += mblength;
521+ }
522+
523+ extract_field (line, ptr, sep - ptr);
524+ if (sep == lim)
525+ return;
526+
527+ state_bak = state;
528+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
529+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
530+ {
531+ mblength = 1;
532+ state = state_bak;
533+ break;
534+ }
535+ mblength = (mblength < 1) ? 1 : mblength;
536+
537+ ptr = sep + mblength;
538+ while (ptr != lim)
539+ {
540+ state_bak = state;
541+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
542+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
543+ {
544+ mblength = 1;
545+ state = state_bak;
546+ break;
547+ }
548+ mblength = (mblength < 1) ? 1 : mblength;
549+
550+ if (!iswblank (wc))
551+ break;
552+
553+ ptr += mblength;
554+ }
555+ }
556+ while (ptr != lim);
557+ }
558+
559+ extract_field (line, ptr, lim - ptr);
560+}
561+#endif
562+
563 /* Read a line from FP into LINE and split it into fields.
564 Return true if successful. */
565
566@@ -249,6 +410,11 @@
567 line->nfields_allocated = 0;
568 line->nfields = 0;
569 line->fields = NULL;
570+#if HAVE_MBRTOWC
571+ if (MB_CUR_MAX > 1)
572+ xfields_multibyte (line);
573+ else
574+#endif
575 xfields (line);
576 return true;
577 }
578@@ -303,56 +469,114 @@
579 keycmp (struct line const *line1, struct line const *line2)
580 {
581 /* Start of field to compare in each file. */
582- char *beg1;
583- char *beg2;
584-
585- size_t len1;
586- size_t len2; /* Length of fields to compare. */
587+ char *beg[2];
588+ char *copy[2];
589+ size_t len[2]; /* Length of fields to compare. */
590 int diff;
591+ int i, j;
592
593 if (join_field_1 < line1->nfields)
594 {
595- beg1 = line1->fields[join_field_1].beg;
596- len1 = line1->fields[join_field_1].len;
597+ beg[0] = line1->fields[join_field_1].beg;
598+ len[0] = line1->fields[join_field_1].len;
599 }
600 else
601 {
602- beg1 = NULL;
603- len1 = 0;
604+ beg[0] = NULL;
605+ len[0] = 0;
606 }
607
608 if (join_field_2 < line2->nfields)
609 {
610- beg2 = line2->fields[join_field_2].beg;
611- len2 = line2->fields[join_field_2].len;
612+ beg[1] = line2->fields[join_field_2].beg;
613+ len[1] = line2->fields[join_field_2].len;
614 }
615 else
616 {
617- beg2 = NULL;
618- len2 = 0;
619+ beg[1] = NULL;
620+ len[1] = 0;
621 }
622
623- if (len1 == 0)
624- return len2 == 0 ? 0 : -1;
625- if (len2 == 0)
626+ if (len[0] == 0)
627+ return len[1] == 0 ? 0 : -1;
628+ if (len[1] == 0)
629 return 1;
630
631 if (ignore_case)
632 {
633- /* FIXME: ignore_case does not work with NLS (in particular,
634- with multibyte chars). */
635- diff = memcasecmp (beg1, beg2, MIN (len1, len2));
636+#ifdef HAVE_MBRTOWC
637+ if (MB_CUR_MAX > 1)
638+ {
639+ size_t mblength;
640+ wchar_t wc, uwc;
641+ mbstate_t state, state_bak;
642+
643+ memset (&state, '\0', sizeof (mbstate_t));
644+
645+ for (i = 0; i < 2; i++)
646+ {
647+ copy[i] = alloca (len[i] + 1);
648+
649+ for (j = 0; j < MIN (len[0], len[1]);)
650+ {
651+ state_bak = state;
652+ mblength = mbrtowc (&wc, beg[i] + j, len[i] - j, &state);
653+
654+ switch (mblength)
655+ {
656+ case (size_t) -1:
657+ case (size_t) -2:
658+ state = state_bak;
659+ /* Fall through */
660+ case 0:
661+ mblength = 1;
662+ break;
663+
664+ default:
665+ uwc = towupper (wc);
666+
667+ if (uwc != wc)
668+ {
669+ mbstate_t state_wc;
670+
671+ memset (&state_wc, '\0', sizeof (mbstate_t));
672+ wcrtomb (copy[i] + j, uwc, &state_wc);
673+ }
674+ else
675+ memcpy (copy[i] + j, beg[i] + j, mblength);
676+ }
677+ j += mblength;
678+ }
679+ copy[i][j] = '\0';
680+ }
681+ }
682+ else
683+#endif
684+ {
685+ for (i = 0; i < 2; i++)
686+ {
687+ copy[i] = alloca (len[i] + 1);
688+
689+ for (j = 0; j < MIN (len[0], len[1]); j++)
690+ copy[i][j] = toupper (beg[i][j]);
691+
692+ copy[i][j] = '\0';
693+ }
694+ }
695 }
696 else
697 {
698- if (hard_LC_COLLATE)
699- return xmemcoll (beg1, len1, beg2, len2);
700- diff = memcmp (beg1, beg2, MIN (len1, len2));
701+ copy[0] = (unsigned char *) beg[0];
702+ copy[1] = (unsigned char *) beg[1];
703 }
704
705+ if (hard_LC_COLLATE)
706+ return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);
707+ diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));
708+
709 if (diff)
710 return diff;
711- return len1 < len2 ? -1 : len1 != len2;
712+ return len[0] - len[1];
713 }
714
715 /* Print field N of LINE if it exists and is nonempty, otherwise
716@@ -377,11 +601,18 @@
717
718 /* Print the join of LINE1 and LINE2. */
719
720+#define PUT_TAB_CHAR \
721+ do \
722+ { \
723+ (tab != NULL) ? \
724+ fwrite(tab, sizeof(char), tablen, stdout) : putchar (' '); \
725+ } \
726+ while (0)
727+
728 static void
729 prjoin (struct line const *line1, struct line const *line2)
730 {
731 const struct outlist *outlist;
732- char output_separator = tab < 0 ? ' ' : tab;
733
734 outlist = outlist_head.next;
735 if (outlist)
736@@ -397,12 +628,12 @@
737 if (o->file == 0)
738 {
739 if (line1 == &uni_blank)
740- {
741+ {
742 line = line2;
743 field = join_field_2;
744 }
745 else
746- {
747+ {
748 line = line1;
749 field = join_field_1;
750 }
751@@ -416,7 +647,7 @@
752 o = o->next;
753 if (o == NULL)
754 break;
755- putchar (output_separator);
756+ PUT_TAB_CHAR;
757 }
758 putchar ('\n');
759 }
760@@ -434,23 +665,23 @@
761 prfield (join_field_1, line1);
762 for (i = 0; i < join_field_1 && i < line1->nfields; ++i)
763 {
764- putchar (output_separator);
765+ PUT_TAB_CHAR;
766 prfield (i, line1);
767 }
768 for (i = join_field_1 + 1; i < line1->nfields; ++i)
769 {
770- putchar (output_separator);
771+ PUT_TAB_CHAR;
772 prfield (i, line1);
773 }
774
775 for (i = 0; i < join_field_2 && i < line2->nfields; ++i)
776 {
777- putchar (output_separator);
778+ PUT_TAB_CHAR;
779 prfield (i, line2);
780 }
781 for (i = join_field_2 + 1; i < line2->nfields; ++i)
782 {
783- putchar (output_separator);
784+ PUT_TAB_CHAR;
785 prfield (i, line2);
786 }
787 putchar ('\n');
788@@ -859,20 +1090,41 @@
789
790 case 't':
791 {
792- unsigned char newtab = optarg[0];
793- if (! newtab)
794+ char *newtab;
795+ size_t newtablen;
796+ if (! optarg[0])
797 error (EXIT_FAILURE, 0, _("empty tab"));
798- if (optarg[1])
799+ newtab = xstrdup (optarg);
800+#if HAVE_MBRTOWC
801+ if (MB_CUR_MAX > 1)
802+ {
803+ mbstate_t state;
804+
805+ memset (&state, 0, sizeof (mbstate_t));
806+ newtablen = mbrtowc (NULL, newtab,
807+ strnlen (newtab, MB_LEN_MAX),
808+ &state);
809+ if (newtablen == (size_t) 0
810+ || newtablen == (size_t) -1
811+ || newtablen == (size_t) -2)
812+ newtablen = 1;
813+ }
814+ else
815+#endif
816+ newtablen = 1;
817+
818+ if (newtablen == 1 && newtab[1])
819+ {
820+ if (STREQ (newtab, "\\0"))
821+ newtab[0] = '\0';
822+ }
823+ if (tab != NULL && strcmp (tab, newtab))
824 {
825- if (STREQ (optarg, "\\0"))
826- newtab = '\0';
827- else
828- error (EXIT_FAILURE, 0, _("multi-character tab %s"),
829- quote (optarg));
830+ free (newtab);
831+ error (EXIT_FAILURE, 0, _("incompatible tabs"));
832 }
833- if (0 <= tab && tab != newtab)
834- error (EXIT_FAILURE, 0, _("incompatible tabs"));
835 tab = newtab;
836+ tablen = newtablen;
837 }
838 break;
839
840--- coreutils-6.8+/src/uniq.c.i18n 2007-01-14 15:41:28.000000000 +0000
841+++ coreutils-6.8+/src/uniq.c 2007-03-01 15:08:24.000000000 +0000
842@@ -23,6 +23,16 @@
843 #include <getopt.h>
844 #include <sys/types.h>
845
846+/* Get mbstate_t, mbrtowc(). */
847+#if HAVE_WCHAR_H
848+# include <wchar.h>
849+#endif
850+
851+/* Get isw* functions. */
852+#if HAVE_WCTYPE_H
853+# include <wctype.h>
854+#endif
855+
856 #include "system.h"
857 #include "argmatch.h"
858 #include "linebuffer.h"
859@@ -32,7 +42,19 @@
860 #include "quote.h"
861 #include "xmemcoll.h"
862 #include "xstrtol.h"
863-#include "memcasecmp.h"
864+#include "xmemcoll.h"
865+
866+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
867+ installation; work around this configuration error. */
868+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
869+# define MB_LEN_MAX 16
870+#endif
871+
872+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
873+#if HAVE_MBRTOWC && defined mbstate_t
874+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
875+#endif
876+
877
878 /* The official name of this program (e.g., no `g' prefix). */
879 #define PROGRAM_NAME "uniq"
880@@ -109,6 +131,10 @@
881 /* Select whether/how to delimit groups of duplicate lines. */
882 static enum delimit_method delimit_groups;
883
884+/* Function pointers. */
885+static char *
886+(*find_field) (struct linebuffer *line);
887+
888 static struct option const longopts[] =
889 {
890 {"count", no_argument, NULL, 'c'},
891@@ -198,7 +224,7 @@
892 return a pointer to the beginning of the line's field to be compared. */
893
894 static char *
895-find_field (const struct linebuffer *line)
896+find_field_uni (struct linebuffer *line)
897 {
898 size_t count;
899 char *lp = line->buffer;
900@@ -219,6 +245,83 @@
901 return lp + i;
902 }
903
904+#if HAVE_MBRTOWC
905+
906+# define MBCHAR_TO_WCHAR(WC, MBLENGTH, LP, POS, SIZE, STATEP, CONVFAIL) \
907+ do \
908+ { \
909+ mbstate_t state_bak; \
910+ \
911+ CONVFAIL = 0; \
912+ state_bak = *STATEP; \
913+ \
914+ MBLENGTH = mbrtowc (&WC, LP + POS, SIZE - POS, STATEP); \
915+ \
916+ switch (MBLENGTH) \
917+ { \
918+ case (size_t)-2: \
919+ case (size_t)-1: \
920+ *STATEP = state_bak; \
921+ CONVFAIL++; \
922+ /* Fall through */ \
923+ case 0: \
924+ MBLENGTH = 1; \
925+ } \
926+ } \
927+ while (0)
928+
929+static char *
930+find_field_multi (struct linebuffer *line)
931+{
932+ size_t count;
933+ char *lp = line->buffer;
934+ size_t size = line->length - 1;
935+ size_t pos;
936+ size_t mblength;
937+ wchar_t wc;
938+ mbstate_t *statep;
939+ int convfail;
940+
941+ pos = 0;
942+ statep = &(line->state);
943+
944+ /* skip fields. */
945+ for (count = 0; count < skip_fields && pos < size; count++)
946+ {
947+ while (pos < size)
948+ {
949+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
950+
951+ if (convfail || !iswblank (wc))
952+ {
953+ pos += mblength;
954+ break;
955+ }
956+ pos += mblength;
957+ }
958+
959+ while (pos < size)
960+ {
961+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
962+
963+ if (!convfail && iswblank (wc))
964+ break;
965+
966+ pos += mblength;
967+ }
968+ }
969+
970+ /* skip fields. */
971+ for (count = 0; count < skip_chars && pos < size; count++)
972+ {
973+ MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail);
974+ pos += mblength;
975+ }
976+
977+ return lp + pos;
978+}
979+#endif
980+
981 /* Return false if two strings OLD and NEW match, true if not.
982 OLD and NEW point not to the beginnings of the lines
983 but rather to the beginnings of the fields to compare.
984@@ -227,6 +330,8 @@
985 static bool
986 different (char *old, char *new, size_t oldlen, size_t newlen)
987 {
988+ char *copy_old, *copy_new;
989+
990 if (check_chars < oldlen)
991 oldlen = check_chars;
992 if (check_chars < newlen)
993@@ -234,14 +339,92 @@
994
995 if (ignore_case)
996 {
997- /* FIXME: This should invoke strcoll somehow. */
998- return oldlen != newlen || memcasecmp (old, new, oldlen);
999+ size_t i;
1000+
1001+ copy_old = alloca (oldlen + 1);
1002+ copy_new = alloca (oldlen + 1);
1003+
1004+ for (i = 0; i < oldlen; i++)
1005+ {
1006+ copy_old[i] = toupper (old[i]);
1007+ copy_new[i] = toupper (new[i]);
1008+ }
1009 }
1010- else if (hard_LC_COLLATE)
1011- return xmemcoll (old, oldlen, new, newlen) != 0;
1012 else
1013- return oldlen != newlen || memcmp (old, new, oldlen);
1014+ {
1015+ copy_old = (char *)old;
1016+ copy_new = (char *)new;
1017+ }
1018+
1019+ return xmemcoll (copy_old, oldlen, copy_new, newlen);
1020+}
1021+
1022+#if HAVE_MBRTOWC
1023+static int
1024+different_multi (const char *old, const char *new, size_t oldlen, size_t newlen, mbstate_t oldstate, mbstate_t newstate)
1025+{
1026+ size_t i, j, chars;
1027+ const char *str[2];
1028+ char *copy[2];
1029+ size_t len[2];
1030+ mbstate_t state[2];
1031+ size_t mblength;
1032+ wchar_t wc, uwc;
1033+ mbstate_t state_bak;
1034+
1035+ str[0] = old;
1036+ str[1] = new;
1037+ len[0] = oldlen;
1038+ len[1] = newlen;
1039+ state[0] = oldstate;
1040+ state[1] = newstate;
1041+
1042+ for (i = 0; i < 2; i++)
1043+ {
1044+ copy[i] = alloca (len[i] + 1);
1045+
1046+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
1047+ {
1048+ state_bak = state[i];
1049+ mblength = mbrtowc (&wc, str[i] + j, len[i] - j, &(state[i]));
1050+
1051+ switch (mblength)
1052+ {
1053+ case (size_t)-1:
1054+ case (size_t)-2:
1055+ state[i] = state_bak;
1056+ /* Fall through */
1057+ case 0:
1058+ mblength = 1;
1059+ break;
1060+
1061+ default:
1062+ if (ignore_case)
1063+ {
1064+ uwc = towupper (wc);
1065+
1066+ if (uwc != wc)
1067+ {
1068+ mbstate_t state_wc;
1069+
1070+ memset (&state_wc, '\0', sizeof(mbstate_t));
1071+ wcrtomb (copy[i] + j, uwc, &state_wc);
1072+ }
1073+ else
1074+ memcpy (copy[i] + j, str[i] + j, mblength);
1075+ }
1076+ else
1077+ memcpy (copy[i] + j, str[i] + j, mblength);
1078+ }
1079+ j += mblength;
1080+ }
1081+ copy[i][j] = '\0';
1082+ len[i] = j;
1083+ }
1084+
1085+ return xmemcoll (copy[0], len[0], copy[1], len[1]);
1086 }
1087+#endif
1088
1089 /* Output the line in linebuffer LINE to standard output
1090 provided that the switches say it should be output.
1091@@ -295,15 +478,43 @@
1092 {
1093 char *prevfield IF_LINT (= NULL);
1094 size_t prevlen IF_LINT (= 0);
1095+#if HAVE_MBRTOWC
1096+ mbstate_t prevstate;
1097+
1098+ memset (&prevstate, '\0', sizeof (mbstate_t));
1099+#endif
1100
1101 while (!feof (stdin))
1102 {
1103 char *thisfield;
1104 size_t thislen;
1105+#if HAVE_MBRTOWC
1106+ mbstate_t thisstate;
1107+#endif
1108+
1109 if (readlinebuffer (thisline, stdin) == 0)
1110 break;
1111 thisfield = find_field (thisline);
1112 thislen = thisline->length - 1 - (thisfield - thisline->buffer);
1113+#if HAVE_MBRTOWC
1114+ if (MB_CUR_MAX > 1)
1115+ {
1116+ thisstate = thisline->state;
1117+
1118+ if (prevline->length == 0 || different_multi
1119+ (thisfield, prevfield, thislen, prevlen, thisstate, prevstate))
1120+ {
1121+ fwrite (thisline->buffer, sizeof (char),
1122+ thisline->length, stdout);
1123+
1124+ SWAP_LINES (prevline, thisline);
1125+ prevfield = thisfield;
1126+ prevlen = thislen;
1127+ prevstate = thisstate;
1128+ }
1129+ }
1130+ else
1131+#endif
1132 if (prevline->length == 0
1133 || different (thisfield, prevfield, thislen, prevlen))
1134 {
1135@@ -322,17 +533,26 @@
1136 size_t prevlen;
1137 uintmax_t match_count = 0;
1138 bool first_delimiter = true;
1139+#if HAVE_MBRTOWC
1140+ mbstate_t prevstate;
1141+#endif
1142
1143 if (readlinebuffer (prevline, stdin) == 0)
1144 goto closefiles;
1145 prevfield = find_field (prevline);
1146 prevlen = prevline->length - 1 - (prevfield - prevline->buffer);
1147+#if HAVE_MBRTOWC
1148+ prevstate = prevline->state;
1149+#endif
1150
1151 while (!feof (stdin))
1152 {
1153 bool match;
1154 char *thisfield;
1155 size_t thislen;
1156+#if HAVE_MBRTOWC
1157+ mbstate_t thisstate;
1158+#endif
1159 if (readlinebuffer (thisline, stdin) == 0)
1160 {
1161 if (ferror (stdin))
1162@@ -341,6 +561,15 @@
1163 }
1164 thisfield = find_field (thisline);
1165 thislen = thisline->length - 1 - (thisfield - thisline->buffer);
1166+#if HAVE_MBRTOWC
1167+ if (MB_CUR_MAX > 1)
1168+ {
1169+ thisstate = thisline->state;
1170+ match = !different_multi (thisfield, prevfield,
1171+ thislen, prevlen, thisstate, prevstate);
1172+ }
1173+ else
1174+#endif
1175 match = !different (thisfield, prevfield, thislen, prevlen);
1176 match_count += match;
1177
1178@@ -373,6 +602,9 @@
1179 SWAP_LINES (prevline, thisline);
1180 prevfield = thisfield;
1181 prevlen = thislen;
1182+#if HAVE_MBRTOWC
1183+ prevstate = thisstate;
1184+#endif
1185 if (!match)
1186 match_count = 0;
1187 }
1188@@ -417,6 +649,19 @@
1189
1190 atexit (close_stdout);
1191
1192+#if HAVE_MBRTOWC
1193+ if (MB_CUR_MAX > 1)
1194+ {
1195+ find_field = find_field_multi;
1196+ }
1197+ else
1198+#endif
1199+ {
1200+ find_field = find_field_uni;
1201+ }
1202+
1203+
1204+
1205 skip_chars = 0;
1206 skip_fields = 0;
1207 check_chars = SIZE_MAX;
1208--- coreutils-6.8+/src/fold.c.i18n 2007-02-23 12:01:47.000000000 +0000
1209+++ coreutils-6.8+/src/fold.c 2007-03-01 15:08:24.000000000 +0000
1210@@ -23,11 +23,33 @@
1211 #include <getopt.h>
1212 #include <sys/types.h>
1213
1214+/* Get mbstate_t, mbrtowc(), wcwidth(). */
1215+#if HAVE_WCHAR_H
1216+# include <wchar.h>
1217+#endif
1218+
1219+/* Get iswprint(), iswblank(), wcwidth(). */
1220+#if HAVE_WCTYPE_H
1221+# include <wctype.h>
1222+#endif
1223+
1224 #include "system.h"
1225 #include "error.h"
1226 #include "quote.h"
1227 #include "xstrtol.h"
1228
1229+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
1230+ installation; work around this configuration error. */
1231+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
1232+# undef MB_LEN_MAX
1233+# define MB_LEN_MAX 16
1234+#endif
1235+
1236+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
1237+#if HAVE_MBRTOWC && defined mbstate_t
1238+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
1239+#endif
1240+
1241 #define TAB_WIDTH 8
1242
1243 /* The official name of this program (e.g., no `g' prefix). */
1244@@ -35,23 +57,44 @@
1245
1246 #define AUTHORS "David MacKenzie"
1247
1248+#define FATAL_ERROR(Message) \
1249+ do \
1250+ { \
1251+ error (0, 0, (Message)); \
1252+ usage (2); \
1253+ } \
1254+ while (0)
1255+
1256+enum operating_mode
1257+{
1258+ /* Fold texts by columns that are at the given positions. */
1259+ column_mode,
1260+
1261+ /* Fold texts by bytes that are at the given positions. */
1262+ byte_mode,
1263+
1264+ /* Fold texts by characters that are at the given positions. */
1265+ character_mode,
1266+};
1267+
1268 /* The name this program was run with. */
1269 char *program_name;
1270
1271+/* The argument shows current mode. (Default: column_mode) */
1272+static enum operating_mode operating_mode;
1273+
1274 /* If nonzero, try to break on whitespace. */
1275 static bool break_spaces;
1276
1277-/* If nonzero, count bytes, not column positions. */
1278-static bool count_bytes;
1279-
1280 /* If nonzero, at least one of the files we read was standard input. */
1281 static bool have_read_stdin;
1282
1283-static char const shortopts[] = "bsw:0::1::2::3::4::5::6::7::8::9::";
1284+static char const shortopts[] = "bcsw:0::1::2::3::4::5::6::7::8::9::";
1285
1286 static struct option const longopts[] =
1287 {
1288 {"bytes", no_argument, NULL, 'b'},
1289+ {"characters", no_argument, NULL, 'c'},
1290 {"spaces", no_argument, NULL, 's'},
1291 {"width", required_argument, NULL, 'w'},
1292 {GETOPT_HELP_OPTION_DECL},
1293@@ -81,6 +124,7 @@
1294 "), stdout);
1295 fputs (_("\
1296 -b, --bytes count bytes rather than columns\n\
1297+ -c, --characters count characters rather than columns\n\
1298 -s, --spaces break at spaces\n\
1299 -w, --width=WIDTH use WIDTH columns instead of 80\n\
1300 "), stdout);
1301@@ -98,7 +142,7 @@
1302 static size_t
1303 adjust_column (size_t column, char c)
1304 {
1305- if (!count_bytes)
1306+ if (operating_mode != byte_mode)
1307 {
1308 if (c == '\b')
1309 {
1310@@ -121,30 +165,14 @@
1311 to stdout, with maximum line length WIDTH.
1312 Return true if successful. */
1313
1314-static bool
1315-fold_file (char const *filename, size_t width)
1316+static void
1317+fold_text (FILE *istream, size_t width, int *saved_errno)
1318 {
1319- FILE *istream;
1320 int c;
1321 size_t column = 0; /* Screen column where next char will go. */
1322 size_t offset_out = 0; /* Index in `line_out' for next char. */
1323 static char *line_out = NULL;
1324 static size_t allocated_out = 0;
1325- int saved_errno;
1326-
1327- if (STREQ (filename, "-"))
1328- {
1329- istream = stdin;
1330- have_read_stdin = true;
1331- }
1332- else
1333- istream = fopen (filename, "r");
1334-
1335- if (istream == NULL)
1336- {
1337- error (0, errno, "%s", filename);
1338- return false;
1339- }
1340
1341 while ((c = getc (istream)) != EOF)
1342 {
1343@@ -172,6 +200,15 @@
1344 bool found_blank = false;
1345 size_t logical_end = offset_out;
1346
1347+ /* If LINE_OUT has no wide character,
1348+ put a new wide character in LINE_OUT
1349+ if column is bigger than width. */
1350+ if (offset_out == 0)
1351+ {
1352+ line_out[offset_out++] = c;
1353+ continue;
1354+ }
1355+
1356 /* Look for the last blank. */
1357 while (logical_end)
1358 {
1359@@ -218,11 +255,225 @@
1360 line_out[offset_out++] = c;
1361 }
1362
1363- saved_errno = errno;
1364+ *saved_errno = errno;
1365+
1366+ if (offset_out)
1367+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
1368+
1369+ free(line_out);
1370+}
1371+
1372+#if HAVE_MBRTOWC
1373+static void
1374+fold_multibyte_text (FILE *istream, size_t width, int *saved_errno)
1375+{
1376+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
1377+ size_t buflen = 0; /* The length of the byte sequence in buf. */
1378+ char *bufpos; /* Next read position of BUF. */
1379+ wint_t wc; /* A gotten wide character. */
1380+ size_t mblength; /* The byte size of a multibyte character which shows
1381+ as same character as WC. */
1382+ mbstate_t state, state_bak; /* State of the stream. */
1383+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
1384+
1385+ char *line_out = NULL;
1386+ size_t offset_out = 0; /* Index in `line_out' for next char. */
1387+ size_t allocated_out = 0;
1388+
1389+ int increment;
1390+ size_t column = 0;
1391+
1392+ size_t last_blank_pos;
1393+ size_t last_blank_column;
1394+ int is_blank_seen;
1395+ int last_blank_increment;
1396+ int is_bs_following_last_blank;
1397+ size_t bs_following_last_blank_num;
1398+ int is_cr_after_last_blank;
1399+
1400+#define CLEAR_FLAGS \
1401+ do \
1402+ { \
1403+ last_blank_pos = 0; \
1404+ last_blank_column = 0; \
1405+ is_blank_seen = 0; \
1406+ is_bs_following_last_blank = 0; \
1407+ bs_following_last_blank_num = 0; \
1408+ is_cr_after_last_blank = 0; \
1409+ } \
1410+ while (0)
1411+
1412+#define START_NEW_LINE \
1413+ do \
1414+ { \
1415+ putchar ('\n'); \
1416+ column = 0; \
1417+ offset_out = 0; \
1418+ CLEAR_FLAGS; \
1419+ } \
1420+ while (0)
1421+
1422+ CLEAR_FLAGS;
1423+ memset (&state, '\0', sizeof(mbstate_t));
1424+
1425+ for (;; bufpos += mblength, buflen -= mblength)
1426+ {
1427+ if (buflen < MB_LEN_MAX && !feof (istream) && !ferror (istream))
1428+ {
1429+ memmove (buf, bufpos, buflen);
1430+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, istream);
1431+ bufpos = buf;
1432+ }
1433+
1434+ if (buflen < 1)
1435+ break;
1436+
1437+ /* Get a wide character. */
1438+ convfail = 0;
1439+ state_bak = state;
1440+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state);
1441+
1442+ switch (mblength)
1443+ {
1444+ case (size_t)-1:
1445+ case (size_t)-2:
1446+ convfail++;
1447+ state = state_bak;
1448+ /* Fall through. */
1449+
1450+ case 0:
1451+ mblength = 1;
1452+ break;
1453+ }
1454+
1455+rescan:
1456+ if (operating_mode == byte_mode) /* byte mode */
1457+ increment = mblength;
1458+ else if (operating_mode == character_mode) /* character mode */
1459+ increment = 1;
1460+ else /* column mode */
1461+ {
1462+ if (convfail)
1463+ increment = 1;
1464+ else
1465+ {
1466+ switch (wc)
1467+ {
1468+ case L'\n':
1469+ fwrite (line_out, sizeof(char), offset_out, stdout);
1470+ START_NEW_LINE;
1471+ continue;
1472+
1473+ case L'\b':
1474+ increment = (column > 0) ? -1 : 0;
1475+ break;
1476+
1477+ case L'\r':
1478+ increment = -1 * column;
1479+ break;
1480+
1481+ case L'\t':
1482+ increment = 8 - column % 8;
1483+ break;
1484+
1485+ default:
1486+ increment = wcwidth (wc);
1487+ increment = (increment < 0) ? 0 : increment;
1488+ }
1489+ }
1490+ }
1491+
1492+ if (column + increment > width && break_spaces && last_blank_pos)
1493+ {
1494+ fwrite (line_out, sizeof(char), last_blank_pos, stdout);
1495+ putchar ('\n');
1496+
1497+ offset_out = offset_out - last_blank_pos;
1498+ column = column - last_blank_column + ((is_cr_after_last_blank)
1499+ ? last_blank_increment : bs_following_last_blank_num);
1500+ memmove (line_out, line_out + last_blank_pos, offset_out);
1501+ CLEAR_FLAGS;
1502+ goto rescan;
1503+ }
1504+
1505+ if (column + increment > width && column != 0)
1506+ {
1507+ fwrite (line_out, sizeof(char), offset_out, stdout);
1508+ START_NEW_LINE;
1509+ goto rescan;
1510+ }
1511+
1512+ if (allocated_out < offset_out + mblength)
1513+ {
1514+ allocated_out += 1024;
1515+ line_out = xrealloc (line_out, allocated_out);
1516+ }
1517+
1518+ memcpy (line_out + offset_out, bufpos, mblength);
1519+ offset_out += mblength;
1520+ column += increment;
1521+
1522+ if (is_blank_seen && !convfail && wc == L'\r')
1523+ is_cr_after_last_blank = 1;
1524+
1525+ if (is_bs_following_last_blank && !convfail && wc == L'\b')
1526+ ++bs_following_last_blank_num;
1527+ else
1528+ is_bs_following_last_blank = 0;
1529+
1530+ if (break_spaces && !convfail && iswblank (wc))
1531+ {
1532+ last_blank_pos = offset_out;
1533+ last_blank_column = column;
1534+ is_blank_seen = 1;
1535+ last_blank_increment = increment;
1536+ is_bs_following_last_blank = 1;
1537+ bs_following_last_blank_num = 0;
1538+ is_cr_after_last_blank = 0;
1539+ }
1540+ }
1541+
1542+ *saved_errno = errno;
1543
1544 if (offset_out)
1545 fwrite (line_out, sizeof (char), (size_t) offset_out, stdout);
1546
1547+ free(line_out);
1548+}
1549+#endif
1550+
1551+/* Fold file FILENAME, or standard input if FILENAME is "-",
1552+ to stdout, with maximum line length WIDTH.
1553+ Return 0 if successful, 1 if an error occurs. */
1554+
1555+static bool
1556+fold_file (char *filename, size_t width)
1557+{
1558+ FILE *istream;
1559+ int saved_errno;
1560+
1561+ if (STREQ (filename, "-"))
1562+ {
1563+ istream = stdin;
1564+ have_read_stdin = 1;
1565+ }
1566+ else
1567+ istream = fopen (filename, "r");
1568+
1569+ if (istream == NULL)
1570+ {
1571+ error (0, errno, "%s", filename);
1572+ return 1;
1573+ }
1574+
1575+ /* Define how ISTREAM is being folded. */
1576+#if HAVE_MBRTOWC
1577+ if (MB_CUR_MAX > 1)
1578+ fold_multibyte_text (istream, width, &saved_errno);
1579+ else
1580+#endif
1581+ fold_text (istream, width, &saved_errno);
1582+
1583 if (ferror (istream))
1584 {
1585 error (0, saved_errno, "%s", filename);
1586@@ -255,7 +506,8 @@
1587
1588 atexit (close_stdout);
1589
1590- break_spaces = count_bytes = have_read_stdin = false;
1591+ operating_mode = column_mode;
1592+ break_spaces = have_read_stdin = false;
1593
1594 while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
1595 {
1596@@ -264,7 +516,15 @@
1597 switch (optc)
1598 {
1599 case 'b': /* Count bytes rather than columns. */
1600- count_bytes = true;
1601+ if (operating_mode != column_mode)
1602+ FATAL_ERROR (_("only one way of folding may be specified"));
1603+ operating_mode = byte_mode;
1604+ break;
1605+
1606+ case 'c':
1607+ if (operating_mode != column_mode)
1608+ FATAL_ERROR (_("only one way of folding may be specified"));
1609+ operating_mode = character_mode;
1610 break;
1611
1612 case 's': /* Break at word boundaries. */
1613--- coreutils-6.8+/src/sort.c.i18n 2007-02-24 11:23:23.000000000 +0000
1614+++ coreutils-6.8+/src/sort.c 2007-03-01 15:10:57.000000000 +0000
1615@@ -23,10 +23,19 @@
1616
1617 #include <config.h>
1618
1619+#include <assert.h>
1620 #include <getopt.h>
1621 #include <sys/types.h>
1622 #include <sys/wait.h>
1623 #include <signal.h>
1624+#if HAVE_WCHAR_H
1625+# include <wchar.h>
1626+#endif
1627+/* Get isw* functions. */
1628+#if HAVE_WCTYPE_H
1629+# include <wctype.h>
1630+#endif
1631+
1632 #include "system.h"
1633 #include "argmatch.h"
1634 #include "error.h"
1635@@ -116,14 +125,38 @@
1636 /* Thousands separator; if -1, then there isn't one. */
1637 static int thousands_sep;
1638
1639+static int force_general_numcompare = 0;
1640+
1641 /* Nonzero if the corresponding locales are hard. */
1642 static bool hard_LC_COLLATE;
1643-#if HAVE_NL_LANGINFO
1644+#if HAVE_LANGINFO_CODESET
1645 static bool hard_LC_TIME;
1646 #endif
1647
1648 #define NONZERO(x) ((x) != 0)
1649
1650+/* get a multibyte character's byte length. */
1651+#define GET_BYTELEN_OF_CHAR(LIM, PTR, MBLENGTH, STATE) \
1652+ do \
1653+ { \
1654+ wchar_t wc; \
1655+ mbstate_t state_bak; \
1656+ \
1657+ state_bak = STATE; \
1658+ mblength = mbrtowc (&wc, PTR, LIM - PTR, &STATE); \
1659+ \
1660+ switch (MBLENGTH) \
1661+ { \
1662+ case (size_t)-1: \
1663+ case (size_t)-2: \
1664+ STATE = state_bak; \
1665+ /* Fall through. */ \
1666+ case 0: \
1667+ MBLENGTH = 1; \
1668+ } \
1669+ } \
1670+ while (0)
1671+
1672 /* The kind of blanks for '-b' to skip in various options. */
1673 enum blanktype { bl_start, bl_end, bl_both };
1674
1675@@ -261,13 +294,11 @@
1676 they were read if all keys compare equal. */
1677 static bool stable;
1678
1679-/* If TAB has this value, blanks separate fields. */
1680-enum { TAB_DEFAULT = CHAR_MAX + 1 };
1681-
1682-/* Tab character separating fields. If TAB_DEFAULT, then fields are
1683+/* Tab character separating fields. If tab_length is 0, then fields are
1684 separated by the empty string between a non-blank character and a blank
1685 character. */
1686-static int tab = TAB_DEFAULT;
1687+static char tab[MB_LEN_MAX + 1];
1688+static size_t tab_length = 0;
1689
1690 /* Flag to remove consecutive duplicate lines from the output.
1691 Only the last of a sequence of equal lines will be output. */
1692@@ -639,6 +670,44 @@
1693 update_proc (pid);
1694 }
1695
1696+/* Function pointers. */
1697+static void
1698+(*inittables) (void);
1699+static char *
1700+(*begfield) (const struct line*, const struct keyfield *);
1701+static char *
1702+(*limfield) (const struct line*, const struct keyfield *);
1703+static int
1704+(*getmonth) (char const *, size_t);
1705+static int
1706+(*keycompare) (const struct line *, const struct line *);
1707+static int
1708+(*numcompare) (const char *, const char *);
1709+
1710+/* Test for white space multibyte character.
1711+ Set LENGTH the byte length of investigated multibyte character. */
1712+#if HAVE_MBRTOWC
1713+static int
1714+ismbblank (const char *str, size_t len, size_t *length)
1715+{
1716+ size_t mblength;
1717+ wchar_t wc;
1718+ mbstate_t state;
1719+
1720+ memset (&state, '\0', sizeof(mbstate_t));
1721+ mblength = mbrtowc (&wc, str, len, &state);
1722+
1723+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
1724+ {
1725+ *length = 1;
1726+ return 0;
1727+ }
1728+
1729+ *length = (mblength < 1) ? 1 : mblength;
1730+ return iswblank (wc);
1731+}
1732+#endif
1733+
1734 /* Clean up any remaining temporary files. */
1735
1736 static void
1737@@ -978,7 +1047,7 @@
1738 free (node);
1739 }
1740
1741-#if HAVE_NL_LANGINFO
1742+#if HAVE_LANGINFO_CODESET
1743
1744 static int
1745 struct_month_cmp (const void *m1, const void *m2)
1746@@ -993,7 +1062,7 @@
1747 /* Initialize the character class tables. */
1748
1749 static void
1750-inittables (void)
1751+inittables_uni (void)
1752 {
1753 size_t i;
1754
1755@@ -1005,7 +1074,7 @@
1756 fold_toupper[i] = toupper (i);
1757 }
1758
1759-#if HAVE_NL_LANGINFO
1760+#if HAVE_LANGINFO_CODESET
1761 /* If we're not in the "C" locale, read different names for months. */
1762 if (hard_LC_TIME)
1763 {
1764@@ -1031,6 +1100,64 @@
1765 #endif
1766 }
1767
1768+#if HAVE_MBRTOWC
1769+static void
1770+inittables_mb (void)
1771+{
1772+ int i, j, k, l;
1773+ char *name, *s;
1774+ size_t s_len, mblength;
1775+ char mbc[MB_LEN_MAX];
1776+ wchar_t wc, pwc;
1777+ mbstate_t state_mb, state_wc;
1778+
1779+ for (i = 0; i < MONTHS_PER_YEAR; i++)
1780+ {
1781+ s = (char *) nl_langinfo (ABMON_1 + i);
1782+ s_len = strlen (s);
1783+ monthtab[i].name = name = (char *) xmalloc (s_len + 1);
1784+ monthtab[i].val = i + 1;
1785+
1786+ memset (&state_mb, '\0', sizeof (mbstate_t));
1787+ memset (&state_wc, '\0', sizeof (mbstate_t));
1788+
1789+ for (j = 0; j < s_len;)
1790+ {
1791+ if (!ismbblank (s + j, s_len - j, &mblength))
1792+ break;
1793+ j += mblength;
1794+ }
1795+
1796+ for (k = 0; j < s_len;)
1797+ {
1798+ mblength = mbrtowc (&wc, (s + j), (s_len - j), &state_mb);
1799+ assert (mblength != (size_t)-1 && mblength != (size_t)-2);
1800+ if (mblength == 0)
1801+ break;
1802+
1803+ pwc = towupper (wc);
1804+ if (pwc == wc)
1805+ {
1806+ memcpy (mbc, s + j, mblength);
1807+ j += mblength;
1808+ }
1809+ else
1810+ {
1811+ j += mblength;
1812+ mblength = wcrtomb (mbc, pwc, &state_wc);
1813+ assert (mblength != (size_t)0 && mblength != (size_t)-1);
1814+ }
1815+
1816+ for (l = 0; l < mblength; l++)
1817+ name[k++] = mbc[l];
1818+ }
1819+ name[k] = '\0';
1820+ }
1821+ qsort ((void *) monthtab, MONTHS_PER_YEAR,
1822+ sizeof (struct month), struct_month_cmp);
1823+}
1824+#endif
1825+
1826 /* Specify the amount of main memory to use when sorting. */
1827 static void
1828 specify_sort_size (char const *s)
1829@@ -1241,7 +1368,7 @@
1830 by KEY in LINE. */
1831
1832 static char *
1833-begfield (const struct line *line, const struct keyfield *key)
1834+begfield_uni (const struct line *line, const struct keyfield *key)
1835 {
1836 char *ptr = line->text, *lim = ptr + line->length - 1;
1837 size_t sword = key->sword;
1838@@ -1251,10 +1378,10 @@
1839 /* The leading field separator itself is included in a field when -t
1840 is absent. */
1841
1842- if (tab != TAB_DEFAULT)
1843+ if (tab_length)
1844 while (ptr < lim && sword--)
1845 {
1846- while (ptr < lim && *ptr != tab)
1847+ while (ptr < lim && *ptr != tab[0])
1848 ++ptr;
1849 if (ptr < lim)
1850 ++ptr;
1851@@ -1282,11 +1409,70 @@
1852 return ptr;
1853 }
1854
1855+#if HAVE_MBRTOWC
1856+static char *
1857+begfield_mb (const struct line *line, const struct keyfield *key)
1858+{
1859+ int i;
1860+ char *ptr = line->text, *lim = ptr + line->length - 1;
1861+ size_t sword = key->sword;
1862+ size_t schar = key->schar;
1863+ size_t mblength;
1864+ mbstate_t state;
1865+
1866+ memset (&state, '\0', sizeof(mbstate_t));
1867+
1868+ if (tab_length)
1869+ while (ptr < lim && sword--)
1870+ {
1871+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0)
1872+ {
1873+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1874+ ptr += mblength;
1875+ }
1876+ if (ptr < lim)
1877+ {
1878+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1879+ ptr += mblength;
1880+ }
1881+ }
1882+ else
1883+ while (ptr < lim && sword--)
1884+ {
1885+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
1886+ ptr += mblength;
1887+ if (ptr < lim)
1888+ {
1889+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1890+ ptr += mblength;
1891+ }
1892+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength))
1893+ ptr += mblength;
1894+ }
1895+
1896+ if (key->skipsblanks)
1897+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
1898+ ptr += mblength;
1899+
1900+ for (i = 0; i < schar; i++)
1901+ {
1902+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1903+
1904+ if (ptr + mblength > lim)
1905+ break;
1906+ else
1907+ ptr += mblength;
1908+ }
1909+
1910+ return ptr;
1911+}
1912+#endif
1913+
1914 /* Return the limit of (a pointer to the first character after) the field
1915 in LINE specified by KEY. */
1916
1917 static char *
1918-limfield (const struct line *line, const struct keyfield *key)
1919+limfield_uni (const struct line *line, const struct keyfield *key)
1920 {
1921 char *ptr = line->text, *lim = ptr + line->length - 1;
1922 size_t eword = key->eword, echar = key->echar;
1923@@ -1299,10 +1485,10 @@
1924 `beginning' is the first character following the delimiting TAB.
1925 Otherwise, leave PTR pointing at the first `blank' character after
1926 the preceding field. */
1927- if (tab != TAB_DEFAULT)
1928+ if (tab_length)
1929 while (ptr < lim && eword--)
1930 {
1931- while (ptr < lim && *ptr != tab)
1932+ while (ptr < lim && *ptr != tab[0])
1933 ++ptr;
1934 if (ptr < lim && (eword | echar))
1935 ++ptr;
1936@@ -1348,10 +1534,10 @@
1937 */
1938
1939 /* Make LIM point to the end of (one byte past) the current field. */
1940- if (tab != TAB_DEFAULT)
1941+ if (tab_length)
1942 {
1943 char *newlim;
1944- newlim = memchr (ptr, tab, lim - ptr);
1945+ newlim = memchr (ptr, tab[0], lim - ptr);
1946 if (newlim)
1947 lim = newlim;
1948 }
1949@@ -1384,6 +1570,107 @@
1950 return ptr;
1951 }
1952
1953+#if HAVE_MBRTOWC
1954+static char *
1955+limfield_mb (const struct line *line, const struct keyfield *key)
1956+{
1957+ char *ptr = line->text, *lim = ptr + line->length - 1;
1958+ size_t eword = key->eword, echar = key->echar;
1959+ int i;
1960+ size_t mblength;
1961+ mbstate_t state;
1962+
1963+ memset (&state, '\0', sizeof(mbstate_t));
1964+
1965+ if (tab_length)
1966+ while (ptr < lim && eword--)
1967+ {
1968+ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0)
1969+ {
1970+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1971+ ptr += mblength;
1972+ }
1973+ if (ptr < lim && (eword | echar))
1974+ {
1975+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1976+ ptr += mblength;
1977+ }
1978+ }
1979+ else
1980+ while (ptr < lim && eword--)
1981+ {
1982+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
1983+ ptr += mblength;
1984+ if (ptr < lim)
1985+ {
1986+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
1987+ ptr += mblength;
1988+ }
1989+ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength))
1990+ ptr += mblength;
1991+ }
1992+
1993+
1994+# ifdef POSIX_UNSPECIFIED
1995+ /* Make LIM point to the end of (one byte past) the current field. */
1996+ if (tab_length)
1997+ {
1998+ char *newlim, *p;
1999+
2000+ newlim = NULL;
2001+ for (p = ptr; p < lim;)
2002+ {
2003+ if (memcmp (p, tab, tab_length) == 0)
2004+ {
2005+ newlim = p;
2006+ break;
2007+ }
2008+
2009+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
2010+ p += mblength;
2011+ }
2012+ }
2013+ else
2014+ {
2015+ char *newlim;
2016+ newlim = ptr;
2017+
2018+ while (newlim < lim && ismbblank (newlim, lim - newlim, &mblength))
2019+ newlim += mblength;
2020+ if (ptr < lim)
2021+ {
2022+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
2023+ ptr += mblength;
2024+ }
2025+ while (newlim < lim && !ismbblank (newlim, lim - newlim, &mblength))
2026+ newlim += mblength;
2027+ lim = newlim;
2028+ }
2029+# endif
2030+
2031+ /* If we're skipping leading blanks, don't start counting characters
2032+ * until after skipping past any leading blanks. */
2033+ if (key->skipsblanks)
2034+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength))
2035+ ptr += mblength;
2036+
2037+ memset (&state, '\0', sizeof(mbstate_t));
2038+
2039+ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
2040+ for (i = 0; i < echar; i++)
2041+ {
2042+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
2043+
2044+ if (ptr + mblength > lim)
2045+ break;
2046+ else
2047+ ptr += mblength;
2048+ }
2049+
2050+ return ptr;
2051+}
2052+#endif
2053+
2054 /* Fill BUF reading from FP, moving buf->left bytes from the end
2055 of buf->buf to the beginning first. If EOF is reached and the
2056 file wasn't terminated by a newline, supply one. Set up BUF's line
2057@@ -1466,8 +1753,24 @@
2058 else
2059 {
2060 if (key->skipsblanks)
2061- while (blanks[to_uchar (*line_start)])
2062- line_start++;
2063+ {
2064+#if HAVE_MBRTOWC
2065+ if (MB_CUR_MAX > 1)
2066+ {
2067+ size_t mblength;
2068+ mbstate_t state;
2069+ memset (&state, '\0', sizeof(mbstate_t));
2070+ while (line_start < line->keylim &&
2071+ ismbblank (line_start,
2072+ line->keylim - line_start,
2073+ &mblength))
2074+ line_start += mblength;
2075+ }
2076+ else
2077+#endif
2078+ while (blanks[to_uchar (*line_start)])
2079+ line_start++;
2080+ }
2081 line->keybeg = line_start;
2082 }
2083 }
2084@@ -1500,7 +1803,7 @@
2085 hideously fast. */
2086
2087 static int
2088-numcompare (const char *a, const char *b)
2089+numcompare_uni (const char *a, const char *b)
2090 {
2091 while (blanks[to_uchar (*a)])
2092 a++;
2093@@ -1510,6 +1813,25 @@
2094 return strnumcmp (a, b, decimal_point, thousands_sep);
2095 }
2096
2097+#if HAVE_MBRTOWC
2098+static int
2099+numcompare_mb (const char *a, const char *b)
2100+{
2101+ size_t mblength, len;
2102+ len = strlen (a); /* okay for UTF-8 */
2103+ while (*a && ismbblank (a, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength))
2104+ {
2105+ a += mblength;
2106+ len -= mblength;
2107+ }
2108+ len = strlen (b); /* okay for UTF-8 */
2109+ while (*b && ismbblank (b, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength))
2110+ b += mblength;
2111+
2112+ return strnumcmp (a, b, decimal_point, thousands_sep);
2113+}
2114+#endif /* HAV_EMBRTOWC */
2115+
2116 static int
2117 general_numcompare (const char *sa, const char *sb)
2118 {
2119@@ -1543,7 +1865,7 @@
2120 Return 0 if the name in S is not recognized. */
2121
2122 static int
2123-getmonth (char const *month, size_t len)
2124+getmonth_uni (char const *month, size_t len)
2125 {
2126 size_t lo = 0;
2127 size_t hi = MONTHS_PER_YEAR;
2128@@ -1698,11 +2020,79 @@
2129 return diff;
2130 }
2131
2132+#if HAVE_MBRTOWC
2133+static int
2134+getmonth_mb (const char *s, size_t len)
2135+{
2136+ char *month;
2137+ register size_t i;
2138+ register int lo = 0, hi = MONTHS_PER_YEAR, result;
2139+ char *tmp;
2140+ size_t wclength, mblength;
2141+ const char **pp;
2142+ const wchar_t **wpp;
2143+ wchar_t *month_wcs;
2144+ mbstate_t state;
2145+
2146+ while (len > 0 && ismbblank (s, len, &mblength))
2147+ {
2148+ s += mblength;
2149+ len -= mblength;
2150+ }
2151+
2152+ if (len == 0)
2153+ return 0;
2154+
2155+ month = (char *) alloca (len + 1);
2156+
2157+ tmp = (char *) alloca (len + 1);
2158+ memcpy (tmp, s, len);
2159+ tmp[len] = '\0';
2160+ pp = (const char **)&tmp;
2161+ month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t));
2162+ memset (&state, '\0', sizeof(mbstate_t));
2163+
2164+ wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
2165+ assert (wclength != (size_t)-1 && *pp == NULL);
2166+
2167+ for (i = 0; i < wclength; i++)
2168+ {
2169+ month_wcs[i] = towupper(month_wcs[i]);
2170+ if (iswblank (month_wcs[i]))
2171+ {
2172+ month_wcs[i] = L'\0';
2173+ break;
2174+ }
2175+ }
2176+
2177+ wpp = (const wchar_t **)&month_wcs;
2178+
2179+ mblength = wcsrtombs (month, wpp, len + 1, &state);
2180+ assert (mblength != (-1) && *wpp == NULL);
2181+
2182+ do
2183+ {
2184+ int ix = (lo + hi) / 2;
2185+
2186+ if (strncmp (month, monthtab[ix].name, strlen (monthtab[ix].name)) < 0)
2187+ hi = ix;
2188+ else
2189+ lo = ix;
2190+ }
2191+ while (hi - lo > 1);
2192+
2193+ result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name))
2194+ ? monthtab[lo].val : 0);
2195+
2196+ return result;
2197+}
2198+#endif
2199+
2200 /* Compare two lines A and B trying every key in sequence until there
2201 are no more keys or a difference is found. */
2202
2203 static int
2204-keycompare (const struct line *a, const struct line *b)
2205+keycompare_uni (const struct line *a, const struct line *b)
2206 {
2207 struct keyfield const *key = keylist;
2208
2209@@ -1875,6 +2265,179 @@
2210 return key->reverse ? -diff : diff;
2211 }
2212
2213+#if HAVE_MBRTOWC
2214+static int
2215+keycompare_mb (const struct line *a, const struct line *b)
2216+{
2217+ struct keyfield *key = keylist;
2218+
2219+ /* For the first iteration only, the key positions have been
2220+ precomputed for us. */
2221+ char *texta = a->keybeg;
2222+ char *textb = b->keybeg;
2223+ char *lima = a->keylim;
2224+ char *limb = b->keylim;
2225+
2226+ size_t mblength_a, mblength_b;
2227+ wchar_t wc_a, wc_b;
2228+ mbstate_t state_a, state_b;
2229+
2230+ int diff;
2231+
2232+ memset (&state_a, '\0', sizeof(mbstate_t));
2233+ memset (&state_b, '\0', sizeof(mbstate_t));
2234+
2235+ for (;;)
2236+ {
2237+ unsigned char *translate = (unsigned char *) key->translate;
2238+ bool const *ignore = key->ignore;
2239+
2240+ /* Find the lengths. */
2241+ size_t lena = lima <= texta ? 0 : lima - texta;
2242+ size_t lenb = limb <= textb ? 0 : limb - textb;
2243+
2244+ /* Actually compare the fields. */
2245+ if (key->random)
2246+ diff = compare_random (texta, lena, textb, lenb);
2247+ else if (key->numeric | key->general_numeric)
2248+ {
2249+ char savea = *lima, saveb = *limb;
2250+
2251+ *lima = *limb = '\0';
2252+ if (force_general_numcompare)
2253+ diff = general_numcompare (texta, textb);
2254+ else
2255+ diff = ((key->numeric ? numcompare : general_numcompare)
2256+ (texta, textb));
2257+ *lima = savea, *limb = saveb;
2258+ }
2259+ else if (key->month)
2260+ diff = getmonth (texta, lena) - getmonth (textb, lenb);
2261+ else
2262+ {
2263+ if (ignore || translate)
2264+ {
2265+ char *copy_a = (char *) alloca (lena + 1 + lenb + 1);
2266+ char *copy_b = copy_a + lena + 1;
2267+ size_t new_len_a, new_len_b;
2268+ size_t i, j;
2269+
2270+ /* Ignore and/or translate chars before comparing. */
2271+# define IGNORE_CHARS(NEW_LEN, LEN, TEXT, COPY, WC, MBLENGTH, STATE) \
2272+ do \
2273+ { \
2274+ wchar_t uwc; \
2275+ char mbc[MB_LEN_MAX]; \
2276+ mbstate_t state_wc; \
2277+ \
2278+ for (NEW_LEN = i = 0; i < LEN;) \
2279+ { \
2280+ mbstate_t state_bak; \
2281+ \
2282+ state_bak = STATE; \
2283+ MBLENGTH = mbrtowc (&WC, TEXT + i, LEN - i, &STATE); \
2284+ \
2285+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1 \
2286+ || MBLENGTH == 0) \
2287+ { \
2288+ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
2289+ STATE = state_bak; \
2290+ if (!ignore) \
2291+ COPY[NEW_LEN++] = TEXT[i++]; \
2292+ continue; \
2293+ } \
2294+ \
2295+ if (ignore) \
2296+ { \
2297+ if ((ignore == nonprinting && !iswprint (WC)) \
2298+ || (ignore == nondictionary \
2299+ && !iswalnum (WC) && !iswblank (WC))) \
2300+ { \
2301+ i += MBLENGTH; \
2302+ continue; \
2303+ } \
2304+ } \
2305+ \
2306+ if (translate) \
2307+ { \
2308+ \
2309+ uwc = towupper(WC); \
2310+ if (WC == uwc) \
2311+ { \
2312+ memcpy (mbc, TEXT + i, MBLENGTH); \
2313+ i += MBLENGTH; \
2314+ } \
2315+ else \
2316+ { \
2317+ i += MBLENGTH; \
2318+ WC = uwc; \
2319+ memset (&state_wc, '\0', sizeof (mbstate_t)); \
2320+ \
2321+ MBLENGTH = wcrtomb (mbc, WC, &state_wc); \
2322+ assert (MBLENGTH != (size_t)-1 && MBLENGTH != 0); \
2323+ } \
2324+ \
2325+ for (j = 0; j < MBLENGTH; j++) \
2326+ COPY[NEW_LEN++] = mbc[j]; \
2327+ } \
2328+ else \
2329+ for (j = 0; j < MBLENGTH; j++) \
2330+ COPY[NEW_LEN++] = TEXT[i++]; \
2331+ } \
2332+ COPY[NEW_LEN] = '\0'; \
2333+ } \
2334+ while (0)
2335+ IGNORE_CHARS (new_len_a, lena, texta, copy_a,
2336+ wc_a, mblength_a, state_a);
2337+ IGNORE_CHARS (new_len_b, lenb, textb, copy_b,
2338+ wc_b, mblength_b, state_b);
2339+ diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);
2340+ }
2341+ else if (lena == 0)
2342+ diff = - NONZERO (lenb);
2343+ else if (lenb == 0)
2344+ goto greater;
2345+ else
2346+ diff = xmemcoll (texta, lena, textb, lenb);
2347+ }
2348+
2349+ if (diff)
2350+ goto not_equal;
2351+
2352+ key = key->next;
2353+ if (! key)
2354+ break;
2355+
2356+ /* Find the beginning and limit of the next field. */
2357+ if (key->eword != -1)
2358+ lima = limfield (a, key), limb = limfield (b, key);
2359+ else
2360+ lima = a->text + a->length - 1, limb = b->text + b->length - 1;
2361+
2362+ if (key->sword != -1)
2363+ texta = begfield (a, key), textb = begfield (b, key);
2364+ else
2365+ {
2366+ texta = a->text, textb = b->text;
2367+ if (key->skipsblanks)
2368+ {
2369+ while (texta < lima && ismbblank (texta, lima - texta, &mblength_a))
2370+ texta += mblength_a;
2371+ while (textb < limb && ismbblank (textb, limb - textb, &mblength_b))
2372+ textb += mblength_b;
2373+ }
2374+ }
2375+ }
2376+
2377+ return 0;
2378+
2379+greater:
2380+ diff = 1;
2381+not_equal:
2382+ return key->reverse ? -diff : diff;
2383+}
2384+#endif
2385+
2386 /* Compare two lines A and B, returning negative, zero, or positive
2387 depending on whether A compares less than, equal to, or greater than B. */
2388
2389@@ -2744,7 +3305,7 @@
2390 initialize_exit_failure (SORT_FAILURE);
2391
2392 hard_LC_COLLATE = hard_locale (LC_COLLATE);
2393-#if HAVE_NL_LANGINFO
2394+#if HAVE_LANGINFO_CODESET
2395 hard_LC_TIME = hard_locale (LC_TIME);
2396 #endif
2397
2398@@ -2765,6 +3326,27 @@
2399 thousands_sep = -1;
2400 }
2401
2402+#if HAVE_MBRTOWC
2403+ if (MB_CUR_MAX > 1)
2404+ {
2405+ inittables = inittables_mb;
2406+ begfield = begfield_mb;
2407+ limfield = limfield_mb;
2408+ getmonth = getmonth_mb;
2409+ keycompare = keycompare_mb;
2410+ numcompare = numcompare_mb;
2411+ }
2412+ else
2413+#endif
2414+ {
2415+ inittables = inittables_uni;
2416+ begfield = begfield_uni;
2417+ limfield = limfield_uni;
2418+ getmonth = getmonth_uni;
2419+ keycompare = keycompare_uni;
2420+ numcompare = numcompare_uni;
2421+ }
2422+
2423 have_read_stdin = false;
2424 inittables ();
2425
2426@@ -3015,13 +3597,35 @@
2427
2428 case 't':
2429 {
2430- char newtab = optarg[0];
2431- if (! newtab)
2432+ char newtab[MB_LEN_MAX + 1];
2433+ size_t newtab_length = 1;
2434+ strncpy (newtab, optarg, MB_LEN_MAX);
2435+ if (! newtab[0])
2436 error (SORT_FAILURE, 0, _("empty tab"));
2437- if (optarg[1])
2438+#if HAVE_MBRTOWC
2439+ if (MB_CUR_MAX > 1)
2440+ {
2441+ wchar_t wc;
2442+ mbstate_t state;
2443+ size_t i;
2444+
2445+ memset (&state, '\0', sizeof (mbstate_t));
2446+ newtab_length = mbrtowc (&wc, newtab, strnlen (newtab,
2447+ MB_LEN_MAX),
2448+ &state);
2449+ switch (newtab_length)
2450+ {
2451+ case (size_t) -1:
2452+ case (size_t) -2:
2453+ case 0:
2454+ newtab_length = 1;
2455+ }
2456+ }
2457+#endif
2458+ if (newtab_length == 1 && optarg[1])
2459 {
2460 if (STREQ (optarg, "\\0"))
2461- newtab = '\0';
2462+ newtab[0] = '\0';
2463 else
2464 {
2465 /* Provoke with `sort -txx'. Complain about
2466@@ -3032,9 +3636,12 @@
2467 quote (optarg));
2468 }
2469 }
2470- if (tab != TAB_DEFAULT && tab != newtab)
2471+ if (tab_length
2472+ && (tab_length != newtab_length
2473+ || memcmp (tab, newtab, tab_length) != 0))
2474 error (SORT_FAILURE, 0, _("incompatible tabs"));
2475- tab = newtab;
2476+ memcpy (tab, newtab, newtab_length);
2477+ tab_length = newtab_length;
2478 }
2479 break;
2480
2481--- coreutils-6.8+/src/unexpand.c.i18n 2007-01-14 15:41:28.000000000 +0000
2482+++ coreutils-6.8+/src/unexpand.c 2007-03-01 15:08:24.000000000 +0000
2483@@ -39,11 +39,28 @@
2484 #include <stdio.h>
2485 #include <getopt.h>
2486 #include <sys/types.h>
2487+
2488+/* Get mbstate_t, mbrtowc(), wcwidth(). */
2489+#if HAVE_WCHAR_H
2490+# include <wchar.h>
2491+#endif
2492+
2493 #include "system.h"
2494 #include "error.h"
2495 #include "quote.h"
2496 #include "xstrndup.h"
2497
2498+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
2499+ installation; work around this configuration error. */
2500+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
2501+# define MB_LEN_MAX 16
2502+#endif
2503+
2504+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
2505+#if HAVE_MBRTOWC && defined mbstate_t
2506+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
2507+#endif
2508+
2509 /* The official name of this program (e.g., no `g' prefix). */
2510 #define PROGRAM_NAME "unexpand"
2511
2512@@ -110,6 +127,208 @@
2513 {NULL, 0, NULL, 0}
2514 };
2515
2516+static FILE *next_file (FILE *fp);
2517+
2518+#if HAVE_MBRTOWC
2519+static void
2520+unexpand_multibyte (void)
2521+{
2522+ FILE *fp; /* Input stream. */
2523+ mbstate_t i_state; /* Current shift state of the input stream. */
2524+ mbstate_t i_state_bak; /* Back up the I_STATE. */
2525+ mbstate_t o_state; /* Current shift state of the output stream. */
2526+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
2527+ char *bufpos; /* Next read position of BUF. */
2528+ size_t buflen = 0; /* The length of the byte sequence in buf. */
2529+ wint_t wc; /* A gotten wide character. */
2530+ size_t mblength; /* The byte size of a multibyte character
2531+ which shows as same character as WC. */
2532+
2533+ /* Index in `tab_list' of next tabstop: */
2534+ int tab_index = 0; /* For calculating width of pending tabs. */
2535+ int print_tab_index = 0; /* For printing as many tabs as possible. */
2536+ unsigned int column = 0; /* Column on screen of next char. */
2537+ int next_tab_column; /* Column the next tab stop is on. */
2538+ int convert = 1; /* If nonzero, perform translations. */
2539+ unsigned int pending = 0; /* Pending columns of blanks. */
2540+
2541+ fp = next_file ((FILE *) NULL);
2542+ if (fp == NULL)
2543+ return;
2544+
2545+ memset (&o_state, '\0', sizeof(mbstate_t));
2546+ memset (&i_state, '\0', sizeof(mbstate_t));
2547+
2548+ for (;;)
2549+ {
2550+ if (buflen < MB_LEN_MAX && !feof(fp) && !ferror(fp))
2551+ {
2552+ memmove (buf, bufpos, buflen);
2553+ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, fp);
2554+ bufpos = buf;
2555+ }
2556+
2557+ /* Get a wide character. */
2558+ if (buflen < 1)
2559+ {
2560+ mblength = 1;
2561+ wc = WEOF;
2562+ }
2563+ else
2564+ {
2565+ i_state_bak = i_state;
2566+ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &i_state);
2567+ }
2568+
2569+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
2570+ {
2571+ i_state = i_state_bak;
2572+ wc = L'\0';
2573+ }
2574+
2575+ if (wc == L' ' && convert && column < INT_MAX)
2576+ {
2577+ ++pending;
2578+ ++column;
2579+ }
2580+ else if (wc == L'\t' && convert)
2581+ {
2582+ if (tab_size == 0)
2583+ {
2584+ /* Do not let tab_index == first_free_tab;
2585+ stop when it is 1 less. */
2586+ while (tab_index < first_free_tab - 1
2587+ && column >= tab_list[tab_index])
2588+ tab_index++;
2589+ next_tab_column = tab_list[tab_index];
2590+ if (tab_index < first_free_tab - 1)
2591+ tab_index++;
2592+ if (column >= next_tab_column)
2593+ {
2594+ convert = 0; /* Ran out of tab stops. */
2595+ goto flush_pend_mb;
2596+ }
2597+ }
2598+ else
2599+ {
2600+ next_tab_column = column + tab_size - column % tab_size;
2601+ }
2602+ pending += next_tab_column - column;
2603+ column = next_tab_column;
2604+ }
2605+ else
2606+ {
2607+flush_pend_mb:
2608+ /* Flush pending spaces. Print as many tabs as possible,
2609+ then print the rest as spaces. */
2610+ if (pending == 1)
2611+ {
2612+ putchar (' ');
2613+ pending = 0;
2614+ }
2615+ column -= pending;
2616+ while (pending > 0)
2617+ {
2618+ if (tab_size == 0)
2619+ {
2620+ /* Do not let print_tab_index == first_free_tab;
2621+ stop when it is 1 less. */
2622+ while (print_tab_index < first_free_tab - 1
2623+ && column >= tab_list[print_tab_index])
2624+ print_tab_index++;
2625+ next_tab_column = tab_list[print_tab_index];
2626+ if (print_tab_index < first_free_tab - 1)
2627+ print_tab_index++;
2628+ }
2629+ else
2630+ {
2631+ next_tab_column =
2632+ column + tab_size - column % tab_size;
2633+ }
2634+ if (next_tab_column - column <= pending)
2635+ {
2636+ putchar ('\t');
2637+ pending -= next_tab_column - column;
2638+ column = next_tab_column;
2639+ }
2640+ else
2641+ {
2642+ --print_tab_index;
2643+ column += pending;
2644+ while (pending != 0)
2645+ {
2646+ putchar (' ');
2647+ pending--;
2648+ }
2649+ }
2650+ }
2651+
2652+ if (wc == WEOF)
2653+ {
2654+ fp = next_file (fp);
2655+ if (fp == NULL)
2656+ break; /* No more files. */
2657+ else
2658+ {
2659+ memset (&i_state, '\0', sizeof(mbstate_t));
2660+ continue;
2661+ }
2662+ }
2663+
2664+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
2665+ {
2666+ if (convert)
2667+ {
2668+ ++column;
2669+ if (convert_entire_line == 0)
2670+ convert = 0;
2671+ }
2672+ mblength = 1;
2673+ putchar (buf[0]);
2674+ }
2675+ else if (mblength == 0)
2676+ {
2677+ if (convert && convert_entire_line == 0)
2678+ convert = 0;
2679+ mblength = 1;
2680+ putchar ('\0');
2681+ }
2682+ else
2683+ {
2684+ if (convert)
2685+ {
2686+ if (wc == L'\b')
2687+ {
2688+ if (column > 0)
2689+ --column;
2690+ }
2691+ else
2692+ {
2693+ int width; /* The width of WC. */
2694+
2695+ width = wcwidth (wc);
2696+ column += (width > 0) ? width : 0;
2697+ if (convert_entire_line == 0)
2698+ convert = 0;
2699+ }
2700+ }
2701+
2702+ if (wc == L'\n')
2703+ {
2704+ tab_index = print_tab_index = 0;
2705+ column = pending = 0;
2706+ convert = 1;
2707+ }
2708+ fwrite (bufpos, sizeof(char), mblength, stdout);
2709+ }
2710+ }
2711+ buflen -= mblength;
2712+ bufpos += mblength;
2713+ }
2714+}
2715+#endif
2716+
2717+
2718 void
2719 usage (int status)
2720 {
2721@@ -531,7 +750,12 @@
2722
2723 file_list = (optind < argc ? &argv[optind] : stdin_argv);
2724
2725- unexpand ();
2726+#if HAVE_MBRTOWC
2727+ if (MB_CUR_MAX > 1)
2728+ unexpand_multibyte ();
2729+ else
2730+#endif
2731+ unexpand ();
2732
2733 if (have_read_stdin && fclose (stdin) != 0)
2734 error (EXIT_FAILURE, errno, "-");
2735--- coreutils-6.8+/src/pr.c.i18n 2007-01-14 15:41:28.000000000 +0000
2736+++ coreutils-6.8+/src/pr.c 2007-03-01 15:08:24.000000000 +0000
2737@@ -313,6 +313,32 @@
2738
2739 #include <getopt.h>
2740 #include <sys/types.h>
2741+
2742+/* Get MB_LEN_MAX. */
2743+#include <limits.h>
2744+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
2745+ installation; work around this configuration error. */
2746+#if !defined MB_LEN_MAX || MB_LEN_MAX == 1
2747+# define MB_LEN_MAX 16
2748+#endif
2749+
2750+/* Get MB_CUR_MAX. */
2751+#include <stdlib.h>
2752+
2753+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
2754+/* Get mbstate_t, mbrtowc(), wcwidth(). */
2755+#if HAVE_WCHAR_H
2756+# include <wchar.h>
2757+#endif
2758+
2759+/* Get iswprint(). -- for wcwidth(). */
2760+#if HAVE_WCTYPE_H
2761+# include <wctype.h>
2762+#endif
2763+#if !defined iswprint && !HAVE_ISWPRINT
2764+# define iswprint(wc) 1
2765+#endif
2766+
2767 #include "system.h"
2768 #include "error.h"
2769 #include "hard-locale.h"
2770@@ -324,6 +350,18 @@
2771 #include "strftime.h"
2772 #include "xstrtol.h"
2773
2774+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
2775+#if HAVE_MBRTOWC && defined mbstate_t
2776+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
2777+#endif
2778+
2779+#ifndef HAVE_DECL_WCWIDTH
2780+"this configure-time declaration test was not run"
2781+#endif
2782+#if !HAVE_DECL_WCWIDTH
2783+extern int wcwidth ();
2784+#endif
2785+
2786 /* The official name of this program (e.g., no `g' prefix). */
2787 #define PROGRAM_NAME "pr"
2788
2789@@ -416,7 +454,20 @@
2790
2791 #define NULLCOL (COLUMN *)0
2792
2793-static int char_to_clump (char c);
2794+/* Funtion pointers to switch functions for single byte locale or for
2795+ multibyte locale. If multibyte functions do not exist in your sysytem,
2796+ these pointers always point the function for single byte locale. */
2797+static void (*print_char) (char c);
2798+static int (*char_to_clump) (char c);
2799+
2800+/* Functions for single byte locale. */
2801+static void print_char_single (char c);
2802+static int char_to_clump_single (char c);
2803+
2804+/* Functions for multibyte locale. */
2805+static void print_char_multi (char c);
2806+static int char_to_clump_multi (char c);
2807+
2808 static bool read_line (COLUMN *p);
2809 static bool print_page (void);
2810 static bool print_stored (COLUMN *p);
2811@@ -426,6 +477,7 @@
2812 static void pad_across_to (int position);
2813 static void add_line_number (COLUMN *p);
2814 static void getoptarg (char *arg, char switch_char, char *character,
2815+ int *character_length, int *character_width,
2816 int *number);
2817 void usage (int status);
2818 static void print_files (int number_of_files, char **av);
2819@@ -440,7 +492,6 @@
2820 static void pad_down (int lines);
2821 static void read_rest_of_line (COLUMN *p);
2822 static void skip_read (COLUMN *p, int column_number);
2823-static void print_char (char c);
2824 static void cleanup (void);
2825 static void print_sep_string (void);
2826 static void separator_string (const char *optarg_S);
2827@@ -455,7 +506,7 @@
2828 we store the leftmost columns contiguously in buff.
2829 To print a line from buff, get the index of the first character
2830 from line_vector[i], and print up to line_vector[i + 1]. */
2831-static char *buff;
2832+static unsigned char *buff;
2833
2834 /* Index of the position in buff where the next character
2835 will be stored. */
2836@@ -559,7 +610,7 @@
2837 static bool untabify_input = false;
2838
2839 /* (-e) The input tab character. */
2840-static char input_tab_char = '\t';
2841+static char input_tab_char[MB_LEN_MAX] = "\t";
2842
2843 /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ...
2844 where the leftmost column is 1. */
2845@@ -569,7 +620,10 @@
2846 static bool tabify_output = false;
2847
2848 /* (-i) The output tab character. */
2849-static char output_tab_char = '\t';
2850+static char output_tab_char[MB_LEN_MAX] = "\t";
2851+
2852+/* (-i) The byte length of output tab character. */
2853+static int output_tab_char_length = 1;
2854
2855 /* (-i) The width of the output tab. */
2856 static int chars_per_output_tab = 8;
2857@@ -643,7 +697,13 @@
2858 static bool numbered_lines = false;
2859
2860 /* (-n) Character which follows each line number. */
2861-static char number_separator = '\t';
2862+static char number_separator[MB_LEN_MAX] = "\t";
2863+
2864+/* (-n) The byte length of the character which follows each line number. */
2865+static int number_separator_length = 1;
2866+
2867+/* (-n) The character width of the character which follows each line number. */
2868+static int number_separator_width = 0;
2869
2870 /* (-n) line counting starts with 1st line of input file (not with 1st
2871 line of 1st page printed). */
2872@@ -696,6 +756,7 @@
2873 -a|COLUMN|-m is a `space' and with the -J option a `tab'. */
2874 static char *col_sep_string = "";
2875 static int col_sep_length = 0;
2876+static int col_sep_width = 0;
2877 static char *column_separator = " ";
2878 static char *line_separator = "\t";
2879
2880@@ -852,6 +913,13 @@
2881 col_sep_length = (int) strlen (optarg_S);
2882 col_sep_string = xmalloc (col_sep_length + 1);
2883 strcpy (col_sep_string, optarg_S);
2884+
2885+#if HAVE_MBRTOWC
2886+ if (MB_CUR_MAX > 1)
2887+ col_sep_width = mbswidth (col_sep_string, 0);
2888+ else
2889+#endif
2890+ col_sep_width = col_sep_length;
2891 }
2892
2893 int
2894@@ -877,6 +945,21 @@
2895
2896 atexit (close_stdout);
2897
2898+/* Define which functions are used, the ones for single byte locale or the ones
2899+ for multibyte locale. */
2900+#if HAVE_MBRTOWC
2901+ if (MB_CUR_MAX > 1)
2902+ {
2903+ print_char = print_char_multi;
2904+ char_to_clump = char_to_clump_multi;
2905+ }
2906+ else
2907+#endif
2908+ {
2909+ print_char = print_char_single;
2910+ char_to_clump = char_to_clump_single;
2911+ }
2912+
2913 n_files = 0;
2914 file_names = (argc > 1
2915 ? xmalloc ((argc - 1) * sizeof (char *))
2916@@ -949,8 +1032,12 @@
2917 break;
2918 case 'e':
2919 if (optarg)
2920- getoptarg (optarg, 'e', &input_tab_char,
2921- &chars_per_input_tab);
2922+ {
2923+ int dummy_length, dummy_width;
2924+
2925+ getoptarg (optarg, 'e', input_tab_char, &dummy_length,
2926+ &dummy_width, &chars_per_input_tab);
2927+ }
2928 /* Could check tab width > 0. */
2929 untabify_input = true;
2930 break;
2931@@ -963,8 +1050,12 @@
2932 break;
2933 case 'i':
2934 if (optarg)
2935- getoptarg (optarg, 'i', &output_tab_char,
2936- &chars_per_output_tab);
2937+ {
2938+ int dummy_width;
2939+
2940+ getoptarg (optarg, 'i', output_tab_char, &output_tab_char_length,
2941+ &dummy_width, &chars_per_output_tab);
2942+ }
2943 /* Could check tab width > 0. */
2944 tabify_output = true;
2945 break;
2946@@ -991,8 +1082,8 @@
2947 case 'n':
2948 numbered_lines = true;
2949 if (optarg)
2950- getoptarg (optarg, 'n', &number_separator,
2951- &chars_per_number);
2952+ getoptarg (optarg, 'n', number_separator, &number_separator_length,
2953+ &number_separator_width, &chars_per_number);
2954 break;
2955 case 'N':
2956 skip_count = false;
2957@@ -1031,7 +1122,7 @@
2958 old_s = false;
2959 /* Reset an additional input of -s, -S dominates -s */
2960 col_sep_string = "";
2961- col_sep_length = 0;
2962+ col_sep_length = col_sep_width = 0;
2963 use_col_separator = true;
2964 if (optarg)
2965 separator_string (optarg);
2966@@ -1188,10 +1279,45 @@
2967 a number. */
2968
2969 static void
2970-getoptarg (char *arg, char switch_char, char *character, int *number)
2971+getoptarg (char *arg, char switch_char, char *character, int *character_length,
2972+ int *character_width, int *number)
2973 {
2974 if (!ISDIGIT (*arg))
2975- *character = *arg++;
2976+ {
2977+#ifdef HAVE_MBRTOWC
2978+ if (MB_CUR_MAX > 1) /* for multibyte locale. */
2979+ {
2980+ wchar_t wc;
2981+ size_t mblength;
2982+ int width;
2983+ mbstate_t state = {'\0'};
2984+
2985+ mblength = mbrtowc (&wc, arg, strnlen(arg, MB_LEN_MAX), &state);
2986+
2987+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
2988+ {
2989+ *character_length = 1;
2990+ *character_width = 1;
2991+ }
2992+ else
2993+ {
2994+ *character_length = (mblength < 1) ? 1 : mblength;
2995+ width = wcwidth (wc);
2996+ *character_width = (width < 0) ? 0 : width;
2997+ }
2998+
2999+ strncpy (character, arg, *character_length);
3000+ arg += *character_length;
3001+ }
3002+ else /* for single byte locale. */
3003+#endif
3004+ {
3005+ *character = *arg++;
3006+ *character_length = 1;
3007+ *character_width = 1;
3008+ }
3009+ }
3010+
3011 if (*arg)
3012 {
3013 long int tmp_long;
3014@@ -1256,7 +1382,7 @@
3015 else
3016 col_sep_string = column_separator;
3017
3018- col_sep_length = 1;
3019+ col_sep_length = col_sep_width = 1;
3020 use_col_separator = true;
3021 }
3022 /* It's rather pointless to define a TAB separator with column
3023@@ -1288,11 +1414,11 @@
3024 TAB_WIDTH (chars_per_input_tab, chars_per_number); */
3025
3026 /* Estimate chars_per_text without any margin and keep it constant. */
3027- if (number_separator == '\t')
3028+ if (number_separator[0] == '\t')
3029 number_width = chars_per_number +
3030 TAB_WIDTH (chars_per_default_tab, chars_per_number);
3031 else
3032- number_width = chars_per_number + 1;
3033+ number_width = chars_per_number + number_separator_width;
3034
3035 /* The number is part of the column width unless we are
3036 printing files in parallel. */
3037@@ -1307,7 +1433,7 @@
3038 }
3039
3040 chars_per_column = (chars_per_line - chars_used_by_number -
3041- (columns - 1) * col_sep_length) / columns;
3042+ (columns - 1) * col_sep_width) / columns;
3043
3044 if (chars_per_column < 1)
3045 error (EXIT_FAILURE, 0, _("page width too narrow"));
3046@@ -1432,7 +1558,7 @@
3047
3048 /* Enlarge p->start_position of first column to use the same form of
3049 padding_not_printed with all columns. */
3050- h = h + col_sep_length;
3051+ h = h + col_sep_width;
3052
3053 /* This loop takes care of all but the rightmost column. */
3054
3055@@ -1466,7 +1592,7 @@
3056 }
3057 else
3058 {
3059- h = h_next + col_sep_length;
3060+ h = h_next + col_sep_width;
3061 h_next = h + chars_per_column;
3062 }
3063 }
3064@@ -1756,9 +1882,9 @@
3065 align_column (COLUMN *p)
3066 {
3067 padding_not_printed = p->start_position;
3068- if (padding_not_printed - col_sep_length > 0)
3069+ if (padding_not_printed - col_sep_width > 0)
3070 {
3071- pad_across_to (padding_not_printed - col_sep_length);
3072+ pad_across_to (padding_not_printed - col_sep_width);
3073 padding_not_printed = ANYWHERE;
3074 }
3075
3076@@ -2029,13 +2155,13 @@
3077 /* May be too generous. */
3078 buff = X2REALLOC (buff, &buff_allocated);
3079 }
3080- buff[buff_current++] = c;
3081+ buff[buff_current++] = (unsigned char) c;
3082 }
3083
3084 static void
3085 add_line_number (COLUMN *p)
3086 {
3087- int i;
3088+ int i, j;
3089 char *s;
3090 int left_cut;
3091
3092@@ -2058,22 +2184,24 @@
3093 /* Tabification is assumed for multiple columns, also for n-separators,
3094 but `default n-separator = TAB' hasn't been given priority over
3095 equal column_width also specified by POSIX. */
3096- if (number_separator == '\t')
3097+ if (number_separator[0] == '\t')
3098 {
3099 i = number_width - chars_per_number;
3100 while (i-- > 0)
3101 (p->char_func) (' ');
3102 }
3103 else
3104- (p->char_func) (number_separator);
3105+ for (j = 0; j < number_separator_length; j++)
3106+ (p->char_func) (number_separator[j]);
3107 }
3108 else
3109 /* To comply with POSIX, we avoid any expansion of default TAB
3110 separator with a single column output. No column_width requirement
3111 has to be considered. */
3112 {
3113- (p->char_func) (number_separator);
3114- if (number_separator == '\t')
3115+ for (j = 0; j < number_separator_length; j++)
3116+ (p->char_func) (number_separator[j]);
3117+ if (number_separator[0] == '\t')
3118 output_position = POS_AFTER_TAB (chars_per_output_tab,
3119 output_position);
3120 }
3121@@ -2234,7 +2362,7 @@
3122 while (goal - h_old > 1
3123 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal)
3124 {
3125- putchar (output_tab_char);
3126+ fwrite (output_tab_char, sizeof(char), output_tab_char_length, stdout);
3127 h_old = h_new;
3128 }
3129 while (++h_old <= goal)
3130@@ -2254,6 +2382,7 @@
3131 {
3132 char *s;
3133 int l = col_sep_length;
3134+ int not_space_flag;
3135
3136 s = col_sep_string;
3137
3138@@ -2267,6 +2396,7 @@
3139 {
3140 for (; separators_not_printed > 0; --separators_not_printed)
3141 {
3142+ not_space_flag = 0;
3143 while (l-- > 0)
3144 {
3145 /* 3 types of sep_strings: spaces only, spaces and chars,
3146@@ -2280,12 +2410,15 @@
3147 }
3148 else
3149 {
3150+ not_space_flag = 1;
3151 if (spaces_not_printed > 0)
3152 print_white_space ();
3153 putchar (*s++);
3154- ++output_position;
3155 }
3156 }
3157+ if (not_space_flag)
3158+ output_position += col_sep_width;
3159+
3160 /* sep_string ends with some spaces */
3161 if (spaces_not_printed > 0)
3162 print_white_space ();
3163@@ -2313,7 +2446,7 @@
3164 required number of tabs and spaces. */
3165
3166 static void
3167-print_char (char c)
3168+print_char_single (char c)
3169 {
3170 if (tabify_output)
3171 {
3172@@ -2337,6 +2470,74 @@
3173 putchar (c);
3174 }
3175
3176+#ifdef HAVE_MBRTOWC
3177+static void
3178+print_char_multi (char c)
3179+{
3180+ static size_t mbc_pos = 0;
3181+ static char mbc[MB_LEN_MAX] = {'\0'};
3182+ static mbstate_t state = {'\0'};
3183+ mbstate_t state_bak;
3184+ wchar_t wc;
3185+ size_t mblength;
3186+ int width;
3187+
3188+ if (tabify_output)
3189+ {
3190+ state_bak = state;
3191+ mbc[mbc_pos++] = c;
3192+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
3193+
3194+ while (mbc_pos > 0)
3195+ {
3196+ switch (mblength)
3197+ {
3198+ case (size_t)-2:
3199+ state = state_bak;
3200+ return;
3201+
3202+ case (size_t)-1:
3203+ state = state_bak;
3204+ ++output_position;
3205+ putchar (mbc[0]);
3206+ memmove (mbc, mbc + 1, MB_CUR_MAX - 1);
3207+ --mbc_pos;
3208+ break;
3209+
3210+ case 0:
3211+ mblength = 1;
3212+
3213+ default:
3214+ if (wc == L' ')
3215+ {
3216+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
3217+ --mbc_pos;
3218+ ++spaces_not_printed;
3219+ return;
3220+ }
3221+ else if (spaces_not_printed > 0)
3222+ print_white_space ();
3223+
3224+ /* Nonprintables are assumed to have width 0, except L'\b'. */
3225+ if ((width = wcwidth (wc)) < 1)
3226+ {
3227+ if (wc == L'\b')
3228+ --output_position;
3229+ }
3230+ else
3231+ output_position += width;
3232+
3233+ fwrite (mbc, sizeof(char), mblength, stdout);
3234+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
3235+ mbc_pos -= mblength;
3236+ }
3237+ }
3238+ return;
3239+ }
3240+ putchar (c);
3241+}
3242+#endif
3243+
3244 /* Skip to page PAGE before printing.
3245 PAGE may be larger than total number of pages. */
3246
3247@@ -2517,9 +2718,9 @@
3248 align_empty_cols = false;
3249 }
3250
3251- if (padding_not_printed - col_sep_length > 0)
3252+ if (padding_not_printed - col_sep_width > 0)
3253 {
3254- pad_across_to (padding_not_printed - col_sep_length);
3255+ pad_across_to (padding_not_printed - col_sep_width);
3256 padding_not_printed = ANYWHERE;
3257 }
3258
3259@@ -2620,9 +2821,9 @@
3260 }
3261 }
3262
3263- if (padding_not_printed - col_sep_length > 0)
3264+ if (padding_not_printed - col_sep_width > 0)
3265 {
3266- pad_across_to (padding_not_printed - col_sep_length);
3267+ pad_across_to (padding_not_printed - col_sep_width);
3268 padding_not_printed = ANYWHERE;
3269 }
3270
3271@@ -2635,8 +2836,8 @@
3272 if (spaces_not_printed == 0)
3273 {
3274 output_position = p->start_position + end_vector[line];
3275- if (p->start_position - col_sep_length == chars_per_margin)
3276- output_position -= col_sep_length;
3277+ if (p->start_position - col_sep_width == chars_per_margin)
3278+ output_position -= col_sep_width;
3279 }
3280
3281 return true;
3282@@ -2655,7 +2856,7 @@
3283 number of characters is 1.) */
3284
3285 static int
3286-char_to_clump (char c)
3287+char_to_clump_single (char c)
3288 {
3289 unsigned char uc = c;
3290 char *s = clump_buff;
3291@@ -2665,10 +2866,10 @@
3292 int chars;
3293 int chars_per_c = 8;
3294
3295- if (c == input_tab_char)
3296+ if (c == input_tab_char[0])
3297 chars_per_c = chars_per_input_tab;
3298
3299- if (c == input_tab_char || c == '\t')
3300+ if (c == input_tab_char[0] || c == '\t')
3301 {
3302 width = TAB_WIDTH (chars_per_c, input_position);
3303
3304@@ -2739,6 +2940,154 @@
3305 return chars;
3306 }
3307
3308+#ifdef HAVE_MBRTOWC
3309+static int
3310+char_to_clump_multi (char c)
3311+{
3312+ static size_t mbc_pos = 0;
3313+ static char mbc[MB_LEN_MAX] = {'\0'};
3314+ static mbstate_t state = {'\0'};
3315+ mbstate_t state_bak;
3316+ wchar_t wc;
3317+ size_t mblength;
3318+ int wc_width;
3319+ register char *s = clump_buff;
3320+ register int i, j;
3321+ char esc_buff[4];
3322+ int width;
3323+ int chars;
3324+ int chars_per_c = 8;
3325+
3326+ state_bak = state;
3327+ mbc[mbc_pos++] = c;
3328+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
3329+
3330+ width = 0;
3331+ chars = 0;
3332+ while (mbc_pos > 0)
3333+ {
3334+ switch (mblength)
3335+ {
3336+ case (size_t)-2:
3337+ state = state_bak;
3338+ return 0;
3339+
3340+ case (size_t)-1:
3341+ state = state_bak;
3342+ mblength = 1;
3343+
3344+ if (use_esc_sequence || use_cntrl_prefix)
3345+ {
3346+ width = +4;
3347+ chars = +4;
3348+ *s++ = '\\';
3349+ sprintf (esc_buff, "%03o", mbc[0]);
3350+ for (i = 0; i <= 2; ++i)
3351+ *s++ = (int) esc_buff[i];
3352+ }
3353+ else
3354+ {
3355+ width += 1;
3356+ chars += 1;
3357+ *s++ = mbc[0];
3358+ }
3359+ break;
3360+
3361+ case 0:
3362+ mblength = 1;
3363+ /* Fall through */
3364+
3365+ default:
3366+ if (memcmp (mbc, input_tab_char, mblength) == 0)
3367+ chars_per_c = chars_per_input_tab;
3368+
3369+ if (memcmp (mbc, input_tab_char, mblength) == 0 || c == '\t')
3370+ {
3371+ int width_inc;
3372+
3373+ width_inc = TAB_WIDTH (chars_per_c, input_position);
3374+ width += width_inc;
3375+
3376+ if (untabify_input)
3377+ {
3378+ for (i = width_inc; i; --i)
3379+ *s++ = ' ';
3380+ chars += width_inc;
3381+ }
3382+ else
3383+ {
3384+ for (i = 0; i < mblength; i++)
3385+ *s++ = mbc[i];
3386+ chars += mblength;
3387+ }
3388+ }
3389+ else if ((wc_width = wcwidth (wc)) < 1)
3390+ {
3391+ if (use_esc_sequence)
3392+ {
3393+ for (i = 0; i < mblength; i++)
3394+ {
3395+ width += 4;
3396+ chars += 4;
3397+ *s++ = '\\';
3398+ sprintf (esc_buff, "%03o", c);
3399+ for (j = 0; j <= 2; ++j)
3400+ *s++ = (int) esc_buff[j];
3401+ }
3402+ }
3403+ else if (use_cntrl_prefix)
3404+ {
3405+ if (wc < 0200)
3406+ {
3407+ width += 2;
3408+ chars += 2;
3409+ *s++ = '^';
3410+ *s++ = wc ^ 0100;
3411+ }
3412+ else
3413+ {
3414+ for (i = 0; i < mblength; i++)
3415+ {
3416+ width += 4;
3417+ chars += 4;
3418+ *s++ = '\\';
3419+ sprintf (esc_buff, "%03o", c);
3420+ for (j = 0; j <= 2; ++j)
3421+ *s++ = (int) esc_buff[j];
3422+ }
3423+ }
3424+ }
3425+ else if (wc == L'\b')
3426+ {
3427+ width += -1;
3428+ chars += 1;
3429+ *s++ = c;
3430+ }
3431+ else
3432+ {
3433+ width += 0;
3434+ chars += mblength;
3435+ for (i = 0; i < mblength; i++)
3436+ *s++ = mbc[i];
3437+ }
3438+ }
3439+ else
3440+ {
3441+ width += wc_width;
3442+ chars += mblength;
3443+ for (i = 0; i < mblength; i++)
3444+ *s++ = mbc[i];
3445+ }
3446+ }
3447+ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength);
3448+ mbc_pos -= mblength;
3449+ }
3450+
3451+ input_position += width;
3452+ return chars;
3453+}
3454+#endif
3455+
3456 /* We've just printed some files and need to clean up things before
3457 looking for more options and printing the next batch of files.
3458
3459--- coreutils-6.8+/src/cut.c.i18n 2007-01-14 15:41:28.000000000 +0000
3460+++ coreutils-6.8+/src/cut.c 2007-03-01 15:08:24.000000000 +0000
3461@@ -29,6 +29,11 @@
3462 #include <assert.h>
3463 #include <getopt.h>
3464 #include <sys/types.h>
3465+
3466+/* Get mbstate_t, mbrtowc(). */
3467+#if HAVE_WCHAR_H
3468+# include <wchar.h>
3469+#endif
3470 #include "system.h"
3471
3472 #include "error.h"
3473@@ -37,6 +42,18 @@
3474 #include "quote.h"
3475 #include "xstrndup.h"
3476
3477+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
3478+ installation; work around this configuration error. */
3479+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2
3480+# undef MB_LEN_MAX
3481+# define MB_LEN_MAX 16
3482+#endif
3483+
3484+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
3485+#if HAVE_MBRTOWC && defined mbstate_t
3486+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
3487+#endif
3488+
3489 /* The official name of this program (e.g., no `g' prefix). */
3490 #define PROGRAM_NAME "cut"
3491
3492@@ -67,6 +84,52 @@
3493 } \
3494 while (0)
3495
3496+/* Refill the buffer BUF to get a multibyte character. */
3497+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \
3498+ do \
3499+ { \
3500+ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \
3501+ { \
3502+ memmove (BUF, BUFPOS, BUFLEN); \
3503+ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \
3504+ BUFPOS = BUF; \
3505+ } \
3506+ } \
3507+ while (0)
3508+
3509+/* Get wide character on BUFPOS. BUFPOS is not included after that.
3510+ If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */
3511+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \
3512+ do \
3513+ { \
3514+ mbstate_t state_bak; \
3515+ \
3516+ if (BUFLEN < 1) \
3517+ { \
3518+ WC = WEOF; \
3519+ break; \
3520+ } \
3521+ \
3522+ /* Get a wide character. */ \
3523+ CONVFAIL = 0; \
3524+ state_bak = STATE; \
3525+ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \
3526+ \
3527+ switch (MBLENGTH) \
3528+ { \
3529+ case (size_t)-1: \
3530+ case (size_t)-2: \
3531+ CONVFAIL++; \
3532+ STATE = state_bak; \
3533+ /* Fall througn. */ \
3534+ \
3535+ case 0: \
3536+ MBLENGTH = 1; \
3537+ break; \
3538+ } \
3539+ } \
3540+ while (0)
3541+
3542 struct range_pair
3543 {
3544 size_t lo;
3545@@ -85,7 +148,7 @@
3546 /* The number of bytes allocated for FIELD_1_BUFFER. */
3547 static size_t field_1_bufsize;
3548
3549-/* The largest field or byte index used as an endpoint of a closed
3550+/* The largest byte, character or field index used as an endpoint of a closed
3551 or degenerate range specification; this doesn't include the starting
3552 index of right-open-ended ranges. For example, with either range spec
3553 `2-5,9-', `2-3,5,9-' this variable would be set to 5. */
3554@@ -97,10 +160,11 @@
3555
3556 /* This is a bit vector.
3557 In byte mode, which bytes to output.
3558+ In character mode, which characters to output.
3559 In field mode, which DELIM-separated fields to output.
3560- Both bytes and fields are numbered starting with 1,
3561+ Bytes, characters and fields are numbered starting with 1,
3562 so the zeroth bit of this array is unused.
3563- A field or byte K has been selected if
3564+ A byte, character or field K has been selected if
3565 (K <= MAX_RANGE_ENDPOINT and is_printable_field(K))
3566 || (EOL_RANGE_START > 0 && K >= EOL_RANGE_START). */
3567 static unsigned char *printable_field;
3568@@ -109,9 +173,12 @@
3569 {
3570 undefined_mode,
3571
3572- /* Output characters that are in the given bytes. */
3573+ /* Output bytes that are at the given positions. */
3574 byte_mode,
3575
3576+ /* Output characters that are at the given positions. */
3577+ character_mode,
3578+
3579 /* Output the given delimeter-separated fields. */
3580 field_mode
3581 };
3582@@ -121,6 +188,13 @@
3583
3584 static enum operating_mode operating_mode;
3585
3586+/* If nonzero, when in byte mode, don't split multibyte characters. */
3587+static int byte_mode_character_aware;
3588+
3589+/* If nonzero, the function for single byte locale is work
3590+ if this program runs on multibyte locale. */
3591+static int force_singlebyte_mode;
3592+
3593 /* If true do not output lines containing no delimeter characters.
3594 Otherwise, all such lines are printed. This option is valid only
3595 with field mode. */
3596@@ -132,6 +206,9 @@
3597
3598 /* The delimeter character for field mode. */
3599 static unsigned char delim;
3600+#if HAVE_WCHAR_H
3601+static wchar_t wcdelim;
3602+#endif
3603
3604 /* True if the --output-delimiter=STRING option was specified. */
3605 static bool output_delimiter_specified;
3606@@ -205,7 +282,7 @@
3607 -f, --fields=LIST select only these fields; also print any line\n\
3608 that contains no delimiter character, unless\n\
3609 the -s option is specified\n\
3610- -n (ignored)\n\
3611+ -n with -b: don't split multibyte characters\n\
3612 "), stdout);
3613 fputs (_("\
3614 --complement complement the set of selected bytes, characters\n\
3615@@ -362,7 +439,7 @@
3616 in_digits = false;
3617 /* Starting a range. */
3618 if (dash_found)
3619- FATAL_ERROR (_("invalid byte or field list"));
3620+ FATAL_ERROR (_("invalid byte, character or field list"));
3621 dash_found = true;
3622 fieldstr++;
3623
3624@@ -387,14 +464,16 @@
3625 if (value == 0)
3626 {
3627 /* `n-'. From `initial' to end of line. */
3628- eol_range_start = initial;
3629+ if (eol_range_start == 0 ||
3630+ (eol_range_start != 0 && eol_range_start > initial))
3631+ eol_range_start = initial;
3632 field_found = true;
3633 }
3634 else
3635 {
3636 /* `m-n' or `-n' (1-n). */
3637 if (value < initial)
3638- FATAL_ERROR (_("invalid byte or field list"));
3639+ FATAL_ERROR (_("invalid byte, character or field list"));
3640
3641 /* Is there already a range going to end of line? */
3642 if (eol_range_start != 0)
3643@@ -467,6 +546,9 @@
3644 if (operating_mode == byte_mode)
3645 error (0, 0,
3646 _("byte offset %s is too large"), quote (bad_num));
3647+ else if (operating_mode == character_mode)
3648+ error (0, 0,
3649+ _("character offset %s is too large"), quote (bad_num));
3650 else
3651 error (0, 0,
3652 _("field number %s is too large"), quote (bad_num));
3653@@ -477,7 +559,7 @@
3654 fieldstr++;
3655 }
3656 else
3657- FATAL_ERROR (_("invalid byte or field list"));
3658+ FATAL_ERROR (_("invalid byte, character or field list"));
3659 }
3660
3661 max_range_endpoint = 0;
3662@@ -570,6 +652,63 @@
3663 }
3664 }
3665
3666+#if HAVE_MBRTOWC
3667+/* This function is in use for the following case.
3668+
3669+ 1. Read from the stream STREAM, printing to standard output any selected
3670+ characters.
3671+
3672+ 2. Read from stream STREAM, printing to standard output any selected bytes,
3673+ without splitting multibyte characters. */
3674+
3675+static void
3676+cut_characters_or_cut_bytes_no_split (FILE *stream)
3677+{
3678+ int idx; /* number of bytes or characters in the line so far. */
3679+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
3680+ char *bufpos; /* Next read position of BUF. */
3681+ size_t buflen; /* The length of the byte sequence in buf. */
3682+ wint_t wc; /* A gotten wide character. */
3683+ size_t mblength; /* The byte size of a multibyte character which shows
3684+ as same character as WC. */
3685+ mbstate_t state; /* State of the stream. */
3686+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
3687+
3688+ idx = 0;
3689+ buflen = 0;
3690+ bufpos = buf;
3691+ memset (&state, '\0', sizeof(mbstate_t));
3692+
3693+ while (1)
3694+ {
3695+ REFILL_BUFFER (buf, bufpos, buflen, stream);
3696+
3697+ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail);
3698+
3699+ if (wc == WEOF)
3700+ {
3701+ if (idx > 0)
3702+ putchar ('\n');
3703+ break;
3704+ }
3705+ else if (wc == L'\n')
3706+ {
3707+ putchar ('\n');
3708+ idx = 0;
3709+ }
3710+ else
3711+ {
3712+ idx += (operating_mode == byte_mode) ? mblength : 1;
3713+ if (print_kth (idx, NULL))
3714+ fwrite (bufpos, mblength, sizeof(char), stdout);
3715+ }
3716+
3717+ buflen -= mblength;
3718+ bufpos += mblength;
3719+ }
3720+}
3721+#endif
3722+
3723 /* Read from stream STREAM, printing to standard output any selected fields. */
3724
3725 static void
3726@@ -692,13 +831,192 @@
3727 }
3728 }
3729
3730+#if HAVE_MBRTOWC
3731+static void
3732+cut_fields_mb (FILE *stream)
3733+{
3734+ int c;
3735+ unsigned int field_idx;
3736+ int found_any_selected_field;
3737+ int buffer_first_field;
3738+ int empty_input;
3739+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */
3740+ char *bufpos; /* Next read position of BUF. */
3741+ size_t buflen; /* The length of the byte sequence in buf. */
3742+ wint_t wc = 0; /* A gotten wide character. */
3743+ size_t mblength; /* The byte size of a multibyte character which shows
3744+ as same character as WC. */
3745+ mbstate_t state; /* State of the stream. */
3746+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
3747+
3748+ found_any_selected_field = 0;
3749+ field_idx = 1;
3750+ bufpos = buf;
3751+ buflen = 0;
3752+ memset (&state, '\0', sizeof(mbstate_t));
3753+
3754+ c = getc (stream);
3755+ empty_input = (c == EOF);
3756+ if (c != EOF)
3757+ ungetc (c, stream);
3758+ else
3759+ wc = WEOF;
3760+
3761+ /* To support the semantics of the -s flag, we may have to buffer
3762+ all of the first field to determine whether it is `delimited.'
3763+ But that is unnecessary if all non-delimited lines must be printed
3764+ and the first field has been selected, or if non-delimited lines
3765+ must be suppressed and the first field has *not* been selected.
3766+ That is because a non-delimited line has exactly one field. */
3767+ buffer_first_field = (suppress_non_delimited ^ !print_kth (1, NULL));
3768+
3769+ while (1)
3770+ {
3771+ if (field_idx == 1 && buffer_first_field)
3772+ {
3773+ int len = 0;
3774+
3775+ while (1)
3776+ {
3777+ REFILL_BUFFER (buf, bufpos, buflen, stream);
3778+
3779+ GET_NEXT_WC_FROM_BUFFER
3780+ (wc, bufpos, buflen, mblength, state, convfail);
3781+
3782+ if (wc == WEOF)
3783+ break;
3784+
3785+ field_1_buffer = xrealloc (field_1_buffer, len + mblength);
3786+ memcpy (field_1_buffer + len, bufpos, mblength);
3787+ len += mblength;
3788+ buflen -= mblength;
3789+ bufpos += mblength;
3790+
3791+ if (!convfail && (wc == L'\n' || wc == wcdelim))
3792+ break;
3793+ }
3794+
3795+ if (wc == WEOF)
3796+ break;
3797+
3798+ /* If the first field extends to the end of line (it is not
3799+ delimited) and we are printing all non-delimited lines,
3800+ print this one. */
3801+ if (convfail || (!convfail && wc != wcdelim))
3802+ {
3803+ if (suppress_non_delimited)
3804+ {
3805+ /* Empty. */
3806+ }
3807+ else
3808+ {
3809+ fwrite (field_1_buffer, sizeof (char), len, stdout);
3810+ /* Make sure the output line is newline terminated. */
3811+ if (convfail || (!convfail && wc != L'\n'))
3812+ putchar ('\n');
3813+ }
3814+ continue;
3815+ }
3816+
3817+ if (print_kth (1, NULL))
3818+ {
3819+ /* Print the field, but not the trailing delimiter. */
3820+ fwrite (field_1_buffer, sizeof (char), len - 1, stdout);
3821+ found_any_selected_field = 1;
3822+ }
3823+ ++field_idx;
3824+ }
3825+
3826+ if (wc != WEOF)
3827+ {
3828+ if (print_kth (field_idx, NULL))
3829+ {
3830+ if (found_any_selected_field)
3831+ {
3832+ fwrite (output_delimiter_string, sizeof (char),
3833+ output_delimiter_length, stdout);
3834+ }
3835+ found_any_selected_field = 1;
3836+ }
3837+
3838+ while (1)
3839+ {
3840+ REFILL_BUFFER (buf, bufpos, buflen, stream);
3841+
3842+ GET_NEXT_WC_FROM_BUFFER
3843+ (wc, bufpos, buflen, mblength, state, convfail);
3844+
3845+ if (wc == WEOF)
3846+ break;
3847+ else if (!convfail && (wc == wcdelim || wc == L'\n'))
3848+ {
3849+ buflen -= mblength;
3850+ bufpos += mblength;
3851+ break;
3852+ }
3853+
3854+ if (print_kth (field_idx, NULL))
3855+ fwrite (bufpos, mblength, sizeof(char), stdout);
3856+
3857+ buflen -= mblength;
3858+ bufpos += mblength;
3859+ }
3860+ }
3861+
3862+ if ((!convfail || wc == L'\n') && buflen < 1)
3863+ wc = WEOF;
3864+
3865+ if (!convfail && wc == wcdelim)
3866+ ++field_idx;
3867+ else if (wc == WEOF || (!convfail && wc == L'\n'))
3868+ {
3869+ if (found_any_selected_field
3870+ || (!empty_input && !(suppress_non_delimited && field_idx == 1)))
3871+ putchar ('\n');
3872+ if (wc == WEOF)
3873+ break;
3874+ field_idx = 1;
3875+ found_any_selected_field = 0;
3876+ }
3877+ }
3878+}
3879+#endif
3880+
3881 static void
3882 cut_stream (FILE *stream)
3883 {
3884- if (operating_mode == byte_mode)
3885- cut_bytes (stream);
3886+#if HAVE_MBRTOWC
3887+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
3888+ {
3889+ switch (operating_mode)
3890+ {
3891+ case byte_mode:
3892+ if (byte_mode_character_aware)
3893+ cut_characters_or_cut_bytes_no_split (stream);
3894+ else
3895+ cut_bytes (stream);
3896+ break;
3897+
3898+ case character_mode:
3899+ cut_characters_or_cut_bytes_no_split (stream);
3900+ break;
3901+
3902+ case field_mode:
3903+ cut_fields_mb (stream);
3904+ break;
3905+
3906+ default:
3907+ abort ();
3908+ }
3909+ }
3910 else
3911- cut_fields (stream);
3912+#endif
3913+ {
3914+ if (operating_mode == field_mode)
3915+ cut_fields (stream);
3916+ else
3917+ cut_bytes (stream);
3918+ }
3919 }
3920
3921 /* Process file FILE to standard output.
3922@@ -748,6 +1066,8 @@
3923 bool ok;
3924 bool delim_specified = false;
3925 char *spec_list_string IF_LINT(= NULL);
3926+ char mbdelim[MB_LEN_MAX + 1];
3927+ size_t delimlen = 0;
3928
3929 initialize_main (&argc, &argv);
3930 program_name = argv[0];
3931@@ -770,7 +1090,6 @@
3932 switch (optc)
3933 {
3934 case 'b':
3935- case 'c':
3936 /* Build the byte list. */
3937 if (operating_mode != undefined_mode)
3938 FATAL_ERROR (_("only one type of list may be specified"));
3939@@ -778,6 +1097,14 @@
3940 spec_list_string = optarg;
3941 break;
3942
3943+ case 'c':
3944+ /* Build the character list. */
3945+ if (operating_mode != undefined_mode)
3946+ FATAL_ERROR (_("only one type of list may be specified"));
3947+ operating_mode = character_mode;
3948+ spec_list_string = optarg;
3949+ break;
3950+
3951 case 'f':
3952 /* Build the field list. */
3953 if (operating_mode != undefined_mode)
3954@@ -789,10 +1116,35 @@
3955 case 'd':
3956 /* New delimiter. */
3957 /* Interpret -d '' to mean `use the NUL byte as the delimiter.' */
3958- if (optarg[0] != '\0' && optarg[1] != '\0')
3959- FATAL_ERROR (_("the delimiter must be a single character"));
3960- delim = optarg[0];
3961- delim_specified = true;
3962+#if HAVE_MBRTOWC
3963+ {
3964+ if(MB_CUR_MAX > 1)
3965+ {
3966+ mbstate_t state;
3967+
3968+ memset (&state, '\0', sizeof(mbstate_t));
3969+ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state);
3970+
3971+ if (delimlen == (size_t)-1 || delimlen == (size_t)-2)
3972+ ++force_singlebyte_mode;
3973+ else
3974+ {
3975+ delimlen = (delimlen < 1) ? 1 : delimlen;
3976+ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0')
3977+ FATAL_ERROR (_("the delimiter must be a single character"));
3978+ memcpy (mbdelim, optarg, delimlen);
3979+ }
3980+ }
3981+
3982+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
3983+#endif
3984+ {
3985+ if (optarg[0] != '\0' && optarg[1] != '\0')
3986+ FATAL_ERROR (_("the delimiter must be a single character"));
3987+ delim = (unsigned char) optarg[0];
3988+ }
3989+ delim_specified = true;
3990+ }
3991 break;
3992
3993 case OUTPUT_DELIMITER_OPTION:
3994@@ -805,6 +1157,7 @@
3995 break;
3996
3997 case 'n':
3998+ byte_mode_character_aware = 1;
3999 break;
4000
4001 case 's':
4002@@ -827,7 +1180,7 @@
4003 if (operating_mode == undefined_mode)
4004 FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
4005
4006- if (delim != '\0' && operating_mode != field_mode)
4007+ if (delim_specified && operating_mode != field_mode)
4008 FATAL_ERROR (_("an input delimiter may be specified only\
4009 when operating on fields"));
4010
4011@@ -854,15 +1207,34 @@
4012 }
4013
4014 if (!delim_specified)
4015- delim = '\t';
4016+ {
4017+ delim = '\t';
4018+#ifdef HAVE_MBRTOWC
4019+ wcdelim = L'\t';
4020+ mbdelim[0] = '\t';
4021+ mbdelim[1] = '\0';
4022+ delimlen = 1;
4023+#endif
4024+ }
4025
4026 if (output_delimiter_string == NULL)
4027 {
4028- static char dummy[2];
4029- dummy[0] = delim;
4030- dummy[1] = '\0';
4031- output_delimiter_string = dummy;
4032- output_delimiter_length = 1;
4033+#ifdef HAVE_MBRTOWC
4034+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode)
4035+ {
4036+ output_delimiter_string = xstrdup(mbdelim);
4037+ output_delimiter_length = delimlen;
4038+ }
4039+
4040+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
4041+#endif
4042+ {
4043+ static char dummy[2];
4044+ dummy[0] = delim;
4045+ dummy[1] = '\0';
4046+ output_delimiter_string = dummy;
4047+ output_delimiter_length = 1;
4048+ }
4049 }
4050
4051 if (optind == argc)
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
new file mode 100644
index 0000000000..aba8742f6a
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
@@ -0,0 +1,117 @@
1Upstream-Status: Inappropriate [legacy version]
2
3This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
4
5The package is stated as being Licensed as GPLv2+.
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9--- coreutils-6.9/src/ls.c.ls-x 2007-06-13 14:27:36.000000000 +0100
10+++ coreutils-6.9/src/ls.c 2007-06-13 14:28:42.000000000 +0100
11@@ -4151,16 +4151,16 @@
12 size_t pos = 0;
13 size_t cols = calculate_columns (false);
14 struct column_info const *line_fmt = &column_info[cols - 1];
15- size_t name_length = length_of_file_name_and_frills (cwd_file);
16+ struct fileinfo const *f = sorted_file[0];
17+ size_t name_length = length_of_file_name_and_frills (f);
18 size_t max_name_length = line_fmt->col_arr[0];
19
20 /* Print first entry. */
21- print_file_name_and_frills (cwd_file);
22+ print_file_name_and_frills (f);
23
24 /* Now the rest. */
25 for (filesno = 1; filesno < cwd_n_used; ++filesno)
26 {
27- struct fileinfo const *f;
28 size_t col = filesno % cols;
29
30 if (col == 0)
31--- coreutils-6.9/tests/ls/Makefile.am.ls-x 2007-03-18 21:36:43.000000000 +0000
32+++ coreutils-6.9/tests/ls/Makefile.am 2007-06-13 14:28:42.000000000 +0100
33@@ -24,7 +24,7 @@
34 stat-dtype \
35 inode dangle file-type recursive dired infloop \
36 rt-1 time-1 symlink-slash follow-slink no-arg m-option \
37- stat-vs-dirent
38+ stat-vs-dirent x-option
39
40 EXTRA_DIST = $(TESTS)
41 TESTS_ENVIRONMENT = \
42--- /dev/null 2007-06-13 08:43:51.993263382 +0100
43+++ coreutils-6.9/tests/ls/x-option 2007-06-13 14:28:42.000000000 +0100
44@@ -0,0 +1,59 @@
45+#!/bin/sh
46+# Exercise the -x option.
47+
48+# Copyright (C) 2007 Free Software Foundation, Inc.
49+
50+# This program is free software; you can redistribute it and/or modify
51+# it under the terms of the GNU General Public License as published by
52+# the Free Software Foundation; either version 2 of the License, or
53+# (at your option) any later version.
54+
55+# This program is distributed in the hope that it will be useful,
56+# but WITHOUT ANY WARRANTY; without even the implied warranty of
57+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58+# GNU General Public License for more details.
59+
60+# You should have received a copy of the GNU General Public License
61+# along with this program; if not, write to the Free Software
62+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
63+# 02110-1301, USA.
64+
65+if test "$VERBOSE" = yes; then
66+ set -x
67+ ls --version
68+fi
69+
70+. $srcdir/../envvar-check
71+. $srcdir/../lang-default
72+
73+pwd=`pwd`
74+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
75+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
76+trap '(exit $?); exit $?' 1 2 13 15
77+
78+framework_failure=0
79+mkdir -p $tmp || framework_failure=1
80+cd $tmp || framework_failure=1
81+mkdir subdir || framework_failure=1
82+touch subdir/b || framework_failure=1
83+touch subdir/a || framework_failure=1
84+
85+if test $framework_failure = 1; then
86+ echo "$0: failure in testing framework" 1>&2
87+ (exit 1); exit 1
88+fi
89+
90+fail=0
91+
92+# Coreutils 6.8 and 6.9 would output this in the wrong order.
93+ls -x subdir > out || fail=1
94+ls -rx subdir >> out || fail=1
95+cat <<\EOF > exp || fail=1
96+a b
97+b a
98+EOF
99+
100+cmp out exp || fail=1
101+test $fail = 1 && diff out exp 2> /dev/null
102+
103+(exit $fail); exit $fail
104--- coreutils-6.9/NEWS.ls-x 2007-03-22 21:19:45.000000000 +0000
105+++ coreutils-6.9/NEWS 2007-06-13 14:28:42.000000000 +0100
106@@ -13,6 +13,11 @@
107 Using pr -m -s (i.e. merging files, with TAB as the output separator)
108 no longer inserts extraneous spaces between output columns.
109
110+** Bug fixes
111+
112+ ls -x DIR would sometimes output the wrong string in place of the
113+ first entry. [introduced in coreutils-6.8]
114+
115
116 * Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
117
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch
new file mode 100644
index 0000000000..58074c09a5
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-overflow.patch
@@ -0,0 +1,19 @@
1Upstream-Status: Inappropriate [legacy version]
2
3This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
4
5The package is stated as being Licensed as GPLv2+.
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9--- coreutils-5.2.1/src/who.c.overflow 2005-05-25 09:59:06.000000000 +0100
10+++ coreutils-5.2.1/src/who.c 2005-05-25 10:00:31.000000000 +0100
11@@ -75,7 +75,7 @@
12 # define NEW_TIME 0
13 #endif
14
15-#define IDLESTR_LEN 6
16+#define IDLESTR_LEN 10
17
18 #if HAVE_STRUCT_XTMP_UT_PID
19 # define PIDSTR_DECL_AND_INIT(Var, Utmp_ent) \
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..02730dbbb4
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.ac:40: error: automatic de-ANSI-fication support has been removed
8| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
9| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:138: gl_CHECK_ALL_TYPES is expanded from...
10| /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-linux/coreutils-native-6.9-r2/coreutils-6.9/m4/jm-macros.m4:24: coreutils_MACROS is expanded from...
11| configure.ac:40: the top level
12| autom4te: m4 failed with exit status: 1
13
14Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
152012/05/04
16
17Index: coreutils-6.9/m4/jm-macros.m4
18===================================================================
19--- coreutils-6.9.orig/m4/jm-macros.m4
20+++ coreutils-6.9/m4/jm-macros.m4
21@@ -142,11 +142,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
22 dnl whether functions and headers are available, whether they work, etc.
23 AC_REQUIRE([AC_SYS_LARGEFILE])
24
25- dnl This test must precede tests of compiler characteristics like
26- dnl that for the inline keyword, since it may change the degree to
27- dnl which the compiler supports such features.
28- AC_REQUIRE([AM_C_PROTOTYPES])
29-
30 dnl Checks for typedefs, structures, and compiler characteristics.
31 AC_REQUIRE([AC_C_BIGENDIAN])
32 AC_REQUIRE([AC_C_VOLATILE])
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch b/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch
new file mode 100644
index 0000000000..e0d600a390
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/fix_for_manpage_building.patch
@@ -0,0 +1,85 @@
1Upstream-Status: Inappropriate [legacy version]
2
3Use native coreutils binaries to build manpages in cross environment.
4This avoids man page build issues like this:
5
6| Making all in man
7| make[1]: Entering directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
8| Updating man page cut.1
9| Updating man page dir.1
10| Updating man page expand.1
11| Updating man page fold.1
12| Updating man page install.1
13| Updating man page join.1
14| Updating man page pr.1
15| Updating man page ls.1
16| Updating man page sort.1
17| Updating man page unexpand.1
18| Updating man page uniq.1
19| Updating man page who.1
20| Updating man page vdir.1
21| help2man: can't get `--help' info from dir.td/dir
22| help2man: can't get `--help' info from cut.td/cut
23| make[1]: *** [dir.1] Error 126
24| make[1]: *** Waiting for unfinished jobs....
25| help2man: can't get `--help' info from fold.td/fold
26| help2man: can't get `--help' info from install.td/install
27| help2man: can't get `--help' info from expand.td/expand
28| help2man: can't get `--help' info from join.td/join
29| make[1]: *** [cut.1] Error 126
30| make[1]: *** [fold.1] Error 126
31| make[1]: *** [install.1] Error 126
32| help2man: can't get `--help' info from sort.td/sort
33| make[1]: *** [expand.1] Error 126
34| help2man: can't get `--help' info from pr.td/pr
35| make[1]: *** [join.1] Error 126
36| help2man: can't get `--help' info from ls.td/ls
37| help2man: can't get `--help' info from unexpand.td/unexpand
38| help2man: can't get `--help' info from uniq.td/uniq
39| help2man: can't get `--help' info from who.td/who
40| make[1]: *** [sort.1] Error 126
41| make[1]: *** [pr.1] Error 126
42| help2man: can't get `--help' info from vdir.td/vdir
43| make[1]: *** [ls.1] Error 126
44| make[1]: *** [uniq.1] Error 126
45| make[1]: *** [unexpand.1] Error 126
46| make[1]: *** [who.1] Error 126
47| make[1]: *** [vdir.1] Error 126
48| make[1]: Leaving directory `/build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/coreutils-6.9/man'
49| make: *** [all-recursive] Error 1
50| FATAL: oe_runmake failed
51| ERROR: Function 'do_compile' failed (see /build_disk/poky_build/build1/tmp/work/i586-poky-linux/coreutils-6.9-r0/temp/log.do_compile.12780 for further information)
52NOTE: package coreutils-6.9-r0: task do_compile: Failed
53ERROR: Task 8 (/home/nitin/prj/poky.git/meta/recipes-core/coreutils/coreutils_6.9.bb, do_compile) failed with exit code '1'
54
55
56This patch is made for gplv2 coreutils the recipe
57Nitin A Kamble <nitin.a.kamble@intel.com>
582011/03/17
59
60Index: man/Makefile.am
61===================================================================
62--- a/man.orig/Makefile.am
63+++ b/man/Makefile.am
64@@ -167,7 +167,7 @@ mapped_name = `echo $*|sed 's/install/gi
65 $(PERL) -- $(srcdir)/help2man \
66 --source='$(PACKAGE_STRING)' \
67 --include=$(srcdir)/$*.x \
68- --output=$t/$@ $t/$*; \
69+ --output=$t/$@ $*; \
70 } \
71 && sed 's|$*\.td/||g' $t/$@ > $@ \
72 && chmod a-w $@ \
73Index: man/Makefile.in
74===================================================================
75--- a/man.orig/Makefile.in
76+++ b/man/Makefile.in
77@@ -865,7 +865,7 @@ yes.1: $(common_dep) $(srcdir)/yes.x .
78 $(PERL) -- $(srcdir)/help2man \
79 --source='$(PACKAGE_STRING)' \
80 --include=$(srcdir)/$*.x \
81- --output=$t/$@ $t/$*; \
82+ --output=$t/$@ $*; \
83 } \
84 && sed 's|$*\.td/||g' $t/$@ > $@ \
85 && chmod a-w $@ \
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch b/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
new file mode 100644
index 0000000000..5ca590bcc6
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
@@ -0,0 +1,63 @@
1Upstream-Status: Inappropriate [legacy version]
2
3# coreutils uses gnulib which conflicts with newer libc header on futimens
4# this patch simply renames coreutils futimes to avoid confliction
5#
6# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
7# (this patch is licensed under GPLv2)
8
9diff --git a/lib/utimens.c b/lib/utimens.c
10index 71bc510..ae870b8 100644
11--- a/lib/utimens.c
12+++ b/lib/utimens.c
13@@ -75,7 +75,7 @@ struct utimbuf
14 Return 0 on success, -1 (setting errno) on failure. */
15
16 int
17-futimens (int fd ATTRIBUTE_UNUSED,
18+futimens_coreutils (int fd ATTRIBUTE_UNUSED,
19 char const *file, struct timespec const timespec[2])
20 {
21 /* Some Linux-based NFS clients are buggy, and mishandle time stamps
22@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
23 int
24 utimens (char const *file, struct timespec const timespec[2])
25 {
26- return futimens (-1, file, timespec);
27+ return futimens_coreutils (-1, file, timespec);
28 }
29diff --git a/lib/utimens.h b/lib/utimens.h
30index 0097aaa..13fc45a 100644
31--- a/lib/utimens.h
32+++ b/lib/utimens.h
33@@ -1,3 +1,3 @@
34 #include <time.h>
35-int futimens (int, char const *, struct timespec const [2]);
36+int futimens_coreutils (int, char const *, struct timespec const [2]);
37 int utimens (char const *, struct timespec const [2]);
38diff --git a/src/copy.c b/src/copy.c
39index 4bdb75c..04634f1 100644
40--- a/src/copy.c
41+++ b/src/copy.c
42@@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name,
43 timespec[0] = get_stat_atime (src_sb);
44 timespec[1] = get_stat_mtime (src_sb);
45
46- if (futimens (dest_desc, dst_name, timespec) != 0)
47+ if (futimens_coreutils (dest_desc, dst_name, timespec) != 0)
48 {
49 error (0, errno, _("preserving times for %s"), quote (dst_name));
50 if (x->require_preserve)
51diff --git a/src/touch.c b/src/touch.c
52index a79c26d..6ef317d 100644
53--- a/src/touch.c
54+++ b/src/touch.c
55@@ -182,7 +182,7 @@ touch (const char *file)
56 t = timespec;
57 }
58
59- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
60+ ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
61
62 if (fd == STDIN_FILENO)
63 {
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch b/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
new file mode 100644
index 0000000000..8f355520bd
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Inappropriate [legacy version]
2
3# remove the line to cause recursive inclusion error from autoreconf, sicne
4# newer autoconf has included this definition. Simply rename it here.
5#
6# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
7# (this patch is licensed under GPLv2)
8
9diff --git a/extensions.m4 b/extensions.m4
10index 143a9e5..f6558f1 100644
11--- a/m4/extensions.m4
12+++ b/m4/extensions.m4
13@@ -16,7 +16,7 @@
14 # ------------------------
15 # Enable extensions on systems that normally disable them,
16 # typically due to standards-conformance issues.
17-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
18+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS_DUMMY],
19 [
20 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
21 AC_BEFORE([$0], [AC_RUN_IFELSE])
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch b/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
new file mode 100644
index 0000000000..c42cb9c059
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Inappropriate [legacy version]
2
3# man page for 'touch' is generated differently from others. All other utilities
4# are provided static man source files, while for 'touch' it requires help2man
5# to invoke "touch --help" and then convert the output into the manual. Since touch
6# is with target format which can't be invoked on build system, disable building
7# 'touch' man page here.
8#
9# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
10# (this patch is licensed under GPLv2)
11
12diff --git a/man/Makefile.am b/man/Makefile.am
13index 32df9d1..37b09e3 100644
14--- a/man/Makefile.am
15+++ b/man/Makefile.am
16@@ -27,7 +27,7 @@ dist_man_MANS = \
17 paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
18 rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
19 shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
20- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
21+ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 tr.1 true.1 tsort.1 \
22 tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
23 whoami.1 yes.1 $(MAN)
24 optional_mans = \
diff --git a/meta/recipes-core/coreutils/coreutils-8.21/coreutils-build-with-acl.patch b/meta/recipes-core/coreutils/coreutils-8.21/coreutils-build-with-acl.patch
new file mode 100644
index 0000000000..8273d78eb3
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.21/coreutils-build-with-acl.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Fix the following issue so that coreutils can build with ACL:
4
5configure: WARNING: libacl development library was not found or not usable.
6configure: WARNING: GNU coreutils will be built without ACL support.
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 m4/acl.m4 | 2 +-
11 1 files changed, 1 insertions(+), 1 deletions(-)
12
13diff --git a/m4/acl.m4 b/m4/acl.m4
14index d6a448a..a9d4836 100644
15--- a/m4/acl.m4
16+++ b/m4/acl.m4
17@@ -159,7 +159,7 @@ AC_DEFUN([gl_ACL_GET_FILE],
18 ]])],
19 [gl_cv_func_working_acl_get_file=yes],
20 [gl_cv_func_working_acl_get_file=no],
21- [gl_cv_func_working_acl_get_file=cross-compiling])])
22+ [gl_cv_func_working_acl_get_file=yes])])
23
24 AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
25 ])
26--
271.7.7
28
diff --git a/meta/recipes-core/coreutils/coreutils-8.21/dummy_help2man.patch b/meta/recipes-core/coreutils/coreutils-8.21/dummy_help2man.patch
new file mode 100644
index 0000000000..4757f52aa0
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.21/dummy_help2man.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Inappropriate [disable feature]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd coreutils-8.21/man/local.mk coreutils-8.21/man/local.mk
5--- coreutils-8.21/man/local.mk 2013-02-05 16:01:21.000000000 +0200
6+++ coreutils-8.21/man/local.mk 2013-03-23 09:12:53.360470192 +0200
7@@ -19,11 +19,11 @@
8 EXTRA_DIST += man/help2man man/dummy-man
9
10 ## Graceful degradation for systems lacking perl.
11-if HAVE_PERL
12-run_help2man = $(PERL) -- $(srcdir)/man/help2man
13-else
14+#if HAVE_PERL
15+#run_help2man = $(PERL) -- $(srcdir)/man/help2man
16+#else
17 run_help2man = $(SHELL) $(srcdir)/man/dummy-man
18-endif
19+#endif
20
21 man1_MANS = @man1_MANS@
22 EXTRA_DIST += $(man1_MANS:.1=.x)
diff --git a/meta/recipes-core/coreutils/coreutils-8.21/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.21/remove-usr-local-lib-from-m4.patch
new file mode 100644
index 0000000000..2ef8a548ac
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.21/remove-usr-local-lib-from-m4.patch
@@ -0,0 +1,31 @@
1We have problem using hardcoded directories like /usr/local here
2which will be checked for cross builds. This is a special case which
3is valid for AIX only. We do not have AIX as one of our supported
4build host or target. Therefore we get rid of the hardcoded paths
5and make life easier for cross compilation process.
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Upstream-Status: Inappropriate [Upstream does care for AIX while we may not]
10
11Index: coreutils-8.14/m4/getloadavg.m4
12===================================================================
13--- coreutils-8.14.orig/m4/getloadavg.m4 2011-09-19 08:09:24.000000000 -0700
14+++ coreutils-8.14/m4/getloadavg.m4 2011-10-19 21:42:00.385533357 -0700
15@@ -41,16 +41,6 @@
16 [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes])
17 fi
18
19- if test $gl_func_getloadavg_done = no; then
20- # There is a commonly available library for RS/6000 AIX.
21- # Since it is not a standard part of AIX, it might be installed locally.
22- gl_getloadavg_LIBS=$LIBS
23- LIBS="-L/usr/local/lib $LIBS"
24- AC_CHECK_LIB([getloadavg], [getloadavg],
25- [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
26- [LIBS=$gl_getloadavg_LIBS])
27- fi
28-
29 # Set up the replacement function if necessary.
30 if test $gl_func_getloadavg_done = no; then
31 HAVE_GETLOADAVG=0
diff --git a/meta/recipes-core/coreutils/coreutils_6.9.bb b/meta/recipes-core/coreutils/coreutils_6.9.bb
new file mode 100644
index 0000000000..eeeab050e4
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_6.9.bb
@@ -0,0 +1,105 @@
1SUMMARY = "The basic file, shell and text manipulation utilities."
2DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
3manipulation utilities. These are the core utilities which are expected to exist on \
4every system."
5
6HOMEPAGE = "http://www.gnu.org/software/coreutils/"
7BUGTRACKER = "http://debbugs.gnu.org/coreutils"
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
10 file://src/ls.c;beginline=4;endline=16;md5=15ed60f67b1db5fedd5dbc37cf8a9543"
11PR = "r5"
12DEPENDS_class-native = "gettext-native"
13
14inherit autotools gettext
15
16SRC_URI_BASE = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \
17 file://gnulib_m4.patch \
18 file://futimens.patch \
19 file://coreutils-ls-x.patch \
20 file://coreutils-6.9-cp-i-u.patch \
21 file://coreutils-i18n.patch \
22 file://coreutils-overflow.patch \
23 file://coreutils-fix-install.patch \
24 file://man-touch.patch \
25 file://coreutils_fix_for_automake-1.12.patch \
26 file://coreutils-build-with-acl.patch \
27 "
28
29SRC_URI = "${SRC_URI_BASE} file://fix_for_manpage_building.patch"
30SRC_URI_class-native = "${SRC_URI_BASE}"
31
32SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06"
33SRC_URI[sha256sum] = "89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0"
34
35
36# acl is not a default feature
37#
38PACKAGECONFIG_class-target ??= "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
39PACKAGECONFIG_class-native ??= ""
40
41# with, without, depends, rdepends
42#
43PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
44
45
46# [ gets a special treatment and is not included in this
47bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
48 env expand expr factor fmt fold groups head hostid id install \
49 join link logname md5sum mkfifo nice nl nohup od paste pathchk \
50 pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
51 sha384sum sha512sum shred shuf sort split stat sum tac tail tee test \
52 tr tsort tty unexpand uniq unlink users vdir wc who whoami yes uptime"
53
54# hostname gets a special treatment and is not included in this
55base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
56 mknod mv pwd rm rmdir sleep stty sync touch true uname hostname"
57
58sbindir_progs= "chroot"
59
60# Let aclocal use the relative path for the m4 file rather than the
61# absolute since coreutils has a lot of m4 files, otherwise there might
62# be an "Argument list too long" error when it is built in a long/deep
63# directory.
64acpaths = "-I ./m4"
65
66do_install() {
67 autotools_do_install
68
69 install -d ${D}${base_bindir}
70 [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
71
72 install -d ${D}${sbindir}
73 [ "${bindir}" != "${sbindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i; done
74
75 # [ requires special handling because [.coreutils will cause the sed stuff
76 # in update-alternatives to fail, therefore use lbracket - the name used
77 # for the actual source file.
78 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
79
80 # Newer versions of coreutils do not include su, to mimic this behavior
81 # we simply remove it.
82 rm -f ${D}${bindir}/su
83}
84
85inherit update-alternatives
86
87ALTERNATIVE_PRIORITY = "100"
88
89ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs}"
90
91ALTERNATIVE_PRIORITY[uptime] = "10"
92ALTERNATIVE_PRIORITY[hostname] = "10"
93
94ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
95ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
96
97python __anonymous() {
98 for prog in d.getVar('base_bindir_progs', True).split():
99 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
100
101 for prog in d.getVar('sbindir_progs', True).split():
102 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
103}
104
105BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/coreutils/coreutils_8.21.bb b/meta/recipes-core/coreutils/coreutils_8.21.bb
new file mode 100644
index 0000000000..da14303286
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_8.21.bb
@@ -0,0 +1,103 @@
1SUMMARY = "The basic file, shell and text manipulation utilities."
2DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
3manipulation utilities. These are the core utilities which are expected to exist on \
4every system."
5HOMEPAGE = "http://www.gnu.org/software/coreutils/"
6BUGTRACKER = "http://debbugs.gnu.org/coreutils"
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
9 file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
10PR = "r0"
11DEPENDS = "gmp libcap"
12DEPENDS_class-native = ""
13
14inherit autotools gettext
15
16SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
17 file://remove-usr-local-lib-from-m4.patch \
18 file://coreutils-build-with-acl.patch \
19 file://dummy_help2man.patch \
20 "
21
22SRC_URI[md5sum] = "065ba41828644eca5dd8163446de5d64"
23SRC_URI[sha256sum] = "adaa44bdab3fa5eb352e80d8a31fdbf957b78653d0c2cd30d63e161444288e18"
24
25EXTRA_OECONF_class-native = "--without-gmp"
26
27# acl is not a default feature
28#
29PACKAGECONFIG_class-target ??= "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
30PACKAGECONFIG_class-native ??= ""
31
32# with, without, depends, rdepends
33#
34PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
35
36# [ df mktemp base64 gets a special treatment and is not included in this
37bindir_progs = "basename chcon cksum comm csplit cut dir dircolors dirname du \
38 env expand expr factor fmt fold groups head hostid id install \
39 join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
40 pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
41 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
42 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
43
44# hostname gets a special treatment and is not included in this
45base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
46 mknod mv pwd rm rmdir sleep stty sync touch true uname"
47
48sbindir_progs= "chroot"
49
50# Let aclocal use the relative path for the m4 file rather than the
51# absolute since coreutils has a lot of m4 files, otherwise there might
52# be an "Argument list too long" error when it is built in a long/deep
53# directory.
54acpaths = "-I ./m4"
55
56# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
57do_compile_prepend () {
58 mkdir -p ${B}/src
59}
60
61do_install_append() {
62 for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
63
64 install -d ${D}${base_bindir}
65 [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
66
67 install -d ${D}${sbindir}
68 [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
69
70 # [ requires special handling because [.coreutils will cause the sed stuff
71 # in update-alternatives to fail, therefore use lbracket - the name used
72 # for the actual source file.
73 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
74 install -d ${D}${libdir}/coreutils
75 mv ${D}${libexecdir}/coreutils/libstdbuf.so ${D}${libdir}/coreutils
76}
77
78inherit update-alternatives
79
80ALTERNATIVE_PRIORITY = "100"
81ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
82
83ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
84ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
85
86ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
87ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
88
89ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
90ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
91
92ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
93ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
94
95python __anonymous() {
96 for prog in d.getVar('base_bindir_progs', True).split():
97 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
98
99 for prog in d.getVar('sbindir_progs', True).split():
100 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
101}
102
103BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus-wait/dbus-wait_git.bb b/meta/recipes-core/dbus-wait/dbus-wait_git.bb
new file mode 100644
index 0000000000..93c782d393
--- /dev/null
+++ b/meta/recipes-core/dbus-wait/dbus-wait_git.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "A simple tool to wait for a specific signal over DBus"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
3SECTION = "base"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6
7DEPENDS = "dbus"
8
9SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517"
10PV = "0.1+git${SRCPV}"
11PR = "r2"
12
13SRC_URI = "git://git.yoctoproject.org/${BPN}"
14
15S = "${WORKDIR}/git"
16
17inherit autotools
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
new file mode 100644
index 0000000000..04025e65f8
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
@@ -0,0 +1,123 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: dbus
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 1
8# Short-Description: D-Bus systemwide message bus
9# Description: D-Bus is a simple interprocess messaging system, used
10# for sending messages between applications.
11### END INIT INFO
12#
13# -*- coding: utf-8 -*-
14# Debian init.d script for D-BUS
15# Copyright © 2003 Colin Walters <walters@debian.org>
16
17set -e
18
19# Source function library.
20. /etc/init.d/functions
21
22DAEMON=@bindir@/dbus-daemon
23NAME=dbus
24DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
25PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
26UUIDDIR=/var/lib/dbus
27DESC="system message bus"
28EVENTDIR=/etc/dbus-1/event.d
29
30test -x $DAEMON || exit 0
31
32# Source defaults file; edit that file to configure this script.
33ENABLED=1
34PARAMS=""
35if [ -e /etc/default/dbus ]; then
36 . /etc/default/dbus
37fi
38
39test "$ENABLED" != "0" || exit 0
40
41start_it_up()
42{
43 mkdir -p "`dirname $PIDFILE`"
44 if [ -e $PIDFILE ]; then
45 PIDDIR=/proc/$(cat $PIDFILE)
46 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
47 echo "$DESC already started; not starting."
48 else
49 echo "Removing stale PID file $PIDFILE."
50 rm -f $PIDFILE
51 fi
52 fi
53
54 if [ ! -d $UUIDDIR ]; then
55 mkdir -p $UUIDDIR
56 chown $DAEMONUSER $UUIDDIR
57 chgrp $DAEMONUSER $UUIDDIR
58 fi
59
60 dbus-uuidgen --ensure
61
62 echo -n "Starting $DESC: "
63 start-stop-daemon -o --start --quiet --pidfile $PIDFILE \
64 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
65 echo "$NAME."
66 if [ -d $EVENTDIR ]; then
67 run-parts --arg=start $EVENTDIR
68 fi
69}
70
71shut_it_down()
72{
73 if [ -d $EVENTDIR ]; then
74 # TODO: --reverse when busybox supports it
75 run-parts --arg=stop $EVENTDIR
76 fi
77 echo -n "Stopping $DESC: "
78 start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \
79 --user $DAEMONUSER
80 # We no longer include these arguments so that start-stop-daemon
81 # can do its job even given that we may have been upgraded.
82 # We rely on the pidfile being sanely managed
83 # --exec $DAEMON -- --system $PARAMS
84 echo "$NAME."
85 rm -f $PIDFILE
86}
87
88reload_it()
89{
90 echo -n "Reloading $DESC config: "
91 dbus-send --print-reply --system --type=method_call \
92 --dest=org.freedesktop.DBus \
93 / org.freedesktop.DBus.ReloadConfig > /dev/null
94 # hopefully this is enough time for dbus to reload it's config file.
95 echo "done."
96}
97
98case "$1" in
99 start)
100 start_it_up
101 ;;
102 stop)
103 shut_it_down
104 ;;
105 status)
106 status $DAEMON
107 exit $?
108 ;;
109 reload|force-reload)
110 reload_it
111 ;;
112 restart)
113 shut_it_down
114 sleep 1
115 start_it_up
116 ;;
117 *)
118 echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2
119 exit 1
120 ;;
121esac
122
123exit 0
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch
new file mode 100644
index 0000000000..79554b1ee1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch
@@ -0,0 +1,35 @@
1dbus: remove build host test in configure script
2
3The dbus build tests the build host to detect what initscript
4environment it expects. Remove the test and set it to "redhat"
5unconditionally as the oe-core initscript has a redhat-style pid file
6path.
7
8Signed-off-by: Andy Ross <andy.ross@windriver.com>
9Upstream-Status: innappropriate [embedded]
10
11diff -u a/configure.ac b/configure.ac
12--- a/configure.ac 2012-08-28 11:23:43.040609874 -0700
13+++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700
14@@ -1348,19 +1348,8 @@
15 AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
16 AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
17
18-#### Check our operating system
19-operating_system=unknown
20-if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
21- operating_system=redhat
22-fi
23-
24-if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
25- operating_system=slackware
26-fi
27-
28-if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
29- operating_system=cygwin
30-fi
31+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
32+operating_system=redhat
33
34 #### Sort out init scripts
35
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch
new file mode 100644
index 0000000000..263d17eff7
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch
@@ -0,0 +1,154 @@
1Add install-ptest rules.
2Change TEST_ENVIRONMENT to allow running outside build dir.
3
4 Makefile.am | 7 +++++++
5 bus/Makefile.am | 6 ++++++
6 dbus/Makefile.am | 6 ++++++
7 doc/Makefile.am | 4 ++++
8 test/Makefile.am | 25 ++++++++++++++++++++-----
9 test/name-test/Makefile.am | 9 +++++++++
10 tools/Makefile.am | 12 ++++++++++++
11 7 files changed, 64 insertions(+), 5 deletions(-)
12
13Signed-off-by: Björn Stenberg <bjst@enea.com>
14Upstream-Status: Pending
15
16diff -ur a/Makefile.am b/Makefile.am
17--- a/Makefile.am 2012-12-06 14:34:01.157414449 +0100
18+++ b/Makefile.am 2012-12-06 15:21:14.447113035 +0100
19@@ -30,4 +30,11 @@
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22
23+if DBUS_BUILD_TESTS
24+install-ptest:
25+ @for subdir in $(SUBDIRS); do \
26+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
27+ done
28+endif
29+
30 include tools/lcov.am
31diff -ur a/bus/Makefile.am b/bus/Makefile.am
32--- a/bus/Makefile.am 2012-12-06 14:34:01.169413931 +0100
33+++ b/bus/Makefile.am 2012-12-06 15:21:14.463112346 +0100
34@@ -290,3 +290,9 @@
35 #### Extra dist
36
37 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)
38+
39+if DBUS_BUILD_TESTS
40+install-ptest:
41+ @$(MKDIR_P) $(DESTDIR)
42+ @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR)
43+endif
44diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
45--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100
46+++ b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100
47@@ -310,3 +310,9 @@
48 update-systemd:
49 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
50 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h
51+
52+if DBUS_BUILD_TESTS
53+install-ptest:
54+ @$(MKDIR_P) $(DESTDIR)
55+ @install $(noinst_PROGRAMS) $(DESTDIR)
56+endif
57diff -ur a/test/Makefile.am b/test/Makefile.am
58--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100
59+++ b/test/Makefile.am 2012-12-06 15:21:14.455112690 +0100
60@@ -119,12 +119,13 @@
61 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
62 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
63
64+ptest_run_dir = ..
65+
66 TESTS_ENVIRONMENT = \
67- DBUS_BLOCK_ON_ABORT=1 \
68- DBUS_FATAL_WARNINGS=1 \
69- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
70- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
71- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
72+ DBUS_FATAL_WARNINGS=0 \
73+ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
74+ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
75+ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
76 $(NULL)
77
78 test_corrupt_SOURCES = corrupt.c
79@@ -325,3 +325,25 @@
80 data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
81 $(AM_V_at)$(MKDIR_P) data/valid-config-files
82 $(AM_V_GEN)cp $< $@
83+
84+if DBUS_BUILD_TESTS
85+install-ptest: install-ptest-nonrecursive
86+ @for subdir in $(SUBDIRS); do \
87+ if [ $$subdir != "." ]; then \
88+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
89+ fi; \
90+ done
91+
92+install-ptest-nonrecursive:
93+ @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d
94+ @for file in Makefile $(installable_tests) $(noinst_PROGRAMS) $(noinst_DATA) ; do \
95+ if [ -f .libs/$$file ]; then \
96+ install .libs/$$file $(DESTDIR); \
97+ else \
98+ install -D $${file%.in} $(DESTDIR)/$${file%.in}; \
99+ fi; \
100+ done;
101+ @for file in $(EXTRA_DIST); do \
102+ install -D ${srcdir}/$${file%.in} $(DESTDIR)/$${file%.in}; \
103+ done;
104+endif
105diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am
106--- a/test/name-test/Makefile.am 2012-12-06 14:34:01.169413931 +0100
107+++ b/test/name-test/Makefile.am 2012-12-06 15:21:14.459112518 +0100
108@@ -36,4 +36,16 @@
109 test_privserver_client_LDADD=../libdbus-testutils.la
110 test_autolaunch_LDADD=../libdbus-testutils.la
111
112+install-ptest:
113+ @$(MKDIR_P) $(DESTDIR)
114+ @for file in Makefile $(noinst_PROGRAMS); do \
115+ if [ -f .libs/$$file ]; then \
116+ install .libs/$$file $(DESTDIR); \
117+ else \
118+ install $$file $(DESTDIR); \
119+ fi \
120+ done;
121+ @for file in $(EXTRA_DIST); do \
122+ cp $(srcdir)/$$file $(DESTDIR); \
123+ done;
124 endif
125diff -ur a/tools/Makefile.am b/tools/Makefile.am
126--- a/tools/Makefile.am 2012-12-06 14:34:01.161414276 +0100
127+++ b/tools/Makefile.am 2012-12-06 15:21:14.455112690 +0100
128@@ -78,3 +78,15 @@
129
130 installcheck-local:
131 test -d $(DESTDIR)$(localstatedir)/lib/dbus
132+
133+if DBUS_BUILD_TESTS
134+install-ptest:
135+ @$(MKDIR_P) $(DESTDIR)
136+ @for file in $(bin_PROGRAMS); do \
137+ if [ -f .libs/$$file ]; then \
138+ install .libs/$$file $(DESTDIR); \
139+ else \
140+ install $$file $(DESTDIR); \
141+ fi; \
142+ done;
143+endif
144diff -ur a/doc/Makefile.am b/doc/Makefile.am
145--- a/doc/Makefile.am 2012-06-06 12:45:55.000000000 +0200
146+++ b/doc/Makefile.am 2012-12-06 16:04:58.990070587 +0100
147@@ -174,3 +174,7 @@
148
149 maintainer-clean-local:
150 rm -f $(XMLTO_OUTPUT)
151+
152+if DBUS_BUILD_TESTS
153+install-ptest:
154+endif
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch
new file mode 100644
index 0000000000..294400247e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch
@@ -0,0 +1,25 @@
1When building the dbus-ptest package, we have to enable python. However
2checking if the host-system python has the necessary library isn't useful.
3
4Disable the python module check for cross compiling.
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500
11+++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500
12@@ -257,13 +257,6 @@
13 # full test coverage is required, Python is a hard dependency
14 AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
15 AM_PATH_PYTHON([2.6])
16- AC_MSG_CHECKING([for Python modules for full test coverage])
17- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
18- AC_MSG_RESULT([yes])
19- else
20- AC_MSG_RESULT([no])
21- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
22- fi
23 else
24 # --enable-tests not given: do not abort if Python is missing
25 AM_PATH_PYTHON([2.6], [], [:])
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/run-ptest b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest
new file mode 100755
index 0000000000..e08ecb1a63
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2cd test
3make -k runtest-TESTS
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch
new file mode 100644
index 0000000000..5c08c9354a
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch
@@ -0,0 +1,26 @@
1
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5
6--- a/test/Makefile.am 2012-06-15 15:25:43.000000000 +0200
7+++ b/test/Makefile.am 2012-11-16 09:24:44.263140840 +0100
8@@ -119,12 +119,13 @@
9 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
10 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
11
12+ptest_run_dir = ..
13+
14 TESTS_ENVIRONMENT = \
15- DBUS_BLOCK_ON_ABORT=1 \
16- DBUS_FATAL_WARNINGS=1 \
17- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
18- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
19- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
20+ DBUS_FATAL_WARNINGS=0 \
21+ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
22+ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
23+ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
24 $(NULL)
25
26 test_corrupt_SOURCES = corrupt.c
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch
new file mode 100644
index 0000000000..bf086e1788
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch
@@ -0,0 +1,44 @@
1From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 23 Jun 2011 13:52:09 +0200
4Subject: [PATCH] buildsys: hardcode socketdir to /tmp
5
6the TMPDIR env var isn't always pointing to the right target path
7
8Upstream-Status: Inappropriate [embedded]
9
10Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11
12Original comment:
13
14 avoid to check tmp dir at build time. instead uses hard coded /tmp here
15 comment added by Kevin Tian <kevin.tian@intel.com>
16---
17 configure.ac | 11 +----------
18 1 files changed, 1 insertions(+), 10 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index 408054b..6d26180 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -1483,16 +1483,7 @@ AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
25 AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY",
26 [Full path to the launch helper test program in the builddir])
27
28-#### Find socket directories
29-if ! test -z "$TMPDIR" ; then
30- DEFAULT_SOCKET_DIR=$TMPDIR
31-elif ! test -z "$TEMP" ; then
32- DEFAULT_SOCKET_DIR=$TEMP
33-elif ! test -z "$TMP" ; then
34- DEFAULT_SOCKET_DIR=$TMP
35-else
36- DEFAULT_SOCKET_DIR=/tmp
37-fi
38+DEFAULT_SOCKET_DIR=/tmp
39
40 DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'`
41
42--
431.6.6.1
44
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
new file mode 100644
index 0000000000..fbb4967828
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
@@ -0,0 +1,15 @@
1Disable compiling examples
2
3Upstream-Status: Inappropriate [disable feature]
4
5Signed-off-by: Kevin Tian <kevin.tian@intel.com>
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
9+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
10@@ -1,4 +1,4 @@
11-SUBDIRS = . examples
12+SUBDIRS = .
13
14 INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
15
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..40e3b12b5d
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
5--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300
6+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200
7@@ -8,7 +8,7 @@
8
9 AM_INIT_AUTOMAKE([1.9])
10
11-AM_CONFIG_HEADER(config.h)
12+AC_CONFIG_HEADERS(config.h)
13
14 # Honor aclocal flags
15 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
new file mode 100644
index 0000000000..2e8e178bb7
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
@@ -0,0 +1,48 @@
1Change Makefile.am to install regression tests for test package purpose.
2
3Upstream-Status: Inappropriate [test not install is for purpose from upstream]
4
5Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
6
7diff --git a/test/Makefile.am b/test/Makefile.am
8index 7ba11a8..249f0e7 100644
9--- a/test/Makefile.am
10+++ b/test/Makefile.am
11@@ -13,7 +13,8 @@ else
12 TEST_BINARIES=
13 endif
14
15-noinst_PROGRAMS= $(TEST_BINARIES)
16+testdir = $(datadir)/@PACKAGE@/tests
17+test_PROGRAMS= $(TEST_BINARIES)
18
19 test_service_SOURCES= \
20 test-service.c
21diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
22index 3cb2c39..e6de67d 100644
23--- a/test/interfaces/Makefile.am
24+++ b/test/interfaces/Makefile.am
25@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
26
27 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
28 ## build even when not doing "make check"
29-noinst_PROGRAMS = test-service test-client
30+testdir = $(datadir)/@PACKAGE@/tests/interfaces
31+test_PROGRAMS = test-service test-client
32
33 test_service_SOURCES = \
34 test-interfaces.c \
35diff --git a/test/core/Makefile.am b/test/core/Makefile.am
36index ef6cb26..9786c3a 100644
37--- a/test/core/Makefile.am
38+++ b/test/core/Makefile.am
39@@ -46,7 +46,8 @@ endif
40
41 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
42 ## build even when not doing "make check"
43-noinst_PROGRAMS = \
44+testdir = $(datadir)/@PACKAGE@/tests/core
45+test_PROGRAMS = \
46 test-dbus-glib \
47 test-service-glib \
48 $(THREAD_APPS) \
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
new file mode 100644
index 0000000000..6c60d9e408
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -0,0 +1,44 @@
1SUMMARY = "High level language (GLib) binding for D-Bus"
2DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
3the D-Bus library with the GLib thread abstraction and main loop."
4HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
7 file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8SECTION = "base"
9
10DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
11DEPENDS_class-native = "glib-2.0-native dbus-native"
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
14 file://no-examples.patch \
15 file://test-install-makefile.patch \
16 file://obsolete_automake_macros.patch \
17"
18
19inherit autotools pkgconfig gettext
20
21#default disable regression tests, some unit test code in non testing code
22#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
23PACKAGECONFIG ??= ""
24PACKAGECONFIG[tests] = "--enable-tests,,,"
25
26EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
27 --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
28EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
29
30PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
31
32FILES_${PN} = "${libdir}/lib*${SOLIBS}"
33FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \
34 ${libexecdir}/dbus-bash-completion-helper"
35FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
36FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
37
38RDEPENDS_${PN}-tests += "dbus-x11"
39FILES_${PN}-tests = "${datadir}/${BPN}/tests"
40FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \
41 ${datadir}/${BPN}/tests/core/.debug/* \
42 ${datadir}/${BPN}/tests/interfaces/.debug/*"
43
44BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
new file mode 100644
index 0000000000..e08e3564d1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
@@ -0,0 +1,6 @@
1require dbus-glib.inc
2
3PR = "r0"
4
5SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
6SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
new file mode 100644
index 0000000000..84ed287cb2
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
@@ -0,0 +1,51 @@
1DESCRIPTION = "D-Bus test package, only used for D-bus functionality test."
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
4LICENSE = "AFL-2 | GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
6 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
7
8DEPENDS = "python-pygobject dbus dbus-glib"
9
10RDEPENDS_${PN} += "make"
11RDEPENDS_${PN}-dev = ""
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
14 file://tmpdir.patch \
15 file://ptest.patch \
16 file://dbus-1.init \
17 file://run-ptest \
18 file://python-config.patch \
19 "
20
21SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
22SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"
23
24S="${WORKDIR}/dbus-${PV}"
25FILESPATH = "${FILE_DIRNAME}/dbus-${PV}"
26
27inherit autotools pkgconfig gettext ptest
28
29EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
30EXTRA_OECONF_X_virtclass-native = "--without-x"
31
32EXTRA_OECONF = "--enable-tests \
33 --enable-modular-tests \
34 --enable-installed-tests \
35 --enable-checks \
36 --enable-asserts \
37 --enable-verbose-mode \
38 --disable-xml-docs \
39 --disable-doxygen-docs \
40 --disable-libaudit \
41 --with-xml=expat \
42 --with-systemdsystemunitdir=${systemd_unitdir}/system/ \
43 --with-dbus-test-dir=${PTEST_PATH} \
44 ${EXTRA_OECONF_X}"
45
46do_install() {
47}
48
49do_install_ptest() {
50 find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
51}
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
new file mode 100644
index 0000000000..5864643996
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -0,0 +1,148 @@
1SUMMARY = "D-Bus message bus"
2DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
3HOMEPAGE = "http://dbus.freedesktop.org"
4SECTION = "base"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8X11DEPENDS = "virtual/libx11 libsm"
9DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
10DEPENDS_class-native = "expat-native virtual/libintl-native"
11DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl"
12RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)}"
13RDEPENDS_class-native = ""
14
15INC_PR = "r6"
16
17SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
18 file://tmpdir.patch; \
19 file://dbus-1.init \
20 file://os-test.patch \
21"
22
23inherit useradd autotools pkgconfig gettext update-rc.d
24
25INITSCRIPT_NAME = "dbus-1"
26INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
27
28python __anonymous() {
29 features = d.getVar("DISTRO_FEATURES", True).split()
30 if "sysvinit" not in features:
31 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
32}
33
34USERADD_PACKAGES = "${PN}"
35GROUPADD_PARAM_${PN} = "-r netdev"
36USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
37 --no-create-home --shell /bin/false \
38 --user-group messagebus"
39
40CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
41
42DEBIANNAME_${PN} = "dbus-1"
43
44PACKAGES =+ "${PN}-lib"
45
46OLDPKGNAME = "dbus-x11"
47OLDPKGNAME_class-nativesdk = ""
48
49# for compatibility
50RPROVIDES_${PN} = "${OLDPKGNAME}"
51RREPLACES_${PN} += "${OLDPKGNAME}"
52
53FILES_${PN} = "${bindir}/dbus-daemon* \
54 ${bindir}/dbus-uuidgen \
55 ${bindir}/dbus-cleanup-sockets \
56 ${bindir}/dbus-send \
57 ${bindir}/dbus-monitor \
58 ${bindir}/dbus-launch \
59 ${libexecdir}/dbus* \
60 ${sysconfdir} \
61 ${localstatedir} \
62 ${datadir}/dbus-1/services \
63 ${datadir}/dbus-1/system-services \
64 ${systemd_unitdir}/system/"
65FILES_${PN}-lib = "${libdir}/lib*.so.*"
66RRECOMMENDS_${PN}-lib = "${PN}"
67FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
68
69pkg_postinst_dbus() {
70 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
71 /etc/init.d/populate-volatile.sh update
72 fi
73}
74
75EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
76EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch"
77# TODO: would like to --enable-systemd but that's a circular build-dependency
78# between systemd<->dbus
79EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
80
81EXTRA_OECONF = "--disable-tests \
82 --disable-checks \
83 --disable-xml-docs \
84 --disable-doxygen-docs \
85 --disable-libaudit \
86 --with-xml=expat \
87 --disable-systemd \
88 ${EXTRA_OECONF_SYSTEMD} \
89 ${EXTRA_OECONF_X}"
90
91do_install() {
92 autotools_do_install
93
94 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
95 install -d ${D}${sysconfdir}/init.d
96 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
97 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
98 fi
99
100 install -d ${D}${sysconfdir}/default/volatiles
101 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
102 > ${D}${sysconfdir}/default/volatiles/99_dbus
103
104
105 mkdir -p ${D}${localstatedir}/lib/dbus
106
107 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
108
109 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
110 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
111
112 # Remove Red Hat initscript
113 rm -rf ${D}${sysconfdir}/rc.d
114
115 # Remove empty testexec directory as we don't build tests
116 rm -rf ${D}${libdir}/dbus-1.0/test
117
118 # Remove /var/run as it is created on startup
119 rm -rf ${D}${localstatedir}/run
120}
121
122do_install_class-native() {
123 autotools_do_install
124
125 # for dbus-glib-native introspection generation
126 install -d ${STAGING_DATADIR_NATIVE}/dbus/
127 # N.B. is below install actually required?
128 install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
129
130 # dbus-glib-native and dbus-glib need this xml file
131 ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
132
133 # dbus-launch has no X support so lets not install it in case the host
134 # has a more featured and useful version
135 rm -f ${D}${bindir}/dbus-launch
136}
137
138do_install_class-nativesdk() {
139 autotools_do_install
140
141 # dbus-launch has no X support so lets not install it in case the host
142 # has a more featured and useful version
143 rm -f ${D}${bindir}/dbus-launch
144
145 # Remove /var/run to avoid QA error
146 rm -rf ${D}${localstatedir}/run
147}
148BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus/dbus_1.6.10.bb b/meta/recipes-core/dbus/dbus_1.6.10.bb
new file mode 100644
index 0000000000..5b8220c8ff
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.6.10.bb
@@ -0,0 +1,6 @@
1include dbus.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
6SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0001-urandom-xauth-changes-to-options.h.patch
new file mode 100644
index 0000000000..71a4666b5c
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0001-urandom-xauth-changes-to-options.h.patch
@@ -0,0 +1,23 @@
1Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
2
3Upstream-Status: Inappropriate [configuration]
4---
5 options.h | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8diff --git a/options.h b/options.h
9index 7d06322..71a21c2 100644
10--- a/options.h
11+++ b/options.h
12@@ -247,7 +247,7 @@ much traffic. */
13 /* The command to invoke for xauth when using X11 forwarding.
14 * "-q" for quiet */
15 #ifndef XAUTH_COMMAND
16-#define XAUTH_COMMAND "/usr/bin/X11/xauth -q"
17+#define XAUTH_COMMAND "xauth -q"
18 #endif
19
20 /* if you want to enable running an sftp server (such as the one included with
21--
221.7.11.7
23
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0002-static_build_fix.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0002-static_build_fix.patch
new file mode 100644
index 0000000000..552bee8996
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0002-static_build_fix.patch
@@ -0,0 +1,64 @@
1Subject: [PATCH 2/6] static_build_fix
2Upstream-Status: Submitted
3
4dropbear: fix static build
5
6A more appropriate fix is to remove @CRYPTLIB@ from the objs
7line, since it will cause problems with target checking,
8this change also meets the goals of the orignal change which
9was to not link libcrypt to all binaries.
10
11svr-authpasswd.o: In function `svr_auth_password':
12svr-authpasswd.c:(.text+0xfc): undefined reference to `crypt'
13collect2: ld returned 1 exit status
14
15Signed-off-by: Saul Wold <sgw@linux.intel.com>
16---
17 Makefile.in | 11 +++++++----
18 1 file changed, 7 insertions(+), 4 deletions(-)
19
20diff --git a/Makefile.in b/Makefile.in
21index 4bdd845..e82e561 100644
22--- a/Makefile.in
23+++ b/Makefile.in
24@@ -56,7 +56,7 @@ HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \
25 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
26 listener.h fake-rfc2553.h
27
28-dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) @CRYPTLIB@
29+dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS)
30 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
31 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
32 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
33@@ -158,7 +158,10 @@ dbclient: $(dbclientobjs)
34 dropbearkey: $(dropbearkeyobjs)
35 dropbearconvert: $(dropbearconvertobjs)
36
37-dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
38+dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile
39+ $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS) @CRYPTLIB@
40+
41+dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
42 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
43
44 # scp doesn't use the libs so is special.
45@@ -169,14 +172,14 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
46 # multi-binary compilation.
47 MULTIOBJS=
48 ifeq ($(MULTI),1)
49- MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) @CRYPTLIB@
50+ MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs)))
51 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
52 endif
53
54 dropbearmulti: multilink
55
56 multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
57- $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
58+ $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) @CRYPTLIB@
59
60 multilink: multibinary $(addprefix link, $(PROGRAMS))
61
62--
631.7.11.7
64
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0003-configure.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0003-configure.patch
new file mode 100644
index 0000000000..2baf665ae4
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0003-configure.patch
@@ -0,0 +1,40 @@
1From c5f5c5054c1b15539dccf866e2c3faba7ed68456 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
3Date: Thu, 25 Apr 2013 00:27:25 +0200
4Subject: [PATCH 3/6] configure
5
6---
7 configure.ac | 11 ++++++++---
8 1 file changed, 8 insertions(+), 3 deletions(-)
9
10diff --git a/configure.ac b/configure.ac
11index 05461f3..9c16d90 100644
12--- a/configure.ac
13+++ b/configure.ac
14@@ -166,15 +166,20 @@ AC_ARG_ENABLE(openpty,
15 AC_MSG_NOTICE(Not using openpty)
16 else
17 AC_MSG_NOTICE(Using openpty if available)
18- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)])
19+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes])
20 fi
21 ],
22 [
23 AC_MSG_NOTICE(Using openpty if available)
24- AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)])
25+ AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes])
26 ]
27 )
28-
29+
30+if test "x$dropbear_cv_func_have_openpty" = "xyes"; then
31+ AC_DEFINE(HAVE_OPENPTY,,Have openpty() function)
32+ no_ptc_check=yes
33+ no_ptmx_check=yes
34+fi
35
36 AC_ARG_ENABLE(syslog,
37 [ --disable-syslog Don't include syslog support],
38--
391.7.11.7
40
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0004-fix-2kb-keys.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0004-fix-2kb-keys.patch
new file mode 100644
index 0000000000..7539d2034f
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0004-fix-2kb-keys.patch
@@ -0,0 +1,22 @@
1Subject: [PATCH 4/6] fix 2kb keys
2
3Upstream-Status: Inappropriate [configuration]
4---
5 kex.h | 2 +-
6 1 file changed, 1 insertion(+), 1 deletion(-)
7
8diff --git a/kex.h b/kex.h
9index 72430e9..375c677 100644
10--- a/kex.h
11+++ b/kex.h
12@@ -67,6 +67,6 @@ struct KEXState {
13 };
14
15
16-#define MAX_KEXHASHBUF 2000
17+#define MAX_KEXHASHBUF 3000
18
19 #endif /* _KEX_H_ */
20--
211.7.11.7
22
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0005-dropbear-enable-pam.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0005-dropbear-enable-pam.patch
new file mode 100644
index 0000000000..e9307339ce
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0005-dropbear-enable-pam.patch
@@ -0,0 +1,31 @@
1Subject: [PATCH 5/6] dropbear enable pam
2
3dropbear: We need modify file option.h besides enabling pam in \
4configure if we want dropbear to support pam.
5
6Upstream-Status: Pending
7
8Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
9---
10 options.h | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/options.h b/options.h
14index 71a21c2..305f789 100644
15--- a/options.h
16+++ b/options.h
17@@ -174,9 +174,9 @@ much traffic. */
18 * PAM challenge/response.
19 * You can't enable both PASSWORD and PAM. */
20
21-#define ENABLE_SVR_PASSWORD_AUTH
22+//#define ENABLE_SVR_PASSWORD_AUTH
23 /* PAM requires ./configure --enable-pam */
24-//#define ENABLE_SVR_PAM_AUTH
25+#define ENABLE_SVR_PAM_AUTH
26 #define ENABLE_SVR_PUBKEY_AUTH
27
28 /* Whether to take public key options in
29--
301.7.11.7
31
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0006-dropbear-configuration-file.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0006-dropbear-configuration-file.patch
new file mode 100644
index 0000000000..7e38663981
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0006-dropbear-configuration-file.patch
@@ -0,0 +1,28 @@
1Subject: [PATCH 6/6] dropbear configuration file
2
3dropbear: Change the path ("/etc/pam.d/sshd" as default) to find a pam configuration file \
4to "/etc/pam.d/dropbear for dropbear when enabling pam supporting"
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
9---
10 svr-authpam.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/svr-authpam.c b/svr-authpam.c
14index e84f076..e28be7d 100644
15--- a/svr-authpam.c
16+++ b/svr-authpam.c
17@@ -195,7 +195,7 @@ void svr_auth_pam() {
18 userData.passwd = password;
19
20 /* Init pam */
21- if ((rc = pam_start("sshd", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
22+ if ((rc = pam_start("dropbear", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
23 dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s\n",
24 rc, pam_strerror(pamHandlep, rc));
25 goto cleanup;
26--
271.7.11.7
28
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/0007-dropbear-fix-for-x32-abi.patch b/meta/recipes-core/dropbear/dropbear-2013.58/0007-dropbear-fix-for-x32-abi.patch
new file mode 100644
index 0000000000..b4501211c3
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/0007-dropbear-fix-for-x32-abi.patch
@@ -0,0 +1,140 @@
1Upstream-Status: Pending
2
3The dropbearkey utility built in x32 abi format, when generating ssh
4keys, was getting lost in the infinite loop.
5
6This patch fixes the issue by fixing types of variables and
7parameters of functions used in the code, which were getting
8undesired size, when compiled with the x32 abi toolchain.
9
102013/05/23
11Received this fix from H J Lu.
12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
14
15# HG changeset patch
16# User H.J. Lu <hjl.tools@gmail.com>
17# Date 1369344079 25200
18# Node ID a10a1c46b857cc8a3923c3bb6d1504aa25b6052f
19# Parent e76614145aea67f66e4a4257685c771efba21aa1
20Typdef mp_digit to unsigned long long for MP_64BIT
21
22When GCC is used with MP_64BIT, we should typedef mp_digit to unsigned
23long long instead of unsigned long since for x32, unsigned long is
2432-bit and unsigned long long is 64-bit and it is safe to use unsigned
25long long for 64-bit integer with GCC.
26
27diff -r e76614145aea -r a10a1c46b857 libtommath/tommath.h
28--- a/libtommath/tommath.h Thu Apr 18 22:57:47 2013 +0800
29+++ b/libtommath/tommath.h Thu May 23 14:21:19 2013 -0700
30@@ -73,7 +73,7 @@
31 typedef signed long long long64;
32 #endif
33
34- typedef unsigned long mp_digit;
35+ typedef unsigned long long mp_digit;
36 typedef unsigned long mp_word __attribute__ ((mode(TI)));
37
38 #define DIGIT_BIT 60
39# HG changeset patch
40# User H.J. Lu <hjl.tools@gmail.com>
41# Date 1369344241 25200
42# Node ID c7555a4cb7ded3a88409ba85f4027baa7af5f536
43# Parent a10a1c46b857cc8a3923c3bb6d1504aa25b6052f
44Cast to mp_digit when updating *rho
45
46There is
47
48int
49mp_montgomery_setup (mp_int * n, mp_digit * rho)
50
51We should cast to mp_digit instead of unsigned long when updating
52*rho since mp_digit may be unsigned long long and unsigned long long
53may be different from unsigned long, like in x32.
54
55diff -r a10a1c46b857 -r c7555a4cb7de libtommath/bn_mp_montgomery_setup.c
56--- a/libtommath/bn_mp_montgomery_setup.c Thu May 23 14:21:19 2013 -0700
57+++ b/libtommath/bn_mp_montgomery_setup.c Thu May 23 14:24:01 2013 -0700
58@@ -48,7 +48,7 @@
59 #endif
60
61 /* rho = -1/m mod b */
62- *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
63+ *rho = (mp_digit)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
64
65 return MP_OKAY;
66 }
67# HG changeset patch
68# User H.J. Lu <hjl.tools@gmail.com>
69# Date 1369344541 25200
70# Node ID 7c656e7071a6412688b2f30a529a9afac6c7bf5a
71# Parent c7555a4cb7ded3a88409ba85f4027baa7af5f536
72Define LTC_FAST_TYPE to unsigned long long for __x86_64__
73
74We should define LTC_FAST_TYPE to unsigned long long instead of unsigned
75long if __x86_64__ to support x32 where unsigned long long is 64-bit
76and unsigned long is 32-bit.
77
78diff -r c7555a4cb7de -r 7c656e7071a6 libtomcrypt/src/headers/tomcrypt_cfg.h
79--- a/libtomcrypt/src/headers/tomcrypt_cfg.h Thu May 23 14:24:01 2013 -0700
80+++ b/libtomcrypt/src/headers/tomcrypt_cfg.h Thu May 23 14:29:01 2013 -0700
81@@ -74,7 +74,7 @@
82 #define ENDIAN_LITTLE
83 #define ENDIAN_64BITWORD
84 #define LTC_FAST
85- #define LTC_FAST_TYPE unsigned long
86+ #define LTC_FAST_TYPE unsigned long long
87 #endif
88
89 /* detect PPC32 */
90# HG changeset patch
91# User H.J. Lu <hjl.tools@gmail.com>
92# Date 1369344730 25200
93# Node ID a7d4690158fae4ede2c4e5b56233e83730bf38ee
94# Parent 7c656e7071a6412688b2f30a529a9afac6c7bf5a
95Use unsigned long long aas unsigned 64-bit integer for x86-64 GCC
96
97We should use unsigned long long instead of unsigned long as unsigned
9864-bit integer for x86-64 GCC to support x32 where unsigned long is
9932-bit.
100
101diff -r 7c656e7071a6 -r a7d4690158fa libtomcrypt/src/headers/tomcrypt_macros.h
102--- a/libtomcrypt/src/headers/tomcrypt_macros.h Thu May 23 14:29:01 2013 -0700
103+++ b/libtomcrypt/src/headers/tomcrypt_macros.h Thu May 23 14:32:10 2013 -0700
104@@ -343,7 +343,7 @@
105 /* 64-bit Rotates */
106 #if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
107
108-static inline unsigned long ROL64(unsigned long word, int i)
109+static inline unsigned long long ROL64(unsigned long long word, int i)
110 {
111 asm("rolq %%cl,%0"
112 :"=r" (word)
113@@ -351,7 +351,7 @@
114 return word;
115 }
116
117-static inline unsigned long ROR64(unsigned long word, int i)
118+static inline unsigned long long ROR64(unsigned long long word, int i)
119 {
120 asm("rorq %%cl,%0"
121 :"=r" (word)
122@@ -361,7 +361,7 @@
123
124 #ifndef LTC_NO_ROLC
125
126-static inline unsigned long ROL64c(unsigned long word, const int i)
127+static inline unsigned long long ROL64c(unsigned long long word, const int i)
128 {
129 asm("rolq %2,%0"
130 :"=r" (word)
131@@ -369,7 +369,7 @@
132 return word;
133 }
134
135-static inline unsigned long ROR64c(unsigned long word, const int i)
136+static inline unsigned long long ROR64c(unsigned long long word, const int i)
137 {
138 asm("rorq %2,%0"
139 :"=r" (word)
140
diff --git a/meta/recipes-core/dropbear/dropbear-2013.58/build_test.patch b/meta/recipes-core/dropbear/dropbear-2013.58/build_test.patch
new file mode 100644
index 0000000000..6f828cfc51
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear-2013.58/build_test.patch
@@ -0,0 +1,229 @@
1Fix various linkage errors for LibTomCrypt library in order to run tests
2using ANSI-C PRNG algorithm. Also check that XCLOCKS_PER_SEC is larger than 1000000
3so that there may be a valid PRNG (Pseudo Random Number Generator).
4Customize the tests output to be ptest-compliant <result: testname>.
5
6Upstream-Status: Pending
7Signed-off-by: Dorin Gheorghe<dorin.gheorghe@enea.com>
8
9diff -Naur dropbear-2012.55/libtomcrypt/Makefile.in dropbear-2012.55.modified/libtomcrypt/Makefile.in
10--- dropbear-2012.55/libtomcrypt/Makefile.in 2013-04-16 14:20:45.270448945 +0200
11+++ dropbear-2012.55.modified/libtomcrypt/Makefile.in 2013-04-16 11:00:06.517614900 +0200
12@@ -19,7 +19,7 @@
13
14 # Compilation flags. Note the += does not write over the user's CFLAGS!
15 # The rest of the flags come from the parent Dropbear makefile
16-CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../
17+CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -I./testprof
18
19 # additional warnings (newer GCC 3.4 and higher)
20 ifdef GCC_34
21@@ -175,6 +175,7 @@
22 MULTIS=demos/multi.o
23 TIMINGS=demos/timing.o
24 TESTS=demos/test.o
25+YARROW=src/prngs/yarrow.o src/prngs/rng_make_prng.o src/prngs/rng_get_bytes.o
26
27 #Files left over from making the crypt.pdf.
28 LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out
29@@ -227,8 +228,8 @@
30 timing: library testprof/$(LIBTEST) $(TIMINGS)
31 $(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
32
33-test: library testprof/$(LIBTEST) $(TESTS)
34- $(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
35+test: library testprof/$(LIBTEST) $(TESTS) $(YARROW)
36+ $(CC) $(LDFLAGS) $(TESTS) $(YARROW) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
37
38 #This rule installs the library and the header files. This must be run
39 #as root in order to have a high enough permission to write to the correct
40diff -Naur dropbear-2012.55/libtomcrypt/demos/test.c dropbear-2012.55.modified/libtomcrypt/demos/test.c
41--- dropbear-2012.55/libtomcrypt/demos/test.c 2012-02-23 14:47:05.000000000 +0100
42+++ dropbear-2012.55.modified/libtomcrypt/demos/test.c 2013-04-18 14:30:44.519839797 +0200
43@@ -12,21 +12,21 @@
44 #elif defined(USE_GMP)
45 ltc_mp = gmp_desc;
46 #else
47- extern ltc_math_descriptor EXT_MATH_LIB;
48+ ltc_math_descriptor EXT_MATH_LIB;
49 ltc_mp = EXT_MATH_LIB;
50 #endif
51
52 printf("build == \n%s\n", crypt_build_settings);
53- printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
54- printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
55- printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
56- printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
57- printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
58- printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
59- printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
60- printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
61- printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
62- printf("\nkatja_test...."); fflush(stdout); x = katja_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
63+ fflush(stdout); x = store_test(); printf(x ? "FAIL: " : "PASS: "); printf("store_test\n"); if (x) exit(EXIT_FAILURE);
64+ fflush(stdout); x = cipher_hash_test(); printf(x ? "FAIL: " : "PASS: "); printf("cipher_test\n"); if (x) exit(EXIT_FAILURE);
65+ fflush(stdout); x = modes_test(); printf(x ? "FAIL: " : "PASS: "); printf("modes_test\n"); if (x) exit(EXIT_FAILURE);
66+ fflush(stdout); x = der_tests(); printf(x ? "FAIL: " : "PASS: "); printf("der_test\n"); if (x) exit(EXIT_FAILURE);
67+ fflush(stdout); x = mac_test(); printf(x ? "FAIL: " : "PASS: "); printf("mac_test\n"); if (x) exit(EXIT_FAILURE);
68+ fflush(stdout); x = pkcs_1_test(); printf(x ? "FAIL: " : "PASS: "); printf("pkcs_1_test\n"); if (x) exit(EXIT_FAILURE);
69+ fflush(stdout); x = rsa_test(); printf(x ? "FAIL: " : "PASS: "); printf("rsa_test\n"); if (x) exit(EXIT_FAILURE);
70+ fflush(stdout); x = ecc_tests(); printf(x ? "FAIL: " : "PASS: "); printf("ecc_test\n"); if (x) exit(EXIT_FAILURE);
71+ fflush(stdout); x = dsa_test(); printf(x ? "FAIL: " : "PASS: "); printf("dsa_test\n"); if (x) exit(EXIT_FAILURE);
72+ fflush(stdout); x = katja_test(); printf(x ? "FAIL: " : "PASS: "); printf("katja_test\n"); if (x) exit(EXIT_FAILURE);
73 printf("\n");
74 return EXIT_SUCCESS;
75 }
76diff -Naur dropbear-2012.55/libtomcrypt/src/ciphers/des.c dropbear-2012.55.modified/libtomcrypt/src/ciphers/des.c
77--- dropbear-2012.55/libtomcrypt/src/ciphers/des.c 2012-02-23 14:47:05.000000000 +0100
78+++ dropbear-2012.55.modified/libtomcrypt/src/ciphers/des.c 2013-04-16 11:05:46.171309548 +0200
79@@ -20,7 +20,7 @@
80 #define EN0 0
81 #define DE1 1
82
83-#if 0
84+#if 1
85 const struct ltc_cipher_descriptor des_desc =
86 {
87 "des",
88@@ -1520,7 +1520,7 @@
89 }
90 #endif
91
92-#if 0
93+#if 1
94 /**
95 Initialize the DES block cipher
96 @param key The symmetric key you wish to pass
97@@ -1581,7 +1581,7 @@
98 return CRYPT_OK;
99 }
100
101-#if 0
102+#if 1
103 /**
104 Encrypts a block of text with DES
105 @param pt The input plaintext (8 bytes)
106@@ -1672,7 +1672,7 @@
107 return CRYPT_OK;
108 }
109
110-#if 0
111+#if 1
112 /**
113 Performs a self-test of the DES block cipher
114 @return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled
115@@ -1857,7 +1857,7 @@
116 #endif
117 }
118
119-#if 0
120+#if 1
121 /** Terminate the context
122 @param skey The scheduled key
123 */
124@@ -1874,7 +1874,7 @@
125 }
126
127
128-#if 0
129+#if 1
130 /**
131 Gets suitable key size
132 @param keysize [in/out] The length of the recommended key (in bytes). This function will store the suitable size back in this variable.
133diff -Naur dropbear-2012.55/libtomcrypt/src/headers/tomcrypt_cipher.h dropbear-2012.55.modified/libtomcrypt/src/headers/tomcrypt_cipher.h
134--- dropbear-2012.55/libtomcrypt/src/headers/tomcrypt_cipher.h 2012-02-23 14:47:05.000000000 +0100
135+++ dropbear-2012.55.modified/libtomcrypt/src/headers/tomcrypt_cipher.h 2013-04-16 10:41:21.916943343 +0200
136@@ -187,6 +187,7 @@
137 void *data;
138 } symmetric_key;
139
140+#define LTC_ECB_MODE
141 #ifdef LTC_ECB_MODE
142 /** A block cipher ECB structure */
143 typedef struct {
144diff -Naur dropbear-2012.55/libtomcrypt/src/headers/tomcrypt_custom.h dropbear-2012.55.modified/libtomcrypt/src/headers/tomcrypt_custom.h
145--- dropbear-2012.55/libtomcrypt/src/headers/tomcrypt_custom.h 2012-02-23 14:47:05.000000000 +0100
146+++ dropbear-2012.55.modified/libtomcrypt/src/headers/tomcrypt_custom.h 2013-04-16 14:02:10.794122645 +0200
147@@ -72,13 +72,15 @@
148
149 /* Enable self-test test vector checking */
150 /* Not for dropbear */
151-/*#define LTC_TEST*/
152+#define LTC_TEST
153+
154+#define YARROW
155
156 /* clean the stack of functions which put private information on stack */
157 /* #define LTC_CLEAN_STACK */
158
159 /* disable all file related functions */
160-#define LTC_NO_FILE
161+//#define LTC_NO_FILE
162
163 /* disable all forms of ASM */
164 /* #define LTC_NO_ASM */
165diff -Naur dropbear-2012.55/libtomcrypt/src/misc/crypt/crypt.c dropbear-2012.55.modified/libtomcrypt/src/misc/crypt/crypt.c
166--- dropbear-2012.55/libtomcrypt/src/misc/crypt/crypt.c 2012-02-23 14:47:06.000000000 +0100
167+++ dropbear-2012.55.modified/libtomcrypt/src/misc/crypt/crypt.c 2013-04-16 10:46:33.359842595 +0200
168@@ -15,7 +15,6 @@
169 Build strings, Tom St Denis
170 */
171
172-/*
173 const char *crypt_build_settings =
174 "LibTomCrypt " SCRYPT " (Tom St Denis, tomstdenis@gmail.com)\n"
175 "LibTomCrypt is public domain software.\n"
176@@ -358,7 +357,7 @@
177 "\n"
178 "\n\n\n"
179 ;
180- */
181+
182
183
184 /* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt.c,v $ */
185diff -Naur dropbear-2012.55/libtomcrypt/src/prngs/rng_get_bytes.c dropbear-2012.55.modified/libtomcrypt/src/prngs/rng_get_bytes.c
186--- dropbear-2012.55/libtomcrypt/src/prngs/rng_get_bytes.c 2012-02-23 14:47:06.000000000 +0100
187+++ dropbear-2012.55.modified/libtomcrypt/src/prngs/rng_get_bytes.c 2013-04-18 14:20:03.974930313 +0200
188@@ -60,7 +60,7 @@
189 clock_t t1;
190 int l, acc, bits, a, b;
191
192- if (XCLOCKS_PER_SEC < 100 || XCLOCKS_PER_SEC > 10000) {
193+ if (XCLOCKS_PER_SEC < 100 || XCLOCKS_PER_SEC > 1000000) {
194 return 0;
195 }
196
197diff -Naur dropbear-2012.55/libtomcrypt/testprof/cipher_hash_test.c dropbear-2012.55.modified/libtomcrypt/testprof/cipher_hash_test.c
198--- dropbear-2012.55/libtomcrypt/testprof/cipher_hash_test.c 2012-02-23 14:47:06.000000000 +0100
199+++ dropbear-2012.55.modified/libtomcrypt/testprof/cipher_hash_test.c 2013-04-16 14:08:22.042234657 +0200
200@@ -11,6 +11,8 @@
201
202 /* test ciphers */
203 for (x = 0; cipher_descriptor[x].name != NULL; x++) {
204+ /* md5 test is failing with segfault */
205+ if (!strcmp(cipher_descriptor[x].name, "md5")) break;
206 DO(cipher_descriptor[x].test());
207 }
208
209diff -Naur dropbear-2012.55/libtomcrypt/testprof/makefile dropbear-2012.55.modified/libtomcrypt/testprof/makefile
210--- dropbear-2012.55/libtomcrypt/testprof/makefile 2012-02-23 14:47:06.000000000 +0100
211+++ dropbear-2012.55.modified/libtomcrypt/testprof/makefile 2013-04-16 10:35:21.200110690 +0200
212@@ -1,4 +1,4 @@
213-CFLAGS += -I../src/headers -I./ -Wall -W
214+CFLAGS += -I../src/headers -I./ -I./../../ -Wall -W
215
216 # ranlib tools
217 ifndef RANLIB
218diff -Naur dropbear-2012.55/libtomcrypt/testprof/modes_test.c dropbear-2012.55.modified/libtomcrypt/testprof/modes_test.c
219--- dropbear-2012.55/libtomcrypt/testprof/modes_test.c 2012-02-23 14:47:06.000000000 +0100
220+++ dropbear-2012.55.modified/libtomcrypt/testprof/modes_test.c 2013-04-16 10:50:53.820882559 +0200
221@@ -1,6 +1,8 @@
222 /* test CFB/OFB/CBC modes */
223 #include <tomcrypt_test.h>
224
225+extern unsigned long yarrow_read(unsigned char *out, unsigned long outlen, prng_state *prng);
226+
227 int modes_test(void)
228 {
229 unsigned char pt[64], ct[64], tmp[64], key[16], iv[16], iv2[16];
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
new file mode 100644
index 0000000000..1bdd4cbf86
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -0,0 +1,104 @@
1DESCRIPTION = "Dropbear is a lightweight SSH and SCP implementation"
2HOMEPAGE = "http://matt.ucc.asn.au/dropbear/dropbear.html"
3SECTION = "console/network"
4
5INC_PR = "r1"
6
7# some files are from other projects and have others license terms:
8# public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=3a5b0c2f0d0c49dfde9558ae2036683c"
11
12DEPENDS = "zlib"
13RPROVIDES_${PN} = "ssh sshd"
14
15DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
16
17SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
18 file://0001-urandom-xauth-changes-to-options.h.patch \
19 file://0002-static_build_fix.patch \
20 file://0003-configure.patch \
21 file://0004-fix-2kb-keys.patch \
22 file://0007-dropbear-fix-for-x32-abi.patch \
23 file://build_test.patch \
24 file://init \
25 file://run-ptest \
26 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
27
28PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
29 file://0006-dropbear-configuration-file.patch \
30 file://dropbear"
31
32inherit autotools update-rc.d
33
34RDEPENDS_${PN}-ptest += "make"
35
36INITSCRIPT_NAME = "dropbear"
37INITSCRIPT_PARAMS = "defaults 10"
38
39CFLAGS_prepend = " -I. "
40LD = "${CC}"
41
42SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
43BINCOMMANDS = "dbclient ssh scp"
44EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
45EXTRA_OECONF += "\
46 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
47CFLAGS += "-DSFTPSERVER_PATH=\\"${libdir}/openssh/sftp-server\\""
48
49do_install() {
50 install -d ${D}${sysconfdir} \
51 ${D}${sysconfdir}/init.d \
52 ${D}${sysconfdir}/default \
53 ${D}${sysconfdir}/dropbear \
54 ${D}${bindir} \
55 ${D}${sbindir} \
56 ${D}${localstatedir}
57
58 install -m 0755 dropbearmulti ${D}${sbindir}/
59 ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
60
61 for i in ${SBINCOMMANDS}
62 do
63 ln -s ./dropbearmulti ${D}${sbindir}/$i
64 done
65 cat ${WORKDIR}/init | sed -e 's,/etc,${sysconfdir},g' \
66 -e 's,/usr/sbin,${sbindir},g' \
67 -e 's,/var,${localstatedir},g' \
68 -e 's,/usr/bin,${bindir},g' \
69 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
70 chmod 755 ${D}${sysconfdir}/init.d/dropbear
71 for i in ${DISTRO_FEATURES};
72 do
73 if [ ${i} = "pam" ]; then
74 install -d ${D}${sysconfdir}/pam.d
75 install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
76 fi
77 done
78
79}
80
81inherit update-alternatives
82
83ALTERNATIVE_PRIORITY = "20"
84ALTERNATIVE_${PN} = "scp ssh"
85
86ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
87
88do_compile_ptest () {
89 oe_runmake dropbear
90 oe_runmake -C libtomcrypt test
91}
92
93do_install_ptest () {
94 install -D libtomcrypt/test ${D}${PTEST_PATH}/libtomcrypt/test
95}
96
97pkg_postrm_append_${PN} () {
98 if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
99 rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
100 fi
101 if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then
102 rm ${sysconfdir}/dropbear/dropbear_dss_host_key
103 fi
104}
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear b/meta/recipes-core/dropbear/dropbear/dropbear
new file mode 100644
index 0000000000..47e787fb10
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear
@@ -0,0 +1,4 @@
1#%PAM-1.0
2
3auth include common-auth
4account include common-account
diff --git a/meta/recipes-core/dropbear/dropbear/init b/meta/recipes-core/dropbear/dropbear/init
new file mode 100755
index 0000000000..e8fed3f94d
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/init
@@ -0,0 +1,113 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: sshd
4# Required-Start: $remote_fs $syslog $networking
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 1
8# Short-Description: Dropbear Secure Shell server
9### END INIT INFO
10#
11# Do not configure this file. Edit /etc/default/dropbear instead!
12#
13
14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15DAEMON=/usr/sbin/dropbear
16NAME=dropbear
17DESC="Dropbear SSH server"
18PIDFILE=/var/run/dropbear.pid
19
20DROPBEAR_PORT=22
21DROPBEAR_EXTRA_ARGS=
22NO_START=0
23
24set -e
25
26test ! -r /etc/default/dropbear || . /etc/default/dropbear
27test "$NO_START" = "0" || exit 0
28test -x "$DAEMON" || exit 0
29test ! -h /var/service/dropbear || exit 0
30
31readonly_rootfs=0
32for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' </proc/mounts`; do
33 case $flag in
34 ro)
35 readonly_rootfs=1
36 ;;
37 esac
38done
39
40if [ $readonly_rootfs = "1" ]; then
41 mkdir -p /var/lib/dropbear
42 DROPBEAR_RSAKEY_DEFAULT="/var/lib/dropbear/dropbear_rsa_host_key"
43 DROPBEAR_DSSKEY_DEFAULT="/var/lib/dropbear/dropbear_dss_host_key"
44else
45 DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
46 DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
47fi
48
49test -z "$DROPBEAR_BANNER" || \
50 DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
51test -n "$DROPBEAR_RSAKEY" || \
52 DROPBEAR_RSAKEY=$DROPBEAR_RSAKEY_DEFAULT
53test -n "$DROPBEAR_DSSKEY" || \
54 DROPBEAR_DSSKEY=$DROPBEAR_DSSKEY_DEFAULT
55test -n "$DROPBEAR_KEYTYPES" || \
56 DROPBEAR_KEYTYPES="rsa"
57
58gen_keys() {
59for t in $DROPBEAR_KEYTYPES; do
60 case $t in
61 rsa)
62 if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
63 rm $DROPBEAR_RSAKEY || true
64 fi
65 test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY
66 ;;
67 dsa)
68 if [ -f "$DROPBEAR_DSSKEY" -a ! -s "$DROPBEAR_DSSKEY" ]; then
69 rm $DROPBEAR_DSSKEY || true
70 fi
71 test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY
72 ;;
73 esac
74done
75}
76
77case "$1" in
78 start)
79 echo -n "Starting $DESC: "
80 gen_keys
81 KEY_ARGS=""
82 test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
83 test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
84 start-stop-daemon -S -p $PIDFILE \
85 -x "$DAEMON" -- $KEY_ARGS \
86 -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
87 echo "$NAME."
88 ;;
89 stop)
90 echo -n "Stopping $DESC: "
91 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
92 echo "$NAME."
93 ;;
94 restart|force-reload)
95 echo -n "Restarting $DESC: "
96 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
97 sleep 1
98 KEY_ARGS=""
99 test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
100 test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
101 start-stop-daemon -S -p $PIDFILE \
102 -x "$DAEMON" -- $KEY_ARGS \
103 -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
104 echo "$NAME."
105 ;;
106 *)
107 N=/etc/init.d/$NAME
108 echo "Usage: $N {start|stop|restart|force-reload}" >&2
109 exit 1
110 ;;
111esac
112
113exit 0
diff --git a/meta/recipes-core/dropbear/dropbear/run-ptest b/meta/recipes-core/dropbear/dropbear/run-ptest
new file mode 100644
index 0000000000..61f1e0c0dd
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2cd libtomcrypt; ./test 2>&1 | sed 's/NOPPASS/SKIP/'
diff --git a/meta/recipes-core/dropbear/dropbear_2013.58.bb b/meta/recipes-core/dropbear/dropbear_2013.58.bb
new file mode 100644
index 0000000000..99a24a713f
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear_2013.58.bb
@@ -0,0 +1,6 @@
1require dropbear.inc
2
3SRC_URI[md5sum] = "8d3579bbbfcea48404a3219643076450"
4SRC_URI[sha256sum] = "d866189b1d14e15353aeb4feb616f6132a63ea7c25ca8aa12b63a3a397822e55"
5
6PR = "${INC_PR}.0"
diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.17.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.17.bb
new file mode 100644
index 0000000000..1d3c22bf57
--- /dev/null
+++ b/meta/recipes-core/eglibc/cross-localedef-native_2.17.bb
@@ -0,0 +1,49 @@
1DESCRIPTION = "Cross locale generation tool for eglibc"
2HOMEPAGE = "http://www.eglibc.org/home"
3SECTION = "libs"
4LICENSE = "LGPL-2.1"
5
6LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc"
7LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
8 file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \
9 file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
10 file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
11
12
13inherit native
14inherit autotools
15
16# pick up an eglibc patch
17FILESPATH = "${FILE_DIRNAME}/eglibc-${PV}"
18
19SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr22064.tar.bz2 \
20 file://fix_for_centos_5.8.patch;patchdir=.. \
21 "
22SRC_URI[md5sum] = "1464af54779c2c7d1078df9ce2e41791"
23SRC_URI[sha256sum] = "97c3991a3772f513cf704841d20c275ac48895fad2e27802dda557c0196cba6b"
24
25S = "${WORKDIR}/eglibc-${PV}/localedef"
26
27do_unpack_append() {
28 bb.build.exec_func('do_move_ports', d)
29}
30
31do_move_ports() {
32 if test -d ${WORKDIR}/eglibc-${PV}/ports ; then
33 rm -rf ${WORKDIR}/libc/ports
34 mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/
35 fi
36}
37
38EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc"
39CFLAGS += "-DNOT_IN_libc=1"
40
41do_configure () {
42 ${S}/configure ${EXTRA_OECONF}
43}
44
45
46do_install() {
47 install -d ${D}${bindir}
48 install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
49}
diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb
new file mode 100644
index 0000000000..62296b5276
--- /dev/null
+++ b/meta/recipes-core/eglibc/cross-localedef-native_2.18.bb
@@ -0,0 +1,49 @@
1DESCRIPTION = "Cross locale generation tool for eglibc"
2HOMEPAGE = "http://www.eglibc.org/home"
3SECTION = "libs"
4LICENSE = "LGPL-2.1"
5
6LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc"
7LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
8 file://${LIC_DIR}/COPYING;md5=393a5ca445f6965873eca0259a17f833 \
9 file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
10 file://${LIC_DIR}/COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
11
12
13inherit native
14inherit autotools
15
16# pick up an eglibc patch
17FILESPATH = "${FILE_DIRNAME}/eglibc-${PV}"
18
19SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23787.tar.bz2 \
20 file://fix_for_centos_5.8.patch;patchdir=.. \
21 "
22SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
23SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
24
25S = "${WORKDIR}/eglibc-${PV}/localedef"
26
27do_unpack_append() {
28 bb.build.exec_func('do_move_ports', d)
29}
30
31do_move_ports() {
32 if test -d ${WORKDIR}/eglibc-${PV}/ports ; then
33 rm -rf ${WORKDIR}/libc/ports
34 mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/
35 fi
36}
37
38EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc"
39CFLAGS += "-DNOT_IN_libc=1"
40
41do_configure () {
42 ${S}/configure ${EXTRA_OECONF}
43}
44
45
46do_install() {
47 install -d ${D}${bindir}
48 install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
49}
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
new file mode 100644
index 0000000000..b4489e9ae9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0001-R_ARM_TLS_DTPOFF32.patch
@@ -0,0 +1,56 @@
1
2Quote from bug 1443 which explains what the patch does :
3
4 We build some random program and link it with -lust. When we run it,
5 it dies with a SIGSEGV before reaching main().
6
7 Libust.so depends on liburcu-bp.so from the usermode-rcu package.
8 Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
9 is critical.
10
11 Libust.so uses a TLS / __thread variable that is defined in liburcu-
12 bp.so. There are special ARM-specific relocation types that allow two
13 shared libraries to share thread-specific data. This is critical too.
14
15 One more critical issue: although liburcu-bp.so is prelinked, we can't
16 load it at its prelinked address, because we also link against
17 librt.so, and librt.so uses that address.
18
19 The dynamic linker is forced to relink liburcu-bp.so at a different
20 address. In the course of relinking, it processes the special ARM
21 relocation record mentioned above. The prelinker has already filled
22 in the information, which is a short offset into a table of thread-
23 specific data that is allocated per-thread for each library that uses
24 TLS. Because the normal behavior of a relocation is to add the symbol
25 value to an addend stored at the address being relocated, we end up
26 adding the short offset to itself, doubling it.
27
28 Now we have an awkward situation. The libust.so library doesn't know
29 about the addend, so its TLS data for this element is correct. The
30 liburcu-bp.so library has a different offset for the element. When we
31 go to initialize the element for the first time in liburcu-bp.so, we
32 write the address of the result at the doubled (broken) offset.
33 Later, when we refer to the address from libust.so, we check the value
34 at the correct offset, but it's NULL, so we eat hot SIGSEGV.
35
36Upstream-Status: Pending
37
38Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
39---
40 .../libc/ports/sysdeps/arm/dl-machine.h | 2 +-
41 1 file changed, 1 insertion(+), 1 deletion(-)
42
43ndex 8d905e8..dcfa71e 100644
44--- libc.orig/ports/sysdeps/arm/dl-machine.h
45+++ libc/ports/sysdeps/arm/dl-machine.h
46@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
47
48 case R_ARM_TLS_DTPOFF32:
49 if (sym != NULL)
50- *reloc_addr += sym->st_value;
51+ *reloc_addr = sym->st_value;
52 break;
53
54 case R_ARM_TLS_TPOFF32:
55--
56
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-menuconfig-support.patch
new file mode 100644
index 0000000000..624392666a
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-menuconfig-support.patch
@@ -0,0 +1,1007 @@
1Pulled from
2http://www.eglibc.org/archives/patches/msg01042.html
3
4Upstream-Status: Pending
5Signed-off-by: Khem
6
7Hi,
8
9This patch adds 'make menuconfig' support to EGLIBC.
10
11
12EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files.
13
14There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile:
15
16- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config.
17
18- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
19
20- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
21
22
23Pre-Processing:
24
25
26The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'.
27
28Post-Processing (libc/options-config/config-postproc.pl):
29
30
31- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header.
32
33- "CONFIG_" prefix is changed back to "OPTION_".
34
35
36- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'.
37
38
39A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds.
40
41libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'.
42
43libc/EGLIBC.option-groups is updated to include new information on the menuconfig support.
44
45Thanks,
46
47attached is the updated patch to address above issues.
48
49Steve
50
51--
52Steve Longerbeam | Senior Embedded Engineer, ESD Services
53Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
54P 510.354.5838 | M 408.410.2735
55Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
56
57
58Index: libc/EGLIBC.cross-building
59===================================================================
60--- libc.orig/EGLIBC.cross-building 2012-08-21 22:25:49.000000000 -0700
61+++ libc/EGLIBC.cross-building 2012-09-05 21:44:09.749577576 -0700
62@@ -243,9 +243,29 @@
63 > $src/libc/configure \
64 > --prefix=/usr \
65 > --with-headers=$sysroot/usr/include \
66+ > --with-kconfig=$obj/linux/scripts/kconfig \
67 > --build=$build \
68 > --host=$target \
69 > --disable-profile --without-gd --without-cvs --enable-add-ons
70+
71+Note the additional '--with-kconfig' option. This tells EGLIBC where to
72+find the host config tools used by the kernel 'make config' and 'make
73+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
74+*config' support, which will create 'option-groups.config' for you.
75+But first make sure those tools have been built by running some
76+dummy 'make *config' calls in the kernel directory:
77+
78+ $ cd $obj/linux
79+ $ PATH=$tools/bin:$PATH make config \
80+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
81+ $ PATH=$tools/bin:$PATH make menuconfig \
82+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
83+
84+Now we can configure and build the full EGLIBC:
85+
86+ $ cd $obj/eglibc
87+ $ PATH=$tools/bin:$PATH make defconfig
88+ $ PATH=$tools/bin:$PATH make menuconfig
89 $ PATH=$tools/bin:$PATH make
90 $ PATH=$tools/bin:$PATH make install install_root=$sysroot
91
92Index: libc/configure.in
93===================================================================
94--- libc.orig/configure.in 2012-09-05 21:40:19.000000000 -0700
95+++ libc/configure.in 2012-09-05 21:44:09.769577577 -0700
96@@ -96,6 +96,16 @@
97 [sysheaders=$withval],
98 [sysheaders=''])
99
100+AC_ARG_WITH([kconfig],
101+ AC_HELP_STRING([--with-kconfig=PATH],
102+ [location of kconfig tools to use (from Linux
103+ kernel builds) to re-use for configuring EGLIBC
104+ option groups]),
105+ [KCONFIG_TOOLS=$withval],
106+ [KCONFIG_TOOLS=''])
107+AC_SUBST(KCONFIG_TOOLS)
108+
109+
110 AC_SUBST(use_default_link)
111 AC_ARG_WITH([default-link],
112 AC_HELP_STRING([--with-default-link],
113Index: libc/config.make.in
114===================================================================
115--- libc.orig/config.make.in 2012-08-21 22:25:55.000000000 -0700
116+++ libc/config.make.in 2012-09-05 21:45:16.253579810 -0700
117@@ -48,6 +48,8 @@
118 c++-sysincludes = @CXX_SYSINCLUDES@
119 all-warnings = @all_warnings@
120
121+kconfig_tools = @KCONFIG_TOOLS@
122+
123 have-z-combreloc = @libc_cv_z_combreloc@
124 have-z-execstack = @libc_cv_z_execstack@
125 have-Bgroup = @libc_cv_Bgroup@
126Index: libc/options-config/config-postproc.pl
127===================================================================
128--- /dev/null 1970-01-01 00:00:00.000000000 +0000
129+++ libc/options-config/config-postproc.pl 2012-09-05 21:44:09.769577577 -0700
130@@ -0,0 +1,54 @@
131+#!/usr/bin/perl
132+
133+$usage = "usage: $0 <default config file> <config file>\n";
134+
135+die "$usage" unless @ARGV;
136+$defaults = shift @ARGV;
137+die "$usage" unless @ARGV;
138+die "Could not open $ARGV[0]" unless -T $ARGV[0];
139+
140+sub yank {
141+ @option = grep($_ ne $_[0], @option);
142+}
143+
144+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
145+
146+# get the full list of available options using the default config file
147+$i = 0;
148+while (<DEFAULTS>) {
149+ if (/^\s*OPTION_(\w+)\s*=/) {
150+ $option[$i++] = $1;
151+ }
152+}
153+
154+# now go through the config file, making the necessary changes
155+while (<>) {
156+ if (/Linux Kernel Configuration/) {
157+ # change title
158+ s/Linux Kernel/Option Groups/;
159+ print;
160+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
161+ # this is an explicit option set line, change CONFIG_ to OPTION_
162+ # before printing and remove this option from option list
163+ $opt = $1;
164+ yank($opt);
165+ s/CONFIG_/OPTION_/g;
166+ print;
167+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
168+ # this is a comment line, change CONFIG_ to OPTION_, remove this
169+ # option from option list, and convert to explicit OPTION_FOO=n
170+ $opt = $1;
171+ yank($opt);
172+ s/CONFIG_/OPTION_/g;
173+ print "OPTION_$opt=n\n";
174+ } else {
175+ print;
176+ }
177+}
178+
179+# any options left in @options, are options that were not mentioned in
180+# the config file, and implicitly that means the option must be set =n,
181+# so do that here.
182+foreach $opt (@option) {
183+ print "OPTION_$opt=n\n";
184+}
185Index: libc/options-config/config-preproc.pl
186===================================================================
187--- /dev/null 1970-01-01 00:00:00.000000000 +0000
188+++ libc/options-config/config-preproc.pl 2012-09-05 21:44:09.769577577 -0700
189@@ -0,0 +1,8 @@
190+#!/usr/bin/perl
191+
192+if (@ARGV) {
193+ while (<>) {
194+ s/OPTION_/CONFIG_/g;
195+ print;
196+ }
197+}
198Index: libc/options-config/Makefile
199===================================================================
200--- /dev/null 1970-01-01 00:00:00.000000000 +0000
201+++ libc/options-config/Makefile 2012-09-05 21:44:09.769577577 -0700
202@@ -0,0 +1,55 @@
203+# ===========================================================================
204+# EGLIBC option-groups configuration targets
205+# These targets are included from top-level makefile
206+
207+ifneq ($(kconfig_tools),)
208+ifneq (no,$(PERL))
209+
210+ocdir := options-config
211+
212+OconfigDefaults := option-groups.defaults
213+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
214+OconfigDef := option-groups.def
215+Oconfig := $(common-objpfx)option-groups.config
216+Oconfig_tmp := $(common-objpfx).tmp.config
217+
218+conf := $(kconfig_tools)/conf
219+mconf := $(kconfig_tools)/mconf
220+
221+preproc := $(PERL) $(ocdir)/config-preproc.pl
222+postproc := $(PERL) $(ocdir)/config-postproc.pl
223+
224+PHONY += defconfig config menuconfig
225+
226+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
227+ rm -f $(OconfigDefaults_tmp)
228+ rm -f $(Oconfig_tmp)
229+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
230+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
231+ $(OconfigDef)
232+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
233+ rm $(Oconfig_tmp)
234+ rm $(OconfigDefaults_tmp)
235+
236+config: $(conf) $(OconfigDefaults) $(OconfigDef)
237+ rm -f $(Oconfig_tmp)
238+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
239+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
240+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
241+ rm $(Oconfig_tmp)
242+
243+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
244+ rm -f $(Oconfig_tmp)
245+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
246+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
247+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
248+ rm $(Oconfig_tmp)
249+
250+# Help text used by make help
251+help:
252+ @echo ' defconfig - New config with default from default config'
253+ @echo ' config - Update current config utilising a line-oriented program'
254+ @echo ' menuconfig - Update current config utilising a menu based program'
255+
256+endif
257+endif
258Index: libc/option-groups.defaults
259===================================================================
260--- libc.orig/option-groups.defaults 2012-08-21 22:26:18.000000000 -0700
261+++ libc/option-groups.defaults 2012-09-05 21:44:09.769577577 -0700
262@@ -8,41 +8,41 @@
263 # are to be changed.
264 #
265 # By default, all option groups are enabled.
266-OPTION_EGLIBC_ADVANCED_INET6 = y
267-OPTION_EGLIBC_BACKTRACE = y
268-OPTION_EGLIBC_BIG_MACROS = y
269-OPTION_EGLIBC_BSD = y
270-OPTION_EGLIBC_CXX_TESTS = y
271-OPTION_EGLIBC_CATGETS = y
272-OPTION_EGLIBC_CHARSETS = y
273-OPTION_EGLIBC_CRYPT = y
274-OPTION_EGLIBC_CRYPT_UFC = y
275-OPTION_EGLIBC_DB_ALIASES = y
276-OPTION_EGLIBC_ENVZ = y
277-OPTION_EGLIBC_FCVT = y
278-OPTION_EGLIBC_FMTMSG = y
279-OPTION_EGLIBC_FSTAB = y
280-OPTION_EGLIBC_FTRAVERSE = y
281-OPTION_EGLIBC_GETLOGIN = y
282-OPTION_EGLIBC_IDN = y
283-OPTION_EGLIBC_INET = y
284-OPTION_EGLIBC_INET_ANL = y
285-OPTION_EGLIBC_LIBM = y
286-OPTION_EGLIBC_LIBM_BIG = y
287-OPTION_EGLIBC_LOCALES = y
288-OPTION_EGLIBC_LOCALE_CODE = y
289-OPTION_EGLIBC_MEMUSAGE = y
290-OPTION_EGLIBC_NIS = y
291-OPTION_EGLIBC_NSSWITCH = y
292-OPTION_EGLIBC_RCMD = y
293-OPTION_EGLIBC_RTLD_DEBUG = y
294-OPTION_EGLIBC_SPAWN = y
295-OPTION_EGLIBC_STREAMS = y
296-OPTION_EGLIBC_SUNRPC = y
297-OPTION_EGLIBC_UTMP = y
298-OPTION_EGLIBC_UTMPX = y
299-OPTION_EGLIBC_WORDEXP = y
300-OPTION_POSIX_C_LANG_WIDE_CHAR = y
301-OPTION_POSIX_REGEXP = y
302-OPTION_POSIX_REGEXP_GLIBC = y
303-OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
304+OPTION_EGLIBC_ADVANCED_INET6=y
305+OPTION_EGLIBC_BACKTRACE=y
306+OPTION_EGLIBC_BIG_MACROS=y
307+OPTION_EGLIBC_BSD=y
308+OPTION_EGLIBC_CXX_TESTS=y
309+OPTION_EGLIBC_CATGETS=y
310+OPTION_EGLIBC_CHARSETS=y
311+OPTION_EGLIBC_CRYPT=y
312+OPTION_EGLIBC_CRYPT_UFC=y
313+OPTION_EGLIBC_DB_ALIASES=y
314+OPTION_EGLIBC_ENVZ=y
315+OPTION_EGLIBC_FCVT=y
316+OPTION_EGLIBC_FMTMSG=y
317+OPTION_EGLIBC_FSTAB=y
318+OPTION_EGLIBC_FTRAVERSE=y
319+OPTION_EGLIBC_GETLOGIN=y
320+OPTION_EGLIBC_IDN=y
321+OPTION_EGLIBC_INET=y
322+OPTION_EGLIBC_INET_ANL=y
323+OPTION_EGLIBC_LIBM=y
324+OPTION_EGLIBC_LIBM_BIG=y
325+OPTION_EGLIBC_LOCALES=y
326+OPTION_EGLIBC_LOCALE_CODE=y
327+OPTION_EGLIBC_MEMUSAGE=y
328+OPTION_EGLIBC_NIS=y
329+OPTION_EGLIBC_NSSWITCH=y
330+OPTION_EGLIBC_RCMD=y
331+OPTION_EGLIBC_RTLD_DEBUG=y
332+OPTION_EGLIBC_SPAWN=y
333+OPTION_EGLIBC_STREAMS=y
334+OPTION_EGLIBC_SUNRPC=y
335+OPTION_EGLIBC_UTMP=y
336+OPTION_EGLIBC_UTMPX=y
337+OPTION_EGLIBC_WORDEXP=y
338+OPTION_POSIX_C_LANG_WIDE_CHAR=y
339+OPTION_POSIX_REGEXP=y
340+OPTION_POSIX_REGEXP_GLIBC=y
341+OPTION_POSIX_WIDE_CHAR_DEVICE_IO=y
342Index: libc/option-groups.def
343===================================================================
344--- libc.orig/option-groups.def 2012-08-21 22:25:45.000000000 -0700
345+++ libc/option-groups.def 2012-09-05 21:44:09.773577578 -0700
346@@ -4,19 +4,19 @@
347 #
348 # An entry of the form:
349 #
350-# config OPTION_GROUP_NAME
351+# config GROUP_NAME
352 # bool "one-line explanation of what this option group controls"
353 # help
354 # Multi-line help explaining the option group's meaning in
355 # some detail, terminated by indentation level.
356 #
357-# defines an option group whose variable is OPTION_GROUP_NAME, with
358+# defines an option group whose variable is GROUP_NAME, with
359 # meaningful values 'y' (enabled) and 'n' (disabled). The
360 # documentation is formatted to be consumed by some sort of
361 # interactive configuration interface, but EGLIBC doesn't have such an
362 # interface yet.
363 #
364-# An option may have a 'depends' line, indicating which other options
365+# An option may have a 'depends on' line, indicating which other options
366 # must also be enabled if this option is. At present, EGLIBC doesn't
367 # check that these dependencies are satisfied.
368 #
369@@ -41,9 +41,9 @@
370 # although this simply reestablishes the value already set by
371 # 'option-groups.defaults'.
372
373-config OPTION_EGLIBC_ADVANCED_INET6
374+config EGLIBC_ADVANCED_INET6
375 bool "IPv6 Advanced Sockets API support (RFC3542)"
376- depends OPTION_EGLIBC_INET
377+ depends on EGLIBC_INET
378 help
379 This option group includes the functions specified by RFC 3542,
380 "Advanced Sockets Application Program Interface (API) for
381@@ -71,7 +71,7 @@
382 inet6_rth_segments
383 inet6_rth_space
384
385-config OPTION_EGLIBC_BACKTRACE
386+config EGLIBC_BACKTRACE
387 bool "Functions for producing backtraces"
388 help
389 This option group includes functions for producing a list of
390@@ -85,7 +85,7 @@
391 backtrace_symbols
392 backtrace_symbols_fd
393
394-config OPTION_EGLIBC_BIG_MACROS
395+config EGLIBC_BIG_MACROS
396 bool "Use extensive inline code"
397 help
398 This option group specifies whether certain pieces of code
399@@ -93,7 +93,7 @@
400 group is not selected, function calls will be used instead,
401 hence reducing the library footprint.
402
403-config OPTION_EGLIBC_BSD
404+config EGLIBC_BSD
405 bool "BSD-specific functions, and their compatibility stubs"
406 help
407 This option group includes functions specific to BSD kernels.
408@@ -109,10 +109,9 @@
409 revoke
410 setlogin
411
412-config OPTION_EGLIBC_CXX_TESTS
413+config EGLIBC_CXX_TESTS
414 bool "Tests that link against the standard C++ library."
415- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO
416- depends OPTION_EGLIBC_LIBM
417+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
418 help
419 This option group does not include any C library functions;
420 instead, it controls which EGLIBC tests an ordinary 'make
421@@ -121,23 +120,22 @@
422 run.
423
424 The standard C++ library depends on the math library 'libm' and
425- the wide character I/O functions included in EGLIBC. If those
426- option groups are disabled, this test must also be disabled.
427+ the wide character I/O functions included in EGLIBC. So those
428+ option groups must be enabled if this test is enabled.
429
430-config OPTION_EGLIBC_CATGETS
431+config EGLIBC_CATGETS
432 bool "Functions for accessing message catalogs"
433- depends OPTION_EGLIBC_LOCALE_CODE
434+ depends on EGLIBC_LOCALE_CODE
435 help
436 This option group includes functions for accessing message
437 catalogs: catopen, catclose, and catgets.
438
439- This option group depends on the OPTION_EGLIBC_LOCALE_CODE
440- option group; if you disable that, you must also disable this.
441+ This option group depends on the EGLIBC_LOCALE_CODE
442+ option group.
443
444-config OPTION_EGLIBC_CHARSETS
445+config EGLIBC_CHARSETS
446 bool "iconv/gconv character set conversion libraries"
447 help
448-
449 This option group includes support for character sets other
450 than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
451 various encodings. This affects both the character sets
452@@ -198,16 +196,16 @@
453 WCHAR_T - EGLIBC's internal form (target-endian,
454 32-bit ISO 10646)
455
456-config OPTION_EGLIBC_CRYPT
457+config EGLIBC_CRYPT
458 bool "Encryption library"
459 help
460 This option group includes the `libcrypt' library which
461 provides functions for one-way encryption. Supported
462 encryption algorithms include MD5, SHA-256, SHA-512 and DES.
463
464-config OPTION_EGLIBC_CRYPT_UFC
465+config EGLIBC_CRYPT_UFC
466 bool "Ultra fast `crypt' implementation"
467- depends OPTION_EGLIBC_CRYPT
468+ depends on EGLIBC_CRYPT
469 help
470 This option group provides ultra fast DES-based implementation of
471 the `crypt' function. When this option group is disabled,
472@@ -216,7 +214,7 @@
473 errno to ENOSYS if /salt/ passed does not correspond to either MD5,
474 SHA-256 or SHA-512 algorithm.
475
476-config OPTION_EGLIBC_DB_ALIASES
477+config EGLIBC_DB_ALIASES
478 bool "Functions for accessing the mail aliases database"
479 help
480 This option group includues functions for looking up mail
481@@ -233,7 +231,7 @@
482 When this option group is disabled, the NSS service libraries
483 also lack support for querying their mail alias tables.
484
485-config OPTION_EGLIBC_ENVZ
486+config EGLIBC_ENVZ
487 bool "Functions for handling envz-style environment vectors."
488 help
489 This option group contains functions for creating and operating
490@@ -248,7 +246,7 @@
491 envz_entry envz_remove
492 envz_get envz_strip
493
494-config OPTION_EGLIBC_FCVT
495+config EGLIBC_FCVT
496 bool "Functions for converting floating-point numbers to strings"
497 help
498 This option group includes functions for converting
499@@ -262,14 +260,14 @@
500 fcvt_r qfcvt_r
501 gcvt qgcvt
502
503-config OPTION_EGLIBC_FMTMSG
504+config EGLIBC_FMTMSG
505 bool "Functions for formatting messages"
506 help
507 This option group includes the following functions:
508
509 addseverity fmtmsg
510
511-config OPTION_EGLIBC_FSTAB
512+config EGLIBC_FSTAB
513 bool "Access functions for 'fstab'"
514 help
515 This option group includes functions for reading the mount
516@@ -283,7 +281,7 @@
517 getfsent setfsent
518 getfsfile
519
520-config OPTION_EGLIBC_FTRAVERSE
521+config EGLIBC_FTRAVERSE
522 bool "Functions for traversing file hierarchies"
523 help
524 This option group includes functions for traversing file
525@@ -297,9 +295,9 @@
526 fts_set nftw64
527 fts_close
528
529-config OPTION_EGLIBC_GETLOGIN
530+config EGLIBC_GETLOGIN
531 bool "The getlogin function"
532- depends OPTION_EGLIBC_UTMP
533+ depends on EGLIBC_UTMP
534 help
535 This function group includes the 'getlogin' and 'getlogin_r'
536 functions, which return the user name associated by the login
537@@ -309,17 +307,17 @@
538 fall back on 'getlogin' to find the user's login name for tilde
539 expansion when the 'HOME' environment variable is not set.
540
541-config OPTION_EGLIBC_IDN
542+config EGLIBC_IDN
543 bool "International domain names support"
544 help
545 This option group includes the `libcidn' library which
546 provides support for international domain names.
547
548-config OPTION_EGLIBC_INET
549+config EGLIBC_INET
550 bool "Networking support"
551 help
552 This option group includes networking-specific functions and
553- data. With OPTION_EGLIBC_INET disabled, the EGLIBC
554+ data. With EGLIBC_INET disabled, the EGLIBC
555 installation and API changes as follows:
556
557 - The following libraries are not installed:
558@@ -439,14 +437,14 @@
559 use Unix-domain sockets to communicate with the syslog daemon;
560 syslog is valuable in non-networked contexts.
561
562-config OPTION_EGLIBC_INET_ANL
563+config EGLIBC_INET_ANL
564 bool "Asynchronous name lookup"
565- depends OPTION_EGLIBC_INET
566+ depends on EGLIBC_INET
567 help
568 This option group includes the `libanl' library which
569 provides support for asynchronous name lookup.
570
571-config OPTION_EGLIBC_LIBM
572+config EGLIBC_LIBM
573 bool "libm (math library)"
574 help
575 This option group includes the 'libm' library, containing
576@@ -464,8 +462,9 @@
577 group, you will not be able to build 'libstdc++' against the
578 resulting EGLIBC installation.
579
580-config OPTION_EGLIBC_LIBM_BIG
581+config EGLIBC_LIBM_BIG
582 bool "Math library size"
583+ depends on EGLIBC_LIBM
584 help
585 This option group enables default configuration of the math library.
586 Not selecting this option group removes most of the extended and
587@@ -477,7 +476,7 @@
588 This option group is useful for systems that do not rely on precise
589 floating point math.
590
591-config OPTION_EGLIBC_LOCALES
592+config EGLIBC_LOCALES
593 bool "Locale definitions"
594 help
595 This option group includes all locale definitions other than
596@@ -485,17 +484,17 @@
597 only the "C" locale is supported.
598
599
600-config OPTION_EGLIBC_LOCALE_CODE
601+config EGLIBC_LOCALE_CODE
602 bool "Locale functions"
603- depends OPTION_POSIX_C_LANG_WIDE_CHAR
604+ depends on POSIX_C_LANG_WIDE_CHAR
605 help
606 This option group includes locale support functions, programs,
607- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled,
608+ and libraries. With EGLIBC_LOCALE_CODE disabled,
609 EGLIBC supports only the 'C' locale (also known as 'POSIX'),
610 and ignores the settings of the 'LANG' and 'LC_*' environment
611 variables.
612
613- With OPTION_EGLIBC_LOCALE_CODE disabled, the following
614+ With EGLIBC_LOCALE_CODE disabled, the following
615 functions are omitted from libc:
616
617 duplocale localeconv nl_langinfo rpmatch strfmon_l
618@@ -504,46 +503,43 @@
619 Furthermore, only the LC_CTYPE and LC_TIME categories of the
620 standard "C" locale are available.
621
622- The OPTION_EGLIBC_CATGETS option group depends on this option
623- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
624- disable OPTION_EGLIBC_CATGETS.
625+ The EGLIBC_CATGETS option group depends on this option group.
626+
627
628-config OPTION_EGLIBC_MEMUSAGE
629+config EGLIBC_MEMUSAGE
630 bool "Memory profiling library"
631 help
632 This option group includes the `libmemusage' library and
633 the `memusage' and `memusagestat' utilities.
634 These components provide memory profiling functions.
635
636- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
637+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
638
639 Libmemusage library buffers the profiling data in memory
640 before writing it out to disk. By default, the library
641 allocates 1.5M buffer, which can be substantial for some
642- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
643+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
644 allows to change the default buffer size. It specifies
645 the number of entries the buffer should have.
646 On most architectures one buffer entry amounts to 48 bytes,
647 so setting this option to the value of 512 will reduce the size of
648 the memory buffer to 24K.
649
650-config OPTION_EGLIBC_NIS
651+config EGLIBC_NIS
652 bool "Support for NIS, NIS+, and the special 'compat' services."
653- depends OPTION_EGLIBC_INET
654- depends OPTION_EGLIBC_SUNRPC
655+ depends on EGLIBC_INET && EGLIBC_SUNRPC
656 help
657 This option group includes the NIS, NIS+, and 'compat' Name
658 Service Switch service libraries. When it is disabled, those
659 services libraries are not installed; you should remove any
660 references to them from your 'nsswitch.conf' file.
661
662- This option group depends on the OPTION_EGLIBC_INET option
663+ This option group depends on the EGLIBC_INET option
664 group; you must enable that to enable this option group.
665
666-config OPTION_EGLIBC_NSSWITCH
667+config EGLIBC_NSSWITCH
668 bool "Name service switch (nsswitch) support"
669 help
670-
671 This option group includes support for the 'nsswitch' facility.
672 With this option group enabled, all EGLIBC functions for
673 accessing various system databases (passwords and groups;
674@@ -557,12 +553,12 @@
675 'option-groups.config' file must set the following two
676 variables:
677
678- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
679+ EGLIBC_NSSWITCH_FIXED_CONFIG
680
681 Set this to the name of a file whose contents observe the
682 same syntax as an ordinary '/etc/nsswitch.conf' file. The
683 EGLIBC build process parses this file just as EGLIBC would
684- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and
685+ at run time if EGLIBC_NSSWITCH were enabled, and
686 produces a C library that uses the nsswitch service
687 libraries to search for database entries as this file
688 specifies, instead of consulting '/etc/nsswitch.conf' at run
689@@ -580,7 +576,7 @@
690 you will probably want to delete references to databases not
691 needed on your system.
692
693- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
694+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS
695
696 The EGLIBC build process uses this file to decide which
697 functions to make available from which service libraries.
698@@ -598,28 +594,28 @@
699 Be sure to mention each function in each service you wish to
700 use. If you do not mention a service's function here, the
701 EGLIBC database access functions will not find it, even if
702- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
703+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
704 file.
705
706- In this arrangement, EGLIBC will not use the 'dlopen' and
707- 'dlsym' functions to find database access functions. Instead,
708- libc hard-codes references to the service libraries' database
709- access functions. You must explicitly link your program
710- against the name service libraries (those whose names start
711- with 'libnss_', in the sysroot's '/lib' directory) whose
712- functions you intend to use. This arrangement helps
713- system-wide static analysis tools decide which functions a
714- system actually uses.
715-
716- Note that some nsswitch service libraries require other option
717- groups to be enabled; for example, the OPTION_EGLIBC_INET
718- option group must be enabled to use the 'libnss_dns.so.2'
719- service library, which uses the Domain Name System network
720- protocol to answer queries.
721+ In this arrangement, EGLIBC will not use the 'dlopen' and
722+ 'dlsym' functions to find database access functions. Instead,
723+ libc hard-codes references to the service libraries' database
724+ access functions. You must explicitly link your program
725+ against the name service libraries (those whose names start
726+ with 'libnss_', in the sysroot's '/lib' directory) whose
727+ functions you intend to use. This arrangement helps
728+ system-wide static analysis tools decide which functions a
729+ system actually uses.
730+
731+ Note that some nsswitch service libraries require other option
732+ groups to be enabled; for example, the EGLIBC_INET
733+ option group must be enabled to use the 'libnss_dns.so.2'
734+ service library, which uses the Domain Name System network
735+ protocol to answer queries.
736
737-config OPTION_EGLIBC_RCMD
738+config EGLIBC_RCMD
739 bool "Support for 'rcmd' and related library functions"
740- depends OPTION_EGLIBC_INET
741+ depends on EGLIBC_INET
742 help
743 This option group includes functions for running commands on
744 remote machines via the 'rsh' protocol, and doing authentication
745@@ -635,7 +631,7 @@
746 rresvport ruserpass
747 rresvport_af
748
749-config OPTION_EGLIBC_RTLD_DEBUG
750+config EGLIBC_RTLD_DEBUG
751 bool "Runtime linker debug print outs"
752 help
753 This option group enables debug output of the runtime linker
754@@ -646,7 +642,7 @@
755 the `ldd' utility which may also be used by the prelinker.
756 In particular, the `--unused' ldd option will not work correctly.
757
758-config OPTION_EGLIBC_SPAWN
759+config EGLIBC_SPAWN
760 bool "Support for POSIX posix_spawn functions"
761 help
762 This option group includes the POSIX functions for executing
763@@ -682,7 +678,7 @@
764 disabled, those programs will only operate on uncompressed
765 charmap files.
766
767-config OPTION_EGLIBC_STREAMS
768+config EGLIBC_STREAMS
769 bool "Support for accessing STREAMS."
770 help
771 This option group includes functions for reading and writing
772@@ -698,14 +694,14 @@
773 isastream fdetach
774 putmsg
775
776-config OPTION_EGLIBC_SUNRPC
777+config EGLIBC_SUNRPC
778 bool "Support for the Sun 'RPC' protocol."
779- depends OPTION_EGLIBC_INET
780+ depends on EGLIBC_INET
781 help
782 This option group includes support for the Sun RPC protocols,
783 including the 'rpcgen' and 'rpcinfo' programs.
784
785-config OPTION_EGLIBC_UTMP
786+config EGLIBC_UTMP
787 bool "Older access functions for 'utmp' login records"
788 help
789 This option group includes the older 'utent' family of
790@@ -732,9 +728,9 @@
791
792 libutil.so (and libutil.a)
793
794-config OPTION_EGLIBC_UTMPX
795+config EGLIBC_UTMPX
796 bool "POSIX access functions for 'utmp' login records"
797- depends OPTION_EGLIBC_UTMP
798+ depends on EGLIBC_UTMP
799 help
800 This option group includes the POSIX functions for reading and
801 writing user login records in the 'utmp' file (usually
802@@ -755,21 +751,21 @@
803 updwtmpx
804 utmpxname
805
806-config OPTION_EGLIBC_WORDEXP
807+config EGLIBC_WORDEXP
808 bool "Shell-style word expansion"
809 help
810 This option group includes the 'wordexp' function for
811 performing word expansion in the manner of the shell, and the
812 accompanying 'wordfree' function.
813
814-config OPTION_POSIX_C_LANG_WIDE_CHAR
815+config POSIX_C_LANG_WIDE_CHAR
816 bool "ISO C library wide character functions, excluding I/O"
817 help
818 This option group includes the functions defined by the ISO C
819 standard for working with wide and multibyte characters in
820 memory. Functions for reading and writing wide and multibyte
821 characters from and to files call in the
822- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group.
823+ POSIX_WIDE_CHAR_DEVICE_IO option group.
824
825 This option group includes the following functions:
826
827@@ -791,14 +787,14 @@
828 mbrlen wcscoll wcstol
829 mbrtowc wcscpy wcstold
830
831-config OPTION_POSIX_REGEXP
832+config POSIX_REGEXP
833 bool "Regular expressions"
834 help
835 This option group includes the POSIX regular expression
836 functions, and the associated non-POSIX extensions and
837 compatibility functions.
838
839- With OPTION_POSIX_REGEXP disabled, the following functions are
840+ With POSIX_REGEXP disabled, the following functions are
841 omitted from libc:
842
843 re_comp re_max_failures regcomp
844@@ -812,9 +808,9 @@
845 <regexp.h> header file, 'compile', 'step', and 'advance', is
846 omitted.
847
848-config OPTION_POSIX_REGEXP_GLIBC
849+config POSIX_REGEXP_GLIBC
850 bool "Regular expressions from GLIBC"
851- depends OPTION_POSIX_REGEXP
852+ depends on POSIX_REGEXP
853 help
854 This option group specifies which regular expression
855 library to use. The choice is between regex
856@@ -823,9 +819,9 @@
857 optimized for speed; regex from libiberty is more than twice
858 as small while still is enough for most practical purposes.
859
860-config OPTION_POSIX_WIDE_CHAR_DEVICE_IO
861+config POSIX_WIDE_CHAR_DEVICE_IO
862 bool "Input and output functions for wide characters"
863- depends OPTION_POSIX_C_LANG_WIDE_CHAR
864+ depends on POSIX_C_LANG_WIDE_CHAR
865 help
866 This option group includes functions for reading and writing
867 wide characters to and from <stdio.h> streams.
868Index: libc/Makefile
869===================================================================
870--- libc.orig/Makefile 2012-08-21 22:25:54.000000000 -0700
871+++ libc/Makefile 2012-09-05 21:44:09.773577578 -0700
872@@ -24,6 +24,7 @@
873
874 include Makeconfig
875
876+include options-config/Makefile
877
878 # This is the default target; it makes everything except the tests.
879 .PHONY: all
880Index: libc/configure
881===================================================================
882--- libc.orig/configure 2012-09-05 21:40:19.000000000 -0700
883+++ libc/configure 2012-09-05 21:44:09.777577578 -0700
884@@ -628,6 +628,7 @@
885 libc_cv_have_bash2
886 BASH_SHELL
887 libc_cv_gcc_static_libgcc
888+KCONFIG_TOOLS
889 CXX_SYSINCLUDES
890 SYSINCLUDES
891 AUTOCONF
892@@ -735,6 +736,7 @@
893 with_binutils
894 with_selinux
895 with_headers
896+with_kconfig
897 with_default_link
898 enable_sanity_checks
899 enable_shared
900@@ -1425,6 +1427,9 @@
901 --with-selinux if building with SELinux support
902 --with-headers=PATH location of system headers to use (for example
903 /usr/src/linux/include) [default=compiler default]
904+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
905+ builds) to re-use for configuring EGLIBC option
906+ groups
907 --with-default-link do not use explicit linker scripts
908 --with-pkgversion=PKG Use PKG in the version string in place of "EGLIBC"
909 --with-bugurl=URL Direct users to URL to report a bug
910@@ -3485,6 +3490,14 @@
911
912
913
914+# Check whether --with-kconfig was given.
915+if test "${with_kconfig+set}" = set; then
916+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
917+else
918+ KCONFIG_TOOLS=''
919+fi
920+
921+
922
923 # Check whether --with-default-link was given.
924 if test "${with_default_link+set}" = set; then :
925Index: libc/EGLIBC.option-groups
926===================================================================
927--- libc.orig/EGLIBC.option-groups 2012-08-21 22:26:20.000000000 -0700
928+++ libc/EGLIBC.option-groups 2012-09-05 21:44:09.777577578 -0700
929@@ -56,33 +56,9 @@
930
931 The Option Groups
932
933-EGLIBC currently implements the following option groups, also
934-documented in the file 'option-groups.def':
935-
936-OPTION_EGLIBC_CATGETS
937- This option group includes functions for accessing message
938- catalogs: catopen, catclose, and catgets.
939-
940-OPTION_EGLIBC_LOCALES
941- This option group includes all locale definitions other than
942- those for the "C" locale. If this option group is omitted, then
943- only the "C" locale is supported.
944-
945-OPTION_EGLIBC_LIBM
946- This option group includes the 'libm' library, containing
947- mathematical functions. If this option group is omitted, then
948- an EGLIBC installation does not include shared or unshared versions
949- of the math library.
950-
951- Note that this does not remove all floating-point related
952- functionality from EGLIBC; for example, 'printf' and 'scanf'
953- can still print and read floating-point values with this option
954- group disabled.
955-
956- Note that the ISO Standard C++ library 'libstdc++' depends on
957- EGLIBC's math library 'libm'. If you disable this option
958- group, you will not be able to build 'libstdc++' against the
959- resulting EGLIBC installation.
960+To see the current full list of implemented option groups, refer to the
961+file 'option-groups.def' at the top of the source tree, or run
962+'make menuconfig' from the top-level build directory.
963
964 The POSIX.1-2001 specification includes a suggested partition of all
965 the functions in the POSIX C API into option groups: math functions
966@@ -110,6 +86,18 @@
967 OPTION_EGLIBC_LOCALES = n
968 OPTION_EGLIBC_LIBM = y
969
970+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
971+targets to make it easier to create 'option-groups.config', with all
972+dependencies between option groups automatically satisfied. Run
973+'make help' to see the list of supported make config targets. For
974+example, 'make menuconfig' will update the current config utilising a
975+menu based program.
976+
977+The option group names and their type (boolean, int, hex, string), help
978+description, and dependencies with other option groups, are described by
979+'option-groups.def' at the top of the source tree, analogous to the
980+'Kconfig' files in the Linux kernel.
981+
982 In general, each option group variable controls whether a given set of
983 object files in EGLIBC is compiled and included in the final
984 libraries, or omitted from the build.
985@@ -132,22 +120,3 @@
986
987 We have used the system to subset some portions of EGLIBC's
988 functionality. It needs to be extended to cover more of the library.
989-
990-At the moment, EGLIBC performs no sanity checks on the contents of
991-'option-groups.config'; if an option group's name is mistyped, the
992-option group is silently included in the build. EGLIBC should check
993-that all variables set in 'option-groups.config' are proper option
994-group names, and that their values are appropriate.
995-
996-Some portions of EGLIBC depend on others; for example, the Sun Remote
997-Procedure Call functions in 'sunrpc' depend on the networking
998-functions in 'inet'. The sanity checking described above should check
999-that the selection configuration satisfies dependencies within EGLIBC,
1000-and produce a legible error message if it does not. At the moment,
1001-inconsistent configurations produce link errors late in the build
1002-process.
1003-
1004-The Linux kernel's configuration system provides interactive
1005-interfaces for creating and modifying configuration files (which also
1006-perform the sanity checking and dependency tracking described above).
1007-EGLIBC should provide similar interfaces.
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
new file mode 100644
index 0000000000..a8463ea915
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -0,0 +1,36 @@
1From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 19 Dec 2012 04:39:57 -0600
4Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S}
5
6libm-err-tab.pl will parse all the files named "libm-test-ulps"
7in the given dir recursively. To avoid parsing the one in
8${S}/.pc/ (it does exist after eglibc adds aarch64 support,
9${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/
10aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
11in ${S}.
12
13Upstream-Status: inappropriate [OE specific]
14
15Signed-off-by: Ting Liu <b28495@freescale.com>
16---
17 manual/Makefile | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/manual/Makefile b/manual/Makefile
21index 6fddff0..7af242e 100644
22--- a/manual/Makefile
23+++ b/manual/Makefile
24@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
25 $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
26 $(dir)/libm-test-ulps))
27 pwd=`pwd`; \
28- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
29+ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp
30+ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp
31 $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
32 touch $@
33
34--
351.7.9.7
36
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.17/0002-eglibc-menuconfig-hex-string-options.patch
new file mode 100644
index 0000000000..7caba48112
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0002-eglibc-menuconfig-hex-string-options.patch
@@ -0,0 +1,169 @@
1pulled from
2
3http://www.eglibc.org/archives/patches/msg01043.html
4
5
6Upstream-Status: Pending
7Signed-off-by: Khem
8
9
10This patch builds on the menuconfig patch for EGLIBC.
11
12
13There are a few options that have non-boolean types, that would benefit from the new 'make *config' support:
14
15EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int)
16EGLIBC_NSSWITCH_FIXED_CONFIG (string)
17EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string)
18
19
20The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file.
21
22In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n.
23
24Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header.
25
26attached is the updated patch to address above issues.
27
28Steve
29
30--
31Steve Longerbeam | Senior Embedded Engineer, ESD Services
32Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
33P 510.354.5838 | M 408.410.2735
34Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
35
36
37Index: libc/malloc/Makefile
38===================================================================
39--- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800
40+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700
41@@ -48,10 +48,6 @@
42 ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
43 extra-libs = libmemusage
44 extra-libs-others = $(extra-libs)
45-
46-ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
47-CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
48-endif
49 endif
50
51 libmemusage-routines = memusage
52Index: libc/option-groups.def
53===================================================================
54--- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700
55+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700
56@@ -513,8 +513,11 @@
57 the `memusage' and `memusagestat' utilities.
58 These components provide memory profiling functions.
59
60- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
61-
62+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
63+ int "Memory profiling library buffer size"
64+ depends on EGLIBC_MEMUSAGE
65+ default "32768"
66+ help
67 Libmemusage library buffers the profiling data in memory
68 before writing it out to disk. By default, the library
69 allocates 1.5M buffer, which can be substantial for some
70@@ -553,8 +556,11 @@
71 'option-groups.config' file must set the following two
72 variables:
73
74- EGLIBC_NSSWITCH_FIXED_CONFIG
75-
76+config EGLIBC_NSSWITCH_FIXED_CONFIG
77+ string "Nsswitch fixed config filename"
78+ depends on !EGLIBC_NSSWITCH
79+ default ""
80+ help
81 Set this to the name of a file whose contents observe the
82 same syntax as an ordinary '/etc/nsswitch.conf' file. The
83 EGLIBC build process parses this file just as EGLIBC would
84@@ -576,8 +582,11 @@
85 you will probably want to delete references to databases not
86 needed on your system.
87
88- EGLIBC_NSSWITCH_FIXED_FUNCTIONS
89-
90+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
91+ string "Nsswitch fixed functions filename"
92+ depends on !EGLIBC_NSSWITCH
93+ default ""
94+ help
95 The EGLIBC build process uses this file to decide which
96 functions to make available from which service libraries.
97 The file 'nss/fixed-nsswitch.functions' serves as a sample
98Index: libc/options-config/config-postproc.pl
99===================================================================
100--- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700
101+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700
102@@ -8,7 +8,7 @@
103 die "Could not open $ARGV[0]" unless -T $ARGV[0];
104
105 sub yank {
106- @option = grep($_ ne $_[0], @option);
107+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
108 }
109
110 open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
111@@ -16,7 +16,7 @@
112 # get the full list of available options using the default config file
113 $i = 0;
114 while (<DEFAULTS>) {
115- if (/^\s*OPTION_(\w+)\s*=/) {
116+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
117 $option[$i++] = $1;
118 }
119 }
120@@ -35,8 +35,9 @@
121 s/CONFIG_/OPTION_/g;
122 print;
123 } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
124- # this is a comment line, change CONFIG_ to OPTION_, remove this
125- # option from option list, and convert to explicit OPTION_FOO=n
126+ # this is a comment line for an unset boolean option, change CONFIG_
127+ # to OPTION_, remove this option from option list, and convert to
128+ # explicit OPTION_FOO=n
129 $opt = $1;
130 yank($opt);
131 s/CONFIG_/OPTION_/g;
132@@ -46,9 +47,12 @@
133 }
134 }
135
136-# any options left in @options, are options that were not mentioned in
137+# any boolean options left in @options, are options that were not mentioned in
138 # the config file, and implicitly that means the option must be set =n,
139 # so do that here.
140 foreach $opt (@option) {
141- print "OPTION_$opt=n\n";
142+ if ($opt =~ /=\s*[yn]/) {
143+ $opt =~ s/=\s*[yn]/=n/;
144+ print "OPTION_$opt\n";
145+ }
146 }
147Index: libc/scripts/option-groups.awk
148===================================================================
149--- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800
150+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700
151@@ -46,9 +46,15 @@
152 print "#define __" var " 1"
153 else if (vars[var] == "n")
154 print "/* #undef __" var " */"
155- # Ignore variables that don't have boolean values.
156- # Ideally, this would be driven by the types given in
157- # option-groups.def.
158+ else if (vars[var] ~ /^[0-9]+/ ||
159+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
160+ vars[var] ~ /^\"/)
161+ print "#define __" var " " vars[var]
162+ else
163+ print "/* #undef __" var " */"
164+ # Ignore variables that don't have boolean, int, hex, or
165+ # string values. Ideally, this would be driven by the types
166+ # given in option-groups.def.
167 }
168 }
169
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.17/0003-eglibc-menuconfig-build-instructions.patch
new file mode 100644
index 0000000000..d137f5b318
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/0003-eglibc-menuconfig-build-instructions.patch
@@ -0,0 +1,176 @@
1Pulled from
2
3http://www.eglibc.org/archives/patches/msg01035.html
4
5Upstream-Status: Pending
6Signed-off-by: Khem
7
8As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after.
9
10My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok.
11
12
13Thanks,
14
15--
16Steve Longerbeam | Senior Embedded Engineer, ESD Services
17Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
18P 510.354.5838 | M 408.410.2735
19Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
20
21
22 EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++---------------------
23 1 file changed, 35 insertions(+), 24 deletions(-)
24
25Index: libc/EGLIBC.cross-building
26===================================================================
27--- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700
28+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700
29@@ -47,31 +47,34 @@
30 EGLIBC requires recent versions of the GNU binutils, GCC, and the
31 Linux kernel. The web page <http://www.eglibc.org/prerequisites>
32 documents the current requirements, and lists patches needed for
33-certain target architectures. As of this writing, EGLIBC required
34-binutils 2.17, GCC 4.1, and Linux 2.6.19.1.
35+certain target architectures. As of this writing, these build
36+instructions have been tested with binutils 2.22.51, GCC 4.6.2,
37+and Linux 3.1.
38
39 First, let's set some variables, to simplify later commands. We'll
40-build EGLIBC and GCC for a PowerPC target, known to the Linux kernel
41-as 'powerpc', and we'll do the build on an Intel Linux box:
42+build EGLIBC and GCC for an ARM target, known to the Linux kernel
43+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
44
45- $ build=i686-pc-linux-gnu
46+ $ build=x86_64-pc-linux-gnu
47 $ host=$build
48- $ target=powerpc-none-linux-gnu
49- $ linux_arch=powerpc
50+ $ target=arm-none-linux-gnueabi
51+ $ linux_arch=arm
52
53 We're using the aforementioned versions of Binutils, GCC, and Linux:
54
55- $ binutilsv=binutils-2.17
56- $ gccv=gcc-4.1.1
57- $ linuxv=linux-2.6.20
58+ $ binutilsv=binutils-2.22.51
59+ $ gccv=gcc-4.6.2
60+ $ linuxv=linux-3.1
61
62 We're carrying out the entire process under '~/cross-build', which
63-contains unpacked source trees:
64+contains unpacked source trees for binutils, gcc, and linux kernel,
65+along with EGLIBC svn trunk (which can be checked-out with
66+'svn co http://www.eglibc.org/svn/trunk eglibc'):
67
68- $ top=$HOME/cross-build/ppc
69+ $ top=$HOME/cross-build/$target
70 $ src=$HOME/cross-build/src
71 $ ls $src
72- binutils-2.17 gcc-4.1.1 libc linux-2.6.20
73+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
74
75 We're going to place our build directories in a subdirectory 'obj',
76 we'll install the cross-development toolchain in 'tools', and we'll
77@@ -99,7 +102,7 @@
78
79 The First GCC
80
81-For our work, we need a cross-compiler targeting a PowerPC Linux
82+For our work, we need a cross-compiler targeting an ARM Linux
83 system. However, that configuration includes the shared library
84 'libgcc_s.so', which is compiled against the EGLIBC headers (which we
85 haven't installed yet) and linked against 'libc.so' (which we haven't
86@@ -125,7 +128,8 @@
87 > --prefix=$tools \
88 > --without-headers --with-newlib \
89 > --disable-shared --disable-threads --disable-libssp \
90- > --disable-libgomp --disable-libmudflap \
91+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
92+ > --disable-decimal-float --disable-libffi \
93 > --enable-languages=c
94 $ PATH=$tools/bin:$PATH make
95 $ PATH=$tools/bin:$PATH make install
96@@ -162,12 +166,13 @@
97 > CXX=$tools/bin/$target-g++ \
98 > AR=$tools/bin/$target-ar \
99 > RANLIB=$tools/bin/$target-ranlib \
100- > $src/libc/configure \
101+ > $src/eglibc/libc/configure \
102 > --prefix=/usr \
103 > --with-headers=$sysroot/usr/include \
104 > --build=$build \
105 > --host=$target \
106- > --disable-profile --without-gd --without-cvs --enable-add-ons
107+ > --disable-profile --without-gd --without-cvs \
108+ > --enable-add-ons=nptl,libidn,../ports
109
110 The option '--prefix=/usr' may look strange, but you should never
111 configure EGLIBC with a prefix other than '/usr': in various places,
112@@ -181,6 +186,11 @@
113 The '--with-headers' option tells EGLIBC where the Linux headers have
114 been installed.
115
116+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
117+for the listed glibc add-ons. Most notably the ports add-on (located
118+just above the libc sources in the EGLIBC svn tree) is required to
119+support ARM targets.
120+
121 We can now use the 'install-headers' makefile target to install the
122 headers:
123
124@@ -223,6 +233,7 @@
125 > --prefix=$tools \
126 > --with-sysroot=$sysroot \
127 > --disable-libssp --disable-libgomp --disable-libmudflap \
128+ > --disable-libffi --disable-libquadmath \
129 > --enable-languages=c
130 $ PATH=$tools/bin:$PATH make
131 $ PATH=$tools/bin:$PATH make install
132@@ -240,13 +251,14 @@
133 > CXX=$tools/bin/$target-g++ \
134 > AR=$tools/bin/$target-ar \
135 > RANLIB=$tools/bin/$target-ranlib \
136- > $src/libc/configure \
137+ > $src/eglibc/libc/configure \
138 > --prefix=/usr \
139 > --with-headers=$sysroot/usr/include \
140 > --with-kconfig=$obj/linux/scripts/kconfig \
141 > --build=$build \
142 > --host=$target \
143- > --disable-profile --without-gd --without-cvs --enable-add-ons
144+ > --disable-profile --without-gd --without-cvs \
145+ > --enable-add-ons=nptl,libidn,../ports
146
147 Note the additional '--with-kconfig' option. This tells EGLIBC where to
148 find the host config tools used by the kernel 'make config' and 'make
149@@ -337,15 +349,15 @@
150 ELF Header:
151 ...
152 Type: EXEC (Executable file)
153- Machine: PowerPC
154+ Machine: ARM
155
156 ...
157 Program Headers:
158 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
159 PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
160- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1
161- [Requesting program interpreter: /lib/ld.so.1]
162- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000
163+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
164+ [Requesting program interpreter: /lib/ld-linux.so.3]
165+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
166 ...
167
168 Looking at the dynamic section of the installed 'libgcc_s.so', we see
169@@ -357,7 +369,6 @@
170 Dynamic section at offset 0x1083c contains 24 entries:
171 Tag Type Name/Value
172 0x00000001 (NEEDED) Shared library: [libc.so.6]
173- 0x00000001 (NEEDED) Shared library: [ld.so.1]
174 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
175 ...
176
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.17/GLRO_dl_debug_mask.patch
new file mode 100644
index 0000000000..7258c82418
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/GLRO_dl_debug_mask.patch
@@ -0,0 +1,143 @@
1Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
2so we should use GLRO_dl_debug_mask
3
4Singed-off-by: Khem Raj <raj.khem@gmail.com>
5
6Upstream-Status: Pending
7Index: libc/elf/dl-open.c
8===================================================================
9--- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700
10+++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800
11@@ -155,7 +155,7 @@
12 ns->_ns_main_searchlist->r_list[new_nlist++] = map;
13
14 /* We modify the global scope. Report this. */
15- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
16+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
17 _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
18 map->l_name, map->l_ns);
19 }
20@@ -298,7 +298,7 @@
21 LIBC_PROBE (map_complete, 3, args->nsid, r, new);
22
23 /* Print scope information. */
24- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
25+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
26 _dl_show_scope (new, 0);
27
28 /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
29@@ -515,7 +515,7 @@
30 }
31
32 /* Print scope information. */
33- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
34+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
35 _dl_show_scope (imap, from_scope);
36 }
37
38Index: libc/ports/sysdeps/mips/dl-lookup.c
39===================================================================
40--- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
41+++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
42@@ -111,7 +111,7 @@
43 continue;
44
45 /* Print some debugging info if wanted. */
46- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
47+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
48 _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
49 undef_name,
50 map->l_name[0] ? map->l_name : rtld_progname,
51@@ -432,7 +432,7 @@
52 hash table. */
53 if (__builtin_expect (tab->size, 0))
54 {
55- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
56+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
57 __rtld_lock_unlock_recursive (tab->lock);
58 goto success;
59 }
60@@ -681,7 +681,7 @@
61 }
62
63 /* Display information if we are debugging. */
64- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
65+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
66 _dl_debug_printf ("\
67 \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
68 map->l_name[0] ? map->l_name : rtld_progname,
69@@ -788,7 +788,7 @@
70 {
71 if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
72 && skip_map == NULL
73- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
74+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
75 {
76 /* We could find no value for a strong reference. */
77 const char *reference_name = undef_map ? undef_map->l_name : "";
78@@ -861,7 +861,7 @@
79 if (__builtin_expect (current_value.m->l_used == 0, 0))
80 current_value.m->l_used = 1;
81
82- if (__builtin_expect (GLRO(dl_debug_mask)
83+ if (__builtin_expect (GLRO_dl_debug_mask
84 & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
85 _dl_debug_bindings (undef_name, undef_map, ref,
86 &current_value, version, type_class, protected);
87@@ -926,7 +926,7 @@
88 {
89 const char *reference_name = undef_map->l_name;
90
91- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
92+ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
93 {
94 _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
95 (reference_name[0]
96@@ -942,7 +942,7 @@
97 _dl_debug_printf_c ("\n");
98 }
99 #ifdef SHARED
100- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
101+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
102 {
103 int conflict = 0;
104 struct sym_val val = { NULL, NULL };
105Index: libc/elf/rtld.c
106===================================================================
107--- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700
108+++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800
109@@ -2118,7 +2118,7 @@
110 GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
111
112 /* Print scope information. */
113- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
114+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
115 {
116 _dl_debug_printf ("\nInitial object scopes\n");
117
118Index: libc/elf/dl-lookup.c
119===================================================================
120--- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
121+++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
122@@ -771,7 +771,7 @@
123 {
124 if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
125 && skip_map == NULL
126- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
127+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
128 {
129 /* We could find no value for a strong reference. */
130 const char *reference_name = undef_map ? undef_map->l_name : "";
131Index: libc/elf/get-dynamic-info.h
132===================================================================
133--- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800
134+++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800
135@@ -157,7 +157,7 @@
136 them. Therefore to avoid breaking existing applications the
137 best we can do is add a warning during debugging with the
138 intent of notifying the user of the problem. */
139- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
140+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
141 && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
142 _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
143 l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.17/IO-acquire-lock-fix.patch
new file mode 100644
index 0000000000..cf5803585c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/IO-acquire-lock-fix.patch
@@ -0,0 +1,17 @@
1import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
2
3Upstream-Status: Pending
4
5Index: libc/bits/stdio-lock.h
6===================================================================
7--- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700
8+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700
9@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _
10 _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
11 _IO_flockfile (_fp)
12
13+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
14+
15 # define _IO_release_lock(_fp) \
16 _IO_funlockfile (_fp); \
17 _IO_cleanup_region_end (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/add_resource_h_to_wait_h.patch b/meta/recipes-core/eglibc/eglibc-2.17/add_resource_h_to_wait_h.patch
new file mode 100644
index 0000000000..f5023c08d4
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/add_resource_h_to_wait_h.patch
@@ -0,0 +1,20 @@
1The older versions of perf still require sys/resource.h to be
2present in this header, the newer version of perf in 3.2 and
3beyond directly include sys/resource.h
4
5Upstream-Status: Inapproriate [older kernel/perf specific]
6
7Signed-off-by: Saul Wold <sgw@linux.intel.com>
8
9Index: libc/posix/sys/wait.h
10===================================================================
11--- libc.orig/posix/sys/wait.h
12+++ libc/posix/sys/wait.h
13@@ -28,6 +28,7 @@
14 __BEGIN_DECLS
15
16 #include <signal.h>
17+#include <sys/resource.h>
18
19 /* These macros could also be defined in <stdlib.h>. */
20 #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-PR15003-r22243.patch b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-PR15003-r22243.patch
new file mode 100644
index 0000000000..a69302bb7d
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-PR15003-r22243.patch
@@ -0,0 +1,207 @@
1Index: libc/NEWS
2===================================================================
3--- libc/NEWS (revision 22242)
4+++ libc/NEWS (revision 22243)
5@@ -23,7 +23,7 @@
6 14767, 14783, 14784, 14785, 14793, 14796, 14797, 14801, 14803, 14805,
7 14807, 14811, 14815, 14821, 14822, 14824, 14828, 14831, 14833, 14835,
8 14838, 14856, 14863, 14865, 14866, 14868, 14869, 14871, 14872, 14879,
9- 14889, 14893, 14898, 14914.
10+ 14889, 14893, 14898, 14914, 15003.
11
12 * Optimization of memcpy for MIPS.
13
14Index: libc/ChangeLog
15===================================================================
16--- libc/ChangeLog (revision 22242)
17+++ libc/ChangeLog (revision 22243)
18@@ -1,3 +1,29 @@
19+2013-01-11 Andreas Jaeger <aj@suse.de>
20+
21+ [BZ #15003]
22+ * sysdeps/unix/sysv/linux/bits/socket.h (MSG_FASTOPEN): New
23+ value. Sync with Linux 3.7.
24+
25+2013-01-09 David S. Miller <davem@davemloft.net>
26+
27+ [BZ# 15003]
28+ * sysdeps/gnu/netinet/tcp.h (TCP_COOKIE_TRANSACTIONS,
29+ TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT,
30+ TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
31+ TCP_FASTOPEN): Define.
32+ (tcp_repair_opt): New structure.
33+ (TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR): New
34+ enum values.
35+ (TCP_COOKIE_MIN, TCP_COOKIE_MAX, TCP_COOKIE_PAIR_SIZE,
36+ TCP_COOKIE_IN_ALWAYS, TCP_COOKIE_OUT_NEVER, TCP_S_DATA_IN,
37+ TCP_S_DATA_OUT, TCP_MSS_DEFAULT, TCP_MSS_DESIRED): Define.
38+ (tcp_cookie_transactions): New structure.
39+
40+2013-01-09 Andreas Jaeger <aj@suse.de>
41+
42+ * sysdeps/gnu/netinet/tcp.h (TCPI_OPT_SYN_DATA)
43+ (TCPI_OPT_ECN_SEEN): Define. Sync with Linux 3.7.
44+
45 2013-01-01 David S. Miller <davem@davemloft.net>
46
47 * po/fr.po: Update from translation team.
48Index: libc/sysdeps/unix/sysv/linux/bits/socket.h
49===================================================================
50--- libc/sysdeps/unix/sysv/linux/bits/socket.h (revision 22242)
51+++ libc/sysdeps/unix/sysv/linux/bits/socket.h (revision 22243)
52@@ -1,6 +1,5 @@
53 /* System-specific socket constants and types. Linux version.
54- Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012
55- Free Software Foundation, Inc.
56+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
57 This file is part of the GNU C Library.
58
59 The GNU C Library is free software; you can redistribute it and/or
60@@ -208,6 +207,8 @@
61 #define MSG_MORE MSG_MORE
62 MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
63 #define MSG_WAITFORONE MSG_WAITFORONE
64+ MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */
65+#define MSG_FASTOPEN MSG_FASTOPEN
66
67 MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
68 descriptor received through
69Index: libc/sysdeps/gnu/netinet/tcp.h
70===================================================================
71--- libc/sysdeps/gnu/netinet/tcp.h (revision 22242)
72+++ libc/sysdeps/gnu/netinet/tcp.h (revision 22243)
73@@ -37,20 +37,29 @@
74 /*
75 * User-settable options (used with setsockopt).
76 */
77-#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
78-#define TCP_MAXSEG 2 /* Set maximum segment size */
79-#define TCP_CORK 3 /* Control sending of partial frames */
80-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
81-#define TCP_KEEPINTVL 5 /* Interval between keepalives */
82-#define TCP_KEEPCNT 6 /* Number of keepalives before death */
83-#define TCP_SYNCNT 7 /* Number of SYN retransmits */
84-#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
85-#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
86-#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
87-#define TCP_INFO 11 /* Information about this connection. */
88-#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
89-#define TCP_CONGESTION 13 /* Congestion control algorithm. */
90-#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
91+#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
92+#define TCP_MAXSEG 2 /* Set maximum segment size */
93+#define TCP_CORK 3 /* Control sending of partial frames */
94+#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
95+#define TCP_KEEPINTVL 5 /* Interval between keepalives */
96+#define TCP_KEEPCNT 6 /* Number of keepalives before death */
97+#define TCP_SYNCNT 7 /* Number of SYN retransmits */
98+#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
99+#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
100+#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
101+#define TCP_INFO 11 /* Information about this connection. */
102+#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
103+#define TCP_CONGESTION 13 /* Congestion control algorithm. */
104+#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
105+#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
106+#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
107+#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
108+#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
109+#define TCP_REPAIR 19 /* TCP sock is under repair right now */
110+#define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */
111+#define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */
112+#define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */
113+#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
114
115 #ifdef __USE_MISC
116 # include <sys/types.h>
117@@ -173,7 +182,9 @@
118 # define TCPI_OPT_TIMESTAMPS 1
119 # define TCPI_OPT_SACK 2
120 # define TCPI_OPT_WSCALE 4
121-# define TCPI_OPT_ECN 8
122+# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
123+# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
124+# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
125
126 /* Values for tcpi_state. */
127 enum tcp_ca_state
128@@ -241,6 +252,49 @@
129 u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
130 };
131
132+/* For socket repair options. */
133+struct tcp_repair_opt
134+{
135+ u_int32_t opt_code;
136+ u_int32_t opt_val;
137+};
138+
139+/* Queue to repair, for TCP_REPAIR_QUEUE. */
140+enum
141+{
142+ TCP_NO_QUEUE,
143+ TCP_RECV_QUEUE,
144+ TCP_SEND_QUEUE,
145+ TCP_QUEUES_NR,
146+};
147+
148+/* For cookie transactions socket options. */
149+#define TCP_COOKIE_MIN 8 /* 64-bits */
150+#define TCP_COOKIE_MAX 16 /* 128-bits */
151+#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
152+
153+/* Flags for both getsockopt and setsockopt */
154+#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
155+#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
156+ * supercedes everything. */
157+
158+/* Flags for getsockopt */
159+#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
160+#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
161+
162+#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */
163+#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */
164+
165+struct tcp_cookie_transactions
166+{
167+ u_int16_t tcpct_flags;
168+ u_int8_t __tcpct_pad1;
169+ u_int8_t tcpct_cookie_desired;
170+ u_int16_t tcpct_s_data_desired;
171+ u_int16_t tcpct_used;
172+ u_int8_t tcpct_value[TCP_MSS_DEFAULT];
173+};
174+
175 #endif /* Misc. */
176
177 #endif /* netinet/tcp.h */
178
179Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data
180___________________________________________________________________
181Modified: svn:mergeinfo
182 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data:r22178-22242
183
184
185Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data
186___________________________________________________________________
187Modified: svn:mergeinfo
188 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data:r22178-22242
189
190
191Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data
192___________________________________________________________________
193Modified: svn:mergeinfo
194 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data:r22178-22242
195
196
197Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data
198___________________________________________________________________
199Modified: svn:mergeinfo
200 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data:r22178-22242
201
202
203Property changes on: .
204___________________________________________________________________
205Modified: svn:mergeinfo
206 Merged /fsf/glibc-2_17-branch:r22178-22242
207
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-r22178.patch b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-r22178.patch
new file mode 100644
index 0000000000..2ad1e23bcf
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-2.17-r22178.patch
@@ -0,0 +1,9472 @@
1Index: libc/ChangeLog
2===================================================================
3--- libc/ChangeLog (revision 22177)
4+++ libc/ChangeLog (revision 22178)
5@@ -1,3 +1,8 @@
6+2013-01-01 David S. Miller <davem@davemloft.net>
7+
8+ * po/fr.po: Update from translation team.
9+ * po/ca.po: Likewise.
10+
11 2012-12-21 David S. Miller <davem@davemloft.net>
12
13 * po/hr.po: Update from translation team.
14
15Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data
16___________________________________________________________________
17Modified: svn:mergeinfo
18 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data:r22064-22177
19
20
21Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data
22___________________________________________________________________
23Modified: svn:mergeinfo
24 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data:r22064-22177
25
26
27Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data
28___________________________________________________________________
29Modified: svn:mergeinfo
30 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data:r22064-22177
31
32
33Property changes on: libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data
34___________________________________________________________________
35Modified: svn:mergeinfo
36 Merged /fsf/glibc-2_17-branch/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data:r22064-22177
37
38Index: libc/po/fr.po
39===================================================================
40--- libc/po/fr.po (revision 22177)
41+++ libc/po/fr.po (revision 22178)
42@@ -7,9 +7,9 @@
43 # kerb <traduc@traduc.org>, 2008, 2009.
44 msgid ""
45 msgstr ""
46-"Project-Id-Version: libc-2.16-pre1\n"
47-"POT-Creation-Date: 2012-06-21 07:51-0700\n"
48-"PO-Revision-Date: 2012-07-12 08:16+0100\n"
49+"Project-Id-Version: libc-2.17-pre1\n"
50+"POT-Creation-Date: 2012-12-07 15:10-0500\n"
51+"PO-Revision-Date: 2012-12-30 17:20+0100\n"
52 "Last-Translator: kerb <y.kerb@laposte.net>\n"
53 "Language-Team: French <traduc@traduc.org>\n"
54 "Language: fr\n"
55@@ -19,45 +19,45 @@
56 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
57 "X-Generator: KBabel 1.11.4\n"
58
59-#: argp/argp-help.c:226
60+#: argp/argp-help.c:227
61 #, c-format
62 msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
63 msgstr "%.*s : le paramètre ARGP_HELP_FMT requiert une valeur"
64
65-#: argp/argp-help.c:236
66+#: argp/argp-help.c:237
67 #, c-format
68 msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
69 msgstr "% *s : paramètre ARGP_HELP_FMT inconnu"
70
71-#: argp/argp-help.c:249
72+#: argp/argp-help.c:250
73 #, c-format
74 msgid "Garbage in ARGP_HELP_FMT: %s"
75 msgstr "Rebut dans l'argument ARGP_HELP_FMT : %s"
76
77-#: argp/argp-help.c:1213
78+#: argp/argp-help.c:1214
79 msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
80 msgstr ""
81 "Les arguments obligatoires ou optionnels pour les options de formes longues\n"
82 "le sont aussi pour les options de forme courtes."
83
84-#: argp/argp-help.c:1599
85+#: argp/argp-help.c:1600
86 msgid "Usage:"
87 msgstr "Usage :"
88
89-#: argp/argp-help.c:1603
90+#: argp/argp-help.c:1604
91 msgid " or: "
92 msgstr " ou : "
93
94-#: argp/argp-help.c:1615
95+#: argp/argp-help.c:1616
96 msgid " [OPTION...]"
97 msgstr " [OPTION...]"
98
99-#: argp/argp-help.c:1642
100+#: argp/argp-help.c:1643
101 #, c-format
102 msgid "Try `%s --help' or `%s --usage' for more information.\n"
103 msgstr "Pour en savoir davantage, faites : «%s --help » ou «%s --usage».\n"
104
105-#: argp/argp-help.c:1670
106+#: argp/argp-help.c:1671
107 #, c-format
108 msgid "Report bugs to %s.\n"
109 msgstr "Rapporter toutes anomalies à %s.\n"
110@@ -109,7 +109,7 @@
111 "%s%s%s :%u : %s%s l'assertion « %s » a échoué.\n"
112 "%n"
113
114-#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:115 nss/makedb.c:118
115+#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:115 nss/makedb.c:119
116 msgid "NAME"
117 msgstr "NOM"
118
119@@ -121,7 +121,7 @@
120 msgid "Do not use existing catalog, force new output file"
121 msgstr "Ne pas utiliser le catalogue existant, forcer la génération d'un autre fichier"
122
123-#: catgets/gencat.c:113 nss/makedb.c:118
124+#: catgets/gencat.c:113 nss/makedb.c:119
125 msgid "Write output to file NAME"
126 msgstr "Écrit en sortie dans le FICHIER"
127
128@@ -141,28 +141,27 @@
129 "-o FICHIER_DE_SORTIE [FICHIER_D_ENTRÉE]...\n"
130 "[FICHIER_DE_SORTIE [FICHIER_D_ENTRÉE]...]"
131
132-#: catgets/gencat.c:234 debug/pcprofiledump.c:207 debug/xtrace.sh:57
133-#: elf/ldconfig.c:301 elf/ldd.bash.in:55 elf/pldd.c:56 elf/sln.c:85
134-#: elf/sotruss.ksh:49 elf/sprof.c:370 iconv/iconv_prog.c:407
135-#: iconv/iconvconfig.c:382 locale/programs/locale.c:278
136-#: locale/programs/localedef.c:367 login/programs/pt_chown.c:91
137-#: malloc/memusage.sh:64 malloc/memusagestat.c:538 nscd/nscd.c:456
138-#: nss/getent.c:965 nss/makedb.c:369 posix/getconf.c:1121
139-#: sunrpc/rpc_main.c:1446 sunrpc/rpcinfo.c:691
140+#: catgets/gencat.c:235 debug/pcprofiledump.c:208 elf/ldconfig.c:302
141+#: elf/pldd.c:222 elf/sln.c:85 elf/sprof.c:371 iconv/iconv_prog.c:408
142+#: iconv/iconvconfig.c:383 locale/programs/locale.c:279
143+#: locale/programs/localedef.c:363 login/programs/pt_chown.c:88
144+#: malloc/memusagestat.c:536 nscd/nscd.c:459 nss/getent.c:965 nss/makedb.c:371
145+#: posix/getconf.c:1121 sunrpc/rpcinfo.c:691
146 #: sysdeps/unix/sysv/linux/lddlibc4.c:61
147+#, c-format
148 msgid ""
149 "For bug reporting instructions, please see:\n"
150-"<http://www.gnu.org/software/libc/bugs.html>.\n"
151+"%s.\n"
152 msgstr ""
153 "Pour les instructions de rapport de bug, SVP voyez là : \n"
154-"<http://www.gnu.org/software/libc/bugs.html>.\n"
155+"%s.\n"
156
157-#: catgets/gencat.c:248 debug/pcprofiledump.c:221 debug/xtrace.sh:65
158-#: elf/ldconfig.c:315 elf/ldd.bash.in:38 elf/pldd.c:220 elf/sotruss.ksh:76
159-#: elf/sprof.c:385 iconv/iconv_prog.c:422 iconv/iconvconfig.c:397
160-#: locale/programs/locale.c:293 locale/programs/localedef.c:383
161-#: login/programs/pt_chown.c:62 malloc/memusage.sh:72
162-#: malloc/memusagestat.c:556 nscd/nscd.c:470 nss/getent.c:86 nss/makedb.c:383
163+#: catgets/gencat.c:251 debug/pcprofiledump.c:224 debug/xtrace.sh:64
164+#: elf/ldconfig.c:318 elf/ldd.bash.in:38 elf/pldd.c:238 elf/sotruss.ksh:75
165+#: elf/sprof.c:388 iconv/iconv_prog.c:425 iconv/iconvconfig.c:400
166+#: locale/programs/locale.c:296 locale/programs/localedef.c:389
167+#: login/programs/pt_chown.c:62 malloc/memusage.sh:71
168+#: malloc/memusagestat.c:552 nscd/nscd.c:475 nss/getent.c:86 nss/makedb.c:387
169 #: posix/getconf.c:1103 sysdeps/unix/sysv/linux/lddlibc4.c:68
170 #, c-format
171 msgid ""
172@@ -175,96 +174,96 @@
173 "reproduction. AUCUNE garantie n'est donnée; tant pour des raisons\n"
174 "COMMERCIALES que pour RÉPONDRE À UN BESOIN PARTICULIER.\n"
175
176-#: catgets/gencat.c:253 debug/pcprofiledump.c:226 debug/xtrace.sh:69
177-#: elf/ldconfig.c:320 elf/pldd.c:225 elf/sprof.c:391 iconv/iconv_prog.c:427
178-#: iconv/iconvconfig.c:402 locale/programs/locale.c:298
179-#: locale/programs/localedef.c:388 malloc/memusage.sh:76
180-#: malloc/memusagestat.c:561 nscd/nscd.c:475 nss/getent.c:91 nss/makedb.c:388
181+#: catgets/gencat.c:256 debug/pcprofiledump.c:229 debug/xtrace.sh:68
182+#: elf/ldconfig.c:323 elf/pldd.c:243 elf/sprof.c:394 iconv/iconv_prog.c:430
183+#: iconv/iconvconfig.c:405 locale/programs/locale.c:301
184+#: locale/programs/localedef.c:394 malloc/memusage.sh:75
185+#: malloc/memusagestat.c:557 nscd/nscd.c:480 nss/getent.c:91 nss/makedb.c:392
186 #: posix/getconf.c:1108
187 #, c-format
188 msgid "Written by %s.\n"
189 msgstr "Écrit par %s.\n"
190
191-#: catgets/gencat.c:284
192+#: catgets/gencat.c:287
193 msgid "*standard input*"
194 msgstr "*entrée standard*"
195
196-#: catgets/gencat.c:290 iconv/iconv_charmap.c:171 iconv/iconv_prog.c:293
197-#: nss/makedb.c:247
198+#: catgets/gencat.c:293 iconv/iconv_charmap.c:169 iconv/iconv_prog.c:293
199+#: nss/makedb.c:248
200 #, c-format
201 msgid "cannot open input file `%s'"
202 msgstr "ne peut ouvrir le fichier d'entrée « %s »"
203
204-#: catgets/gencat.c:419 catgets/gencat.c:494
205+#: catgets/gencat.c:422 catgets/gencat.c:497
206 msgid "illegal set number"
207 msgstr "numéro d'ensemble non permis"
208
209-#: catgets/gencat.c:446
210+#: catgets/gencat.c:449
211 msgid "duplicate set definition"
212 msgstr "double définitions d'ensemble"
213
214-#: catgets/gencat.c:448 catgets/gencat.c:620 catgets/gencat.c:672
215+#: catgets/gencat.c:451 catgets/gencat.c:623 catgets/gencat.c:675
216 msgid "this is the first definition"
217 msgstr "ceci est la première définition"
218
219-#: catgets/gencat.c:519
220+#: catgets/gencat.c:522
221 #, c-format
222 msgid "unknown set `%s'"
223 msgstr "ensemble inconnu « %s »"
224
225-#: catgets/gencat.c:560
226+#: catgets/gencat.c:563
227 msgid "invalid quote character"
228 msgstr "caractère de citation (quote) invalide"
229
230-#: catgets/gencat.c:573
231+#: catgets/gencat.c:576
232 #, c-format
233 msgid "unknown directive `%s': line ignored"
234 msgstr "directive inconnue « %s » : ligne ignorée"
235
236-#: catgets/gencat.c:618
237+#: catgets/gencat.c:621
238 msgid "duplicated message number"
239 msgstr "numéro de message en double"
240
241-#: catgets/gencat.c:669
242+#: catgets/gencat.c:672
243 msgid "duplicated message identifier"
244 msgstr "identifiant de message en double"
245
246-#: catgets/gencat.c:726
247+#: catgets/gencat.c:729
248 msgid "invalid character: message ignored"
249 msgstr "caractère invalide : message ignoré"
250
251-#: catgets/gencat.c:769
252+#: catgets/gencat.c:772
253 msgid "invalid line"
254 msgstr "ligne invalide"
255
256-#: catgets/gencat.c:823
257+#: catgets/gencat.c:826
258 msgid "malformed line ignored"
259 msgstr "ligne incorrecte ignorée"
260
261-#: catgets/gencat.c:987 catgets/gencat.c:1028
262+#: catgets/gencat.c:990 catgets/gencat.c:1031
263 #, c-format
264 msgid "cannot open output file `%s'"
265 msgstr "ne peut ouvrir le fichier de sortie « %s »"
266
267-#: catgets/gencat.c:1190 locale/programs/linereader.c:559
268+#: catgets/gencat.c:1193 locale/programs/linereader.c:559
269 msgid "invalid escape sequence"
270 msgstr "séquence d'échappement invalide"
271
272-#: catgets/gencat.c:1212
273+#: catgets/gencat.c:1215
274 msgid "unterminated message"
275 msgstr "message non terminé"
276
277-#: catgets/gencat.c:1236
278+#: catgets/gencat.c:1239
279 #, c-format
280 msgid "while opening old catalog file"
281 msgstr "lors de l'ouverture de l'ancien fichier catalogue"
282
283-#: catgets/gencat.c:1327
284+#: catgets/gencat.c:1330
285 #, c-format
286 msgid "conversion modules not available"
287 msgstr "modules de conversion indisponibles"
288
289-#: catgets/gencat.c:1353
290+#: catgets/gencat.c:1356
291 #, c-format
292 msgid "cannot determine escape character"
293 msgstr "ne peut déterminer le caractère d'échappement"
294@@ -300,8 +299,8 @@
295 msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
296 msgstr "Usage : xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
297
298-#: debug/xtrace.sh:32 elf/sotruss.ksh:57 elf/sotruss.ksh:68
299-#: elf/sotruss.ksh:136 malloc/memusage.sh:26
300+#: debug/xtrace.sh:32 elf/sotruss.ksh:56 elf/sotruss.ksh:67
301+#: elf/sotruss.ksh:135 malloc/memusage.sh:26
302 msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
303 msgstr "Pour en savoir davantage, faites : «%s --help » ou «%s --usage».\\n"
304
305@@ -335,20 +334,25 @@
306 "les options de formes courtes.\n"
307 "\n"
308
309-#: debug/xtrace.sh:126
310+#: debug/xtrace.sh:57 elf/ldd.bash.in:55 elf/sotruss.ksh:49
311+#: malloc/memusage.sh:64
312+msgid "For bug reporting instructions, please see:\\\\n%s.\\\\n"
313+msgstr "Pour les instructions de rapport de bug, SVP voyez là : \\\\n%s.\\\\n"
314+
315+#: debug/xtrace.sh:125
316 msgid "xtrace: unrecognized option \\`$1'\\n"
317 msgstr "xtrace : option non reconnue\\`$1'\\n"
318
319-#: debug/xtrace.sh:139
320+#: debug/xtrace.sh:138
321 msgid "No program name given\\n"
322 msgstr "Le nom de programme n'est pas indiqué\\n"
323
324-#: debug/xtrace.sh:147
325+#: debug/xtrace.sh:146
326 #, sh-format
327 msgid "executable \\`$program' not found\\n"
328 msgstr "exécutable \\`$program' non trouvé\\n"
329
330-#: debug/xtrace.sh:151
331+#: debug/xtrace.sh:150
332 #, sh-format
333 msgid "\\`$program' is no executable\\n"
334 msgstr "\\`$program' n'est pas un exécutable\\n"
335@@ -377,85 +381,85 @@
336 msgid "unknown"
337 msgstr "inconnu"
338
339-#: elf/cache.c:115
340+#: elf/cache.c:121
341 msgid "Unknown OS"
342 msgstr "Système d'exploitation inconnu"
343
344-#: elf/cache.c:120
345+#: elf/cache.c:126
346 #, c-format
347 msgid ", OS ABI: %s %d.%d.%d"
348 msgstr ", Système d'exploitation ABI : %s %d.%d.%d"
349
350-#: elf/cache.c:137 elf/ldconfig.c:1306
351+#: elf/cache.c:143 elf/ldconfig.c:1309
352 #, c-format
353 msgid "Can't open cache file %s\n"
354 msgstr "Ne peut ouvrir le fichier de cache %s\n"
355
356-#: elf/cache.c:151
357+#: elf/cache.c:157
358 #, c-format
359 msgid "mmap of cache file failed.\n"
360 msgstr "la procédure mmap sur le fichier de cache a échouée\n"
361
362-#: elf/cache.c:155 elf/cache.c:169
363+#: elf/cache.c:161 elf/cache.c:175
364 #, c-format
365 msgid "File is not a cache file.\n"
366 msgstr "Fichier n'est pas un fichier de cache.\n"
367
368-#: elf/cache.c:202 elf/cache.c:212
369+#: elf/cache.c:208 elf/cache.c:218
370 #, c-format
371 msgid "%d libs found in cache `%s'\n"
372 msgstr "%d libs trouvé dans le cache « %s »\n"
373
374-#: elf/cache.c:406
375+#: elf/cache.c:412
376 #, c-format
377 msgid "Can't create temporary cache file %s"
378 msgstr "Ne peut créer un fichier de cache temporaire %s"
379
380-#: elf/cache.c:414 elf/cache.c:424 elf/cache.c:428 elf/cache.c:433
381+#: elf/cache.c:420 elf/cache.c:430 elf/cache.c:434 elf/cache.c:439
382 #, c-format
383 msgid "Writing of cache data failed"
384 msgstr "Échec d'écriture des données du cache"
385
386-#: elf/cache.c:438
387+#: elf/cache.c:444
388 #, c-format
389 msgid "Changing access rights of %s to %#o failed"
390 msgstr "Échec de la modification des droits d'accès de %s à %#o"
391
392-#: elf/cache.c:443
393+#: elf/cache.c:449
394 #, c-format
395 msgid "Renaming of %s to %s failed"
396 msgstr "Échec du changement de nom de %s vers %s"
397
398-#: elf/dl-close.c:386 elf/dl-open.c:460
399+#: elf/dl-close.c:378 elf/dl-open.c:474
400 msgid "cannot create scope list"
401 msgstr "ne peut créer une liste panorama"
402
403-#: elf/dl-close.c:773
404+#: elf/dl-close.c:771
405 msgid "shared object not open"
406 msgstr "objet partagé non ouvert"
407
408-#: elf/dl-deps.c:114
409+#: elf/dl-deps.c:112
410 msgid "DST not allowed in SUID/SGID programs"
411 msgstr "DST non permis dans un programme SUID/SGID"
412
413-#: elf/dl-deps.c:127
414+#: elf/dl-deps.c:125
415 msgid "empty dynamic string token substitution"
416 msgstr "la chaîne dynamique d'un jeton de substitution est vide"
417
418-#: elf/dl-deps.c:133
419+#: elf/dl-deps.c:131
420 #, c-format
421 msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n"
422 msgstr "ne peut charger l'auxiliaire « %s » en raison d'une chaîne dynamique de substitution de jeton vide\n"
423
424-#: elf/dl-deps.c:486
425+#: elf/dl-deps.c:483
426 msgid "cannot allocate dependency list"
427 msgstr "ne peut allouer une liste de dépendances"
428
429-#: elf/dl-deps.c:522 elf/dl-deps.c:582
430+#: elf/dl-deps.c:520 elf/dl-deps.c:580
431 msgid "cannot allocate symbol search list"
432 msgstr "ne peut allouer la liste des symboles à rechercher"
433
434-#: elf/dl-deps.c:562
435+#: elf/dl-deps.c:560
436 msgid "Filters not supported with LD_TRACE_PRELINKING"
437 msgstr "Filtres non supportés avec LD_TRACE_PRELINKING"
438
439@@ -479,187 +483,191 @@
440 msgid "internal error: symidx out of range of fptr table"
441 msgstr "erreur interne : symidx en dehors de la table fptr "
442
443-#: elf/dl-load.c:470
444+#: elf/dl-hwcaps.c:173 elf/dl-hwcaps.c:185
445+msgid "cannot create capability list"
446+msgstr "ne peut créer une liste des possibilités"
447+
448+#: elf/dl-load.c:471
449 msgid "cannot allocate name record"
450 msgstr "ne peut allouer un enregistrement de nom"
451
452-#: elf/dl-load.c:547 elf/dl-load.c:663 elf/dl-load.c:748 elf/dl-load.c:861
453+#: elf/dl-load.c:548 elf/dl-load.c:664 elf/dl-load.c:749 elf/dl-load.c:862
454 msgid "cannot create cache for search path"
455 msgstr "ne peut créer le cache pour le chemin de recherche"
456
457-#: elf/dl-load.c:638
458+#: elf/dl-load.c:639
459 msgid "cannot create RUNPATH/RPATH copy"
460 msgstr "ne peut créer une copie RUNPATH/RPATH"
461
462-#: elf/dl-load.c:734
463+#: elf/dl-load.c:735
464 msgid "cannot create search path array"
465 msgstr "ne peut créer un tableau des chemins de recherche"
466
467-#: elf/dl-load.c:932
468+#: elf/dl-load.c:934
469 msgid "cannot stat shared object"
470 msgstr "ne peut évaluer par stat() l'objet partagé"
471
472-#: elf/dl-load.c:1010
473+#: elf/dl-load.c:1012
474 msgid "cannot open zero fill device"
475 msgstr "ne peut ouvrir le fichier de périphérique rempli de zéros"
476
477-#: elf/dl-load.c:1056 elf/dl-load.c:2317
478+#: elf/dl-load.c:1059 elf/dl-load.c:2339
479 msgid "cannot create shared object descriptor"
480 msgstr "ne peut créer un descripteur d'objet partagé"
481
482-#: elf/dl-load.c:1075 elf/dl-load.c:1731 elf/dl-load.c:1834
483+#: elf/dl-load.c:1078 elf/dl-load.c:1751 elf/dl-load.c:1854
484 msgid "cannot read file data"
485 msgstr "ne peut lire les données du fichier"
486
487-#: elf/dl-load.c:1121
488+#: elf/dl-load.c:1124
489 msgid "ELF load command alignment not page-aligned"
490 msgstr "Commande de chargement sur une page ELF qui n'est pas alignée"
491
492-#: elf/dl-load.c:1128
493+#: elf/dl-load.c:1131
494 msgid "ELF load command address/offset not properly aligned"
495 msgstr "Commande de chargement sur une adresse ELF incorrectement alignée"
496
497-#: elf/dl-load.c:1211
498+#: elf/dl-load.c:1216
499 msgid "cannot allocate TLS data structures for initial thread"
500 msgstr "ne peut allouer une structure de données TLS pour un thread initial"
501
502-#: elf/dl-load.c:1234
503+#: elf/dl-load.c:1239
504 msgid "cannot handle TLS data"
505 msgstr "ne peut traiter les données TLS"
506
507-#: elf/dl-load.c:1253
508+#: elf/dl-load.c:1258
509 msgid "object file has no loadable segments"
510 msgstr "le fichier objet n'a pas de segment chargeable"
511
512-#: elf/dl-load.c:1289
513+#: elf/dl-load.c:1294
514 msgid "failed to map segment from shared object"
515 msgstr "échec d'adressage (mapping) du segment de l'objet partagé"
516
517-#: elf/dl-load.c:1315
518+#: elf/dl-load.c:1320
519 msgid "cannot dynamically load executable"
520 msgstr "ne peut dynamiquement charger un exécutable"
521
522-#: elf/dl-load.c:1377
523+#: elf/dl-load.c:1383
524 msgid "cannot change memory protections"
525 msgstr "ne peut modifier les protections de mémoire"
526
527-#: elf/dl-load.c:1396
528+#: elf/dl-load.c:1402
529 msgid "cannot map zero-fill pages"
530 msgstr "ne peut adresser des pages remplies de zéros"
531
532-#: elf/dl-load.c:1410
533+#: elf/dl-load.c:1416
534 msgid "object file has no dynamic section"
535 msgstr "le fichier objet n'a pas de section dynamique"
536
537-#: elf/dl-load.c:1433
538+#: elf/dl-load.c:1439
539 msgid "shared object cannot be dlopen()ed"
540 msgstr "l'objet partagé ne peut pas être ouvert via dlopen()"
541
542-#: elf/dl-load.c:1446
543+#: elf/dl-load.c:1452
544 msgid "cannot allocate memory for program header"
545 msgstr "ne peut allouer de la mémoire pour une en-tête de programme"
546
547-#: elf/dl-load.c:1463 elf/dl-open.c:178
548+#: elf/dl-load.c:1469 elf/dl-open.c:180
549 msgid "invalid caller"
550 msgstr "appelant invalide"
551
552-#: elf/dl-load.c:1502
553+#: elf/dl-load.c:1508
554 msgid "cannot enable executable stack as shared object requires"
555 msgstr "ne peut activer une pile exécutable comme l'objet partagé le requiert"
556
557-#: elf/dl-load.c:1515
558+#: elf/dl-load.c:1521
559 msgid "cannot close file descriptor"
560 msgstr "ne peut pas fermer le descripteur de fichier"
561
562-#: elf/dl-load.c:1731
563+#: elf/dl-load.c:1751
564 msgid "file too short"
565 msgstr "fichier trop court"
566
567-#: elf/dl-load.c:1767
568+#: elf/dl-load.c:1787
569 msgid "invalid ELF header"
570 msgstr "en-tête ELF invalide"
571
572-#: elf/dl-load.c:1779
573+#: elf/dl-load.c:1799
574 msgid "ELF file data encoding not big-endian"
575 msgstr "l'encodage des données du fichier ELF n'est pas big-endian"
576
577-#: elf/dl-load.c:1781
578+#: elf/dl-load.c:1801
579 msgid "ELF file data encoding not little-endian"
580 msgstr "l'encodage des données du fichier ELF n'est pas little-endian"
581
582-#: elf/dl-load.c:1785
583+#: elf/dl-load.c:1805
584 msgid "ELF file version ident does not match current one"
585 msgstr "l'identifiant de version du fichier ELF ne concorde pas avec la version courante"
586
587-#: elf/dl-load.c:1789
588+#: elf/dl-load.c:1809
589 msgid "ELF file OS ABI invalid"
590 msgstr "Système d'exploitation du fichier ELF ABI invalide"
591
592-#: elf/dl-load.c:1792
593+#: elf/dl-load.c:1812
594 msgid "ELF file ABI version invalid"
595 msgstr "Version du fichier ELF ABI invalide"
596
597-#: elf/dl-load.c:1795
598+#: elf/dl-load.c:1815
599 msgid "nonzero padding in e_ident"
600 msgstr "remplissage sans zéro dans e_ident"
601
602-#: elf/dl-load.c:1798
603+#: elf/dl-load.c:1818
604 msgid "internal error"
605 msgstr "Erreur interne"
606
607-#: elf/dl-load.c:1805
608+#: elf/dl-load.c:1825
609 msgid "ELF file version does not match current one"
610 msgstr "Version du fichier ELF ne concorde pas avec la version courante"
611
612-#: elf/dl-load.c:1813
613+#: elf/dl-load.c:1833
614 msgid "only ET_DYN and ET_EXEC can be loaded"
615 msgstr "Seuls ET_DYN et ET_EXEC peuvent être chargés"
616
617-#: elf/dl-load.c:1819
618+#: elf/dl-load.c:1839
619 msgid "ELF file's phentsize not the expected size"
620 msgstr "« Phentize » du fichier ELF ne concorde pas avec la taille prévue"
621
622-#: elf/dl-load.c:2336
623+#: elf/dl-load.c:2358
624 msgid "wrong ELF class: ELFCLASS64"
625 msgstr "mauvaise classe ELF : ELFCLASS64"
626
627-#: elf/dl-load.c:2337
628+#: elf/dl-load.c:2359
629 msgid "wrong ELF class: ELFCLASS32"
630 msgstr "mauvaise classe ELF : ELFCLASS32"
631
632-#: elf/dl-load.c:2340
633+#: elf/dl-load.c:2362
634 msgid "cannot open shared object file"
635 msgstr "Ne peut ouvrir le fichier d'objet partagé"
636
637-#: elf/dl-lookup.c:756 ports/sysdeps/mips/dl-lookup.c:773
638+#: elf/dl-lookup.c:757 ports/sysdeps/mips/dl-lookup.c:774
639 msgid "relocation error"
640 msgstr "erreur de réaffectation"
641
642-#: elf/dl-lookup.c:785 ports/sysdeps/mips/dl-lookup.c:802
643+#: elf/dl-lookup.c:786 ports/sysdeps/mips/dl-lookup.c:803
644 msgid "symbol lookup error"
645 msgstr "erreur de recherche de symbole"
646
647-#: elf/dl-open.c:108
648+#: elf/dl-open.c:110
649 msgid "cannot extend global scope"
650 msgstr "ne peut augmenter l'étendue de la plage globale"
651
652-#: elf/dl-open.c:510
653+#: elf/dl-open.c:524
654 msgid "TLS generation counter wrapped! Please report this."
655 msgstr "Le compteur de génération TLS a bouclé ! SVP expédier un rapport avec le script 'glibcbug'."
656
657-#: elf/dl-open.c:532
658+#: elf/dl-open.c:546
659 msgid "cannot load any more object with static TLS"
660 msgstr "ne peut pas charger plus d'objets avec TLS statique"
661
662-#: elf/dl-open.c:581
663+#: elf/dl-open.c:599
664 msgid "invalid mode for dlopen()"
665 msgstr "mode invalide pour dlopen()"
666
667-#: elf/dl-open.c:598
668+#: elf/dl-open.c:616
669 msgid "no more namespaces available for dlmopen()"
670 msgstr "plus d'espace de nommage disponible pour dlmopen()"
671
672-#: elf/dl-open.c:616
673+#: elf/dl-open.c:634
674 msgid "invalid target namespace in dlmopen()"
675 msgstr "espace de nommage cible invalide dans dlmopen()"
676
677@@ -689,23 +697,19 @@
678 msgid "cannot apply additional memory protection after relocation"
679 msgstr "ne peut appliquer les protections additionnelle de mémoire après la réaffectation"
680
681-#: elf/dl-sym.c:162
682+#: elf/dl-sym.c:163
683 msgid "RTLD_NEXT used in code not dynamically loaded"
684 msgstr "RTLD_NEXT est utilisé dans du code qui n'est pas chargé dynamiquement"
685
686-#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
687-msgid "cannot create capability list"
688-msgstr "ne peut créer une liste des possibilités"
689-
690-#: elf/dl-tls.c:872
691+#: elf/dl-tls.c:875
692 msgid "cannot create TLS data structures"
693 msgstr "ne peut créer les structures de données TLS"
694
695-#: elf/dl-version.c:171
696+#: elf/dl-version.c:166
697 msgid "version lookup error"
698 msgstr "erreur de recherche de version"
699
700-#: elf/dl-version.c:302
701+#: elf/dl-version.c:297
702 msgid "cannot allocate version reference table"
703 msgstr "ne peut allouer la table de référence des versions"
704
705@@ -773,156 +777,156 @@
706 msgid "Configure Dynamic Linker Run Time Bindings."
707 msgstr "Configuration dynamique des éditions de liens lors de l'exécution."
708
709-#: elf/ldconfig.c:338
710+#: elf/ldconfig.c:341
711 #, c-format
712 msgid "Path `%s' given more than once"
713 msgstr "Chemin « %s » donné plus d'une fois"
714
715-#: elf/ldconfig.c:378
716+#: elf/ldconfig.c:381
717 #, c-format
718 msgid "%s is not a known library type"
719 msgstr "%s n'est pas un type de librairie connu"
720
721-#: elf/ldconfig.c:406
722+#: elf/ldconfig.c:409
723 #, c-format
724 msgid "Can't stat %s"
725 msgstr "Ne peut évaluer par stat %s"
726
727-#: elf/ldconfig.c:480
728+#: elf/ldconfig.c:483
729 #, c-format
730 msgid "Can't stat %s\n"
731 msgstr "Ne peut évaluer par stat %s\n"
732
733-#: elf/ldconfig.c:490
734+#: elf/ldconfig.c:493
735 #, c-format
736 msgid "%s is not a symbolic link\n"
737 msgstr "%s n'est pas un lien symbolique\n"
738
739-#: elf/ldconfig.c:509
740+#: elf/ldconfig.c:512
741 #, c-format
742 msgid "Can't unlink %s"
743 msgstr "Ne peut enlever le lien (unlink) %s"
744
745-#: elf/ldconfig.c:515
746+#: elf/ldconfig.c:518
747 #, c-format
748 msgid "Can't link %s to %s"
749 msgstr "Ne peut établir un lien entre %s et %s"
750
751-#: elf/ldconfig.c:521
752+#: elf/ldconfig.c:524
753 msgid " (changed)\n"
754 msgstr " (a été modifié)\n"
755
756-#: elf/ldconfig.c:523
757+#: elf/ldconfig.c:526
758 msgid " (SKIPPED)\n"
759 msgstr " (ESCAMOTÉ)\n"
760
761-#: elf/ldconfig.c:578
762+#: elf/ldconfig.c:581
763 #, c-format
764 msgid "Can't find %s"
765 msgstr "Ne peut repérer %s"
766
767-#: elf/ldconfig.c:594 elf/ldconfig.c:767 elf/ldconfig.c:826 elf/ldconfig.c:860
768+#: elf/ldconfig.c:597 elf/ldconfig.c:770 elf/ldconfig.c:829 elf/ldconfig.c:863
769 #, c-format
770 msgid "Cannot lstat %s"
771 msgstr "Ne peut évaluer par lstat %s"
772
773-#: elf/ldconfig.c:601
774+#: elf/ldconfig.c:604
775 #, c-format
776 msgid "Ignored file %s since it is not a regular file."
777 msgstr "A ignoré le fichier %s parce que ce n'est pas un fichier régulier."
778
779-#: elf/ldconfig.c:610
780+#: elf/ldconfig.c:613
781 #, c-format
782 msgid "No link created since soname could not be found for %s"
783 msgstr "Aucun lien créé étant donné que n'a pas été repéré %s"
784
785-#: elf/ldconfig.c:693
786+#: elf/ldconfig.c:696
787 #, c-format
788 msgid "Can't open directory %s"
789 msgstr "Ne peut ouvrir le dossier %s"
790
791-#: elf/ldconfig.c:785 elf/ldconfig.c:847 elf/readlib.c:90
792+#: elf/ldconfig.c:788 elf/ldconfig.c:850 elf/readlib.c:90
793 #, c-format
794 msgid "Input file %s not found.\n"
795 msgstr "Fichier d'entrée %s non repéré\n"
796
797-#: elf/ldconfig.c:792
798+#: elf/ldconfig.c:795
799 #, c-format
800 msgid "Cannot stat %s"
801 msgstr "Ne peut évaluer par stat %s"
802
803-#: elf/ldconfig.c:921
804+#: elf/ldconfig.c:924
805 #, c-format
806 msgid "libc5 library %s in wrong directory"
807 msgstr "librairie libc5 %s est dans le mauvais dossier"
808
809-#: elf/ldconfig.c:924
810+#: elf/ldconfig.c:927
811 #, c-format
812 msgid "libc6 library %s in wrong directory"
813 msgstr "librairie libc6 %s est dans le mauvais dossier"
814
815-#: elf/ldconfig.c:927
816+#: elf/ldconfig.c:930
817 #, c-format
818 msgid "libc4 library %s in wrong directory"
819 msgstr "librairie libc4 %s est dans le mauvais dossier"
820
821-#: elf/ldconfig.c:955
822+#: elf/ldconfig.c:958
823 #, c-format
824 msgid "libraries %s and %s in directory %s have same soname but different type."
825 msgstr "Les librairies %s et %s du dossier %s ont le même nom mais sont de types différents."
826
827-#: elf/ldconfig.c:1064
828+#: elf/ldconfig.c:1067
829 #, c-format
830 msgid "Warning: ignoring configuration file that cannot be opened: %s"
831 msgstr "Attention : ignore tout fichier de configuration qui ne peut s'ouvrir : %s"
832
833-#: elf/ldconfig.c:1130
834+#: elf/ldconfig.c:1133
835 #, c-format
836 msgid "%s:%u: bad syntax in hwcap line"
837 msgstr "%s:%u : mauvaise syntaxe dans la ligne hwcap"
838
839-#: elf/ldconfig.c:1136
840+#: elf/ldconfig.c:1139
841 #, c-format
842 msgid "%s:%u: hwcap index %lu above maximum %u"
843 msgstr "%s:%u : l'index hwcap %lu dépasse le maximum %u"
844
845-#: elf/ldconfig.c:1143 elf/ldconfig.c:1151
846+#: elf/ldconfig.c:1146 elf/ldconfig.c:1154
847 #, c-format
848 msgid "%s:%u: hwcap index %lu already defined as %s"
849 msgstr "%s:%u : l'index hwcap %lu déjà défini comme %s"
850
851-#: elf/ldconfig.c:1154
852+#: elf/ldconfig.c:1157
853 #, c-format
854 msgid "%s:%u: duplicate hwcap %lu %s"
855 msgstr "%s:%u : hwcap en doublon %lu %s"
856
857-#: elf/ldconfig.c:1176
858+#: elf/ldconfig.c:1179
859 #, c-format
860 msgid "need absolute file name for configuration file when using -r"
861 msgstr "nécessite un nom de fichier absolu pour le fichier de configuration quand on utilise -r"
862
863-#: elf/ldconfig.c:1183 locale/programs/xmalloc.c:65 malloc/obstack.c:433
864+#: elf/ldconfig.c:1186 locale/programs/xmalloc.c:65 malloc/obstack.c:433
865 #: malloc/obstack.c:435 posix/getconf.c:1076 posix/getconf.c:1296
866 #, c-format
867 msgid "memory exhausted"
868 msgstr "mémoire épuisée"
869
870-#: elf/ldconfig.c:1215
871+#: elf/ldconfig.c:1218
872 #, c-format
873 msgid "%s:%u: cannot read directory %s"
874 msgstr "%s:%u : ne peut lire le dossier %s"
875
876-#: elf/ldconfig.c:1259
877+#: elf/ldconfig.c:1262
878 #, c-format
879 msgid "relative path `%s' used to build cache"
880 msgstr "chemin relatif `%s' utilisé pour construire le cache"
881
882-#: elf/ldconfig.c:1285
883+#: elf/ldconfig.c:1288
884 #, c-format
885 msgid "Can't chdir to /"
886 msgstr "Ne peut se positionner (chdir) dans /"
887
888-#: elf/ldconfig.c:1326
889+#: elf/ldconfig.c:1329
890 #, c-format
891 msgid "Can't open cache file directory %s\n"
892 msgstr "Ne peut ouvrir le dossier des fichiers de cache %s\n"
893@@ -949,46 +953,46 @@
894 " -u, --unused affiche les dépendances directes non utilisées\n"
895 " -v, --verbose affiche toutes les informations\n"
896
897-#: elf/ldd.bash.in:81
898+#: elf/ldd.bash.in:80
899 msgid "ldd: option \\`$1' is ambiguous"
900 msgstr "ldd : option \\`$1' est ambiguë"
901
902-#: elf/ldd.bash.in:88
903+#: elf/ldd.bash.in:87
904 msgid "unrecognized option"
905 msgstr "option non reconnue"
906
907-#: elf/ldd.bash.in:89 elf/ldd.bash.in:127
908+#: elf/ldd.bash.in:88 elf/ldd.bash.in:126
909 msgid "Try \\`ldd --help' for more information."
910 msgstr "Pour en savoir davantage, faites : \\`ldd --help'."
911
912-#: elf/ldd.bash.in:126
913+#: elf/ldd.bash.in:125
914 msgid "missing file arguments"
915 msgstr "arguments de fichier manquants"
916
917 #. TRANS No such file or directory. This is a ``file doesn't exist'' error
918 #. TRANS for ordinary files that are referenced in contexts where they are
919 #. TRANS expected to already exist.
920-#: elf/ldd.bash.in:149 sysdeps/gnu/errlist.c:36
921+#: elf/ldd.bash.in:148 sysdeps/gnu/errlist.c:36
922 msgid "No such file or directory"
923 msgstr "Aucun fichier ou dossier de ce type"
924
925-#: elf/ldd.bash.in:152 inet/rcmd.c:488
926+#: elf/ldd.bash.in:151 inet/rcmd.c:488
927 msgid "not regular file"
928 msgstr "n'est pas un fichier régulier"
929
930-#: elf/ldd.bash.in:155
931+#: elf/ldd.bash.in:154
932 msgid "warning: you do not have execution permission for"
933 msgstr "attention : vous n'avez pas la permission d'exécution pour"
934
935-#: elf/ldd.bash.in:184
936+#: elf/ldd.bash.in:183
937 msgid "\tnot a dynamic executable"
938 msgstr "\tn'est pas un exécutable dynamique"
939
940-#: elf/ldd.bash.in:192
941+#: elf/ldd.bash.in:191
942 msgid "exited with unknown exit code"
943 msgstr "a quitté avec un code retour inconnu"
944
945-#: elf/ldd.bash.in:197
946+#: elf/ldd.bash.in:196
947 msgid "error: you do not have read permission for"
948 msgstr "erreur : vous n'avez pas de permission de lecture pour"
949
950@@ -1027,55 +1031,55 @@
951 msgid "cannot read object name"
952 msgstr "ne peut lire le nom d'objet"
953
954-#: elf/pldd.c:67
955+#: elf/pldd.c:65
956 msgid "List dynamic shared objects loaded into process."
957 msgstr "Liste les objets partagés dynamiques chargés dans le process."
958
959-#: elf/pldd.c:71
960+#: elf/pldd.c:69
961 msgid "PID"
962 msgstr "PID"
963
964-#: elf/pldd.c:102
965+#: elf/pldd.c:100
966 #, c-format
967 msgid "Exactly one parameter with process ID required.\n"
968 msgstr "Un paramètre exactement avec le process ID est requis.\n"
969
970-#: elf/pldd.c:114
971+#: elf/pldd.c:112
972 #, c-format
973 msgid "invalid process ID '%s'"
974 msgstr "process ID invalide '%s'"
975
976-#: elf/pldd.c:122
977+#: elf/pldd.c:120
978 #, c-format
979 msgid "cannot open %s"
980 msgstr "Ne peut ouvrir %s"
981
982-#: elf/pldd.c:147
983+#: elf/pldd.c:145
984 #, c-format
985 msgid "cannot open %s/task"
986 msgstr "Ne peut ouvrir %s/tâche"
987
988-#: elf/pldd.c:150
989+#: elf/pldd.c:148
990 #, c-format
991 msgid "cannot prepare reading %s/task"
992 msgstr "ne peut préparer la lecture %s/tâche"
993
994-#: elf/pldd.c:163
995+#: elf/pldd.c:161
996 #, c-format
997 msgid "invalid thread ID '%s'"
998 msgstr "ID de fil (thread) invalide '%s'"
999
1000-#: elf/pldd.c:174
1001+#: elf/pldd.c:172
1002 #, c-format
1003 msgid "cannot attach to process %lu"
1004 msgstr "ne peut s'attacher au process %lu"
1005
1006-#: elf/pldd.c:246
1007+#: elf/pldd.c:264
1008 #, c-format
1009 msgid "cannot get information about process %lu"
1010 msgstr "ne peut récupérer l'information à propos du process %lu"
1011
1012-#: elf/pldd.c:259
1013+#: elf/pldd.c:277
1014 #, c-format
1015 msgid "process %lu is no ELF program"
1016 msgstr "le process %lu n'est pas un programme ELF"
1017@@ -1209,19 +1213,19 @@
1018 "Les arguments obligatoires pour options de formes longues\n"
1019 "sont aussi obligatoires pour options de forme courtes correspondantes."
1020
1021-#: elf/sotruss.ksh:56
1022+#: elf/sotruss.ksh:55
1023 msgid "%s: option requires an argument -- '%s'\\n"
1024 msgstr "%s : l'option requiert un argument -- '%s'\\n"
1025
1026-#: elf/sotruss.ksh:62
1027+#: elf/sotruss.ksh:61
1028 msgid "%s: option is ambiguous; possibilities:"
1029 msgstr "%s : l'option est ambiguë; possibilités:"
1030
1031-#: elf/sotruss.ksh:80
1032+#: elf/sotruss.ksh:79
1033 msgid "Written by %s.\\n"
1034 msgstr "Écrit par %s.\\n"
1035
1036-#: elf/sotruss.ksh:87
1037+#: elf/sotruss.ksh:86
1038 msgid ""
1039 "Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n"
1040 "\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\n"
1041@@ -1233,7 +1237,7 @@
1042 "\t [--help] [--usage] [--version] [--]\n"
1043 "\t EXECUTABLE [EXECUTABLE-OPTION...]\\n"
1044
1045-#: elf/sotruss.ksh:135
1046+#: elf/sotruss.ksh:134
1047 msgid "%s: unrecognized option '%c%s'\\n"
1048 msgstr "%s : option non reconnue « %c%s »\\n"
1049
1050@@ -1261,97 +1265,97 @@
1051 msgid "SHOBJ [PROFDATA]"
1052 msgstr "SHOBJ [PROFDATA]"
1053
1054-#: elf/sprof.c:429
1055+#: elf/sprof.c:432
1056 #, c-format
1057 msgid "failed to load shared object `%s'"
1058 msgstr "échec de chargement de l'objet partagé « %s »"
1059
1060-#: elf/sprof.c:438
1061+#: elf/sprof.c:441
1062 #, c-format
1063 msgid "cannot create internal descriptors"
1064 msgstr "ne peut créer les descripteurs internes"
1065
1066-#: elf/sprof.c:550
1067+#: elf/sprof.c:553
1068 #, c-format
1069 msgid "Reopening shared object `%s' failed"
1070 msgstr "Échec de réouverture de l'objet partagé « %s »"
1071
1072-#: elf/sprof.c:557 elf/sprof.c:652
1073+#: elf/sprof.c:560 elf/sprof.c:655
1074 #, c-format
1075 msgid "reading of section headers failed"
1076 msgstr "Échec de la lecture d'en-têtes de section"
1077
1078-#: elf/sprof.c:565 elf/sprof.c:660
1079+#: elf/sprof.c:568 elf/sprof.c:663
1080 #, c-format
1081 msgid "reading of section header string table failed"
1082 msgstr "Échec de lecture de la table des chaînes d'en-têtes de section"
1083
1084-#: elf/sprof.c:591
1085+#: elf/sprof.c:594
1086 #, c-format
1087 msgid "*** Cannot read debuginfo file name: %m\n"
1088 msgstr "*** Ne peut lire le nom de fichier de debuginfo : %m\n"
1089
1090-#: elf/sprof.c:612
1091+#: elf/sprof.c:615
1092 #, c-format
1093 msgid "cannot determine file name"
1094 msgstr "Ne peut déterminer le nom de fichier"
1095
1096-#: elf/sprof.c:645
1097+#: elf/sprof.c:648
1098 #, c-format
1099 msgid "reading of ELF header failed"
1100 msgstr "Échec de lecture de l'en-tête ELF"
1101
1102-#: elf/sprof.c:681
1103+#: elf/sprof.c:684
1104 #, c-format
1105 msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
1106 msgstr "*** Le fichier « %s » a été élagué : aucune analyse détaillée possible\n"
1107
1108-#: elf/sprof.c:711
1109+#: elf/sprof.c:714
1110 #, c-format
1111 msgid "failed to load symbol data"
1112 msgstr "échec du chargement de données de symbole"
1113
1114-#: elf/sprof.c:776
1115+#: elf/sprof.c:779
1116 #, c-format
1117 msgid "cannot load profiling data"
1118 msgstr "ne peut charger les données de profilage"
1119
1120-#: elf/sprof.c:785
1121+#: elf/sprof.c:788
1122 #, c-format
1123 msgid "while stat'ing profiling data file"
1124 msgstr "lors de l'évaluation par stat() du fichier de données de profilage"
1125
1126-#: elf/sprof.c:793
1127+#: elf/sprof.c:796
1128 #, c-format
1129 msgid "profiling data file `%s' does not match shared object `%s'"
1130 msgstr "Le fichier de données de profilage « %s » ne concorde pas avec l'objet partagé « %s »"
1131
1132-#: elf/sprof.c:804
1133+#: elf/sprof.c:807
1134 #, c-format
1135 msgid "failed to mmap the profiling data file"
1136 msgstr "Échec de la procédure mmap sur le fichier de données de profilage"
1137
1138-#: elf/sprof.c:812
1139+#: elf/sprof.c:815
1140 #, c-format
1141 msgid "error while closing the profiling data file"
1142 msgstr "erreur lors de la fermeture du fichier de données de profilage"
1143
1144-#: elf/sprof.c:821 elf/sprof.c:919
1145+#: elf/sprof.c:824 elf/sprof.c:922
1146 #, c-format
1147 msgid "cannot create internal descriptor"
1148 msgstr "ne peut créer un descripteur interne"
1149
1150-#: elf/sprof.c:895
1151+#: elf/sprof.c:898
1152 #, c-format
1153 msgid "`%s' is no correct profile data file for `%s'"
1154 msgstr "« %s » est un fichier de profilage incorrect pour « %s »"
1155
1156-#: elf/sprof.c:1076 elf/sprof.c:1134
1157+#: elf/sprof.c:1079 elf/sprof.c:1137
1158 #, c-format
1159 msgid "cannot allocate symbol data"
1160 msgstr "ne peut allouer les données des symboles"
1161
1162-#: iconv/iconv_charmap.c:143 iconv/iconv_prog.c:445
1163+#: iconv/iconv_charmap.c:143 iconv/iconv_prog.c:448
1164 #, c-format
1165 msgid "cannot open output file"
1166 msgstr "ne peut ouvrir le fichier de sortie"
1167@@ -1366,18 +1370,18 @@
1168 msgid "illegal input sequence at position %Zd"
1169 msgstr "séquence d'échappement d'entrée non permise à la position %Zd"
1170
1171-#: iconv/iconv_charmap.c:482 iconv/iconv_prog.c:536
1172+#: iconv/iconv_charmap.c:482 iconv/iconv_prog.c:539
1173 #, c-format
1174 msgid "incomplete character or shift sequence at end of buffer"
1175 msgstr "caractère ou séquence de changement incomplet à la fin du tampon"
1176
1177-#: iconv/iconv_charmap.c:527 iconv/iconv_charmap.c:563 iconv/iconv_prog.c:579
1178-#: iconv/iconv_prog.c:615
1179+#: iconv/iconv_charmap.c:527 iconv/iconv_charmap.c:563 iconv/iconv_prog.c:582
1180+#: iconv/iconv_prog.c:618
1181 #, c-format
1182 msgid "error while reading the input"
1183 msgstr "erreur lors de la lecture de l'entrée"
1184
1185-#: iconv/iconv_charmap.c:545 iconv/iconv_prog.c:597
1186+#: iconv/iconv_charmap.c:545 iconv/iconv_prog.c:600
1187 #, c-format
1188 msgid "unable to allocate buffer for input"
1189 msgstr "incapable d'allouer un tampon pour l'entrée"
1190@@ -1460,27 +1464,27 @@
1191 msgid "error while closing output file"
1192 msgstr "erreur lors de la fermeture du fichier de sortie"
1193
1194-#: iconv/iconv_prog.c:455
1195+#: iconv/iconv_prog.c:458
1196 #, c-format
1197 msgid "conversion stopped due to problem in writing the output"
1198 msgstr "conversion stoppée en raison d'un problème d'écriture à la sortie"
1199
1200-#: iconv/iconv_prog.c:532
1201+#: iconv/iconv_prog.c:535
1202 #, c-format
1203 msgid "illegal input sequence at position %ld"
1204 msgstr "séquence d'échappement non permise à la position %ld"
1205
1206-#: iconv/iconv_prog.c:540
1207+#: iconv/iconv_prog.c:543
1208 #, c-format
1209 msgid "internal error (illegal descriptor)"
1210 msgstr "erreur interne (descripteur non permis)"
1211
1212-#: iconv/iconv_prog.c:543
1213+#: iconv/iconv_prog.c:546
1214 #, c-format
1215 msgid "unknown iconv() error %d"
1216 msgstr "erreur inconnue de iconv() %d"
1217
1218-#: iconv/iconv_prog.c:788
1219+#: iconv/iconv_prog.c:791
1220 msgid ""
1221 "The following list contain all the coded character sets known. This does\n"
1222 "not necessarily mean that all combinations of these names can be used for\n"
1223@@ -1526,12 +1530,12 @@
1224 msgid "no output file produced because warnings were issued"
1225 msgstr "aucun fichier de sortie généré en raison d'avertissements émis"
1226
1227-#: iconv/iconvconfig.c:431
1228+#: iconv/iconvconfig.c:434
1229 #, c-format
1230 msgid "while inserting in search tree"
1231 msgstr "lors d'une insertion dans un arbre de recherche"
1232
1233-#: iconv/iconvconfig.c:1240
1234+#: iconv/iconvconfig.c:1243
1235 #, c-format
1236 msgid "cannot generate output file"
1237 msgstr "ne peut générer le fichier de sortie"
1238@@ -2636,7 +2640,7 @@
1239 msgid "Cannot set LC_ALL to default locale"
1240 msgstr "Ne peut initialiser LC_ALL à la locale par défaut"
1241
1242-#: locale/programs/locale.c:518
1243+#: locale/programs/locale.c:521
1244 #, c-format
1245 msgid "while preparing output"
1246 msgstr "lors de la préparation de la sortie"
1247@@ -2734,7 +2738,7 @@
1248 msgstr "ERREUR FATALE : le système ne peut définir « _POSIX2_LOCALEDEF »"
1249
1250 #: locale/programs/localedef.c:253 locale/programs/localedef.c:269
1251-#: locale/programs/localedef.c:595 locale/programs/localedef.c:615
1252+#: locale/programs/localedef.c:601 locale/programs/localedef.c:621
1253 #, c-format
1254 msgid "cannot open locale definition file `%s'"
1255 msgstr "Ne peut ouvrir le fichier des particularisations « %s »"
1256@@ -2744,7 +2748,7 @@
1257 msgid "cannot write output files to `%s'"
1258 msgstr "Ne peut écrire dans les fichiers de sortie vers « %s »"
1259
1260-#: locale/programs/localedef.c:362
1261+#: locale/programs/localedef.c:367
1262 #, c-format
1263 msgid ""
1264 "System's directory for character maps : %s\n"
1265@@ -2757,18 +2761,18 @@
1266 "\t\t du chemin des particularisations : %s\n"
1267 "%s"
1268
1269-#: locale/programs/localedef.c:563
1270+#: locale/programs/localedef.c:569
1271 #, c-format
1272 msgid "circular dependencies between locale definitions"
1273 msgstr "Dépendance circulaires entre les définitions de locales"
1274
1275-#: locale/programs/localedef.c:569
1276+#: locale/programs/localedef.c:575
1277 #, c-format
1278 msgid "cannot add already read locale `%s' a second time"
1279 msgstr "Ne peut ajouter une locale déjà lu « %s » une seconde fois"
1280
1281 #: locale/programs/locarchive.c:113 locale/programs/locarchive.c:347
1282-#: nss/makedb.c:289
1283+#: nss/makedb.c:290
1284 #, c-format
1285 msgid "cannot create temporary file"
1286 msgstr "ne peut créer un fichier temporaire"
1287@@ -2962,12 +2966,12 @@
1288 msgid "repertoire map file `%s' not found"
1289 msgstr "Fichier de la table des caractères « %s » non repérable"
1290
1291-#: login/programs/pt_chown.c:77
1292+#: login/programs/pt_chown.c:78
1293 #, c-format
1294 msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
1295 msgstr "Etablit les permissions d'accès, le propriétaire et le groupe du pseudo terminal esclave correspondant au pseudo terminal maître passé au descripteur de fichier`%d'. Ceci est le programme d'aide de la fonction `grantpt'. Il n'est pas prévu pour être lancé depuis la ligne de commande.\n"
1296
1297-#: login/programs/pt_chown.c:87
1298+#: login/programs/pt_chown.c:92
1299 #, c-format
1300 msgid ""
1301 "The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n"
1302@@ -2978,33 +2982,33 @@
1303 "\n"
1304 "%s"
1305
1306-#: login/programs/pt_chown.c:191
1307+#: login/programs/pt_chown.c:198
1308 #, c-format
1309 msgid "too many arguments"
1310 msgstr "trop d'arguments"
1311
1312-#: login/programs/pt_chown.c:199
1313+#: login/programs/pt_chown.c:206
1314 #, c-format
1315 msgid "needs to be installed setuid `root'"
1316 msgstr "nécessite d'être installé avec setuid `root'"
1317
1318-#: malloc/mcheck.c:349
1319+#: malloc/mcheck.c:348
1320 msgid "memory is consistent, library is buggy\n"
1321 msgstr "La mémoire est consistente, la librairie est fautive.\n"
1322
1323-#: malloc/mcheck.c:352
1324+#: malloc/mcheck.c:351
1325 msgid "memory clobbered before allocated block\n"
1326 msgstr "Mémoire écrasée avant le bloc alloué\n"
1327
1328-#: malloc/mcheck.c:355
1329+#: malloc/mcheck.c:354
1330 msgid "memory clobbered past end of allocated block\n"
1331 msgstr "Mémoire écrasée après la fin du bloc alloué\n"
1332
1333-#: malloc/mcheck.c:358
1334+#: malloc/mcheck.c:357
1335 msgid "block freed twice\n"
1336 msgstr "Bloc libéré deux fois\n"
1337
1338-#: malloc/mcheck.c:361
1339+#: malloc/mcheck.c:360
1340 msgid "bogus mcheck_status, library is buggy\n"
1341 msgstr "Statut de « mcheck_status » erroné, la librarie est erronée.\n"
1342
1343@@ -3066,7 +3070,7 @@
1344 "le sont aussi pour les options de forme courtes.\n"
1345 "\n"
1346
1347-#: malloc/memusage.sh:100
1348+#: malloc/memusage.sh:99
1349 msgid ""
1350 "Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
1351 "\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
1352@@ -3078,47 +3082,47 @@
1353 "\t [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
1354 "\t PROGRAM [PROGRAMOPTION]..."
1355
1356-#: malloc/memusage.sh:192
1357+#: malloc/memusage.sh:191
1358 msgid "memusage: option \\`${1##*=}' is ambiguous"
1359 msgstr "memusage : l'option \\`${1##*=}' est ambiguë"
1360
1361-#: malloc/memusage.sh:201
1362+#: malloc/memusage.sh:200
1363 msgid "memusage: unrecognized option \\`$1'"
1364 msgstr "memusage : option non reconnue \\`$1'"
1365
1366-#: malloc/memusage.sh:214
1367+#: malloc/memusage.sh:213
1368 msgid "No program name given"
1369 msgstr "Le nom de programme n'a pas été indiqué"
1370
1371-#: malloc/memusagestat.c:56
1372+#: malloc/memusagestat.c:55
1373 msgid "Name output file"
1374 msgstr "Nommer le fichier de sortie"
1375
1376-#: malloc/memusagestat.c:57
1377+#: malloc/memusagestat.c:56
1378 msgid "Title string used in output graphic"
1379 msgstr "Chaîne de titre utilisé dans le graphique de sortie"
1380
1381-#: malloc/memusagestat.c:58
1382+#: malloc/memusagestat.c:57
1383 msgid "Generate output linear to time (default is linear to number of function calls)"
1384 msgstr "Génération de sortie linéaire au temps (par défaut linéaire au nombre d'appels de fonction)"
1385
1386-#: malloc/memusagestat.c:60
1387+#: malloc/memusagestat.c:59
1388 msgid "Also draw graph for total memory consumption"
1389 msgstr "Afficher aussi le graphe de l'utilisation totale de la mémoire"
1390
1391-#: malloc/memusagestat.c:61
1392+#: malloc/memusagestat.c:60
1393 msgid "Make output graphic VALUE pixels wide"
1394 msgstr "Génère un graphe ayant pour largeur VALUE pixels"
1395
1396-#: malloc/memusagestat.c:62
1397+#: malloc/memusagestat.c:61
1398 msgid "Make output graphic VALUE pixels high"
1399 msgstr "Génère un graphe ayant VALUE pixels de hauteur"
1400
1401-#: malloc/memusagestat.c:67
1402+#: malloc/memusagestat.c:66
1403 msgid "Generate graphic from memory profiling data"
1404 msgstr "Génération du graphique des données de profilage de la mémoire"
1405
1406-#: malloc/memusagestat.c:70
1407+#: malloc/memusagestat.c:69
1408 msgid "DATAFILE [OUTFILE]"
1409 msgstr "DATAFILE [FICHIER_DE_SORTIE]"
1410
1411@@ -4016,23 +4020,23 @@
1412 msgid "setgroups failed"
1413 msgstr "échec de setgroups"
1414
1415-#: nscd/grpcache.c:390 nscd/hstcache.c:440 nscd/initgrcache.c:411
1416+#: nscd/grpcache.c:407 nscd/hstcache.c:440 nscd/initgrcache.c:411
1417 #: nscd/pwdcache.c:383 nscd/servicescache.c:338
1418 #, c-format
1419 msgid "short write in %s: %s"
1420 msgstr "Écriture écourtée dans %s : %s"
1421
1422-#: nscd/grpcache.c:435 nscd/initgrcache.c:77
1423+#: nscd/grpcache.c:452 nscd/initgrcache.c:77
1424 #, c-format
1425 msgid "Haven't found \"%s\" in group cache!"
1426 msgstr "N'a pas trouvé « %s » dans la cache du groupe !"
1427
1428-#: nscd/grpcache.c:437 nscd/initgrcache.c:79
1429+#: nscd/grpcache.c:454 nscd/initgrcache.c:79
1430 #, c-format
1431 msgid "Reloading \"%s\" in group cache!"
1432 msgstr "Recharge « %s » dans le cache groupe !"
1433
1434-#: nscd/grpcache.c:516
1435+#: nscd/grpcache.c:533
1436 #, c-format
1437 msgid "Invalid numeric gid \"%s\"!"
1438 msgstr "gid numérique invalide « %s » !"
1439@@ -4115,7 +4119,7 @@
1440 msgid "Name Service Cache Daemon."
1441 msgstr "« Daemon » du cache du service de noms."
1442
1443-#: nscd/nscd.c:164 nss/getent.c:999 nss/makedb.c:207
1444+#: nscd/nscd.c:164 nss/getent.c:999 nss/makedb.c:208
1445 #, c-format
1446 msgid "wrong number of arguments"
1447 msgstr "Mauvais nombre d'arguments"
1448@@ -4144,32 +4148,32 @@
1449 msgid "Could not create log file"
1450 msgstr "N'a pu créé le fichier journal"
1451
1452-#: nscd/nscd.c:346 nscd/nscd.c:371 nscd/nscd_stat.c:173
1453+#: nscd/nscd.c:348 nscd/nscd.c:373 nscd/nscd_stat.c:173
1454 #, c-format
1455 msgid "Only root is allowed to use this option!"
1456 msgstr "Seul ROOT est autorisé à utiliser cette option !"
1457
1458-#: nscd/nscd.c:386
1459+#: nscd/nscd.c:388
1460 #, c-format
1461 msgid "'%s' is not a known database"
1462 msgstr "'%s' n'est pas une base de donnée connue"
1463
1464-#: nscd/nscd.c:411 nscd/nscd_stat.c:192
1465+#: nscd/nscd.c:413 nscd/nscd_stat.c:192
1466 #, c-format
1467 msgid "write incomplete"
1468 msgstr "écriture incomplète"
1469
1470-#: nscd/nscd.c:422
1471+#: nscd/nscd.c:424
1472 #, c-format
1473 msgid "cannot read invalidate ACK"
1474 msgstr "ne peut lire les ACK invalidés"
1475
1476-#: nscd/nscd.c:428
1477+#: nscd/nscd.c:430
1478 #, c-format
1479 msgid "invalidation failed"
1480 msgstr "l'invalidation a échoué"
1481
1482-#: nscd/nscd.c:438
1483+#: nscd/nscd.c:440
1484 #, c-format
1485 msgid "secure services not implemented anymore"
1486 msgstr "les services de sécurité ne sont plus implémentés"
1487@@ -4504,31 +4508,31 @@
1488 msgid "Unknown database: %s\n"
1489 msgstr "Base de données inconnue : « %s »\n"
1490
1491-#: nss/makedb.c:117
1492+#: nss/makedb.c:118
1493 msgid "Convert key to lower case"
1494 msgstr "Conversion des caractères en minuscules"
1495
1496-#: nss/makedb.c:120
1497+#: nss/makedb.c:121
1498 msgid "Do not print messages while building database"
1499 msgstr "Ne pas afficher de message lors de la génération de la base de données"
1500
1501-#: nss/makedb.c:122
1502+#: nss/makedb.c:123
1503 msgid "Print content of database file, one entry a line"
1504 msgstr "Afficher le contenu du fichier de base de données, une entrée par ligne"
1505
1506-#: nss/makedb.c:123
1507+#: nss/makedb.c:124
1508 msgid "CHAR"
1509 msgstr "CHAR"
1510
1511-#: nss/makedb.c:124
1512+#: nss/makedb.c:125
1513 msgid "Generated line not part of iteration"
1514 msgstr "La ligne générée ne fait pas partie de l'itération"
1515
1516-#: nss/makedb.c:129
1517+#: nss/makedb.c:130
1518 msgid "Create simple database from textual input."
1519 msgstr "Crée une base de données simple à partir des entrées textuelles."
1520
1521-#: nss/makedb.c:132
1522+#: nss/makedb.c:133
1523 msgid ""
1524 "INPUT-FILE OUTPUT-FILE\n"
1525 "-o OUTPUT-FILE INPUT-FILE\n"
1526@@ -4538,66 +4542,66 @@
1527 "-o FICHIER_DE_SORTIE FICHIER_D_ENTRÉE\n"
1528 "-u FICHIER_D_ENTRÉE"
1529
1530-#: nss/makedb.c:228
1531+#: nss/makedb.c:229
1532 #, c-format
1533 msgid "cannot open database file `%s'"
1534 msgstr "Ne peut ouvrir le fichier de base de données `%s'"
1535
1536-#: nss/makedb.c:273
1537+#: nss/makedb.c:274
1538 #, c-format
1539 msgid "no entries to be processed"
1540 msgstr "pas d'entrée à traiter"
1541
1542-#: nss/makedb.c:283
1543+#: nss/makedb.c:284
1544 #, c-format
1545 msgid "cannot create temporary file name"
1546 msgstr "ne peut créer un nom de fichier temporaire"
1547
1548-#: nss/makedb.c:305
1549+#: nss/makedb.c:306
1550 #, c-format
1551 msgid "cannot stat newly created file"
1552 msgstr "pas de stat pour un fichier nouvellement créé"
1553
1554-#: nss/makedb.c:316
1555+#: nss/makedb.c:317
1556 #, c-format
1557 msgid "cannot rename temporary file"
1558 msgstr "ne peut renommer un fichier temporaire"
1559
1560-#: nss/makedb.c:529 nss/makedb.c:552
1561+#: nss/makedb.c:533 nss/makedb.c:556
1562 #, c-format
1563 msgid "cannot create search tree"
1564 msgstr "ne peut créer un arbre de recherche"
1565
1566-#: nss/makedb.c:558
1567+#: nss/makedb.c:562
1568 msgid "duplicate key"
1569 msgstr "Duplicité de clé"
1570
1571-#: nss/makedb.c:570
1572+#: nss/makedb.c:574
1573 #, c-format
1574 msgid "problems while reading `%s'"
1575 msgstr "Problème lors de la lecture de `%s'"
1576
1577-#: nss/makedb.c:794
1578+#: nss/makedb.c:801
1579 #, c-format
1580 msgid "failed to write new database file"
1581 msgstr "échec à l'écriture du fichier de database"
1582
1583-#: nss/makedb.c:807
1584+#: nss/makedb.c:814
1585 #, c-format
1586 msgid "cannot stat database file"
1587 msgstr "pas de stat pour le fichier de database"
1588
1589-#: nss/makedb.c:812
1590+#: nss/makedb.c:819
1591 #, c-format
1592 msgid "cannot map database file"
1593 msgstr "Ne peut corréler (mapper) le fichier de database"
1594
1595-#: nss/makedb.c:815
1596+#: nss/makedb.c:822
1597 #, c-format
1598 msgid "file not a database file"
1599 msgstr "le fichier n'est pas un fichier de database"
1600
1601-#: nss/makedb.c:866
1602+#: nss/makedb.c:873
1603 #, c-format
1604 msgid "cannot set file creation context for `%s'"
1605 msgstr "Ne peut établir le contexte de création de fichier pour `%s'"
1606@@ -4779,7 +4783,7 @@
1607 msgid "No previous regular expression"
1608 msgstr "Aucune expression régulière précédente"
1609
1610-#: posix/wordexp.c:1829
1611+#: posix/wordexp.c:1830
1612 msgid "parameter null or not set"
1613 msgstr "paramètre nul ou non initialisé"
1614
1615@@ -5045,8 +5049,8 @@
1616 msgstr "Signal inconnu %d"
1617
1618 #: sunrpc/auth_unix.c:111 sunrpc/clnt_tcp.c:123 sunrpc/clnt_udp.c:134
1619-#: sunrpc/clnt_unix.c:124 sunrpc/svc_tcp.c:171 sunrpc/svc_tcp.c:216
1620-#: sunrpc/svc_udp.c:145 sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:212
1621+#: sunrpc/clnt_unix.c:124 sunrpc/svc_tcp.c:188 sunrpc/svc_tcp.c:233
1622+#: sunrpc/svc_udp.c:162 sunrpc/svc_unix.c:188 sunrpc/svc_unix.c:229
1623 #: sunrpc/xdr.c:630 sunrpc/xdr.c:790 sunrpc/xdr_array.c:97
1624 #: sunrpc/xdr_rec.c:151 sunrpc/xdr_ref.c:76
1625 msgid "out of memory\n"
1626@@ -5211,242 +5215,249 @@
1627 msgid "Cannot receive reply to broadcast"
1628 msgstr "Ne peut recevoir l'accusé réception à la requête faite par diffusion"
1629
1630-#: sunrpc/rpc_main.c:280
1631+#: sunrpc/rpc_main.c:277
1632 #, c-format
1633 msgid "%s: output would overwrite %s\n"
1634 msgstr "%s : la sortie écraserait %s\n"
1635
1636-#: sunrpc/rpc_main.c:287
1637+#: sunrpc/rpc_main.c:284
1638 #, c-format
1639 msgid "%s: unable to open %s: %m\n"
1640 msgstr "%s : incapable d'ouvrir %s : %m\n"
1641
1642-#: sunrpc/rpc_main.c:299
1643+#: sunrpc/rpc_main.c:296
1644 #, c-format
1645 msgid "%s: while writing output %s: %m"
1646 msgstr "%s : lors de l'écriture sur la sortie %s : %m"
1647
1648-#: sunrpc/rpc_main.c:334
1649+#: sunrpc/rpc_main.c:332 sunrpc/rpc_main.c:371
1650 #, c-format
1651-msgid "cannot find C preprocessor: %s \n"
1652-msgstr "Ne peut trouver le préprocesseur C : %s\n"
1653+msgid "cannot find C preprocessor: %s\n"
1654+msgstr "Ne peut trouver le préprocesseur C : %s\n"
1655
1656-#: sunrpc/rpc_main.c:342
1657-msgid "cannot find any C preprocessor (cpp)\n"
1658-msgstr "Ne peut trouver un préprocesseur C (cpp)\n"
1659-
1660-#: sunrpc/rpc_main.c:411
1661+#: sunrpc/rpc_main.c:407
1662 #, c-format
1663 msgid "%s: C preprocessor failed with signal %d\n"
1664 msgstr "%s : échec du préprocesseur C -- code de terminaison : %d\n"
1665
1666-#: sunrpc/rpc_main.c:414
1667+#: sunrpc/rpc_main.c:410
1668 #, c-format
1669 msgid "%s: C preprocessor failed with exit code %d\n"
1670 msgstr "%s : échec du préprocesseur C -- code de terminaison : %d\n"
1671
1672-#: sunrpc/rpc_main.c:454
1673+#: sunrpc/rpc_main.c:450
1674 #, c-format
1675 msgid "illegal nettype: `%s'\n"
1676 msgstr "« nettype » non permis :« %s »\n"
1677
1678-#: sunrpc/rpc_main.c:1089
1679+#: sunrpc/rpc_main.c:1085
1680 #, c-format
1681 msgid "rpcgen: too many defines\n"
1682 msgstr "rpcgen : trop de définitions\n"
1683
1684-#: sunrpc/rpc_main.c:1101
1685+#: sunrpc/rpc_main.c:1097
1686 #, c-format
1687 msgid "rpcgen: arglist coding error\n"
1688 msgstr "rpcgen : erreur dans la liste d'arguments de codage\n"
1689
1690 #. TRANS: the file will not be removed; this is an
1691 #. TRANS: informative message.
1692-#: sunrpc/rpc_main.c:1134
1693+#: sunrpc/rpc_main.c:1130
1694 #, c-format
1695 msgid "file `%s' already exists and may be overwritten\n"
1696 msgstr "Le fichier « %s » existe déjà et peut avoir été écrasé.\n"
1697
1698-#: sunrpc/rpc_main.c:1179
1699+#: sunrpc/rpc_main.c:1175
1700 #, c-format
1701 msgid "Cannot specify more than one input file!\n"
1702 msgstr "Ne peut spécifier plus d'un fichier d'entrée !\n"
1703
1704-#: sunrpc/rpc_main.c:1349
1705+#: sunrpc/rpc_main.c:1345
1706 #, c-format
1707 msgid "This implementation doesn't support newstyle or MT-safe code!\n"
1708 msgstr "Cette implantation ne supporte pas le nouveau style ou le code MT-safe !\n"
1709
1710-#: sunrpc/rpc_main.c:1358
1711+#: sunrpc/rpc_main.c:1354
1712 #, c-format
1713 msgid "Cannot use netid flag with inetd flag!\n"
1714 msgstr "Ne utiliser le sémaphore « netid » avec le sémaphore « inetd » !\n"
1715
1716-#: sunrpc/rpc_main.c:1367
1717+#: sunrpc/rpc_main.c:1363
1718 #, c-format
1719 msgid "Cannot use netid flag without TIRPC!\n"
1720 msgstr "Ne peut utiliser le sémaphore « netid » sans « TIRPC » !\n"
1721
1722-#: sunrpc/rpc_main.c:1374
1723+#: sunrpc/rpc_main.c:1370
1724 #, c-format
1725 msgid "Cannot use table flags with newstyle!\n"
1726 msgstr "Ne peut utiliser la table des sémaphores avec « newstyle » !\n"
1727
1728-#: sunrpc/rpc_main.c:1393
1729+#: sunrpc/rpc_main.c:1389
1730 #, c-format
1731 msgid "\"infile\" is required for template generation flags.\n"
1732 msgstr "« fichier-en-entrée » est requis pour la génération du gabarit des indicateurs.\n"
1733
1734-#: sunrpc/rpc_main.c:1398
1735+#: sunrpc/rpc_main.c:1394
1736 #, c-format
1737 msgid "Cannot have more than one file generation flag!\n"
1738 msgstr "Ne peut avoir plus d'un fichier de génération de sémaphores !\n"
1739
1740-#: sunrpc/rpc_main.c:1407
1741+#: sunrpc/rpc_main.c:1403
1742 #, c-format
1743 msgid "usage: %s infile\n"
1744 msgstr "usage : %s fichier-en-entrée\n"
1745
1746-#: sunrpc/rpc_main.c:1408
1747+#: sunrpc/rpc_main.c:1404
1748 #, c-format
1749 msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
1750 msgstr "\t%s [-abkCLNTM][-Dname[=valeur]] [-i taille] [-I [-K secondes]] [-Y chemin] fichier\n"
1751
1752-#: sunrpc/rpc_main.c:1410
1753+#: sunrpc/rpc_main.c:1406
1754 #, c-format
1755 msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
1756 msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fichier_de_sortie] [fichier_d_entrée]\n"
1757
1758-#: sunrpc/rpc_main.c:1412
1759+#: sunrpc/rpc_main.c:1408
1760 #, c-format
1761 msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
1762 msgstr "\t%s [-s type_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n"
1763
1764-#: sunrpc/rpc_main.c:1413
1765+#: sunrpc/rpc_main.c:1409
1766 #, c-format
1767 msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
1768 msgstr "\t%s [-n id_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n"
1769
1770-#: sunrpc/rpc_main.c:1421
1771+#: sunrpc/rpc_main.c:1417
1772 #, c-format
1773 msgid "options:\n"
1774 msgstr "options :\n"
1775
1776-#: sunrpc/rpc_main.c:1422
1777+#: sunrpc/rpc_main.c:1418
1778 #, c-format
1779 msgid "-a\t\tgenerate all files, including samples\n"
1780 msgstr "-a\t\tgénère tout fichiers, y compris exemples\n"
1781
1782-#: sunrpc/rpc_main.c:1423
1783+#: sunrpc/rpc_main.c:1419
1784 #, c-format
1785 msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
1786 msgstr "-b\t\tmode de compatibilité descendante (génère du code pour Sun0S 4.1)\n"
1787
1788-#: sunrpc/rpc_main.c:1424
1789+#: sunrpc/rpc_main.c:1420
1790 #, c-format
1791 msgid "-c\t\tgenerate XDR routines\n"
1792 msgstr "-c\t\tgénère des routines XDR\n"
1793
1794-#: sunrpc/rpc_main.c:1425
1795+#: sunrpc/rpc_main.c:1421
1796 #, c-format
1797 msgid "-C\t\tANSI C mode\n"
1798 msgstr "-C\t\tmode ANSI C\n"
1799
1800-#: sunrpc/rpc_main.c:1426
1801+#: sunrpc/rpc_main.c:1422
1802 #, c-format
1803 msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
1804 msgstr "-Dname[=valeur]\tdéfinit un symbole (pareil que #define)\n"
1805
1806-#: sunrpc/rpc_main.c:1427
1807+#: sunrpc/rpc_main.c:1423
1808 #, c-format
1809 msgid "-h\t\tgenerate header file\n"
1810 msgstr "-h\t\tgénère le fichier d'entête\n"
1811
1812-#: sunrpc/rpc_main.c:1428
1813+#: sunrpc/rpc_main.c:1424
1814 #, c-format
1815 msgid "-i size\t\tsize at which to start generating inline code\n"
1816 msgstr "-i size\t\ttaille à laquelle débute la génération du code en ligne\n"
1817
1818-#: sunrpc/rpc_main.c:1429
1819+#: sunrpc/rpc_main.c:1425
1820 #, c-format
1821 msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
1822 msgstr "-I\t\tgénère du code pour le support de inetd sur serveur (pour SunOS 4.1)\n"
1823
1824-#: sunrpc/rpc_main.c:1430
1825+#: sunrpc/rpc_main.c:1426
1826 #, c-format
1827 msgid "-K seconds\tserver exits after K seconds of inactivity\n"
1828 msgstr "-K secondes\tserveur quitte après K secondes d'inactivité\n"
1829
1830-#: sunrpc/rpc_main.c:1431
1831+#: sunrpc/rpc_main.c:1427
1832 #, c-format
1833 msgid "-l\t\tgenerate client side stubs\n"
1834 msgstr "-l\t\tgénère des squelettes de code du côté client\n"
1835
1836-#: sunrpc/rpc_main.c:1432
1837+#: sunrpc/rpc_main.c:1428
1838 #, c-format
1839 msgid "-L\t\tserver errors will be printed to syslog\n"
1840 msgstr "-L\t\tles erreurs du serveur seront dirigées vers syslog\n"
1841
1842-#: sunrpc/rpc_main.c:1433
1843+#: sunrpc/rpc_main.c:1429
1844 #, c-format
1845 msgid "-m\t\tgenerate server side stubs\n"
1846 msgstr "-m\t\tgénère des squelettes de code du côté serveur\n"
1847
1848-#: sunrpc/rpc_main.c:1434
1849+#: sunrpc/rpc_main.c:1430
1850 #, c-format
1851 msgid "-M\t\tgenerate MT-safe code\n"
1852 msgstr "-M\t\tgénère le code MT-safe\n"
1853
1854-#: sunrpc/rpc_main.c:1435
1855+#: sunrpc/rpc_main.c:1431
1856 #, c-format
1857 msgid "-n netid\tgenerate server code that supports named netid\n"
1858 msgstr "-n netid\tgénère le code serveur qui supporte netid nommé\n"
1859
1860-#: sunrpc/rpc_main.c:1436
1861+#: sunrpc/rpc_main.c:1432
1862 #, c-format
1863 msgid "-N\t\tsupports multiple arguments and call-by-value\n"
1864 msgstr "-N\t\tsupporte des arguments multiples et call-by-value\n"
1865
1866-#: sunrpc/rpc_main.c:1437
1867+#: sunrpc/rpc_main.c:1433
1868 #, c-format
1869 msgid "-o outfile\tname of the output file\n"
1870 msgstr "-o outfile\tnom du fichier de sortie\n"
1871
1872-#: sunrpc/rpc_main.c:1438
1873+#: sunrpc/rpc_main.c:1434
1874 #, c-format
1875 msgid "-s nettype\tgenerate server code that supports named nettype\n"
1876 msgstr "-s nettype\tgénère le code serveur qui supporte nettype nommé\n"
1877
1878-#: sunrpc/rpc_main.c:1439
1879+#: sunrpc/rpc_main.c:1435
1880 #, c-format
1881 msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
1882 msgstr "-Sc\t\tgénère du code échantillon client qui utilise des procédures éloignées\n"
1883
1884-#: sunrpc/rpc_main.c:1440
1885+#: sunrpc/rpc_main.c:1436
1886 #, c-format
1887 msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
1888 msgstr "-Ss\t\tgénère du code échantillon serveur qui définit des procédures éloignées\n"
1889
1890-#: sunrpc/rpc_main.c:1441
1891+#: sunrpc/rpc_main.c:1437
1892 #, c-format
1893 msgid "-Sm \t\tgenerate makefile template \n"
1894 msgstr "-Sm \t\tgénère un patron de makefile\n"
1895
1896-#: sunrpc/rpc_main.c:1442
1897+#: sunrpc/rpc_main.c:1438
1898 #, c-format
1899 msgid "-t\t\tgenerate RPC dispatch table\n"
1900 msgstr "-t\t\tgénère la table de distribution RPC\n"
1901
1902-#: sunrpc/rpc_main.c:1443
1903+#: sunrpc/rpc_main.c:1439
1904 #, c-format
1905 msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
1906 msgstr "-T\t\tgénère le code qui supporte les tables de distribution RPC\n"
1907
1908-#: sunrpc/rpc_main.c:1444
1909+#: sunrpc/rpc_main.c:1440
1910 #, c-format
1911 msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
1912 msgstr "-Y path\t\tnom de répertoire pour trouver un préprocesseur C (cpp)\n"
1913
1914+#: sunrpc/rpc_main.c:1442
1915+#, c-format
1916+msgid ""
1917+"\n"
1918+"For bug reporting instructions, please see:\n"
1919+"%s.\n"
1920+msgstr ""
1921+"\n"
1922+"Pour les instructions de rapport de bug, SVP voyez là : \n"
1923+"%s.\n"
1924+
1925 #: sunrpc/rpc_scan.c:112
1926 msgid "constant or identifier expected"
1927 msgstr "Constante ou identificateur attendu"
1928@@ -5580,59 +5591,59 @@
1929 msgid "never registered prog %d\n"
1930 msgstr "Le programme %d n'a jamais été enregistré.\n"
1931
1932-#: sunrpc/svc_tcp.c:147
1933+#: sunrpc/svc_tcp.c:164
1934 msgid "svc_tcp.c - tcp socket creation problem"
1935 msgstr "svc_tcp.c - problème de création d'un socket TCP"
1936
1937-#: sunrpc/svc_tcp.c:162
1938+#: sunrpc/svc_tcp.c:179
1939 msgid "svc_tcp.c - cannot getsockname or listen"
1940 msgstr "svc_tcp.c - ne peut repérer le nom du socket par getsockname() ou listen()"
1941
1942-#: sunrpc/svc_udp.c:120
1943+#: sunrpc/svc_udp.c:137
1944 msgid "svcudp_create: socket creation problem"
1945 msgstr "svcudp_create : problème de création du socket"
1946
1947-#: sunrpc/svc_udp.c:134
1948+#: sunrpc/svc_udp.c:151
1949 msgid "svcudp_create - cannot getsockname"
1950 msgstr "svcudp_create - ne peut repérer le nom du socket par getsockname()"
1951
1952-#: sunrpc/svc_udp.c:166
1953+#: sunrpc/svc_udp.c:183
1954 msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
1955 msgstr "svcudp_create : xp_pad est trop petit pour IP_PKTINFO\n"
1956
1957-#: sunrpc/svc_udp.c:474
1958+#: sunrpc/svc_udp.c:495
1959 msgid "enablecache: cache already enabled"
1960 msgstr "enablecache : cache déjà activée"
1961
1962-#: sunrpc/svc_udp.c:480
1963+#: sunrpc/svc_udp.c:501
1964 msgid "enablecache: could not allocate cache"
1965 msgstr "enablecache : ne peut allouer une cache"
1966
1967-#: sunrpc/svc_udp.c:489
1968+#: sunrpc/svc_udp.c:510
1969 msgid "enablecache: could not allocate cache data"
1970 msgstr "enablecache : ne peut allouer une cache de données"
1971
1972-#: sunrpc/svc_udp.c:497
1973+#: sunrpc/svc_udp.c:518
1974 msgid "enablecache: could not allocate cache fifo"
1975 msgstr "enablecache : ne peut allouer une cache de type fifo"
1976
1977-#: sunrpc/svc_udp.c:533
1978+#: sunrpc/svc_udp.c:554
1979 msgid "cache_set: victim not found"
1980 msgstr "cache_set : « victim » non repéré"
1981
1982-#: sunrpc/svc_udp.c:544
1983+#: sunrpc/svc_udp.c:565
1984 msgid "cache_set: victim alloc failed"
1985 msgstr "cache_set : échec d'allocation de « victim »"
1986
1987-#: sunrpc/svc_udp.c:551
1988+#: sunrpc/svc_udp.c:572
1989 msgid "cache_set: could not allocate new rpc_buffer"
1990 msgstr "cache_set : ne peut allouer une nouveau tampon rpc_buffer"
1991
1992-#: sunrpc/svc_unix.c:145
1993+#: sunrpc/svc_unix.c:162
1994 msgid "svc_unix.c - AF_UNIX socket creation problem"
1995 msgstr "svc_unix.c - problème de création d'un socket « AF_UNIX »"
1996
1997-#: sunrpc/svc_unix.c:161
1998+#: sunrpc/svc_unix.c:178
1999 msgid "svc_unix.c - cannot getsockname or listen"
2000 msgstr "svc_unix.c - ne peut repérer le nom du socket par getsockname() ou listen()"
2001
2002@@ -5742,41 +5753,41 @@
2003 msgstr "Expiration de la minuterie durant l'établissement du profile"
2004
2005 #: sysdeps/generic/siglist.h:53
2006-msgid "Window changed"
2007-msgstr "La fenêtre a changée"
2008-
2009-#: sysdeps/generic/siglist.h:54
2010 msgid "User defined signal 1"
2011 msgstr "Signal #1 défini par l'usager"
2012
2013-#: sysdeps/generic/siglist.h:55
2014+#: sysdeps/generic/siglist.h:54
2015 msgid "User defined signal 2"
2016 msgstr "Signal #2 défini par l'usager"
2017
2018-#: sysdeps/generic/siglist.h:59
2019+#: sysdeps/generic/siglist.h:58
2020 msgid "EMT trap"
2021 msgstr "Trappe EMT"
2022
2023-#: sysdeps/generic/siglist.h:62
2024+#: sysdeps/generic/siglist.h:61
2025 msgid "Bad system call"
2026 msgstr "Appel système erroné"
2027
2028-#: sysdeps/generic/siglist.h:65
2029+#: sysdeps/generic/siglist.h:64
2030 msgid "Stack fault"
2031 msgstr "Erreur sur la pile"
2032
2033-#: sysdeps/generic/siglist.h:68
2034+#: sysdeps/generic/siglist.h:67
2035 msgid "Information request"
2036 msgstr "Requête d'information"
2037
2038-#: sysdeps/generic/siglist.h:70
2039+#: sysdeps/generic/siglist.h:69
2040 msgid "Power failure"
2041 msgstr "Panne d'alimentation"
2042
2043-#: sysdeps/generic/siglist.h:73
2044+#: sysdeps/generic/siglist.h:72
2045 msgid "Resource lost"
2046 msgstr "Ressource perdue"
2047
2048+#: sysdeps/generic/siglist.h:75
2049+msgid "Window changed"
2050+msgstr "La fenêtre a changée"
2051+
2052 #. TRANS Operation not permitted; only the owner of the file (or other resource)
2053 #. TRANS or processes with special privileges can perform the operation.
2054 #: sysdeps/gnu/errlist.c:25
2055@@ -6710,424 +6721,427 @@
2056 msgid "cannot read header from `%s'"
2057 msgstr "Ne peut lire l'en-tête de « %s »"
2058
2059-#: timezone/zdump.c:215
2060+#: timezone/zdump.c:246
2061 msgid "lacks alphabetic at start"
2062 msgstr "Il manque un lettre de l'alphabet au début"
2063
2064-#: timezone/zdump.c:217
2065+#: timezone/zdump.c:248
2066 msgid "has fewer than 3 alphabetics"
2067 msgstr "a moins de 3 lettres alphabétiques"
2068
2069-#: timezone/zdump.c:219
2070+#: timezone/zdump.c:250
2071 msgid "has more than 6 alphabetics"
2072 msgstr "a plus de 6 lettres alphabétiques"
2073
2074-#: timezone/zdump.c:227
2075+#: timezone/zdump.c:258
2076 msgid "differs from POSIX standard"
2077 msgstr "diffère du standard POSIX"
2078
2079-#: timezone/zdump.c:233
2080+#: timezone/zdump.c:264
2081 #, c-format
2082 msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
2083 msgstr "%s : attention : zone \"%s\" abréviation \"%s\" %s\n"
2084
2085-#: timezone/zdump.c:244
2086+#: timezone/zdump.c:273
2087 #, c-format
2088 msgid ""
2089 "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
2090 "\n"
2091-"Report bugs to tz@elsie.nci.nih.gov.\n"
2092+"Report bugs to %s.\n"
2093 msgstr ""
2094 "%s : usage est %s [ --version ] [ --help ] [ -v ] [ -c [AnnéeBasse,]AnnéeHaute ] nom_fuseau_horaire ...\n"
2095 "\n"
2096-"Envoyer bugs à tz@elsie.nci.nih.gov.\n"
2097+"Rapporter les bugs à %s.\n"
2098
2099-#: timezone/zdump.c:313
2100+#: timezone/zdump.c:340
2101 #, c-format
2102 msgid "%s: wild -c argument %s\n"
2103 msgstr "%s : argument -c intempestif %s\n"
2104
2105-#: timezone/zdump.c:400
2106+#: timezone/zdump.c:426
2107 msgid "Error writing to standard output"
2108 msgstr "Erreur d'écriture sur la sortie standard"
2109
2110-#: timezone/zdump.c:423
2111+#: timezone/zdump.c:439
2112 #, c-format
2113 msgid "%s: use of -v on system with floating time_t other than float or double\n"
2114 msgstr "%s : usage de -v sur un système avec time_t flottant autre que float ou double\n"
2115
2116-#: timezone/zic.c:388
2117+#: timezone/zic.c:361
2118 #, c-format
2119 msgid "%s: Memory exhausted: %s\n"
2120 msgstr "%s : mémoire épuisée : %s\n"
2121
2122-#: timezone/zic.c:434
2123+#: timezone/zic.c:401
2124 #, c-format
2125 msgid "\"%s\", line %d: %s"
2126 msgstr "« %s », ligne %d : %s"
2127
2128-#: timezone/zic.c:437
2129+#: timezone/zic.c:404
2130 #, c-format
2131 msgid " (rule from \"%s\", line %d)"
2132 msgstr " (règles de « %s », ligne %d)"
2133
2134-#: timezone/zic.c:449
2135+#: timezone/zic.c:415
2136 msgid "warning: "
2137 msgstr "AVERTISSEMENT : "
2138
2139-#: timezone/zic.c:459
2140+#: timezone/zic.c:425
2141 #, c-format
2142 msgid ""
2143 "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
2144 "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
2145 "\n"
2146-"Report bugs to tz@elsie.nci.nih.gov.\n"
2147+"Report bugs to %s.\n"
2148 msgstr ""
2149 "%s : l'usage is %s [ --version ] [ --help ] [ -v ] [ -l temps_local ] [ -p règles_posix ] \\\n"
2150 "\t[ -d dossier ] [ -L secondes_écoulées ] [ -y type_année ] [ fichier ... ]\n"
2151 "\n"
2152-"Envoyer bugs à tz@elsie.nci.nih.gov.\n"
2153+"Rapporter les bugs à %s.\n"
2154
2155-#: timezone/zic.c:496
2156+#: timezone/zic.c:460
2157 msgid "wild compilation-time specification of zic_t"
2158 msgstr "spécification approximative de zic_t au moment de la compilation"
2159
2160-#: timezone/zic.c:515
2161+#: timezone/zic.c:479
2162 #, c-format
2163 msgid "%s: More than one -d option specified\n"
2164 msgstr "%s : option -d spécifiée plus d'une fois\n"
2165
2166-#: timezone/zic.c:525
2167+#: timezone/zic.c:489
2168 #, c-format
2169 msgid "%s: More than one -l option specified\n"
2170 msgstr "%s : option -l spécifiée plus d'une fois\n"
2171
2172-#: timezone/zic.c:535
2173+#: timezone/zic.c:499
2174 #, c-format
2175 msgid "%s: More than one -p option specified\n"
2176 msgstr "%s : option -p spécifiée plus d'une fois\n"
2177
2178-#: timezone/zic.c:545
2179+#: timezone/zic.c:509
2180 #, c-format
2181 msgid "%s: More than one -y option specified\n"
2182 msgstr "%s : option -y spécifiée plus d'une fois\n"
2183
2184-#: timezone/zic.c:555
2185+#: timezone/zic.c:519
2186 #, c-format
2187 msgid "%s: More than one -L option specified\n"
2188 msgstr "%s : option -L spécifiée plus d'une fois\n"
2189
2190-#: timezone/zic.c:604
2191+#: timezone/zic.c:566
2192 msgid "link to link"
2193 msgstr "lien à lien"
2194
2195-#: timezone/zic.c:669
2196+#: timezone/zic.c:629
2197 msgid "hard link failed, symbolic link used"
2198 msgstr "Échec de création du lien direct, création d'un lien symbolique"
2199
2200-#: timezone/zic.c:677
2201+#: timezone/zic.c:637
2202 #, c-format
2203 msgid "%s: Can't link from %s to %s: %s\n"
2204 msgstr "%s : ne peut établir un lien entre %s et %s : %s\n"
2205
2206-#: timezone/zic.c:749 timezone/zic.c:751
2207+#: timezone/zic.c:697 timezone/zic.c:699
2208 msgid "same rule name in multiple files"
2209 msgstr "Même nom de règle dans plusieurs fichiers"
2210
2211-#: timezone/zic.c:792
2212+#: timezone/zic.c:740
2213 msgid "unruly zone"
2214 msgstr "Zone sans règle"
2215
2216-#: timezone/zic.c:799
2217+#: timezone/zic.c:747
2218 #, c-format
2219 msgid "%s in ruleless zone"
2220 msgstr "%s est dans une zone sans règle"
2221
2222-#: timezone/zic.c:820
2223+#: timezone/zic.c:767
2224 msgid "standard input"
2225 msgstr "entrée standard"
2226
2227-#: timezone/zic.c:825
2228+#: timezone/zic.c:772
2229 #, c-format
2230 msgid "%s: Can't open %s: %s\n"
2231 msgstr "%s : ne peut ouvrir %s : %s\n"
2232
2233-#: timezone/zic.c:836
2234+#: timezone/zic.c:783
2235 msgid "line too long"
2236 msgstr "Ligne trop longue"
2237
2238-#: timezone/zic.c:856
2239+#: timezone/zic.c:803
2240 msgid "input line of unknown type"
2241 msgstr "Ligne d'entrée de type inconnu"
2242
2243-#: timezone/zic.c:872
2244+#: timezone/zic.c:819
2245 #, c-format
2246 msgid "%s: Leap line in non leap seconds file %s\n"
2247 msgstr ""
2248 "%s : ligne de type « Leap » dans un fichier qui n'a pas\n"
2249 "de délai en secondes %s\n"
2250
2251-#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
2252+#: timezone/zic.c:826 timezone/zic.c:1243 timezone/zic.c:1265
2253 #, c-format
2254 msgid "%s: panic: Invalid l_value %d\n"
2255 msgstr "%s : panique : valeur %d de type « l_value » invalide\n"
2256
2257-#: timezone/zic.c:887
2258+#: timezone/zic.c:834
2259 #, c-format
2260 msgid "%s: Error reading %s\n"
2261 msgstr "%s : erreur de lecture de %s\n"
2262
2263-#: timezone/zic.c:894
2264+#: timezone/zic.c:841
2265 #, c-format
2266 msgid "%s: Error closing %s: %s\n"
2267 msgstr "%s : erreur lors de la fermeture de %s : %s\n"
2268
2269-#: timezone/zic.c:899
2270+#: timezone/zic.c:846
2271 msgid "expected continuation line not found"
2272 msgstr "ligne de continuation attendue, non repérée"
2273
2274-#: timezone/zic.c:943 timezone/zic.c:2541 timezone/zic.c:2560
2275+#: timezone/zic.c:887 timezone/zic.c:2411 timezone/zic.c:2425
2276 msgid "time overflow"
2277 msgstr "Débordement du temps alloué"
2278
2279-#: timezone/zic.c:947
2280+#: timezone/zic.c:891
2281 msgid "24:00 not handled by pre-1998 versions of zic"
2282 msgstr "24 : 00 non pris en charge par les versions de zic antérieures à1998 "
2283
2284-#: timezone/zic.c:950
2285+#: timezone/zic.c:894
2286 msgid "values over 24 hours not handled by pre-2007 versions of zic"
2287 msgstr "valeurs au-delà de 24 heures non prises en charge par les versions de zic antérieures à 2007"
2288
2289-#: timezone/zic.c:963
2290+#: timezone/zic.c:905
2291 msgid "wrong number of fields on Rule line"
2292 msgstr "Mauvais nombre de champs sur la ligne de type « Rule »"
2293
2294-#: timezone/zic.c:967
2295+#: timezone/zic.c:909
2296 msgid "nameless rule"
2297 msgstr "Règle sans nom"
2298
2299-#: timezone/zic.c:972
2300+#: timezone/zic.c:914
2301 msgid "invalid saved time"
2302 msgstr "Temps sauvegardé invalide"
2303
2304-#: timezone/zic.c:993
2305+#: timezone/zic.c:932
2306 msgid "wrong number of fields on Zone line"
2307 msgstr "Mauvais nombre de champs sur la ligne de type « Zone »"
2308
2309-#: timezone/zic.c:999
2310+#: timezone/zic.c:938
2311 #, c-format
2312 msgid "\"Zone %s\" line and -l option are mutually exclusive"
2313 msgstr "La ligne \"Zone %s\" et l'option -l sont mutuellement exclusifs"
2314
2315-#: timezone/zic.c:1007
2316+#: timezone/zic.c:946
2317 #, c-format
2318 msgid "\"Zone %s\" line and -p option are mutually exclusive"
2319 msgstr "La ligne « Zone %s » et l'option -p sont mutuellement exclusifs"
2320
2321-#: timezone/zic.c:1019
2322+#: timezone/zic.c:958
2323 #, c-format
2324 msgid "duplicate zone name %s (file \"%s\", line %d)"
2325 msgstr "Double noms de zone %s (fichier « %s », ligne %d)"
2326
2327-#: timezone/zic.c:1035
2328+#: timezone/zic.c:972
2329 msgid "wrong number of fields on Zone continuation line"
2330 msgstr "Mauvais nombre de champs sur la ligne de type continuation de « Zone »"
2331
2332-#: timezone/zic.c:1075
2333+#: timezone/zic.c:1009
2334 msgid "invalid UTC offset"
2335 msgstr "Adressage relatif GMT invalide"
2336
2337-#: timezone/zic.c:1078
2338+#: timezone/zic.c:1012
2339 msgid "invalid abbreviation format"
2340 msgstr "Format d'abréviation invalide"
2341
2342-#: timezone/zic.c:1107
2343+#: timezone/zic.c:1041
2344 msgid "Zone continuation line end time is not after end time of previous line"
2345 msgstr ""
2346 "Temps final de la ligne de continuation du fuseau horaire est antérieur\n"
2347 "au temps final de la ligne précédente"
2348
2349-#: timezone/zic.c:1135
2350+#: timezone/zic.c:1066
2351 msgid "wrong number of fields on Leap line"
2352 msgstr "Mauvais nombre de champs sur la ligne de type « Leap »"
2353
2354-#: timezone/zic.c:1144
2355+#: timezone/zic.c:1075
2356 msgid "invalid leaping year"
2357 msgstr "Année bissextile invalide"
2358
2359-#: timezone/zic.c:1164 timezone/zic.c:1270
2360+#: timezone/zic.c:1095 timezone/zic.c:1197
2361 msgid "invalid month name"
2362 msgstr "Nom de mois invalide"
2363
2364-#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
2365+#: timezone/zic.c:1108 timezone/zic.c:1310 timezone/zic.c:1324
2366 msgid "invalid day of month"
2367 msgstr "Jour du mois invalide"
2368
2369 # time/zic.c:1120A
2370-#: timezone/zic.c:1182
2371+#: timezone/zic.c:1113
2372 msgid "time before zero"
2373 msgstr "Temps défini avant le zéro"
2374
2375-#: timezone/zic.c:1186
2376+#: timezone/zic.c:1117
2377 msgid "time too small"
2378 msgstr "valeur de temps trop petite"
2379
2380-#: timezone/zic.c:1190
2381+#: timezone/zic.c:1121
2382 msgid "time too large"
2383 msgstr "valeur de temps trop grande"
2384
2385-#: timezone/zic.c:1194 timezone/zic.c:1299
2386+#: timezone/zic.c:1125 timezone/zic.c:1226
2387 msgid "invalid time of day"
2388 msgstr "Heure du jour invalide"
2389
2390-#: timezone/zic.c:1213
2391+#: timezone/zic.c:1144
2392 msgid "illegal CORRECTION field on Leap line"
2393 msgstr "champ CORRECTION non permis dans la ligne de type « Leap »"
2394
2395-#: timezone/zic.c:1218
2396+#: timezone/zic.c:1149
2397 msgid "illegal Rolling/Stationary field on Leap line"
2398 msgstr "Champ « Rolling/Stationary » non permis sur la ligne de type « Leap »"
2399
2400-#: timezone/zic.c:1234
2401+#: timezone/zic.c:1163
2402 msgid "wrong number of fields on Link line"
2403 msgstr "Mauvais nombre de champs sur la ligne de type « Link »"
2404
2405-#: timezone/zic.c:1238
2406+#: timezone/zic.c:1167
2407 msgid "blank FROM field on Link line"
2408 msgstr "Champ « FROM » vide dans la ligne de type « Link »"
2409
2410-#: timezone/zic.c:1242
2411+#: timezone/zic.c:1171
2412 msgid "blank TO field on Link line"
2413 msgstr "Champ « TO » vide dans la ligne de type « Link »"
2414
2415-#: timezone/zic.c:1320
2416+#: timezone/zic.c:1247
2417 msgid "invalid starting year"
2418 msgstr "Année initiale invalide"
2419
2420-#: timezone/zic.c:1342
2421+#: timezone/zic.c:1269
2422 msgid "invalid ending year"
2423 msgstr "Année finale invalide"
2424
2425-#: timezone/zic.c:1346
2426+#: timezone/zic.c:1273
2427 msgid "starting year greater than ending year"
2428 msgstr "année initiale plus grande que l'année finale"
2429
2430-#: timezone/zic.c:1353
2431+#: timezone/zic.c:1280
2432 msgid "typed single year"
2433 msgstr "une seule année fournie"
2434
2435-#: timezone/zic.c:1388
2436+#: timezone/zic.c:1315
2437 msgid "invalid weekday name"
2438 msgstr "Nom du jour de semaine invalide"
2439
2440-#: timezone/zic.c:1566
2441+#: timezone/zic.c:1481
2442 #, c-format
2443 msgid "%s: Can't remove %s: %s\n"
2444 msgstr "%s : ne peut enlever %s : %s\n"
2445
2446-#: timezone/zic.c:1576
2447+#: timezone/zic.c:1491
2448 #, c-format
2449 msgid "%s: Can't create %s: %s\n"
2450 msgstr "%s : ne peut créer %s : %s\n"
2451
2452-#: timezone/zic.c:1773
2453+#: timezone/zic.c:1683
2454 #, c-format
2455 msgid "%s: Error writing %s\n"
2456 msgstr "%s : erreur d'écriture de %s\n"
2457
2458-#: timezone/zic.c:2070
2459+#: timezone/zic.c:1964
2460 msgid "no POSIX environment variable for zone"
2461 msgstr "pas de variable d'environnement POSIX pour zone"
2462
2463-#: timezone/zic.c:2237
2464+#: timezone/zic.c:2131
2465 msgid "can't determine time zone abbreviation to use just after until time"
2466 msgstr ""
2467 "Ne peut déterminer l'abréviation du fuseau horaire à utiliser\n"
2468 "juste après telle date"
2469
2470-#: timezone/zic.c:2283
2471+#: timezone/zic.c:2175
2472 msgid "too many transitions?!"
2473 msgstr "trop de transitions définies ? !"
2474
2475-#: timezone/zic.c:2302
2476+#: timezone/zic.c:2190
2477 msgid "internal error - addtype called with bad isdst"
2478 msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « isdst »"
2479
2480-#: timezone/zic.c:2306
2481+#: timezone/zic.c:2194
2482 msgid "internal error - addtype called with bad ttisstd"
2483 msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « ttisstd »"
2484
2485-#: timezone/zic.c:2310
2486+#: timezone/zic.c:2198
2487 msgid "internal error - addtype called with bad ttisgmt"
2488 msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type « ttisgmt »"
2489
2490-#: timezone/zic.c:2329
2491+#: timezone/zic.c:2217
2492 msgid "too many local time types"
2493 msgstr "trop de types localisés pour la représentation du temps"
2494
2495-#: timezone/zic.c:2333
2496+#: timezone/zic.c:2221
2497 msgid "UTC offset out of range"
2498 msgstr "UTC décalage en dehors de la plage"
2499
2500-#: timezone/zic.c:2361
2501+#: timezone/zic.c:2245
2502 msgid "too many leap seconds"
2503 msgstr "trop de délai en secondes"
2504
2505-#: timezone/zic.c:2367
2506+#: timezone/zic.c:2251
2507 msgid "repeated leap second moment"
2508 msgstr "Répétition du délai une seconde fois"
2509
2510-#: timezone/zic.c:2419
2511+#: timezone/zic.c:2301
2512 msgid "Wild result from command execution"
2513 msgstr "Résultat anarchique résultant de l'exécution de la commande"
2514
2515-#: timezone/zic.c:2420
2516+#: timezone/zic.c:2302
2517 #, c-format
2518 msgid "%s: command was '%s', result was %d\n"
2519 msgstr "%s : la commande était « %s », le résultat était %d\n"
2520
2521-#: timezone/zic.c:2518
2522+#: timezone/zic.c:2393
2523 msgid "Odd number of quotation marks"
2524 msgstr "Nombre impair de caractères apostrophe"
2525
2526-#: timezone/zic.c:2607
2527+#: timezone/zic.c:2470
2528 msgid "use of 2/29 in non leap-year"
2529 msgstr "Utiliser 2/29 pour les années non-bissextiles"
2530
2531-#: timezone/zic.c:2642
2532+#: timezone/zic.c:2505
2533 msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
2534 msgstr "la règle en dehors de début/fin du mois--ne fonctionnera pas avec les versions de zic antérieures à 2004"
2535
2536-#: timezone/zic.c:2674
2537+#: timezone/zic.c:2536
2538 msgid "time zone abbreviation lacks alphabetic at start"
2539 msgstr "l'abréviation du nom de fuseau horaire n'a pas de caractère alphabétique au début"
2540
2541-#: timezone/zic.c:2676
2542-msgid "time zone abbreviation has more than 3 alphabetics"
2543-msgstr "l'abréviation du nom de fuseau horaire a plus de 3 caractères alphabétiques"
2544+#: timezone/zic.c:2538
2545+msgid "time zone abbreviation has fewer than 3 alphabetics"
2546+msgstr "l'abréviation du nom de fuseau horaire a moins de 3 caractères alphabétiques"
2547
2548-#: timezone/zic.c:2678
2549+#: timezone/zic.c:2540
2550 msgid "time zone abbreviation has too many alphabetics"
2551 msgstr "l'abréviation du nom de fuseau horaire a trop de caractères alphabétiques"
2552
2553-#: timezone/zic.c:2688
2554+#: timezone/zic.c:2550
2555 msgid "time zone abbreviation differs from POSIX standard"
2556 msgstr "l'abréviation du nom de fuseau horaire diffère du standard POSIX"
2557
2558-#: timezone/zic.c:2700
2559+#: timezone/zic.c:2562
2560 msgid "too many, or too long, time zone abbreviations"
2561 msgstr "trop ou de trop longues abréviations de fuseaux horaires"
2562
2563-#: timezone/zic.c:2741
2564+#: timezone/zic.c:2602
2565 #, c-format
2566 msgid "%s: Can't create directory %s: %s\n"
2567 msgstr "%s : ne peut créer le dossier %s : %s\n"
2568
2569-#: timezone/zic.c:2763
2570+#: timezone/zic.c:2623
2571 #, c-format
2572 msgid "%s: %d did not sign extend correctly\n"
2573 msgstr "%s : %d n'a pas fait correctement l'expansion de la valeur signée\n"
2574
2575+#~ msgid "cannot find any C preprocessor (cpp)\n"
2576+#~ msgstr "Ne peut trouver un préprocesseur C (cpp)\n"
2577+
2578 #~ msgid "Try \\`%s --help' or `%s --usage' for more information.\\n"
2579 #~ msgstr "Pour en savoir davantage, faites : «%s --help » ou «%s --usage».\\n"
2580
2581Index: libc/po/ca.po
2582===================================================================
2583--- libc/po/ca.po (revision 22177)
2584+++ libc/po/ca.po (revision 22178)
2585@@ -1,7 +1,7 @@
2586 # Catalan messages for GNU libc.
2587-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2011 Free Software Foundation, Inc.
2588+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
2589 # This file is distributed under the same license as the glibc package.
2590-# Ivan Vilata i Balaguer <ivan@selidor.net>, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2011.
2591+# Ivan Vilata i Balaguer <ivan@selidor.net>, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2011, 2012, 2013.
2592 #
2593 # Sóc Ivan, aquestes són les convencions que adopte per a la 2.4:
2594 #
2595@@ -47,9 +47,9 @@
2596 # bonic, excepte quan quede realment horrend o porte a confusió).
2597 msgid ""
2598 msgstr ""
2599-"Project-Id-Version: libc 2.14\n"
2600-"POT-Creation-Date: 2011-05-31 00:06-0400\n"
2601-"PO-Revision-Date: 2011-09-30 12:49+0200\n"
2602+"Project-Id-Version: libc 2.17-pre1\n"
2603+"POT-Creation-Date: 2012-12-07 15:10-0500\n"
2604+"PO-Revision-Date: 2013-01-01 14:00+0100\n"
2605 "Last-Translator: Ivan Vilata i Balaguer <ivan@selidor.net>\n"
2606 "Language-Team: Catalan <ca@dodds.net>\n"
2607 "Language: ca\n"
2608@@ -57,89 +57,89 @@
2609 "Content-Type: text/plain; charset=UTF-8\n"
2610 "Content-Transfer-Encoding: 8bit\n"
2611
2612-#: argp/argp-help.c:228
2613+#: argp/argp-help.c:227
2614 #, c-format
2615 msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
2616 msgstr "%.*s: el paràmetre ARGP_HELP_FMT necessita un valor"
2617
2618-#: argp/argp-help.c:238
2619+#: argp/argp-help.c:237
2620 #, c-format
2621 msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
2622 msgstr "%.*s: el paràmetre d’ARGP_HELP_FMT no és conegut"
2623
2624-#: argp/argp-help.c:251
2625+#: argp/argp-help.c:250
2626 #, c-format
2627 msgid "Garbage in ARGP_HELP_FMT: %s"
2628 msgstr "brossa a ARGP_HELP_FMT: %s"
2629
2630-#: argp/argp-help.c:1215
2631+#: argp/argp-help.c:1214
2632 msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
2633 msgstr "Els arguments obligatoris o opcionals per a les opcions llargues també ho són per a les opcions curtes corresponents."
2634
2635-#: argp/argp-help.c:1601
2636+#: argp/argp-help.c:1600
2637 msgid "Usage:"
2638 msgstr "Forma d’ús:"
2639
2640-#: argp/argp-help.c:1605
2641+#: argp/argp-help.c:1604
2642 msgid " or: "
2643 msgstr " o bé: "
2644
2645-#: argp/argp-help.c:1617
2646+#: argp/argp-help.c:1616
2647 msgid " [OPTION...]"
2648 msgstr " [OPCIÓ…]"
2649
2650-#: argp/argp-help.c:1644
2651+#: argp/argp-help.c:1643
2652 #, c-format
2653 msgid "Try `%s --help' or `%s --usage' for more information.\n"
2654 msgstr "Proveu «%s --help» o «%s --usage» per a obtenir més informació.\n"
2655
2656-#: argp/argp-help.c:1672
2657+#: argp/argp-help.c:1671
2658 #, c-format
2659 msgid "Report bugs to %s.\n"
2660 msgstr "Informeu dels errors a %s.\n"
2661
2662 # Més ajudes. ivb
2663-#: argp/argp-parse.c:102
2664+#: argp/argp-parse.c:101
2665 msgid "Give this help list"
2666 msgstr "Mostra aquest llistat d’ajuda."
2667
2668-#: argp/argp-parse.c:103
2669+#: argp/argp-parse.c:102
2670 msgid "Give a short usage message"
2671 msgstr "Mostra un missatge breu amb la forma d’ús."
2672
2673-#: argp/argp-parse.c:104
2674+#: argp/argp-parse.c:103
2675 msgid "Set the program name"
2676 msgstr "Estableix el nom del programa."
2677
2678 # ivb (2002/10/21)
2679 # ivb La cadena «SECS» no està traduïda en l'estructura d'opcions.
2680-#: argp/argp-parse.c:106
2681+#: argp/argp-parse.c:105
2682 msgid "Hang for SECS seconds (default 3600)"
2683 msgstr "Espera durant un nombre de segons (3600 per defecte)."
2684
2685-#: argp/argp-parse.c:167
2686+#: argp/argp-parse.c:166
2687 msgid "Print program version"
2688 msgstr "Mostra la versió del programa."
2689
2690-#: argp/argp-parse.c:183
2691+#: argp/argp-parse.c:182
2692 msgid "(PROGRAM ERROR) No version known!?"
2693 msgstr "(ERROR DEL PROGRAMA) No es coneix cap versió!?"
2694
2695-#: argp/argp-parse.c:623
2696+#: argp/argp-parse.c:622
2697 #, c-format
2698 msgid "%s: Too many arguments\n"
2699 msgstr "%s: Sobren arguments\n"
2700
2701-#: argp/argp-parse.c:766
2702+#: argp/argp-parse.c:765
2703 msgid "(PROGRAM ERROR) Option should have been recognized!?"
2704 msgstr "(ERROR DEL PROGRAMA) L’opció hauria d’haver estat reconeguda!?"
2705
2706-#: assert/assert-perr.c:37
2707+#: assert/assert-perr.c:36
2708 #, c-format
2709 msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
2710 msgstr "%s%s%s:%u: %s%sError inesperat: %s.\n"
2711
2712-#: assert/assert.c:105
2713+#: assert/assert.c:101
2714 #, c-format
2715 msgid ""
2716 "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
2717@@ -148,25 +148,25 @@
2718 "%s%s%s:%u: %s%sL’asserció «%s» ha fallat.\n"
2719 "%n"
2720
2721-#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
2722+#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:115 nss/makedb.c:119
2723 msgid "NAME"
2724 msgstr "NOM"
2725
2726 # Més ajudes. ivb
2727-#: catgets/gencat.c:111
2728+#: catgets/gencat.c:110
2729 msgid "Create C header file NAME containing symbol definitions"
2730 msgstr "Crea el fitxer capçalera C NOM que contindrà les definicions de símbols."
2731
2732-#: catgets/gencat.c:113
2733+#: catgets/gencat.c:112
2734 msgid "Do not use existing catalog, force new output file"
2735 msgstr "No empra el catàleg existent, i crea un nou fitxer d’eixida."
2736
2737-#: catgets/gencat.c:114 nss/makedb.c:61
2738+#: catgets/gencat.c:113 nss/makedb.c:119
2739 msgid "Write output to file NAME"
2740 msgstr "Escriu l’eixida al fitxer NOM."
2741
2742 # FIXME: Don't use \v.
2743-#: catgets/gencat.c:119
2744+#: catgets/gencat.c:118
2745 msgid ""
2746 "Generate message catalog.\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n"
2747 "is -, output is written to standard output.\n"
2748@@ -176,7 +176,7 @@
2749 "Si FITXER_ENTRADA és «-», l’entrada es llegirà de l’entrada estàndard.\n"
2750 "Si FITXER_EIXIDA és «-», l’eixida s’escriurà a l’eixida estàndard.\n"
2751
2752-#: catgets/gencat.c:124
2753+#: catgets/gencat.c:123
2754 msgid ""
2755 "-o OUTPUT-FILE [INPUT-FILE]...\n"
2756 "[OUTPUT-FILE [INPUT-FILE]...]"
2757@@ -184,28 +184,29 @@
2758 "-o FITXER_EIXIDA [FITXER_ENTRADA]…\n"
2759 "[FITXER_EIXIDA [FITXER_ENTRADA]…]"
2760
2761-#: catgets/gencat.c:232 debug/pcprofiledump.c:208 debug/xtrace.sh:58
2762-#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sotruss.ksh:49
2763-#: elf/sprof.c:371 iconv/iconv_prog.c:408 iconv/iconvconfig.c:380
2764-#: locale/programs/locale.c:278 locale/programs/localedef.c:371
2765-#: login/programs/pt_chown.c:92 malloc/memusage.sh:65
2766-#: malloc/memusagestat.c:539 nscd/nscd.c:415 nss/getent.c:918 nss/makedb.c:231
2767-#: posix/getconf.c:1122 sunrpc/rpc_main.c:1492 sunrpc/rpcinfo.c:691
2768-#: sysdeps/unix/sysv/linux/lddlibc4.c:62
2769+# L’adreça es veu millor així. ivb
2770+#: catgets/gencat.c:235 debug/pcprofiledump.c:208 elf/ldconfig.c:302
2771+#: elf/pldd.c:222 elf/sln.c:85 elf/sprof.c:371 iconv/iconv_prog.c:408
2772+#: iconv/iconvconfig.c:383 locale/programs/locale.c:279
2773+#: locale/programs/localedef.c:363 login/programs/pt_chown.c:88
2774+#: malloc/memusagestat.c:536 nscd/nscd.c:459 nss/getent.c:965 nss/makedb.c:371
2775+#: posix/getconf.c:1121 sunrpc/rpcinfo.c:691
2776+#: sysdeps/unix/sysv/linux/lddlibc4.c:61
2777+#, c-format
2778 msgid ""
2779 "For bug reporting instructions, please see:\n"
2780-"<http://www.gnu.org/software/libc/bugs.html>.\n"
2781+"%s.\n"
2782 msgstr ""
2783 "Per a obtenir instruccions sobre com informar d’un error, vegeu\n"
2784-"<http://www.gnu.org/software/libc/bugs.html>.\n"
2785+"<%s>.\n"
2786
2787-#: catgets/gencat.c:246 debug/pcprofiledump.c:222 debug/xtrace.sh:66
2788-#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sotruss.ksh:76 elf/sprof.c:386
2789-#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:395 locale/programs/locale.c:293
2790-#: locale/programs/localedef.c:387 login/programs/pt_chown.c:63
2791-#: malloc/memusage.sh:73 malloc/memusagestat.c:557 nscd/nscd.c:429
2792-#: nss/getent.c:87 nss/makedb.c:245 posix/getconf.c:1104
2793-#: sysdeps/unix/sysv/linux/lddlibc4.c:69
2794+#: catgets/gencat.c:251 debug/pcprofiledump.c:224 debug/xtrace.sh:64
2795+#: elf/ldconfig.c:318 elf/ldd.bash.in:38 elf/pldd.c:238 elf/sotruss.ksh:75
2796+#: elf/sprof.c:388 iconv/iconv_prog.c:425 iconv/iconvconfig.c:400
2797+#: locale/programs/locale.c:296 locale/programs/localedef.c:389
2798+#: login/programs/pt_chown.c:62 malloc/memusage.sh:71
2799+#: malloc/memusagestat.c:552 nscd/nscd.c:475 nss/getent.c:86 nss/makedb.c:387
2800+#: posix/getconf.c:1103 sysdeps/unix/sysv/linux/lddlibc4.c:68
2801 #, c-format
2802 msgid ""
2803 "Copyright (C) %s Free Software Foundation, Inc.\n"
2804@@ -217,35 +218,35 @@
2805 "de còpia. No hi ha CAP garantia; ni tan sols de COMERCIABILITAT o\n"
2806 "ADEQUACIÓ PER A UN PROPÒSIT PARTICULAR.\n"
2807
2808-#: catgets/gencat.c:251 debug/pcprofiledump.c:227 debug/xtrace.sh:70
2809-#: elf/ldconfig.c:321 elf/sprof.c:392 iconv/iconv_prog.c:428
2810-#: iconv/iconvconfig.c:400 locale/programs/locale.c:298
2811-#: locale/programs/localedef.c:392 malloc/memusage.sh:77
2812-#: malloc/memusagestat.c:562 nscd/nscd.c:434 nss/getent.c:92 nss/makedb.c:250
2813-#: posix/getconf.c:1109
2814+#: catgets/gencat.c:256 debug/pcprofiledump.c:229 debug/xtrace.sh:68
2815+#: elf/ldconfig.c:323 elf/pldd.c:243 elf/sprof.c:394 iconv/iconv_prog.c:430
2816+#: iconv/iconvconfig.c:405 locale/programs/locale.c:301
2817+#: locale/programs/localedef.c:394 malloc/memusage.sh:75
2818+#: malloc/memusagestat.c:557 nscd/nscd.c:480 nss/getent.c:91 nss/makedb.c:392
2819+#: posix/getconf.c:1108
2820 #, c-format
2821 msgid "Written by %s.\n"
2822 msgstr "Escrit per %s.\n"
2823
2824-#: catgets/gencat.c:282
2825+#: catgets/gencat.c:287
2826 msgid "*standard input*"
2827 msgstr "*entrada estàndard*"
2828
2829-#: catgets/gencat.c:288 iconv/iconv_charmap.c:170 iconv/iconv_prog.c:294
2830-#: nss/makedb.c:170
2831+#: catgets/gencat.c:293 iconv/iconv_charmap.c:169 iconv/iconv_prog.c:293
2832+#: nss/makedb.c:248
2833 #, c-format
2834 msgid "cannot open input file `%s'"
2835 msgstr "no s’ha pogut obrir el fitxer d’entrada «%s»"
2836
2837-#: catgets/gencat.c:417 catgets/gencat.c:494
2838+#: catgets/gencat.c:422 catgets/gencat.c:497
2839 msgid "illegal set number"
2840 msgstr "el número de joc de missatges no és vàlid"
2841
2842-#: catgets/gencat.c:444
2843+#: catgets/gencat.c:449
2844 msgid "duplicate set definition"
2845 msgstr "la definició del joc de missatges és duplicada"
2846
2847-#: catgets/gencat.c:446 catgets/gencat.c:623 catgets/gencat.c:677
2848+#: catgets/gencat.c:451 catgets/gencat.c:623 catgets/gencat.c:675
2849 msgid "this is the first definition"
2850 msgstr "aquesta és la primera definició"
2851
2852@@ -267,52 +268,52 @@
2853 msgid "duplicated message number"
2854 msgstr "el número de missatge és duplicat"
2855
2856-#: catgets/gencat.c:674
2857+#: catgets/gencat.c:672
2858 msgid "duplicated message identifier"
2859 msgstr "l’identificador de missatge és duplicat"
2860
2861-#: catgets/gencat.c:731
2862+#: catgets/gencat.c:729
2863 msgid "invalid character: message ignored"
2864 msgstr "el caràcter no és vàlid: es descarta el missatge"
2865
2866-#: catgets/gencat.c:774
2867+#: catgets/gencat.c:772
2868 msgid "invalid line"
2869 msgstr "la línia no és vàlida"
2870
2871-#: catgets/gencat.c:828
2872+#: catgets/gencat.c:826
2873 msgid "malformed line ignored"
2874 msgstr "es descarta la línia en mal estat"
2875
2876-#: catgets/gencat.c:992 catgets/gencat.c:1033 nss/makedb.c:183
2877+#: catgets/gencat.c:990 catgets/gencat.c:1031
2878 #, c-format
2879 msgid "cannot open output file `%s'"
2880 msgstr "no s’ha pogut obrir el fitxer d’eixida «%s»"
2881
2882-#: catgets/gencat.c:1195 locale/programs/linereader.c:560
2883+#: catgets/gencat.c:1193 locale/programs/linereader.c:559
2884 msgid "invalid escape sequence"
2885 msgstr "la seqüència d’escapada no és vàlida"
2886
2887-#: catgets/gencat.c:1217
2888+#: catgets/gencat.c:1215
2889 msgid "unterminated message"
2890 msgstr "el missatge no està acabat"
2891
2892-#: catgets/gencat.c:1241
2893+#: catgets/gencat.c:1239
2894 #, c-format
2895 msgid "while opening old catalog file"
2896 msgstr "en obrir el fitxer antic de catàleg"
2897
2898-#: catgets/gencat.c:1332
2899+#: catgets/gencat.c:1330
2900 #, c-format
2901 msgid "conversion modules not available"
2902 msgstr "els mòduls de conversió no es troben disponibles"
2903
2904-#: catgets/gencat.c:1358
2905+#: catgets/gencat.c:1356
2906 #, c-format
2907 msgid "cannot determine escape character"
2908 msgstr "no s’ha pogut determinar el caràcter d’escapada"
2909
2910 # Més ajudes. ivb
2911-#: debug/pcprofiledump.c:53
2912+#: debug/pcprofiledump.c:52
2913 msgid "Don't buffer output"
2914 msgstr "No empra memòria intermèdia per a l’eixida."
2915
2916@@ -324,42 +325,43 @@
2917 # ivb tot i que el codi del programa cada volta que fa referència a «pc»
2918 # ivb o «PC» parla del «lowpc» i del «highpc», sempre en referència al
2919 # ivb segment de text (codi) del programa.
2920-#: debug/pcprofiledump.c:58
2921+#: debug/pcprofiledump.c:57
2922 msgid "Dump information generated by PC profiling."
2923 msgstr "Bolca la informació generada en perfilar el comptador de programa."
2924
2925-#: debug/pcprofiledump.c:61
2926+#: debug/pcprofiledump.c:60
2927 msgid "[FILE]"
2928 msgstr "[FITXER]"
2929
2930-#: debug/pcprofiledump.c:108
2931+#: debug/pcprofiledump.c:107
2932 #, c-format
2933 msgid "cannot open input file"
2934 msgstr "no s’ha pogut obrir el fitxer d’entrada"
2935
2936-#: debug/pcprofiledump.c:115
2937+#: debug/pcprofiledump.c:114
2938 #, c-format
2939 msgid "cannot read header"
2940 msgstr "no s’ha pogut llegir la capçalera"
2941
2942-#: debug/pcprofiledump.c:179
2943+#: debug/pcprofiledump.c:178
2944 #, c-format
2945 msgid "invalid pointer size"
2946 msgstr "la mida del punter no és vàlida"
2947
2948-#: debug/xtrace.sh:27 debug/xtrace.sh:45
2949+#: debug/xtrace.sh:26 debug/xtrace.sh:44
2950 msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
2951 msgstr "Forma d’ús: xtrace [OPCIÓ]… PROGRAMA [OPCIÓ_DE_PROGRAMA]…\\n"
2952
2953-#: debug/xtrace.sh:33 malloc/memusage.sh:27
2954-msgid "Try \\`%s --help' or `%s --usage' for more information.\\n"
2955+#: debug/xtrace.sh:32 elf/sotruss.ksh:56 elf/sotruss.ksh:67
2956+#: elf/sotruss.ksh:135 malloc/memusage.sh:26
2957+msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
2958 msgstr "Proveu «%s --help» o «%s --usage» per a obtenir més informació.\\n"
2959
2960-#: debug/xtrace.sh:39
2961+#: debug/xtrace.sh:38
2962 msgid "%s: option '%s' requires an argument.\\n"
2963 msgstr "%s: l’opció «%s» necessita un argument\\n"
2964
2965-#: debug/xtrace.sh:46
2966+#: debug/xtrace.sh:45
2967 msgid ""
2968 "Trace execution of program by printing currently executed function.\n"
2969 "\n"
2970@@ -387,163 +389,173 @@
2971 "opcions curtes corresponents.\n"
2972 "\n"
2973
2974-#: debug/xtrace.sh:127
2975+# L’adreça es veu millor així. ivb
2976+#: debug/xtrace.sh:57 elf/ldd.bash.in:55 elf/sotruss.ksh:49
2977+#: malloc/memusage.sh:64
2978+msgid "For bug reporting instructions, please see:\\\\n%s.\\\\n"
2979+msgstr "Per a obtenir instruccions sobre com informar d’un error, vegeu\\\\n<%s>.\\\\n"
2980+
2981+#: debug/xtrace.sh:125
2982 msgid "xtrace: unrecognized option \\`$1'\\n"
2983 msgstr "xtrace: l’opció «$1» no és reconeguda\\n"
2984
2985-#: debug/xtrace.sh:140
2986+#: debug/xtrace.sh:138
2987 msgid "No program name given\\n"
2988 msgstr "no s’ha indicat un nom de programa\\n"
2989
2990-#: debug/xtrace.sh:148
2991+#: debug/xtrace.sh:146
2992 #, sh-format
2993 msgid "executable \\`$program' not found\\n"
2994 msgstr "no s’ha trobat l’executable «$program»\\n"
2995
2996-#: debug/xtrace.sh:152
2997+#: debug/xtrace.sh:150
2998 #, sh-format
2999 msgid "\\`$program' is no executable\\n"
3000 msgstr "«$program» no és executable\\n"
3001
3002-#: dlfcn/dlinfo.c:64
3003+#: dlfcn/dlinfo.c:63
3004 msgid "RTLD_SELF used in code not dynamically loaded"
3005 msgstr "S’ha emprat RTLD_SELF en un codi no carregat dinàmicament"
3006
3007-#: dlfcn/dlinfo.c:73
3008+#: dlfcn/dlinfo.c:72
3009 msgid "unsupported dlinfo request"
3010 msgstr "dlinfo() no permet l’ús d’aquesta petició"
3011
3012-#: dlfcn/dlmopen.c:64
3013+#: dlfcn/dlmopen.c:63
3014 msgid "invalid namespace"
3015 msgstr "l’espai de noms no és vàlid"
3016
3017-#: dlfcn/dlmopen.c:69
3018+#: dlfcn/dlmopen.c:68
3019 msgid "invalid mode"
3020 msgstr "el mode no és vàlid"
3021
3022-#: dlfcn/dlopen.c:65
3023+#: dlfcn/dlopen.c:64
3024 msgid "invalid mode parameter"
3025 msgstr "el paràmetre de mode no és vàlid"
3026
3027 # ivb (2001/11/01)
3028 # ivb Es refereix al tipus de la biblioteca (libc{4,5,6}) -> masculí.
3029-#: elf/cache.c:69
3030+#: elf/cache.c:68
3031 msgid "unknown"
3032 msgstr "desconegut"
3033
3034 # ivb (2001/11/06)
3035 # ivb Cal mantenir-ho curt...
3036-#: elf/cache.c:112
3037+#: elf/cache.c:121
3038 msgid "Unknown OS"
3039 msgstr "SO desconegut"
3040
3041 # ivb (2001/11/06)
3042 # ivb Cal mantenir-ho curt...
3043-#: elf/cache.c:117
3044+#: elf/cache.c:126
3045 #, c-format
3046 msgid ", OS ABI: %s %d.%d.%d"
3047 msgstr ", ABI del SO: %s %d.%d.%d"
3048
3049-#: elf/cache.c:134 elf/ldconfig.c:1305
3050+#: elf/cache.c:143 elf/ldconfig.c:1309
3051 #, c-format
3052 msgid "Can't open cache file %s\n"
3053 msgstr "no s’ha pogut obrir el fitxer «%s» de memòria cau\n"
3054
3055-#: elf/cache.c:148
3056+#: elf/cache.c:157
3057 #, c-format
3058 msgid "mmap of cache file failed.\n"
3059 msgstr "ha fallat mmap() sobre el fitxer de memòria cau\n"
3060
3061-#: elf/cache.c:152 elf/cache.c:166
3062+#: elf/cache.c:161 elf/cache.c:175
3063 #, c-format
3064 msgid "File is not a cache file.\n"
3065 msgstr "el fitxer no és un fitxer de memòria cau\n"
3066
3067 # No és un error. ivb
3068-#: elf/cache.c:199 elf/cache.c:209
3069+#: elf/cache.c:208 elf/cache.c:218
3070 #, c-format
3071 msgid "%d libs found in cache `%s'\n"
3072 msgstr "S’han trobat %d biblioteques a la memòria cau «%s».\n"
3073
3074-#: elf/cache.c:403
3075+#: elf/cache.c:412
3076 #, c-format
3077 msgid "Can't create temporary cache file %s"
3078 msgstr "no s’ha pogut crear el fitxer temporal de memòria cau «%s»"
3079
3080-#: elf/cache.c:411 elf/cache.c:421 elf/cache.c:425 elf/cache.c:430
3081+#: elf/cache.c:420 elf/cache.c:430 elf/cache.c:434 elf/cache.c:439
3082 #, c-format
3083 msgid "Writing of cache data failed"
3084 msgstr "no s’han pogut escriure les dades de la memòria cau"
3085
3086-#: elf/cache.c:435
3087+#: elf/cache.c:444
3088 #, c-format
3089 msgid "Changing access rights of %s to %#o failed"
3090 msgstr "no s’ha pogut canviar els drets d’accés de «%s» a %#o"
3091
3092-#: elf/cache.c:440
3093+#: elf/cache.c:449
3094 #, c-format
3095 msgid "Renaming of %s to %s failed"
3096 msgstr "no s’ha pogut reanomenar «%s» a «%s»"
3097
3098-#: elf/dl-close.c:387 elf/dl-open.c:397
3099+#: elf/dl-close.c:378 elf/dl-open.c:474
3100 msgid "cannot create scope list"
3101 msgstr "no s’ha pogut crear la llista d’àmbits"
3102
3103-#: elf/dl-close.c:767
3104+#: elf/dl-close.c:771
3105 msgid "shared object not open"
3106 msgstr "l’objecte compartit no és obert"
3107
3108 # ivb (2001/11/05)
3109 # ivb DST = Dynamic String Token (component cadena dinàmica)
3110-#: elf/dl-deps.c:114
3111+#: elf/dl-deps.c:112
3112 msgid "DST not allowed in SUID/SGID programs"
3113 msgstr "no es permeten components cadena dinàmica (DST) en programes SUID/SGID"
3114
3115-#: elf/dl-deps.c:127
3116+#: elf/dl-deps.c:125
3117 msgid "empty dynamic string token substitution"
3118 msgstr "la substitució del component cadena dinàmica és buida"
3119
3120 # ivb (2002/10/21)
3121 # ivb Es refereix a _objectes_ auxiliars, segons el codi.
3122-#: elf/dl-deps.c:133
3123+#: elf/dl-deps.c:131
3124 #, c-format
3125 msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n"
3126 msgstr "no s’ha pogut carregar l’objecte auxiliar «%s» perquè la substitució del component cadena dinàmica és buida\n"
3127
3128-#: elf/dl-deps.c:474
3129+#: elf/dl-deps.c:483
3130 msgid "cannot allocate dependency list"
3131 msgstr "no s’ha pogut reservar la llista de dependències"
3132
3133-#: elf/dl-deps.c:514 elf/dl-deps.c:574
3134+#: elf/dl-deps.c:520 elf/dl-deps.c:580
3135 msgid "cannot allocate symbol search list"
3136 msgstr "no s’ha pogut reservar la llista de cerca de símbols"
3137
3138 # ivb (2002/10/21)
3139 # ivb LD_TRACE_PRELINKING és una variable d'entorn, no és part del filtre.
3140-#: elf/dl-deps.c:554
3141+#: elf/dl-deps.c:560
3142 msgid "Filters not supported with LD_TRACE_PRELINKING"
3143 msgstr "LD_TRACE_PRELINKING no permet l’ús de filtres"
3144
3145-#: elf/dl-error.c:77
3146+#: elf/dl-error.c:76
3147 msgid "DYNAMIC LINKER BUG!!!"
3148 msgstr "ERROR A L’ENLLAÇADOR DINÀMIC!!!"
3149
3150-#: elf/dl-error.c:124
3151+#: elf/dl-error.c:123
3152 msgid "error while loading shared libraries"
3153 msgstr "error en carregar les biblioteques dinàmiques"
3154
3155-#: elf/dl-fptr.c:88
3156+#: elf/dl-fptr.c:87 ports/sysdeps/hppa/dl-fptr.c:93
3157 msgid "cannot map pages for fdesc table"
3158 msgstr "no s’han pogut mapar pàgines per a la taula «fdesc»"
3159
3160-#: elf/dl-fptr.c:192
3161+#: elf/dl-fptr.c:191 ports/sysdeps/hppa/dl-fptr.c:206
3162 msgid "cannot map pages for fptr table"
3163 msgstr "no s’han pogut mapar pàgines per a la taula «fptr»"
3164
3165-#: elf/dl-fptr.c:221
3166+#: elf/dl-fptr.c:220 ports/sysdeps/hppa/dl-fptr.c:235
3167 msgid "internal error: symidx out of range of fptr table"
3168 msgstr "error intern: «symidx» és fora de rang respecte la taula «fptr»"
3169
3170+#: elf/dl-hwcaps.c:173 elf/dl-hwcaps.c:185
3171+msgid "cannot create capability list"
3172+msgstr "no s’ha pogut crear la llista de capacitats"
3173+
3174 #: elf/dl-load.c:471
3175 msgid "cannot allocate name record"
3176 msgstr "no s’ha pogut reservar el registre de nom"
3177@@ -560,181 +572,181 @@
3178 msgid "cannot create search path array"
3179 msgstr "no s’ha pogut crear el vector de camins de cerca"
3180
3181-#: elf/dl-load.c:931
3182+#: elf/dl-load.c:934
3183 msgid "cannot stat shared object"
3184 msgstr "ha fallat stat() sobre l’objecte compartit"
3185
3186 # ivb (2001/10/28)
3187 # ivb Es refereix a /dev/zero .
3188-#: elf/dl-load.c:1009
3189+#: elf/dl-load.c:1012
3190 msgid "cannot open zero fill device"
3191 msgstr "no s’ha pogut obrir el dispositiu de zeros"
3192
3193-#: elf/dl-load.c:1055 elf/dl-load.c:2313
3194+#: elf/dl-load.c:1059 elf/dl-load.c:2339
3195 msgid "cannot create shared object descriptor"
3196 msgstr "no s’ha pogut crear el descriptor d’objecte compartit"
3197
3198-#: elf/dl-load.c:1074 elf/dl-load.c:1730 elf/dl-load.c:1833
3199+#: elf/dl-load.c:1078 elf/dl-load.c:1751 elf/dl-load.c:1854
3200 msgid "cannot read file data"
3201 msgstr "no s’han pogut llegir les dades del fitxer"
3202
3203-#: elf/dl-load.c:1120
3204+#: elf/dl-load.c:1124
3205 msgid "ELF load command alignment not page-aligned"
3206 msgstr "l’alineament de l’ordre ELF de càrrega no està alineada amb la pàgina"
3207
3208-#: elf/dl-load.c:1127
3209+#: elf/dl-load.c:1131
3210 msgid "ELF load command address/offset not properly aligned"
3211 msgstr "l’adreça o desplaçament de l’ordre ELF de càrrega no està correctament alineada"
3212
3213-#: elf/dl-load.c:1210
3214+#: elf/dl-load.c:1216
3215 msgid "cannot allocate TLS data structures for initial thread"
3216 msgstr "no s’han pogut reservar les estructures de dades TLS per al fil inicial"
3217
3218-#: elf/dl-load.c:1233
3219+#: elf/dl-load.c:1239
3220 msgid "cannot handle TLS data"
3221 msgstr "no es pot tractar amb dades TLS"
3222
3223-#: elf/dl-load.c:1252
3224+#: elf/dl-load.c:1258
3225 msgid "object file has no loadable segments"
3226 msgstr "el fitxer objecte no té segments carregables"
3227
3228-#: elf/dl-load.c:1288
3229+#: elf/dl-load.c:1294
3230 msgid "failed to map segment from shared object"
3231 msgstr "no s’ha pogut mapar un segment de l’objecte compartit"
3232
3233-#: elf/dl-load.c:1314
3234+#: elf/dl-load.c:1320
3235 msgid "cannot dynamically load executable"
3236 msgstr "no s’ha pogut carregar dinàmicament l’executable"
3237
3238-#: elf/dl-load.c:1376
3239+#: elf/dl-load.c:1383
3240 msgid "cannot change memory protections"
3241 msgstr "no s’han pogut canviar les proteccions de memòria"
3242
3243-#: elf/dl-load.c:1395
3244+#: elf/dl-load.c:1402
3245 msgid "cannot map zero-fill pages"
3246 msgstr "no s’han pogut mapar les pàgines plenes de zeros"
3247
3248-#: elf/dl-load.c:1409
3249+#: elf/dl-load.c:1416
3250 msgid "object file has no dynamic section"
3251 msgstr "el fitxer objecte no té secció dinàmica"
3252
3253-#: elf/dl-load.c:1432
3254+#: elf/dl-load.c:1439
3255 msgid "shared object cannot be dlopen()ed"
3256 msgstr "ha fallat dlopen() sobre l’objecte compartit"
3257
3258-#: elf/dl-load.c:1445
3259+#: elf/dl-load.c:1452
3260 msgid "cannot allocate memory for program header"
3261 msgstr "no s’ha pogut reservar memòria per a la capçalera del programa"
3262
3263-#: elf/dl-load.c:1462 elf/dl-open.c:180
3264+#: elf/dl-load.c:1469 elf/dl-open.c:180
3265 msgid "invalid caller"
3266 msgstr "la biblioteca que ha fet la crida no és vàlida"
3267
3268-#: elf/dl-load.c:1501
3269+#: elf/dl-load.c:1508
3270 msgid "cannot enable executable stack as shared object requires"
3271 msgstr "no s’ha pogut habilitar la pila executable a requeriment de l’objecte compartit"
3272
3273-#: elf/dl-load.c:1514
3274+#: elf/dl-load.c:1521
3275 msgid "cannot close file descriptor"
3276 msgstr "no s’ha pogut tancar un descriptor de fitxer"
3277
3278-#: elf/dl-load.c:1730
3279+#: elf/dl-load.c:1751
3280 msgid "file too short"
3281 msgstr "el fitxer és massa curt"
3282
3283-#: elf/dl-load.c:1766
3284+#: elf/dl-load.c:1787
3285 msgid "invalid ELF header"
3286 msgstr "la capçalera ELF no és vàlida"
3287
3288-#: elf/dl-load.c:1778
3289+#: elf/dl-load.c:1799
3290 msgid "ELF file data encoding not big-endian"
3291 msgstr "la codificació de les dades del fitxer ELF no és big‐endian"
3292
3293-#: elf/dl-load.c:1780
3294+#: elf/dl-load.c:1801
3295 msgid "ELF file data encoding not little-endian"
3296 msgstr "la codificació de les dades del fitxer ELF no és little‐endian"
3297
3298-#: elf/dl-load.c:1784
3299+#: elf/dl-load.c:1805
3300 msgid "ELF file version ident does not match current one"
3301 msgstr "la identificació de la versió del fitxer ELF no concorda amb l’actual"
3302
3303 # ivb (2001/11(06)
3304 # ivb ABI = Application Binary Interface (interfície binària d'aplicació)
3305-#: elf/dl-load.c:1788
3306+#: elf/dl-load.c:1809
3307 msgid "ELF file OS ABI invalid"
3308 msgstr "l’ABI de sistema operatiu del fitxer ELF no és vàlida"
3309
3310-#: elf/dl-load.c:1791
3311+#: elf/dl-load.c:1812
3312 msgid "ELF file ABI version invalid"
3313 msgstr "la versió de l’ABI del fitxer ELF no és vàlida"
3314
3315-#: elf/dl-load.c:1794
3316+#: elf/dl-load.c:1815
3317 msgid "nonzero padding in e_ident"
3318 msgstr "el replè d’«e_ident» no conté només zeros"
3319
3320-#: elf/dl-load.c:1797
3321+#: elf/dl-load.c:1818
3322 msgid "internal error"
3323 msgstr "error intern"
3324
3325-#: elf/dl-load.c:1804
3326+#: elf/dl-load.c:1825
3327 msgid "ELF file version does not match current one"
3328 msgstr "la versió del fitxer ELF no concorda amb l’actual"
3329
3330-#: elf/dl-load.c:1812
3331+#: elf/dl-load.c:1833
3332 msgid "only ET_DYN and ET_EXEC can be loaded"
3333 msgstr "només es poden carregar els tipus ET_DYN i ET_EXEC"
3334
3335 # ivb (2001/11/01)
3336 # ivb La traducció completa de «phentsize» vindria a ser: mida d'entrada
3337 # ivb de taula de la capçalera de programa.
3338-#: elf/dl-load.c:1818
3339+#: elf/dl-load.c:1839
3340 msgid "ELF file's phentsize not the expected size"
3341 msgstr "el valor de «phentsize» del fitxer ELF no és l’esperat"
3342
3343-#: elf/dl-load.c:2332
3344+#: elf/dl-load.c:2358
3345 msgid "wrong ELF class: ELFCLASS64"
3346 msgstr "la classe ELF no és vàlida: ELFCLASS64"
3347
3348-#: elf/dl-load.c:2333
3349+#: elf/dl-load.c:2359
3350 msgid "wrong ELF class: ELFCLASS32"
3351 msgstr "la classe ELF no és vàlida: ELFCLASS32"
3352
3353-#: elf/dl-load.c:2336
3354+#: elf/dl-load.c:2362
3355 msgid "cannot open shared object file"
3356 msgstr "no s’ha pogut obrir el fitxer objecte compartit"
3357
3358-#: elf/dl-lookup.c:757
3359+#: elf/dl-lookup.c:757 ports/sysdeps/mips/dl-lookup.c:774
3360 msgid "relocation error"
3361 msgstr "error de reubicació"
3362
3363-#: elf/dl-lookup.c:785
3364+#: elf/dl-lookup.c:786 ports/sysdeps/mips/dl-lookup.c:803
3365 msgid "symbol lookup error"
3366 msgstr "error en cercar el símbol"
3367
3368-#: elf/dl-open.c:115
3369+#: elf/dl-open.c:110
3370 msgid "cannot extend global scope"
3371 msgstr "no s’ha pogut estendre l’àmbit global"
3372
3373 # ivb (2002/10/29)
3374 # ivb TLS = Thread Local Storage
3375-#: elf/dl-open.c:440
3376+#: elf/dl-open.c:524
3377 msgid "TLS generation counter wrapped! Please report this."
3378 msgstr "El comptador de generació de TLS s’ha esgotat! Per favor, informeu d’açò."
3379
3380 # Cas general. ivb
3381-#: elf/dl-open.c:462
3382+#: elf/dl-open.c:546
3383 msgid "cannot load any more object with static TLS"
3384 msgstr "no es poden carregar més objectes amb el TLS estàtic"
3385
3386-#: elf/dl-open.c:511
3387+#: elf/dl-open.c:599
3388 msgid "invalid mode for dlopen()"
3389 msgstr "el mode de dlopen() no és vàlid"
3390
3391-#: elf/dl-open.c:528
3392+#: elf/dl-open.c:616
3393 msgid "no more namespaces available for dlmopen()"
3394 msgstr "no resten espais de noms disponibles per a dlmopen()"
3395
3396-#: elf/dl-open.c:547
3397+#: elf/dl-open.c:634
3398 msgid "invalid target namespace in dlmopen()"
3399 msgstr "l’espai de noms destí de dlmopen() no és vàlid"
3400
3401@@ -742,280 +754,276 @@
3402 msgid "cannot allocate memory in static TLS block"
3403 msgstr "no s’ha pogut reservar memòria al bloc TLS estàtic"
3404
3405-#: elf/dl-reloc.c:212
3406+#: elf/dl-reloc.c:213
3407 msgid "cannot make segment writable for relocation"
3408 msgstr "no s’ha pogut fer escrivible el segment per a reubicar‐lo"
3409
3410 # ivb (2002/10/21)
3411 # ivb PLT = Procedure Linkage Table, Taula d'Enllaçat de Procediments
3412 # ivb PLTREL = tipus de reubicació usada per la PLT
3413-#: elf/dl-reloc.c:275
3414+#: elf/dl-reloc.c:276
3415 #, c-format
3416 msgid "%s: no PLTREL found in object %s\n"
3417 msgstr "%s: no s’ha trobat el PLTREL de l’objecte «%s»\n"
3418
3419-#: elf/dl-reloc.c:286
3420+#: elf/dl-reloc.c:287
3421 #, c-format
3422 msgid "%s: out of memory to store relocation results for %s\n"
3423 msgstr "%s: no resta memòria per a guardar els resultats de reubicar «%s»\n"
3424
3425-#: elf/dl-reloc.c:302
3426+#: elf/dl-reloc.c:303
3427 msgid "cannot restore segment prot after reloc"
3428 msgstr "no s’ha pogut restaurar la protecció del segment després de reubicar‐lo"
3429
3430-#: elf/dl-reloc.c:331
3431+#: elf/dl-reloc.c:332
3432 msgid "cannot apply additional memory protection after relocation"
3433 msgstr "no s’ha pogut protegir la memòria després de reubicar"
3434
3435-#: elf/dl-sym.c:162
3436+#: elf/dl-sym.c:163
3437 msgid "RTLD_NEXT used in code not dynamically loaded"
3438 msgstr "s’ha emprat RTLD_NEXT en un codi no carregat dinàmicament"
3439
3440-#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
3441-msgid "cannot create capability list"
3442-msgstr "no s’ha pogut crear la llista de capacitats"
3443-
3444-#: elf/dl-tls.c:861
3445+#: elf/dl-tls.c:875
3446 msgid "cannot create TLS data structures"
3447 msgstr "no s’han pogut crear les estructures de dades TLS"
3448
3449-#: elf/dl-version.c:172
3450+#: elf/dl-version.c:166
3451 msgid "version lookup error"
3452 msgstr "error en cercar la versió"
3453
3454-#: elf/dl-version.c:303
3455+#: elf/dl-version.c:297
3456 msgid "cannot allocate version reference table"
3457 msgstr "no s’ha pogut reservar la taula de referències de versions"
3458
3459 # Més ajudes. ivb
3460-#: elf/ldconfig.c:141
3461+#: elf/ldconfig.c:140
3462 msgid "Print cache"
3463 msgstr "Mostra la memòria cau."
3464
3465-#: elf/ldconfig.c:142
3466+#: elf/ldconfig.c:141
3467 msgid "Generate verbose messages"
3468 msgstr "Genera missatges detallats."
3469
3470-#: elf/ldconfig.c:143
3471+#: elf/ldconfig.c:142
3472 msgid "Don't build cache"
3473 msgstr "No construeix la memòria cau."
3474
3475-#: elf/ldconfig.c:144
3476+#: elf/ldconfig.c:143
3477 msgid "Don't generate links"
3478 msgstr "No genera enllaços."
3479
3480-#: elf/ldconfig.c:145
3481+#: elf/ldconfig.c:144
3482 msgid "Change to and use ROOT as root directory"
3483 msgstr "Canvia a i empra ARREL com a directori arrel."
3484
3485-#: elf/ldconfig.c:145
3486+#: elf/ldconfig.c:144
3487 msgid "ROOT"
3488 msgstr "ARREL"
3489
3490-#: elf/ldconfig.c:146
3491+#: elf/ldconfig.c:145
3492 msgid "CACHE"
3493 msgstr "CACHE"
3494
3495-#: elf/ldconfig.c:146
3496+#: elf/ldconfig.c:145
3497 msgid "Use CACHE as cache file"
3498 msgstr "Empra CACHE com a fitxer de memòria cau."
3499
3500-#: elf/ldconfig.c:147
3501+#: elf/ldconfig.c:146
3502 msgid "CONF"
3503 msgstr "CONF"
3504
3505-#: elf/ldconfig.c:147
3506+#: elf/ldconfig.c:146
3507 msgid "Use CONF as configuration file"
3508 msgstr "Empra CONF com a fitxer de configuració."
3509
3510-#: elf/ldconfig.c:148
3511+#: elf/ldconfig.c:147
3512 msgid "Only process directories specified on the command line. Don't build cache."
3513 msgstr "Només processa els directoris especificats a la línia d’ordres. No construeix la memòria cau."
3514
3515-#: elf/ldconfig.c:149
3516+#: elf/ldconfig.c:148
3517 msgid "Manually link individual libraries."
3518 msgstr "Per a enllaçar les biblioteques manualment."
3519
3520-#: elf/ldconfig.c:150
3521+#: elf/ldconfig.c:149
3522 msgid "FORMAT"
3523 msgstr "FORMAT"
3524
3525-#: elf/ldconfig.c:150
3526+#: elf/ldconfig.c:149
3527 msgid "Format to use: new, old or compat (default)"
3528 msgstr "FORMAT a emprar: «new» (nou), «old» (antic) o «compat» (compatible, per defecte)."
3529
3530-#: elf/ldconfig.c:151
3531+#: elf/ldconfig.c:150
3532 msgid "Ignore auxiliary cache file"
3533 msgstr "No té en compte el fitxer de memòria cau auxilar."
3534
3535-#: elf/ldconfig.c:159
3536+#: elf/ldconfig.c:158
3537 msgid "Configure Dynamic Linker Run Time Bindings."
3538 msgstr "Configura els vincles en temps d’execució de l’enllaçador dinàmic."
3539
3540-#: elf/ldconfig.c:339
3541+#: elf/ldconfig.c:341
3542 #, c-format
3543 msgid "Path `%s' given more than once"
3544 msgstr "s’ha indicat el camí «%s» més d’una volta"
3545
3546-#: elf/ldconfig.c:379
3547+#: elf/ldconfig.c:381
3548 #, c-format
3549 msgid "%s is not a known library type"
3550 msgstr "«%s» no és un tipus conegut de biblioteca"
3551
3552-#: elf/ldconfig.c:407
3553+#: elf/ldconfig.c:409
3554 #, c-format
3555 msgid "Can't stat %s"
3556 msgstr "ha fallat stat() sobre «%s»"
3557
3558-#: elf/ldconfig.c:481
3559+#: elf/ldconfig.c:483
3560 #, c-format
3561 msgid "Can't stat %s\n"
3562 msgstr "ha fallat stat() sobre «%s»\n"
3563
3564-#: elf/ldconfig.c:491
3565+#: elf/ldconfig.c:493
3566 #, c-format
3567 msgid "%s is not a symbolic link\n"
3568 msgstr "«%s» no és un enllaç simbòlic\n"
3569
3570-#: elf/ldconfig.c:510
3571+#: elf/ldconfig.c:512
3572 #, c-format
3573 msgid "Can't unlink %s"
3574 msgstr "no s’ha pogut desenllaçar «%s»"
3575
3576-#: elf/ldconfig.c:516
3577+#: elf/ldconfig.c:518
3578 #, c-format
3579 msgid "Can't link %s to %s"
3580 msgstr "no s’ha pogut crear un enllaç des de «%s» cap a «%s»"
3581
3582 # ivb (2001/10/28)
3583 # ivb Es refereix a un enllaç -> masculí.
3584-#: elf/ldconfig.c:522
3585+#: elf/ldconfig.c:524
3586 msgid " (changed)\n"
3587 msgstr " (canviat)\n"
3588
3589 # ivb (2001/10/28)
3590 # ivb Es refereix a fer o no l'enllaç, no importa el gènere.
3591-#: elf/ldconfig.c:524
3592+#: elf/ldconfig.c:526
3593 msgid " (SKIPPED)\n"
3594 msgstr " (SALTAT)\n"
3595
3596-#: elf/ldconfig.c:579
3597+#: elf/ldconfig.c:581
3598 #, c-format
3599 msgid "Can't find %s"
3600 msgstr "no s’ha pogut trobar «%s»"
3601
3602-#: elf/ldconfig.c:595 elf/ldconfig.c:768 elf/ldconfig.c:827 elf/ldconfig.c:861
3603+#: elf/ldconfig.c:597 elf/ldconfig.c:770 elf/ldconfig.c:829 elf/ldconfig.c:863
3604 #, c-format
3605 msgid "Cannot lstat %s"
3606 msgstr "ha fallat lstat() sobre «%s»"
3607
3608-#: elf/ldconfig.c:602
3609+#: elf/ldconfig.c:604
3610 #, c-format
3611 msgid "Ignored file %s since it is not a regular file."
3612 msgstr "es descarta el fitxer «%s» que no és un fitxer ordinari"
3613
3614-#: elf/ldconfig.c:611
3615+#: elf/ldconfig.c:613
3616 #, c-format
3617 msgid "No link created since soname could not be found for %s"
3618 msgstr "no s’ha creat l’enllaç perquè no s’ha trobat el nom d’objecte compartit de «%s»"
3619
3620-#: elf/ldconfig.c:694
3621+#: elf/ldconfig.c:696
3622 #, c-format
3623 msgid "Can't open directory %s"
3624 msgstr "no s’ha pogut obrir el directori «%s»"
3625
3626-#: elf/ldconfig.c:786 elf/ldconfig.c:848 elf/readlib.c:91
3627+#: elf/ldconfig.c:788 elf/ldconfig.c:850 elf/readlib.c:90
3628 #, c-format
3629 msgid "Input file %s not found.\n"
3630 msgstr "no s’ha trobat el fitxer d’entrada «%s»\n"
3631
3632-#: elf/ldconfig.c:793
3633+#: elf/ldconfig.c:795
3634 #, c-format
3635 msgid "Cannot stat %s"
3636 msgstr "ha fallat stat() sobre «%s»"
3637
3638-#: elf/ldconfig.c:922
3639+#: elf/ldconfig.c:924
3640 #, c-format
3641 msgid "libc5 library %s in wrong directory"
3642 msgstr "la biblioteca «%s» per a libc5 es troba en un directori incorrecte"
3643
3644-#: elf/ldconfig.c:925
3645+#: elf/ldconfig.c:927
3646 #, c-format
3647 msgid "libc6 library %s in wrong directory"
3648 msgstr "la biblioteca «%s» per a libc6 es troba en un directori incorrecte"
3649
3650-#: elf/ldconfig.c:928
3651+#: elf/ldconfig.c:930
3652 #, c-format
3653 msgid "libc4 library %s in wrong directory"
3654 msgstr "la biblioteca «%s» per a libc4 es troba en un directori incorrecte"
3655
3656-#: elf/ldconfig.c:956
3657+#: elf/ldconfig.c:958
3658 #, c-format
3659 msgid "libraries %s and %s in directory %s have same soname but different type."
3660 msgstr "les biblioteques «%s» i «%s» del directori «%s» tenen el mateix nom d’objecte compartit però diferent tipus."
3661
3662-#: elf/ldconfig.c:1065
3663+#: elf/ldconfig.c:1067
3664 #, c-format
3665-msgid "Can't open configuration file %s"
3666-msgstr "no s’ha pogut obrir el fitxer «%s» de configuració"
3667+msgid "Warning: ignoring configuration file that cannot be opened: %s"
3668+msgstr "avís: es descarta el fitxer de configuració que no s’ha pogut obrir: %s"
3669
3670-#: elf/ldconfig.c:1129
3671+#: elf/ldconfig.c:1133
3672 #, c-format
3673 msgid "%s:%u: bad syntax in hwcap line"
3674 msgstr "%s:%u: la sintaxi de la línia «hwcap» no és vàlida"
3675
3676-#: elf/ldconfig.c:1135
3677+#: elf/ldconfig.c:1139
3678 #, c-format
3679 msgid "%s:%u: hwcap index %lu above maximum %u"
3680 msgstr "%s:%u: la «hwcap» amb índex %lu està sobre el màxim %u"
3681
3682 # La substitució final és per un nom. ivb
3683-#: elf/ldconfig.c:1142 elf/ldconfig.c:1150
3684+#: elf/ldconfig.c:1146 elf/ldconfig.c:1154
3685 #, c-format
3686 msgid "%s:%u: hwcap index %lu already defined as %s"
3687 msgstr "%s:%u: la «hwcap» amb índex %lu ja ha estat definida com a «%s»"
3688
3689-#: elf/ldconfig.c:1153
3690+#: elf/ldconfig.c:1157
3691 #, c-format
3692 msgid "%s:%u: duplicate hwcap %lu %s"
3693 msgstr "%s:%u: la «hwcap» %lu amb nom «%s» està duplicada"
3694
3695-#: elf/ldconfig.c:1175
3696+#: elf/ldconfig.c:1179
3697 #, c-format
3698 msgid "need absolute file name for configuration file when using -r"
3699 msgstr "cal indicar el camí absolut del fitxer de configuració en emprar «-r»"
3700
3701-#: elf/ldconfig.c:1182 locale/programs/xmalloc.c:70 malloc/obstack.c:434
3702-#: malloc/obstack.c:436 posix/getconf.c:1077 posix/getconf.c:1297
3703+#: elf/ldconfig.c:1186 locale/programs/xmalloc.c:65 malloc/obstack.c:433
3704+#: malloc/obstack.c:435 posix/getconf.c:1076 posix/getconf.c:1296
3705 #, c-format
3706 msgid "memory exhausted"
3707 msgstr "la memòria s’ha exhaurit"
3708
3709-#: elf/ldconfig.c:1214
3710+#: elf/ldconfig.c:1218
3711 #, c-format
3712 msgid "%s:%u: cannot read directory %s"
3713 msgstr "%s:%u: no s’ha pogut llegir el directori «%s»"
3714
3715-#: elf/ldconfig.c:1258
3716+#: elf/ldconfig.c:1262
3717 #, c-format
3718 msgid "relative path `%s' used to build cache"
3719 msgstr "s’ha indicat el camí relatiu «%s» per a construir la memòria cau"
3720
3721-#: elf/ldconfig.c:1284
3722+#: elf/ldconfig.c:1288
3723 #, c-format
3724 msgid "Can't chdir to /"
3725 msgstr "no s’ha pogut canviar al directori arrel"
3726
3727-#: elf/ldconfig.c:1325
3728+#: elf/ldconfig.c:1329
3729 #, c-format
3730 msgid "Can't open cache file directory %s\n"
3731 msgstr "no s’ha pogut obrir el directori «%s» de fitxers de memòria cau\n"
3732
3733-#: elf/ldd.bash.in:43
3734+#: elf/ldd.bash.in:42
3735 msgid "Written by %s and %s.\n"
3736 msgstr "Escrit per %s i %s.\n"
3737
3738-#: elf/ldd.bash.in:48
3739+#: elf/ldd.bash.in:47
3740 msgid ""
3741 "Usage: ldd [OPTION]... FILE...\n"
3742 " --help print this help and exit\n"
3743@@ -1035,110 +1043,203 @@
3744 " --version Mostra informació sobre la versió i ix.\n"
3745 "\n"
3746
3747-#: elf/ldd.bash.in:82
3748+#: elf/ldd.bash.in:80
3749 msgid "ldd: option \\`$1' is ambiguous"
3750 msgstr "ldd: l’opció «$1» és ambígua"
3751
3752-#: elf/ldd.bash.in:89
3753+#: elf/ldd.bash.in:87
3754 msgid "unrecognized option"
3755 msgstr "l’opció no és reconeguda"
3756
3757-#: elf/ldd.bash.in:90 elf/ldd.bash.in:128
3758+#: elf/ldd.bash.in:88 elf/ldd.bash.in:126
3759 msgid "Try \\`ldd --help' for more information."
3760 msgstr "Proveu «ldd --help» per a obtenir més informació."
3761
3762-#: elf/ldd.bash.in:127
3763+#: elf/ldd.bash.in:125
3764 msgid "missing file arguments"
3765 msgstr "manquen arguments fitxer"
3766
3767 #. TRANS No such file or directory. This is a ``file doesn't exist'' error
3768 #. TRANS for ordinary files that are referenced in contexts where they are
3769 #. TRANS expected to already exist.
3770-#: elf/ldd.bash.in:150 sysdeps/gnu/errlist.c:36
3771+#: elf/ldd.bash.in:148 sysdeps/gnu/errlist.c:36
3772 msgid "No such file or directory"
3773 msgstr "El fitxer o directori no existeix"
3774
3775 # ivb (2001/10/31)
3776 # ivb Cal tenir en compte que «ordinary» a l'anglés és cosa pler diferent ;)
3777-#: elf/ldd.bash.in:153 inet/rcmd.c:488
3778+#: elf/ldd.bash.in:151 inet/rcmd.c:488
3779 msgid "not regular file"
3780 msgstr "no és un fitxer ordinari"
3781
3782 # Darrere va el nom de fitxer, no puc canviar les cometes. :( ivb
3783-#: elf/ldd.bash.in:156
3784+#: elf/ldd.bash.in:154
3785 msgid "warning: you do not have execution permission for"
3786 msgstr "avís: no teniu permís d’execució per a"
3787
3788-#: elf/ldd.bash.in:185
3789+#: elf/ldd.bash.in:183
3790 msgid "\tnot a dynamic executable"
3791 msgstr "\tno és un executable dinàmic"
3792
3793 # Davant va el nom de fitxer, no puc canviar les cometes. :( ivb
3794-#: elf/ldd.bash.in:193
3795+#: elf/ldd.bash.in:191
3796 msgid "exited with unknown exit code"
3797 msgstr "ha finalitzat amb un codi d’eixida desconegut"
3798
3799 # Darrere va el nom de fitxer, no puc canviar les cometes. :( ivb
3800-#: elf/ldd.bash.in:198
3801+#: elf/ldd.bash.in:196
3802 msgid "error: you do not have read permission for"
3803 msgstr "error: no teniu permís de lectura per a"
3804
3805-#: elf/readelflib.c:35
3806+#: elf/pldd-xx.c:105
3807 #, c-format
3808+msgid "cannot find program header of process"
3809+msgstr "no s’ha trobat la capçalera de programa del procés"
3810+
3811+#: elf/pldd-xx.c:110
3812+#, c-format
3813+msgid "cannot read program header"
3814+msgstr "no s’ha pogut llegir la capçalera de programa"
3815+
3816+#: elf/pldd-xx.c:135
3817+#, c-format
3818+msgid "cannot read dynamic section"
3819+msgstr "no s’ha pogut llegir la secció dinàmica"
3820+
3821+#: elf/pldd-xx.c:147
3822+#, c-format
3823+msgid "cannot read r_debug"
3824+msgstr "no s’ha pogut llegir «r_debug»"
3825+
3826+#: elf/pldd-xx.c:167
3827+#, c-format
3828+msgid "cannot read program interpreter"
3829+msgstr "no s’ha pogut llegir l’intèrpret del programa"
3830+
3831+#: elf/pldd-xx.c:196
3832+#, c-format
3833+msgid "cannot read link map"
3834+msgstr "no s’ha pogut llegir el mapa d’enllaçat"
3835+
3836+#: elf/pldd-xx.c:207
3837+#, c-format
3838+msgid "cannot read object name"
3839+msgstr "no s’ha pogut llegir el nom de l’objecte"
3840+
3841+# Descripció del programa. ivb
3842+#: elf/pldd.c:65
3843+msgid "List dynamic shared objects loaded into process."
3844+msgstr "Llista els objectes compatits dinàmics carregats en un procés."
3845+
3846+# Crec que el terme és suficient conegut. ivb
3847+#: elf/pldd.c:69
3848+msgid "PID"
3849+msgstr "PID"
3850+
3851+#: elf/pldd.c:100
3852+#, c-format
3853+msgid "Exactly one parameter with process ID required.\n"
3854+msgstr "cal exactament un paràmetre amb l’identificador de procés\n"
3855+
3856+#: elf/pldd.c:112
3857+#, c-format
3858+msgid "invalid process ID '%s'"
3859+msgstr "l’identificador de procés «%s» no és vàlid"
3860+
3861+# No usa quote(). ivb
3862+#: elf/pldd.c:120
3863+#, c-format
3864+msgid "cannot open %s"
3865+msgstr "no s’ha pogut obrir «%s»"
3866+
3867+# No usa quote. ivb
3868+#: elf/pldd.c:145
3869+#, c-format
3870+msgid "cannot open %s/task"
3871+msgstr "no s’ha pogut obrir «%s/task»"
3872+
3873+# No usa quote(). ivb
3874+#: elf/pldd.c:148
3875+#, c-format
3876+msgid "cannot prepare reading %s/task"
3877+msgstr "no s’ha pogut preparar la lectura de «%s/task»"
3878+
3879+#: elf/pldd.c:161
3880+#, c-format
3881+msgid "invalid thread ID '%s'"
3882+msgstr "l’identificador de fil «%s» no és vàlid"
3883+
3884+#: elf/pldd.c:172
3885+#, c-format
3886+msgid "cannot attach to process %lu"
3887+msgstr "no s’ha pogut associar al procés %lu"
3888+
3889+#: elf/pldd.c:264
3890+#, c-format
3891+msgid "cannot get information about process %lu"
3892+msgstr "no s’ha pogut obtenir informació sobre el procés %lu"
3893+
3894+#: elf/pldd.c:277
3895+#, c-format
3896+msgid "process %lu is no ELF program"
3897+msgstr "el procés %lu no pertany a un programa ELF"
3898+
3899+#: elf/readelflib.c:34
3900+#, c-format
3901 msgid "file %s is truncated\n"
3902 msgstr "el fitxer «%s» està truncat\n"
3903
3904-#: elf/readelflib.c:67
3905+#: elf/readelflib.c:66
3906 #, c-format
3907 msgid "%s is a 32 bit ELF file.\n"
3908 msgstr "«%s» és un fitxer ELF de 32 bits\n"
3909
3910-#: elf/readelflib.c:69
3911+#: elf/readelflib.c:68
3912 #, c-format
3913 msgid "%s is a 64 bit ELF file.\n"
3914 msgstr "«%s» és un fitxer ELF de 64 bits\n"
3915
3916-#: elf/readelflib.c:71
3917+#: elf/readelflib.c:70
3918 #, c-format
3919 msgid "Unknown ELFCLASS in file %s.\n"
3920 msgstr "la classe ELF del fitxer «%s» no és coneguda\n"
3921
3922-#: elf/readelflib.c:78
3923+#: elf/readelflib.c:77
3924 #, c-format
3925 msgid "%s is not a shared object file (Type: %d).\n"
3926 msgstr "«%s» no és un fitxer objecte compartit (tipus: %d)\n"
3927
3928-#: elf/readelflib.c:109
3929+#: elf/readelflib.c:108
3930 #, c-format
3931 msgid "more than one dynamic segment\n"
3932 msgstr "hi ha més d’un segment dinàmic\n"
3933
3934-#: elf/readlib.c:97
3935+#: elf/readlib.c:96
3936 #, c-format
3937 msgid "Cannot fstat file %s.\n"
3938 msgstr "ha fallat fstat() sobre el fitxer «%s»\n"
3939
3940-#: elf/readlib.c:108
3941+#: elf/readlib.c:107
3942 #, c-format
3943 msgid "File %s is empty, not checked."
3944 msgstr "el fitxer «%s» és buit, no es comprova"
3945
3946-#: elf/readlib.c:114
3947+#: elf/readlib.c:113
3948 #, c-format
3949 msgid "File %s is too small, not checked."
3950 msgstr "el fitxer «%s» és massa menut, no es comprova"
3951
3952-#: elf/readlib.c:124
3953+#: elf/readlib.c:123
3954 #, c-format
3955 msgid "Cannot mmap file %s.\n"
3956 msgstr "ha fallat mmap() sobre el fitxer «%s»\n"
3957
3958-#: elf/readlib.c:162
3959+#: elf/readlib.c:161
3960 #, c-format
3961 msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
3962 msgstr "«%s» no és un fitxer ELF: els octets màgics del començament no són correctes\n"
3963
3964-#: elf/sln.c:85
3965+#: elf/sln.c:84
3966 #, c-format
3967 msgid ""
3968 "Usage: sln src dest|file\n"
3969@@ -1147,50 +1248,51 @@
3970 "Forma d’ús: sln ORIGEN DESTÍ|FITXER\n"
3971 "\n"
3972
3973-#: elf/sln.c:110
3974+#: elf/sln.c:109
3975 #, c-format
3976 msgid "%s: file open error: %m\n"
3977 msgstr "%s: error en obrir el fitxer: %m\n"
3978
3979-#: elf/sln.c:147
3980+#: elf/sln.c:146
3981 #, c-format
3982 msgid "No target in line %d\n"
3983 msgstr "manca un destí a la línia %d\n"
3984
3985-#: elf/sln.c:179
3986+#: elf/sln.c:178
3987 #, c-format
3988 msgid "%s: destination must not be a directory\n"
3989 msgstr "%s: el destí no ha de ser un directori\n"
3990
3991-#: elf/sln.c:185
3992+#: elf/sln.c:184
3993 #, c-format
3994 msgid "%s: failed to remove the old destination\n"
3995 msgstr "%s: no s’ha pogut esborrar el destí antic\n"
3996
3997-#: elf/sln.c:193
3998+#: elf/sln.c:192
3999 #, c-format
4000 msgid "%s: invalid destination: %s\n"
4001 msgstr "%s: el destí no és vàlid: %s\n"
4002
4003-#: elf/sln.c:208 elf/sln.c:217
4004+#: elf/sln.c:207 elf/sln.c:216
4005 #, c-format
4006 msgid "Invalid link from \"%s\" to \"%s\": %s\n"
4007 msgstr "l’enllaç des de «%s» cap a «%s» no és vàlid: %s\n"
4008
4009-#: elf/sotruss.ksh:33
4010+#: elf/sotruss.ksh:32
4011 #, sh-format
4012 msgid ""
4013 "Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
4014-" -F, --from FROMLIST trace calls from objects on FORMLIST\n"
4015-" -T, --to TOLIST trace calls to objects on TOLIST\n"
4016+" -F, --from FROMLIST Trace calls from objects on FROMLIST\n"
4017+" -T, --to TOLIST Trace calls to objects on TOLIST\n"
4018 "\n"
4019-" -e, --exit also show exits from the function calls\n"
4020-" -f, --follow trace child processes\n"
4021-" -o, --output FILENAME write output to FILENAME (or FILENAME.$PID in case\n"
4022+" -e, --exit Also show exits from the function calls\n"
4023+" -f, --follow Trace child processes\n"
4024+" -o, --output FILENAME Write output to FILENAME (or FILENAME.$PID in case\n"
4025 "\t\t\t -f is also used) instead of standard error\n"
4026 "\n"
4027-" --help print this help and exit\n"
4028-" --version print version information and exit"
4029+" -?, --help Give this help list\n"
4030+" --usage Give a short usage message\n"
4031+" --version Print program version"
4032 msgstr ""
4033 "Forma d’ús: sotruss [OPCIÓ…] [--] EXECUTABLE [OPCIÓ_EXECUTABLE…]\n"
4034 "\n"
4035@@ -1202,288 +1304,289 @@
4036 " -o, --output FITXER Escriu l’eixida al FITXER (o a FITXER.$PID si s’empra\n"
4037 " l’opció «-f») en lloc de l’eixida estàndard d’errors.\n"
4038 "\n"
4039-" --help Mostra aquesta ajuda i surt.\n"
4040+" -?, --help Mostra aquesta ajuda i surt.\n"
4041+" --usage Mostra un missatge breu amb la forma d’ús.\n"
4042 " --version Mostra informació sobre la versió i surt."
4043
4044 #: elf/sotruss.ksh:46
4045 msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
4046 msgstr "Els arguments obligatoris o opcionals per a les opcions llargues també ho són\\nper a les opcions curtes corresponents.\\n"
4047
4048-#: elf/sotruss.ksh:56
4049+#: elf/sotruss.ksh:55
4050 msgid "%s: option requires an argument -- '%s'\\n"
4051 msgstr "%s: l’opció «%c» necessita un argument\\n"
4052
4053-#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134
4054-msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
4055-msgstr "Proveu «%s --help» o «%s --usage» per a obtenir més informació.\\n"
4056-
4057-#: elf/sotruss.ksh:62
4058+#: elf/sotruss.ksh:61
4059 msgid "%s: option is ambiguous; possibilities:"
4060 msgstr "%s: l’opció és ambígua; possibilitats:"
4061
4062-#: elf/sotruss.ksh:80
4063+#: elf/sotruss.ksh:79
4064 msgid "Written by %s.\\n"
4065 msgstr "Escrit per %s.\\n"
4066
4067-#: elf/sotruss.ksh:87
4068+#: elf/sotruss.ksh:86
4069 msgid ""
4070 "Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n"
4071-"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\\n"
4072+"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\n"
4073+"\t [--help] [--usage] [--version] [--]\n"
4074+"\t EXECUTABLE [EXECUTABLE-OPTION...]\\n"
4075 msgstr ""
4076 "Forma d’ús: %s [-ef] [-F LLISTA_DE] [-o FITXER] [-T LLISTA_A]\n"
4077 " [--exit] [--follow]\n"
4078-" [--from LLISTA_DE] [--output FITXER] [--to LLISTA_A]\\n"
4079+" [--from LLISTA_DE] [--output FITXER] [--to LLISTA_A]\n"
4080+" [--help] [--usage] [--version] [--]\n"
4081+" EXECUTABLE [OPCIÓ_EXECUTABLE…]\\n"
4082
4083-#: elf/sotruss.ksh:133
4084+#: elf/sotruss.ksh:134
4085 msgid "%s: unrecognized option '%c%s'\\n"
4086 msgstr "%s: l’opció «%c%s» no és reconeguda\\n"
4087
4088 # Més ajudes. ivb
4089-#: elf/sprof.c:77
4090+#: elf/sprof.c:76
4091 msgid "Output selection:"
4092 msgstr "Selecció de l’eixida:"
4093
4094-#: elf/sprof.c:79
4095+#: elf/sprof.c:78
4096 msgid "print list of count paths and their number of use"
4097 msgstr "Mostra una llista de camins de recompte i les voltes que han estat emprats."
4098
4099-#: elf/sprof.c:81
4100+#: elf/sprof.c:80
4101 msgid "generate flat profile with counts and ticks"
4102 msgstr "Genera un perfil pla amb recomptes i unitats de temps."
4103
4104-#: elf/sprof.c:82
4105+#: elf/sprof.c:81
4106 msgid "generate call graph"
4107 msgstr "Genera un gràfic de crides."
4108
4109-#: elf/sprof.c:89
4110+#: elf/sprof.c:88
4111 msgid "Read and display shared object profiling data."
4112 msgstr "Llig i mostra les dades de perfilat d’un objecte compartit."
4113
4114-#: elf/sprof.c:94
4115+#: elf/sprof.c:93
4116 msgid "SHOBJ [PROFDATA]"
4117 msgstr "OBJECTE_COMPARTIT [DADES_PERFILAT]"
4118
4119-#: elf/sprof.c:431
4120+#: elf/sprof.c:432
4121 #, c-format
4122 msgid "failed to load shared object `%s'"
4123 msgstr "no s’ha pogut carregar l’objecte compartit «%s»"
4124
4125-#: elf/sprof.c:440
4126+#: elf/sprof.c:441
4127 #, c-format
4128 msgid "cannot create internal descriptors"
4129 msgstr "no s’han pogut crear els descriptors interns"
4130
4131-#: elf/sprof.c:559
4132+#: elf/sprof.c:553
4133 #, c-format
4134 msgid "Reopening shared object `%s' failed"
4135 msgstr "no s’ha pogut reobrir l’objecte compartit «%s»"
4136
4137-#: elf/sprof.c:566 elf/sprof.c:660
4138+#: elf/sprof.c:560 elf/sprof.c:655
4139 #, c-format
4140 msgid "reading of section headers failed"
4141 msgstr "la lectura de les capçaleres de secció ha fallat"
4142
4143-#: elf/sprof.c:574 elf/sprof.c:668
4144+#: elf/sprof.c:568 elf/sprof.c:663
4145 #, c-format
4146 msgid "reading of section header string table failed"
4147 msgstr "la lectura de la taula de cadenes de capçalera de secció ha fallat"
4148
4149-#: elf/sprof.c:600
4150+#: elf/sprof.c:594
4151 #, c-format
4152 msgid "*** Cannot read debuginfo file name: %m\n"
4153 msgstr "*** No s’ha pogut llegir el nom del fitxer d’informació de depuració: %m\n"
4154
4155-#: elf/sprof.c:620
4156+#: elf/sprof.c:615
4157 #, c-format
4158 msgid "cannot determine file name"
4159 msgstr "no s’ha pogut determinar un nom de fitxer"
4160
4161-#: elf/sprof.c:653
4162+#: elf/sprof.c:648
4163 #, c-format
4164 msgid "reading of ELF header failed"
4165 msgstr "la lectura de la capçalera ELF ha fallat"
4166
4167-#: elf/sprof.c:689
4168+#: elf/sprof.c:684
4169 #, c-format
4170 msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
4171 msgstr "*** El fitxer «%s» no conté símbols: no és possible l’anàlisi detallada\n"
4172
4173-#: elf/sprof.c:719
4174+#: elf/sprof.c:714
4175 #, c-format
4176 msgid "failed to load symbol data"
4177 msgstr "no s’han pogut carregar les dades simbòliques"
4178
4179-#: elf/sprof.c:784
4180+#: elf/sprof.c:779
4181 #, c-format
4182 msgid "cannot load profiling data"
4183 msgstr "no s’han pogut carregar les dades de perfilat"
4184
4185-#: elf/sprof.c:793
4186+#: elf/sprof.c:788
4187 #, c-format
4188 msgid "while stat'ing profiling data file"
4189 msgstr "en cridar stat() sobre el fitxer de dades de perfilat"
4190
4191-#: elf/sprof.c:801
4192+#: elf/sprof.c:796
4193 #, c-format
4194 msgid "profiling data file `%s' does not match shared object `%s'"
4195 msgstr "el fitxer «%s» de dades de perfilat no correspon a l’objecte compartit «%s»"
4196
4197-#: elf/sprof.c:812
4198+#: elf/sprof.c:807
4199 #, c-format
4200 msgid "failed to mmap the profiling data file"
4201 msgstr "ha fallat mmap() sobre el fitxer de dades de perfilat"
4202
4203-#: elf/sprof.c:820
4204+#: elf/sprof.c:815
4205 #, c-format
4206 msgid "error while closing the profiling data file"
4207 msgstr "error en tancar el fitxer de dades de perfilat"
4208
4209-#: elf/sprof.c:829 elf/sprof.c:927
4210+#: elf/sprof.c:824 elf/sprof.c:922
4211 #, c-format
4212 msgid "cannot create internal descriptor"
4213 msgstr "no s’ha pogut crear un descriptor intern"
4214
4215-#: elf/sprof.c:903
4216+#: elf/sprof.c:898
4217 #, c-format
4218 msgid "`%s' is no correct profile data file for `%s'"
4219 msgstr "«%s» no és un fitxer vàlid de perfilat de «%s»"
4220
4221-#: elf/sprof.c:1084 elf/sprof.c:1142
4222+#: elf/sprof.c:1079 elf/sprof.c:1137
4223 #, c-format
4224 msgid "cannot allocate symbol data"
4225 msgstr "no s’han pogut reservar les dades de símbols"
4226
4227-#: iconv/iconv_charmap.c:142 iconv/iconv_prog.c:446
4228+#: iconv/iconv_charmap.c:143 iconv/iconv_prog.c:448
4229 #, c-format
4230 msgid "cannot open output file"
4231 msgstr "no s’ha pogut obrir el fitxer d’eixida"
4232
4233-#: iconv/iconv_charmap.c:188 iconv/iconv_prog.c:312
4234+#: iconv/iconv_charmap.c:189 iconv/iconv_prog.c:311
4235 #, c-format
4236 msgid "error while closing input `%s'"
4237 msgstr "error en tancar l’entrada «%s»"
4238
4239-#: iconv/iconv_charmap.c:462
4240+#: iconv/iconv_charmap.c:463
4241 #, c-format
4242 msgid "illegal input sequence at position %Zd"
4243 msgstr "hi ha una seqüència d’entrada no vàlida a la posició %Zd"
4244
4245-#: iconv/iconv_charmap.c:481 iconv/iconv_prog.c:537
4246+#: iconv/iconv_charmap.c:482 iconv/iconv_prog.c:539
4247 #, c-format
4248 msgid "incomplete character or shift sequence at end of buffer"
4249 msgstr "hi ha un caràcter o seqüència de desplaçament incompleta al final de la memòria intermèdia"
4250
4251-#: iconv/iconv_charmap.c:526 iconv/iconv_charmap.c:562 iconv/iconv_prog.c:580
4252-#: iconv/iconv_prog.c:616
4253+#: iconv/iconv_charmap.c:527 iconv/iconv_charmap.c:563 iconv/iconv_prog.c:582
4254+#: iconv/iconv_prog.c:618
4255 #, c-format
4256 msgid "error while reading the input"
4257 msgstr "error en llegir l’entrada"
4258
4259-#: iconv/iconv_charmap.c:544 iconv/iconv_prog.c:598
4260+#: iconv/iconv_charmap.c:545 iconv/iconv_prog.c:600
4261 #, c-format
4262 msgid "unable to allocate buffer for input"
4263 msgstr "no s’ha pogut reservar memòria intermèdia per a l’entrada"
4264
4265-#: iconv/iconv_prog.c:60
4266+#: iconv/iconv_prog.c:59
4267 msgid "Input/Output format specification:"
4268 msgstr "Especificació de format de l’entrada/eixida:"
4269
4270 # Els següents són missatges d'ajuda. ivb
4271-#: iconv/iconv_prog.c:61
4272+#: iconv/iconv_prog.c:60
4273 msgid "encoding of original text"
4274 msgstr "Codificació del text original."
4275
4276-#: iconv/iconv_prog.c:62
4277+#: iconv/iconv_prog.c:61
4278 msgid "encoding for output"
4279 msgstr "Codificació de l’eixida."
4280
4281-#: iconv/iconv_prog.c:63
4282+#: iconv/iconv_prog.c:62
4283 msgid "Information:"
4284 msgstr "Informació:"
4285
4286-#: iconv/iconv_prog.c:64
4287+#: iconv/iconv_prog.c:63
4288 msgid "list all known coded character sets"
4289 msgstr "Llista tots els jocs de caràcters codificats coneguts."
4290
4291-#: iconv/iconv_prog.c:65 locale/programs/localedef.c:127
4292+#: iconv/iconv_prog.c:64 locale/programs/localedef.c:126
4293 msgid "Output control:"
4294 msgstr "Control de l’eixida:"
4295
4296-#: iconv/iconv_prog.c:66
4297+#: iconv/iconv_prog.c:65
4298 msgid "omit invalid characters from output"
4299 msgstr "Omet a l’eixida els caràcters no vàlids."
4300
4301-#: iconv/iconv_prog.c:67
4302+#: iconv/iconv_prog.c:66
4303 msgid "output file"
4304 msgstr "Fitxer d’eixida."
4305
4306-#: iconv/iconv_prog.c:68
4307+#: iconv/iconv_prog.c:67
4308 msgid "suppress warnings"
4309 msgstr "Elimina els avisos."
4310
4311-#: iconv/iconv_prog.c:69
4312+#: iconv/iconv_prog.c:68
4313 msgid "print progress information"
4314 msgstr "Mostra informació del progrés."
4315
4316-#: iconv/iconv_prog.c:74
4317+#: iconv/iconv_prog.c:73
4318 msgid "Convert encoding of given files from one encoding to another."
4319 msgstr "Converteix els fitxers especificats d’una codificació a una altra."
4320
4321-#: iconv/iconv_prog.c:78
4322+#: iconv/iconv_prog.c:77
4323 msgid "[FILE...]"
4324 msgstr "[FITXER…]"
4325
4326-#: iconv/iconv_prog.c:234
4327+#: iconv/iconv_prog.c:233
4328 #, c-format
4329 msgid "conversions from `%s' and to `%s' are not supported"
4330 msgstr "les conversions de «%s» i a «%s» no estan implementades"
4331
4332-#: iconv/iconv_prog.c:239
4333+#: iconv/iconv_prog.c:238
4334 #, c-format
4335 msgid "conversion from `%s' is not supported"
4336 msgstr "la conversió de «%s» no està implementada"
4337
4338-#: iconv/iconv_prog.c:246
4339+#: iconv/iconv_prog.c:245
4340 #, c-format
4341 msgid "conversion to `%s' is not supported"
4342 msgstr "la conversió a «%s» no està implementada"
4343
4344-#: iconv/iconv_prog.c:250
4345+#: iconv/iconv_prog.c:249
4346 #, c-format
4347 msgid "conversion from `%s' to `%s' is not supported"
4348 msgstr "la conversió de «%s» a «%s» no està implementada"
4349
4350-#: iconv/iconv_prog.c:260
4351+#: iconv/iconv_prog.c:259
4352 #, c-format
4353 msgid "failed to start conversion processing"
4354 msgstr "no s’ha pogut començar a processar la conversió"
4355
4356-#: iconv/iconv_prog.c:358
4357+#: iconv/iconv_prog.c:357
4358 #, c-format
4359 msgid "error while closing output file"
4360 msgstr "error en tancar el fitxer d’eixida"
4361
4362-#: iconv/iconv_prog.c:456
4363+#: iconv/iconv_prog.c:458
4364 #, c-format
4365 msgid "conversion stopped due to problem in writing the output"
4366 msgstr "la conversió s’ha detingut a causa d’un problema en escriure l’eixida"
4367
4368-#: iconv/iconv_prog.c:533
4369+#: iconv/iconv_prog.c:535
4370 #, c-format
4371 msgid "illegal input sequence at position %ld"
4372 msgstr "hi ha una seqüència d’entrada no vàlida a la posició %ld"
4373
4374-#: iconv/iconv_prog.c:541
4375+#: iconv/iconv_prog.c:543
4376 #, c-format
4377 msgid "internal error (illegal descriptor)"
4378 msgstr "error intern (el descriptor no és vàlid)"
4379
4380-#: iconv/iconv_prog.c:544
4381+#: iconv/iconv_prog.c:546
4382 #, c-format
4383 msgid "unknown iconv() error %d"
4384 msgstr "error desconegut %d a iconv()"
4385
4386-#: iconv/iconv_prog.c:790
4387+#: iconv/iconv_prog.c:791
4388 msgid ""
4389 "The following list contain all the coded character sets known. This does\n"
4390 "not necessarily mean that all combinations of these names can be used for\n"
4391@@ -1501,43 +1604,43 @@
4392
4393 # ivb (2001/10/28)
4394 # ivb Ostres, açò pareix una frase del M-x spook!
4395-#: iconv/iconvconfig.c:110
4396+#: iconv/iconvconfig.c:109
4397 msgid "Create fastloading iconv module configuration file."
4398 msgstr "Crea un fitxer de configuració de càrrega ràpida per al mòdul iconv."
4399
4400-#: iconv/iconvconfig.c:114
4401+#: iconv/iconvconfig.c:113
4402 msgid "[DIR...]"
4403 msgstr " [DIRECTORI…]"
4404
4405 # És un missatge d'ajuda. ivb
4406-#: iconv/iconvconfig.c:127
4407+#: iconv/iconvconfig.c:126
4408 msgid "Prefix used for all file accesses"
4409 msgstr "Prefix a emprar per a tots els accessos a fitxer."
4410
4411-#: iconv/iconvconfig.c:128
4412+#: iconv/iconvconfig.c:127
4413 msgid "Put output in FILE instead of installed location (--prefix does not apply to FILE)"
4414 msgstr "Desa l’eixida en el FITXER en lloc de la ubicació d’instaŀlació («--prefix» no s’aplica al FITXER)."
4415
4416-#: iconv/iconvconfig.c:132
4417+#: iconv/iconvconfig.c:131
4418 msgid "Do not search standard directories, only those on the command line"
4419 msgstr "No cerca en els directoris estàndard, només en els indicats a la línia d’ordres."
4420
4421-#: iconv/iconvconfig.c:301
4422+#: iconv/iconvconfig.c:303
4423 #, c-format
4424 msgid "Directory arguments required when using --nostdlib"
4425 msgstr "Cal proporcionar arguments directori en emprar «--nostdlib»."
4426
4427-#: iconv/iconvconfig.c:343 locale/programs/localedef.c:291
4428+#: iconv/iconvconfig.c:345 locale/programs/localedef.c:287
4429 #, c-format
4430 msgid "no output file produced because warnings were issued"
4431 msgstr "no s’ha generat el fitxer d’eixida perquè s’han produït avisos"
4432
4433-#: iconv/iconvconfig.c:429
4434+#: iconv/iconvconfig.c:434
4435 #, c-format
4436 msgid "while inserting in search tree"
4437 msgstr "en inserir a l’arbre de cerca"
4438
4439-#: iconv/iconvconfig.c:1238
4440+#: iconv/iconvconfig.c:1243
4441 #, c-format
4442 msgid "cannot generate output file"
4443 msgstr "no s’ha pogut generar el fitxer d’eixida"
4444@@ -1624,217 +1727,217 @@
4445 msgid "Unknown .netrc keyword %s"
4446 msgstr "la paraula clau «%s» de «.netrc» no és coneguda"
4447
4448-#: libidn/nfkc.c:464
4449+#: libidn/nfkc.c:462
4450 msgid "Character out of range for UTF-8"
4451 msgstr "el caràcter és fora de rang respecte UTF-8"
4452
4453-#: locale/programs/charmap-dir.c:59
4454+#: locale/programs/charmap-dir.c:58
4455 #, c-format
4456 msgid "cannot read character map directory `%s'"
4457 msgstr "no s’ha pogut llegir el directori «%s» de taules de caràcters"
4458
4459-#: locale/programs/charmap.c:138
4460+#: locale/programs/charmap.c:137
4461 #, c-format
4462 msgid "character map file `%s' not found"
4463 msgstr "no s’ha trobat el fitxer «%s» de mapa de caràcters"
4464
4465-#: locale/programs/charmap.c:195
4466+#: locale/programs/charmap.c:194
4467 #, c-format
4468 msgid "default character map file `%s' not found"
4469 msgstr "no s’ha trobat el fitxer «%s» de mapa de caràcters per defecte"
4470
4471-#: locale/programs/charmap.c:258
4472+#: locale/programs/charmap.c:257
4473 #, c-format
4474 msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n"
4475 msgstr "el mapa de caràcters «%s» no és compatible amb ASCII, el locale no és conforme amb ISO C\n"
4476
4477 # La variable porta els símbols inclosos. ivb
4478-#: locale/programs/charmap.c:337
4479+#: locale/programs/charmap.c:336
4480 #, c-format
4481 msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n"
4482 msgstr "%s: <mb_cur_max> ha de ser major que <mb_cur_min>\n"
4483
4484-#: locale/programs/charmap.c:357 locale/programs/charmap.c:374
4485-#: locale/programs/repertoire.c:174
4486+#: locale/programs/charmap.c:356 locale/programs/charmap.c:373
4487+#: locale/programs/repertoire.c:173
4488 #, c-format
4489 msgid "syntax error in prolog: %s"
4490 msgstr "error de sintaxi al pròleg: %s"
4491
4492-#: locale/programs/charmap.c:358
4493+#: locale/programs/charmap.c:357
4494 msgid "invalid definition"
4495 msgstr "la definició no és vàlida"
4496
4497-#: locale/programs/charmap.c:375 locale/programs/locfile.c:126
4498-#: locale/programs/locfile.c:153 locale/programs/repertoire.c:175
4499+#: locale/programs/charmap.c:374 locale/programs/locfile.c:125
4500+#: locale/programs/locfile.c:152 locale/programs/repertoire.c:174
4501 msgid "bad argument"
4502 msgstr "l’argument no és vàlid"
4503
4504 # Les variables inclouen els símbols «<>». ivb
4505-#: locale/programs/charmap.c:403
4506+#: locale/programs/charmap.c:402
4507 #, c-format
4508 msgid "duplicate definition of <%s>"
4509 msgstr "la definició de <%s> és duplicada"
4510
4511-#: locale/programs/charmap.c:410
4512+#: locale/programs/charmap.c:409
4513 #, c-format
4514 msgid "value for <%s> must be 1 or greater"
4515 msgstr "el valor de <%s> ha de ser 1 o major"
4516
4517-#: locale/programs/charmap.c:422
4518+#: locale/programs/charmap.c:421
4519 #, c-format
4520 msgid "value of <%s> must be greater or equal than the value of <%s>"
4521 msgstr "el valor de «%s» ha de ser major o igual que el de «%s»"
4522
4523-#: locale/programs/charmap.c:445 locale/programs/repertoire.c:183
4524+#: locale/programs/charmap.c:444 locale/programs/repertoire.c:182
4525 #, c-format
4526 msgid "argument to <%s> must be a single character"
4527 msgstr "l’argument de «%s» ha de ser un sol caràcter"
4528
4529-#: locale/programs/charmap.c:471
4530+#: locale/programs/charmap.c:470
4531 msgid "character sets with locking states are not supported"
4532 msgstr "l’ús de jocs de caràcters amb estats blocadors no està implementat"
4533
4534 # El primer és el nom d'una variable (en majúscules). ivb
4535-#: locale/programs/charmap.c:498 locale/programs/charmap.c:552
4536-#: locale/programs/charmap.c:584 locale/programs/charmap.c:678
4537-#: locale/programs/charmap.c:733 locale/programs/charmap.c:774
4538-#: locale/programs/charmap.c:815
4539+#: locale/programs/charmap.c:497 locale/programs/charmap.c:551
4540+#: locale/programs/charmap.c:583 locale/programs/charmap.c:677
4541+#: locale/programs/charmap.c:732 locale/programs/charmap.c:773
4542+#: locale/programs/charmap.c:814
4543 #, c-format
4544 msgid "syntax error in %s definition: %s"
4545 msgstr "error de sintaxi a la definició %s: %s"
4546
4547-#: locale/programs/charmap.c:499 locale/programs/charmap.c:679
4548-#: locale/programs/charmap.c:775 locale/programs/repertoire.c:230
4549+#: locale/programs/charmap.c:498 locale/programs/charmap.c:678
4550+#: locale/programs/charmap.c:774 locale/programs/repertoire.c:229
4551 msgid "no symbolic name given"
4552 msgstr "no s’ha indicat un nom simbòlic"
4553
4554-#: locale/programs/charmap.c:553
4555+#: locale/programs/charmap.c:552
4556 msgid "invalid encoding given"
4557 msgstr "la codificació especificada no és vàlida"
4558
4559-#: locale/programs/charmap.c:562
4560+#: locale/programs/charmap.c:561
4561 msgid "too few bytes in character encoding"
4562 msgstr "manquen octets a la codificació del caràcter"
4563
4564-#: locale/programs/charmap.c:564
4565+#: locale/programs/charmap.c:563
4566 msgid "too many bytes in character encoding"
4567 msgstr "sobren octets a la codificació del caràcter"
4568
4569-#: locale/programs/charmap.c:586 locale/programs/charmap.c:734
4570-#: locale/programs/charmap.c:817 locale/programs/repertoire.c:296
4571+#: locale/programs/charmap.c:585 locale/programs/charmap.c:733
4572+#: locale/programs/charmap.c:816 locale/programs/repertoire.c:295
4573 msgid "no symbolic name given for end of range"
4574 msgstr "no s’ha indicat un nom simbòlic per a la fi del rang"
4575
4576-#: locale/programs/charmap.c:610 locale/programs/ld-address.c:602
4577-#: locale/programs/ld-collate.c:2769 locale/programs/ld-collate.c:3927
4578-#: locale/programs/ld-ctype.c:2257 locale/programs/ld-ctype.c:3009
4579-#: locale/programs/ld-identification.c:452
4580-#: locale/programs/ld-measurement.c:238 locale/programs/ld-messages.c:332
4581-#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:307
4582-#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:241
4583-#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1221
4584-#: locale/programs/repertoire.c:313
4585+#: locale/programs/charmap.c:609 locale/programs/ld-address.c:601
4586+#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:3924
4587+#: locale/programs/ld-ctype.c:2255 locale/programs/ld-ctype.c:3006
4588+#: locale/programs/ld-identification.c:451
4589+#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331
4590+#: locale/programs/ld-monetary.c:942 locale/programs/ld-name.c:306
4591+#: locale/programs/ld-numeric.c:367 locale/programs/ld-paper.c:240
4592+#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1220
4593+#: locale/programs/repertoire.c:312
4594 #, c-format
4595 msgid "%1$s: definition does not end with `END %1$s'"
4596 msgstr "%1$s: la definició no acaba en «END %1$s»"
4597
4598-#: locale/programs/charmap.c:643
4599+#: locale/programs/charmap.c:642
4600 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
4601 msgstr "només es permeten definicions WIDTH després de la definició CHARMAP"
4602
4603 # El primer és el nom d'una variable (en majúscules). ivb
4604-#: locale/programs/charmap.c:651 locale/programs/charmap.c:714
4605+#: locale/programs/charmap.c:650 locale/programs/charmap.c:713
4606 #, c-format
4607 msgid "value for %s must be an integer"
4608 msgstr "el valor de %s ha de ser un enter"
4609
4610-#: locale/programs/charmap.c:842
4611+#: locale/programs/charmap.c:841
4612 #, c-format
4613 msgid "%s: error in state machine"
4614 msgstr "%s: error a la màquina d’estats"
4615
4616-#: locale/programs/charmap.c:850 locale/programs/ld-address.c:618
4617-#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:4120
4618-#: locale/programs/ld-ctype.c:2254 locale/programs/ld-ctype.c:3026
4619-#: locale/programs/ld-identification.c:468
4620-#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348
4621-#: locale/programs/ld-monetary.c:959 locale/programs/ld-name.c:323
4622-#: locale/programs/ld-numeric.c:384 locale/programs/ld-paper.c:257
4623-#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1237
4624-#: locale/programs/locfile.c:826 locale/programs/repertoire.c:324
4625+#: locale/programs/charmap.c:849 locale/programs/ld-address.c:617
4626+#: locale/programs/ld-collate.c:2763 locale/programs/ld-collate.c:4117
4627+#: locale/programs/ld-ctype.c:2252 locale/programs/ld-ctype.c:3023
4628+#: locale/programs/ld-identification.c:467
4629+#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347
4630+#: locale/programs/ld-monetary.c:958 locale/programs/ld-name.c:322
4631+#: locale/programs/ld-numeric.c:383 locale/programs/ld-paper.c:256
4632+#: locale/programs/ld-telephone.c:328 locale/programs/ld-time.c:1236
4633+#: locale/programs/locfile.c:825 locale/programs/repertoire.c:323
4634 #, c-format
4635 msgid "%s: premature end of file"
4636 msgstr "%s: final prematur del fitxer"
4637
4638-#: locale/programs/charmap.c:869 locale/programs/charmap.c:880
4639+#: locale/programs/charmap.c:868 locale/programs/charmap.c:879
4640 #, c-format
4641 msgid "unknown character `%s'"
4642 msgstr "el caràcter «%s» no és conegut"
4643
4644-#: locale/programs/charmap.c:888
4645+#: locale/programs/charmap.c:887
4646 #, c-format
4647 msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"
4648 msgstr "el nombre d’octets de les seqüències d’inici i final del rang no són iguals: %d i %d"
4649
4650-#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3046
4651-#: locale/programs/repertoire.c:419
4652+#: locale/programs/charmap.c:992 locale/programs/ld-collate.c:3043
4653+#: locale/programs/repertoire.c:418
4654 msgid "invalid names for character range"
4655 msgstr "els noms del rang de caràcters no són vàlids"
4656
4657 # ivb (2001/11/05)
4658 # ivb El rang també pot contenir dígits. El text original pot fer pensar
4659 # ivb que _només_ s'accepten lletres majúscules.
4660-#: locale/programs/charmap.c:1005 locale/programs/repertoire.c:431
4661+#: locale/programs/charmap.c:1004 locale/programs/repertoire.c:430
4662 msgid "hexadecimal range format should use only capital characters"
4663 msgstr "les lletres emprades en un rang amb format hexadecimal han de ser majúscules"
4664
4665-#: locale/programs/charmap.c:1023 locale/programs/repertoire.c:449
4666+#: locale/programs/charmap.c:1022 locale/programs/repertoire.c:448
4667 #, c-format
4668 msgid "<%s> and <%s> are invalid names for range"
4669 msgstr "<%s> i <%s> no són noms de rang vàlids"
4670
4671-#: locale/programs/charmap.c:1029 locale/programs/repertoire.c:456
4672+#: locale/programs/charmap.c:1028 locale/programs/repertoire.c:455
4673 msgid "upper limit in range is smaller than lower limit"
4674 msgstr "el límit superior del rang és menor que l’inferior"
4675
4676-#: locale/programs/charmap.c:1087
4677+#: locale/programs/charmap.c:1086
4678 msgid "resulting bytes for range not representable."
4679 msgstr "els octets resultants del rang no són representables"
4680
4681-#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1558
4682-#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:133
4683-#: locale/programs/ld-measurement.c:94 locale/programs/ld-messages.c:97
4684-#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
4685-#: locale/programs/ld-numeric.c:98 locale/programs/ld-paper.c:91
4686-#: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:159
4687+#: locale/programs/ld-address.c:134 locale/programs/ld-collate.c:1557
4688+#: locale/programs/ld-ctype.c:420 locale/programs/ld-identification.c:132
4689+#: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:96
4690+#: locale/programs/ld-monetary.c:193 locale/programs/ld-name.c:93
4691+#: locale/programs/ld-numeric.c:97 locale/programs/ld-paper.c:90
4692+#: locale/programs/ld-telephone.c:93 locale/programs/ld-time.c:158
4693 #, c-format
4694 msgid "No definition for %s category found"
4695 msgstr "no s’ha trobat cap definició de la categoria «%s»"
4696
4697-#: locale/programs/ld-address.c:146 locale/programs/ld-address.c:184
4698-#: locale/programs/ld-address.c:202 locale/programs/ld-address.c:231
4699-#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:322
4700-#: locale/programs/ld-address.c:335 locale/programs/ld-identification.c:146
4701-#: locale/programs/ld-measurement.c:105 locale/programs/ld-monetary.c:206
4702-#: locale/programs/ld-monetary.c:250 locale/programs/ld-monetary.c:266
4703-#: locale/programs/ld-monetary.c:278 locale/programs/ld-name.c:105
4704-#: locale/programs/ld-name.c:142 locale/programs/ld-numeric.c:112
4705-#: locale/programs/ld-numeric.c:126 locale/programs/ld-paper.c:102
4706-#: locale/programs/ld-paper.c:111 locale/programs/ld-telephone.c:105
4707-#: locale/programs/ld-telephone.c:162 locale/programs/ld-time.c:175
4708-#: locale/programs/ld-time.c:196
4709+#: locale/programs/ld-address.c:145 locale/programs/ld-address.c:183
4710+#: locale/programs/ld-address.c:201 locale/programs/ld-address.c:230
4711+#: locale/programs/ld-address.c:302 locale/programs/ld-address.c:321
4712+#: locale/programs/ld-address.c:334 locale/programs/ld-identification.c:145
4713+#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:205
4714+#: locale/programs/ld-monetary.c:249 locale/programs/ld-monetary.c:265
4715+#: locale/programs/ld-monetary.c:277 locale/programs/ld-name.c:104
4716+#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:111
4717+#: locale/programs/ld-numeric.c:125 locale/programs/ld-paper.c:101
4718+#: locale/programs/ld-paper.c:110 locale/programs/ld-telephone.c:104
4719+#: locale/programs/ld-telephone.c:161 locale/programs/ld-time.c:174
4720+#: locale/programs/ld-time.c:195
4721 #, c-format
4722 msgid "%s: field `%s' not defined"
4723 msgstr "%s: no s’ha definit el camp «%s»"
4724
4725-#: locale/programs/ld-address.c:158 locale/programs/ld-address.c:210
4726-#: locale/programs/ld-address.c:240 locale/programs/ld-address.c:278
4727-#: locale/programs/ld-name.c:117 locale/programs/ld-telephone.c:117
4728+#: locale/programs/ld-address.c:157 locale/programs/ld-address.c:209
4729+#: locale/programs/ld-address.c:239 locale/programs/ld-address.c:277
4730+#: locale/programs/ld-name.c:116 locale/programs/ld-telephone.c:116
4731 #, c-format
4732 msgid "%s: field `%s' must not be empty"
4733 msgstr "%s: el camp «%s» no ha d’estar buit"
4734
4735-#: locale/programs/ld-address.c:170
4736+#: locale/programs/ld-address.c:169
4737 #, c-format
4738 msgid "%s: invalid escape `%%%c' sequence in field `%s'"
4739 msgstr "%s: la seqüència d’escapada «%%%c» del camp «%s» no és vàlida"
4740@@ -1843,744 +1946,744 @@
4741 # ivb Pel que sembla hi ha un codi terminològic de llengua i un
4742 # ivb codi bibliogràfic de llengua.
4743 # ivb http://anubis.dkuug.dk/i18n/iso-639-2-dis.txt
4744-#: locale/programs/ld-address.c:221
4745+#: locale/programs/ld-address.c:220
4746 #, c-format
4747 msgid "%s: terminology language code `%s' not defined"
4748 msgstr "%s: no s’ha definit el codi terminològic de llengua «%s»"
4749
4750-#: locale/programs/ld-address.c:246
4751+#: locale/programs/ld-address.c:245
4752 #, c-format
4753 msgid "%s: field `%s' must not be defined"
4754 msgstr "%s: no s’ha de definir el camp «%s»"
4755
4756-#: locale/programs/ld-address.c:260 locale/programs/ld-address.c:289
4757+#: locale/programs/ld-address.c:259 locale/programs/ld-address.c:288
4758 #, c-format
4759 msgid "%s: language abbreviation `%s' not defined"
4760 msgstr "%s: no s’ha definit l’abreviatura de llengua «%s»"
4761
4762-#: locale/programs/ld-address.c:267 locale/programs/ld-address.c:295
4763-#: locale/programs/ld-address.c:329 locale/programs/ld-address.c:341
4764+#: locale/programs/ld-address.c:266 locale/programs/ld-address.c:294
4765+#: locale/programs/ld-address.c:328 locale/programs/ld-address.c:340
4766 #, c-format
4767 msgid "%s: `%s' value does not match `%s' value"
4768 msgstr "%s: el valor de «%s» no concorda amb el valor de «%s»"
4769
4770-#: locale/programs/ld-address.c:314
4771+#: locale/programs/ld-address.c:313
4772 #, c-format
4773 msgid "%s: numeric country code `%d' not valid"
4774 msgstr "%s: el codi numèric de país «%d» no és vàlid"
4775
4776-#: locale/programs/ld-address.c:510 locale/programs/ld-address.c:547
4777-#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2633
4778-#: locale/programs/ld-identification.c:364
4779-#: locale/programs/ld-measurement.c:221 locale/programs/ld-messages.c:301
4780-#: locale/programs/ld-monetary.c:701 locale/programs/ld-monetary.c:736
4781-#: locale/programs/ld-monetary.c:777 locale/programs/ld-name.c:280
4782-#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:224
4783-#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1126
4784-#: locale/programs/ld-time.c:1168
4785+#: locale/programs/ld-address.c:509 locale/programs/ld-address.c:546
4786+#: locale/programs/ld-address.c:584 locale/programs/ld-ctype.c:2630
4787+#: locale/programs/ld-identification.c:363
4788+#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300
4789+#: locale/programs/ld-monetary.c:700 locale/programs/ld-monetary.c:735
4790+#: locale/programs/ld-monetary.c:776 locale/programs/ld-name.c:279
4791+#: locale/programs/ld-numeric.c:262 locale/programs/ld-paper.c:223
4792+#: locale/programs/ld-telephone.c:287 locale/programs/ld-time.c:1125
4793+#: locale/programs/ld-time.c:1167
4794 #, c-format
4795 msgid "%s: field `%s' declared more than once"
4796 msgstr "%s: el camp «%s» ha estat declarat més d’una volta"
4797
4798-#: locale/programs/ld-address.c:514 locale/programs/ld-address.c:552
4799-#: locale/programs/ld-identification.c:368 locale/programs/ld-messages.c:311
4800-#: locale/programs/ld-monetary.c:705 locale/programs/ld-monetary.c:740
4801-#: locale/programs/ld-name.c:284 locale/programs/ld-numeric.c:267
4802-#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:1020
4803-#: locale/programs/ld-time.c:1089 locale/programs/ld-time.c:1131
4804+#: locale/programs/ld-address.c:513 locale/programs/ld-address.c:551
4805+#: locale/programs/ld-identification.c:367 locale/programs/ld-messages.c:310
4806+#: locale/programs/ld-monetary.c:704 locale/programs/ld-monetary.c:739
4807+#: locale/programs/ld-name.c:283 locale/programs/ld-numeric.c:266
4808+#: locale/programs/ld-telephone.c:291 locale/programs/ld-time.c:1019
4809+#: locale/programs/ld-time.c:1088 locale/programs/ld-time.c:1130
4810 #, c-format
4811 msgid "%s: unknown character in field `%s'"
4812 msgstr "%s: el camp «%s» conté un caràcter desconegut"
4813
4814-#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3925
4815-#: locale/programs/ld-ctype.c:3006 locale/programs/ld-identification.c:449
4816-#: locale/programs/ld-measurement.c:235 locale/programs/ld-messages.c:330
4817-#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305
4818-#: locale/programs/ld-numeric.c:366 locale/programs/ld-paper.c:239
4819-#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1219
4820+#: locale/programs/ld-address.c:598 locale/programs/ld-collate.c:3922
4821+#: locale/programs/ld-ctype.c:3003 locale/programs/ld-identification.c:448
4822+#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329
4823+#: locale/programs/ld-monetary.c:940 locale/programs/ld-name.c:304
4824+#: locale/programs/ld-numeric.c:365 locale/programs/ld-paper.c:238
4825+#: locale/programs/ld-telephone.c:310 locale/programs/ld-time.c:1218
4826 #, c-format
4827 msgid "%s: incomplete `END' line"
4828 msgstr "%s: la línia «END» és incompleta"
4829
4830-#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:544
4831-#: locale/programs/ld-collate.c:596 locale/programs/ld-collate.c:892
4832-#: locale/programs/ld-collate.c:905 locale/programs/ld-collate.c:2735
4833-#: locale/programs/ld-collate.c:2756 locale/programs/ld-collate.c:4110
4834-#: locale/programs/ld-ctype.c:1985 locale/programs/ld-ctype.c:2244
4835-#: locale/programs/ld-ctype.c:2831 locale/programs/ld-ctype.c:3017
4836-#: locale/programs/ld-identification.c:459
4837-#: locale/programs/ld-measurement.c:245 locale/programs/ld-messages.c:339
4838-#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:314
4839-#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:248
4840-#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1228
4841+#: locale/programs/ld-address.c:608 locale/programs/ld-collate.c:543
4842+#: locale/programs/ld-collate.c:595 locale/programs/ld-collate.c:891
4843+#: locale/programs/ld-collate.c:904 locale/programs/ld-collate.c:2732
4844+#: locale/programs/ld-collate.c:2753 locale/programs/ld-collate.c:4107
4845+#: locale/programs/ld-ctype.c:1984 locale/programs/ld-ctype.c:2242
4846+#: locale/programs/ld-ctype.c:2828 locale/programs/ld-ctype.c:3014
4847+#: locale/programs/ld-identification.c:458
4848+#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338
4849+#: locale/programs/ld-monetary.c:949 locale/programs/ld-name.c:313
4850+#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:247
4851+#: locale/programs/ld-telephone.c:319 locale/programs/ld-time.c:1227
4852 #, c-format
4853 msgid "%s: syntax error"
4854 msgstr "%s: error de sintaxi"
4855
4856-#: locale/programs/ld-collate.c:419
4857+#: locale/programs/ld-collate.c:418
4858 #, c-format
4859 msgid "`%.*s' already defined in charmap"
4860 msgstr "«%.*s» ja ha estat definit al mapa de caràcters"
4861
4862-#: locale/programs/ld-collate.c:428
4863+#: locale/programs/ld-collate.c:427
4864 #, c-format
4865 msgid "`%.*s' already defined in repertoire"
4866 msgstr "«%.*s» ja ha estat definit al repertori"
4867
4868-#: locale/programs/ld-collate.c:435
4869+#: locale/programs/ld-collate.c:434
4870 #, c-format
4871 msgid "`%.*s' already defined as collating symbol"
4872 msgstr "«%.*s» ja ha estat definit com a símbol d’ordenació"
4873
4874-#: locale/programs/ld-collate.c:442
4875+#: locale/programs/ld-collate.c:441
4876 #, c-format
4877 msgid "`%.*s' already defined as collating element"
4878 msgstr "«%.*s» ja ha estat definit com a element d’ordenació"
4879
4880-#: locale/programs/ld-collate.c:473 locale/programs/ld-collate.c:499
4881+#: locale/programs/ld-collate.c:472 locale/programs/ld-collate.c:498
4882 #, c-format
4883 msgid "%s: `forward' and `backward' are mutually excluding each other"
4884 msgstr "%s: «forward» i «backward» són mútuament excloents"
4885
4886-#: locale/programs/ld-collate.c:483 locale/programs/ld-collate.c:509
4887-#: locale/programs/ld-collate.c:525
4888+#: locale/programs/ld-collate.c:482 locale/programs/ld-collate.c:508
4889+#: locale/programs/ld-collate.c:524
4890 #, c-format
4891 msgid "%s: `%s' mentioned more than once in definition of weight %d"
4892 msgstr "%s: s’ha mencionat «%s» més d’una volta a la definició de pes %d"
4893
4894-#: locale/programs/ld-collate.c:581
4895+#: locale/programs/ld-collate.c:580
4896 #, c-format
4897 msgid "%s: too many rules; first entry only had %d"
4898 msgstr "%s: sobren regles; la primera entrada només en tenia %d"
4899
4900-#: locale/programs/ld-collate.c:617
4901+#: locale/programs/ld-collate.c:616
4902 #, c-format
4903 msgid "%s: not enough sorting rules"
4904 msgstr "%s: no hi ha suficients regles d’ordenació"
4905
4906-#: locale/programs/ld-collate.c:782
4907+#: locale/programs/ld-collate.c:781
4908 #, c-format
4909 msgid "%s: empty weight string not allowed"
4910 msgstr "%s: no es permet la cadena buida com a nom de pes"
4911
4912-#: locale/programs/ld-collate.c:877
4913+#: locale/programs/ld-collate.c:876
4914 #, c-format
4915 msgid "%s: weights must use the same ellipsis symbol as the name"
4916 msgstr "%s: els pesos han d’emprar el mateix símbol d’eŀlipsi que el nom"
4917
4918-#: locale/programs/ld-collate.c:933
4919+#: locale/programs/ld-collate.c:932
4920 #, c-format
4921 msgid "%s: too many values"
4922 msgstr "%s: sobren valors"
4923
4924-#: locale/programs/ld-collate.c:1053 locale/programs/ld-collate.c:1228
4925+#: locale/programs/ld-collate.c:1052 locale/programs/ld-collate.c:1227
4926 #, c-format
4927 msgid "order for `%.*s' already defined at %s:%Zu"
4928 msgstr "l’ordre de «%.*s» ja ha estat definit a %s:%Zu"
4929
4930-#: locale/programs/ld-collate.c:1103
4931+#: locale/programs/ld-collate.c:1102
4932 #, c-format
4933 msgid "%s: the start and the end symbol of a range must stand for characters"
4934 msgstr "%s: els símbols inicial i final d’un rang han de representar caràcters"
4935
4936-#: locale/programs/ld-collate.c:1130
4937+#: locale/programs/ld-collate.c:1129
4938 #, c-format
4939 msgid "%s: byte sequences of first and last character must have the same length"
4940 msgstr "%s: les seqüències d’octets del primer i darrer caràcter han de tenir la mateixa longitud"
4941
4942-#: locale/programs/ld-collate.c:1172
4943+#: locale/programs/ld-collate.c:1171
4944 #, c-format
4945 msgid "%s: byte sequence of first character of range is not lower than that of the last character"
4946 msgstr "%s: la seqüència d’octets del primer caràcter del rang no és menor que la del darrer caràcter"
4947
4948-#: locale/programs/ld-collate.c:1297
4949+#: locale/programs/ld-collate.c:1296
4950 #, c-format
4951 msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
4952 msgstr "%s: un rang simbòlic amb eŀlipsi no pot anar just darrere d’«order_start»"
4953
4954-#: locale/programs/ld-collate.c:1301
4955+#: locale/programs/ld-collate.c:1300
4956 #, c-format
4957 msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'"
4958 msgstr "%s: un rang simbòlic amb eŀlipsi no pot anar just davant d’«order_end»"
4959
4960-#: locale/programs/ld-collate.c:1321 locale/programs/ld-ctype.c:1502
4961+#: locale/programs/ld-collate.c:1320 locale/programs/ld-ctype.c:1501
4962 #, c-format
4963 msgid "`%s' and `%.*s' are not valid names for symbolic range"
4964 msgstr "«%s» i «%.*s» no són noms vàlids de rangs simbòlics"
4965
4966-#: locale/programs/ld-collate.c:1371 locale/programs/ld-collate.c:3861
4967+#: locale/programs/ld-collate.c:1370 locale/programs/ld-collate.c:3858
4968 #, c-format
4969 msgid "%s: order for `%.*s' already defined at %s:%Zu"
4970 msgstr "%s: l’ordre de «%.*s» ja ha estat definit a %s:%Zu"
4971
4972-#: locale/programs/ld-collate.c:1380
4973+#: locale/programs/ld-collate.c:1379
4974 #, c-format
4975 msgid "%s: `%s' must be a character"
4976 msgstr "%s: «%s» ha de ser un caràcter"
4977
4978-#: locale/programs/ld-collate.c:1575
4979+#: locale/programs/ld-collate.c:1574
4980 #, c-format
4981 msgid "%s: `position' must be used for a specific level in all sections or none"
4982 msgstr "%s: cal emprar «position» per a un nivell específic a totes les seccions o a cap"
4983
4984-#: locale/programs/ld-collate.c:1600
4985+#: locale/programs/ld-collate.c:1599
4986 #, c-format
4987 msgid "symbol `%s' not defined"
4988 msgstr "el símbol «%s» no ha estat definit"
4989
4990-#: locale/programs/ld-collate.c:1676 locale/programs/ld-collate.c:1782
4991+#: locale/programs/ld-collate.c:1675 locale/programs/ld-collate.c:1781
4992 #, c-format
4993 msgid "symbol `%s' has the same encoding as"
4994 msgstr "el símbol «%s» té la mateixa codificació que"
4995
4996-#: locale/programs/ld-collate.c:1680 locale/programs/ld-collate.c:1786
4997+#: locale/programs/ld-collate.c:1679 locale/programs/ld-collate.c:1785
4998 #, c-format
4999 msgid "symbol `%s'"
5000 msgstr "el símbol «%s»"
5001
5002-#: locale/programs/ld-collate.c:1828
5003+#: locale/programs/ld-collate.c:1827
5004 #, c-format
5005 msgid "no definition of `UNDEFINED'"
5006 msgstr "no s’ha definit «UNDEFINED»"
5007
5008-#: locale/programs/ld-collate.c:1857
5009+#: locale/programs/ld-collate.c:1856
5010 #, c-format
5011 msgid "too many errors; giving up"
5012 msgstr "hi ha massa errors: s’abandona"
5013
5014-#: locale/programs/ld-collate.c:2661 locale/programs/ld-collate.c:4049
5015+#: locale/programs/ld-collate.c:2658 locale/programs/ld-collate.c:4046
5016 #, c-format
5017 msgid "%s: nested conditionals not supported"
5018 msgstr "%s: no es permeten els condicionals niats"
5019
5020-#: locale/programs/ld-collate.c:2679
5021+#: locale/programs/ld-collate.c:2676
5022 #, c-format
5023 msgid "%s: more then one 'else'"
5024 msgstr "%s: hi ha més d’una clàusula «else»"
5025
5026-#: locale/programs/ld-collate.c:2854
5027+#: locale/programs/ld-collate.c:2851
5028 #, c-format
5029 msgid "%s: duplicate definition of `%s'"
5030 msgstr "%s: la definició de «%s» és duplicada"
5031
5032-#: locale/programs/ld-collate.c:2890
5033+#: locale/programs/ld-collate.c:2887
5034 #, c-format
5035 msgid "%s: duplicate declaration of section `%s'"
5036 msgstr "%s: la declaració de la secció «%s» és duplicada"
5037
5038-#: locale/programs/ld-collate.c:3026
5039+#: locale/programs/ld-collate.c:3023
5040 #, c-format
5041 msgid "%s: unknown character in collating symbol name"
5042 msgstr "%s: el nom del símbol d’ordenació conté un caràcter desconegut"
5043
5044-#: locale/programs/ld-collate.c:3155
5045+#: locale/programs/ld-collate.c:3152
5046 #, c-format
5047 msgid "%s: unknown character in equivalent definition name"
5048 msgstr "%s: el nom de la definició equivalent conté un caràcter desconegut"
5049
5050-#: locale/programs/ld-collate.c:3166
5051+#: locale/programs/ld-collate.c:3163
5052 #, c-format
5053 msgid "%s: unknown character in equivalent definition value"
5054 msgstr "%s: el valor de la definició equivalent conté un caràcter desconegut"
5055
5056-#: locale/programs/ld-collate.c:3176
5057+#: locale/programs/ld-collate.c:3173
5058 #, c-format
5059 msgid "%s: unknown symbol `%s' in equivalent definition"
5060 msgstr "%s: la definició equivalent conté el símbol desconegut «%s»"
5061
5062-#: locale/programs/ld-collate.c:3185
5063+#: locale/programs/ld-collate.c:3182
5064 msgid "error while adding equivalent collating symbol"
5065 msgstr "error en afegir un símbol d’ordenació equivalent"
5066
5067-#: locale/programs/ld-collate.c:3223
5068+#: locale/programs/ld-collate.c:3220
5069 #, c-format
5070 msgid "duplicate definition of script `%s'"
5071 msgstr "la definició de l’escriptura «%s» és duplicada"
5072
5073-#: locale/programs/ld-collate.c:3271
5074+#: locale/programs/ld-collate.c:3268
5075 #, c-format
5076 msgid "%s: unknown section name `%.*s'"
5077 msgstr "%s: el nom de secció «%.*s» no és conegut"
5078
5079-#: locale/programs/ld-collate.c:3300
5080+#: locale/programs/ld-collate.c:3297
5081 #, c-format
5082 msgid "%s: multiple order definitions for section `%s'"
5083 msgstr "%s: hi ha múltiples definicions d’ordre de la secció «%s»"
5084
5085-#: locale/programs/ld-collate.c:3328
5086+#: locale/programs/ld-collate.c:3325
5087 #, c-format
5088 msgid "%s: invalid number of sorting rules"
5089 msgstr "%s: el nombre de regles d’ordenació no és vàlid"
5090
5091-#: locale/programs/ld-collate.c:3355
5092+#: locale/programs/ld-collate.c:3352
5093 #, c-format
5094 msgid "%s: multiple order definitions for unnamed section"
5095 msgstr "%s: hi ha múltiples definicions d’ordre a la secció sense nom"
5096
5097-#: locale/programs/ld-collate.c:3410 locale/programs/ld-collate.c:3540
5098-#: locale/programs/ld-collate.c:3903
5099+#: locale/programs/ld-collate.c:3407 locale/programs/ld-collate.c:3537
5100+#: locale/programs/ld-collate.c:3900
5101 #, c-format
5102 msgid "%s: missing `order_end' keyword"
5103 msgstr "%s: manca la paraula clau «order_end»"
5104
5105-#: locale/programs/ld-collate.c:3473
5106+#: locale/programs/ld-collate.c:3470
5107 #, c-format
5108 msgid "%s: order for collating symbol %.*s not yet defined"
5109 msgstr "%s: l’ordre del símbol d’ordenació «%.*s» encara no ha estat definit"
5110
5111-#: locale/programs/ld-collate.c:3491
5112+#: locale/programs/ld-collate.c:3488
5113 #, c-format
5114 msgid "%s: order for collating element %.*s not yet defined"
5115 msgstr "%s: l’ordre de l’element d’ordenació «%.*s» encara no ha estat definit"
5116
5117-#: locale/programs/ld-collate.c:3502
5118+#: locale/programs/ld-collate.c:3499
5119 #, c-format
5120 msgid "%s: cannot reorder after %.*s: symbol not known"
5121 msgstr "%s: no s’ha pogut reordenar després de «%.*s»: el símbol no és conegut"
5122
5123-#: locale/programs/ld-collate.c:3554 locale/programs/ld-collate.c:3915
5124+#: locale/programs/ld-collate.c:3551 locale/programs/ld-collate.c:3912
5125 #, c-format
5126 msgid "%s: missing `reorder-end' keyword"
5127 msgstr "%s: manca la paraula clau «reorder-end»"
5128
5129-#: locale/programs/ld-collate.c:3588 locale/programs/ld-collate.c:3786
5130+#: locale/programs/ld-collate.c:3585 locale/programs/ld-collate.c:3783
5131 #, c-format
5132 msgid "%s: section `%.*s' not known"
5133 msgstr "%s: la secció «%.*s» no és coneguda"
5134
5135-#: locale/programs/ld-collate.c:3653
5136+#: locale/programs/ld-collate.c:3650
5137 #, c-format
5138 msgid "%s: bad symbol <%.*s>"
5139 msgstr "%s: el símbol <%.*s> no és vàlid"
5140
5141-#: locale/programs/ld-collate.c:3849
5142+#: locale/programs/ld-collate.c:3846
5143 #, c-format
5144 msgid "%s: cannot have `%s' as end of ellipsis range"
5145 msgstr "%s: «%s» no es pot trobar al final d’un rang amb eŀlipsi"
5146
5147-#: locale/programs/ld-collate.c:3899
5148+#: locale/programs/ld-collate.c:3896
5149 #, c-format
5150 msgid "%s: empty category description not allowed"
5151 msgstr "%s: no es permet una descripció buida de la categoria"
5152
5153-#: locale/programs/ld-collate.c:3918
5154+#: locale/programs/ld-collate.c:3915
5155 #, c-format
5156 msgid "%s: missing `reorder-sections-end' keyword"
5157 msgstr "%s: manca la paraula clau «reorder-sections-end»"
5158
5159-#: locale/programs/ld-collate.c:4082
5160+#: locale/programs/ld-collate.c:4079
5161 #, c-format
5162 msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
5163 msgstr "%s: s’ha trobat un «%s» sense el corresponent «ifdef» o «ifndef»"
5164
5165-#: locale/programs/ld-collate.c:4100
5166+#: locale/programs/ld-collate.c:4097
5167 #, c-format
5168 msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
5169 msgstr "%s: s’ha trobat un «endif» sense el corresponent «ifdef» o «ifndef»"
5170
5171-#: locale/programs/ld-ctype.c:440
5172+#: locale/programs/ld-ctype.c:439
5173 #, c-format
5174 msgid "No character set name specified in charmap"
5175 msgstr "no s’ha indicat cap nom de joc de caràcters al mapa de caràcters"
5176
5177-#: locale/programs/ld-ctype.c:469
5178+#: locale/programs/ld-ctype.c:468
5179 #, c-format
5180 msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
5181 msgstr "el caràcter L«\\u%0*x» de la classe «%s» ha de ser a la classe «%s»"
5182
5183-#: locale/programs/ld-ctype.c:484
5184+#: locale/programs/ld-ctype.c:483
5185 #, c-format
5186 msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
5187 msgstr "el caràcter L«\\u%0*x» de la classe «%s» no ha de ser a la classe «%s»"
5188
5189-#: locale/programs/ld-ctype.c:498 locale/programs/ld-ctype.c:556
5190+#: locale/programs/ld-ctype.c:497 locale/programs/ld-ctype.c:555
5191 #, c-format
5192 msgid "internal error in %s, line %u"
5193 msgstr "error intern a «%s», línia %u"
5194
5195-#: locale/programs/ld-ctype.c:527
5196+#: locale/programs/ld-ctype.c:526
5197 #, c-format
5198 msgid "character '%s' in class `%s' must be in class `%s'"
5199 msgstr "el caràcter «%s» de la classe «%s» ha de ser a la classe «%s»"
5200
5201-#: locale/programs/ld-ctype.c:543
5202+#: locale/programs/ld-ctype.c:542
5203 #, c-format
5204 msgid "character '%s' in class `%s' must not be in class `%s'"
5205 msgstr "el caràcter «%s» de la classe «%s» no ha de ser a la classe «%s»"
5206
5207-#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:611
5208+#: locale/programs/ld-ctype.c:572 locale/programs/ld-ctype.c:610
5209 #, c-format
5210 msgid "<SP> character not in class `%s'"
5211 msgstr "el caràcter <SP> no és a la classe «%s»"
5212
5213-#: locale/programs/ld-ctype.c:585 locale/programs/ld-ctype.c:622
5214+#: locale/programs/ld-ctype.c:584 locale/programs/ld-ctype.c:621
5215 #, c-format
5216 msgid "<SP> character must not be in class `%s'"
5217 msgstr "el caràcter <SP> no ha de ser a la classe «%s»"
5218
5219-#: locale/programs/ld-ctype.c:600
5220+#: locale/programs/ld-ctype.c:599
5221 #, c-format
5222 msgid "character <SP> not defined in character map"
5223 msgstr "el caràcter <SP> no ha estat definit a la taula de caràcters"
5224
5225-#: locale/programs/ld-ctype.c:736
5226+#: locale/programs/ld-ctype.c:735
5227 #, c-format
5228 msgid "`digit' category has not entries in groups of ten"
5229 msgstr "les entrades de la categoria «digit» no estan agrupades de deu en deu"
5230
5231-#: locale/programs/ld-ctype.c:785
5232+#: locale/programs/ld-ctype.c:784
5233 #, c-format
5234 msgid "no input digits defined and none of the standard names in the charmap"
5235 msgstr "no s’han definit dígits d’entrada i cap dels noms estàndard es troba al mapa de caràcters"
5236
5237-#: locale/programs/ld-ctype.c:850
5238+#: locale/programs/ld-ctype.c:849
5239 #, c-format
5240 msgid "not all characters used in `outdigit' are available in the charmap"
5241 msgstr "no tots els caràcters emprats a «outdigit» es troben al mapa de caràcters"
5242
5243-#: locale/programs/ld-ctype.c:867
5244+#: locale/programs/ld-ctype.c:866
5245 #, c-format
5246 msgid "not all characters used in `outdigit' are available in the repertoire"
5247 msgstr "no tots els caràcters emprats a «outdigit» es troben al repertori"
5248
5249-#: locale/programs/ld-ctype.c:1270
5250+#: locale/programs/ld-ctype.c:1269
5251 #, c-format
5252 msgid "character class `%s' already defined"
5253 msgstr "la classe de caràcters «%s» ja ha estat definida"
5254
5255-#: locale/programs/ld-ctype.c:1276
5256+#: locale/programs/ld-ctype.c:1275
5257 #, c-format
5258 msgid "implementation limit: no more than %Zd character classes allowed"
5259 msgstr "límit d’implementació: no es permeten més de %Zd classes de caràcters"
5260
5261-#: locale/programs/ld-ctype.c:1302
5262+#: locale/programs/ld-ctype.c:1301
5263 #, c-format
5264 msgid "character map `%s' already defined"
5265 msgstr "el mapa de caràcters «%s» ja ha estat definit"
5266
5267-#: locale/programs/ld-ctype.c:1308
5268+#: locale/programs/ld-ctype.c:1307
5269 #, c-format
5270 msgid "implementation limit: no more than %d character maps allowed"
5271 msgstr "límit d’implementació: no es permeten més de %d taules de caràcters"
5272
5273-#: locale/programs/ld-ctype.c:1573 locale/programs/ld-ctype.c:1698
5274-#: locale/programs/ld-ctype.c:1804 locale/programs/ld-ctype.c:2496
5275-#: locale/programs/ld-ctype.c:3492
5276+#: locale/programs/ld-ctype.c:1572 locale/programs/ld-ctype.c:1697
5277+#: locale/programs/ld-ctype.c:1803 locale/programs/ld-ctype.c:2493
5278+#: locale/programs/ld-ctype.c:3489
5279 #, c-format
5280 msgid "%s: field `%s' does not contain exactly ten entries"
5281 msgstr "%s: el camp «%s» no conté deu entrades exactament"
5282
5283-#: locale/programs/ld-ctype.c:1601 locale/programs/ld-ctype.c:2175
5284+#: locale/programs/ld-ctype.c:1600 locale/programs/ld-ctype.c:2174
5285 #, c-format
5286 msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
5287 msgstr "el valor final <U%0*X> del rang és menor que l’inicial <U%0*X>"
5288
5289-#: locale/programs/ld-ctype.c:1728
5290+#: locale/programs/ld-ctype.c:1727
5291 msgid "start and end character sequence of range must have the same length"
5292 msgstr "les seqüències de caràcters inicial i final del rang han de tenir la mateixa longitud"
5293
5294-#: locale/programs/ld-ctype.c:1735
5295+#: locale/programs/ld-ctype.c:1734
5296 msgid "to-value character sequence is smaller than from-value sequence"
5297 msgstr "la seqüència de caràcters final és menor que la seqüència inicial"
5298
5299-#: locale/programs/ld-ctype.c:2095 locale/programs/ld-ctype.c:2146
5300+#: locale/programs/ld-ctype.c:2094 locale/programs/ld-ctype.c:2145
5301 msgid "premature end of `translit_ignore' definition"
5302 msgstr "fi prematura de la definició «translit_ignore»"
5303
5304-#: locale/programs/ld-ctype.c:2101 locale/programs/ld-ctype.c:2152
5305-#: locale/programs/ld-ctype.c:2194
5306+#: locale/programs/ld-ctype.c:2100 locale/programs/ld-ctype.c:2151
5307+#: locale/programs/ld-ctype.c:2193
5308 msgid "syntax error"
5309 msgstr "error de sintaxi"
5310
5311-#: locale/programs/ld-ctype.c:2328
5312+#: locale/programs/ld-ctype.c:2326
5313 #, c-format
5314 msgid "%s: syntax error in definition of new character class"
5315 msgstr "%s: error de sintaxi a la definició de nova classe de caràcters"
5316
5317-#: locale/programs/ld-ctype.c:2343
5318+#: locale/programs/ld-ctype.c:2341
5319 #, c-format
5320 msgid "%s: syntax error in definition of new character map"
5321 msgstr "%s: error de sintaxi a la definició de nou mapa de caràcters"
5322
5323-#: locale/programs/ld-ctype.c:2518
5324+#: locale/programs/ld-ctype.c:2515
5325 msgid "ellipsis range must be marked by two operands of same type"
5326 msgstr "el rang amb eŀlipsi ha d’estar marcat per dos operands del mateix tipus"
5327
5328-#: locale/programs/ld-ctype.c:2527
5329+#: locale/programs/ld-ctype.c:2524
5330 msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
5331 msgstr "no s’ha d’emprar l’eŀlipsi absoluta «...» amb els valors de rang de noms simbòlics"
5332
5333-#: locale/programs/ld-ctype.c:2542
5334+#: locale/programs/ld-ctype.c:2539
5335 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
5336 msgstr "cal emprar l’eŀlipsi simbòlica hexadecimal «..» amb els valors de rang UCS"
5337
5338-#: locale/programs/ld-ctype.c:2556
5339+#: locale/programs/ld-ctype.c:2553
5340 msgid "with character code range values one must use the absolute ellipsis `...'"
5341 msgstr "cal emprar l’eŀlispi absoluta «...» amb els valors de rang de codis de caràcters"
5342
5343-#: locale/programs/ld-ctype.c:2707
5344+#: locale/programs/ld-ctype.c:2704
5345 #, c-format
5346 msgid "duplicated definition for mapping `%s'"
5347 msgstr "la definició del mapa «%s» és duplicada"
5348
5349-#: locale/programs/ld-ctype.c:2793 locale/programs/ld-ctype.c:2937
5350+#: locale/programs/ld-ctype.c:2790 locale/programs/ld-ctype.c:2934
5351 #, c-format
5352 msgid "%s: `translit_start' section does not end with `translit_end'"
5353 msgstr "%s: la secció «translit_start» no acaba amb «translit_end»"
5354
5355-#: locale/programs/ld-ctype.c:2888
5356+#: locale/programs/ld-ctype.c:2885
5357 #, c-format
5358 msgid "%s: duplicate `default_missing' definition"
5359 msgstr "%s: la definició de «default_missing» és duplicada"
5360
5361-#: locale/programs/ld-ctype.c:2893
5362+#: locale/programs/ld-ctype.c:2890
5363 msgid "previous definition was here"
5364 msgstr "la definició prèvia es troba ací"
5365
5366-#: locale/programs/ld-ctype.c:2915
5367+#: locale/programs/ld-ctype.c:2912
5368 #, c-format
5369 msgid "%s: no representable `default_missing' definition found"
5370 msgstr "%s: no s’ha trobat cap definició representable de «default_missing»"
5371
5372-#: locale/programs/ld-ctype.c:3068 locale/programs/ld-ctype.c:3152
5373-#: locale/programs/ld-ctype.c:3172 locale/programs/ld-ctype.c:3193
5374-#: locale/programs/ld-ctype.c:3214 locale/programs/ld-ctype.c:3235
5375-#: locale/programs/ld-ctype.c:3256 locale/programs/ld-ctype.c:3296
5376-#: locale/programs/ld-ctype.c:3317 locale/programs/ld-ctype.c:3384
5377-#: locale/programs/ld-ctype.c:3426 locale/programs/ld-ctype.c:3451
5378+#: locale/programs/ld-ctype.c:3065 locale/programs/ld-ctype.c:3149
5379+#: locale/programs/ld-ctype.c:3169 locale/programs/ld-ctype.c:3190
5380+#: locale/programs/ld-ctype.c:3211 locale/programs/ld-ctype.c:3232
5381+#: locale/programs/ld-ctype.c:3253 locale/programs/ld-ctype.c:3293
5382+#: locale/programs/ld-ctype.c:3314 locale/programs/ld-ctype.c:3381
5383+#: locale/programs/ld-ctype.c:3423 locale/programs/ld-ctype.c:3448
5384 #, c-format
5385 msgid "%s: character `%s' not defined while needed as default value"
5386 msgstr "%s: el caràcter «%s», necessari com a valor per defecte, no ha estat definit"
5387
5388-#: locale/programs/ld-ctype.c:3073 locale/programs/ld-ctype.c:3157
5389-#: locale/programs/ld-ctype.c:3177 locale/programs/ld-ctype.c:3198
5390-#: locale/programs/ld-ctype.c:3219 locale/programs/ld-ctype.c:3240
5391-#: locale/programs/ld-ctype.c:3261 locale/programs/ld-ctype.c:3301
5392-#: locale/programs/ld-ctype.c:3322 locale/programs/ld-ctype.c:3389
5393+#: locale/programs/ld-ctype.c:3070 locale/programs/ld-ctype.c:3154
5394+#: locale/programs/ld-ctype.c:3174 locale/programs/ld-ctype.c:3195
5395+#: locale/programs/ld-ctype.c:3216 locale/programs/ld-ctype.c:3237
5396+#: locale/programs/ld-ctype.c:3258 locale/programs/ld-ctype.c:3298
5397+#: locale/programs/ld-ctype.c:3319 locale/programs/ld-ctype.c:3386
5398 #, c-format
5399 msgid "%s: character `%s' in charmap not representable with one byte"
5400 msgstr "%s: el caràcter «%s» del mapa de caràcters no es pot representar amb un sol octet"
5401
5402-#: locale/programs/ld-ctype.c:3433 locale/programs/ld-ctype.c:3458
5403+#: locale/programs/ld-ctype.c:3430 locale/programs/ld-ctype.c:3455
5404 #, c-format
5405 msgid "%s: character `%s' needed as default value not representable with one byte"
5406 msgstr "%s: el caràcter «%s», necessari com a valor per defecte, no es pot representar amb un sol octet"
5407
5408-#: locale/programs/ld-ctype.c:3514
5409+#: locale/programs/ld-ctype.c:3511
5410 #, c-format
5411 msgid "no output digits defined and none of the standard names in the charmap"
5412 msgstr "no s’han definit dígits d’eixida i cap del noms estàndard es troba al mapa de caràcters"
5413
5414-#: locale/programs/ld-ctype.c:3805
5415+#: locale/programs/ld-ctype.c:3802
5416 #, c-format
5417 msgid "%s: transliteration data from locale `%s' not available"
5418 msgstr "%s: les dades de transliteració del locale «%s» no es troben disponibles"
5419
5420-#: locale/programs/ld-ctype.c:3906
5421+#: locale/programs/ld-ctype.c:3903
5422 #, c-format
5423 msgid "%s: table for class \"%s\": %lu bytes\n"
5424 msgstr "%s: taula de la classe «%s»: %lu octets\n"
5425
5426-#: locale/programs/ld-ctype.c:3975
5427+#: locale/programs/ld-ctype.c:3972
5428 #, c-format
5429 msgid "%s: table for map \"%s\": %lu bytes\n"
5430 msgstr "%s: taula del mapa «%s»: %lu octets\n"
5431
5432-#: locale/programs/ld-ctype.c:4108
5433+#: locale/programs/ld-ctype.c:4105
5434 #, c-format
5435 msgid "%s: table for width: %lu bytes\n"
5436 msgstr "%s: taula d’amplada: %lu bytes\n"
5437
5438-#: locale/programs/ld-identification.c:170
5439+#: locale/programs/ld-identification.c:169
5440 #, c-format
5441 msgid "%s: no identification for category `%s'"
5442 msgstr "%s: no hi ha cap identificació per a la categoria «%s»"
5443
5444-#: locale/programs/ld-identification.c:435
5445+#: locale/programs/ld-identification.c:434
5446 #, c-format
5447 msgid "%s: duplicate category version definition"
5448 msgstr "%s: la definició de versió de categoria és duplicada"
5449
5450-#: locale/programs/ld-measurement.c:113
5451+#: locale/programs/ld-measurement.c:112
5452 #, c-format
5453 msgid "%s: invalid value for field `%s'"
5454 msgstr "%s: el valor del camp «%s» no és vàlid"
5455
5456-#: locale/programs/ld-messages.c:114 locale/programs/ld-messages.c:148
5457+#: locale/programs/ld-messages.c:113 locale/programs/ld-messages.c:147
5458 #, c-format
5459 msgid "%s: field `%s' undefined"
5460 msgstr "%s: no s’ha definit el camp «%s»"
5461
5462-#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:155
5463-#: locale/programs/ld-monetary.c:256 locale/programs/ld-numeric.c:118
5464+#: locale/programs/ld-messages.c:120 locale/programs/ld-messages.c:154
5465+#: locale/programs/ld-monetary.c:255 locale/programs/ld-numeric.c:117
5466 #, c-format
5467 msgid "%s: value for field `%s' must not be an empty string"
5468 msgstr "%s: el valor del camp «%s» no ha de ser la cadena buida"
5469
5470-#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:171
5471+#: locale/programs/ld-messages.c:136 locale/programs/ld-messages.c:170
5472 #, c-format
5473 msgid "%s: no correct regular expression for field `%s': %s"
5474 msgstr "%s: no hi ha cap expressió regular correcta per al camp «%s»: %s"
5475
5476-#: locale/programs/ld-monetary.c:224
5477+#: locale/programs/ld-monetary.c:223
5478 #, c-format
5479 msgid "%s: value of field `int_curr_symbol' has wrong length"
5480 msgstr "%s: el valor del camp «int_curr_symbol» té una longitud incorrecta"
5481
5482-#: locale/programs/ld-monetary.c:237
5483+#: locale/programs/ld-monetary.c:236
5484 #, c-format
5485 msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217"
5486 msgstr "%s: el valor del camp «int_curr_symbol» no és un nom vàlid de l’estàndard ISO 4217"
5487
5488-#: locale/programs/ld-monetary.c:285 locale/programs/ld-monetary.c:315
5489+#: locale/programs/ld-monetary.c:284 locale/programs/ld-monetary.c:314
5490 #, c-format
5491 msgid "%s: value for field `%s' must be in range %d...%d"
5492 msgstr "%s: el valor del camp «%s» ha d’estar dins el rang %d...%d"
5493
5494-#: locale/programs/ld-monetary.c:747 locale/programs/ld-numeric.c:274
5495+#: locale/programs/ld-monetary.c:746 locale/programs/ld-numeric.c:273
5496 #, c-format
5497 msgid "%s: value for field `%s' must be a single character"
5498 msgstr "%s: el valor del camp «%s» ha de ser un sol caràcter"
5499
5500-#: locale/programs/ld-monetary.c:844 locale/programs/ld-numeric.c:318
5501+#: locale/programs/ld-monetary.c:843 locale/programs/ld-numeric.c:317
5502 #, c-format
5503 msgid "%s: `-1' must be last entry in `%s' field"
5504 msgstr "%s: «-1» ha de ser la darrera entrada del camp «%s»"
5505
5506-#: locale/programs/ld-monetary.c:866 locale/programs/ld-numeric.c:335
5507+#: locale/programs/ld-monetary.c:865 locale/programs/ld-numeric.c:334
5508 #, c-format
5509 msgid "%s: values for field `%s' must be smaller than 127"
5510 msgstr "%s: els valors del camp «%s» han de ser menors que 127"
5511
5512-#: locale/programs/ld-monetary.c:909
5513+#: locale/programs/ld-monetary.c:908
5514 msgid "conversion rate value cannot be zero"
5515 msgstr "el valor de la taxa de conversió no pot ser zero"
5516
5517-#: locale/programs/ld-name.c:129 locale/programs/ld-telephone.c:126
5518-#: locale/programs/ld-telephone.c:149
5519+#: locale/programs/ld-name.c:128 locale/programs/ld-telephone.c:125
5520+#: locale/programs/ld-telephone.c:148
5521 #, c-format
5522 msgid "%s: invalid escape sequence in field `%s'"
5523 msgstr "%s: la seqüència d’escapada del camp «%s» no és vàlida"
5524
5525-#: locale/programs/ld-time.c:247
5526+#: locale/programs/ld-time.c:246
5527 #, c-format
5528 msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'"
5529 msgstr "%s: el senyalador de direcció de la cadena %Zd del camp «era» no és ni «+» ni «-»"
5530
5531-#: locale/programs/ld-time.c:258
5532+#: locale/programs/ld-time.c:257
5533 #, c-format
5534 msgid "%s: direction flag in string %Zd in `era' field is not a single character"
5535 msgstr "%s: el senyalador de direcció de la cadena %Zd del camp «era» no és un sol caràcter"
5536
5537-#: locale/programs/ld-time.c:271
5538+#: locale/programs/ld-time.c:270
5539 #, c-format
5540 msgid "%s: invalid number for offset in string %Zd in `era' field"
5541 msgstr "%s: el número de desplaçament de la cadena %Zd del camp «era» no és vàlid"
5542
5543-#: locale/programs/ld-time.c:279
5544+#: locale/programs/ld-time.c:278
5545 #, c-format
5546 msgid "%s: garbage at end of offset value in string %Zd in `era' field"
5547 msgstr "%s: brossa al final del valor de desplaçament de la cadena %Zd del camp «era»"
5548
5549-#: locale/programs/ld-time.c:330
5550+#: locale/programs/ld-time.c:329
5551 #, c-format
5552 msgid "%s: invalid starting date in string %Zd in `era' field"
5553 msgstr "%s: la data de començament de la cadena %Zd del camp «era» no és vàlida"
5554
5555-#: locale/programs/ld-time.c:339
5556+#: locale/programs/ld-time.c:338
5557 #, c-format
5558 msgid "%s: garbage at end of starting date in string %Zd in `era' field "
5559 msgstr "%s: brossa al final de la data de començament de la cadena %Zd del camp «era» "
5560
5561-#: locale/programs/ld-time.c:358
5562+#: locale/programs/ld-time.c:357
5563 #, c-format
5564 msgid "%s: starting date is invalid in string %Zd in `era' field"
5565 msgstr "%s: la data de començament de la cadena %Zd del camp «era» no és vàlida"
5566
5567-#: locale/programs/ld-time.c:407 locale/programs/ld-time.c:435
5568+#: locale/programs/ld-time.c:406 locale/programs/ld-time.c:434
5569 #, c-format
5570 msgid "%s: invalid stopping date in string %Zd in `era' field"
5571 msgstr "%s: la data d’acabament de la cadena %Zd del camp «era» no és vàlida"
5572
5573-#: locale/programs/ld-time.c:416
5574+#: locale/programs/ld-time.c:415
5575 #, c-format
5576 msgid "%s: garbage at end of stopping date in string %Zd in `era' field"
5577 msgstr "%s: brossa al final de la data d’acabament de la cadena %Zd del camp «era»"
5578
5579-#: locale/programs/ld-time.c:444
5580+#: locale/programs/ld-time.c:443
5581 #, c-format
5582 msgid "%s: missing era name in string %Zd in `era' field"
5583 msgstr "%s: manca el nom de l’era a la cadena %Zd del camp «era»"
5584
5585-#: locale/programs/ld-time.c:456
5586+#: locale/programs/ld-time.c:455
5587 #, c-format
5588 msgid "%s: missing era format in string %Zd in `era' field"
5589 msgstr "%s: manca el format de l’era a la cadena %Zd del camp «era»"
5590
5591-#: locale/programs/ld-time.c:497
5592+#: locale/programs/ld-time.c:496
5593 #, c-format
5594 msgid "%s: third operand for value of field `%s' must not be larger than %d"
5595 msgstr "%s: el tercer operand del valor del camp «%s» no ha de ser major que %d"
5596
5597-#: locale/programs/ld-time.c:505 locale/programs/ld-time.c:513
5598-#: locale/programs/ld-time.c:521
5599+#: locale/programs/ld-time.c:504 locale/programs/ld-time.c:512
5600+#: locale/programs/ld-time.c:520
5601 #, c-format
5602 msgid "%s: values for field `%s' must not be larger than %d"
5603 msgstr "%s: els valors del camp «%s» no han de ser majors que %d"
5604
5605-#: locale/programs/ld-time.c:1004
5606+#: locale/programs/ld-time.c:1003
5607 #, c-format
5608 msgid "%s: too few values for field `%s'"
5609 msgstr "%s: manquen valors al camp «%s»"
5610
5611-#: locale/programs/ld-time.c:1049
5612+#: locale/programs/ld-time.c:1048
5613 msgid "extra trailing semicolon"
5614 msgstr "hi ha un punt i coma sobrant al final"
5615
5616-#: locale/programs/ld-time.c:1052
5617+#: locale/programs/ld-time.c:1051
5618 #, c-format
5619 msgid "%s: too many values for field `%s'"
5620 msgstr "%s: sobren valors al camp «%s»"
5621
5622-#: locale/programs/linereader.c:130
5623+#: locale/programs/linereader.c:129
5624 msgid "trailing garbage at end of line"
5625 msgstr "brossa al final de la línia"
5626
5627-#: locale/programs/linereader.c:298
5628+#: locale/programs/linereader.c:297
5629 msgid "garbage at end of number"
5630 msgstr "brossa al final del número"
5631
5632-#: locale/programs/linereader.c:410
5633+#: locale/programs/linereader.c:409
5634 msgid "garbage at end of character code specification"
5635 msgstr "brossa al final de l’especificació de codi de caràcter"
5636
5637-#: locale/programs/linereader.c:496
5638+#: locale/programs/linereader.c:495
5639 msgid "unterminated symbolic name"
5640 msgstr "el nom simbòlic no està acabat"
5641
5642-#: locale/programs/linereader.c:623
5643+#: locale/programs/linereader.c:622
5644 msgid "illegal escape sequence at end of string"
5645 msgstr "hi ha una seqüència d’escapada no permesa al final de la cadena"
5646
5647-#: locale/programs/linereader.c:627 locale/programs/linereader.c:855
5648+#: locale/programs/linereader.c:626 locale/programs/linereader.c:854
5649 msgid "unterminated string"
5650 msgstr "la cadena no està acabada"
5651
5652-#: locale/programs/linereader.c:669
5653+#: locale/programs/linereader.c:668
5654 msgid "non-symbolic character value should not be used"
5655 msgstr "no s’han d’emprar valors de caràcters no simbòlics"
5656
5657-#: locale/programs/linereader.c:816
5658+#: locale/programs/linereader.c:815
5659 #, c-format
5660 msgid "symbol `%.*s' not in charmap"
5661 msgstr "el símbol «%.*s» no es troba al mapa de caràcters"
5662
5663-#: locale/programs/linereader.c:837
5664+#: locale/programs/linereader.c:836
5665 #, c-format
5666 msgid "symbol `%.*s' not in repertoire map"
5667 msgstr "el símbol «%.*s» no es troba al mapa de repertori"
5668
5669-#: locale/programs/locale-spec.c:131
5670+#: locale/programs/locale-spec.c:130
5671 #, c-format
5672 msgid "unknown name \"%s\""
5673 msgstr "el nom «%s» no és conegut"
5674@@ -2648,33 +2751,33 @@
5675 msgid "Cannot set LC_ALL to default locale"
5676 msgstr "no s’ha pogut establir LC_ALL al locale per defecte"
5677
5678-#: locale/programs/locale.c:518
5679+#: locale/programs/locale.c:521
5680 #, c-format
5681 msgid "while preparing output"
5682 msgstr "en preparar l’eixida"
5683
5684 # Més ajudes. ivb
5685-#: locale/programs/localedef.c:120
5686+#: locale/programs/localedef.c:119
5687 msgid "Input Files:"
5688 msgstr "Fitxers d’entrada:"
5689
5690-#: locale/programs/localedef.c:122
5691+#: locale/programs/localedef.c:121
5692 msgid "Symbolic character names defined in FILE"
5693 msgstr "Els noms simbòlics dels caràcters es defineixen al FITXER."
5694
5695-#: locale/programs/localedef.c:123
5696+#: locale/programs/localedef.c:122
5697 msgid "Source definitions are found in FILE"
5698 msgstr "Les definicions font es troben al FITXER."
5699
5700-#: locale/programs/localedef.c:125
5701+#: locale/programs/localedef.c:124
5702 msgid "FILE contains mapping from symbolic names to UCS4 values"
5703 msgstr "El FITXER conté un mapa de noms simbòlics a valors UCS4."
5704
5705-#: locale/programs/localedef.c:129
5706+#: locale/programs/localedef.c:128
5707 msgid "Create output even if warning messages were issued"
5708 msgstr "Crea fitxers d’eixida encara que s’hagen emès missatges d’avís."
5709
5710-#: locale/programs/localedef.c:130
5711+#: locale/programs/localedef.c:129
5712 msgid "Create old-style tables"
5713 msgstr "Crea taules de l’estil antic."
5714
5715@@ -2682,57 +2785,57 @@
5716 # ivb Localedef crea diversos fitxers en un directori: és plural.
5717 # ivb Però, el prefix és un prefix d'un camí, com «/usr/local» en
5718 # ivb «/usr/local/share/doc».
5719-#: locale/programs/localedef.c:131
5720+#: locale/programs/localedef.c:130
5721 msgid "Optional output file prefix"
5722 msgstr "Prefix opcional dels fitxers d’eixida."
5723
5724-#: locale/programs/localedef.c:132
5725+#: locale/programs/localedef.c:131
5726 msgid "Be strictly POSIX conform"
5727 msgstr "S’ajusta estrictament a POSIX."
5728
5729-#: locale/programs/localedef.c:134
5730+#: locale/programs/localedef.c:133
5731 msgid "Suppress warnings and information messages"
5732 msgstr "Descarta els avisos i els missatges informatius."
5733
5734-#: locale/programs/localedef.c:135
5735+#: locale/programs/localedef.c:134
5736 msgid "Print more messages"
5737 msgstr "Mostra més missatges."
5738
5739-#: locale/programs/localedef.c:136
5740+#: locale/programs/localedef.c:135
5741 msgid "Archive control:"
5742 msgstr "Control d’arxius:"
5743
5744-#: locale/programs/localedef.c:138
5745+#: locale/programs/localedef.c:137
5746 msgid "Don't add new data to archive"
5747 msgstr "No afegeix dades noves a l’arxiu."
5748
5749-#: locale/programs/localedef.c:140
5750+#: locale/programs/localedef.c:139
5751 msgid "Add locales named by parameters to archive"
5752 msgstr "Afegeix a l’arxiu els locales esmentats pels paràmetres."
5753
5754-#: locale/programs/localedef.c:141
5755+#: locale/programs/localedef.c:140
5756 msgid "Replace existing archive content"
5757 msgstr "Reemplaça el contingut existent a l’arxiu."
5758
5759-#: locale/programs/localedef.c:143
5760+#: locale/programs/localedef.c:142
5761 msgid "Remove locales named by parameters from archive"
5762 msgstr "Elimina de l’arxiu els locales esmentats pels paràmetres."
5763
5764-#: locale/programs/localedef.c:144
5765+#: locale/programs/localedef.c:143
5766 msgid "List content of archive"
5767 msgstr "Llista el contingut de l’arxiu."
5768
5769-#: locale/programs/localedef.c:146
5770+#: locale/programs/localedef.c:145
5771 msgid "locale.alias file to consult when making archive"
5772 msgstr "Fitxer «locale.alias» a consultar en crear l’arxiu."
5773
5774 # ivb (2001/10/28)
5775 # ivb Pose el punt final pq és la descripció curta de l'ordre.
5776-#: locale/programs/localedef.c:151
5777+#: locale/programs/localedef.c:150
5778 msgid "Compile locale specification"
5779 msgstr "Compiŀla una especificació de locale."
5780
5781-#: locale/programs/localedef.c:154
5782+#: locale/programs/localedef.c:153
5783 msgid ""
5784 "NAME\n"
5785 "[--add-to-archive|--delete-from-archive] FILE...\n"
5786@@ -2742,28 +2845,28 @@
5787 "[--add-to-archive | --delete-from-archive] FITXER…\n"
5788 "--list-archive [FITXER]"
5789
5790-#: locale/programs/localedef.c:232
5791+#: locale/programs/localedef.c:228
5792 #, c-format
5793 msgid "cannot create directory for output files"
5794 msgstr "no s’ha pogut crear el directori per als fitxers d’eixida"
5795
5796-#: locale/programs/localedef.c:243
5797+#: locale/programs/localedef.c:239
5798 #, c-format
5799 msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'"
5800 msgstr "FATAL: el sistema no defineix «_POSIX2_LOCALEDEF»"
5801
5802-#: locale/programs/localedef.c:257 locale/programs/localedef.c:273
5803-#: locale/programs/localedef.c:599 locale/programs/localedef.c:619
5804+#: locale/programs/localedef.c:253 locale/programs/localedef.c:269
5805+#: locale/programs/localedef.c:601 locale/programs/localedef.c:621
5806 #, c-format
5807 msgid "cannot open locale definition file `%s'"
5808 msgstr "no s’ha pogut obrir el fitxer «%s» de definició del locale"
5809
5810-#: locale/programs/localedef.c:285
5811+#: locale/programs/localedef.c:281
5812 #, c-format
5813 msgid "cannot write output files to `%s'"
5814 msgstr "no s’han pogut escriure els fitxers d’eixida a «%s»"
5815
5816-#: locale/programs/localedef.c:366
5817+#: locale/programs/localedef.c:367
5818 #, c-format
5819 msgid ""
5820 "System's directory for character maps : %s\n"
5821@@ -2776,214 +2879,215 @@
5822 " camí als locales : %s\n"
5823 "%s"
5824
5825-#: locale/programs/localedef.c:567
5826+#: locale/programs/localedef.c:569
5827 #, c-format
5828 msgid "circular dependencies between locale definitions"
5829 msgstr "hi ha dependències circulars entre les definicions dels locales"
5830
5831-#: locale/programs/localedef.c:573
5832+#: locale/programs/localedef.c:575
5833 #, c-format
5834 msgid "cannot add already read locale `%s' a second time"
5835 msgstr "no es pot afegir una altra volta el locale ja llegit «%s»"
5836
5837-#: locale/programs/locarchive.c:92 locale/programs/locarchive.c:338
5838+#: locale/programs/locarchive.c:113 locale/programs/locarchive.c:347
5839+#: nss/makedb.c:290
5840 #, c-format
5841 msgid "cannot create temporary file"
5842 msgstr "no s’ha pogut crear un fitxer temporal"
5843
5844-#: locale/programs/locarchive.c:122 locale/programs/locarchive.c:384
5845+#: locale/programs/locarchive.c:143 locale/programs/locarchive.c:393
5846 #, c-format
5847 msgid "cannot initialize archive file"
5848 msgstr "no s’ha pogut iniciar el fitxer arxiu"
5849
5850-#: locale/programs/locarchive.c:129 locale/programs/locarchive.c:391
5851+#: locale/programs/locarchive.c:150 locale/programs/locarchive.c:400
5852 #, c-format
5853 msgid "cannot resize archive file"
5854 msgstr "no s’ha pogut redimensionar el fitxer arxiu"
5855
5856-#: locale/programs/locarchive.c:152 locale/programs/locarchive.c:414
5857-#: locale/programs/locarchive.c:633
5858+#: locale/programs/locarchive.c:163 locale/programs/locarchive.c:413
5859+#: locale/programs/locarchive.c:619
5860 #, c-format
5861 msgid "cannot map archive header"
5862 msgstr "no s’ha pogut mapar la capçalera de l’arxiu"
5863
5864 # ivb (2002/10/21)
5865 # ivb Un «locale archive» conté diversos locales -> «arxiu de locales».
5866-#: locale/programs/locarchive.c:174
5867+#: locale/programs/locarchive.c:185
5868 #, c-format
5869 msgid "failed to create new locale archive"
5870 msgstr "no s’ha pogut crear el nou arxiu de locales"
5871
5872-#: locale/programs/locarchive.c:186
5873+#: locale/programs/locarchive.c:197
5874 #, c-format
5875 msgid "cannot change mode of new locale archive"
5876 msgstr "no s’ha pogut canviar el mode del nou arxiu de locales"
5877
5878-#: locale/programs/locarchive.c:285
5879+#: locale/programs/locarchive.c:296
5880 #, c-format
5881 msgid "cannot read data from locale archive"
5882 msgstr "no s’han pogut llegir les dades de l’arxiu de locales"
5883
5884-#: locale/programs/locarchive.c:318
5885+#: locale/programs/locarchive.c:327
5886 #, c-format
5887 msgid "cannot map locale archive file"
5888 msgstr "no s’ha pogut mapar el fitxer arxiu de locales"
5889
5890-#: locale/programs/locarchive.c:422
5891+#: locale/programs/locarchive.c:421
5892 #, c-format
5893 msgid "cannot lock new archive"
5894 msgstr "no s’ha pogut blocar el nou arxiu"
5895
5896-#: locale/programs/locarchive.c:488
5897+#: locale/programs/locarchive.c:485
5898 #, c-format
5899 msgid "cannot extend locale archive file"
5900 msgstr "no s’ha pogut estendre el fitxer arxiu de locales"
5901
5902-#: locale/programs/locarchive.c:497
5903+#: locale/programs/locarchive.c:494
5904 #, c-format
5905 msgid "cannot change mode of resized locale archive"
5906 msgstr "no s’ha pogut canviar el mode de l’arxiu de locales redimensionat"
5907
5908-#: locale/programs/locarchive.c:505
5909+#: locale/programs/locarchive.c:502
5910 #, c-format
5911 msgid "cannot rename new archive"
5912 msgstr "no s’ha pogut reanomenar el nou arxiu"
5913
5914-#: locale/programs/locarchive.c:558
5915+#: locale/programs/locarchive.c:555
5916 #, c-format
5917 msgid "cannot open locale archive \"%s\""
5918 msgstr "no s’ha pogut obrir l’arxiu «%s» de locales"
5919
5920-#: locale/programs/locarchive.c:563
5921+#: locale/programs/locarchive.c:560
5922 #, c-format
5923 msgid "cannot stat locale archive \"%s\""
5924 msgstr "ha fallat stat() sobre l’arxiu «%s» de locales"
5925
5926-#: locale/programs/locarchive.c:582
5927+#: locale/programs/locarchive.c:579
5928 #, c-format
5929 msgid "cannot lock locale archive \"%s\""
5930 msgstr "no s’ha pogut blocar l’arxiu «%s» de locales"
5931
5932-#: locale/programs/locarchive.c:605
5933+#: locale/programs/locarchive.c:602
5934 #, c-format
5935 msgid "cannot read archive header"
5936 msgstr "no s’ha pogut llegir la capçalera de l’arxiu"
5937
5938-#: locale/programs/locarchive.c:680
5939+#: locale/programs/locarchive.c:666
5940 #, c-format
5941 msgid "locale '%s' already exists"
5942 msgstr "el locale «%s» ja existeix"
5943
5944-#: locale/programs/locarchive.c:942 locale/programs/locarchive.c:957
5945-#: locale/programs/locarchive.c:969 locale/programs/locarchive.c:981
5946-#: locale/programs/locfile.c:344
5947+#: locale/programs/locarchive.c:928 locale/programs/locarchive.c:943
5948+#: locale/programs/locarchive.c:955 locale/programs/locarchive.c:967
5949+#: locale/programs/locfile.c:343
5950 #, c-format
5951 msgid "cannot add to locale archive"
5952 msgstr "no s’ha pogut afegir a l’arxiu de locales"
5953
5954 # ivb (2002/10/21)
5955 # ivb El fitxer conté àlies de diversos locales (locale.alias).
5956-#: locale/programs/locarchive.c:1139
5957+#: locale/programs/locarchive.c:1125
5958 #, c-format
5959 msgid "locale alias file `%s' not found"
5960 msgstr "no s’ha trobat el fitxer «%s» d’àlies de locales"
5961
5962 # ivb (2002/10/21)
5963 # ivb És un missatge, no un error.
5964-#: locale/programs/locarchive.c:1289
5965+#: locale/programs/locarchive.c:1275
5966 #, c-format
5967 msgid "Adding %s\n"
5968 msgstr "S’està afegint «%s»\n"
5969
5970-#: locale/programs/locarchive.c:1295
5971+#: locale/programs/locarchive.c:1281
5972 #, c-format
5973 msgid "stat of \"%s\" failed: %s: ignored"
5974 msgstr "ha fallat stat() sobre «%s»: %s: es descarta"
5975
5976-#: locale/programs/locarchive.c:1301
5977+#: locale/programs/locarchive.c:1287
5978 #, c-format
5979 msgid "\"%s\" is no directory; ignored"
5980 msgstr "«%s» no és un directori: es descarta"
5981
5982-#: locale/programs/locarchive.c:1308
5983+#: locale/programs/locarchive.c:1294
5984 #, c-format
5985 msgid "cannot open directory \"%s\": %s: ignored"
5986 msgstr "no s’ha pogut obrir el directori «%s»: %s: es descarta"
5987
5988-#: locale/programs/locarchive.c:1380
5989+#: locale/programs/locarchive.c:1366
5990 #, c-format
5991 msgid "incomplete set of locale files in \"%s\""
5992 msgstr "el joc de fitxers de locale a «%s» no és complet"
5993
5994-#: locale/programs/locarchive.c:1444
5995+#: locale/programs/locarchive.c:1430
5996 #, c-format
5997 msgid "cannot read all files in \"%s\": ignored"
5998 msgstr "no s’han pogut llegir tots els fitxers de «%s»: es descarta"
5999
6000-#: locale/programs/locarchive.c:1514
6001+#: locale/programs/locarchive.c:1500
6002 #, c-format
6003 msgid "locale \"%s\" not in archive"
6004 msgstr "el locale «%s» no es troba a l’arxiu"
6005
6006-#: locale/programs/locfile.c:132
6007+#: locale/programs/locfile.c:131
6008 #, c-format
6009 msgid "argument to `%s' must be a single character"
6010 msgstr "l’argument de «%s» ha de ser un sol caràcter"
6011
6012-#: locale/programs/locfile.c:252
6013+#: locale/programs/locfile.c:251
6014 msgid "syntax error: not inside a locale definition section"
6015 msgstr "error de sintaxi: no és a dins d’una secció de definició de locale"
6016
6017-#: locale/programs/locfile.c:626
6018+#: locale/programs/locfile.c:625
6019 #, c-format
6020 msgid "cannot open output file `%s' for category `%s'"
6021 msgstr "no s’ha pogut obrir el fitxer d’eixida «%s» de la categoria «%s»"
6022
6023-#: locale/programs/locfile.c:650
6024+#: locale/programs/locfile.c:649
6025 #, c-format
6026 msgid "failure while writing data for category `%s'"
6027 msgstr "no s’han pogut escriure les dades de la categoria «%s»"
6028
6029-#: locale/programs/locfile.c:746
6030+#: locale/programs/locfile.c:745
6031 #, c-format
6032 msgid "cannot create output file `%s' for category `%s'"
6033 msgstr "no s’ha pogut crear el fitxer d’eixida «%s» de la categoria «%s»"
6034
6035-#: locale/programs/locfile.c:782
6036+#: locale/programs/locfile.c:781
6037 msgid "expecting string argument for `copy'"
6038 msgstr "cal una cadena com a argument de «copy»"
6039
6040-#: locale/programs/locfile.c:786
6041+#: locale/programs/locfile.c:785
6042 msgid "locale name should consist only of portable characters"
6043 msgstr "el nom del locale només ha de contenir caràcters portables"
6044
6045-#: locale/programs/locfile.c:805
6046+#: locale/programs/locfile.c:804
6047 msgid "no other keyword shall be specified when `copy' is used"
6048 msgstr "no s’ha d’indicar cap altra paraula clau quan s’empre «copy»"
6049
6050-#: locale/programs/locfile.c:819
6051+#: locale/programs/locfile.c:818
6052 #, c-format
6053 msgid "`%1$s' definition does not end with `END %1$s'"
6054 msgstr "la definició «%1$s» no acaba en «END %1$s»"
6055
6056-#: locale/programs/repertoire.c:229 locale/programs/repertoire.c:270
6057-#: locale/programs/repertoire.c:295
6058+#: locale/programs/repertoire.c:228 locale/programs/repertoire.c:269
6059+#: locale/programs/repertoire.c:294
6060 #, c-format
6061 msgid "syntax error in repertoire map definition: %s"
6062 msgstr "error de sintaxi a la definició del mapa de repertori: %s"
6063
6064-#: locale/programs/repertoire.c:271
6065+#: locale/programs/repertoire.c:270
6066 msgid "no <Uxxxx> or <Uxxxxxxxx> value given"
6067 msgstr "no s’ha especificat un valor <Uxxxx> o <Uxxxxxxxx>"
6068
6069 # ivb (2001/11/05)
6070 # ivb Apareix quan no es troba el repertori en un arbre de repertoris.
6071-#: locale/programs/repertoire.c:331
6072+#: locale/programs/repertoire.c:330
6073 #, c-format
6074 msgid "cannot save new repertoire map"
6075 msgstr "no s’ha pogut afegir el nou mapa de repertori"
6076
6077-#: locale/programs/repertoire.c:342
6078+#: locale/programs/repertoire.c:341
6079 #, c-format
6080 msgid "repertoire map file `%s' not found"
6081 msgstr "no s’ha trobat el fitxer «%s» de mapa de repertori"
6082@@ -2993,7 +3097,7 @@
6083 msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
6084 msgstr "Estableix el propietari, grup i permissos d’accés del pseudo‐terminal esclau corresponent al pseudo‐terminal mestre passat en el descriptor de fitxer %d. Aquest és el programa auxiliar per a la funció grantpt(), i no està pensat per a ser executat directament des de la línia d’ordres.\n"
6085
6086-#: login/programs/pt_chown.c:88
6087+#: login/programs/pt_chown.c:92
6088 #, c-format
6089 msgid ""
6090 "The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n"
6091@@ -3004,41 +3108,41 @@
6092 "\n"
6093 "%s"
6094
6095-#: login/programs/pt_chown.c:192
6096+#: login/programs/pt_chown.c:198
6097 #, c-format
6098 msgid "too many arguments"
6099 msgstr "sobren arguments"
6100
6101-#: login/programs/pt_chown.c:200
6102+#: login/programs/pt_chown.c:206
6103 #, c-format
6104 msgid "needs to be installed setuid `root'"
6105 msgstr "ha d’estar instaŀlat amb setuid a «root»"
6106
6107-#: malloc/mcheck.c:350
6108+#: malloc/mcheck.c:348
6109 msgid "memory is consistent, library is buggy\n"
6110 msgstr "la memòria és consistent; la biblioteca té errors\n"
6111
6112-#: malloc/mcheck.c:353
6113+#: malloc/mcheck.c:351
6114 msgid "memory clobbered before allocated block\n"
6115 msgstr "s’ha sobreescrit la memòria d’abans del bloc reservat\n"
6116
6117-#: malloc/mcheck.c:356
6118+#: malloc/mcheck.c:354
6119 msgid "memory clobbered past end of allocated block\n"
6120 msgstr "s’ha sobreescrit la memòria de després del bloc reservat\n"
6121
6122-#: malloc/mcheck.c:359
6123+#: malloc/mcheck.c:357
6124 msgid "block freed twice\n"
6125 msgstr "s’ha alliberat el bloc dues voltes\n"
6126
6127-#: malloc/mcheck.c:362
6128+#: malloc/mcheck.c:360
6129 msgid "bogus mcheck_status, library is buggy\n"
6130 msgstr "el valor d’«mcheck_status» és estrany; la biblioteca té errors\n"
6131
6132-#: malloc/memusage.sh:33
6133+#: malloc/memusage.sh:32
6134 msgid "%s: option '%s' requires an argument\\n"
6135 msgstr "%s: l’opció «%s» necessita un argument\\n"
6136
6137-#: malloc/memusage.sh:39
6138+#: malloc/memusage.sh:38
6139 msgid ""
6140 "Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...\n"
6141 "Profile memory usage of PROGRAM.\n"
6142@@ -3093,7 +3197,7 @@
6143 "opcions curtes corresponents.\n"
6144 "\n"
6145
6146-#: malloc/memusage.sh:101
6147+#: malloc/memusage.sh:99
6148 msgid ""
6149 "Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
6150 "\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
6151@@ -3105,60 +3209,60 @@
6152 " [--total] [--title=CADENA] [--x-size=MIDA] [--y-size=MIDA]\n"
6153 " PROGRAMA [OPCIÓ_DE_PROGRAMA]…"
6154
6155-#: malloc/memusage.sh:193
6156+#: malloc/memusage.sh:191
6157 msgid "memusage: option \\`${1##*=}' is ambiguous"
6158 msgstr "memusage: l’opció «${1##*=}» és ambígua"
6159
6160-#: malloc/memusage.sh:202
6161+#: malloc/memusage.sh:200
6162 msgid "memusage: unrecognized option \\`$1'"
6163 msgstr "memusage: l’opció «$1» no és reconeguda"
6164
6165-#: malloc/memusage.sh:215
6166+#: malloc/memusage.sh:213
6167 msgid "No program name given"
6168 msgstr "No s’ha indicat un nom de programa"
6169
6170 # Més ajudes. ivb
6171-#: malloc/memusagestat.c:57
6172+#: malloc/memusagestat.c:55
6173 msgid "Name output file"
6174 msgstr "Especifica el fitxer d’eixida."
6175
6176-#: malloc/memusagestat.c:58
6177+#: malloc/memusagestat.c:56
6178 msgid "Title string used in output graphic"
6179 msgstr "Cadena amb el títol a emprar al gràfic d’eixida."
6180
6181-#: malloc/memusagestat.c:59
6182+#: malloc/memusagestat.c:57
6183 msgid "Generate output linear to time (default is linear to number of function calls)"
6184 msgstr "Genera una eixida lineal respecte el temps (per defecte és lineal respecte el nombre de crides a funció)."
6185
6186-#: malloc/memusagestat.c:61
6187+#: malloc/memusagestat.c:59
6188 msgid "Also draw graph for total memory consumption"
6189 msgstr "També mostra un gràfic del consum total de memòria."
6190
6191-#: malloc/memusagestat.c:62
6192+#: malloc/memusagestat.c:60
6193 msgid "Make output graphic VALUE pixels wide"
6194 msgstr "Fa el gràfic d’eixida de VALOR píxels d’amplada."
6195
6196-#: malloc/memusagestat.c:63
6197+#: malloc/memusagestat.c:61
6198 msgid "Make output graphic VALUE pixels high"
6199 msgstr "Fa el gràfic d’eixida de VALOR píxels d’altura."
6200
6201-#: malloc/memusagestat.c:68
6202+#: malloc/memusagestat.c:66
6203 msgid "Generate graphic from memory profiling data"
6204 msgstr "Genera un gràfic amb les dades de perfilat de memòria."
6205
6206-#: malloc/memusagestat.c:71
6207+#: malloc/memusagestat.c:69
6208 msgid "DATAFILE [OUTFILE]"
6209 msgstr "FITXER_DADES [FITXER_EIXIDA]"
6210
6211-#: misc/error.c:118
6212+#: misc/error.c:117
6213 msgid "Unknown system error"
6214 msgstr "error desconegut del sistema"
6215
6216-#: nis/nis_callback.c:189
6217+#: nis/nis_callback.c:188
6218 msgid "unable to free arguments"
6219 msgstr "no s’han pogut alliberar els arguments"
6220
6221-#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132
6222+#: nis/nis_error.h:1 nis/ypclnt.c:832 nis/ypclnt.c:920 posix/regcomp.c:131
6223 #: sysdeps/gnu/errlist.c:20
6224 msgid "Success"
6225 msgstr "Èxit"
6226@@ -3200,7 +3304,7 @@
6227 msgstr "S’ha trencat la cadena de primer/següent"
6228
6229 #. TRANS Permission denied; the file permissions do not allow the attempted operation.
6230-#: nis/nis_error.h:11 nis/ypclnt.c:878 sysdeps/gnu/errlist.c:157
6231+#: nis/nis_error.h:11 nis/ypclnt.c:877 sysdeps/gnu/errlist.c:157
6232 msgid "Permission denied"
6233 msgstr "S’ha denegat el permís"
6234
6235@@ -3356,138 +3460,138 @@
6236 msgid "Master server busy, full dump rescheduled."
6237 msgstr "El servidor mestre es troba ocupat, es replanifica el bolcat complet"
6238
6239-#: nis/nis_local_names.c:122
6240+#: nis/nis_local_names.c:121
6241 #, c-format
6242 msgid "LOCAL entry for UID %d in directory %s not unique\n"
6243 msgstr "L’entrada LOCAL de l’UID %d al directori «%s» no és única\n"
6244
6245 # ivb (2001/10/30)
6246 # ivb Crec que es refereix a un tipus de servei de noms -> masculí.
6247-#: nis/nis_print.c:51
6248+#: nis/nis_print.c:50
6249 msgid "UNKNOWN"
6250 msgstr "DESCONEGUT"
6251
6252 # ivb (2001/11/01)
6253 # ivb D'acord amb «nis/rpcsvc/nis_object.x».
6254-#: nis/nis_print.c:109
6255+#: nis/nis_print.c:108
6256 msgid "BOGUS OBJECT\n"
6257 msgstr "OBJECTE NO INICIAT\n"
6258
6259-#: nis/nis_print.c:112
6260+#: nis/nis_print.c:111
6261 msgid "NO OBJECT\n"
6262 msgstr "CAP OBJECTE\n"
6263
6264-#: nis/nis_print.c:115
6265+#: nis/nis_print.c:114
6266 msgid "DIRECTORY\n"
6267 msgstr "DIRECTORI\n"
6268
6269-#: nis/nis_print.c:118
6270+#: nis/nis_print.c:117
6271 msgid "GROUP\n"
6272 msgstr "GRUP\n"
6273
6274-#: nis/nis_print.c:121
6275+#: nis/nis_print.c:120
6276 msgid "TABLE\n"
6277 msgstr "TAULA\n"
6278
6279-#: nis/nis_print.c:124
6280+#: nis/nis_print.c:123
6281 msgid "ENTRY\n"
6282 msgstr "ENTRADA\n"
6283
6284-#: nis/nis_print.c:127
6285+#: nis/nis_print.c:126
6286 msgid "LINK\n"
6287 msgstr "ENLLAÇ\n"
6288
6289-#: nis/nis_print.c:130
6290+#: nis/nis_print.c:129
6291 msgid "PRIVATE\n"
6292 msgstr "PRIVAT\n"
6293
6294-#: nis/nis_print.c:133
6295+#: nis/nis_print.c:132
6296 msgid "(Unknown object)\n"
6297 msgstr "(Objecte desconegut)\n"
6298
6299-#: nis/nis_print.c:167
6300+#: nis/nis_print.c:166
6301 #, c-format
6302 msgid "Name : `%s'\n"
6303 msgstr "Nom : «%s»\n"
6304
6305-#: nis/nis_print.c:168
6306+#: nis/nis_print.c:167
6307 #, c-format
6308 msgid "Type : %s\n"
6309 msgstr "Tipus : %s\n"
6310
6311-#: nis/nis_print.c:173
6312+#: nis/nis_print.c:172
6313 msgid "Master Server :\n"
6314 msgstr "Servidor mestre :\n"
6315
6316 # ivb (2001/10/28)
6317 # ivb Es refereix a un servidor rèplica, no a replicar.
6318-#: nis/nis_print.c:175
6319+#: nis/nis_print.c:174
6320 msgid "Replicate :\n"
6321 msgstr "Rèplica :\n"
6322
6323-#: nis/nis_print.c:176
6324+#: nis/nis_print.c:175
6325 #, c-format
6326 msgid "\tName : %s\n"
6327 msgstr "\tNom : %s\n"
6328
6329-#: nis/nis_print.c:177
6330+#: nis/nis_print.c:176
6331 msgid "\tPublic Key : "
6332 msgstr "\tClau pública: "
6333
6334-#: nis/nis_print.c:181
6335+#: nis/nis_print.c:180
6336 msgid "None.\n"
6337 msgstr "Cap.\n"
6338
6339 # ivb (2001/10/28)
6340 # ivb Xicoteta diferència-Home de l'infern ;)
6341-#: nis/nis_print.c:184
6342+#: nis/nis_print.c:183
6343 #, c-format
6344 msgid "Diffie-Hellmann (%d bits)\n"
6345 msgstr "Diffie‐Hellmann (%d bits)\n"
6346
6347-#: nis/nis_print.c:189
6348+#: nis/nis_print.c:188
6349 #, c-format
6350 msgid "RSA (%d bits)\n"
6351 msgstr "RSA (%d bits)\n"
6352
6353-#: nis/nis_print.c:192
6354+#: nis/nis_print.c:191
6355 msgid "Kerberos.\n"
6356 msgstr "Kerberos.\n"
6357
6358 # ivb (2001/10/30)
6359 # ivb Es refereix a una clau pública -> femení.
6360-#: nis/nis_print.c:195
6361+#: nis/nis_print.c:194
6362 #, c-format
6363 msgid "Unknown (type = %d, bits = %d)\n"
6364 msgstr "Desconeguda (tipus = %d, bits = %d)\n"
6365
6366-#: nis/nis_print.c:206
6367+#: nis/nis_print.c:205
6368 #, c-format
6369 msgid "\tUniversal addresses (%u)\n"
6370 msgstr "\tAdreces universals (%u)\n"
6371
6372-#: nis/nis_print.c:228
6373+#: nis/nis_print.c:227
6374 msgid "Time to live : "
6375 msgstr "Temps de vida : "
6376
6377-#: nis/nis_print.c:230
6378+#: nis/nis_print.c:229
6379 msgid "Default Access rights :\n"
6380 msgstr "Drets d’accés per defecte :\n"
6381
6382-#: nis/nis_print.c:239
6383+#: nis/nis_print.c:238
6384 #, c-format
6385 msgid "\tType : %s\n"
6386 msgstr "\tTipus : %s\n"
6387
6388-#: nis/nis_print.c:240
6389+#: nis/nis_print.c:239
6390 msgid "\tAccess rights: "
6391 msgstr "\tDrets d’accés: "
6392
6393-#: nis/nis_print.c:254
6394+#: nis/nis_print.c:253
6395 msgid "Group Flags :"
6396 msgstr "Senyaladors del grup :"
6397
6398-#: nis/nis_print.c:257
6399+#: nis/nis_print.c:256
6400 msgid ""
6401 "\n"
6402 "Group Members :\n"
6403@@ -3495,12 +3599,12 @@
6404 "\n"
6405 "Membres del grup :\n"
6406
6407-#: nis/nis_print.c:269
6408+#: nis/nis_print.c:268
6409 #, c-format
6410 msgid "Table Type : %s\n"
6411 msgstr "Tipus de taula : %s\n"
6412
6413-#: nis/nis_print.c:270
6414+#: nis/nis_print.c:269
6415 #, c-format
6416 msgid "Number of Columns : %d\n"
6417 msgstr "Nombre de columnes : %d\n"
6418@@ -3508,85 +3612,85 @@
6419 # ivb (2000/10/28)
6420 # ivb Açò és correcte segons nis/rpcsvc/nis_object.x, és «caràcter
6421 # ivb separador» i no «separador de caràcters».
6422-#: nis/nis_print.c:271
6423+#: nis/nis_print.c:270
6424 #, c-format
6425 msgid "Character Separator : %c\n"
6426 msgstr "Caràcter separador : %c\n"
6427
6428-#: nis/nis_print.c:272
6429+#: nis/nis_print.c:271
6430 #, c-format
6431 msgid "Search Path : %s\n"
6432 msgstr "Camí de cerca : %s\n"
6433
6434-#: nis/nis_print.c:273
6435+#: nis/nis_print.c:272
6436 msgid "Columns :\n"
6437 msgstr "Columnes :\n"
6438
6439-#: nis/nis_print.c:276
6440+#: nis/nis_print.c:275
6441 #, c-format
6442 msgid "\t[%d]\tName : %s\n"
6443 msgstr "\t[%d]\tNom : %s\n"
6444
6445-#: nis/nis_print.c:278
6446+#: nis/nis_print.c:277
6447 msgid "\t\tAttributes : "
6448 msgstr "\t\tAtributs : "
6449
6450-#: nis/nis_print.c:280
6451+#: nis/nis_print.c:279
6452 msgid "\t\tAccess Rights : "
6453 msgstr "\t\tDrets d’accés : "
6454
6455-#: nis/nis_print.c:290
6456+#: nis/nis_print.c:289
6457 msgid "Linked Object Type : "
6458 msgstr "Tipus de l’objecte enllaçat : "
6459
6460-#: nis/nis_print.c:292
6461+#: nis/nis_print.c:291
6462 #, c-format
6463 msgid "Linked to : %s\n"
6464 msgstr "Enllaçat amb : %s\n"
6465
6466-#: nis/nis_print.c:302
6467+#: nis/nis_print.c:301
6468 #, c-format
6469 msgid "\tEntry data of type %s\n"
6470 msgstr "\tDades de l’entrada de tipus «%s»\n"
6471
6472-#: nis/nis_print.c:305
6473+#: nis/nis_print.c:304
6474 #, c-format
6475 msgid "\t[%u] - [%u bytes] "
6476 msgstr "\t[%u] — [%u octets] "
6477
6478-#: nis/nis_print.c:308
6479+#: nis/nis_print.c:307
6480 msgid "Encrypted data\n"
6481 msgstr "Dades xifrades\n"
6482
6483-#: nis/nis_print.c:310
6484+#: nis/nis_print.c:309
6485 msgid "Binary data\n"
6486 msgstr "Dades binàries\n"
6487
6488-#: nis/nis_print.c:326
6489+#: nis/nis_print.c:325
6490 #, c-format
6491 msgid "Object Name : %s\n"
6492 msgstr "Nom de l’objecte : %s\n"
6493
6494-#: nis/nis_print.c:327
6495+#: nis/nis_print.c:326
6496 #, c-format
6497 msgid "Directory : %s\n"
6498 msgstr "Directori : %s\n"
6499
6500-#: nis/nis_print.c:328
6501+#: nis/nis_print.c:327
6502 #, c-format
6503 msgid "Owner : %s\n"
6504 msgstr "Propietari : %s\n"
6505
6506-#: nis/nis_print.c:329
6507+#: nis/nis_print.c:328
6508 #, c-format
6509 msgid "Group : %s\n"
6510 msgstr "Grup : %s\n"
6511
6512-#: nis/nis_print.c:330
6513+#: nis/nis_print.c:329
6514 msgid "Access Rights : "
6515 msgstr "Drets d’accés : "
6516
6517-#: nis/nis_print.c:332
6518+#: nis/nis_print.c:331
6519 #, c-format
6520 msgid ""
6521 "\n"
6522@@ -3595,36 +3699,36 @@
6523 "\n"
6524 "Temps de vida : "
6525
6526-#: nis/nis_print.c:335
6527+#: nis/nis_print.c:334
6528 #, c-format
6529 msgid "Creation Time : %s"
6530 msgstr "Data de creació : %s"
6531
6532-#: nis/nis_print.c:337
6533+#: nis/nis_print.c:336
6534 #, c-format
6535 msgid "Mod. Time : %s"
6536 msgstr "Data modificació : %s"
6537
6538-#: nis/nis_print.c:338
6539+#: nis/nis_print.c:337
6540 msgid "Object Type : "
6541 msgstr "Tipus d’objecte : "
6542
6543-#: nis/nis_print.c:358
6544+#: nis/nis_print.c:357
6545 #, c-format
6546 msgid " Data Length = %u\n"
6547 msgstr " Longitud de les dades = %u\n"
6548
6549-#: nis/nis_print.c:372
6550+#: nis/nis_print.c:371
6551 #, c-format
6552 msgid "Status : %s\n"
6553 msgstr "Estat : %s\n"
6554
6555-#: nis/nis_print.c:373
6556+#: nis/nis_print.c:372
6557 #, c-format
6558 msgid "Number of objects : %u\n"
6559 msgstr "Nombre d’objectes : %u\n"
6560
6561-#: nis/nis_print.c:377
6562+#: nis/nis_print.c:376
6563 #, c-format
6564 msgid "Object #%d:\n"
6565 msgstr "Objecte #%d:\n"
6566@@ -3682,279 +3786,287 @@
6567 msgid " No recursive nonmembers\n"
6568 msgstr " No hi ha no‐membres recursius.\n"
6569
6570-#: nis/nss_nisplus/nisplus-publickey.c:101
6571-#: nis/nss_nisplus/nisplus-publickey.c:183
6572+#: nis/nss_nisplus/nisplus-publickey.c:100
6573+#: nis/nss_nisplus/nisplus-publickey.c:182
6574 #, c-format
6575 msgid "DES entry for netname %s not unique\n"
6576 msgstr "l’entrada DES per al nom de xarxa «%s» no és única\n"
6577
6578-#: nis/nss_nisplus/nisplus-publickey.c:220
6579+#: nis/nss_nisplus/nisplus-publickey.c:219
6580 #, c-format
6581 msgid "netname2user: missing group id list in `%s'"
6582 msgstr "netname2user: manca la llista d’identificadors de grup a «%s»."
6583
6584-#: nis/nss_nisplus/nisplus-publickey.c:302
6585-#: nis/nss_nisplus/nisplus-publickey.c:308
6586-#: nis/nss_nisplus/nisplus-publickey.c:373
6587-#: nis/nss_nisplus/nisplus-publickey.c:382
6588+#: nis/nss_nisplus/nisplus-publickey.c:301
6589+#: nis/nss_nisplus/nisplus-publickey.c:307
6590+#: nis/nss_nisplus/nisplus-publickey.c:372
6591+#: nis/nss_nisplus/nisplus-publickey.c:381
6592 #, c-format
6593 msgid "netname2user: (nis+ lookup): %s\n"
6594 msgstr "netname2user: (cerca nis+): %s\n"
6595
6596-#: nis/nss_nisplus/nisplus-publickey.c:321
6597+#: nis/nss_nisplus/nisplus-publickey.c:320
6598 #, c-format
6599 msgid "netname2user: DES entry for %s in directory %s not unique"
6600 msgstr "netname2user: l’entrada DES de «%s» al directori «%s» no és única"
6601
6602-#: nis/nss_nisplus/nisplus-publickey.c:339
6603+#: nis/nss_nisplus/nisplus-publickey.c:338
6604 #, c-format
6605 msgid "netname2user: principal name `%s' too long"
6606 msgstr "netname2user: el nom principal «%s» és massa llarg"
6607
6608-#: nis/nss_nisplus/nisplus-publickey.c:395
6609+#: nis/nss_nisplus/nisplus-publickey.c:394
6610 #, c-format
6611 msgid "netname2user: LOCAL entry for %s in directory %s not unique"
6612 msgstr "netname2user: l’entrada LOCAL de «%s» al directori «%s» no és única"
6613
6614-#: nis/nss_nisplus/nisplus-publickey.c:402
6615+#: nis/nss_nisplus/nisplus-publickey.c:401
6616 msgid "netname2user: should not have uid 0"
6617 msgstr "netname2user: no ha de tenir l’UID 0"
6618
6619-#: nis/ypclnt.c:836
6620+#: nis/ypclnt.c:835
6621 msgid "Request arguments bad"
6622 msgstr "Els arguments de la petició són incorrectes"
6623
6624-#: nis/ypclnt.c:839
6625+#: nis/ypclnt.c:838
6626 msgid "RPC failure on NIS operation"
6627 msgstr "El procediment RPC ha fallat en una operació NIS"
6628
6629-#: nis/ypclnt.c:842
6630+#: nis/ypclnt.c:841
6631 msgid "Can't bind to server which serves this domain"
6632 msgstr "No s’ha pogut enllaçar amb el servidor d’aquest domini"
6633
6634-#: nis/ypclnt.c:845
6635+#: nis/ypclnt.c:844
6636 msgid "No such map in server's domain"
6637 msgstr "El mapa no és al domini del servidor"
6638
6639-#: nis/ypclnt.c:848
6640+#: nis/ypclnt.c:847
6641 msgid "No such key in map"
6642 msgstr "La clau no és al mapa"
6643
6644-#: nis/ypclnt.c:851
6645+#: nis/ypclnt.c:850
6646 msgid "Internal NIS error"
6647 msgstr "Error intern de NIS"
6648
6649-#: nis/ypclnt.c:854
6650+#: nis/ypclnt.c:853
6651 msgid "Local resource allocation failure"
6652 msgstr "No s’ha pogut assignar un recurs local"
6653
6654-#: nis/ypclnt.c:857
6655+#: nis/ypclnt.c:856
6656 msgid "No more records in map database"
6657 msgstr "No hi ha més registres a la base de dades del mapa"
6658
6659-#: nis/ypclnt.c:860
6660+#: nis/ypclnt.c:859
6661 msgid "Can't communicate with portmapper"
6662 msgstr "No s’ha pogut comunicar amb el mapador de ports"
6663
6664-#: nis/ypclnt.c:863
6665+#: nis/ypclnt.c:862
6666 msgid "Can't communicate with ypbind"
6667 msgstr "No s’ha pogut comunicar amb «ypbind»"
6668
6669-#: nis/ypclnt.c:866
6670+#: nis/ypclnt.c:865
6671 msgid "Can't communicate with ypserv"
6672 msgstr "No s’ha pogut comunicar amb «ypserv»"
6673
6674-#: nis/ypclnt.c:869
6675+#: nis/ypclnt.c:868
6676 msgid "Local domain name not set"
6677 msgstr "No s’ha establert nom del domini local"
6678
6679-#: nis/ypclnt.c:872
6680+#: nis/ypclnt.c:871
6681 msgid "NIS map database is bad"
6682 msgstr "La base de dades de mapes NIS és feta malbé"
6683
6684-#: nis/ypclnt.c:875
6685+#: nis/ypclnt.c:874
6686 msgid "NIS client/server version mismatch - can't supply service"
6687 msgstr "Les versions de client i servidor NIS difereixen; no es pot donar servei"
6688
6689-#: nis/ypclnt.c:881
6690+#: nis/ypclnt.c:880
6691 msgid "Database is busy"
6692 msgstr "La base de dades es troba ocupada"
6693
6694-#: nis/ypclnt.c:884
6695+#: nis/ypclnt.c:883
6696 msgid "Unknown NIS error code"
6697 msgstr "Codi d’error desconegut de NIS"
6698
6699-#: nis/ypclnt.c:924
6700+#: nis/ypclnt.c:923
6701 msgid "Internal ypbind error"
6702 msgstr "Error intern d’«ypbind»"
6703
6704-#: nis/ypclnt.c:927
6705+#: nis/ypclnt.c:926
6706 msgid "Domain not bound"
6707 msgstr "El domini no és vinculat"
6708
6709-#: nis/ypclnt.c:930
6710+#: nis/ypclnt.c:929
6711 msgid "System resource allocation failure"
6712 msgstr "No s’han pogut assignar recursos del sistema"
6713
6714-#: nis/ypclnt.c:933
6715+#: nis/ypclnt.c:932
6716 msgid "Unknown ypbind error"
6717 msgstr "Error desconegut d’«ypbind»"
6718
6719-#: nis/ypclnt.c:974
6720+#: nis/ypclnt.c:973
6721 msgid "yp_update: cannot convert host to netname\n"
6722 msgstr "yp_update: no s’ha pogut convertir el nom d’estació a nom de xarxa\n"
6723
6724-#: nis/ypclnt.c:992
6725+#: nis/ypclnt.c:991
6726 msgid "yp_update: cannot get server address\n"
6727 msgstr "yp_update: no s’ha pogut obtenir l’adreça del servidor\n"
6728
6729 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
6730-#: nscd/aicache.c:83 nscd/hstcache.c:492
6731+#: nscd/aicache.c:82 nscd/hstcache.c:493
6732 #, c-format
6733 msgid "Haven't found \"%s\" in hosts cache!"
6734 msgstr "no s’ha trobat «%s» a la memòria cau de «hosts»"
6735
6736 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
6737-#: nscd/aicache.c:85 nscd/hstcache.c:494
6738+#: nscd/aicache.c:84 nscd/hstcache.c:495
6739 #, c-format
6740 msgid "Reloading \"%s\" in hosts cache!"
6741 msgstr "es torna a carregar «%s» a la memòria cau de «hosts»"
6742
6743 # La 2a. és de l’estil de «GETPWBYNAME», la 3a. com «passwd». ivb
6744 # Al darrere pot anar « (first)» o no. ivb
6745-#: nscd/cache.c:150
6746+#: nscd/cache.c:151
6747 #, c-format
6748 msgid "add new entry \"%s\" of type %s for %s to cache%s"
6749 msgstr "s’afegeix una nova entrada «%s» de tipus %s a la memòria cau de «%s»%s"
6750
6751 # FIXME: language-dependent construct ivb
6752 # Supose que vol dir «abans». ivb
6753-#: nscd/cache.c:152
6754+#: nscd/cache.c:153
6755 msgid " (first)"
6756 msgstr " (primer)"
6757
6758-#: nscd/cache.c:276 nscd/connections.c:861
6759+#: nscd/cache.c:285 nscd/connections.c:1002
6760 #, c-format
6761 msgid "cannot stat() file `%s': %s"
6762 msgstr "ha fallat stat() sobre el fitxer «%s»: %s"
6763
6764-#: nscd/cache.c:318
6765+#: nscd/cache.c:331
6766 #, c-format
6767 msgid "pruning %s cache; time %ld"
6768 msgstr "neteja de la memòria cau de «%s», hora %ld"
6769
6770 # La 2a. és de l’estil de «GETPWBYNAME». ivb
6771-#: nscd/cache.c:347
6772+#: nscd/cache.c:360
6773 #, c-format
6774 msgid "considering %s entry \"%s\", timeout %<PRIu64>"
6775 msgstr "es considera l’entrada %s «%s», expiració %<PRIu64>"
6776
6777-#: nscd/connections.c:565
6778+#: nscd/connections.c:570
6779 #, c-format
6780 msgid "invalid persistent database file \"%s\": %s"
6781 msgstr "el fitxer de base de dades persistent «%s» no és vàlid: %s"
6782
6783-#: nscd/connections.c:573
6784+#: nscd/connections.c:578
6785 msgid "uninitialized header"
6786 msgstr "la capçalera no es troba iniciada"
6787
6788-#: nscd/connections.c:578
6789+#: nscd/connections.c:583
6790 msgid "header size does not match"
6791 msgstr "la mida de la capçalera no concorda"
6792
6793-#: nscd/connections.c:588
6794+#: nscd/connections.c:593
6795 msgid "file size does not match"
6796 msgstr "la mida del fitxer no concorda"
6797
6798-#: nscd/connections.c:605
6799+#: nscd/connections.c:610
6800 msgid "verification failed"
6801 msgstr "la verificació ha fallat"
6802
6803-#: nscd/connections.c:619
6804+#: nscd/connections.c:624
6805 #, c-format
6806 msgid "suggested size of table for database %s larger than the persistent database's table"
6807 msgstr "la mida de taula suggerida per a la base de dades «%s» és major que la de la base de dades persistent"
6808
6809-#: nscd/connections.c:630 nscd/connections.c:715
6810+#: nscd/connections.c:635 nscd/connections.c:720
6811 #, c-format
6812 msgid "cannot create read-only descriptor for \"%s\"; no mmap"
6813 msgstr "no s’ha pogut crear un descriptor de només lectura per a «%s»; no s’emprarà mmap()"
6814
6815-#: nscd/connections.c:646
6816+#: nscd/connections.c:651
6817 #, c-format
6818 msgid "cannot access '%s'"
6819 msgstr "no s’ha pogut accedir a «%s»"
6820
6821-#: nscd/connections.c:694
6822+#: nscd/connections.c:699
6823 #, c-format
6824 msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
6825 msgstr "la base de dades de «%s» està corrupta o sent emprada concurrentment; elimineu «%s» manualment si cal i reinicieu"
6826
6827-#: nscd/connections.c:701
6828+#: nscd/connections.c:706
6829 #, c-format
6830 msgid "cannot create %s; no persistent database used"
6831 msgstr "no s’ha pogut crear «%s»; no s’emprarà una base de dades persistent"
6832
6833-#: nscd/connections.c:704
6834+#: nscd/connections.c:709
6835 #, c-format
6836 msgid "cannot create %s; no sharing possible"
6837 msgstr "no s’ha pogut crear «%s»; no es podrà compartir"
6838
6839-#: nscd/connections.c:775
6840+#: nscd/connections.c:780
6841 #, c-format
6842 msgid "cannot write to database file %s: %s"
6843 msgstr "no s’ha pogut escriure al fitxer de base de dades «%s»: %s"
6844
6845-#: nscd/connections.c:814
6846+#: nscd/connections.c:819
6847 #, c-format
6848 msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
6849 msgstr "no s’ha pogut indicar que el connector es tanque en fer exec(): %s; s’inhabilita el mode paranoic"
6850
6851-#: nscd/connections.c:897
6852+#: nscd/connections.c:868
6853 #, c-format
6854 msgid "cannot open socket: %s"
6855 msgstr "no s’ha pogut obrir el connector: %s"
6856
6857-#: nscd/connections.c:917
6858+#: nscd/connections.c:888 nscd/connections.c:952
6859 #, c-format
6860 msgid "cannot change socket to nonblocking mode: %s"
6861 msgstr "no s’ha pogut canviar el connector al mode no blocador: %s"
6862
6863-#: nscd/connections.c:925
6864+#: nscd/connections.c:896 nscd/connections.c:962
6865 #, c-format
6866 msgid "cannot set socket to close on exec: %s"
6867 msgstr "no s’ha pogut indicar que el connector es tanque en fer exec(): %s"
6868
6869-#: nscd/connections.c:938
6870+#: nscd/connections.c:909
6871 #, c-format
6872 msgid "cannot enable socket to accept connections: %s"
6873 msgstr "no s’ha pogut habilitar el connector per a acceptar connexions: %s"
6874
6875-#: nscd/connections.c:1039
6876+# Cap usa quote(). ivb
6877+# Missatge de depuració. ivb
6878+# Allò traçat és el fitxer, segons el codi. ivb
6879+#: nscd/connections.c:986
6880 #, c-format
6881+msgid "register trace file %s for database %s"
6882+msgstr "es registra el fitxer traçat «%s» per a la base de dades «%s»"
6883+
6884+#: nscd/connections.c:1116
6885+#, c-format
6886 msgid "provide access to FD %d, for %s"
6887 msgstr "es proporciona accés al descriptor de fitxer %d, per a «%s»"
6888
6889-#: nscd/connections.c:1051
6890+#: nscd/connections.c:1128
6891 #, c-format
6892 msgid "cannot handle old request version %d; current version is %d"
6893 msgstr "no s’ha pogut atendre la petició amb versió antiga %d; la versió actual és %d"
6894
6895-#: nscd/connections.c:1073
6896+#: nscd/connections.c:1150
6897 #, c-format
6898 msgid "request from %ld not handled due to missing permission"
6899 msgstr "no s’atén la petició de %ld per manca de permissos"
6900
6901-#: nscd/connections.c:1078
6902+#: nscd/connections.c:1155
6903 #, c-format
6904 msgid "request from '%s' [%ld] not handled due to missing permission"
6905 msgstr "no s’atén la petició de «%s» (%ld) per manca de permissos"
6906
6907-#: nscd/connections.c:1083
6908+#: nscd/connections.c:1160
6909 msgid "request not handled due to missing permission"
6910 msgstr "no s’atén la petició per manca de permissos"
6911
6912-#: nscd/connections.c:1121 nscd/connections.c:1174
6913+#: nscd/connections.c:1198 nscd/connections.c:1251
6914 #, c-format
6915 msgid "cannot write result: %s"
6916 msgstr "no s’ha pogut escriure el resultat: %s"
6917@@ -3964,245 +4076,273 @@
6918 # ivb dimoni «nscd» per consultar la memòria cau o invalidar-la. Per
6919 # ivb això faig servir «programa de control» (com «ndc» amb «named» o
6920 # ivb «chronyc» amb «chronyd»).
6921-#: nscd/connections.c:1257
6922+#: nscd/connections.c:1342
6923 #, c-format
6924 msgid "error getting caller's id: %s"
6925 msgstr "error en obtenir l’identificador del programa de control: %s"
6926
6927-#: nscd/connections.c:1316
6928+#: nscd/connections.c:1402
6929 #, c-format
6930 msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
6931 msgstr "no s’ha pogut obrir «/proc/self/cmdline»: %s; s’inhabilita el mode paranoic"
6932
6933-#: nscd/connections.c:1330
6934+#: nscd/connections.c:1416
6935 #, c-format
6936 msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
6937 msgstr "no s’ha pogut llegir «/proc/self/cmdline»: %s; s’inhabilita el mode paranoic"
6938
6939-#: nscd/connections.c:1370
6940+#: nscd/connections.c:1456
6941 #, c-format
6942 msgid "cannot change to old UID: %s; disabling paranoia mode"
6943 msgstr "no s’ha pogut tornar a l’UID vell: %s; s’inhabilita el mode paranoic"
6944
6945-#: nscd/connections.c:1380
6946+#: nscd/connections.c:1466
6947 #, c-format
6948 msgid "cannot change to old GID: %s; disabling paranoia mode"
6949 msgstr "no s’ha pogut tornar al GID vell: %s; s’inhabilita el mode paranoic"
6950
6951-#: nscd/connections.c:1393
6952+#: nscd/connections.c:1479
6953 #, c-format
6954 msgid "cannot change to old working directory: %s; disabling paranoia mode"
6955 msgstr "no s’ha pogut tornar al directori vell de treball: %s; s’inhabilita el mode paranoic"
6956
6957-#: nscd/connections.c:1439
6958+#: nscd/connections.c:1525
6959 #, c-format
6960 msgid "re-exec failed: %s; disabling paranoia mode"
6961 msgstr "ha fallat la reexecució: %s; s’inhabilita el mode paranoic"
6962
6963-#: nscd/connections.c:1448
6964+#: nscd/connections.c:1534
6965 #, c-format
6966 msgid "cannot change current working directory to \"/\": %s"
6967 msgstr "no s’ha pogut canviar el directori de treball a «/»: %s"
6968
6969-#: nscd/connections.c:1641
6970+#: nscd/connections.c:1727
6971 #, c-format
6972 msgid "short read while reading request: %s"
6973 msgstr "lectura incompleta en llegir la petició: %s"
6974
6975-#: nscd/connections.c:1674
6976+#: nscd/connections.c:1760
6977 #, c-format
6978 msgid "key length in request too long: %d"
6979 msgstr "la longitud de la clau de la petició és massa gran: %d"
6980
6981-#: nscd/connections.c:1687
6982+#: nscd/connections.c:1773
6983 #, c-format
6984 msgid "short read while reading request key: %s"
6985 msgstr "lectura incompleta en llegir la clau de la petició: %s"
6986
6987-#: nscd/connections.c:1696
6988+#: nscd/connections.c:1782
6989 #, c-format
6990 msgid "handle_request: request received (Version = %d) from PID %ld"
6991 msgstr "handle_request: s’ha rebut una petició (amb versió %d) del PID %ld"
6992
6993-#: nscd/connections.c:1701
6994+#: nscd/connections.c:1787
6995 #, c-format
6996 msgid "handle_request: request received (Version = %d)"
6997 msgstr "handle_request: s’ha rebut una petició (amb versió %d)"
6998
6999-#: nscd/connections.c:1901 nscd/connections.c:2099
7000+#: nscd/connections.c:1999 nscd/connections.c:2227
7001 #, c-format
7002 msgid "disabled inotify after read error %d"
7003 msgstr "s’inhabilita «inotify» per l’error de lectura amb codi %d"
7004
7005-#: nscd/connections.c:2228
7006+#: nscd/connections.c:2374
7007 msgid "could not initialize conditional variable"
7008 msgstr "no s’ha pogut iniciar la variable condicional"
7009
7010-#: nscd/connections.c:2236
7011+#: nscd/connections.c:2382
7012 msgid "could not start clean-up thread; terminating"
7013 msgstr "no s’ha pogut iniciar el fil d’execució de neteja; s’està finalitzant"
7014
7015-#: nscd/connections.c:2250
7016+#: nscd/connections.c:2396
7017 msgid "could not start any worker thread; terminating"
7018 msgstr "no s’ha pogut iniciar cap fil d’execució treballador; s’està finalitzant"
7019
7020-#: nscd/connections.c:2301 nscd/connections.c:2302 nscd/connections.c:2319
7021-#: nscd/connections.c:2328 nscd/connections.c:2346 nscd/connections.c:2357
7022-#: nscd/connections.c:2368
7023+#: nscd/connections.c:2447 nscd/connections.c:2448 nscd/connections.c:2465
7024+#: nscd/connections.c:2474 nscd/connections.c:2492 nscd/connections.c:2503
7025+#: nscd/connections.c:2514
7026 #, c-format
7027 msgid "Failed to run nscd as user '%s'"
7028 msgstr "no s’ha pogut executar «nscd» com a l’usuari «%s»"
7029
7030-#: nscd/connections.c:2320
7031+#: nscd/connections.c:2466
7032 #, c-format
7033 msgid "initial getgrouplist failed"
7034 msgstr "ha fallat getgrouplist() inicial"
7035
7036-#: nscd/connections.c:2329
7037+#: nscd/connections.c:2475
7038 #, c-format
7039 msgid "getgrouplist failed"
7040 msgstr "ha fallat getgrouplist()"
7041
7042-#: nscd/connections.c:2347
7043+#: nscd/connections.c:2493
7044 #, c-format
7045 msgid "setgroups failed"
7046 msgstr "ha fallat setgroups()"
7047
7048-#: nscd/grpcache.c:383 nscd/hstcache.c:439 nscd/initgrcache.c:406
7049-#: nscd/pwdcache.c:378 nscd/servicescache.c:332
7050+#: nscd/grpcache.c:407 nscd/hstcache.c:440 nscd/initgrcache.c:411
7051+#: nscd/pwdcache.c:383 nscd/servicescache.c:338
7052 #, c-format
7053 msgid "short write in %s: %s"
7054 msgstr "escriptura incompleta a «%s»: %s"
7055
7056 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7057-#: nscd/grpcache.c:428 nscd/initgrcache.c:78
7058+#: nscd/grpcache.c:452 nscd/initgrcache.c:77
7059 #, c-format
7060 msgid "Haven't found \"%s\" in group cache!"
7061 msgstr "no s’ha trobat «%s» a la memòria cau de «group»"
7062
7063 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7064-#: nscd/grpcache.c:430 nscd/initgrcache.c:80
7065+#: nscd/grpcache.c:454 nscd/initgrcache.c:79
7066 #, c-format
7067 msgid "Reloading \"%s\" in group cache!"
7068 msgstr "es torna a carregar «%s» a la memòria cau de «group»"
7069
7070-#: nscd/grpcache.c:509
7071+#: nscd/grpcache.c:533
7072 #, c-format
7073 msgid "Invalid numeric gid \"%s\"!"
7074 msgstr "«%s» no és un identificador numèric de grup vàlid"
7075
7076-#: nscd/mem.c:431
7077+#: nscd/mem.c:425
7078 #, c-format
7079 msgid "freed %zu bytes in %s cache"
7080 msgstr "s’han alliberat %zu octets de la memòria cau de «%s»"
7081
7082-#: nscd/mem.c:574
7083+#: nscd/mem.c:568
7084 #, c-format
7085 msgid "no more memory for database '%s'"
7086 msgstr "no resta memòria per a la base de dades «%s»"
7087
7088+# El nom de la base de dades s’usa més a sovint que la descripció. ivb
7089+#: nscd/netgroupcache.c:77
7090+#, c-format
7091+msgid "Haven't found \"%s\" in netgroup cache!"
7092+msgstr "no s’ha trobat «%s» a la memòria cau de «netgroup»"
7093+
7094+# El nom de la base de dades s’usa més a sovint que la descripció. ivb
7095+#: nscd/netgroupcache.c:79
7096+#, c-format
7097+msgid "Reloading \"%s\" in netgroup cache!"
7098+msgstr "es torna a carregar «%s» a la memòria cau de «netgroup»"
7099+
7100+# El nom de la base de dades s’usa més a sovint que la descripció. ivb
7101+#: nscd/netgroupcache.c:467
7102+#, c-format
7103+msgid "Haven't found \"%s (%s,%s,%s)\" in netgroup cache!"
7104+msgstr "no s’ha trobat «%s (%s,%s,%s)» a la memòria cau de «netgroup»"
7105+
7106+# El nom de la base de dades s’usa més a sovint que la descripció. ivb
7107+#: nscd/netgroupcache.c:470
7108+#, c-format
7109+msgid "Reloading \"%s (%s,%s,%s)\" in netgroup cache!"
7110+msgstr "es torna a carregar «%s (%s,%s,%s)» a la memòria cau de «netgroup»"
7111+
7112 # Més ajudes. ivb
7113-#: nscd/nscd.c:101
7114+#: nscd/nscd.c:116
7115 msgid "Read configuration data from NAME"
7116 msgstr "Llegeix les dades de configuració de NOM."
7117
7118-#: nscd/nscd.c:103
7119+#: nscd/nscd.c:118
7120 msgid "Do not fork and display messages on the current tty"
7121 msgstr "No fa fork() i mostra els missatges al terminal actual."
7122
7123+#: nscd/nscd.c:120
7124+msgid "Do not fork, but otherwise behave like a daemon"
7125+msgstr "No fa fork() però continua comportant‐se com un dimoni."
7126+
7127 # ivb (2001/10/30)
7128 # ivb Es refereix al _nombre_ de fils a llançar.
7129-#: nscd/nscd.c:104
7130+#: nscd/nscd.c:121
7131 msgid "NUMBER"
7132 msgstr "NOMBRE"
7133
7134-#: nscd/nscd.c:104
7135+#: nscd/nscd.c:121
7136 msgid "Start NUMBER threads"
7137 msgstr "Llança NOMBRE fils d’exeució."
7138
7139-#: nscd/nscd.c:105
7140+#: nscd/nscd.c:122
7141 msgid "Shut the server down"
7142 msgstr "Finalitza el servidor."
7143
7144-#: nscd/nscd.c:106
7145+#: nscd/nscd.c:123
7146 msgid "Print current configuration statistics"
7147 msgstr "Mostra estadístiques de la configuració actual."
7148
7149-#: nscd/nscd.c:107
7150+#: nscd/nscd.c:124
7151 msgid "TABLE"
7152 msgstr "TAULA"
7153
7154-#: nscd/nscd.c:108
7155+#: nscd/nscd.c:125
7156 msgid "Invalidate the specified cache"
7157 msgstr "Invalida la memòria cau especificada."
7158
7159-#: nscd/nscd.c:109
7160+#: nscd/nscd.c:126
7161 msgid "TABLE,yes"
7162 msgstr "TAULA,yes"
7163
7164-#: nscd/nscd.c:110
7165+#: nscd/nscd.c:127
7166 msgid "Use separate cache for each user"
7167 msgstr "Empra una memòria cau diferent per a cada usuari."
7168
7169-#: nscd/nscd.c:115
7170+#: nscd/nscd.c:132
7171 msgid "Name Service Cache Daemon."
7172 msgstr "Dimoni de memòria cau del servei de noms."
7173
7174-#: nscd/nscd.c:147 nss/getent.c:952 nss/makedb.c:123
7175+#: nscd/nscd.c:164 nss/getent.c:999 nss/makedb.c:208
7176 #, c-format
7177 msgid "wrong number of arguments"
7178 msgstr "el nombre d’arguments és incorrecte"
7179
7180-#: nscd/nscd.c:157
7181+#: nscd/nscd.c:174
7182 #, c-format
7183 msgid "failure while reading configuration file; this is fatal"
7184 msgstr "error en llegir el fitxer de configuració; açò és fatal"
7185
7186-#: nscd/nscd.c:166
7187+#: nscd/nscd.c:183
7188 #, c-format
7189 msgid "already running"
7190 msgstr "ja es troba en marxa"
7191
7192-#: nscd/nscd.c:181 nscd/nscd.c:236
7193+#: nscd/nscd.c:201 nscd/nscd.c:259
7194 #, c-format
7195 msgid "cannot fork"
7196 msgstr "ha fallat fork()"
7197
7198-#: nscd/nscd.c:244
7199+#: nscd/nscd.c:268
7200 #, c-format
7201 msgid "cannot change current working directory to \"/\""
7202 msgstr "no s’ha pogut canviar el directori de treball a «/»"
7203
7204-#: nscd/nscd.c:252
7205+#: nscd/nscd.c:276
7206 msgid "Could not create log file"
7207 msgstr "no s’ha pogut crear el fitxer de registre"
7208
7209-#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:174
7210+#: nscd/nscd.c:348 nscd/nscd.c:373 nscd/nscd_stat.c:173
7211 #, c-format
7212 msgid "Only root is allowed to use this option!"
7213 msgstr "només root pot emprar aquesta opció"
7214
7215-#: nscd/nscd.c:345
7216+#: nscd/nscd.c:388
7217 #, c-format
7218 msgid "'%s' is not a known database"
7219 msgstr "«%s» no és una base de dades coneguda"
7220
7221-#: nscd/nscd.c:370 nscd/nscd_stat.c:193
7222+#: nscd/nscd.c:413 nscd/nscd_stat.c:192
7223 #, c-format
7224 msgid "write incomplete"
7225 msgstr "escriptura incompleta"
7226
7227-#: nscd/nscd.c:381
7228+#: nscd/nscd.c:424
7229 #, c-format
7230 msgid "cannot read invalidate ACK"
7231 msgstr "no s’ha pogut llegir l’ACK d’invalidació"
7232
7233-#: nscd/nscd.c:387
7234+#: nscd/nscd.c:430
7235 #, c-format
7236 msgid "invalidation failed"
7237 msgstr "la invalidació ha fallat"
7238
7239-#: nscd/nscd.c:397
7240+#: nscd/nscd.c:440
7241 #, c-format
7242 msgid "secure services not implemented anymore"
7243 msgstr "ja no s’implementen els serveis segurs"
7244@@ -4227,60 +4367,55 @@
7245 msgid "Must specify user name for stat-user option"
7246 msgstr "cal especificar un nom d’usuari per a l’opció «stat-user»"
7247
7248-#: nscd/nscd_conf.c:245
7249+#: nscd/nscd_conf.c:258
7250 #, c-format
7251-msgid "invalid value for 'reload-count': %u"
7252-msgstr "el valor de «reload-count» no és vàlid: %u"
7253-
7254-#: nscd/nscd_conf.c:260
7255-#, c-format
7256 msgid "Must specify value for restart-interval option"
7257 msgstr "cal especificar un valor per a l’opció «restart-interval»"
7258
7259-#: nscd/nscd_conf.c:274
7260+#: nscd/nscd_conf.c:272
7261 #, c-format
7262 msgid "Unknown option: %s %s %s"
7263 msgstr "l’opció no és coneguda: %s %s %s"
7264
7265-#: nscd/nscd_conf.c:287
7266+#: nscd/nscd_conf.c:285
7267 #, c-format
7268 msgid "cannot get current working directory: %s; disabling paranoia mode"
7269 msgstr "no s’ha pogut obtenir el directori de treball actual: %s; s’inhabilita el mode paranoic"
7270
7271-#: nscd/nscd_conf.c:307
7272+#: nscd/nscd_conf.c:305
7273 #, c-format
7274 msgid "maximum file size for %s database too small"
7275 msgstr "la mida màxima de fitxer per a la base de dades «%s» és massa menuda"
7276
7277-#: nscd/nscd_stat.c:143
7278+#: nscd/nscd_stat.c:142
7279 #, c-format
7280 msgid "cannot write statistics: %s"
7281 msgstr "no s’han pogut escriure les estadístiques: %s"
7282
7283-#: nscd/nscd_stat.c:158
7284+#: nscd/nscd_stat.c:157
7285 msgid "yes"
7286 msgstr "sí"
7287
7288-#: nscd/nscd_stat.c:159
7289+#: nscd/nscd_stat.c:158
7290 msgid "no"
7291 msgstr "no"
7292
7293-#: nscd/nscd_stat.c:170
7294+#: nscd/nscd_stat.c:169
7295 #, c-format
7296 msgid "Only root or %s is allowed to use this option!"
7297 msgstr "només root o %s pot emprar aquesta opció"
7298
7299-#: nscd/nscd_stat.c:181
7300+#: nscd/nscd_stat.c:180
7301 #, c-format
7302 msgid "nscd not running!\n"
7303 msgstr "nscd no està en marxa\n"
7304
7305-#: nscd/nscd_stat.c:205
7306+#: nscd/nscd_stat.c:204
7307 #, c-format
7308 msgid "cannot read statistics data"
7309 msgstr "no s’han pogut llegir les dades estadístiques"
7310
7311-#: nscd/nscd_stat.c:208
7312+#: nscd/nscd_stat.c:207
7313 #, c-format
7314 msgid ""
7315 "nscd configuration:\n"
7316@@ -4291,28 +4426,28 @@
7317 "\n"
7318 "%15d nivell de depuració del servidor\n"
7319
7320-#: nscd/nscd_stat.c:232
7321+#: nscd/nscd_stat.c:231
7322 #, c-format
7323 msgid "%3ud %2uh %2um %2lus server runtime\n"
7324 msgstr "%3ud %2uh %2um %2lus de funcionament del servidor\n"
7325
7326-#: nscd/nscd_stat.c:235
7327+#: nscd/nscd_stat.c:234
7328 #, c-format
7329 msgid " %2uh %2um %2lus server runtime\n"
7330 msgstr " %2uh %2um %2lus de funcionament del servidor\n"
7331
7332-#: nscd/nscd_stat.c:237
7333+#: nscd/nscd_stat.c:236
7334 #, c-format
7335 msgid " %2um %2lus server runtime\n"
7336 msgstr " %2um %2lus de funcionament del servidor\n"
7337
7338-#: nscd/nscd_stat.c:239
7339+#: nscd/nscd_stat.c:238
7340 #, c-format
7341 msgid " %2lus server runtime\n"
7342 msgstr " %2lus de funcionament del servidor\n"
7343
7344 # FIXME: interval, not internal. ivb
7345-#: nscd/nscd_stat.c:241
7346+#: nscd/nscd_stat.c:240
7347 #, c-format
7348 msgid ""
7349 "%15d current number of threads\n"
7350@@ -4330,7 +4465,7 @@
7351 "%15u nombre de recàrregues\n"
7352
7353 # El primer camp és passwd, group, shadow... ivb
7354-#: nscd/nscd_stat.c:276
7355+#: nscd/nscd_stat.c:275
7356 #, c-format
7357 msgid ""
7358 "\n"
7359@@ -4382,98 +4517,98 @@
7360 "%15s comprovar «/etc/%s» per si hi ha hagut canvis?\n"
7361
7362 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7363-#: nscd/pwdcache.c:423
7364+#: nscd/pwdcache.c:428
7365 #, c-format
7366 msgid "Haven't found \"%s\" in password cache!"
7367 msgstr "no s’ha trobat «%s» a la memòria cau de «passwd»"
7368
7369 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7370-#: nscd/pwdcache.c:425
7371+#: nscd/pwdcache.c:430
7372 #, c-format
7373 msgid "Reloading \"%s\" in password cache!"
7374 msgstr "es torna a carregar «%s» a la memòria cau de «passwd»"
7375
7376-#: nscd/pwdcache.c:506
7377+#: nscd/pwdcache.c:511
7378 #, c-format
7379 msgid "Invalid numeric uid \"%s\"!"
7380 msgstr "«%s» no és un identificador numèric d’usuari vàlid"
7381
7382-#: nscd/selinux.c:156
7383+#: nscd/selinux.c:160
7384 #, c-format
7385 msgid "Failed opening connection to the audit subsystem: %m"
7386 msgstr "no s’ha pogut obrir una connexió amb el sub‐sistema d’auditoria: %m"
7387
7388-#: nscd/selinux.c:177
7389+#: nscd/selinux.c:181
7390 msgid "Failed to set keep-capabilities"
7391 msgstr "no s’han pogut establir les capacitats a mantenir"
7392
7393-#: nscd/selinux.c:178 nscd/selinux.c:241
7394+#: nscd/selinux.c:182 nscd/selinux.c:245
7395 #, c-format
7396 msgid "prctl(KEEPCAPS) failed"
7397 msgstr "ha fallat prctl(KEEPCAPS)"
7398
7399-#: nscd/selinux.c:192
7400+#: nscd/selinux.c:196
7401 msgid "Failed to initialize drop of capabilities"
7402 msgstr "no s’ha pogut començar a renunciar a capacitats"
7403
7404-#: nscd/selinux.c:193
7405+#: nscd/selinux.c:197
7406 #, c-format
7407 msgid "cap_init failed"
7408 msgstr "ha fallat cap_init()"
7409
7410-#: nscd/selinux.c:214 nscd/selinux.c:231
7411+#: nscd/selinux.c:218 nscd/selinux.c:235
7412 msgid "Failed to drop capabilities"
7413 msgstr "no s’ha pogunt renunciar a les capacitats"
7414
7415-#: nscd/selinux.c:215 nscd/selinux.c:232
7416+#: nscd/selinux.c:219 nscd/selinux.c:236
7417 #, c-format
7418 msgid "cap_set_proc failed"
7419 msgstr "ha fallat cap_set_proc()"
7420
7421-#: nscd/selinux.c:240
7422+#: nscd/selinux.c:244
7423 msgid "Failed to unset keep-capabilities"
7424 msgstr "no s’han pogut desestablir les capacitats a mantenir"
7425
7426-#: nscd/selinux.c:256
7427+#: nscd/selinux.c:260
7428 msgid "Failed to determine if kernel supports SELinux"
7429 msgstr "no s’ha pogut determinar si el nucli accepta SELinux"
7430
7431-#: nscd/selinux.c:271
7432+#: nscd/selinux.c:275
7433 #, c-format
7434 msgid "Failed to start AVC thread"
7435 msgstr "no s’ha pogut iniciar el fil d’execució de l’AVC"
7436
7437-#: nscd/selinux.c:293
7438+#: nscd/selinux.c:297
7439 #, c-format
7440 msgid "Failed to create AVC lock"
7441 msgstr "no s’ha pogut crear el blocatge de l’AVC"
7442
7443-#: nscd/selinux.c:333
7444+#: nscd/selinux.c:337
7445 #, c-format
7446 msgid "Failed to start AVC"
7447 msgstr "no s’ha pogut iniciar l’AVC"
7448
7449-#: nscd/selinux.c:335
7450+#: nscd/selinux.c:339
7451 msgid "Access Vector Cache (AVC) started"
7452 msgstr "s’ha iniciat la memòria cau de vectors d’accés (AVC)"
7453
7454-#: nscd/selinux.c:356
7455+#: nscd/selinux.c:360
7456 msgid "Error getting context of socket peer"
7457 msgstr "error en obtenir el context de l’extrem remot del connector"
7458
7459-#: nscd/selinux.c:361
7460+#: nscd/selinux.c:365
7461 msgid "Error getting context of nscd"
7462 msgstr "error en obtenir el context d’«nscd»"
7463
7464-#: nscd/selinux.c:367
7465+#: nscd/selinux.c:371
7466 msgid "Error getting sid from context"
7467 msgstr "error en obtenir el SID del context"
7468
7469-#: nscd/selinux.c:374
7470+#: nscd/selinux.c:378
7471 msgid "compile-time support for database policy missing"
7472 msgstr "no s’ha compiŀlat la compatibilitat amb polítiques de bases de dades"
7473
7474-#: nscd/selinux.c:407
7475+#: nscd/selinux.c:411
7476 #, c-format
7477 msgid ""
7478 "\n"
7479@@ -4501,70 +4636,79 @@
7480 "%15u fallades de CAV\n"
7481
7482 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7483-#: nscd/servicescache.c:381
7484+#: nscd/servicescache.c:387
7485 #, c-format
7486 msgid "Haven't found \"%s\" in services cache!"
7487 msgstr "no s’ha trobat «%s» a la memòria cau de «services»"
7488
7489 # El nom de la base de dades s’usa més a sovint que la descripció. ivb
7490-#: nscd/servicescache.c:383
7491+#: nscd/servicescache.c:389
7492 #, c-format
7493 msgid "Reloading \"%s\" in services cache!"
7494 msgstr "es torna a carregar «%s» a la memòria cau de «services»"
7495
7496-#: nss/getent.c:54
7497+#: nss/getent.c:53
7498 msgid "database [key ...]"
7499 msgstr "BASE_DE_DADES [CLAU…]"
7500
7501 # Més ajudes. ivb
7502-#: nss/getent.c:59
7503+#: nss/getent.c:58
7504 msgid "Service configuration to be used"
7505 msgstr "Configuració a emprar del servei."
7506
7507-#: nss/getent.c:60
7508+#: nss/getent.c:59
7509 msgid "disable IDN encoding"
7510 msgstr "Inhabilita la codificació IDN."
7511
7512-#: nss/getent.c:65
7513+#: nss/getent.c:64
7514 msgid "Get entries from administrative database."
7515 msgstr "Obté entrades de les bases de dades d’administració."
7516
7517-#: nss/getent.c:149 nss/getent.c:479
7518+#: nss/getent.c:148 nss/getent.c:477 nss/getent.c:522
7519 #, c-format
7520 msgid "Enumeration not supported on %s\n"
7521 msgstr "no es permet l’enumeració sobre «%s»\n"
7522
7523-#: nss/getent.c:866
7524+#: nss/getent.c:913
7525 #, c-format
7526 msgid "Unknown database name"
7527 msgstr "el nom de la base de dades no és conegut"
7528
7529-#: nss/getent.c:896
7530+#: nss/getent.c:943
7531 msgid "Supported databases:\n"
7532 msgstr "Bases de dades acceptades:\n"
7533
7534-#: nss/getent.c:962
7535+#: nss/getent.c:1009
7536 #, c-format
7537 msgid "Unknown database: %s\n"
7538 msgstr "la base de dades no és coneguda: %s\n"
7539
7540-#: nss/makedb.c:60
7541+#: nss/makedb.c:118
7542 msgid "Convert key to lower case"
7543 msgstr "Converteix la clau a minúscules."
7544
7545-#: nss/makedb.c:63
7546+#: nss/makedb.c:121
7547 msgid "Do not print messages while building database"
7548 msgstr "No mostra cap missatge mentre es crea la base de dades."
7549
7550-#: nss/makedb.c:65
7551+#: nss/makedb.c:123
7552 msgid "Print content of database file, one entry a line"
7553 msgstr "Mostra el contingut del fitxer de base de dades, a entrada per línia."
7554
7555-#: nss/makedb.c:70
7556-msgid "Create simple DB database from textual input."
7557-msgstr "Crea una base de dades DB simple partint de l’entrada textual."
7558+#: nss/makedb.c:124
7559+msgid "CHAR"
7560+msgstr "CARÀCTER"
7561
7562-#: nss/makedb.c:73
7563+# No tinc massa clar el significat. ivb
7564+#: nss/makedb.c:125
7565+msgid "Generated line not part of iteration"
7566+msgstr "Línia generada a excloure de la iteració."
7567+
7568+#: nss/makedb.c:130
7569+msgid "Create simple database from textual input."
7570+msgstr "Crea una base de dades simple partint de l’entrada textual."
7571+
7572+#: nss/makedb.c:133
7573 msgid ""
7574 "INPUT-FILE OUTPUT-FILE\n"
7575 "-o OUTPUT-FILE INPUT-FILE\n"
7576@@ -4574,51 +4718,87 @@
7577 "-o FITXER_EIXIDA FITXER_ENTRADA\n"
7578 "-u FITXER_ENTRADA"
7579
7580-#: nss/makedb.c:142
7581+#: nss/makedb.c:229
7582 #, c-format
7583-msgid "No usable database library found."
7584-msgstr "no s’ha trobat cap biblioteca usable de base de dades"
7585+msgid "cannot open database file `%s'"
7586+msgstr "no s’ha pogut obrir el fitxer de base de dades «%s»"
7587
7588-#: nss/makedb.c:149
7589+#: nss/makedb.c:274
7590 #, c-format
7591-msgid "cannot open database file `%s': %s"
7592-msgstr "no s’ha pogut obrir el fitxer de base de dades «%s»: %s"
7593+msgid "no entries to be processed"
7594+msgstr "no hi ha cap entrada que processar"
7595
7596-#: nss/makedb.c:151
7597-msgid "incorrectly formatted file"
7598-msgstr "el fitxer no té un format vàlid"
7599+#: nss/makedb.c:284
7600+#, c-format
7601+msgid "cannot create temporary file name"
7602+msgstr "no s’ha pogut crear un nom de fitxer temporal"
7603
7604-#: nss/makedb.c:331
7605+#: nss/makedb.c:306
7606+#, c-format
7607+msgid "cannot stat newly created file"
7608+msgstr "ha fallat stat() sobre el nou fitxer temporal"
7609+
7610+#: nss/makedb.c:317
7611+#, c-format
7612+msgid "cannot rename temporary file"
7613+msgstr "no s’ha pogut reanomenar el fitxer temporal"
7614+
7615+#: nss/makedb.c:533 nss/makedb.c:556
7616+#, c-format
7617+msgid "cannot create search tree"
7618+msgstr "no s’ha pogut crear l’arbre de cerca"
7619+
7620+#: nss/makedb.c:562
7621 msgid "duplicate key"
7622 msgstr "la clau és duplicada"
7623
7624-#: nss/makedb.c:337
7625+#: nss/makedb.c:574
7626 #, c-format
7627-msgid "while writing database file"
7628-msgstr "en escriure el fitxer de base dades"
7629-
7630-#: nss/makedb.c:348
7631-#, c-format
7632 msgid "problems while reading `%s'"
7633 msgstr "problemes en llegir «%s»"
7634
7635-#: nss/makedb.c:368 nss/makedb.c:385
7636+#: nss/makedb.c:801
7637 #, c-format
7638-msgid "while reading database"
7639-msgstr "en llegir la base de dades"
7640+msgid "failed to write new database file"
7641+msgstr "no s’ha pogut escriure el nou fitxer de base de dades"
7642
7643-#: posix/getconf.c:1036
7644+#: nss/makedb.c:814
7645 #, c-format
7646+msgid "cannot stat database file"
7647+msgstr "ha fallat stat() sobre el fitxer de base de dades"
7648+
7649+#: nss/makedb.c:819
7650+#, c-format
7651+msgid "cannot map database file"
7652+msgstr "no s’ha pogut mapar el fitxer de base de dades"
7653+
7654+#: nss/makedb.c:822
7655+#, c-format
7656+msgid "file not a database file"
7657+msgstr "el fitxer no és un fitxer de base dades"
7658+
7659+#: nss/makedb.c:873
7660+#, c-format
7661+msgid "cannot set file creation context for `%s'"
7662+msgstr "no s’ha pogut establir el context de creació per a «%s»"
7663+
7664+#: ports/sysdeps/unix/sysv/linux/ia64/makecontext.c:62
7665+#, c-format
7666+msgid "makecontext: does not know how to handle more than 8 arguments\n"
7667+msgstr "makecontext: no es poden tractar més de 8 arguments\n"
7668+
7669+#: posix/getconf.c:1035
7670+#, c-format
7671 msgid "Usage: %s [-v specification] variable_name [pathname]\n"
7672 msgstr "Forma d’ús: %s [-v ESPECIFICACIÓ] NOM_DE_VARIABLE [CAMÍ]\n"
7673
7674 # S’alinea amb el nom de programa de dalt. ivb
7675-#: posix/getconf.c:1039
7676+#: posix/getconf.c:1038
7677 #, c-format
7678 msgid " %s -a [pathname]\n"
7679 msgstr " %s -a [CAMÍ]\n"
7680
7681-#: posix/getconf.c:1115
7682+#: posix/getconf.c:1114
7683 #, c-format
7684 msgid ""
7685 "Usage: getconf [-v SPEC] VAR\n"
7686@@ -4637,152 +4817,152 @@
7687 "de compiŀlació indicat.\n"
7688 "\n"
7689
7690-#: posix/getconf.c:1173
7691+#: posix/getconf.c:1172
7692 #, c-format
7693 msgid "unknown specification \"%s\""
7694 msgstr "l’especificació «%s» no és coneguda"
7695
7696-#: posix/getconf.c:1225
7697+#: posix/getconf.c:1224
7698 #, c-format
7699 msgid "Couldn't execute %s"
7700 msgstr "no s’ha pogut executar «%s»"
7701
7702 # ivb (2001/11/01)
7703 # ivb Es refereix a variables de configuració -> femení.
7704-#: posix/getconf.c:1269 posix/getconf.c:1285
7705+#: posix/getconf.c:1268 posix/getconf.c:1284
7706 msgid "undefined"
7707 msgstr "indefinida"
7708
7709-#: posix/getconf.c:1307
7710+#: posix/getconf.c:1306
7711 #, c-format
7712 msgid "Unrecognized variable `%s'"
7713 msgstr "la variable «%s» no és reconeguda"
7714
7715-#: posix/getopt.c:594 posix/getopt.c:623
7716+#: posix/getopt.c:593 posix/getopt.c:622
7717 #, c-format
7718 msgid "%s: option '%s' is ambiguous; possibilities:"
7719 msgstr "%s: l’opció «%s» és ambígua; possibilitats:"
7720
7721-#: posix/getopt.c:664 posix/getopt.c:668
7722+#: posix/getopt.c:663 posix/getopt.c:667
7723 #, c-format
7724 msgid "%s: option '--%s' doesn't allow an argument\n"
7725 msgstr "%s: l’opció «--%s» no admet arguments\n"
7726
7727-#: posix/getopt.c:677 posix/getopt.c:682
7728+#: posix/getopt.c:676 posix/getopt.c:681
7729 #, c-format
7730 msgid "%s: option '%c%s' doesn't allow an argument\n"
7731 msgstr "%s: l’opció «%c%s» no admet arguments\n"
7732
7733-#: posix/getopt.c:725 posix/getopt.c:744
7734+#: posix/getopt.c:724 posix/getopt.c:743
7735 #, c-format
7736 msgid "%s: option '--%s' requires an argument\n"
7737 msgstr "%s: l’opció «--%s» necessita un argument\n"
7738
7739-#: posix/getopt.c:782 posix/getopt.c:785
7740+#: posix/getopt.c:781 posix/getopt.c:784
7741 #, c-format
7742 msgid "%s: unrecognized option '--%s'\n"
7743 msgstr "%s: l’opció «--%s» no és reconeguda\n"
7744
7745-#: posix/getopt.c:793 posix/getopt.c:796
7746+#: posix/getopt.c:792 posix/getopt.c:795
7747 #, c-format
7748 msgid "%s: unrecognized option '%c%s'\n"
7749 msgstr "%s: l’opció «%c%s» no és reconeguda\n"
7750
7751-#: posix/getopt.c:845 posix/getopt.c:848
7752+#: posix/getopt.c:844 posix/getopt.c:847
7753 #, c-format
7754 msgid "%s: invalid option -- '%c'\n"
7755 msgstr "%s: l’opció «%c» no és vàlida\n"
7756
7757-#: posix/getopt.c:898 posix/getopt.c:915 posix/getopt.c:1123
7758-#: posix/getopt.c:1141
7759+#: posix/getopt.c:900 posix/getopt.c:917 posix/getopt.c:1127
7760+#: posix/getopt.c:1145
7761 #, c-format
7762 msgid "%s: option requires an argument -- '%c'\n"
7763 msgstr "%s: l’opció «%c» necessita un argument\n"
7764
7765-#: posix/getopt.c:971 posix/getopt.c:987
7766+#: posix/getopt.c:973 posix/getopt.c:989
7767 #, c-format
7768 msgid "%s: option '-W %s' is ambiguous\n"
7769 msgstr "%s: l’opció «-W %s» és ambígua\n"
7770
7771-#: posix/getopt.c:1011 posix/getopt.c:1029
7772+#: posix/getopt.c:1013 posix/getopt.c:1031
7773 #, c-format
7774 msgid "%s: option '-W %s' doesn't allow an argument\n"
7775 msgstr "%s: l’opció «-W %s» no admet arguments\n"
7776
7777-#: posix/getopt.c:1050 posix/getopt.c:1068
7778+#: posix/getopt.c:1052 posix/getopt.c:1070
7779 #, c-format
7780 msgid "%s: option '-W %s' requires an argument\n"
7781 msgstr "%s: l’opció «-W %s» necessita un argument\n"
7782
7783-#: posix/regcomp.c:135
7784+#: posix/regcomp.c:134
7785 msgid "No match"
7786 msgstr "No hi ha cap coincidència"
7787
7788-#: posix/regcomp.c:138
7789+#: posix/regcomp.c:137
7790 msgid "Invalid regular expression"
7791 msgstr "L’expressió regular no és vàlida"
7792
7793-#: posix/regcomp.c:141
7794+#: posix/regcomp.c:140
7795 msgid "Invalid collation character"
7796 msgstr "El caràcter d’ordenació no és vàlid"
7797
7798-#: posix/regcomp.c:144
7799+#: posix/regcomp.c:143
7800 msgid "Invalid character class name"
7801 msgstr "El nom de la classe de caràcters no és vàlid"
7802
7803-#: posix/regcomp.c:147
7804+#: posix/regcomp.c:146
7805 msgid "Trailing backslash"
7806 msgstr "Hi ha una barra invertida sobrant al final"
7807
7808-#: posix/regcomp.c:150
7809+#: posix/regcomp.c:149
7810 msgid "Invalid back reference"
7811 msgstr "La referència cap enrere no és vàlida"
7812
7813-#: posix/regcomp.c:153
7814+#: posix/regcomp.c:152
7815 msgid "Unmatched [ or [^"
7816 msgstr "«[» o «[^» desaparellat"
7817
7818-#: posix/regcomp.c:156
7819+#: posix/regcomp.c:155
7820 msgid "Unmatched ( or \\("
7821 msgstr "«(» o «\\(» desaparellat"
7822
7823-#: posix/regcomp.c:159
7824+#: posix/regcomp.c:158
7825 msgid "Unmatched \\{"
7826 msgstr "«\\{» desaparellat"
7827
7828-#: posix/regcomp.c:162
7829+#: posix/regcomp.c:161
7830 msgid "Invalid content of \\{\\}"
7831 msgstr "El contingut de «\\{\\}» no és vàlid"
7832
7833-#: posix/regcomp.c:165
7834+#: posix/regcomp.c:164
7835 msgid "Invalid range end"
7836 msgstr "El final del rang no és vàlid"
7837
7838-#: posix/regcomp.c:168
7839+#: posix/regcomp.c:167
7840 msgid "Memory exhausted"
7841 msgstr "La memòria s’ha exhaurit"
7842
7843-#: posix/regcomp.c:171
7844+#: posix/regcomp.c:170
7845 msgid "Invalid preceding regular expression"
7846 msgstr "L’expressió regular precedent és incorrecta"
7847
7848-#: posix/regcomp.c:174
7849+#: posix/regcomp.c:173
7850 msgid "Premature end of regular expression"
7851 msgstr "Fi prematura de l’expressió regular"
7852
7853-#: posix/regcomp.c:177
7854+#: posix/regcomp.c:176
7855 msgid "Regular expression too big"
7856 msgstr "L’expressió regular és massa llarga"
7857
7858-#: posix/regcomp.c:180
7859+#: posix/regcomp.c:179
7860 msgid "Unmatched ) or \\)"
7861 msgstr "«)» o «\\)» desaparellat"
7862
7863-#: posix/regcomp.c:680
7864+#: posix/regcomp.c:679
7865 msgid "No previous regular expression"
7866 msgstr "No hi ha expressió regular prèvia"
7867
7868-#: posix/wordexp.c:1832
7869+#: posix/wordexp.c:1830
7870 msgid "parameter null or not set"
7871 msgstr "el paràmetre és nul o no s’ha establert"
7872
7873@@ -4817,27 +4997,27 @@
7874 # ivb (2002/02/08)
7875 # ivb En realitat es refereic a la paraula clau d'«/etc/host.conf» «trim»,
7876 # ivb però crec que així queda més clar.
7877-#: resolv/res_hconf.c:124
7878+#: resolv/res_hconf.c:122
7879 #, c-format
7880 msgid "%s: line %d: cannot specify more than %d trim domains"
7881 msgstr "%s: línia %d: no es poden especificar més de %d dominis a retallar"
7882
7883-#: resolv/res_hconf.c:145
7884+#: resolv/res_hconf.c:143
7885 #, c-format
7886 msgid "%s: line %d: list delimiter not followed by domain"
7887 msgstr "%s: línia %d: cal un domini a continuació del delimitador de llista"
7888
7889-#: resolv/res_hconf.c:204
7890+#: resolv/res_hconf.c:202
7891 #, c-format
7892 msgid "%s: line %d: expected `on' or `off', found `%s'\n"
7893 msgstr "%s: línia %d: cal «on» o «off», però s’ha trobat «%s»\n"
7894
7895-#: resolv/res_hconf.c:247
7896+#: resolv/res_hconf.c:245
7897 #, c-format
7898 msgid "%s: line %d: bad command `%s'\n"
7899 msgstr "%s: línia %d: l’ordre «%s» no és vàlida\n"
7900
7901-#: resolv/res_hconf.c:282
7902+#: resolv/res_hconf.c:280
7903 #, c-format
7904 msgid "%s: line %d: ignoring trailing garbage `%s'\n"
7905 msgstr "%s: línia %d: es descarta la brossa «%s» al final de la línia\n"
7906@@ -4982,208 +5162,208 @@
7907 msgid "Device disconnected"
7908 msgstr "El dispositiu ha estat desconnectat"
7909
7910-#: stdio-common/psiginfo.c:145
7911+#: stdio-common/psiginfo.c:139
7912 msgid "Signal sent by kill()"
7913 msgstr "Senyal enviat per kill()"
7914
7915-#: stdio-common/psiginfo.c:148
7916+#: stdio-common/psiginfo.c:142
7917 msgid "Signal sent by sigqueue()"
7918 msgstr "Senyal enviat per sigqueue()"
7919
7920-#: stdio-common/psiginfo.c:151
7921+#: stdio-common/psiginfo.c:145
7922 msgid "Signal generated by the expiration of a timer"
7923 msgstr "Senyal generat en expirar un temporitzador"
7924
7925-#: stdio-common/psiginfo.c:154
7926+#: stdio-common/psiginfo.c:148
7927 msgid "Signal generated by the completion of an asynchronous I/O request"
7928 msgstr "Senyal generat en completar una petició d’E/S asíncrona"
7929
7930-#: stdio-common/psiginfo.c:158
7931+#: stdio-common/psiginfo.c:152
7932 msgid "Signal generated by the arrival of a message on an empty message queue"
7933 msgstr "Senyal generat en arribar un missatge a una cua de missatges buida"
7934
7935-#: stdio-common/psiginfo.c:163
7936+#: stdio-common/psiginfo.c:157
7937 msgid "Signal sent by tkill()"
7938 msgstr "Senyal enviat per tkill()"
7939
7940-#: stdio-common/psiginfo.c:168
7941+#: stdio-common/psiginfo.c:162
7942 msgid "Signal generated by the completion of an asynchronous name lookup request"
7943 msgstr "Senyal generat en completar una petició asíncrona de consulta de nom"
7944
7945-#: stdio-common/psiginfo.c:174
7946+#: stdio-common/psiginfo.c:168
7947 msgid "Signal generated by the completion of an I/O request"
7948 msgstr "Senyal generat en completar una petició d’E/S"
7949
7950-#: stdio-common/psiginfo.c:180
7951+#: stdio-common/psiginfo.c:174
7952 msgid "Signal sent by the kernel"
7953 msgstr "Senyal enviat pel nucli"
7954
7955-#: stdio-common/psiginfo.c:204
7956+#: stdio-common/psiginfo.c:198
7957 #, c-format
7958 msgid "Unknown signal %d\n"
7959 msgstr "Senyal desconegut %d\n"
7960
7961-#: stdio-common/psignal.c:51
7962+#: stdio-common/psignal.c:43
7963 #, c-format
7964 msgid "%s%sUnknown signal %d\n"
7965 msgstr "%s%sSenyal desconegut %d\n"
7966
7967-#: stdio-common/psignal.c:52
7968+#: stdio-common/psignal.c:44
7969 msgid "Unknown signal"
7970 msgstr "Senyal desconegut"
7971
7972-#: string/_strerror.c:47 sysdeps/mach/_strerror.c:87
7973+#: string/_strerror.c:46 sysdeps/mach/_strerror.c:86
7974 msgid "Unknown error "
7975 msgstr "Error desconegut "
7976
7977-#: string/strerror.c:43
7978+#: string/strerror.c:42
7979 msgid "Unknown error"
7980 msgstr "Error desconegut"
7981
7982-#: string/strsignal.c:65
7983+#: string/strsignal.c:60
7984 #, c-format
7985 msgid "Real-time signal %d"
7986 msgstr "Senyal de temps real %d"
7987
7988-#: string/strsignal.c:69
7989+#: string/strsignal.c:64
7990 #, c-format
7991 msgid "Unknown signal %d"
7992 msgstr "Senyal desconegut %d"
7993
7994-#: sunrpc/auth_unix.c:113 sunrpc/clnt_tcp.c:125 sunrpc/clnt_udp.c:136
7995-#: sunrpc/clnt_unix.c:126 sunrpc/svc_tcp.c:173 sunrpc/svc_tcp.c:218
7996-#: sunrpc/svc_udp.c:147 sunrpc/svc_unix.c:174 sunrpc/svc_unix.c:215
7997-#: sunrpc/xdr.c:632 sunrpc/xdr.c:792 sunrpc/xdr_array.c:100
7998-#: sunrpc/xdr_rec.c:154 sunrpc/xdr_ref.c:79
7999+#: sunrpc/auth_unix.c:111 sunrpc/clnt_tcp.c:123 sunrpc/clnt_udp.c:134
8000+#: sunrpc/clnt_unix.c:124 sunrpc/svc_tcp.c:188 sunrpc/svc_tcp.c:233
8001+#: sunrpc/svc_udp.c:162 sunrpc/svc_unix.c:188 sunrpc/svc_unix.c:229
8002+#: sunrpc/xdr.c:630 sunrpc/xdr.c:790 sunrpc/xdr_array.c:97
8003+#: sunrpc/xdr_rec.c:151 sunrpc/xdr_ref.c:76
8004 msgid "out of memory\n"
8005 msgstr "no resta memòria\n"
8006
8007 # ivb (2001/11/01)
8008 # ivb D'acord amb un comentari del propi fitxer.
8009-#: sunrpc/auth_unix.c:351
8010+#: sunrpc/auth_unix.c:349
8011 msgid "auth_unix.c: Fatal marshalling problem"
8012 msgstr "auth_none.c: error fatal de preserialització"
8013
8014-#: sunrpc/clnt_perr.c:98 sunrpc/clnt_perr.c:114
8015+#: sunrpc/clnt_perr.c:95 sunrpc/clnt_perr.c:111
8016 #, c-format
8017 msgid "%s: %s; low version = %lu, high version = %lu"
8018 msgstr "%s: %s; versió menor = %lu, versió major = %lu"
8019
8020-#: sunrpc/clnt_perr.c:105
8021+#: sunrpc/clnt_perr.c:102
8022 #, c-format
8023 msgid "%s: %s; why = %s\n"
8024 msgstr "%s: %s; causa = %s\n"
8025
8026-#: sunrpc/clnt_perr.c:107
8027+#: sunrpc/clnt_perr.c:104
8028 #, c-format
8029 msgid "%s: %s; why = (unknown authentication error - %d)\n"
8030 msgstr "%s: %s; causa = (error desconegut d’autenticació: %d)\n"
8031
8032-#: sunrpc/clnt_perr.c:156
8033+#: sunrpc/clnt_perr.c:153
8034 msgid "RPC: Success"
8035 msgstr "RPC: Èxit"
8036
8037-#: sunrpc/clnt_perr.c:159
8038+#: sunrpc/clnt_perr.c:156
8039 msgid "RPC: Can't encode arguments"
8040 msgstr "RPC: No s’han pogut codificar els arguments"
8041
8042-#: sunrpc/clnt_perr.c:163
8043+#: sunrpc/clnt_perr.c:160
8044 msgid "RPC: Can't decode result"
8045 msgstr "RPC: No s’ha pogut descodificar el resultat"
8046
8047-#: sunrpc/clnt_perr.c:167
8048+#: sunrpc/clnt_perr.c:164
8049 msgid "RPC: Unable to send"
8050 msgstr "RPC: No s’ha pogut fer l’enviament"
8051
8052-#: sunrpc/clnt_perr.c:171
8053+#: sunrpc/clnt_perr.c:168
8054 msgid "RPC: Unable to receive"
8055 msgstr "RPC: No s’ha pogut rebre"
8056
8057-#: sunrpc/clnt_perr.c:175
8058+#: sunrpc/clnt_perr.c:172
8059 msgid "RPC: Timed out"
8060 msgstr "RPC: S’ha excedit el temps"
8061
8062-#: sunrpc/clnt_perr.c:179
8063+#: sunrpc/clnt_perr.c:176
8064 msgid "RPC: Incompatible versions of RPC"
8065 msgstr "RPC: Les versions d’RPC són incompatibles"
8066
8067-#: sunrpc/clnt_perr.c:183
8068+#: sunrpc/clnt_perr.c:180
8069 msgid "RPC: Authentication error"
8070 msgstr "RPC: Error d’autenticació"
8071
8072-#: sunrpc/clnt_perr.c:187
8073+#: sunrpc/clnt_perr.c:184
8074 msgid "RPC: Program unavailable"
8075 msgstr "RPC: El programa no es troba disponible"
8076
8077-#: sunrpc/clnt_perr.c:191
8078+#: sunrpc/clnt_perr.c:188
8079 msgid "RPC: Program/version mismatch"
8080 msgstr "RPC: No hi ha coincidència programa/versió"
8081
8082-#: sunrpc/clnt_perr.c:195
8083+#: sunrpc/clnt_perr.c:192
8084 msgid "RPC: Procedure unavailable"
8085 msgstr "RPC: El procediment no es troba disponible"
8086
8087-#: sunrpc/clnt_perr.c:199
8088+#: sunrpc/clnt_perr.c:196
8089 msgid "RPC: Server can't decode arguments"
8090 msgstr "RPC: El servidor no ha pogut descodificar els arguments"
8091
8092-#: sunrpc/clnt_perr.c:203
8093+#: sunrpc/clnt_perr.c:200
8094 msgid "RPC: Remote system error"
8095 msgstr "RPC: Error al sistema remot"
8096
8097-#: sunrpc/clnt_perr.c:207
8098+#: sunrpc/clnt_perr.c:204
8099 msgid "RPC: Unknown host"
8100 msgstr "RPC: L’estació no és coneguda"
8101
8102-#: sunrpc/clnt_perr.c:211
8103+#: sunrpc/clnt_perr.c:208
8104 msgid "RPC: Unknown protocol"
8105 msgstr "RPC: El protocol no és conegut"
8106
8107-#: sunrpc/clnt_perr.c:215
8108+#: sunrpc/clnt_perr.c:212
8109 msgid "RPC: Port mapper failure"
8110 msgstr "RPC: Fallada del mapador de ports"
8111
8112-#: sunrpc/clnt_perr.c:219
8113+#: sunrpc/clnt_perr.c:216
8114 msgid "RPC: Program not registered"
8115 msgstr "RPC: El programa no s’ha donat d’alta"
8116
8117-#: sunrpc/clnt_perr.c:223
8118+#: sunrpc/clnt_perr.c:220
8119 msgid "RPC: Failed (unspecified error)"
8120 msgstr "RPC: Ha fallat (error no especificat)"
8121
8122-#: sunrpc/clnt_perr.c:264
8123+#: sunrpc/clnt_perr.c:261
8124 msgid "RPC: (unknown error code)"
8125 msgstr "RPC: (codi d’error desconegut)"
8126
8127-#: sunrpc/clnt_perr.c:336
8128+#: sunrpc/clnt_perr.c:333
8129 msgid "Authentication OK"
8130 msgstr "L’autenticació és vàlida"
8131
8132-#: sunrpc/clnt_perr.c:339
8133+#: sunrpc/clnt_perr.c:336
8134 msgid "Invalid client credential"
8135 msgstr "La credencial donada pel client no és vàlida"
8136
8137-#: sunrpc/clnt_perr.c:343
8138+#: sunrpc/clnt_perr.c:340
8139 msgid "Server rejected credential"
8140 msgstr "El servidor ha rebutjat la credencial"
8141
8142-#: sunrpc/clnt_perr.c:347
8143+#: sunrpc/clnt_perr.c:344
8144 msgid "Invalid client verifier"
8145 msgstr "El verificador del client no és vàlid"
8146
8147-#: sunrpc/clnt_perr.c:351
8148+#: sunrpc/clnt_perr.c:348
8149 msgid "Server rejected verifier"
8150 msgstr "El servidor ha rebutjat el verificador"
8151
8152-#: sunrpc/clnt_perr.c:355
8153+#: sunrpc/clnt_perr.c:352
8154 msgid "Client credential too weak"
8155 msgstr "La credencial del client és massa fluixa"
8156
8157-#: sunrpc/clnt_perr.c:359
8158+#: sunrpc/clnt_perr.c:356
8159 msgid "Invalid server verifier"
8160 msgstr "El verificador del servidor no és vàlid"
8161
8162-#: sunrpc/clnt_perr.c:363
8163+#: sunrpc/clnt_perr.c:360
8164 msgid "Failed (unspecified error)"
8165 msgstr "Ha fallat (no s’especifica l’error)"
8166
8167@@ -5223,263 +5403,270 @@
8168 msgid "Cannot receive reply to broadcast"
8169 msgstr "no s’ha pogut rebre una resposta a la difusió"
8170
8171-#: sunrpc/rpc_main.c:288
8172+#: sunrpc/rpc_main.c:277
8173 #, c-format
8174 msgid "%s: output would overwrite %s\n"
8175 msgstr "%s: l’eixida sobreescriuria «%s»\n"
8176
8177-#: sunrpc/rpc_main.c:295
8178+#: sunrpc/rpc_main.c:284
8179 #, c-format
8180 msgid "%s: unable to open %s: %m\n"
8181 msgstr "%s: no s’ha pogut obrir «%s»: %m\n"
8182
8183-#: sunrpc/rpc_main.c:307
8184+#: sunrpc/rpc_main.c:296
8185 #, c-format
8186 msgid "%s: while writing output %s: %m"
8187 msgstr "%s: en escriure a l’eixida «%s»: %m"
8188
8189-#: sunrpc/rpc_main.c:342
8190+#: sunrpc/rpc_main.c:332 sunrpc/rpc_main.c:371
8191 #, c-format
8192-msgid "cannot find C preprocessor: %s \n"
8193+msgid "cannot find C preprocessor: %s\n"
8194 msgstr "no s’ha pogut trobar el preprocessador de C: %s\n"
8195
8196-#: sunrpc/rpc_main.c:350
8197-msgid "cannot find any C preprocessor (cpp)\n"
8198-msgstr "no s’ha pogut trobar cap preprocessador de C (cpp)\n"
8199-
8200-#: sunrpc/rpc_main.c:419
8201+#: sunrpc/rpc_main.c:407
8202 #, c-format
8203 msgid "%s: C preprocessor failed with signal %d\n"
8204 msgstr "%s: el preprocessador de C ha fallat amb el senyal %d\n"
8205
8206-#: sunrpc/rpc_main.c:422
8207+#: sunrpc/rpc_main.c:410
8208 #, c-format
8209 msgid "%s: C preprocessor failed with exit code %d\n"
8210 msgstr "%s: el preprocessador de C ha fallat amb el codi d’eixida %d\n"
8211
8212-#: sunrpc/rpc_main.c:462
8213+#: sunrpc/rpc_main.c:450
8214 #, c-format
8215 msgid "illegal nettype: `%s'\n"
8216 msgstr "el tipus de xarxa no és permès: «%s»\n"
8217
8218-#: sunrpc/rpc_main.c:1128
8219+#: sunrpc/rpc_main.c:1085
8220 #, c-format
8221 msgid "rpcgen: too many defines\n"
8222 msgstr "rpcgen: hi ha massa definicions\n"
8223
8224-#: sunrpc/rpc_main.c:1140
8225+#: sunrpc/rpc_main.c:1097
8226 #, c-format
8227 msgid "rpcgen: arglist coding error\n"
8228 msgstr "rpcgen: error en codificar els arguments\n"
8229
8230 #. TRANS: the file will not be removed; this is an
8231 #. TRANS: informative message.
8232-#: sunrpc/rpc_main.c:1173
8233+#: sunrpc/rpc_main.c:1130
8234 #, c-format
8235 msgid "file `%s' already exists and may be overwritten\n"
8236 msgstr "el fitxer «%s» ja existeix i podria ser sobreescrit\n"
8237
8238-#: sunrpc/rpc_main.c:1218
8239+#: sunrpc/rpc_main.c:1175
8240 #, c-format
8241 msgid "Cannot specify more than one input file!\n"
8242 msgstr "no es pot especificar més d’un fitxer d’entrada\n"
8243
8244-#: sunrpc/rpc_main.c:1392
8245+#: sunrpc/rpc_main.c:1345
8246 #, c-format
8247 msgid "This implementation doesn't support newstyle or MT-safe code!\n"
8248 msgstr "aquesta implementació no accepta l’estil nou ni el codi compatible amb MT\n"
8249
8250-#: sunrpc/rpc_main.c:1401
8251+#: sunrpc/rpc_main.c:1354
8252 #, c-format
8253 msgid "Cannot use netid flag with inetd flag!\n"
8254 msgstr "no es pot emprar l’opció IDXARXA («-n») amb l’opció d’inetd («-I»)\n"
8255
8256-#: sunrpc/rpc_main.c:1413
8257+#: sunrpc/rpc_main.c:1363
8258 #, c-format
8259 msgid "Cannot use netid flag without TIRPC!\n"
8260 msgstr "no es pot emprar l’opció IDXARXA («-n») sense TIRPC\n"
8261
8262-#: sunrpc/rpc_main.c:1420
8263+#: sunrpc/rpc_main.c:1370
8264 #, c-format
8265 msgid "Cannot use table flags with newstyle!\n"
8266 msgstr "no es poden emprar opcions de taula amb l’estil nou («-N»)\n"
8267
8268-#: sunrpc/rpc_main.c:1439
8269+#: sunrpc/rpc_main.c:1389
8270 #, c-format
8271 msgid "\"infile\" is required for template generation flags.\n"
8272 msgstr "cal FITXER_ENTRADA per als senyaladors de generació de plantilles\n"
8273
8274-#: sunrpc/rpc_main.c:1444
8275+#: sunrpc/rpc_main.c:1394
8276 #, c-format
8277 msgid "Cannot have more than one file generation flag!\n"
8278 msgstr "no es pot tenir més d’un senyalador de generació de fitxers\n"
8279
8280-#: sunrpc/rpc_main.c:1453
8281+#: sunrpc/rpc_main.c:1403
8282 #, c-format
8283 msgid "usage: %s infile\n"
8284 msgstr "Forma d’ús: %s FITXER_ENTRADA\n"
8285
8286-#: sunrpc/rpc_main.c:1454
8287+#: sunrpc/rpc_main.c:1404
8288 #, c-format
8289 msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
8290 msgstr ""
8291 " %s [-abkCLNTM] [-DNOM[=VALOR]] [-i MIDA] [-I [-K SEGONS]]\n"
8292 " [-Y CAMÍ] FITXER_ENTRADA\n"
8293
8294-#: sunrpc/rpc_main.c:1456
8295+#: sunrpc/rpc_main.c:1406
8296 #, c-format
8297 msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
8298 msgstr ""
8299 " %s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o FITXER_EIXIDA]\n"
8300 " [FITXER_ENTRADA]\n"
8301
8302-#: sunrpc/rpc_main.c:1458
8303+#: sunrpc/rpc_main.c:1408
8304 #, c-format
8305 msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
8306 msgstr " %s [-s TIPUS_DE_XARXA]… [-o FITXER_EIXIDA] [FITXER_ENTRADA]\n"
8307
8308-#: sunrpc/rpc_main.c:1459
8309+#: sunrpc/rpc_main.c:1409
8310 #, c-format
8311 msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
8312 msgstr " %s [-n IDXARXA]… [-o FITXER_EIXIDA] [FITXER_ENTRADA]\n"
8313
8314-#: sunrpc/rpc_main.c:1467
8315+#: sunrpc/rpc_main.c:1417
8316 #, c-format
8317 msgid "options:\n"
8318 msgstr ""
8319 "Opcions:\n"
8320 "\n"
8321
8322-#: sunrpc/rpc_main.c:1468
8323+#: sunrpc/rpc_main.c:1418
8324 #, c-format
8325 msgid "-a\t\tgenerate all files, including samples\n"
8326 msgstr " -a Genera tots els fitxers, incloent els exemples.\n"
8327
8328-#: sunrpc/rpc_main.c:1469
8329+#: sunrpc/rpc_main.c:1419
8330 #, c-format
8331 msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
8332 msgstr ""
8333 " -b Mode de compatibilitat cap enrere (genera codi per a\n"
8334 " SunOS 4.1).\n"
8335
8336-#: sunrpc/rpc_main.c:1470
8337+#: sunrpc/rpc_main.c:1420
8338 #, c-format
8339 msgid "-c\t\tgenerate XDR routines\n"
8340 msgstr " -c Genera rutines XDR.\n"
8341
8342-#: sunrpc/rpc_main.c:1471
8343+#: sunrpc/rpc_main.c:1421
8344 #, c-format
8345 msgid "-C\t\tANSI C mode\n"
8346 msgstr " -C Mode ANSI C.\n"
8347
8348-#: sunrpc/rpc_main.c:1472
8349+#: sunrpc/rpc_main.c:1422
8350 #, c-format
8351 msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
8352 msgstr " -DNOM[=VALOR] Defineix un símbol (equival a «#define»).\n"
8353
8354-#: sunrpc/rpc_main.c:1473
8355+#: sunrpc/rpc_main.c:1423
8356 #, c-format
8357 msgid "-h\t\tgenerate header file\n"
8358 msgstr " -h Genera un fitxer de capçaleres.\n"
8359
8360-#: sunrpc/rpc_main.c:1474
8361+#: sunrpc/rpc_main.c:1424
8362 #, c-format
8363 msgid "-i size\t\tsize at which to start generating inline code\n"
8364 msgstr " -i MIDA Indica la MIDA on començar a generar codi en línia.\n"
8365
8366-#: sunrpc/rpc_main.c:1475
8367+#: sunrpc/rpc_main.c:1425
8368 #, c-format
8369 msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
8370 msgstr ""
8371 " -I Genera codi de compatibilitat amb «inetd» per al\n"
8372 " servidor (per a SunOS 4.1).\n"
8373
8374-#: sunrpc/rpc_main.c:1476
8375+#: sunrpc/rpc_main.c:1426
8376 #, c-format
8377 msgid "-K seconds\tserver exits after K seconds of inactivity\n"
8378 msgstr ""
8379 " -K SEGONS Fa que el servidor isca després del nombre indicat de\n"
8380 " SEGONS d’inactivitat.\n"
8381
8382-#: sunrpc/rpc_main.c:1477
8383+#: sunrpc/rpc_main.c:1427
8384 #, c-format
8385 msgid "-l\t\tgenerate client side stubs\n"
8386 msgstr " -l Genera esquelets per a la part del client.\n"
8387
8388-#: sunrpc/rpc_main.c:1478
8389+#: sunrpc/rpc_main.c:1428
8390 #, c-format
8391 msgid "-L\t\tserver errors will be printed to syslog\n"
8392 msgstr " -L Fa que els errors del servidor s’envien a «syslog».\n"
8393
8394-#: sunrpc/rpc_main.c:1479
8395+#: sunrpc/rpc_main.c:1429
8396 #, c-format
8397 msgid "-m\t\tgenerate server side stubs\n"
8398 msgstr " -m Genera esquelets per a la part del servidor.\n"
8399
8400-#: sunrpc/rpc_main.c:1480
8401+#: sunrpc/rpc_main.c:1430
8402 #, c-format
8403 msgid "-M\t\tgenerate MT-safe code\n"
8404 msgstr " -M Genera codi compatible amb múltiples fils d’execució.\n"
8405
8406 # Sembla que «netid» és una expressió de la jerga RPC. ivb
8407-#: sunrpc/rpc_main.c:1481
8408+#: sunrpc/rpc_main.c:1431
8409 #, c-format
8410 msgid "-n netid\tgenerate server code that supports named netid\n"
8411 msgstr " -n NETID Genera codi compatible amb el NETID indicat.\n"
8412
8413-#: sunrpc/rpc_main.c:1482
8414+#: sunrpc/rpc_main.c:1432
8415 #, c-format
8416 msgid "-N\t\tsupports multiple arguments and call-by-value\n"
8417 msgstr " -N Permet arguments múltiples i pas d’arguments per valor.\n"
8418
8419-#: sunrpc/rpc_main.c:1483
8420+#: sunrpc/rpc_main.c:1433
8421 #, c-format
8422 msgid "-o outfile\tname of the output file\n"
8423 msgstr " -o FITXER_EIXIDA Nom del fitxer d’eixida.\n"
8424
8425-#: sunrpc/rpc_main.c:1484
8426+#: sunrpc/rpc_main.c:1434
8427 #, c-format
8428 msgid "-s nettype\tgenerate server code that supports named nettype\n"
8429 msgstr ""
8430 " -s TIPUS_DE_XARXA Genera codi de servidor compatible amb el TIPUS_DE_XARXA\n"
8431 " indicat.\n"
8432
8433-#: sunrpc/rpc_main.c:1485
8434+#: sunrpc/rpc_main.c:1435
8435 #, c-format
8436 msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
8437 msgstr ""
8438 " -Sc Genera codi d’exemple per a un client que empra\n"
8439 " procediments remots.\n"
8440
8441-#: sunrpc/rpc_main.c:1486
8442+#: sunrpc/rpc_main.c:1436
8443 #, c-format
8444 msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
8445 msgstr ""
8446 " -Ss Genera codi d’exemple per a un servidor que defineix\n"
8447 " procediments remots.\n"
8448
8449-#: sunrpc/rpc_main.c:1487
8450+#: sunrpc/rpc_main.c:1437
8451 #, c-format
8452 msgid "-Sm \t\tgenerate makefile template \n"
8453 msgstr " -Sm Genera una plantilla de fitxer «Makefile».\n"
8454
8455-#: sunrpc/rpc_main.c:1488
8456+#: sunrpc/rpc_main.c:1438
8457 #, c-format
8458 msgid "-t\t\tgenerate RPC dispatch table\n"
8459 msgstr " -t Genera una taula de despatxat de crides RPC.\n"
8460
8461-#: sunrpc/rpc_main.c:1489
8462+#: sunrpc/rpc_main.c:1439
8463 #, c-format
8464 msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
8465 msgstr ""
8466 " -T Genera codi per a treballar amb taules de despatxat de\n"
8467 " crides RPC.\n"
8468
8469-#: sunrpc/rpc_main.c:1490
8470+#: sunrpc/rpc_main.c:1440
8471 #, c-format
8472 msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
8473 msgstr " -Y CAMÍ Directori on es troba el preprocessador de C (cpp).\n"
8474
8475+#: sunrpc/rpc_main.c:1442
8476+#, c-format
8477+msgid ""
8478+"\n"
8479+"For bug reporting instructions, please see:\n"
8480+"%s.\n"
8481+msgstr ""
8482+"\n"
8483+"Per a obtenir instruccions sobre com informar d’un error, vegeu\n"
8484+"<%s>.\n"
8485+
8486 #: sunrpc/rpc_scan.c:112
8487 msgid "constant or identifier expected"
8488 msgstr "cal una constant o un identificador"
8489@@ -5589,127 +5776,127 @@
8490 msgid "svc_run: - poll failed"
8491 msgstr "svc_run: ha fallat poll()"
8492
8493-#: sunrpc/svc_simple.c:81
8494+#: sunrpc/svc_simple.c:80
8495 #, c-format
8496 msgid "can't reassign procedure number %ld\n"
8497 msgstr "no s’ha pogut reassignar el procediment número %ld\n"
8498
8499-#: sunrpc/svc_simple.c:91
8500+#: sunrpc/svc_simple.c:90
8501 msgid "couldn't create an rpc server\n"
8502 msgstr "no s’ha pogut crear un servidor RPC\n"
8503
8504-#: sunrpc/svc_simple.c:99
8505+#: sunrpc/svc_simple.c:98
8506 #, c-format
8507 msgid "couldn't register prog %ld vers %ld\n"
8508 msgstr "no s’ha pogut donar d’alta el programa %ld amb versió %ld\n"
8509
8510-#: sunrpc/svc_simple.c:107
8511+#: sunrpc/svc_simple.c:106
8512 msgid "registerrpc: out of memory\n"
8513 msgstr "registerrpc: no resta memòria\n"
8514
8515-#: sunrpc/svc_simple.c:168
8516+#: sunrpc/svc_simple.c:169
8517 #, c-format
8518 msgid "trouble replying to prog %d\n"
8519 msgstr "no s’ha pogut respondre al programa %d\n"
8520
8521-#: sunrpc/svc_simple.c:177
8522+#: sunrpc/svc_simple.c:178
8523 #, c-format
8524 msgid "never registered prog %d\n"
8525 msgstr "el programa %d mai no s’ha donat d’alta\n"
8526
8527-#: sunrpc/svc_tcp.c:149
8528+#: sunrpc/svc_tcp.c:164
8529 msgid "svc_tcp.c - tcp socket creation problem"
8530 msgstr "svc_tcp.c: problemes en crear un connector TCP"
8531
8532-#: sunrpc/svc_tcp.c:164
8533+#: sunrpc/svc_tcp.c:179
8534 msgid "svc_tcp.c - cannot getsockname or listen"
8535 msgstr "svc_tcp.c: ha fallat getsockname() o listen()"
8536
8537-#: sunrpc/svc_udp.c:122
8538+#: sunrpc/svc_udp.c:137
8539 msgid "svcudp_create: socket creation problem"
8540 msgstr "svcudp_create: problemes en crear un connector"
8541
8542-#: sunrpc/svc_udp.c:136
8543+#: sunrpc/svc_udp.c:151
8544 msgid "svcudp_create - cannot getsockname"
8545 msgstr "svcudp_create: ha fallat getsockname()"
8546
8547-#: sunrpc/svc_udp.c:168
8548+#: sunrpc/svc_udp.c:183
8549 msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
8550 msgstr "svcudp_create: «xp_pad» és massa menut per a IP_PKTINFO\n"
8551
8552-#: sunrpc/svc_udp.c:476
8553+#: sunrpc/svc_udp.c:495
8554 msgid "enablecache: cache already enabled"
8555 msgstr "enablecache: la memòria cau ja està habilitada"
8556
8557-#: sunrpc/svc_udp.c:482
8558+#: sunrpc/svc_udp.c:501
8559 msgid "enablecache: could not allocate cache"
8560 msgstr "enablecache: no s’ha pogut reservar espai per a la memòria cau"
8561
8562-#: sunrpc/svc_udp.c:491
8563+#: sunrpc/svc_udp.c:510
8564 msgid "enablecache: could not allocate cache data"
8565 msgstr "enablecache: no s’ha pogut reservar espai per a les dades de la memòria cau"
8566
8567-#: sunrpc/svc_udp.c:499
8568+#: sunrpc/svc_udp.c:518
8569 msgid "enablecache: could not allocate cache fifo"
8570 msgstr "enablecache: no s’ha pogut reservar la cua FIFO de la memòria cau"
8571
8572-#: sunrpc/svc_udp.c:535
8573+#: sunrpc/svc_udp.c:554
8574 msgid "cache_set: victim not found"
8575 msgstr "cache_set: no s’ha trobat la víctima"
8576
8577-#: sunrpc/svc_udp.c:546
8578+#: sunrpc/svc_udp.c:565
8579 msgid "cache_set: victim alloc failed"
8580 msgstr "cache_set: no s’ha pogut reservar la víctima"
8581
8582-#: sunrpc/svc_udp.c:553
8583+#: sunrpc/svc_udp.c:572
8584 msgid "cache_set: could not allocate new rpc_buffer"
8585 msgstr "cache_set: no s’ha pogut reservar un nou «rpc_buffer»"
8586
8587-#: sunrpc/svc_unix.c:148
8588+#: sunrpc/svc_unix.c:162
8589 msgid "svc_unix.c - AF_UNIX socket creation problem"
8590 msgstr "svc_unix.c: problemes en crear un connector AF_UNIX"
8591
8592-#: sunrpc/svc_unix.c:164
8593+#: sunrpc/svc_unix.c:178
8594 msgid "svc_unix.c - cannot getsockname or listen"
8595 msgstr "svc_unix.c: ha fallat getsockname() o listen()"
8596
8597-#: sysdeps/generic/siglist.h:29 sysdeps/unix/siglist.c:27
8598+#: sysdeps/generic/siglist.h:28
8599 msgid "Hangup"
8600 msgstr "Penjat"
8601
8602-#: sysdeps/generic/siglist.h:30 sysdeps/unix/siglist.c:28
8603+#: sysdeps/generic/siglist.h:29
8604 msgid "Interrupt"
8605 msgstr "Interromput"
8606
8607-#: sysdeps/generic/siglist.h:31 sysdeps/unix/siglist.c:29
8608+#: sysdeps/generic/siglist.h:30
8609 msgid "Quit"
8610 msgstr "Eixit"
8611
8612-#: sysdeps/generic/siglist.h:32 sysdeps/unix/siglist.c:30
8613+#: sysdeps/generic/siglist.h:31
8614 msgid "Illegal instruction"
8615 msgstr "La instrucció no és permesa"
8616
8617-#: sysdeps/generic/siglist.h:33 sysdeps/unix/siglist.c:31
8618+#: sysdeps/generic/siglist.h:32
8619 msgid "Trace/breakpoint trap"
8620 msgstr "Trampa de traçat/punt d’aturada"
8621
8622-#: sysdeps/generic/siglist.h:34
8623+#: sysdeps/generic/siglist.h:33
8624 msgid "Aborted"
8625 msgstr "Avortat"
8626
8627-#: sysdeps/generic/siglist.h:35 sysdeps/unix/siglist.c:34
8628+#: sysdeps/generic/siglist.h:34
8629 msgid "Floating point exception"
8630 msgstr "Excepció de coma flotant"
8631
8632-#: sysdeps/generic/siglist.h:36 sysdeps/unix/siglist.c:35
8633+#: sysdeps/generic/siglist.h:35
8634 msgid "Killed"
8635 msgstr "Matat"
8636
8637-#: sysdeps/generic/siglist.h:37 sysdeps/unix/siglist.c:36
8638+#: sysdeps/generic/siglist.h:36
8639 msgid "Bus error"
8640 msgstr "Error de bus"
8641
8642-#: sysdeps/generic/siglist.h:38 sysdeps/unix/siglist.c:37
8643+#: sysdeps/generic/siglist.h:37
8644 msgid "Segmentation fault"
8645 msgstr "Violació de segment"
8646
8647@@ -5718,108 +5905,107 @@
8648 #. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
8649 #. TRANS or blocked. Thus, your program will never actually see @code{EPIPE}
8650 #. TRANS unless it has handled or blocked @code{SIGPIPE}.
8651-#: sysdeps/generic/siglist.h:39 sysdeps/gnu/errlist.c:359
8652-#: sysdeps/unix/siglist.c:39
8653+#: sysdeps/generic/siglist.h:38 sysdeps/gnu/errlist.c:359
8654 msgid "Broken pipe"
8655 msgstr "La canonada s’ha trencat"
8656
8657-#: sysdeps/generic/siglist.h:40 sysdeps/unix/siglist.c:40
8658+#: sysdeps/generic/siglist.h:39
8659 msgid "Alarm clock"
8660 msgstr "Temporitzador"
8661
8662-#: sysdeps/generic/siglist.h:41 sysdeps/unix/siglist.c:41
8663+#: sysdeps/generic/siglist.h:40
8664 msgid "Terminated"
8665 msgstr "Terminat"
8666
8667-#: sysdeps/generic/siglist.h:42 sysdeps/unix/siglist.c:42
8668+#: sysdeps/generic/siglist.h:41
8669 msgid "Urgent I/O condition"
8670 msgstr "Condició urgent d’E/S"
8671
8672-#: sysdeps/generic/siglist.h:43 sysdeps/unix/siglist.c:43
8673+#: sysdeps/generic/siglist.h:42
8674 msgid "Stopped (signal)"
8675 msgstr "Aturat (senyal)"
8676
8677-#: sysdeps/generic/siglist.h:44 sysdeps/unix/siglist.c:44
8678+#: sysdeps/generic/siglist.h:43
8679 msgid "Stopped"
8680 msgstr "Aturat"
8681
8682-#: sysdeps/generic/siglist.h:45 sysdeps/unix/siglist.c:45
8683+#: sysdeps/generic/siglist.h:44
8684 msgid "Continued"
8685 msgstr "Continuat"
8686
8687-#: sysdeps/generic/siglist.h:46 sysdeps/unix/siglist.c:46
8688+#: sysdeps/generic/siglist.h:45
8689 msgid "Child exited"
8690 msgstr "Un fill ha eixit"
8691
8692-#: sysdeps/generic/siglist.h:47 sysdeps/unix/siglist.c:47
8693+#: sysdeps/generic/siglist.h:46
8694 msgid "Stopped (tty input)"
8695 msgstr "Aturat (esperant entrada del terminal)"
8696
8697-#: sysdeps/generic/siglist.h:48 sysdeps/unix/siglist.c:48
8698+#: sysdeps/generic/siglist.h:47
8699 msgid "Stopped (tty output)"
8700 msgstr "Aturat (esperant escriure al terminal)"
8701
8702 # ivb (2000/10/28)
8703 # ivb És clar, E/S significa «Entrada/Sortida», perquè «Entrada/Eixida»
8704 # ivb queda ambigu (d'açò es diu discriminació objectiva %-P ).
8705-#: sysdeps/generic/siglist.h:49 sysdeps/unix/siglist.c:49
8706+#: sysdeps/generic/siglist.h:48
8707 msgid "I/O possible"
8708 msgstr "L’operació d’E/S és possible"
8709
8710-#: sysdeps/generic/siglist.h:50 sysdeps/unix/siglist.c:50
8711+#: sysdeps/generic/siglist.h:49
8712 msgid "CPU time limit exceeded"
8713 msgstr "S’ha excedit el temps límit de CPU"
8714
8715-#: sysdeps/generic/siglist.h:51 sysdeps/unix/siglist.c:51
8716+#: sysdeps/generic/siglist.h:50
8717 msgid "File size limit exceeded"
8718 msgstr "S’ha excedit la mida màxima de fitxer"
8719
8720-#: sysdeps/generic/siglist.h:52 sysdeps/unix/siglist.c:52
8721+#: sysdeps/generic/siglist.h:51
8722 msgid "Virtual timer expired"
8723 msgstr "Ha expirat el temporitzador virtual"
8724
8725-#: sysdeps/generic/siglist.h:53 sysdeps/unix/siglist.c:53
8726+#: sysdeps/generic/siglist.h:52
8727 msgid "Profiling timer expired"
8728 msgstr "El temps de perfilat ha expirat"
8729
8730-#: sysdeps/generic/siglist.h:54 sysdeps/unix/siglist.c:54
8731-msgid "Window changed"
8732-msgstr "Ha canviat la mida de la finestra"
8733-
8734-#: sysdeps/generic/siglist.h:55 sysdeps/unix/siglist.c:56
8735+#: sysdeps/generic/siglist.h:53
8736 msgid "User defined signal 1"
8737 msgstr "Senyal 1 definit per l’usuari"
8738
8739-#: sysdeps/generic/siglist.h:56 sysdeps/unix/siglist.c:57
8740+#: sysdeps/generic/siglist.h:54
8741 msgid "User defined signal 2"
8742 msgstr "Senyal 2 definit per l’usuari"
8743
8744-#: sysdeps/generic/siglist.h:60 sysdeps/unix/siglist.c:33
8745+#: sysdeps/generic/siglist.h:58
8746 msgid "EMT trap"
8747 msgstr "Trampa EMT"
8748
8749-#: sysdeps/generic/siglist.h:63 sysdeps/unix/siglist.c:38
8750+#: sysdeps/generic/siglist.h:61
8751 msgid "Bad system call"
8752 msgstr "La crida al sistema no és vàlida"
8753
8754-#: sysdeps/generic/siglist.h:66
8755+#: sysdeps/generic/siglist.h:64
8756 msgid "Stack fault"
8757 msgstr "Fallada de pila"
8758
8759-#: sysdeps/generic/siglist.h:69
8760+#: sysdeps/generic/siglist.h:67
8761 msgid "Information request"
8762 msgstr "Petició d’informació"
8763
8764-#: sysdeps/generic/siglist.h:71
8765+#: sysdeps/generic/siglist.h:69
8766 msgid "Power failure"
8767 msgstr "Fallada d’alimentació"
8768
8769 # ivb (2000/10/28)
8770 # ivb Sona més a llenguatge jurídic que a altra cosa...
8771-#: sysdeps/generic/siglist.h:74 sysdeps/unix/siglist.c:55
8772+#: sysdeps/generic/siglist.h:72
8773 msgid "Resource lost"
8774 msgstr "S’ha perdut el recurs"
8775
8776+#: sysdeps/generic/siglist.h:75
8777+msgid "Window changed"
8778+msgstr "Ha canviat la mida de la finestra"
8779+
8780 #. TRANS Operation not permitted; only the owner of the file (or other resource)
8781 #. TRANS or processes with special privileges can perform the operation.
8782 #: sysdeps/gnu/errlist.c:25
8783@@ -5858,8 +6044,8 @@
8784
8785 #. TRANS Argument list too long; used when the arguments passed to a new program
8786 #. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
8787-#. TRANS File}) occupy too much memory space. This condition never arises in the
8788-#. TRANS GNU system.
8789+#. TRANS File}) occupy too much memory space. This condition never arises on
8790+#. TRANS @gnuhurdsystems{}.
8791 #: sysdeps/gnu/errlist.c:94
8792 msgid "Argument list too long"
8793 msgstr "La llista d’arguments és massa llarga"
8794@@ -5899,7 +6085,7 @@
8795 msgstr "No s’ha pogut reservar memòria"
8796
8797 #. TRANS Bad address; an invalid pointer was detected.
8798-#. TRANS In the GNU system, this error never happens; you get a signal instead.
8799+#. TRANS On @gnuhurdsystems{}, this error never happens; you get a signal instead.
8800 #: sysdeps/gnu/errlist.c:167
8801 msgid "Bad address"
8802 msgstr "L’adreça no és vàlida"
8803@@ -5967,7 +6153,7 @@
8804
8805 #. TRANS There are too many distinct file openings in the entire system. Note
8806 #. TRANS that any number of linked channels count as just one file opening; see
8807-#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system.
8808+#. TRANS @ref{Linked Channels}. This error never occurs on @gnuhurdsystems{}.
8809 #: sysdeps/gnu/errlist.c:275
8810 msgid "Too many open files in system"
8811 msgstr "El sistema té massa fitxers oberts"
8812@@ -5982,7 +6168,7 @@
8813 #. TRANS write to a file that is currently being executed. Often using a
8814 #. TRANS debugger to run a program is considered having it open for writing and
8815 #. TRANS will cause this error. (The name stands for ``text file busy''.) This
8816-#. TRANS is not an error in the GNU system; the text is copied as necessary.
8817+#. TRANS is not an error on @gnuhurdsystems{}; the text is copied as necessary.
8818 #: sysdeps/gnu/errlist.c:298
8819 msgid "Text file busy"
8820 msgstr "El fitxer de text es troba ocupat"
8821@@ -6029,7 +6215,7 @@
8822
8823 #. TRANS Resource temporarily unavailable; the call might work if you try again
8824 #. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
8825-#. TRANS they are always the same in the GNU C library.
8826+#. TRANS they are always the same in @theglibc{}.
8827 #. TRANS
8828 #. TRANS This error can happen in a few different situations:
8829 #. TRANS
8830@@ -6060,7 +6246,7 @@
8831 msgid "Resource temporarily unavailable"
8832 msgstr "El recurs no es troba disponible temporalment"
8833
8834-#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above).
8835+#. TRANS In @theglibc{}, this is another name for @code{EAGAIN} (above).
8836 #. TRANS The values are always the same, on every operating system.
8837 #. TRANS
8838 #. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
8839@@ -6123,7 +6309,7 @@
8840
8841 #. TRANS The operation you requested is not supported. Some socket functions
8842 #. TRANS don't make sense for all types of sockets, and others may not be
8843-#. TRANS implemented for all communications protocols. In the GNU system, this
8844+#. TRANS implemented for all communications protocols. On @gnuhurdsystems{}, this
8845 #. TRANS error can happen for many calls when the object does not support the
8846 #. TRANS particular operation; it is a generic indication that the server knows
8847 #. TRANS nothing to do for that call.
8848@@ -6290,7 +6476,7 @@
8849 #. TRANS An attempt was made to NFS-mount a remote file system with a file name that
8850 #. TRANS already specifies an NFS-mounted file.
8851 #. TRANS (This is an error on some operating systems, but we expect it to work
8852-#. TRANS properly on the GNU system, making this error code impossible.)
8853+#. TRANS properly on @gnuhurdsystems{}, making this error code impossible.)
8854 #: sysdeps/gnu/errlist.c:799
8855 msgid "Object is remote"
8856 msgstr "L’objecte és remot"
8857@@ -6321,7 +6507,7 @@
8858 msgstr "El procediment RPC no és vàlid per al programa"
8859
8860 #. TRANS No locks available. This is used by the file locking facilities; see
8861-#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but
8862+#. TRANS @ref{File Locks}. This error is never generated by @gnuhurdsystems{}, but
8863 #. TRANS it can result from an operation to an NFS server running another
8864 #. TRANS operating system.
8865 #: sysdeps/gnu/errlist.c:856
8866@@ -6378,7 +6564,7 @@
8867 msgid "Invalid or incomplete multibyte or wide character"
8868 msgstr "El caràcter estès o multioctet no és vàlid o complet"
8869
8870-#. TRANS In the GNU system, servers supporting the @code{term} protocol return
8871+#. TRANS On @gnuhurdsystems{}, servers supporting the @code{term} protocol return
8872 #. TRANS this error for certain operations when the caller is not in the
8873 #. TRANS foreground process group of the terminal. Users do not usually see this
8874 #. TRANS error because functions such as @code{read} and @code{write} translate
8875@@ -6390,7 +6576,7 @@
8876
8877 # ivb (2000/10/28)
8878 # ivb Doncs que conste que jo no he sigut!
8879-#. TRANS In the GNU system, opening a file returns this error when the file is
8880+#. TRANS On @gnuhurdsystems{}, opening a file returns this error when the file is
8881 #. TRANS translated by a program and the translator program dies while starting
8882 #. TRANS up, before it has connected to the file.
8883 #: sysdeps/gnu/errlist.c:955
8884@@ -6664,10 +6850,14 @@
8885 msgid "Operation not possible due to RF-kill"
8886 msgstr "L’operació no és possible degut a RFKill"
8887
8888+#: sysdeps/gnu/errlist.c:1469
8889+msgid "Memory page has hardware error"
8890+msgstr "La pàgina de memòria té un error de maquinari"
8891+
8892 # ivb (2001/10/28)
8893 # ivb Codi -> sembla que aquesta és la traducció correcta, ja que tracta
8894 # ivb d'identificar l'error dins un vector de sistemes d'errors del mach. (?)
8895-#: sysdeps/mach/_strerror.c:57
8896+#: sysdeps/mach/_strerror.c:56
8897 msgid "Error in unknown error system: "
8898 msgstr "Error en un sistema d’errors desconegut: "
8899
8900@@ -6739,26 +6929,13 @@
8901 msgid "Parameter string not correctly encoded"
8902 msgstr "La cadena paràmetre no té una codificació vàlida"
8903
8904-#: sysdeps/unix/siglist.c:26
8905-msgid "Signal 0"
8906-msgstr "Senyal 0"
8907-
8908-#: sysdeps/unix/siglist.c:32
8909-msgid "IOT trap"
8910-msgstr "Trampa IOT"
8911-
8912-#: sysdeps/unix/sysv/linux/i386/readelflib.c:49
8913+#: sysdeps/unix/sysv/linux/i386/readelflib.c:65
8914 #, c-format
8915 msgid "%s is for unknown machine %d.\n"
8916 msgstr "«%s» és per a la màquina desconeguda %d\n"
8917
8918-#: sysdeps/unix/sysv/linux/ia64/makecontext.c:63
8919+#: sysdeps/unix/sysv/linux/lddlibc4.c:60
8920 #, c-format
8921-msgid "makecontext: does not know how to handle more than 8 arguments\n"
8922-msgstr "makecontext: no es poden tractar més de 8 arguments\n"
8923-
8924-#: sysdeps/unix/sysv/linux/lddlibc4.c:61
8925-#, c-format
8926 msgid ""
8927 "Usage: lddlibc4 FILE\n"
8928 "\n"
8929@@ -6766,81 +6943,81 @@
8930 "Forma d’ús: lddlibc4 FITXER\n"
8931 "\n"
8932
8933-#: sysdeps/unix/sysv/linux/lddlibc4.c:82
8934+#: sysdeps/unix/sysv/linux/lddlibc4.c:81
8935 #, c-format
8936 msgid "cannot open `%s'"
8937 msgstr "no s’ha pogut obrir «%s»"
8938
8939-#: sysdeps/unix/sysv/linux/lddlibc4.c:86
8940+#: sysdeps/unix/sysv/linux/lddlibc4.c:85
8941 #, c-format
8942 msgid "cannot read header from `%s'"
8943 msgstr "no s’ha pogut llegir la capçalera de «%s»"
8944
8945-#: timezone/zdump.c:215
8946+#: timezone/zdump.c:246
8947 msgid "lacks alphabetic at start"
8948 msgstr "no comença per un caràcter alfabètic"
8949
8950-#: timezone/zdump.c:217
8951+#: timezone/zdump.c:248
8952 msgid "has fewer than 3 alphabetics"
8953 msgstr "té menys de 3 caràcters alfabètics"
8954
8955-#: timezone/zdump.c:219
8956+#: timezone/zdump.c:250
8957 msgid "has more than 6 alphabetics"
8958 msgstr "té més de 6 caràcters alfabètics"
8959
8960-#: timezone/zdump.c:227
8961+#: timezone/zdump.c:258
8962 msgid "differs from POSIX standard"
8963 msgstr "difereix de l’estàndard POSIX"
8964
8965 # FIXME: language-dependent
8966 # La cadena final és una de les anteriors. ivb
8967-#: timezone/zdump.c:233
8968+#: timezone/zdump.c:264
8969 #, c-format
8970 msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
8971 msgstr "%1$s: avís: l’abreviatura «%3$s» de la zona «%2$s» %4$s\n"
8972
8973-#: timezone/zdump.c:242
8974+#: timezone/zdump.c:273
8975 #, c-format
8976 msgid ""
8977 "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
8978 "\n"
8979-"Report bugs to tz@elsie.nci.nih.gov.\n"
8980+"Report bugs to %s.\n"
8981 msgstr ""
8982 "%s: forma d’ús: %s [--version] [--help] [-v] [-c [ANY_INF,]ANY_SUP]\n"
8983 "\tNOM_DE_ZONA…\n"
8984 "\n"
8985-"Informeu dels errors a tz@elsie.nci.nih.gov.\n"
8986+"Informeu dels errors a %s.\n"
8987
8988-#: timezone/zdump.c:311
8989+#: timezone/zdump.c:340
8990 #, c-format
8991 msgid "%s: wild -c argument %s\n"
8992 msgstr "%s: l’argument de l’opció «-c» no és vàlid: %s\n"
8993
8994-#: timezone/zdump.c:398
8995+#: timezone/zdump.c:426
8996 msgid "Error writing to standard output"
8997 msgstr "error en escriure a l’eixida estàndard"
8998
8999-#: timezone/zdump.c:421
9000+#: timezone/zdump.c:439
9001 #, c-format
9002 msgid "%s: use of -v on system with floating time_t other than float or double\n"
9003 msgstr "%s: no es pot emprar «-v» ja que «time_t» en aquest sistema és un tipus flotant diferent de «float» i «double»\n"
9004
9005-#: timezone/zic.c:388
9006+#: timezone/zic.c:361
9007 #, c-format
9008 msgid "%s: Memory exhausted: %s\n"
9009 msgstr "%s: la memòria s’ha exhaurit: %s\n"
9010
9011-#: timezone/zic.c:434
9012+#: timezone/zic.c:401
9013 #, c-format
9014 msgid "\"%s\", line %d: %s"
9015 msgstr "«%s», línia %d: %s"
9016
9017-#: timezone/zic.c:437
9018+#: timezone/zic.c:404
9019 #, c-format
9020 msgid " (rule from \"%s\", line %d)"
9021 msgstr " (regla de «%s», línia %d)"
9022
9023-#: timezone/zic.c:449
9024+#: timezone/zic.c:415
9025 msgid "warning: "
9026 msgstr "avís: "
9027
9028@@ -6848,355 +7025,355 @@
9029 # ivb Deixe algunes paraules per traduir perquè es refereixen a paraules
9030 # ivb reservades dels fitxers amb què treballa zic.
9031 # Sembla que la barra al final de la línia no pinta res. ivb
9032-#: timezone/zic.c:459
9033+#: timezone/zic.c:425
9034 #, c-format
9035 msgid ""
9036 "%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
9037 "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
9038 "\n"
9039-"Report bugs to tz@elsie.nci.nih.gov.\n"
9040+"Report bugs to %s.\n"
9041 msgstr ""
9042 "%s: forma d’ús: %s [--version] [--help] [-s] [-v] [-l localtime]\n"
9043 "\t[-p posixrules] [-d DIRECTORI] [-L FITXER_SEGONS_INTERCALARS]\n"
9044 "\t[-y yearistype] [FITXER…]\n"
9045 "\n"
9046-"Informeu dels errors a tz@elsie.nci.nih.gov.\n"
9047+"Informeu dels errors a %s.\n"
9048
9049-#: timezone/zic.c:496
9050+#: timezone/zic.c:460
9051 msgid "wild compilation-time specification of zic_t"
9052 msgstr "l’especificació de «zic_t» en temps de compiŀlació no és vàlida"
9053
9054-#: timezone/zic.c:515
9055+#: timezone/zic.c:479
9056 #, c-format
9057 msgid "%s: More than one -d option specified\n"
9058 msgstr "%s: s’ha indicat l’opció «-d» més d’una volta\n"
9059
9060-#: timezone/zic.c:525
9061+#: timezone/zic.c:489
9062 #, c-format
9063 msgid "%s: More than one -l option specified\n"
9064 msgstr "%s: s’ha indicat l’opció «-l» més d’una volta\n"
9065
9066-#: timezone/zic.c:535
9067+#: timezone/zic.c:499
9068 #, c-format
9069 msgid "%s: More than one -p option specified\n"
9070 msgstr "%s: s’ha indicat l’opció «-p» més d’una volta\n"
9071
9072-#: timezone/zic.c:545
9073+#: timezone/zic.c:509
9074 #, c-format
9075 msgid "%s: More than one -y option specified\n"
9076 msgstr "%s: s’ha indicat l’opció «-y» més d’una volta\n"
9077
9078-#: timezone/zic.c:555
9079+#: timezone/zic.c:519
9080 #, c-format
9081 msgid "%s: More than one -L option specified\n"
9082 msgstr "%s: s’ha indicat l’opció «-L» més d’una volta\n"
9083
9084-#: timezone/zic.c:604
9085+#: timezone/zic.c:566
9086 msgid "link to link"
9087 msgstr "enllaç a un altre enllaç"
9088
9089-#: timezone/zic.c:669
9090+#: timezone/zic.c:629
9091 msgid "hard link failed, symbolic link used"
9092 msgstr "no s’ha pogut crear un enllaç fort, se n’ha emprat un de simbòlic"
9093
9094-#: timezone/zic.c:677
9095+#: timezone/zic.c:637
9096 #, c-format
9097 msgid "%s: Can't link from %s to %s: %s\n"
9098 msgstr "%s: no s’ha pogut crear un enllaç des de «%s» cap a «%s»: %s\n"
9099
9100-#: timezone/zic.c:749 timezone/zic.c:751
9101+#: timezone/zic.c:697 timezone/zic.c:699
9102 msgid "same rule name in multiple files"
9103 msgstr "el mateix nom de regla és repetit a diversos fitxers"
9104
9105-#: timezone/zic.c:792
9106+#: timezone/zic.c:740
9107 msgid "unruly zone"
9108 msgstr "la zona no té regles"
9109
9110-#: timezone/zic.c:799
9111+#: timezone/zic.c:747
9112 #, c-format
9113 msgid "%s in ruleless zone"
9114 msgstr "«%s» en una zona sense regles"
9115
9116-#: timezone/zic.c:820
9117+#: timezone/zic.c:767
9118 msgid "standard input"
9119 msgstr "entrada estàndard"
9120
9121-#: timezone/zic.c:825
9122+#: timezone/zic.c:772
9123 #, c-format
9124 msgid "%s: Can't open %s: %s\n"
9125 msgstr "%s: no s’ha pogut obrir «%s»: %s\n"
9126
9127-#: timezone/zic.c:836
9128+#: timezone/zic.c:783
9129 msgid "line too long"
9130 msgstr "la línia és massa llarga"
9131
9132-#: timezone/zic.c:856
9133+#: timezone/zic.c:803
9134 msgid "input line of unknown type"
9135 msgstr "la línia introduïda pertany a un tipus desconegut"
9136
9137-#: timezone/zic.c:872
9138+#: timezone/zic.c:819
9139 #, c-format
9140 msgid "%s: Leap line in non leap seconds file %s\n"
9141 msgstr "%s: línia «Leap» en fitxer no de segons intercalars «%s»\n"
9142
9143-#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
9144+#: timezone/zic.c:826 timezone/zic.c:1243 timezone/zic.c:1265
9145 #, c-format
9146 msgid "%s: panic: Invalid l_value %d\n"
9147 msgstr "%s: pànic: el valor esquerre %d no és vàlid\n"
9148
9149-#: timezone/zic.c:887
9150+#: timezone/zic.c:834
9151 #, c-format
9152 msgid "%s: Error reading %s\n"
9153 msgstr "%s: error en llegir «%s»\n"
9154
9155-#: timezone/zic.c:894
9156+#: timezone/zic.c:841
9157 #, c-format
9158 msgid "%s: Error closing %s: %s\n"
9159 msgstr "%s: error en tancar «%s»: %s\n"
9160
9161-#: timezone/zic.c:899
9162+#: timezone/zic.c:846
9163 msgid "expected continuation line not found"
9164 msgstr "cal una línia de continuació, però se’n troba cap"
9165
9166-#: timezone/zic.c:943 timezone/zic.c:2480 timezone/zic.c:2499
9167+#: timezone/zic.c:887 timezone/zic.c:2411 timezone/zic.c:2425
9168 msgid "time overflow"
9169 msgstr "desbordament de l’hora"
9170
9171-#: timezone/zic.c:947
9172+#: timezone/zic.c:891
9173 msgid "24:00 not handled by pre-1998 versions of zic"
9174 msgstr "les versions de «zic» anteriors a 1998 no admeten «24:00»"
9175
9176-#: timezone/zic.c:950
9177+#: timezone/zic.c:894
9178 msgid "values over 24 hours not handled by pre-2007 versions of zic"
9179 msgstr "les versions de «zic» anteriors a 2007 no admeten valors majors que 24 hores"
9180
9181-#: timezone/zic.c:963
9182+#: timezone/zic.c:905
9183 msgid "wrong number of fields on Rule line"
9184 msgstr "el nombre de camps de la línia «Rule» és incorrecte"
9185
9186-#: timezone/zic.c:967
9187+#: timezone/zic.c:909
9188 msgid "nameless rule"
9189 msgstr "la regla no té nom"
9190
9191-#: timezone/zic.c:972
9192+#: timezone/zic.c:914
9193 msgid "invalid saved time"
9194 msgstr "el temps estalviat no és vàlid"
9195
9196-#: timezone/zic.c:993
9197+#: timezone/zic.c:932
9198 msgid "wrong number of fields on Zone line"
9199 msgstr "el nombre de camps de la línia «Zone» no és correcte"
9200
9201-#: timezone/zic.c:999
9202+#: timezone/zic.c:938
9203 #, c-format
9204 msgid "\"Zone %s\" line and -l option are mutually exclusive"
9205 msgstr "la línia «Zone %s» i l’opció «-l» són mútuament excloents"
9206
9207-#: timezone/zic.c:1007
9208+#: timezone/zic.c:946
9209 #, c-format
9210 msgid "\"Zone %s\" line and -p option are mutually exclusive"
9211 msgstr "la línia «Zone %s» i l’opció «-p» són mútuament excloents"
9212
9213-#: timezone/zic.c:1019
9214+#: timezone/zic.c:958
9215 #, c-format
9216 msgid "duplicate zone name %s (file \"%s\", line %d)"
9217 msgstr "el nom de zona «%s» (fitxer «%s», línia %d) és duplicat"
9218
9219-#: timezone/zic.c:1035
9220+#: timezone/zic.c:972
9221 msgid "wrong number of fields on Zone continuation line"
9222 msgstr "el nombre de camps de la línia de continuació de «Zone» no és correcte"
9223
9224-#: timezone/zic.c:1075
9225+#: timezone/zic.c:1009
9226 msgid "invalid UTC offset"
9227 msgstr "el desplaçament d’UTC no és vàlid"
9228
9229-#: timezone/zic.c:1078
9230+#: timezone/zic.c:1012
9231 msgid "invalid abbreviation format"
9232 msgstr "el format de l’abreviatura no és vàlid"
9233
9234-#: timezone/zic.c:1107
9235+#: timezone/zic.c:1041
9236 msgid "Zone continuation line end time is not after end time of previous line"
9237 msgstr "el temps final de la línia de continuació de «Zone» no ve darrere del temps final de la línia anterior"
9238
9239-#: timezone/zic.c:1135
9240+#: timezone/zic.c:1066
9241 msgid "wrong number of fields on Leap line"
9242 msgstr "el nombre de camps de la línia «Leap» no és correcte"
9243
9244-#: timezone/zic.c:1144
9245+#: timezone/zic.c:1075
9246 msgid "invalid leaping year"
9247 msgstr "l’any bixest no és vàlid"
9248
9249-#: timezone/zic.c:1164 timezone/zic.c:1270
9250+#: timezone/zic.c:1095 timezone/zic.c:1197
9251 msgid "invalid month name"
9252 msgstr "el nom del mes no és vàlid"
9253
9254-#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
9255+#: timezone/zic.c:1108 timezone/zic.c:1310 timezone/zic.c:1324
9256 msgid "invalid day of month"
9257 msgstr "el dia del mes no és vàlid"
9258
9259-#: timezone/zic.c:1182
9260+#: timezone/zic.c:1113
9261 msgid "time before zero"
9262 msgstr "l’hora és anterior a zero"
9263
9264-#: timezone/zic.c:1186
9265+#: timezone/zic.c:1117
9266 msgid "time too small"
9267 msgstr "l’hora és massa menuda"
9268
9269-#: timezone/zic.c:1190
9270+#: timezone/zic.c:1121
9271 msgid "time too large"
9272 msgstr "l’hora és massa gran"
9273
9274-#: timezone/zic.c:1194 timezone/zic.c:1299
9275+#: timezone/zic.c:1125 timezone/zic.c:1226
9276 msgid "invalid time of day"
9277 msgstr "l’hora del dia no és vàlida"
9278
9279-#: timezone/zic.c:1213
9280+#: timezone/zic.c:1144
9281 msgid "illegal CORRECTION field on Leap line"
9282 msgstr "el camp de correcció de la línia de «Leap» no és vàlid"
9283
9284-#: timezone/zic.c:1218
9285+#: timezone/zic.c:1149
9286 msgid "illegal Rolling/Stationary field on Leap line"
9287 msgstr "el camp «Rolling/Stationary» de la línia «Leap» no és vàlid"
9288
9289-#: timezone/zic.c:1234
9290+#: timezone/zic.c:1163
9291 msgid "wrong number of fields on Link line"
9292 msgstr "el nombre de camps de la línia «Link» no és correcte"
9293
9294 # El nom del camp no és una paraula clau del fitxer. ivb
9295-#: timezone/zic.c:1238
9296+#: timezone/zic.c:1167
9297 msgid "blank FROM field on Link line"
9298 msgstr "el camp d’inici de la línia «Link» és buit"
9299
9300 # El nom del camp no és una paraula clau del fitxer. ivb
9301-#: timezone/zic.c:1242
9302+#: timezone/zic.c:1171
9303 msgid "blank TO field on Link line"
9304 msgstr "el camp d’acabament de la línia «Link» és buit"
9305
9306-#: timezone/zic.c:1320
9307+#: timezone/zic.c:1247
9308 msgid "invalid starting year"
9309 msgstr "l’any de començament no és vàlid"
9310
9311-#: timezone/zic.c:1342
9312+#: timezone/zic.c:1269
9313 msgid "invalid ending year"
9314 msgstr "l’any d’acabament no és vàlid"
9315
9316-#: timezone/zic.c:1346
9317+#: timezone/zic.c:1273
9318 msgid "starting year greater than ending year"
9319 msgstr "l’any de començament és major que el d’acabament"
9320
9321-#: timezone/zic.c:1353
9322+#: timezone/zic.c:1280
9323 msgid "typed single year"
9324 msgstr "s’ha especificat un sol any"
9325
9326-#: timezone/zic.c:1388
9327+#: timezone/zic.c:1315
9328 msgid "invalid weekday name"
9329 msgstr "el nom del dia de la setmana no és vàlid"
9330
9331-#: timezone/zic.c:1566
9332+#: timezone/zic.c:1481
9333 #, c-format
9334 msgid "%s: Can't remove %s: %s\n"
9335 msgstr "%s: no s’ha pogut eliminar «%s»: %s\n"
9336
9337-#: timezone/zic.c:1576
9338+#: timezone/zic.c:1491
9339 #, c-format
9340 msgid "%s: Can't create %s: %s\n"
9341 msgstr "%s: no s’ha pogut crear «%s»: %s\n"
9342
9343-#: timezone/zic.c:1726
9344+#: timezone/zic.c:1683
9345 #, c-format
9346 msgid "%s: Error writing %s\n"
9347 msgstr "%s: error en escriure «%s»\n"
9348
9349-#: timezone/zic.c:2019
9350+#: timezone/zic.c:1964
9351 msgid "no POSIX environment variable for zone"
9352 msgstr "no s’ha establert una variable d’entorn POSIX per a la zona"
9353
9354-#: timezone/zic.c:2176
9355+#: timezone/zic.c:2131
9356 msgid "can't determine time zone abbreviation to use just after until time"
9357 msgstr "no s’ha pogut determinar l’abreviatura de zona horària a emprar just després de la data límit (until)"
9358
9359-#: timezone/zic.c:2222
9360+#: timezone/zic.c:2175
9361 msgid "too many transitions?!"
9362 msgstr "hi ha massa transicions?!"
9363
9364-#: timezone/zic.c:2241
9365+#: timezone/zic.c:2190
9366 msgid "internal error - addtype called with bad isdst"
9367 msgstr "error intern: s’ha cridat addtype() amb un valor erroni per a «isdst»"
9368
9369-#: timezone/zic.c:2245
9370+#: timezone/zic.c:2194
9371 msgid "internal error - addtype called with bad ttisstd"
9372 msgstr "error intern: s’ha cridat addtype() amb un valor erroni per a «ttisstd»"
9373
9374-#: timezone/zic.c:2249
9375+#: timezone/zic.c:2198
9376 msgid "internal error - addtype called with bad ttisgmt"
9377 msgstr "error intern: s’ha cridat addtype() amb un valor erroni per a «ttisgmt»"
9378
9379-#: timezone/zic.c:2268
9380+#: timezone/zic.c:2217
9381 msgid "too many local time types"
9382 msgstr "hi ha massa tipus d’hora local"
9383
9384-#: timezone/zic.c:2272
9385+#: timezone/zic.c:2221
9386 msgid "UTC offset out of range"
9387 msgstr "el desplaçament respecte UTC és fora de rang"
9388
9389-#: timezone/zic.c:2300
9390+#: timezone/zic.c:2245
9391 msgid "too many leap seconds"
9392 msgstr "hi ha massa segons intercalars"
9393
9394-#: timezone/zic.c:2306
9395+#: timezone/zic.c:2251
9396 msgid "repeated leap second moment"
9397 msgstr "el moment de segon intercalar és repetit"
9398
9399-#: timezone/zic.c:2358
9400+#: timezone/zic.c:2301
9401 msgid "Wild result from command execution"
9402 msgstr "l’execució de l’ordre ha donat un resultat estrany"
9403
9404-#: timezone/zic.c:2359
9405+#: timezone/zic.c:2302
9406 #, c-format
9407 msgid "%s: command was '%s', result was %d\n"
9408 msgstr "%s: l’ordre ha estat «%s», el resultat ha estat %d\n"
9409
9410 # ivb (2001/10/30)
9411 # ivb Es refereix a les cometes dobles «"».
9412-#: timezone/zic.c:2457
9413+#: timezone/zic.c:2393
9414 msgid "Odd number of quotation marks"
9415 msgstr "el nombre de cometes és senar"
9416
9417-#: timezone/zic.c:2546
9418+#: timezone/zic.c:2470
9419 msgid "use of 2/29 in non leap-year"
9420 msgstr "s’ha emprat el dia 29 de febrer en un any no bixest"
9421
9422-#: timezone/zic.c:2581
9423+#: timezone/zic.c:2505
9424 msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
9425 msgstr "la regla va més enllà de l’inici o fi del mes; no funcionarà en les versions de «zic» anteriors a 2004"
9426
9427-#: timezone/zic.c:2613
9428+#: timezone/zic.c:2536
9429 msgid "time zone abbreviation lacks alphabetic at start"
9430 msgstr "l’abreviatura de la zona horària no comença per un caràcter alfabètic"
9431
9432-#: timezone/zic.c:2615
9433-msgid "time zone abbreviation has more than 3 alphabetics"
9434-msgstr "l’abreviatura de la zona horària té més de 3 caràcters alfabètics"
9435+#: timezone/zic.c:2538
9436+msgid "time zone abbreviation has fewer than 3 alphabetics"
9437+msgstr "l’abreviatura de la zona horària té menys de 3 caràcters alfabètics"
9438
9439-#: timezone/zic.c:2617
9440+#: timezone/zic.c:2540
9441 msgid "time zone abbreviation has too many alphabetics"
9442 msgstr "l’abreviatura de la zona horària té massa caràcters alfabètics"
9443
9444-#: timezone/zic.c:2627
9445+#: timezone/zic.c:2550
9446 msgid "time zone abbreviation differs from POSIX standard"
9447 msgstr "l’abreviatura de la zona horària difereix de l’estàndard POSIX"
9448
9449-#: timezone/zic.c:2639
9450+#: timezone/zic.c:2562
9451 msgid "too many, or too long, time zone abbreviations"
9452 msgstr "hi ha massa abreviatures de zona horària (o són massa llargues)"
9453
9454-#: timezone/zic.c:2680
9455+#: timezone/zic.c:2602
9456 #, c-format
9457 msgid "%s: Can't create directory %s: %s\n"
9458 msgstr "%s: no s’ha pogut crear el directori «%s»: %s\n"
9459
9460 # ivb (2001/10/28)
9461 # ivb Resulta d'assignar un «int» a un «long».
9462-#: timezone/zic.c:2702
9463+#: timezone/zic.c:2623
9464 #, c-format
9465 msgid "%s: %d did not sign extend correctly\n"
9466 msgstr "%s: el signe de %d no s’ha estès correctament\n"
9467
9468Property changes on: .
9469___________________________________________________________________
9470Modified: svn:mergeinfo
9471 Merged /fsf/glibc-2_17-branch:r22064-22177
9472
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-svn-arm-lowlevellock-include-tls.patch
new file mode 100644
index 0000000000..4313aa5197
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/eglibc-svn-arm-lowlevellock-include-tls.patch
@@ -0,0 +1,21 @@
1In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
2../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
3../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM'
4../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function)
5../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once
6../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.)
7../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function)
8make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1
9
10Upstream-Status: Pending
11
12--- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig
13+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
14@@ -25,6 +25,7 @@
15 #include <atomic.h>
16 #include <sysdep.h>
17 #include <kernel-features.h>
18+#include <tls.h>
19
20 #define FUTEX_WAIT 0
21 #define FUTEX_WAKE 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.17/eglibc_fix_findidx_parameters.patch
new file mode 100644
index 0000000000..bbf4605505
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/eglibc_fix_findidx_parameters.patch
@@ -0,0 +1,38 @@
1Upstream-Status: backport
2
3Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html
4
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
62012/05/09
7
8Index: libc/posix/xregex.c
9===================================================================
10--- libc.orig/posix/xregex.c
11+++ libc/posix/xregex.c
12@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P
13 _NL_CURRENT (LC_COLLATE,
14 _NL_COLLATE_INDIRECTWC);
15
16- idx = findidx ((const wint_t**)&cp);
17+ idx = findidx ((const wint_t**)&cp, -1);
18 if (idx == 0 || cp < (wint_t*) str + c1)
19 /* This is no valid character. */
20 FREE_STACK_RETURN (REG_ECOLLATE);
21@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P
22 indirect = (const int32_t *)
23 _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
24
25- idx = findidx (&cp);
26+ idx = findidx (&cp, -1);
27 if (idx == 0 || cp < str + c1)
28 /* This is no valid character. */
29 FREE_STACK_RETURN (REG_ECOLLATE);
30@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt
31 }
32 str_buf[i] = TRANSLATE(*(d+i));
33 str_buf[i+1] = '\0'; /* sentinel */
34- idx2 = findidx ((const wint_t**)&cp);
35+ idx2 = findidx ((const wint_t**)&cp, -1);
36 }
37
38 /* Update d, however d will be incremented at
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.17/etc/ld.so.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/etc/ld.so.conf
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.17/fileops-without-wchar-io.patch
new file mode 100644
index 0000000000..2ca0bca248
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/fileops-without-wchar-io.patch
@@ -0,0 +1,22 @@
1Fix error like
2
3/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen':
4/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal'
5collect2: error: ld returned 1 exit status
6
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Upstream-Status: Pending
10Index: libc/libio/fileops.c
11===================================================================
12--- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700
13+++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700
14@@ -428,7 +428,7 @@
15 result->_mode = 1;
16 #else
17 /* Treat this as if we couldn't find the given character set. */
18- (void) INTUSE(_IO_file_close_it) (fp);
19+ (void) _IO_file_close_it (fp);
20 __set_errno (EINVAL);
21 return NULL;
22 #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/fix-tibetian-locales.patch b/meta/recipes-core/eglibc/eglibc-2.17/fix-tibetian-locales.patch
new file mode 100644
index 0000000000..25c43a9fe6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/fix-tibetian-locales.patch
@@ -0,0 +1,38 @@
1cross localedef fails to compile these locales because name_fmt field is empty
2It is not acceptable for cross localedef and it errors out
3
4LC_NAME: field `name_fmt' not defined
5
6We therefore give a dummy string to the format, the real fix needs some native
7tibetian person to define proper name_fmt
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13Index: libc/localedata/locales/bo_CN
14===================================================================
15--- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800
16+++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800
17@@ -145,7 +145,7 @@
18 LC_NAME
19 % FIXME
20
21-name_fmt ""
22+name_fmt "FIXME"
23 % name_gen "FIXME"
24 % name_miss "FIXME"
25 % name_mr "FIXME"
26Index: libc/localedata/locales/bo_IN
27===================================================================
28--- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800
29+++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800
30@@ -70,7 +70,7 @@
31
32 LC_NAME
33 % FIXME
34-name_fmt ""
35+name_fmt "FIXME"
36 % name_gen "FIXME"
37 % name_miss "FIXME"
38 % name_mr "FIXME"
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/fix_for_centos_5.8.patch b/meta/recipes-core/eglibc/eglibc-2.17/fix_for_centos_5.8.patch
new file mode 100644
index 0000000000..7618c99534
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/fix_for_centos_5.8.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Inappropriate [other]
2
3This is a hack to fix building the locale bits on an older
4CentOs 5.X machine
5
6Index: eglibc-2_16/libc/locale/programs/config.h
7===================================================================
8--- eglibc-2_16.orig/libc/locale/programs/config.h
9+++ eglibc-2_16/libc/locale/programs/config.h
10@@ -19,6 +19,8 @@
11 #ifndef _LD_CONFIG_H
12 #define _LD_CONFIG_H 1
13
14+#define DUMMY_LOCALE_T
15+
16 /* Use the internal textdomain used for libc messages. */
17 #define PACKAGE _libc_intl_domainname
18 #ifndef VERSION
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.17/fsl-ppc-no-fsqrt.patch
new file mode 100644
index 0000000000..511ee9d19e
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/fsl-ppc-no-fsqrt.patch
@@ -0,0 +1,100 @@
1Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core
2We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its
3already defined before redefining it. This way we can ensure that on e5500 builds it wont
4emit fsqrt intructions
5
6-Khem
7
8Upstream-Status: Pending
9
10Index: libc/sysdeps/powerpc/fpu/math_private.h
11===================================================================
12--- libc.orig/sysdeps/powerpc/fpu/math_private.h
13+++ libc/sysdeps/powerpc/fpu/math_private.h
14@@ -25,10 +25,12 @@
15 #include <dl-procinfo.h>
16 #include_next <math_private.h>
17
18-# if __WORDSIZE == 64 || defined _ARCH_PWR4
19-# define __CPU_HAS_FSQRT 1
20-# else
21-# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
22+# ifndef __CPU_HAS_FSQRT
23+# if __WORDSIZE == 64 || defined _ARCH_PWR4
24+# define __CPU_HAS_FSQRT 1
25+# else
26+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
27+# endif
28 # endif
29
30 extern double __slow_ieee754_sqrt (double);
31Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
32===================================================================
33--- /dev/null
34+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
35@@ -0,0 +1,9 @@
36+#ifndef _E5500_MATH_PRIVATE_H_
37+#define _E5500_MATH_PRIVATE_H_ 1
38+/* E5500 core FPU does not implement
39+ fsqrt */
40+
41+#define __CPU_HAS_FSQRT 0
42+#include_next <math_private.h>
43+
44+#endif /* _E5500_MATH_PRIVATE_H_ */
45Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
46===================================================================
47--- /dev/null
48+++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
49@@ -0,0 +1,9 @@
50+#ifndef _E6500_MATH_PRIVATE_H_
51+#define _E6500_MATH_PRIVATE_H_ 1
52+/* E6500 core FPU does not implement
53+ fsqrt */
54+
55+#define __CPU_HAS_FSQRT 0
56+#include_next <math_private.h>
57+
58+#endif /* _E6500_MATH_PRIVATE_H_ */
59Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
60===================================================================
61--- /dev/null
62+++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
63@@ -0,0 +1,9 @@
64+#ifndef _E500MC_MATH_PRIVATE_H_
65+#define _E500MC_MATH_PRIVATE_H_ 1
66+/* E500MC core FPU does not implement
67+ fsqrt */
68+
69+#define __CPU_HAS_FSQRT 0
70+#include_next <math_private.h>
71+
72+#endif /* _E500MC_MATH_PRIVATE_H_ */
73Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
74===================================================================
75--- /dev/null
76+++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
77@@ -0,0 +1,9 @@
78+#ifndef _E5500_MATH_PRIVATE_H_
79+#define _E5500_MATH_PRIVATE_H_ 1
80+/* E5500 core FPU does not implement
81+ fsqrt */
82+
83+#define __CPU_HAS_FSQRT 0
84+#include_next <math_private.h>
85+
86+#endif /* _E5500_MATH_PRIVATE_H_ */
87Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
88===================================================================
89--- /dev/null
90+++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
91@@ -0,0 +1,9 @@
92+#ifndef _E6500_MATH_PRIVATE_H_
93+#define _E6500_MATH_PRIVATE_H_ 1
94+/* E6500 core FPU does not implement
95+ fsqrt */
96+
97+#define __CPU_HAS_FSQRT 0
98+#include_next <math_private.h>
99+
100+#endif /* _E6500_MATH_PRIVATE_H_ */
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.17/generate-supported.mk
new file mode 100644
index 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/generate-supported.mk
@@ -0,0 +1,11 @@
1#!/usr/bin/make
2
3include $(IN)
4
5all:
6 rm -f $(OUT)
7 touch $(OUT)
8 for locale in $(SUPPORTED-LOCALES); do \
9 [ $$locale = true ] && continue; \
10 echo $$locale | sed 's,/, ,' >> $(OUT); \
11 done
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/glibc.fix_sqrt2.patch b/meta/recipes-core/eglibc/eglibc-2.17/glibc.fix_sqrt2.patch
new file mode 100644
index 0000000000..a66972998c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/glibc.fix_sqrt2.patch
@@ -0,0 +1,1491 @@
1Signed-of-by: Edmar Wienskoski <edmar@freescale.com>
2Upstream-Status: Pending
3
4diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
5--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
6+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500
7@@ -0,0 +1,134 @@
8+/* Double-precision floating point square root.
9+ Copyright (C) 2010 Free Software Foundation, Inc.
10+ This file is part of the GNU C Library.
11+
12+ The GNU C Library is free software; you can redistribute it and/or
13+ modify it under the terms of the GNU Lesser General Public
14+ License as published by the Free Software Foundation; either
15+ version 2.1 of the License, or (at your option) any later version.
16+
17+ The GNU C Library is distributed in the hope that it will be useful,
18+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20+ Lesser General Public License for more details.
21+
22+ You should have received a copy of the GNU Lesser General Public
23+ License along with the GNU C Library; if not, write to the Free
24+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25+ 02111-1307 USA. */
26+
27+#include <math.h>
28+#include <math_private.h>
29+#include <fenv_libc.h>
30+#include <inttypes.h>
31+
32+#include <sysdep.h>
33+#include <ldsodefs.h>
34+
35+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
36+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
37+static const float two108 = 3.245185536584267269e+32;
38+static const float twom54 = 5.551115123125782702e-17;
39+static const float half = 0.5;
40+
41+/* The method is based on the descriptions in:
42+
43+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
44+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
45+
46+ We find the actual square root and half of its reciprocal
47+ simultaneously. */
48+
49+#ifdef __STDC__
50+double
51+__ieee754_sqrt (double b)
52+#else
53+double
54+__ieee754_sqrt (b)
55+ double b;
56+#endif
57+{
58+ if (__builtin_expect (b > 0, 1))
59+ {
60+ double y, g, h, d, r;
61+ ieee_double_shape_type u;
62+
63+ if (__builtin_expect (b != a_inf.value, 1))
64+ {
65+ fenv_t fe;
66+
67+ fe = fegetenv_register ();
68+
69+ u.value = b;
70+
71+ relax_fenv_state ();
72+
73+ __asm__ ("frsqrte %[estimate], %[x]\n"
74+ : [estimate] "=f" (y) : [x] "f" (b));
75+
76+ /* Following Muller et al, page 168, equation 5.20.
77+
78+ h goes to 1/(2*sqrt(b))
79+ g goes to sqrt(b).
80+
81+ We need three iterations to get within 1ulp. */
82+
83+ /* Indicate that these can be performed prior to the branch. GCC
84+ insists on sinking them below the branch, however; it seems like
85+ they'd be better before the branch so that we can cover any latency
86+ from storing the argument and loading its high word. Oh well. */
87+
88+ g = b * y;
89+ h = 0.5 * y;
90+
91+ /* Handle small numbers by scaling. */
92+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
93+ return __ieee754_sqrt (b * two108) * twom54;
94+
95+#define FMADD(a_, c_, b_) \
96+ ({ double __r; \
97+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
98+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
99+ __r;})
100+#define FNMSUB(a_, c_, b_) \
101+ ({ double __r; \
102+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
103+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
104+ __r;})
105+
106+ r = FNMSUB (g, h, half);
107+ g = FMADD (g, r, g);
108+ h = FMADD (h, r, h);
109+
110+ r = FNMSUB (g, h, half);
111+ g = FMADD (g, r, g);
112+ h = FMADD (h, r, h);
113+
114+ r = FNMSUB (g, h, half);
115+ g = FMADD (g, r, g);
116+ h = FMADD (h, r, h);
117+
118+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
119+
120+ /* Final refinement. */
121+ d = FNMSUB (g, g, b);
122+
123+ fesetenv_register (fe);
124+ return FMADD (d, h, g);
125+ }
126+ }
127+ else if (b < 0)
128+ {
129+ /* For some reason, some PowerPC32 processors don't implement
130+ FE_INVALID_SQRT. */
131+#ifdef FE_INVALID_SQRT
132+ feraiseexcept (FE_INVALID_SQRT);
133+
134+ fenv_union_t u = { .fenv = fegetenv_register () };
135+ if ((u.l[1] & FE_INVALID) == 0)
136+#endif
137+ feraiseexcept (FE_INVALID);
138+ b = a_nan.value;
139+ }
140+ return f_wash (b);
141+}
142diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
143--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
144+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500
145@@ -0,0 +1,101 @@
146+/* Single-precision floating point square root.
147+ Copyright (C) 2010 Free Software Foundation, Inc.
148+ This file is part of the GNU C Library.
149+
150+ The GNU C Library is free software; you can redistribute it and/or
151+ modify it under the terms of the GNU Lesser General Public
152+ License as published by the Free Software Foundation; either
153+ version 2.1 of the License, or (at your option) any later version.
154+
155+ The GNU C Library is distributed in the hope that it will be useful,
156+ but WITHOUT ANY WARRANTY; without even the implied warranty of
157+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
158+ Lesser General Public License for more details.
159+
160+ You should have received a copy of the GNU Lesser General Public
161+ License along with the GNU C Library; if not, write to the Free
162+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
163+ 02111-1307 USA. */
164+
165+#include <math.h>
166+#include <math_private.h>
167+#include <fenv_libc.h>
168+#include <inttypes.h>
169+
170+#include <sysdep.h>
171+#include <ldsodefs.h>
172+
173+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
174+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
175+static const float threehalf = 1.5;
176+
177+/* The method is based on the descriptions in:
178+
179+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
180+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
181+
182+ We find the reciprocal square root and use that to compute the actual
183+ square root. */
184+
185+#ifdef __STDC__
186+float
187+__ieee754_sqrtf (float b)
188+#else
189+float
190+__ieee754_sqrtf (b)
191+ float b;
192+#endif
193+{
194+ if (__builtin_expect (b > 0, 1))
195+ {
196+#define FMSUB(a_, c_, b_) \
197+ ({ double __r; \
198+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
199+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
200+ __r;})
201+#define FNMSUB(a_, c_, b_) \
202+ ({ double __r; \
203+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
204+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
205+ __r;})
206+
207+ if (__builtin_expect (b != a_inf.value, 1))
208+ {
209+ double y, x;
210+ fenv_t fe;
211+
212+ fe = fegetenv_register ();
213+
214+ relax_fenv_state ();
215+
216+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
217+ y = FMSUB (threehalf, b, b);
218+
219+ /* Initial estimate. */
220+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
221+
222+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
223+ x = x * FNMSUB (y, x * x, threehalf);
224+ x = x * FNMSUB (y, x * x, threehalf);
225+ x = x * FNMSUB (y, x * x, threehalf);
226+
227+ /* All done. */
228+ fesetenv_register (fe);
229+ return x * b;
230+ }
231+ }
232+ else if (b < 0)
233+ {
234+ /* For some reason, some PowerPC32 processors don't implement
235+ FE_INVALID_SQRT. */
236+#ifdef FE_INVALID_SQRT
237+ feraiseexcept (FE_INVALID_SQRT);
238+
239+ fenv_union_t u = { .fenv = fegetenv_register () };
240+ if ((u.l[1] & FE_INVALID) == 0)
241+#endif
242+ feraiseexcept (FE_INVALID);
243+ b = a_nan.value;
244+ }
245+ return f_washf (b);
246+}
247diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
248--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
249+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2012-06-14 14:55:14.749001061 -0500
250@@ -0,0 +1,134 @@
251+/* Double-precision floating point square root.
252+ Copyright (C) 2010 Free Software Foundation, Inc.
253+ This file is part of the GNU C Library.
254+
255+ The GNU C Library is free software; you can redistribute it and/or
256+ modify it under the terms of the GNU Lesser General Public
257+ License as published by the Free Software Foundation; either
258+ version 2.1 of the License, or (at your option) any later version.
259+
260+ The GNU C Library is distributed in the hope that it will be useful,
261+ but WITHOUT ANY WARRANTY; without even the implied warranty of
262+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
263+ Lesser General Public License for more details.
264+
265+ You should have received a copy of the GNU Lesser General Public
266+ License along with the GNU C Library; if not, write to the Free
267+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
268+ 02111-1307 USA. */
269+
270+#include <math.h>
271+#include <math_private.h>
272+#include <fenv_libc.h>
273+#include <inttypes.h>
274+
275+#include <sysdep.h>
276+#include <ldsodefs.h>
277+
278+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
279+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
280+static const float two108 = 3.245185536584267269e+32;
281+static const float twom54 = 5.551115123125782702e-17;
282+static const float half = 0.5;
283+
284+/* The method is based on the descriptions in:
285+
286+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
287+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
288+
289+ We find the actual square root and half of its reciprocal
290+ simultaneously. */
291+
292+#ifdef __STDC__
293+double
294+__ieee754_sqrt (double b)
295+#else
296+double
297+__ieee754_sqrt (b)
298+ double b;
299+#endif
300+{
301+ if (__builtin_expect (b > 0, 1))
302+ {
303+ double y, g, h, d, r;
304+ ieee_double_shape_type u;
305+
306+ if (__builtin_expect (b != a_inf.value, 1))
307+ {
308+ fenv_t fe;
309+
310+ fe = fegetenv_register ();
311+
312+ u.value = b;
313+
314+ relax_fenv_state ();
315+
316+ __asm__ ("frsqrte %[estimate], %[x]\n"
317+ : [estimate] "=f" (y) : [x] "f" (b));
318+
319+ /* Following Muller et al, page 168, equation 5.20.
320+
321+ h goes to 1/(2*sqrt(b))
322+ g goes to sqrt(b).
323+
324+ We need three iterations to get within 1ulp. */
325+
326+ /* Indicate that these can be performed prior to the branch. GCC
327+ insists on sinking them below the branch, however; it seems like
328+ they'd be better before the branch so that we can cover any latency
329+ from storing the argument and loading its high word. Oh well. */
330+
331+ g = b * y;
332+ h = 0.5 * y;
333+
334+ /* Handle small numbers by scaling. */
335+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
336+ return __ieee754_sqrt (b * two108) * twom54;
337+
338+#define FMADD(a_, c_, b_) \
339+ ({ double __r; \
340+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
341+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
342+ __r;})
343+#define FNMSUB(a_, c_, b_) \
344+ ({ double __r; \
345+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
346+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
347+ __r;})
348+
349+ r = FNMSUB (g, h, half);
350+ g = FMADD (g, r, g);
351+ h = FMADD (h, r, h);
352+
353+ r = FNMSUB (g, h, half);
354+ g = FMADD (g, r, g);
355+ h = FMADD (h, r, h);
356+
357+ r = FNMSUB (g, h, half);
358+ g = FMADD (g, r, g);
359+ h = FMADD (h, r, h);
360+
361+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
362+
363+ /* Final refinement. */
364+ d = FNMSUB (g, g, b);
365+
366+ fesetenv_register (fe);
367+ return FMADD (d, h, g);
368+ }
369+ }
370+ else if (b < 0)
371+ {
372+ /* For some reason, some PowerPC32 processors don't implement
373+ FE_INVALID_SQRT. */
374+#ifdef FE_INVALID_SQRT
375+ feraiseexcept (FE_INVALID_SQRT);
376+
377+ fenv_union_t u = { .fenv = fegetenv_register () };
378+ if ((u.l[1] & FE_INVALID) == 0)
379+#endif
380+ feraiseexcept (FE_INVALID);
381+ b = a_nan.value;
382+ }
383+ return f_wash (b);
384+}
385diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
386--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
387+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2012-06-14 14:55:14.749001061 -0500
388@@ -0,0 +1,101 @@
389+/* Single-precision floating point square root.
390+ Copyright (C) 2010 Free Software Foundation, Inc.
391+ This file is part of the GNU C Library.
392+
393+ The GNU C Library is free software; you can redistribute it and/or
394+ modify it under the terms of the GNU Lesser General Public
395+ License as published by the Free Software Foundation; either
396+ version 2.1 of the License, or (at your option) any later version.
397+
398+ The GNU C Library is distributed in the hope that it will be useful,
399+ but WITHOUT ANY WARRANTY; without even the implied warranty of
400+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
401+ Lesser General Public License for more details.
402+
403+ You should have received a copy of the GNU Lesser General Public
404+ License along with the GNU C Library; if not, write to the Free
405+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
406+ 02111-1307 USA. */
407+
408+#include <math.h>
409+#include <math_private.h>
410+#include <fenv_libc.h>
411+#include <inttypes.h>
412+
413+#include <sysdep.h>
414+#include <ldsodefs.h>
415+
416+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
417+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
418+static const float threehalf = 1.5;
419+
420+/* The method is based on the descriptions in:
421+
422+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
423+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
424+
425+ We find the reciprocal square root and use that to compute the actual
426+ square root. */
427+
428+#ifdef __STDC__
429+float
430+__ieee754_sqrtf (float b)
431+#else
432+float
433+__ieee754_sqrtf (b)
434+ float b;
435+#endif
436+{
437+ if (__builtin_expect (b > 0, 1))
438+ {
439+#define FMSUB(a_, c_, b_) \
440+ ({ double __r; \
441+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
442+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
443+ __r;})
444+#define FNMSUB(a_, c_, b_) \
445+ ({ double __r; \
446+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
447+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
448+ __r;})
449+
450+ if (__builtin_expect (b != a_inf.value, 1))
451+ {
452+ double y, x;
453+ fenv_t fe;
454+
455+ fe = fegetenv_register ();
456+
457+ relax_fenv_state ();
458+
459+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
460+ y = FMSUB (threehalf, b, b);
461+
462+ /* Initial estimate. */
463+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
464+
465+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
466+ x = x * FNMSUB (y, x * x, threehalf);
467+ x = x * FNMSUB (y, x * x, threehalf);
468+ x = x * FNMSUB (y, x * x, threehalf);
469+
470+ /* All done. */
471+ fesetenv_register (fe);
472+ return x * b;
473+ }
474+ }
475+ else if (b < 0)
476+ {
477+ /* For some reason, some PowerPC32 processors don't implement
478+ FE_INVALID_SQRT. */
479+#ifdef FE_INVALID_SQRT
480+ feraiseexcept (FE_INVALID_SQRT);
481+
482+ fenv_union_t u = { .fenv = fegetenv_register () };
483+ if ((u.l[1] & FE_INVALID) == 0)
484+#endif
485+ feraiseexcept (FE_INVALID);
486+ b = a_nan.value;
487+ }
488+ return f_washf (b);
489+}
490diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
491--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
492+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2012-06-14 14:55:21.812002270 -0500
493@@ -0,0 +1,134 @@
494+/* Double-precision floating point square root.
495+ Copyright (C) 2010 Free Software Foundation, Inc.
496+ This file is part of the GNU C Library.
497+
498+ The GNU C Library is free software; you can redistribute it and/or
499+ modify it under the terms of the GNU Lesser General Public
500+ License as published by the Free Software Foundation; either
501+ version 2.1 of the License, or (at your option) any later version.
502+
503+ The GNU C Library is distributed in the hope that it will be useful,
504+ but WITHOUT ANY WARRANTY; without even the implied warranty of
505+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
506+ Lesser General Public License for more details.
507+
508+ You should have received a copy of the GNU Lesser General Public
509+ License along with the GNU C Library; if not, write to the Free
510+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
511+ 02111-1307 USA. */
512+
513+#include <math.h>
514+#include <math_private.h>
515+#include <fenv_libc.h>
516+#include <inttypes.h>
517+
518+#include <sysdep.h>
519+#include <ldsodefs.h>
520+
521+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
522+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
523+static const float two108 = 3.245185536584267269e+32;
524+static const float twom54 = 5.551115123125782702e-17;
525+static const float half = 0.5;
526+
527+/* The method is based on the descriptions in:
528+
529+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
530+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
531+
532+ We find the actual square root and half of its reciprocal
533+ simultaneously. */
534+
535+#ifdef __STDC__
536+double
537+__ieee754_sqrt (double b)
538+#else
539+double
540+__ieee754_sqrt (b)
541+ double b;
542+#endif
543+{
544+ if (__builtin_expect (b > 0, 1))
545+ {
546+ double y, g, h, d, r;
547+ ieee_double_shape_type u;
548+
549+ if (__builtin_expect (b != a_inf.value, 1))
550+ {
551+ fenv_t fe;
552+
553+ fe = fegetenv_register ();
554+
555+ u.value = b;
556+
557+ relax_fenv_state ();
558+
559+ __asm__ ("frsqrte %[estimate], %[x]\n"
560+ : [estimate] "=f" (y) : [x] "f" (b));
561+
562+ /* Following Muller et al, page 168, equation 5.20.
563+
564+ h goes to 1/(2*sqrt(b))
565+ g goes to sqrt(b).
566+
567+ We need three iterations to get within 1ulp. */
568+
569+ /* Indicate that these can be performed prior to the branch. GCC
570+ insists on sinking them below the branch, however; it seems like
571+ they'd be better before the branch so that we can cover any latency
572+ from storing the argument and loading its high word. Oh well. */
573+
574+ g = b * y;
575+ h = 0.5 * y;
576+
577+ /* Handle small numbers by scaling. */
578+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
579+ return __ieee754_sqrt (b * two108) * twom54;
580+
581+#define FMADD(a_, c_, b_) \
582+ ({ double __r; \
583+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
584+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
585+ __r;})
586+#define FNMSUB(a_, c_, b_) \
587+ ({ double __r; \
588+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
589+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
590+ __r;})
591+
592+ r = FNMSUB (g, h, half);
593+ g = FMADD (g, r, g);
594+ h = FMADD (h, r, h);
595+
596+ r = FNMSUB (g, h, half);
597+ g = FMADD (g, r, g);
598+ h = FMADD (h, r, h);
599+
600+ r = FNMSUB (g, h, half);
601+ g = FMADD (g, r, g);
602+ h = FMADD (h, r, h);
603+
604+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
605+
606+ /* Final refinement. */
607+ d = FNMSUB (g, g, b);
608+
609+ fesetenv_register (fe);
610+ return FMADD (d, h, g);
611+ }
612+ }
613+ else if (b < 0)
614+ {
615+ /* For some reason, some PowerPC32 processors don't implement
616+ FE_INVALID_SQRT. */
617+#ifdef FE_INVALID_SQRT
618+ feraiseexcept (FE_INVALID_SQRT);
619+
620+ fenv_union_t u = { .fenv = fegetenv_register () };
621+ if ((u.l[1] & FE_INVALID) == 0)
622+#endif
623+ feraiseexcept (FE_INVALID);
624+ b = a_nan.value;
625+ }
626+ return f_wash (b);
627+}
628diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
629--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
630+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2012-06-14 14:55:21.812002270 -0500
631@@ -0,0 +1,101 @@
632+/* Single-precision floating point square root.
633+ Copyright (C) 2010 Free Software Foundation, Inc.
634+ This file is part of the GNU C Library.
635+
636+ The GNU C Library is free software; you can redistribute it and/or
637+ modify it under the terms of the GNU Lesser General Public
638+ License as published by the Free Software Foundation; either
639+ version 2.1 of the License, or (at your option) any later version.
640+
641+ The GNU C Library is distributed in the hope that it will be useful,
642+ but WITHOUT ANY WARRANTY; without even the implied warranty of
643+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
644+ Lesser General Public License for more details.
645+
646+ You should have received a copy of the GNU Lesser General Public
647+ License along with the GNU C Library; if not, write to the Free
648+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
649+ 02111-1307 USA. */
650+
651+#include <math.h>
652+#include <math_private.h>
653+#include <fenv_libc.h>
654+#include <inttypes.h>
655+
656+#include <sysdep.h>
657+#include <ldsodefs.h>
658+
659+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
660+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
661+static const float threehalf = 1.5;
662+
663+/* The method is based on the descriptions in:
664+
665+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
666+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
667+
668+ We find the reciprocal square root and use that to compute the actual
669+ square root. */
670+
671+#ifdef __STDC__
672+float
673+__ieee754_sqrtf (float b)
674+#else
675+float
676+__ieee754_sqrtf (b)
677+ float b;
678+#endif
679+{
680+ if (__builtin_expect (b > 0, 1))
681+ {
682+#define FMSUB(a_, c_, b_) \
683+ ({ double __r; \
684+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
685+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
686+ __r;})
687+#define FNMSUB(a_, c_, b_) \
688+ ({ double __r; \
689+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
690+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
691+ __r;})
692+
693+ if (__builtin_expect (b != a_inf.value, 1))
694+ {
695+ double y, x;
696+ fenv_t fe;
697+
698+ fe = fegetenv_register ();
699+
700+ relax_fenv_state ();
701+
702+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
703+ y = FMSUB (threehalf, b, b);
704+
705+ /* Initial estimate. */
706+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
707+
708+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
709+ x = x * FNMSUB (y, x * x, threehalf);
710+ x = x * FNMSUB (y, x * x, threehalf);
711+ x = x * FNMSUB (y, x * x, threehalf);
712+
713+ /* All done. */
714+ fesetenv_register (fe);
715+ return x * b;
716+ }
717+ }
718+ else if (b < 0)
719+ {
720+ /* For some reason, some PowerPC32 processors don't implement
721+ FE_INVALID_SQRT. */
722+#ifdef FE_INVALID_SQRT
723+ feraiseexcept (FE_INVALID_SQRT);
724+
725+ fenv_union_t u = { .fenv = fegetenv_register () };
726+ if ((u.l[1] & FE_INVALID) == 0)
727+#endif
728+ feraiseexcept (FE_INVALID);
729+ b = a_nan.value;
730+ }
731+ return f_washf (b);
732+}
733diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
734--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
735+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2012-06-14 14:55:24.620001266 -0500
736@@ -0,0 +1,134 @@
737+/* Double-precision floating point square root.
738+ Copyright (C) 2010 Free Software Foundation, Inc.
739+ This file is part of the GNU C Library.
740+
741+ The GNU C Library is free software; you can redistribute it and/or
742+ modify it under the terms of the GNU Lesser General Public
743+ License as published by the Free Software Foundation; either
744+ version 2.1 of the License, or (at your option) any later version.
745+
746+ The GNU C Library is distributed in the hope that it will be useful,
747+ but WITHOUT ANY WARRANTY; without even the implied warranty of
748+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
749+ Lesser General Public License for more details.
750+
751+ You should have received a copy of the GNU Lesser General Public
752+ License along with the GNU C Library; if not, write to the Free
753+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
754+ 02111-1307 USA. */
755+
756+#include <math.h>
757+#include <math_private.h>
758+#include <fenv_libc.h>
759+#include <inttypes.h>
760+
761+#include <sysdep.h>
762+#include <ldsodefs.h>
763+
764+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
765+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
766+static const float two108 = 3.245185536584267269e+32;
767+static const float twom54 = 5.551115123125782702e-17;
768+static const float half = 0.5;
769+
770+/* The method is based on the descriptions in:
771+
772+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
773+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
774+
775+ We find the actual square root and half of its reciprocal
776+ simultaneously. */
777+
778+#ifdef __STDC__
779+double
780+__ieee754_sqrt (double b)
781+#else
782+double
783+__ieee754_sqrt (b)
784+ double b;
785+#endif
786+{
787+ if (__builtin_expect (b > 0, 1))
788+ {
789+ double y, g, h, d, r;
790+ ieee_double_shape_type u;
791+
792+ if (__builtin_expect (b != a_inf.value, 1))
793+ {
794+ fenv_t fe;
795+
796+ fe = fegetenv_register ();
797+
798+ u.value = b;
799+
800+ relax_fenv_state ();
801+
802+ __asm__ ("frsqrte %[estimate], %[x]\n"
803+ : [estimate] "=f" (y) : [x] "f" (b));
804+
805+ /* Following Muller et al, page 168, equation 5.20.
806+
807+ h goes to 1/(2*sqrt(b))
808+ g goes to sqrt(b).
809+
810+ We need three iterations to get within 1ulp. */
811+
812+ /* Indicate that these can be performed prior to the branch. GCC
813+ insists on sinking them below the branch, however; it seems like
814+ they'd be better before the branch so that we can cover any latency
815+ from storing the argument and loading its high word. Oh well. */
816+
817+ g = b * y;
818+ h = 0.5 * y;
819+
820+ /* Handle small numbers by scaling. */
821+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
822+ return __ieee754_sqrt (b * two108) * twom54;
823+
824+#define FMADD(a_, c_, b_) \
825+ ({ double __r; \
826+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
827+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
828+ __r;})
829+#define FNMSUB(a_, c_, b_) \
830+ ({ double __r; \
831+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
832+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
833+ __r;})
834+
835+ r = FNMSUB (g, h, half);
836+ g = FMADD (g, r, g);
837+ h = FMADD (h, r, h);
838+
839+ r = FNMSUB (g, h, half);
840+ g = FMADD (g, r, g);
841+ h = FMADD (h, r, h);
842+
843+ r = FNMSUB (g, h, half);
844+ g = FMADD (g, r, g);
845+ h = FMADD (h, r, h);
846+
847+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
848+
849+ /* Final refinement. */
850+ d = FNMSUB (g, g, b);
851+
852+ fesetenv_register (fe);
853+ return FMADD (d, h, g);
854+ }
855+ }
856+ else if (b < 0)
857+ {
858+ /* For some reason, some PowerPC32 processors don't implement
859+ FE_INVALID_SQRT. */
860+#ifdef FE_INVALID_SQRT
861+ feraiseexcept (FE_INVALID_SQRT);
862+
863+ fenv_union_t u = { .fenv = fegetenv_register () };
864+ if ((u.l[1] & FE_INVALID) == 0)
865+#endif
866+ feraiseexcept (FE_INVALID);
867+ b = a_nan.value;
868+ }
869+ return f_wash (b);
870+}
871diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
872--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
873+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2012-06-14 14:55:24.620001266 -0500
874@@ -0,0 +1,101 @@
875+/* Single-precision floating point square root.
876+ Copyright (C) 2010 Free Software Foundation, Inc.
877+ This file is part of the GNU C Library.
878+
879+ The GNU C Library is free software; you can redistribute it and/or
880+ modify it under the terms of the GNU Lesser General Public
881+ License as published by the Free Software Foundation; either
882+ version 2.1 of the License, or (at your option) any later version.
883+
884+ The GNU C Library is distributed in the hope that it will be useful,
885+ but WITHOUT ANY WARRANTY; without even the implied warranty of
886+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
887+ Lesser General Public License for more details.
888+
889+ You should have received a copy of the GNU Lesser General Public
890+ License along with the GNU C Library; if not, write to the Free
891+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
892+ 02111-1307 USA. */
893+
894+#include <math.h>
895+#include <math_private.h>
896+#include <fenv_libc.h>
897+#include <inttypes.h>
898+
899+#include <sysdep.h>
900+#include <ldsodefs.h>
901+
902+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
903+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
904+static const float threehalf = 1.5;
905+
906+/* The method is based on the descriptions in:
907+
908+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
909+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
910+
911+ We find the reciprocal square root and use that to compute the actual
912+ square root. */
913+
914+#ifdef __STDC__
915+float
916+__ieee754_sqrtf (float b)
917+#else
918+float
919+__ieee754_sqrtf (b)
920+ float b;
921+#endif
922+{
923+ if (__builtin_expect (b > 0, 1))
924+ {
925+#define FMSUB(a_, c_, b_) \
926+ ({ double __r; \
927+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
928+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
929+ __r;})
930+#define FNMSUB(a_, c_, b_) \
931+ ({ double __r; \
932+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
933+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
934+ __r;})
935+
936+ if (__builtin_expect (b != a_inf.value, 1))
937+ {
938+ double y, x;
939+ fenv_t fe;
940+
941+ fe = fegetenv_register ();
942+
943+ relax_fenv_state ();
944+
945+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
946+ y = FMSUB (threehalf, b, b);
947+
948+ /* Initial estimate. */
949+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
950+
951+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
952+ x = x * FNMSUB (y, x * x, threehalf);
953+ x = x * FNMSUB (y, x * x, threehalf);
954+ x = x * FNMSUB (y, x * x, threehalf);
955+
956+ /* All done. */
957+ fesetenv_register (fe);
958+ return x * b;
959+ }
960+ }
961+ else if (b < 0)
962+ {
963+ /* For some reason, some PowerPC32 processors don't implement
964+ FE_INVALID_SQRT. */
965+#ifdef FE_INVALID_SQRT
966+ feraiseexcept (FE_INVALID_SQRT);
967+
968+ fenv_union_t u = { .fenv = fegetenv_register () };
969+ if ((u.l[1] & FE_INVALID) == 0)
970+#endif
971+ feraiseexcept (FE_INVALID);
972+ b = a_nan.value;
973+ }
974+ return f_washf (b);
975+}
976diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
977--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
978+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500
979@@ -0,0 +1,134 @@
980+/* Double-precision floating point square root.
981+ Copyright (C) 2010 Free Software Foundation, Inc.
982+ This file is part of the GNU C Library.
983+
984+ The GNU C Library is free software; you can redistribute it and/or
985+ modify it under the terms of the GNU Lesser General Public
986+ License as published by the Free Software Foundation; either
987+ version 2.1 of the License, or (at your option) any later version.
988+
989+ The GNU C Library is distributed in the hope that it will be useful,
990+ but WITHOUT ANY WARRANTY; without even the implied warranty of
991+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
992+ Lesser General Public License for more details.
993+
994+ You should have received a copy of the GNU Lesser General Public
995+ License along with the GNU C Library; if not, write to the Free
996+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
997+ 02111-1307 USA. */
998+
999+#include <math.h>
1000+#include <math_private.h>
1001+#include <fenv_libc.h>
1002+#include <inttypes.h>
1003+
1004+#include <sysdep.h>
1005+#include <ldsodefs.h>
1006+
1007+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1008+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1009+static const float two108 = 3.245185536584267269e+32;
1010+static const float twom54 = 5.551115123125782702e-17;
1011+static const float half = 0.5;
1012+
1013+/* The method is based on the descriptions in:
1014+
1015+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1016+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1017+
1018+ We find the actual square root and half of its reciprocal
1019+ simultaneously. */
1020+
1021+#ifdef __STDC__
1022+double
1023+__ieee754_sqrt (double b)
1024+#else
1025+double
1026+__ieee754_sqrt (b)
1027+ double b;
1028+#endif
1029+{
1030+ if (__builtin_expect (b > 0, 1))
1031+ {
1032+ double y, g, h, d, r;
1033+ ieee_double_shape_type u;
1034+
1035+ if (__builtin_expect (b != a_inf.value, 1))
1036+ {
1037+ fenv_t fe;
1038+
1039+ fe = fegetenv_register ();
1040+
1041+ u.value = b;
1042+
1043+ relax_fenv_state ();
1044+
1045+ __asm__ ("frsqrte %[estimate], %[x]\n"
1046+ : [estimate] "=f" (y) : [x] "f" (b));
1047+
1048+ /* Following Muller et al, page 168, equation 5.20.
1049+
1050+ h goes to 1/(2*sqrt(b))
1051+ g goes to sqrt(b).
1052+
1053+ We need three iterations to get within 1ulp. */
1054+
1055+ /* Indicate that these can be performed prior to the branch. GCC
1056+ insists on sinking them below the branch, however; it seems like
1057+ they'd be better before the branch so that we can cover any latency
1058+ from storing the argument and loading its high word. Oh well. */
1059+
1060+ g = b * y;
1061+ h = 0.5 * y;
1062+
1063+ /* Handle small numbers by scaling. */
1064+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
1065+ return __ieee754_sqrt (b * two108) * twom54;
1066+
1067+#define FMADD(a_, c_, b_) \
1068+ ({ double __r; \
1069+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
1070+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1071+ __r;})
1072+#define FNMSUB(a_, c_, b_) \
1073+ ({ double __r; \
1074+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1075+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1076+ __r;})
1077+
1078+ r = FNMSUB (g, h, half);
1079+ g = FMADD (g, r, g);
1080+ h = FMADD (h, r, h);
1081+
1082+ r = FNMSUB (g, h, half);
1083+ g = FMADD (g, r, g);
1084+ h = FMADD (h, r, h);
1085+
1086+ r = FNMSUB (g, h, half);
1087+ g = FMADD (g, r, g);
1088+ h = FMADD (h, r, h);
1089+
1090+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
1091+
1092+ /* Final refinement. */
1093+ d = FNMSUB (g, g, b);
1094+
1095+ fesetenv_register (fe);
1096+ return FMADD (d, h, g);
1097+ }
1098+ }
1099+ else if (b < 0)
1100+ {
1101+ /* For some reason, some PowerPC32 processors don't implement
1102+ FE_INVALID_SQRT. */
1103+#ifdef FE_INVALID_SQRT
1104+ feraiseexcept (FE_INVALID_SQRT);
1105+
1106+ fenv_union_t u = { .fenv = fegetenv_register () };
1107+ if ((u.l[1] & FE_INVALID) == 0)
1108+#endif
1109+ feraiseexcept (FE_INVALID);
1110+ b = a_nan.value;
1111+ }
1112+ return f_wash (b);
1113+}
1114diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
1115--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
1116+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500
1117@@ -0,0 +1,101 @@
1118+/* Single-precision floating point square root.
1119+ Copyright (C) 2010 Free Software Foundation, Inc.
1120+ This file is part of the GNU C Library.
1121+
1122+ The GNU C Library is free software; you can redistribute it and/or
1123+ modify it under the terms of the GNU Lesser General Public
1124+ License as published by the Free Software Foundation; either
1125+ version 2.1 of the License, or (at your option) any later version.
1126+
1127+ The GNU C Library is distributed in the hope that it will be useful,
1128+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1129+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1130+ Lesser General Public License for more details.
1131+
1132+ You should have received a copy of the GNU Lesser General Public
1133+ License along with the GNU C Library; if not, write to the Free
1134+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1135+ 02111-1307 USA. */
1136+
1137+#include <math.h>
1138+#include <math_private.h>
1139+#include <fenv_libc.h>
1140+#include <inttypes.h>
1141+
1142+#include <sysdep.h>
1143+#include <ldsodefs.h>
1144+
1145+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1146+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1147+static const float threehalf = 1.5;
1148+
1149+/* The method is based on the descriptions in:
1150+
1151+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1152+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1153+
1154+ We find the reciprocal square root and use that to compute the actual
1155+ square root. */
1156+
1157+#ifdef __STDC__
1158+float
1159+__ieee754_sqrtf (float b)
1160+#else
1161+float
1162+__ieee754_sqrtf (b)
1163+ float b;
1164+#endif
1165+{
1166+ if (__builtin_expect (b > 0, 1))
1167+ {
1168+#define FMSUB(a_, c_, b_) \
1169+ ({ double __r; \
1170+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
1171+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1172+ __r;})
1173+#define FNMSUB(a_, c_, b_) \
1174+ ({ double __r; \
1175+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1176+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1177+ __r;})
1178+
1179+ if (__builtin_expect (b != a_inf.value, 1))
1180+ {
1181+ double y, x;
1182+ fenv_t fe;
1183+
1184+ fe = fegetenv_register ();
1185+
1186+ relax_fenv_state ();
1187+
1188+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
1189+ y = FMSUB (threehalf, b, b);
1190+
1191+ /* Initial estimate. */
1192+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
1193+
1194+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
1195+ x = x * FNMSUB (y, x * x, threehalf);
1196+ x = x * FNMSUB (y, x * x, threehalf);
1197+ x = x * FNMSUB (y, x * x, threehalf);
1198+
1199+ /* All done. */
1200+ fesetenv_register (fe);
1201+ return x * b;
1202+ }
1203+ }
1204+ else if (b < 0)
1205+ {
1206+ /* For some reason, some PowerPC32 processors don't implement
1207+ FE_INVALID_SQRT. */
1208+#ifdef FE_INVALID_SQRT
1209+ feraiseexcept (FE_INVALID_SQRT);
1210+
1211+ fenv_union_t u = { .fenv = fegetenv_register () };
1212+ if ((u.l[1] & FE_INVALID) == 0)
1213+#endif
1214+ feraiseexcept (FE_INVALID);
1215+ b = a_nan.value;
1216+ }
1217+ return f_washf (b);
1218+}
1219diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
1220--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
1221+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2012-06-14 14:56:02.080000985 -0500
1222@@ -0,0 +1,134 @@
1223+/* Double-precision floating point square root.
1224+ Copyright (C) 2010 Free Software Foundation, Inc.
1225+ This file is part of the GNU C Library.
1226+
1227+ The GNU C Library is free software; you can redistribute it and/or
1228+ modify it under the terms of the GNU Lesser General Public
1229+ License as published by the Free Software Foundation; either
1230+ version 2.1 of the License, or (at your option) any later version.
1231+
1232+ The GNU C Library is distributed in the hope that it will be useful,
1233+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1234+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1235+ Lesser General Public License for more details.
1236+
1237+ You should have received a copy of the GNU Lesser General Public
1238+ License along with the GNU C Library; if not, write to the Free
1239+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1240+ 02111-1307 USA. */
1241+
1242+#include <math.h>
1243+#include <math_private.h>
1244+#include <fenv_libc.h>
1245+#include <inttypes.h>
1246+
1247+#include <sysdep.h>
1248+#include <ldsodefs.h>
1249+
1250+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1251+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1252+static const float two108 = 3.245185536584267269e+32;
1253+static const float twom54 = 5.551115123125782702e-17;
1254+static const float half = 0.5;
1255+
1256+/* The method is based on the descriptions in:
1257+
1258+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1259+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1260+
1261+ We find the actual square root and half of its reciprocal
1262+ simultaneously. */
1263+
1264+#ifdef __STDC__
1265+double
1266+__ieee754_sqrt (double b)
1267+#else
1268+double
1269+__ieee754_sqrt (b)
1270+ double b;
1271+#endif
1272+{
1273+ if (__builtin_expect (b > 0, 1))
1274+ {
1275+ double y, g, h, d, r;
1276+ ieee_double_shape_type u;
1277+
1278+ if (__builtin_expect (b != a_inf.value, 1))
1279+ {
1280+ fenv_t fe;
1281+
1282+ fe = fegetenv_register ();
1283+
1284+ u.value = b;
1285+
1286+ relax_fenv_state ();
1287+
1288+ __asm__ ("frsqrte %[estimate], %[x]\n"
1289+ : [estimate] "=f" (y) : [x] "f" (b));
1290+
1291+ /* Following Muller et al, page 168, equation 5.20.
1292+
1293+ h goes to 1/(2*sqrt(b))
1294+ g goes to sqrt(b).
1295+
1296+ We need three iterations to get within 1ulp. */
1297+
1298+ /* Indicate that these can be performed prior to the branch. GCC
1299+ insists on sinking them below the branch, however; it seems like
1300+ they'd be better before the branch so that we can cover any latency
1301+ from storing the argument and loading its high word. Oh well. */
1302+
1303+ g = b * y;
1304+ h = 0.5 * y;
1305+
1306+ /* Handle small numbers by scaling. */
1307+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
1308+ return __ieee754_sqrt (b * two108) * twom54;
1309+
1310+#define FMADD(a_, c_, b_) \
1311+ ({ double __r; \
1312+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
1313+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1314+ __r;})
1315+#define FNMSUB(a_, c_, b_) \
1316+ ({ double __r; \
1317+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1318+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1319+ __r;})
1320+
1321+ r = FNMSUB (g, h, half);
1322+ g = FMADD (g, r, g);
1323+ h = FMADD (h, r, h);
1324+
1325+ r = FNMSUB (g, h, half);
1326+ g = FMADD (g, r, g);
1327+ h = FMADD (h, r, h);
1328+
1329+ r = FNMSUB (g, h, half);
1330+ g = FMADD (g, r, g);
1331+ h = FMADD (h, r, h);
1332+
1333+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
1334+
1335+ /* Final refinement. */
1336+ d = FNMSUB (g, g, b);
1337+
1338+ fesetenv_register (fe);
1339+ return FMADD (d, h, g);
1340+ }
1341+ }
1342+ else if (b < 0)
1343+ {
1344+ /* For some reason, some PowerPC32 processors don't implement
1345+ FE_INVALID_SQRT. */
1346+#ifdef FE_INVALID_SQRT
1347+ feraiseexcept (FE_INVALID_SQRT);
1348+
1349+ fenv_union_t u = { .fenv = fegetenv_register () };
1350+ if ((u.l[1] & FE_INVALID) == 0)
1351+#endif
1352+ feraiseexcept (FE_INVALID);
1353+ b = a_nan.value;
1354+ }
1355+ return f_wash (b);
1356+}
1357diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
1358--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
1359+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2012-06-14 14:56:02.080000985 -0500
1360@@ -0,0 +1,101 @@
1361+/* Single-precision floating point square root.
1362+ Copyright (C) 2010 Free Software Foundation, Inc.
1363+ This file is part of the GNU C Library.
1364+
1365+ The GNU C Library is free software; you can redistribute it and/or
1366+ modify it under the terms of the GNU Lesser General Public
1367+ License as published by the Free Software Foundation; either
1368+ version 2.1 of the License, or (at your option) any later version.
1369+
1370+ The GNU C Library is distributed in the hope that it will be useful,
1371+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1372+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1373+ Lesser General Public License for more details.
1374+
1375+ You should have received a copy of the GNU Lesser General Public
1376+ License along with the GNU C Library; if not, write to the Free
1377+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1378+ 02111-1307 USA. */
1379+
1380+#include <math.h>
1381+#include <math_private.h>
1382+#include <fenv_libc.h>
1383+#include <inttypes.h>
1384+
1385+#include <sysdep.h>
1386+#include <ldsodefs.h>
1387+
1388+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1389+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1390+static const float threehalf = 1.5;
1391+
1392+/* The method is based on the descriptions in:
1393+
1394+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1395+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1396+
1397+ We find the reciprocal square root and use that to compute the actual
1398+ square root. */
1399+
1400+#ifdef __STDC__
1401+float
1402+__ieee754_sqrtf (float b)
1403+#else
1404+float
1405+__ieee754_sqrtf (b)
1406+ float b;
1407+#endif
1408+{
1409+ if (__builtin_expect (b > 0, 1))
1410+ {
1411+#define FMSUB(a_, c_, b_) \
1412+ ({ double __r; \
1413+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
1414+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1415+ __r;})
1416+#define FNMSUB(a_, c_, b_) \
1417+ ({ double __r; \
1418+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1419+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1420+ __r;})
1421+
1422+ if (__builtin_expect (b != a_inf.value, 1))
1423+ {
1424+ double y, x;
1425+ fenv_t fe;
1426+
1427+ fe = fegetenv_register ();
1428+
1429+ relax_fenv_state ();
1430+
1431+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
1432+ y = FMSUB (threehalf, b, b);
1433+
1434+ /* Initial estimate. */
1435+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
1436+
1437+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
1438+ x = x * FNMSUB (y, x * x, threehalf);
1439+ x = x * FNMSUB (y, x * x, threehalf);
1440+ x = x * FNMSUB (y, x * x, threehalf);
1441+
1442+ /* All done. */
1443+ fesetenv_register (fe);
1444+ return x * b;
1445+ }
1446+ }
1447+ else if (b < 0)
1448+ {
1449+ /* For some reason, some PowerPC32 processors don't implement
1450+ FE_INVALID_SQRT. */
1451+#ifdef FE_INVALID_SQRT
1452+ feraiseexcept (FE_INVALID_SQRT);
1453+
1454+ fenv_union_t u = { .fenv = fegetenv_register () };
1455+ if ((u.l[1] & FE_INVALID) == 0)
1456+#endif
1457+ feraiseexcept (FE_INVALID);
1458+ b = a_nan.value;
1459+ }
1460+ return f_washf (b);
1461+}
1462diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
1463--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1464+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2012-06-14 14:51:50.452001745 -0500
1465@@ -0,0 +1 @@
1466+powerpc/powerpc32/603e/fpu
1467diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
1468--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1469+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2012-06-14 14:54:00.481000876 -0500
1470@@ -0,0 +1 @@
1471+powerpc/powerpc32/e500mc/fpu
1472diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
1473--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1474+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2012-06-14 14:54:17.000001007 -0500
1475@@ -0,0 +1 @@
1476+powerpc/powerpc32/e5500/fpu
1477diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
1478--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1479+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2012-06-14 14:54:31.054001299 -0500
1480@@ -0,0 +1 @@
1481+powerpc/powerpc32/e6500/fpu
1482diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
1483--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1484+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2012-06-14 14:51:50.453001709 -0500
1485@@ -0,0 +1 @@
1486+powerpc/powerpc64/e5500/fpu
1487diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
1488--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1489+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2012-06-14 14:58:14.298001288 -0500
1490@@ -0,0 +1 @@
1491+powerpc/powerpc64/e6500/fpu
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/initgroups_keys.patch b/meta/recipes-core/eglibc/eglibc-2.17/initgroups_keys.patch
new file mode 100644
index 0000000000..be29856b03
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/initgroups_keys.patch
@@ -0,0 +1,20 @@
1This is needed since initgroups belongs to NET group
2so when NET is disabled in eglibc build then it reports
3as undefined symbol
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Upstream-Status: Pending
7
8Index: libc/nss/getent.c
9===================================================================
10--- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800
11+++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800
12@@ -898,7 +898,7 @@
13 D(group)
14 D(gshadow)
15 DN(hosts)
16-D(initgroups)
17+DN(initgroups)
18 DN(netgroup)
19 DN(networks)
20 D(passwd)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.17/ld-search-order.patch
new file mode 100644
index 0000000000..e83a0ad6d2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/ld-search-order.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The default lib search path order is:
4
5 1) LD_LIBRARY_PATH
6 2) RPATH from the binary
7 3) ld.so.cache
8 4) default search paths embedded in the linker
9
10For nativesdk binaries which are being used alongside binaries on a host system, we
11need the search paths to firstly search the shipped nativesdk libs but then also
12cover the host system. For example we want the host system's libGL and this may be
13in a non-standard location like /usr/lib/mesa. The only place the location is know
14about is in the ld.so.cache of the host system.
15
16Since nativesdk has a simple structure and doesn't need to use a cache itself, we
17repurpose the cache for use as a last resort in finding host system binaries. This
18means we need to switch the order of 3 and 4 above to make this work effectively.
19
20RP 14/10/2010
21
22Index: libc/elf/dl-load.c
23===================================================================
24--- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800
25+++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800
26@@ -2215,7 +2215,14 @@
27 fd = open_path (name, namelen, mode & __RTLD_SECURE,
28 &loader->l_runpath_dirs, &realname, &fb, loader,
29 LA_SER_RUNPATH, &found_other_class);
30-
31+ /* try the default path. */
32+ if (fd == -1
33+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
34+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
35+ && rtld_search_dirs.dirs != (void *) -1)
36+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
37+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
38+ /* Finally try ld.so.cache */
39 #ifdef USE_LDCONFIG
40 if (fd == -1
41 && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
42@@ -2283,14 +2290,6 @@
43 }
44 #endif
45
46- /* Finally, try the default path. */
47- if (fd == -1
48- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
49- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
50- && rtld_search_dirs.dirs != (void *) -1)
51- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
52- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
53-
54 /* Add another newline when we are tracing the library loading. */
55 if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
56 _dl_debug_printf ("\n");
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.17/mips-rld-map-check.patch
new file mode 100644
index 0000000000..9b646fea95
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/mips-rld-map-check.patch
@@ -0,0 +1,26 @@
1
2On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
3section if a --version-script sets _RLD_MAP to local. This is apparently
4a binutils bug, but libc shouldn't segfault in this case.
5
6see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
7
8Upstream-Status: Pending
9
109/19/2010 - added by Qing He <qing.he@intel.com>
11
12
13---
14diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
15--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
16+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
17@@ -70,7 +70,8 @@
18 /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
19 with the run-time address of the r_debug structure */
20 #define ELF_MACHINE_DEBUG_SETUP(l,r) \
21-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
22+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
23+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
24 *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
25 (ElfW(Addr)) (r); \
26 } while (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/multilib_readlib.patch b/meta/recipes-core/eglibc/eglibc-2.17/multilib_readlib.patch
new file mode 100644
index 0000000000..1542b1b519
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/multilib_readlib.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of
4variable EGLIBC_KNOWN_INTERPRETER_NAMES.
5
6Lianhao Lu, 08/01/2011
7
8--- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800
9+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800
10@@ -52,6 +52,7 @@
11 #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
12 SYSDEP_KNOWN_INTERPRETER_NAMES
13 #endif
14+ OECORE_KNOWN_INTERPRETER_NAMES
15 };
16
17 static struct known_names known_libs[] =
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/ppc-sqrt_finite.patch b/meta/recipes-core/eglibc/eglibc-2.17/ppc-sqrt_finite.patch
new file mode 100644
index 0000000000..6ea666b1d6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/ppc-sqrt_finite.patch
@@ -0,0 +1,184 @@
1on ppc fixes the errors like below
2| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
3| collect2: ld returned 1 exit status
4
5Upstream-Status: Pending
6
7ChangeLog
8
92012-01-06 Khem Raj <raj.khem@gmail.com>
10
11 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias.
12 Remove cruft.
13 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto.
14 * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto.
15 * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto.
16
17Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
18===================================================================
19--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
20+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
21@@ -39,14 +39,8 @@ static const float half = 0.5;
22 We find the actual square root and half of its reciprocal
23 simultaneously. */
24
25-#ifdef __STDC__
26 double
27 __ieee754_sqrt (double b)
28-#else
29-double
30-__ieee754_sqrt (b)
31- double b;
32-#endif
33 {
34 if (__builtin_expect (b > 0, 1))
35 {
36@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
37 }
38 return f_wash (b);
39 }
40+strong_alias (__ieee754_sqrt, __sqrt_finite)
41Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
42===================================================================
43--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
44+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
45@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
46 We find the reciprocal square root and use that to compute the actual
47 square root. */
48
49-#ifdef __STDC__
50 float
51 __ieee754_sqrtf (float b)
52-#else
53-float
54-__ieee754_sqrtf (b)
55- float b;
56-#endif
57 {
58 if (__builtin_expect (b > 0, 1))
59 {
60@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
61 }
62 return f_washf (b);
63 }
64+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
65Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
66===================================================================
67--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
68+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
69@@ -39,14 +39,8 @@ static const float half = 0.5;
70 We find the actual square root and half of its reciprocal
71 simultaneously. */
72
73-#ifdef __STDC__
74 double
75 __ieee754_sqrt (double b)
76-#else
77-double
78-__ieee754_sqrt (b)
79- double b;
80-#endif
81 {
82 if (__builtin_expect (b > 0, 1))
83 {
84@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
85 }
86 return f_wash (b);
87 }
88+strong_alias (__ieee754_sqrt, __sqrt_finite)
89Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
90===================================================================
91--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
92+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
93@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
94 We find the reciprocal square root and use that to compute the actual
95 square root. */
96
97-#ifdef __STDC__
98 float
99 __ieee754_sqrtf (float b)
100-#else
101-float
102-__ieee754_sqrtf (b)
103- float b;
104-#endif
105 {
106 if (__builtin_expect (b > 0, 1))
107 {
108@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
109 }
110 return f_washf (b);
111 }
112+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
113Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
114===================================================================
115--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
116+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
117@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
118 }
119 return f_wash (b);
120 }
121+strong_alias (__ieee754_sqrt, __sqrt_finite)
122Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
123===================================================================
124--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
125+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
126@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
127 }
128 return f_washf (b);
129 }
130+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
131Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
132===================================================================
133--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
134+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
135@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
136 }
137 return f_wash (b);
138 }
139+strong_alias (__ieee754_sqrt, __sqrt_finite)
140Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
141===================================================================
142--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
143+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
144@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
145 }
146 return f_washf (b);
147 }
148+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
149Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
150===================================================================
151--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
152+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
153@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
154 }
155 return f_wash (b);
156 }
157+strong_alias (__ieee754_sqrt, __sqrt_finite)
158Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
159===================================================================
160--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
161+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
162@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
163 }
164 return f_washf (b);
165 }
166+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
167Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
168===================================================================
169--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
170+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
171@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
172 }
173 return f_wash (b);
174 }
175+strong_alias (__ieee754_sqrt, __sqrt_finite)
176Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
177===================================================================
178--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
179+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
180@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
181 }
182 return f_washf (b);
183 }
184+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.17/ppc_slow_ieee754_sqrt.patch
new file mode 100644
index 0000000000..60532cbd03
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/ppc_slow_ieee754_sqrt.patch
@@ -0,0 +1,365 @@
1 __ieee754_sqrt{,f} are now inline functions and call out __slow versions
2
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Pending
6Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
7===================================================================
8--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
9+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
10@@ -40,7 +40,7 @@ static const float half = 0.5;
11 simultaneously. */
12
13 double
14-__ieee754_sqrt (double b)
15+__slow_ieee754_sqrt (double b)
16 {
17 if (__builtin_expect (b > 0, 1))
18 {
19@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
20
21 /* Handle small numbers by scaling. */
22 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
23- return __ieee754_sqrt (b * two108) * twom54;
24+ return __slow_ieee754_sqrt (b * two108) * twom54;
25
26 #define FMADD(a_, c_, b_) \
27 ({ double __r; \
28@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
29 }
30 return f_wash (b);
31 }
32+
33+#undef __ieee754_sqrt
34+double
35+__ieee754_sqrt (double x)
36+{
37+ return __slow_ieee754_sqrt (x);
38+}
39+
40 strong_alias (__ieee754_sqrt, __sqrt_finite)
41Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
42===================================================================
43--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
44+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
45@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
46 square root. */
47
48 float
49-__ieee754_sqrtf (float b)
50+__slow_ieee754_sqrtf (float b)
51 {
52 if (__builtin_expect (b > 0, 1))
53 {
54@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
55 }
56 return f_washf (b);
57 }
58+#undef __ieee754_sqrtf
59+float
60+__ieee754_sqrtf (float x)
61+{
62+ return __slow_ieee754_sqrtf (x);
63+}
64 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
65Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
66===================================================================
67--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
68+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
69@@ -40,7 +40,7 @@ static const float half = 0.5;
70 simultaneously. */
71
72 double
73-__ieee754_sqrt (double b)
74+__slow_ieee754_sqrt (double b)
75 {
76 if (__builtin_expect (b > 0, 1))
77 {
78@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
79
80 /* Handle small numbers by scaling. */
81 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
82- return __ieee754_sqrt (b * two108) * twom54;
83+ return __slow_ieee754_sqrt (b * two108) * twom54;
84
85 #define FMADD(a_, c_, b_) \
86 ({ double __r; \
87@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
88 }
89 return f_wash (b);
90 }
91+
92+#undef __ieee754_sqrt
93+double
94+__ieee754_sqrt (double x)
95+{
96+ return __slow_ieee754_sqrt (x);
97+}
98+
99 strong_alias (__ieee754_sqrt, __sqrt_finite)
100Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
101===================================================================
102--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
103+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
104@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
105 square root. */
106
107 float
108-__ieee754_sqrtf (float b)
109+__slow_ieee754_sqrtf (float b)
110 {
111 if (__builtin_expect (b > 0, 1))
112 {
113@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
114 }
115 return f_washf (b);
116 }
117+#undef __ieee754_sqrtf
118+float
119+__ieee754_sqrtf (float x)
120+{
121+ return __slow_ieee754_sqrtf (x);
122+}
123+
124 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
125Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
126===================================================================
127--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
128+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
129@@ -41,10 +41,10 @@ static const float half = 0.5;
130
131 #ifdef __STDC__
132 double
133-__ieee754_sqrt (double b)
134+__slow_ieee754_sqrt (double b)
135 #else
136 double
137-__ieee754_sqrt (b)
138+__slow_ieee754_sqrt (b)
139 double b;
140 #endif
141 {
142@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
143
144 /* Handle small numbers by scaling. */
145 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
146- return __ieee754_sqrt (b * two108) * twom54;
147+ return __slow_ieee754_sqrt (b * two108) * twom54;
148
149 #define FMADD(a_, c_, b_) \
150 ({ double __r; \
151@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
152 }
153 return f_wash (b);
154 }
155+
156+#undef __ieee754_sqrt
157+double
158+__ieee754_sqrt (double x)
159+{
160+ return __slow_ieee754_sqrt (x);
161+}
162+
163 strong_alias (__ieee754_sqrt, __sqrt_finite)
164Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
165===================================================================
166--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
167+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
168@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
169
170 #ifdef __STDC__
171 float
172-__ieee754_sqrtf (float b)
173+__slow_ieee754_sqrtf (float b)
174 #else
175 float
176-__ieee754_sqrtf (b)
177+__slow_ieee754_sqrtf (b)
178 float b;
179 #endif
180 {
181@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
182 }
183 return f_washf (b);
184 }
185+
186+#undef __ieee754_sqrtf
187+float
188+__ieee754_sqrtf (float x)
189+{
190+ return __slow_ieee754_sqrtf (x);
191+}
192+
193 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
194Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
195===================================================================
196--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
197+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
198@@ -41,10 +41,10 @@ static const float half = 0.5;
199
200 #ifdef __STDC__
201 double
202-__ieee754_sqrt (double b)
203+__slow_ieee754_sqrt (double b)
204 #else
205 double
206-__ieee754_sqrt (b)
207+__slow_ieee754_sqrt (b)
208 double b;
209 #endif
210 {
211@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
212
213 /* Handle small numbers by scaling. */
214 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
215- return __ieee754_sqrt (b * two108) * twom54;
216+ return __slow_ieee754_sqrt (b * two108) * twom54;
217
218 #define FMADD(a_, c_, b_) \
219 ({ double __r; \
220@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
221 }
222 return f_wash (b);
223 }
224+
225+#undef __ieee754_sqrt
226+double
227+__ieee754_sqrt (double x)
228+{
229+ return __slow_ieee754_sqrt (x);
230+}
231+
232 strong_alias (__ieee754_sqrt, __sqrt_finite)
233Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
234===================================================================
235--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
236+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
237@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
238
239 #ifdef __STDC__
240 float
241-__ieee754_sqrtf (float b)
242+__slow_ieee754_sqrtf (float b)
243 #else
244 float
245-__ieee754_sqrtf (b)
246+__slow_ieee754_sqrtf (b)
247 float b;
248 #endif
249 {
250@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
251 }
252 return f_washf (b);
253 }
254+
255+#undef __ieee754_sqrtf
256+float
257+__ieee754_sqrtf (float x)
258+{
259+ return __slow_ieee754_sqrtf (x);
260+}
261+
262 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
263Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
264===================================================================
265--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
266+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
267@@ -41,10 +41,10 @@ static const float half = 0.5;
268
269 #ifdef __STDC__
270 double
271-__ieee754_sqrt (double b)
272+__slow_ieee754_sqrt (double b)
273 #else
274 double
275-__ieee754_sqrt (b)
276+__slow_ieee754_sqrt (b)
277 double b;
278 #endif
279 {
280@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
281
282 /* Handle small numbers by scaling. */
283 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
284- return __ieee754_sqrt (b * two108) * twom54;
285+ return __slow_ieee754_sqrt (b * two108) * twom54;
286
287 #define FMADD(a_, c_, b_) \
288 ({ double __r; \
289@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
290 }
291 return f_wash (b);
292 }
293+
294+#undef __ieee754_sqrt
295+double
296+__ieee754_sqrt (double x)
297+{
298+ return __slow_ieee754_sqrt (x);
299+}
300+
301 strong_alias (__ieee754_sqrt, __sqrt_finite)
302Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
303===================================================================
304--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
305+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
306@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
307
308 #ifdef __STDC__
309 float
310-__ieee754_sqrtf (float b)
311+__slow_ieee754_sqrtf (float b)
312 #else
313 float
314-__ieee754_sqrtf (b)
315+__slow_ieee754_sqrtf (b)
316 float b;
317 #endif
318 {
319@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
320 }
321 return f_washf (b);
322 }
323+
324+#undef __ieee754_sqrtf
325+float
326+__ieee754_sqrtf (float x)
327+{
328+ return __slow_ieee754_sqrtf (x);
329+}
330+
331 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
332Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
333===================================================================
334--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
335+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
336@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
337 }
338 return f_wash (b);
339 }
340+
341+#undef __ieee754_sqrt
342+double
343+__ieee754_sqrt (double x)
344+{
345+ return __slow_ieee754_sqrt (x);
346+}
347+
348 strong_alias (__ieee754_sqrt, __sqrt_finite)
349Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
350===================================================================
351--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
352+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
353@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
354 }
355 return f_washf (b);
356 }
357+
358+#undef __ieee754_sqrtf
359+float
360+__ieee754_sqrtf (float x)
361+{
362+ return __slow_ieee754_sqrtf (x);
363+}
364+
365 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk.patch b/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk.patch
new file mode 100644
index 0000000000..ca5f17ba58
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk.patch
@@ -0,0 +1,108 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
4and lengths as well as ld.so.cache path in the dynamic loader to specific
5sections in memory. The sections that contain paths have been allocated a 4096
6byte section, which is the maximum path length in linux. This will allow the
7relocating script to parse the ELF binary, detect the section and easily replace
8the strings in a certain path.
9
10Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
11
12Index: libc/elf/interp.c
13===================================================================
14--- libc.orig/elf/interp.c
15+++ libc/elf/interp.c
16@@ -16,5 +16,5 @@
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
21+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
22 = RUNTIME_LINKER;
23Index: libc/elf/dl-load.c
24===================================================================
25--- libc.orig/elf/dl-load.c
26+++ libc/elf/dl-load.c
27@@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re
28 /* Get the generated information about the trusted directories. */
29 #include "trusted-dirs.h"
30
31-static const char system_dirs[] = SYSTEM_DIRS;
32-static const size_t system_dirs_len[] =
33+static const char system_dirs[4096] __attribute__ ((section (".sysdirs"))) = SYSTEM_DIRS;
34+volatile static const size_t system_dirs_len[] __attribute__ ((section (".sysdirslen"))) =
35 {
36 SYSTEM_DIRS_LEN
37 };
38Index: libc/elf/dl-cache.c
39===================================================================
40--- libc.orig/elf/dl-cache.c
41+++ libc/elf/dl-cache.c
42@@ -133,6 +133,10 @@ do \
43 while (0)
44
45
46+const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) =
47+ SYSCONFDIR "/ld.so.cache";
48+
49+
50 int
51 internal_function
52 _dl_cache_libcmp (const char *p1, const char *p2)
53Index: libc/elf/ldconfig.c
54===================================================================
55--- libc.orig/elf/ldconfig.c
56+++ libc/elf/ldconfig.c
57@@ -166,6 +166,9 @@ static struct argp argp =
58 options, parse_opt, NULL, doc, NULL, more_help, NULL
59 };
60
61+
62+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
63+
64 /* Check if string corresponds to an important hardware capability or
65 a platform. */
66 static int
67Index: libc/sysdeps/generic/dl-cache.h
68===================================================================
69--- libc.orig/sysdeps/generic/dl-cache.h
70+++ libc/sysdeps/generic/dl-cache.h
71@@ -27,10 +27,6 @@
72 ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
73 #endif
74
75-#ifndef LD_SO_CACHE
76-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
77-#endif
78-
79 #ifndef add_system_dir
80 # define add_system_dir(dir) add_dir (dir)
81 #endif
82Index: libc/elf/rtld.c
83===================================================================
84--- libc.orig/elf/rtld.c
85+++ libc/elf/rtld.c
86@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
87 strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
88 #endif
89
90+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
91
92 /* List of auditing DSOs. */
93 static struct audit_list
94@@ -1031,12 +1032,12 @@ of this helper program; chances are you
95 --list list all dependencies and how they are resolved\n\
96 --verify verify that given object really is a dynamically linked\n\
97 object we can handle\n\
98- --inhibit-cache Do not use " LD_SO_CACHE "\n\
99+ --inhibit-cache Do not use %s\n\
100 --library-path PATH use given PATH instead of content of the environment\n\
101 variable LD_LIBRARY_PATH\n\
102 --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\
103 in LIST\n\
104- --audit LIST use objects named in LIST as auditors\n");
105+ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE);
106
107 ++_dl_skip_args;
108 --_dl_argc;
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch
new file mode 100644
index 0000000000..f164f8f9ae
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/relocatable_sdk_fix_openpath.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3eglibc-nativesdk: Fix buffer overrun with a relocated SDK
4
5When ld-linux-*.so.2 is relocated to a path that is longer than the
6original fixed location, the dynamic loader will crash in open_path
7because it implicitly assumes that max_dirnamelen is a fixed size that
8never changes.
9
10The allocated buffer will not be large enough to contain the directory
11path string which is larger than the fixed location provided at build
12time.
13
14Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15
16---
17 elf/dl-load.c | 12 ++++++++++++
18 1 file changed, 12 insertions(+)
19
20--- a/elf/dl-load.c
21+++ b/elf/dl-load.c
22@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name
23 given on the command line when rtld is run directly. */
24 return -1;
25
26+ do
27+ {
28+ struct r_search_path_elem *this_dir = *dirs;
29+ if (this_dir->dirnamelen > max_dirnamelen)
30+ {
31+ max_dirnamelen = this_dir->dirnamelen;
32+ }
33+ }
34+ while (*++dirs != NULL);
35+
36 buf = alloca (max_dirnamelen + max_capstrlen + namelen);
37+
38+ dirs = sps->dirs;
39 do
40 {
41 struct r_search_path_elem *this_dir = *dirs;
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/tzselect-awk.patch b/meta/recipes-core/eglibc/eglibc-2.17/tzselect-awk.patch
new file mode 100644
index 0000000000..dc9949bec9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/tzselect-awk.patch
@@ -0,0 +1,42 @@
1tzselect: workaround bug in busybox awk
2
3busybox's version of awk in version 1.20.2 and lower doesn't support
4escape sequences in conjunction with the -F option. Use -v FS= instead
5as a workaround until the bug is fixed.
6
7Reference:
8https://bugs.busybox.net/show_bug.cgi?id=5126
9
10Upstream-Status: Inappropriate [other]
11
12Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
13
14--- libc/timezone/tzselect.ksh
15+++ libc/timezone/tzselect.ksh
16@@ -208,7 +208,7 @@ while
17 TZ_for_date=$TZ;;
18 *)
19 # Get list of names of countries in the continent or ocean.
20- countries=$($AWK -F'\t' \
21+ countries=$($AWK -v FS="\t" \
22 -v continent="$continent" \
23 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
24 '
25@@ -252,7 +252,7 @@ while
26
27
28 # Get list of names of time zone rule regions in the country.
29- regions=$($AWK -F'\t' \
30+ regions=$($AWK -v FS="\t" \
31 -v country="$country" \
32 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
33 '
34@@ -289,7 +289,7 @@ while
35 esac
36
37 # Determine TZ from country and region.
38- TZ=$($AWK -F'\t' \
39+ TZ=$($AWK -v FS="\t" \
40 -v country="$country" \
41 -v region="$region" \
42 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
diff --git a/meta/recipes-core/eglibc/eglibc-2.17/tzselect-sh.patch b/meta/recipes-core/eglibc/eglibc-2.17/tzselect-sh.patch
new file mode 100644
index 0000000000..e9a3691bbb
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.17/tzselect-sh.patch
@@ -0,0 +1,156 @@
1tzselect: eliminate ksh-dependency
2
3This is an adapted version of a patch originally
4by Peter Seebach <peter.seebach@windriver.com> found here:
5http://www.eglibc.org/archives/patches/msg00671.html
6
7Upstream-Status: Pending
8
9Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
10
11Index: libc/timezone/tzselect.ksh
12===================================================================
13--- libc.orig/timezone/tzselect.ksh 2012-11-17 09:50:14.000000000 -0800
14+++ libc/timezone/tzselect.ksh 2013-01-03 22:46:26.423844259 -0800
15@@ -1,4 +1,4 @@
16-#!/bin/bash
17+#!/bin/sh
18
19 PKGVERSION='(tzcode) '
20 TZVERSION=see_Makefile
21@@ -11,23 +11,80 @@
22
23 # Porting notes:
24 #
25-# This script requires a Posix-like shell with the extension of a
26-# 'select' statement. The 'select' statement was introduced in the
27-# Korn shell and is available in Bash and other shell implementations.
28-# If your host lacks both Bash and the Korn shell, you can get their
29-# source from one of these locations:
30+# func_select allows this script to run on shells (such as busybox ash)
31+# which lack the ksh "select" builtin.
32 #
33-# Bash <http://www.gnu.org/software/bash/bash.html>
34-# Korn Shell <http://www.kornshell.com/>
35-# Public Domain Korn Shell <http://www.cs.mun.ca/~michael/pdksh/>
36-#
37-# This script also uses several features of modern awk programs.
38+# This script uses several features of modern awk programs.
39 # If your host lacks awk, or has an old awk that does not conform to Posix,
40 # you can use either of the following free programs instead:
41 #
42 # Gawk (GNU awk) <http://www.gnu.org/software/gawk/>
43 # mawk <http://invisible-island.net/mawk/>
44
45+# Implement ksh-style select in POSIX shell
46+
47+# We need a mostly-portable echo-n.
48+case `echo -n "foo\c"` in
49+*n*c*) func_echo_n() { echo "$*"; } ;;
50+*n*) func_echo_n() { echo "$*\c"; } ;;
51+*) func_echo_n() { echo -n "$*"; } ;;
52+esac
53+
54+# Synopsis: Replace "select foo in list" with "while func_select foo in list"
55+# and this works just like ksh, so far as I know.
56+func_select () {
57+ func_select_args=0
58+ if expr "$1" : "[_a-zA-Z][_a-zA-Z0-9]*$" > /dev/null; then
59+ func_select_var=$1
60+ else
61+ echo >&2 "func_select: '$1' is not a valid variable name."
62+ return 1
63+ fi
64+ shift 1
65+ case $1 in
66+ in) shift 1;;
67+ *) echo >&2 "func_select: usage: func_select var in ... (you must provide
68+arguments)"; return 1;;
69+ esac
70+ case $# in
71+ 0) echo >&2 "func_select: usage: func_select var in ..."; return 1;;
72+ esac
73+ for func_select_arg
74+ do
75+ func_select_args=`expr $func_select_args + 1`
76+ eval func_select_a_$func_select_args=\$func_select_arg
77+ done
78+ REPLY=""
79+ while :
80+ do
81+ if test -z "$REPLY"; then
82+ func_select_i=1
83+ while test $func_select_i -le $func_select_args
84+ do
85+ eval echo "\"\$func_select_i) \$func_select_a_$func_select_i\""
86+ func_select_i=`expr $func_select_i + 1`
87+ done
88+ fi
89+ func_echo_n "${PS3-#? }" >&2
90+ if read REPLY; then
91+ if test -n "${REPLY}"; then
92+ if expr "$REPLY" : '[1-9][0-9]*$' > /dev/null; then
93+ if test "$REPLY" -ge 1 && test "$REPLY" -le $func_select_args; then
94+ eval $func_select_var=\$func_select_a_$REPLY
95+ else
96+ eval $func_select_var=
97+ fi
98+ else
99+ eval $func_select_var=
100+ fi
101+ return 0
102+ fi
103+ else
104+ eval $func_select_var=
105+ return 1
106+ fi
107+ done
108+}
109
110 # Specify default values for environment variables if they are unset.
111 : ${AWK=awk}
112@@ -72,7 +129,7 @@
113
114
115 # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
116-case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
117+case $(echo 1 | (while func_select x in x; do break; done) 2>/dev/null) in
118 ?*) PS3=
119 esac
120
121@@ -92,7 +149,7 @@
122
123 echo >&2 'Please select a continent or ocean.'
124
125- select continent in \
126+ while func_select continent in \
127 Africa \
128 Americas \
129 Antarctica \
130@@ -172,7 +229,7 @@
131 case $countries in
132 *"$newline"*)
133 echo >&2 'Please select a country.'
134- select country in $countries
135+ while func_select country in $countries
136 do
137 case $country in
138 '') echo >&2 'Please enter a number in range.';;
139@@ -211,7 +268,7 @@
140 *"$newline"*)
141 echo >&2 'Please select one of the following' \
142 'time zone regions.'
143- select region in $regions
144+ while func_select region in $regions
145 do
146 case $region in
147 '') echo >&2 'Please enter a number in range.';;
148@@ -288,7 +345,7 @@
149 echo >&2 "Is the above information OK?"
150
151 ok=
152- select ok in Yes No
153+ while func_select ok in Yes No
154 do
155 case $ok in
156 '') echo >&2 'Please enter 1 for Yes, or 2 for No.';;
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch
new file mode 100644
index 0000000000..24d4772728
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Backport
2
3From d0721e703d222c01a9e8c329311c4fb01dac6972 Mon Sep 17 00:00:00 2001
4From: Carlos O'Donell <carlos@redhat.com>
5Date: Thu, 29 Aug 2013 00:17:33 -0400
6Subject: [PATCH] ARM: Pass dl_hwcap to IFUNC resolver.
7
8For REL relocs pass dl_hwcap to the IFUNC resolver
9as is required by the IFUNC API (bug 15905).
10---
11 NEWS | 2 +-
12 ports/ChangeLog.arm | 7 +++++++
13 ports/sysdeps/arm/dl-machine.h | 2 +-
14 3 files changed, 9 insertions(+), 2 deletions(-)
15
16Index: libc/ports/ChangeLog.arm
17===================================================================
18--- libc.orig/ports/ChangeLog.arm 2013-07-14 16:08:52.000000000 -0700
19+++ libc/ports/ChangeLog.arm 2013-09-12 17:17:24.174387150 -0700
20@@ -1,3 +1,10 @@
21+2013-08-28 Kyle McMartin <kyle@redhat.com>
22+ Carlos O'Donell <carlos@redhat.com>
23+
24+ [BZ #15905]
25+ * sysdeps/arm/dl-machine [!RTLD_BOOTSTRAP] (elf_machine_rel):
26+ Pass GLRO(dl_hwcap) to the IFUNC resolver.
27+
28 2013-07-03 Joseph Myers <joseph@codesourcery.com>
29
30 * sysdeps/arm/include/bits/setjmp.h [_ISOMAC] (JMP_BUF_REGLIST):
31Index: libc/ports/sysdeps/arm/dl-machine.h
32===================================================================
33--- libc.orig/ports/sysdeps/arm/dl-machine.h 2013-09-12 08:56:03.641743520 -0700
34+++ libc/ports/sysdeps/arm/dl-machine.h 2013-09-12 17:17:24.174387150 -0700
35@@ -503,7 +503,7 @@
36 break;
37 case R_ARM_IRELATIVE:
38 value = map->l_addr + *reloc_addr;
39- value = ((Elf32_Addr (*) (void)) value) ();
40+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
41 *reloc_addr = value;
42 break;
43 #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch
new file mode 100644
index 0000000000..b4489e9ae9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-R_ARM_TLS_DTPOFF32.patch
@@ -0,0 +1,56 @@
1
2Quote from bug 1443 which explains what the patch does :
3
4 We build some random program and link it with -lust. When we run it,
5 it dies with a SIGSEGV before reaching main().
6
7 Libust.so depends on liburcu-bp.so from the usermode-rcu package.
8 Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
9 is critical.
10
11 Libust.so uses a TLS / __thread variable that is defined in liburcu-
12 bp.so. There are special ARM-specific relocation types that allow two
13 shared libraries to share thread-specific data. This is critical too.
14
15 One more critical issue: although liburcu-bp.so is prelinked, we can't
16 load it at its prelinked address, because we also link against
17 librt.so, and librt.so uses that address.
18
19 The dynamic linker is forced to relink liburcu-bp.so at a different
20 address. In the course of relinking, it processes the special ARM
21 relocation record mentioned above. The prelinker has already filled
22 in the information, which is a short offset into a table of thread-
23 specific data that is allocated per-thread for each library that uses
24 TLS. Because the normal behavior of a relocation is to add the symbol
25 value to an addend stored at the address being relocated, we end up
26 adding the short offset to itself, doubling it.
27
28 Now we have an awkward situation. The libust.so library doesn't know
29 about the addend, so its TLS data for this element is correct. The
30 liburcu-bp.so library has a different offset for the element. When we
31 go to initialize the element for the first time in liburcu-bp.so, we
32 write the address of the result at the doubled (broken) offset.
33 Later, when we refer to the address from libust.so, we check the value
34 at the correct offset, but it's NULL, so we eat hot SIGSEGV.
35
36Upstream-Status: Pending
37
38Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
39---
40 .../libc/ports/sysdeps/arm/dl-machine.h | 2 +-
41 1 file changed, 1 insertion(+), 1 deletion(-)
42
43ndex 8d905e8..dcfa71e 100644
44--- libc.orig/ports/sysdeps/arm/dl-machine.h
45+++ libc/ports/sysdeps/arm/dl-machine.h
46@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
47
48 case R_ARM_TLS_DTPOFF32:
49 if (sym != NULL)
50- *reloc_addr += sym->st_value;
51+ *reloc_addr = sym->st_value;
52 break;
53
54 case R_ARM_TLS_TPOFF32:
55--
56
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch
new file mode 100644
index 0000000000..9e23e7cda2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-menuconfig-support.patch
@@ -0,0 +1,912 @@
1Pulled from
2http://www.eglibc.org/archives/patches/msg01042.html
3
4Upstream-Status: Pending
5Signed-off-by: Khem
6
7Hi,
8
9This patch adds 'make menuconfig' support to EGLIBC.
10
11
12EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files.
13
14There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile:
15
16- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config.
17
18- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
19
20- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory.
21
22
23Pre-Processing:
24
25
26The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'.
27
28Post-Processing (libc/options-config/config-postproc.pl):
29
30
31- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header.
32
33- "CONFIG_" prefix is changed back to "OPTION_".
34
35
36- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'.
37
38
39A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds.
40
41libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'.
42
43libc/EGLIBC.option-groups is updated to include new information on the menuconfig support.
44
45Thanks,
46
47attached is the updated patch to address above issues.
48
49Steve
50
51--
52Steve Longerbeam | Senior Embedded Engineer, ESD Services
53Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
54P 510.354.5838 | M 408.410.2735
55Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
56
57
58Index: libc/EGLIBC.cross-building
59===================================================================
60--- libc.orig/EGLIBC.cross-building 2007-04-20 16:15:03.000000000 -0700
61+++ libc/EGLIBC.cross-building 2013-06-26 00:45:15.788885570 -0700
62@@ -243,9 +243,29 @@
63 > $src/libc/configure \
64 > --prefix=/usr \
65 > --with-headers=$sysroot/usr/include \
66+ > --with-kconfig=$obj/linux/scripts/kconfig \
67 > --build=$build \
68 > --host=$target \
69 > --disable-profile --without-gd --without-cvs --enable-add-ons
70+
71+Note the additional '--with-kconfig' option. This tells EGLIBC where to
72+find the host config tools used by the kernel 'make config' and 'make
73+menuconfig'. These tools can be re-used by EGLIBC for its own 'make
74+*config' support, which will create 'option-groups.config' for you.
75+But first make sure those tools have been built by running some
76+dummy 'make *config' calls in the kernel directory:
77+
78+ $ cd $obj/linux
79+ $ PATH=$tools/bin:$PATH make config \
80+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
81+ $ PATH=$tools/bin:$PATH make menuconfig \
82+ > ARCH=$linux_arch CROSS_COMPILE=$target- \
83+
84+Now we can configure and build the full EGLIBC:
85+
86+ $ cd $obj/eglibc
87+ $ PATH=$tools/bin:$PATH make defconfig
88+ $ PATH=$tools/bin:$PATH make menuconfig
89 $ PATH=$tools/bin:$PATH make
90 $ PATH=$tools/bin:$PATH make install install_root=$sysroot
91
92Index: libc/configure.in
93===================================================================
94--- libc.orig/configure.in 2013-06-24 15:42:26.000000000 -0700
95+++ libc/configure.in 2013-06-26 00:45:15.792885570 -0700
96@@ -127,6 +127,16 @@
97 [sysheaders=''])
98 AC_SUBST(sysheaders)
99
100+AC_ARG_WITH([kconfig],
101+ AC_HELP_STRING([--with-kconfig=PATH],
102+ [location of kconfig tools to use (from Linux
103+ kernel builds) to re-use for configuring EGLIBC
104+ option groups]),
105+ [KCONFIG_TOOLS=$withval],
106+ [KCONFIG_TOOLS=''])
107+AC_SUBST(KCONFIG_TOOLS)
108+
109+
110 AC_SUBST(use_default_link)
111 AC_ARG_WITH([default-link],
112 AC_HELP_STRING([--with-default-link],
113Index: libc/config.make.in
114===================================================================
115--- libc.orig/config.make.in 2013-04-28 08:21:50.000000000 -0700
116+++ libc/config.make.in 2013-06-26 00:45:15.792885570 -0700
117@@ -45,6 +45,8 @@
118 c++-sysincludes = @CXX_SYSINCLUDES@
119 all-warnings = @all_warnings@
120
121+kconfig_tools = @KCONFIG_TOOLS@
122+
123 have-z-combreloc = @libc_cv_z_combreloc@
124 have-z-execstack = @libc_cv_z_execstack@
125 have-Bgroup = @libc_cv_Bgroup@
126Index: libc/options-config/config-postproc.pl
127===================================================================
128--- /dev/null 1970-01-01 00:00:00.000000000 +0000
129+++ libc/options-config/config-postproc.pl 2013-06-26 00:45:15.792885570 -0700
130@@ -0,0 +1,54 @@
131+#!/usr/bin/perl
132+
133+$usage = "usage: $0 <default config file> <config file>\n";
134+
135+die "$usage" unless @ARGV;
136+$defaults = shift @ARGV;
137+die "$usage" unless @ARGV;
138+die "Could not open $ARGV[0]" unless -T $ARGV[0];
139+
140+sub yank {
141+ @option = grep($_ ne $_[0], @option);
142+}
143+
144+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
145+
146+# get the full list of available options using the default config file
147+$i = 0;
148+while (<DEFAULTS>) {
149+ if (/^\s*OPTION_(\w+)\s*=/) {
150+ $option[$i++] = $1;
151+ }
152+}
153+
154+# now go through the config file, making the necessary changes
155+while (<>) {
156+ if (/Linux Kernel Configuration/) {
157+ # change title
158+ s/Linux Kernel/Option Groups/;
159+ print;
160+ } elsif (/^\s*CONFIG_(\w+)\s*=/) {
161+ # this is an explicit option set line, change CONFIG_ to OPTION_
162+ # before printing and remove this option from option list
163+ $opt = $1;
164+ yank($opt);
165+ s/CONFIG_/OPTION_/g;
166+ print;
167+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
168+ # this is a comment line, change CONFIG_ to OPTION_, remove this
169+ # option from option list, and convert to explicit OPTION_FOO=n
170+ $opt = $1;
171+ yank($opt);
172+ s/CONFIG_/OPTION_/g;
173+ print "OPTION_$opt=n\n";
174+ } else {
175+ print;
176+ }
177+}
178+
179+# any options left in @options, are options that were not mentioned in
180+# the config file, and implicitly that means the option must be set =n,
181+# so do that here.
182+foreach $opt (@option) {
183+ print "OPTION_$opt=n\n";
184+}
185Index: libc/options-config/config-preproc.pl
186===================================================================
187--- /dev/null 1970-01-01 00:00:00.000000000 +0000
188+++ libc/options-config/config-preproc.pl 2013-06-26 00:45:15.792885570 -0700
189@@ -0,0 +1,8 @@
190+#!/usr/bin/perl
191+
192+if (@ARGV) {
193+ while (<>) {
194+ s/OPTION_/CONFIG_/g;
195+ print;
196+ }
197+}
198Index: libc/options-config/Makefile
199===================================================================
200--- /dev/null 1970-01-01 00:00:00.000000000 +0000
201+++ libc/options-config/Makefile 2013-06-26 00:45:15.792885570 -0700
202@@ -0,0 +1,55 @@
203+# ===========================================================================
204+# EGLIBC option-groups configuration targets
205+# These targets are included from top-level makefile
206+
207+ifneq ($(kconfig_tools),)
208+ifneq (no,$(PERL))
209+
210+ocdir := options-config
211+
212+OconfigDefaults := option-groups.defaults
213+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
214+OconfigDef := option-groups.def
215+Oconfig := $(common-objpfx)option-groups.config
216+Oconfig_tmp := $(common-objpfx).tmp.config
217+
218+conf := $(kconfig_tools)/conf
219+mconf := $(kconfig_tools)/mconf
220+
221+preproc := $(PERL) $(ocdir)/config-preproc.pl
222+postproc := $(PERL) $(ocdir)/config-postproc.pl
223+
224+PHONY += defconfig config menuconfig
225+
226+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
227+ rm -f $(OconfigDefaults_tmp)
228+ rm -f $(Oconfig_tmp)
229+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
230+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
231+ $(OconfigDef)
232+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
233+ rm $(Oconfig_tmp)
234+ rm $(OconfigDefaults_tmp)
235+
236+config: $(conf) $(OconfigDefaults) $(OconfigDef)
237+ rm -f $(Oconfig_tmp)
238+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
239+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
240+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
241+ rm $(Oconfig_tmp)
242+
243+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
244+ rm -f $(Oconfig_tmp)
245+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
246+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
247+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
248+ rm $(Oconfig_tmp)
249+
250+# Help text used by make help
251+help:
252+ @echo ' defconfig - New config with default from default config'
253+ @echo ' config - Update current config utilising a line-oriented program'
254+ @echo ' menuconfig - Update current config utilising a menu based program'
255+
256+endif
257+endif
258Index: libc/option-groups.def
259===================================================================
260--- libc.orig/option-groups.def 2013-05-17 17:12:09.000000000 -0700
261+++ libc/option-groups.def 2013-06-26 00:45:15.796885570 -0700
262@@ -4,19 +4,19 @@
263 #
264 # An entry of the form:
265 #
266-# config OPTION_GROUP_NAME
267+# config GROUP_NAME
268 # bool "one-line explanation of what this option group controls"
269 # help
270 # Multi-line help explaining the option group's meaning in
271 # some detail, terminated by indentation level.
272 #
273-# defines an option group whose variable is OPTION_GROUP_NAME, with
274+# defines an option group whose variable is GROUP_NAME, with
275 # meaningful values 'y' (enabled) and 'n' (disabled). The
276 # documentation is formatted to be consumed by some sort of
277 # interactive configuration interface, but EGLIBC doesn't have such an
278 # interface yet.
279 #
280-# An option may have a 'depends' line, indicating which other options
281+# An option may have a 'depends on' line, indicating which other options
282 # must also be enabled if this option is. At present, EGLIBC doesn't
283 # check that these dependencies are satisfied.
284 #
285@@ -41,9 +41,9 @@
286 # although this simply reestablishes the value already set by
287 # 'option-groups.defaults'.
288
289-config OPTION_EGLIBC_ADVANCED_INET6
290+config EGLIBC_ADVANCED_INET6
291 bool "IPv6 Advanced Sockets API support (RFC3542)"
292- depends OPTION_EGLIBC_INET
293+ depends on EGLIBC_INET
294 help
295 This option group includes the functions specified by RFC 3542,
296 "Advanced Sockets Application Program Interface (API) for
297@@ -71,7 +71,7 @@
298 inet6_rth_segments
299 inet6_rth_space
300
301-config OPTION_EGLIBC_BACKTRACE
302+config EGLIBC_BACKTRACE
303 bool "Functions for producing backtraces"
304 help
305 This option group includes functions for producing a list of
306@@ -85,7 +85,7 @@
307 backtrace_symbols
308 backtrace_symbols_fd
309
310-config OPTION_EGLIBC_BIG_MACROS
311+config EGLIBC_BIG_MACROS
312 bool "Use extensive inline code"
313 help
314 This option group specifies whether certain pieces of code
315@@ -93,7 +93,7 @@
316 group is not selected, function calls will be used instead,
317 hence reducing the library footprint.
318
319-config OPTION_EGLIBC_BSD
320+config EGLIBC_BSD
321 bool "BSD-specific functions, and their compatibility stubs"
322 help
323 This option group includes functions specific to BSD kernels.
324@@ -109,10 +109,9 @@
325 revoke
326 setlogin
327
328-config OPTION_EGLIBC_CXX_TESTS
329+config EGLIBC_CXX_TESTS
330 bool "Tests that link against the standard C++ library."
331- depends OPTION_POSIX_WIDE_CHAR_DEVICE_IO
332- depends OPTION_EGLIBC_LIBM
333+ depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
334 help
335 This option group does not include any C library functions;
336 instead, it controls which EGLIBC tests an ordinary 'make
337@@ -121,23 +120,22 @@
338 run.
339
340 The standard C++ library depends on the math library 'libm' and
341- the wide character I/O functions included in EGLIBC. If those
342- option groups are disabled, this test must also be disabled.
343+ the wide character I/O functions included in EGLIBC. So those
344+ option groups must be enabled if this test is enabled.
345
346-config OPTION_EGLIBC_CATGETS
347+config EGLIBC_CATGETS
348 bool "Functions for accessing message catalogs"
349- depends OPTION_EGLIBC_LOCALE_CODE
350+ depends on EGLIBC_LOCALE_CODE
351 help
352 This option group includes functions for accessing message
353 catalogs: catopen, catclose, and catgets.
354
355- This option group depends on the OPTION_EGLIBC_LOCALE_CODE
356- option group; if you disable that, you must also disable this.
357+ This option group depends on the EGLIBC_LOCALE_CODE
358+ option group.
359
360-config OPTION_EGLIBC_CHARSETS
361+config EGLIBC_CHARSETS
362 bool "iconv/gconv character set conversion libraries"
363 help
364-
365 This option group includes support for character sets other
366 than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
367 various encodings. This affects both the character sets
368@@ -198,16 +196,16 @@
369 WCHAR_T - EGLIBC's internal form (target-endian,
370 32-bit ISO 10646)
371
372-config OPTION_EGLIBC_CRYPT
373+config EGLIBC_CRYPT
374 bool "Encryption library"
375 help
376 This option group includes the `libcrypt' library which
377 provides functions for one-way encryption. Supported
378 encryption algorithms include MD5, SHA-256, SHA-512 and DES.
379
380-config OPTION_EGLIBC_CRYPT_UFC
381+config EGLIBC_CRYPT_UFC
382 bool "Ultra fast `crypt' implementation"
383- depends OPTION_EGLIBC_CRYPT
384+ depends on EGLIBC_CRYPT
385 help
386 This option group provides ultra fast DES-based implementation of
387 the `crypt' function. When this option group is disabled,
388@@ -216,7 +214,7 @@
389 errno to ENOSYS if /salt/ passed does not correspond to either MD5,
390 SHA-256 or SHA-512 algorithm.
391
392-config OPTION_EGLIBC_DB_ALIASES
393+config EGLIBC_DB_ALIASES
394 bool "Functions for accessing the mail aliases database"
395 help
396 This option group includues functions for looking up mail
397@@ -233,7 +231,7 @@
398 When this option group is disabled, the NSS service libraries
399 also lack support for querying their mail alias tables.
400
401-config OPTION_EGLIBC_ENVZ
402+config EGLIBC_ENVZ
403 bool "Functions for handling envz-style environment vectors."
404 help
405 This option group contains functions for creating and operating
406@@ -248,7 +246,7 @@
407 envz_entry envz_remove
408 envz_get envz_strip
409
410-config OPTION_EGLIBC_FCVT
411+config EGLIBC_FCVT
412 bool "Functions for converting floating-point numbers to strings"
413 help
414 This option group includes functions for converting
415@@ -262,14 +260,14 @@
416 fcvt_r qfcvt_r
417 gcvt qgcvt
418
419-config OPTION_EGLIBC_FMTMSG
420+config EGLIBC_FMTMSG
421 bool "Functions for formatting messages"
422 help
423 This option group includes the following functions:
424
425 addseverity fmtmsg
426
427-config OPTION_EGLIBC_FSTAB
428+config EGLIBC_FSTAB
429 bool "Access functions for 'fstab'"
430 help
431 This option group includes functions for reading the mount
432@@ -283,7 +281,7 @@
433 getfsent setfsent
434 getfsfile
435
436-config OPTION_EGLIBC_FTRAVERSE
437+config EGLIBC_FTRAVERSE
438 bool "Functions for traversing file hierarchies"
439 help
440 This option group includes functions for traversing file
441@@ -297,9 +295,9 @@
442 fts_set nftw64
443 fts_close
444
445-config OPTION_EGLIBC_GETLOGIN
446+config EGLIBC_GETLOGIN
447 bool "The getlogin function"
448- depends OPTION_EGLIBC_UTMP
449+ depends on EGLIBC_UTMP
450 help
451 This function group includes the 'getlogin' and 'getlogin_r'
452 functions, which return the user name associated by the login
453@@ -309,17 +307,17 @@
454 fall back on 'getlogin' to find the user's login name for tilde
455 expansion when the 'HOME' environment variable is not set.
456
457-config OPTION_EGLIBC_IDN
458+config EGLIBC_IDN
459 bool "International domain names support"
460 help
461 This option group includes the `libcidn' library which
462 provides support for international domain names.
463
464-config OPTION_EGLIBC_INET
465+config EGLIBC_INET
466 bool "Networking support"
467 help
468 This option group includes networking-specific functions and
469- data. With OPTION_EGLIBC_INET disabled, the EGLIBC
470+ data. With EGLIBC_INET disabled, the EGLIBC
471 installation and API changes as follows:
472
473 - The following libraries are not installed:
474@@ -439,14 +437,14 @@
475 use Unix-domain sockets to communicate with the syslog daemon;
476 syslog is valuable in non-networked contexts.
477
478-config OPTION_EGLIBC_INET_ANL
479+config EGLIBC_INET_ANL
480 bool "Asynchronous name lookup"
481- depends OPTION_EGLIBC_INET
482+ depends on EGLIBC_INET
483 help
484 This option group includes the `libanl' library which
485 provides support for asynchronous name lookup.
486
487-config OPTION_EGLIBC_LIBM
488+config EGLIBC_LIBM
489 bool "libm (math library)"
490 help
491 This option group includes the 'libm' library, containing
492@@ -464,7 +462,7 @@
493 group, you will not be able to build 'libstdc++' against the
494 resulting EGLIBC installation.
495
496-config OPTION_EGLIBC_LOCALES
497+config EGLIBC_LOCALES
498 bool "Locale definitions"
499 help
500 This option group includes all locale definitions other than
501@@ -472,17 +470,17 @@
502 only the "C" locale is supported.
503
504
505-config OPTION_EGLIBC_LOCALE_CODE
506+config EGLIBC_LOCALE_CODE
507 bool "Locale functions"
508- depends OPTION_POSIX_C_LANG_WIDE_CHAR
509+ depends on POSIX_C_LANG_WIDE_CHAR
510 help
511 This option group includes locale support functions, programs,
512- and libraries. With OPTION_EGLIBC_LOCALE_FUNCTIONS disabled,
513+ and libraries. With EGLIBC_LOCALE_CODE disabled,
514 EGLIBC supports only the 'C' locale (also known as 'POSIX'),
515 and ignores the settings of the 'LANG' and 'LC_*' environment
516 variables.
517
518- With OPTION_EGLIBC_LOCALE_CODE disabled, the following
519+ With EGLIBC_LOCALE_CODE disabled, the following
520 functions are omitted from libc:
521
522 duplocale localeconv nl_langinfo rpmatch strfmon_l
523@@ -491,46 +489,43 @@
524 Furthermore, only the LC_CTYPE and LC_TIME categories of the
525 standard "C" locale are available.
526
527- The OPTION_EGLIBC_CATGETS option group depends on this option
528- group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
529- disable OPTION_EGLIBC_CATGETS.
530+ The EGLIBC_CATGETS option group depends on this option group.
531+
532
533-config OPTION_EGLIBC_MEMUSAGE
534+config EGLIBC_MEMUSAGE
535 bool "Memory profiling library"
536 help
537 This option group includes the `libmemusage' library and
538 the `memusage' and `memusagestat' utilities.
539 These components provide memory profiling functions.
540
541- OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
542+ EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
543
544 Libmemusage library buffers the profiling data in memory
545 before writing it out to disk. By default, the library
546 allocates 1.5M buffer, which can be substantial for some
547- systems. OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
548+ systems. EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
549 allows to change the default buffer size. It specifies
550 the number of entries the buffer should have.
551 On most architectures one buffer entry amounts to 48 bytes,
552 so setting this option to the value of 512 will reduce the size of
553 the memory buffer to 24K.
554
555-config OPTION_EGLIBC_NIS
556+config EGLIBC_NIS
557 bool "Support for NIS, NIS+, and the special 'compat' services."
558- depends OPTION_EGLIBC_INET
559- depends OPTION_EGLIBC_SUNRPC
560+ depends on EGLIBC_INET && EGLIBC_SUNRPC
561 help
562 This option group includes the NIS, NIS+, and 'compat' Name
563 Service Switch service libraries. When it is disabled, those
564 services libraries are not installed; you should remove any
565 references to them from your 'nsswitch.conf' file.
566
567- This option group depends on the OPTION_EGLIBC_INET option
568+ This option group depends on the EGLIBC_INET option
569 group; you must enable that to enable this option group.
570
571-config OPTION_EGLIBC_NSSWITCH
572+config EGLIBC_NSSWITCH
573 bool "Name service switch (nsswitch) support"
574 help
575-
576 This option group includes support for the 'nsswitch' facility.
577 With this option group enabled, all EGLIBC functions for
578 accessing various system databases (passwords and groups;
579@@ -544,12 +539,12 @@
580 'option-groups.config' file must set the following two
581 variables:
582
583- OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
584+ EGLIBC_NSSWITCH_FIXED_CONFIG
585
586 Set this to the name of a file whose contents observe the
587 same syntax as an ordinary '/etc/nsswitch.conf' file. The
588 EGLIBC build process parses this file just as EGLIBC would
589- at run time if OPTION_EGLIBC_NSSWITCH were enabled, and
590+ at run time if EGLIBC_NSSWITCH were enabled, and
591 produces a C library that uses the nsswitch service
592 libraries to search for database entries as this file
593 specifies, instead of consulting '/etc/nsswitch.conf' at run
594@@ -567,7 +562,7 @@
595 you will probably want to delete references to databases not
596 needed on your system.
597
598- OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
599+ EGLIBC_NSSWITCH_FIXED_FUNCTIONS
600
601 The EGLIBC build process uses this file to decide which
602 functions to make available from which service libraries.
603@@ -585,28 +580,28 @@
604 Be sure to mention each function in each service you wish to
605 use. If you do not mention a service's function here, the
606 EGLIBC database access functions will not find it, even if
607- it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
608+ it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
609 file.
610
611- In this arrangement, EGLIBC will not use the 'dlopen' and
612- 'dlsym' functions to find database access functions. Instead,
613- libc hard-codes references to the service libraries' database
614- access functions. You must explicitly link your program
615- against the name service libraries (those whose names start
616- with 'libnss_', in the sysroot's '/lib' directory) whose
617- functions you intend to use. This arrangement helps
618- system-wide static analysis tools decide which functions a
619- system actually uses.
620-
621- Note that some nsswitch service libraries require other option
622- groups to be enabled; for example, the OPTION_EGLIBC_INET
623- option group must be enabled to use the 'libnss_dns.so.2'
624- service library, which uses the Domain Name System network
625- protocol to answer queries.
626+ In this arrangement, EGLIBC will not use the 'dlopen' and
627+ 'dlsym' functions to find database access functions. Instead,
628+ libc hard-codes references to the service libraries' database
629+ access functions. You must explicitly link your program
630+ against the name service libraries (those whose names start
631+ with 'libnss_', in the sysroot's '/lib' directory) whose
632+ functions you intend to use. This arrangement helps
633+ system-wide static analysis tools decide which functions a
634+ system actually uses.
635+
636+ Note that some nsswitch service libraries require other option
637+ groups to be enabled; for example, the EGLIBC_INET
638+ option group must be enabled to use the 'libnss_dns.so.2'
639+ service library, which uses the Domain Name System network
640+ protocol to answer queries.
641
642-config OPTION_EGLIBC_RCMD
643+config EGLIBC_RCMD
644 bool "Support for 'rcmd' and related library functions"
645- depends OPTION_EGLIBC_INET
646+ depends on EGLIBC_INET
647 help
648 This option group includes functions for running commands on
649 remote machines via the 'rsh' protocol, and doing authentication
650@@ -622,7 +617,7 @@
651 rresvport ruserpass
652 rresvport_af
653
654-config OPTION_EGLIBC_RTLD_DEBUG
655+config EGLIBC_RTLD_DEBUG
656 bool "Runtime linker debug print outs"
657 help
658 This option group enables debug output of the runtime linker
659@@ -633,7 +628,7 @@
660 the `ldd' utility which may also be used by the prelinker.
661 In particular, the `--unused' ldd option will not work correctly.
662
663-config OPTION_EGLIBC_SPAWN
664+config EGLIBC_SPAWN
665 bool "Support for POSIX posix_spawn functions"
666 help
667 This option group includes the POSIX functions for executing
668@@ -669,7 +664,7 @@
669 disabled, those programs will only operate on uncompressed
670 charmap files.
671
672-config OPTION_EGLIBC_STREAMS
673+config EGLIBC_STREAMS
674 bool "Support for accessing STREAMS."
675 help
676 This option group includes functions for reading and writing
677@@ -685,14 +680,14 @@
678 isastream fdetach
679 putmsg
680
681-config OPTION_EGLIBC_SUNRPC
682+config EGLIBC_SUNRPC
683 bool "Support for the Sun 'RPC' protocol."
684- depends OPTION_EGLIBC_INET
685+ depends on EGLIBC_INET
686 help
687 This option group includes support for the Sun RPC protocols,
688 including the 'rpcgen' and 'rpcinfo' programs.
689
690-config OPTION_EGLIBC_UTMP
691+config EGLIBC_UTMP
692 bool "Older access functions for 'utmp' login records"
693 help
694 This option group includes the older 'utent' family of
695@@ -719,9 +714,9 @@
696
697 libutil.so (and libutil.a)
698
699-config OPTION_EGLIBC_UTMPX
700+config EGLIBC_UTMPX
701 bool "POSIX access functions for 'utmp' login records"
702- depends OPTION_EGLIBC_UTMP
703+ depends on EGLIBC_UTMP
704 help
705 This option group includes the POSIX functions for reading and
706 writing user login records in the 'utmp' file (usually
707@@ -742,21 +737,21 @@
708 updwtmpx
709 utmpxname
710
711-config OPTION_EGLIBC_WORDEXP
712+config EGLIBC_WORDEXP
713 bool "Shell-style word expansion"
714 help
715 This option group includes the 'wordexp' function for
716 performing word expansion in the manner of the shell, and the
717 accompanying 'wordfree' function.
718
719-config OPTION_POSIX_C_LANG_WIDE_CHAR
720+config POSIX_C_LANG_WIDE_CHAR
721 bool "ISO C library wide character functions, excluding I/O"
722 help
723 This option group includes the functions defined by the ISO C
724 standard for working with wide and multibyte characters in
725 memory. Functions for reading and writing wide and multibyte
726 characters from and to files call in the
727- OPTION_POSIX_WIDE_CHAR_DEVICE_IO option group.
728+ POSIX_WIDE_CHAR_DEVICE_IO option group.
729
730 This option group includes the following functions:
731
732@@ -778,14 +773,14 @@
733 mbrlen wcscoll wcstol
734 mbrtowc wcscpy wcstold
735
736-config OPTION_POSIX_REGEXP
737+config POSIX_REGEXP
738 bool "Regular expressions"
739 help
740 This option group includes the POSIX regular expression
741 functions, and the associated non-POSIX extensions and
742 compatibility functions.
743
744- With OPTION_POSIX_REGEXP disabled, the following functions are
745+ With POSIX_REGEXP disabled, the following functions are
746 omitted from libc:
747
748 re_comp re_max_failures regcomp
749@@ -799,9 +794,9 @@
750 <regexp.h> header file, 'compile', 'step', and 'advance', is
751 omitted.
752
753-config OPTION_POSIX_REGEXP_GLIBC
754+config POSIX_REGEXP_GLIBC
755 bool "Regular expressions from GLIBC"
756- depends OPTION_POSIX_REGEXP
757+ depends on POSIX_REGEXP
758 help
759 This option group specifies which regular expression
760 library to use. The choice is between regex
761@@ -810,9 +805,9 @@
762 optimized for speed; regex from libiberty is more than twice
763 as small while still is enough for most practical purposes.
764
765-config OPTION_POSIX_WIDE_CHAR_DEVICE_IO
766+config POSIX_WIDE_CHAR_DEVICE_IO
767 bool "Input and output functions for wide characters"
768- depends OPTION_POSIX_C_LANG_WIDE_CHAR
769+ depends on POSIX_C_LANG_WIDE_CHAR
770 help
771 This option group includes functions for reading and writing
772 wide characters to and from <stdio.h> streams.
773Index: libc/Makefile
774===================================================================
775--- libc.orig/Makefile 2013-06-04 08:48:26.000000000 -0700
776+++ libc/Makefile 2013-06-26 00:45:15.796885570 -0700
777@@ -24,6 +24,7 @@
778
779 include Makeconfig
780
781+include options-config/Makefile
782
783 # This is the default target; it makes everything except the tests.
784 .PHONY: all
785Index: libc/configure
786===================================================================
787--- libc.orig/configure 2013-06-24 15:42:26.000000000 -0700
788+++ libc/configure 2013-06-26 00:45:15.800885570 -0700
789@@ -622,6 +622,7 @@
790 libc_cv_have_bash2
791 BASH_SHELL
792 libc_cv_gcc_static_libgcc
793+KCONFIG_TOOLS
794 CXX_SYSINCLUDES
795 SYSINCLUDES
796 AUTOCONF
797@@ -734,6 +735,7 @@
798 with_binutils
799 with_selinux
800 with_headers
801+with_kconfig
802 with_default_link
803 enable_sanity_checks
804 enable_shared
805@@ -1432,6 +1434,9 @@
806 --with-selinux if building with SELinux support
807 --with-headers=PATH location of system headers to use (for example
808 /usr/src/linux/include) [default=compiler default]
809+ --with-kconfig=PATH location of kconfig tools to use (from Linux kernel
810+ builds) to re-use for configuring EGLIBC option
811+ groups
812 --with-default-link do not use explicit linker scripts
813 --with-cpu=CPU select code for CPU variant
814
815@@ -3395,6 +3400,14 @@
816
817
818
819+# Check whether --with-kconfig was given.
820+if test "${with_kconfig+set}" = set; then
821+ withval=$with_kconfig; KCONFIG_TOOLS=$withval
822+else
823+ KCONFIG_TOOLS=''
824+fi
825+
826+
827
828 # Check whether --with-default-link was given.
829 if test "${with_default_link+set}" = set; then :
830Index: libc/EGLIBC.option-groups
831===================================================================
832--- libc.orig/EGLIBC.option-groups 2007-04-13 17:50:17.000000000 -0700
833+++ libc/EGLIBC.option-groups 2013-06-26 00:45:15.800885570 -0700
834@@ -56,33 +56,9 @@
835
836 The Option Groups
837
838-EGLIBC currently implements the following option groups, also
839-documented in the file 'option-groups.def':
840-
841-OPTION_EGLIBC_CATGETS
842- This option group includes functions for accessing message
843- catalogs: catopen, catclose, and catgets.
844-
845-OPTION_EGLIBC_LOCALES
846- This option group includes all locale definitions other than
847- those for the "C" locale. If this option group is omitted, then
848- only the "C" locale is supported.
849-
850-OPTION_EGLIBC_LIBM
851- This option group includes the 'libm' library, containing
852- mathematical functions. If this option group is omitted, then
853- an EGLIBC installation does not include shared or unshared versions
854- of the math library.
855-
856- Note that this does not remove all floating-point related
857- functionality from EGLIBC; for example, 'printf' and 'scanf'
858- can still print and read floating-point values with this option
859- group disabled.
860-
861- Note that the ISO Standard C++ library 'libstdc++' depends on
862- EGLIBC's math library 'libm'. If you disable this option
863- group, you will not be able to build 'libstdc++' against the
864- resulting EGLIBC installation.
865+To see the current full list of implemented option groups, refer to the
866+file 'option-groups.def' at the top of the source tree, or run
867+'make menuconfig' from the top-level build directory.
868
869 The POSIX.1-2001 specification includes a suggested partition of all
870 the functions in the POSIX C API into option groups: math functions
871@@ -110,6 +86,18 @@
872 OPTION_EGLIBC_LOCALES = n
873 OPTION_EGLIBC_LIBM = y
874
875+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
876+targets to make it easier to create 'option-groups.config', with all
877+dependencies between option groups automatically satisfied. Run
878+'make help' to see the list of supported make config targets. For
879+example, 'make menuconfig' will update the current config utilising a
880+menu based program.
881+
882+The option group names and their type (boolean, int, hex, string), help
883+description, and dependencies with other option groups, are described by
884+'option-groups.def' at the top of the source tree, analogous to the
885+'Kconfig' files in the Linux kernel.
886+
887 In general, each option group variable controls whether a given set of
888 object files in EGLIBC is compiled and included in the final
889 libraries, or omitted from the build.
890@@ -132,22 +120,3 @@
891
892 We have used the system to subset some portions of EGLIBC's
893 functionality. It needs to be extended to cover more of the library.
894-
895-At the moment, EGLIBC performs no sanity checks on the contents of
896-'option-groups.config'; if an option group's name is mistyped, the
897-option group is silently included in the build. EGLIBC should check
898-that all variables set in 'option-groups.config' are proper option
899-group names, and that their values are appropriate.
900-
901-Some portions of EGLIBC depend on others; for example, the Sun Remote
902-Procedure Call functions in 'sunrpc' depend on the networking
903-functions in 'inet'. The sanity checking described above should check
904-that the selection configuration satisfies dependencies within EGLIBC,
905-and produce a legible error message if it does not. At the moment,
906-inconsistent configurations produce link errors late in the build
907-process.
908-
909-The Linux kernel's configuration system provides interactive
910-interfaces for creating and modifying configuration files (which also
911-perform the sanity checking and dependency tracking described above).
912-EGLIBC should provide similar interfaces.
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
new file mode 100644
index 0000000000..a8463ea915
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -0,0 +1,36 @@
1From 713d822908d1b2ae8403af7f9375c7054ed3dd49 Mon Sep 17 00:00:00 2001
2From: Ting Liu <b28495@freescale.com>
3Date: Wed, 19 Dec 2012 04:39:57 -0600
4Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S}
5
6libm-err-tab.pl will parse all the files named "libm-test-ulps"
7in the given dir recursively. To avoid parsing the one in
8${S}/.pc/ (it does exist after eglibc adds aarch64 support,
9${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/
10aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
11in ${S}.
12
13Upstream-Status: inappropriate [OE specific]
14
15Signed-off-by: Ting Liu <b28495@freescale.com>
16---
17 manual/Makefile | 3 ++-
18 1 file changed, 2 insertions(+), 1 deletion(-)
19
20diff --git a/manual/Makefile b/manual/Makefile
21index 6fddff0..7af242e 100644
22--- a/manual/Makefile
23+++ b/manual/Makefile
24@@ -109,7 +109,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
25 $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
26 $(dir)/libm-test-ulps))
27 pwd=`pwd`; \
28- $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
29+ $(PERL) $< $$pwd/../ports > $(objpfx)libm-err-tmp
30+ $(PERL) $< $$pwd/../sysdeps >> $(objpfx)libm-err-tmp
31 $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
32 touch $@
33
34--
351.7.9.7
36
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch b/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch
new file mode 100644
index 0000000000..7caba48112
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0002-eglibc-menuconfig-hex-string-options.patch
@@ -0,0 +1,169 @@
1pulled from
2
3http://www.eglibc.org/archives/patches/msg01043.html
4
5
6Upstream-Status: Pending
7Signed-off-by: Khem
8
9
10This patch builds on the menuconfig patch for EGLIBC.
11
12
13There are a few options that have non-boolean types, that would benefit from the new 'make *config' support:
14
15EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE (int)
16EGLIBC_NSSWITCH_FIXED_CONFIG (string)
17EGLIBC_NSSWITCH_FIXED_FUNCTIONS (string)
18
19
20The patch converts these to real options in libc/option-groups.def. Also, libc/scripts/option-groups.awk is modified to output a '#define' line for int, hex, or string options encountered in the config file.
21
22In the post-processing script config-postproc.pl, a small change is needed: for any boolean option FOO that is implicitly disabled in the kconfig output, make sure that option is indeed a boolean before printing the explicit OPTION_FOO=n.
23
24Finally, libc/malloc/Makefile passes __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE as a CPPFLAGS, which is not necessary anymore because this macro will now be present in the generated header.
25
26attached is the updated patch to address above issues.
27
28Steve
29
30--
31Steve Longerbeam | Senior Embedded Engineer, ESD Services
32Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
33P 510.354.5838 | M 408.410.2735
34Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
35
36
37Index: libc/malloc/Makefile
38===================================================================
39--- libc.orig/malloc/Makefile 2012-01-04 22:06:18.000000000 -0800
40+++ libc/malloc/Makefile 2012-05-09 19:35:28.598682105 -0700
41@@ -48,10 +48,6 @@
42 ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
43 extra-libs = libmemusage
44 extra-libs-others = $(extra-libs)
45-
46-ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
47-CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
48-endif
49 endif
50
51 libmemusage-routines = memusage
52Index: libc/option-groups.def
53===================================================================
54--- libc.orig/option-groups.def 2012-05-09 19:33:48.398677256 -0700
55+++ libc/option-groups.def 2012-05-09 19:35:28.610682107 -0700
56@@ -513,8 +513,11 @@
57 the `memusage' and `memusagestat' utilities.
58 These components provide memory profiling functions.
59
60- EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
61-
62+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
63+ int "Memory profiling library buffer size"
64+ depends on EGLIBC_MEMUSAGE
65+ default "32768"
66+ help
67 Libmemusage library buffers the profiling data in memory
68 before writing it out to disk. By default, the library
69 allocates 1.5M buffer, which can be substantial for some
70@@ -553,8 +556,11 @@
71 'option-groups.config' file must set the following two
72 variables:
73
74- EGLIBC_NSSWITCH_FIXED_CONFIG
75-
76+config EGLIBC_NSSWITCH_FIXED_CONFIG
77+ string "Nsswitch fixed config filename"
78+ depends on !EGLIBC_NSSWITCH
79+ default ""
80+ help
81 Set this to the name of a file whose contents observe the
82 same syntax as an ordinary '/etc/nsswitch.conf' file. The
83 EGLIBC build process parses this file just as EGLIBC would
84@@ -576,8 +582,11 @@
85 you will probably want to delete references to databases not
86 needed on your system.
87
88- EGLIBC_NSSWITCH_FIXED_FUNCTIONS
89-
90+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
91+ string "Nsswitch fixed functions filename"
92+ depends on !EGLIBC_NSSWITCH
93+ default ""
94+ help
95 The EGLIBC build process uses this file to decide which
96 functions to make available from which service libraries.
97 The file 'nss/fixed-nsswitch.functions' serves as a sample
98Index: libc/options-config/config-postproc.pl
99===================================================================
100--- libc.orig/options-config/config-postproc.pl 2012-05-09 19:33:36.530676681 -0700
101+++ libc/options-config/config-postproc.pl 2012-05-09 19:35:28.610682107 -0700
102@@ -8,7 +8,7 @@
103 die "Could not open $ARGV[0]" unless -T $ARGV[0];
104
105 sub yank {
106- @option = grep($_ ne $_[0], @option);
107+ @option = grep(!($_ =~ /$_[0]\s*=/), @option);
108 }
109
110 open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
111@@ -16,7 +16,7 @@
112 # get the full list of available options using the default config file
113 $i = 0;
114 while (<DEFAULTS>) {
115- if (/^\s*OPTION_(\w+)\s*=/) {
116+ if (/^\s*OPTION_(\w+\s*=.*$)/) {
117 $option[$i++] = $1;
118 }
119 }
120@@ -35,8 +35,9 @@
121 s/CONFIG_/OPTION_/g;
122 print;
123 } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
124- # this is a comment line, change CONFIG_ to OPTION_, remove this
125- # option from option list, and convert to explicit OPTION_FOO=n
126+ # this is a comment line for an unset boolean option, change CONFIG_
127+ # to OPTION_, remove this option from option list, and convert to
128+ # explicit OPTION_FOO=n
129 $opt = $1;
130 yank($opt);
131 s/CONFIG_/OPTION_/g;
132@@ -46,9 +47,12 @@
133 }
134 }
135
136-# any options left in @options, are options that were not mentioned in
137+# any boolean options left in @options, are options that were not mentioned in
138 # the config file, and implicitly that means the option must be set =n,
139 # so do that here.
140 foreach $opt (@option) {
141- print "OPTION_$opt=n\n";
142+ if ($opt =~ /=\s*[yn]/) {
143+ $opt =~ s/=\s*[yn]/=n/;
144+ print "OPTION_$opt\n";
145+ }
146 }
147Index: libc/scripts/option-groups.awk
148===================================================================
149--- libc.orig/scripts/option-groups.awk 2012-01-04 22:06:00.000000000 -0800
150+++ libc/scripts/option-groups.awk 2012-05-09 19:35:28.610682107 -0700
151@@ -46,9 +46,15 @@
152 print "#define __" var " 1"
153 else if (vars[var] == "n")
154 print "/* #undef __" var " */"
155- # Ignore variables that don't have boolean values.
156- # Ideally, this would be driven by the types given in
157- # option-groups.def.
158+ else if (vars[var] ~ /^[0-9]+/ ||
159+ vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
160+ vars[var] ~ /^\"/)
161+ print "#define __" var " " vars[var]
162+ else
163+ print "/* #undef __" var " */"
164+ # Ignore variables that don't have boolean, int, hex, or
165+ # string values. Ideally, this would be driven by the types
166+ # given in option-groups.def.
167 }
168 }
169
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch b/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch
new file mode 100644
index 0000000000..d137f5b318
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/0003-eglibc-menuconfig-build-instructions.patch
@@ -0,0 +1,176 @@
1Pulled from
2
3http://www.eglibc.org/archives/patches/msg01035.html
4
5Upstream-Status: Pending
6Signed-off-by: Khem
7
8As part of the menuconfig development, I encountered some outdated information in the cross-build instructions, libc/EGLIBC.cross-building. This patch updates the file with new (and tested) instructions. It is unrelated to the menuconfig support, but applies after.
9
10My testing was done with an ARM target, and an x86_64 Linux host, so I converted the instructions to use those host/target types from the original i686/powerpc. Hope that's ok.
11
12
13Thanks,
14
15--
16Steve Longerbeam | Senior Embedded Engineer, ESD Services
17Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538
18P 510.354.5838 | M 408.410.2735
19Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS
20
21
22 EGLIBC.cross-building | 59 +++++++++++++++++++++++++++++---------------------
23 1 file changed, 35 insertions(+), 24 deletions(-)
24
25Index: libc/EGLIBC.cross-building
26===================================================================
27--- libc.orig/EGLIBC.cross-building 2012-05-09 19:33:36.522676681 -0700
28+++ libc/EGLIBC.cross-building 2012-05-09 19:36:13.918684298 -0700
29@@ -47,31 +47,34 @@
30 EGLIBC requires recent versions of the GNU binutils, GCC, and the
31 Linux kernel. The web page <http://www.eglibc.org/prerequisites>
32 documents the current requirements, and lists patches needed for
33-certain target architectures. As of this writing, EGLIBC required
34-binutils 2.17, GCC 4.1, and Linux 2.6.19.1.
35+certain target architectures. As of this writing, these build
36+instructions have been tested with binutils 2.22.51, GCC 4.6.2,
37+and Linux 3.1.
38
39 First, let's set some variables, to simplify later commands. We'll
40-build EGLIBC and GCC for a PowerPC target, known to the Linux kernel
41-as 'powerpc', and we'll do the build on an Intel Linux box:
42+build EGLIBC and GCC for an ARM target, known to the Linux kernel
43+as 'arm', and we'll do the build on an Intel x86_64 Linux box:
44
45- $ build=i686-pc-linux-gnu
46+ $ build=x86_64-pc-linux-gnu
47 $ host=$build
48- $ target=powerpc-none-linux-gnu
49- $ linux_arch=powerpc
50+ $ target=arm-none-linux-gnueabi
51+ $ linux_arch=arm
52
53 We're using the aforementioned versions of Binutils, GCC, and Linux:
54
55- $ binutilsv=binutils-2.17
56- $ gccv=gcc-4.1.1
57- $ linuxv=linux-2.6.20
58+ $ binutilsv=binutils-2.22.51
59+ $ gccv=gcc-4.6.2
60+ $ linuxv=linux-3.1
61
62 We're carrying out the entire process under '~/cross-build', which
63-contains unpacked source trees:
64+contains unpacked source trees for binutils, gcc, and linux kernel,
65+along with EGLIBC svn trunk (which can be checked-out with
66+'svn co http://www.eglibc.org/svn/trunk eglibc'):
67
68- $ top=$HOME/cross-build/ppc
69+ $ top=$HOME/cross-build/$target
70 $ src=$HOME/cross-build/src
71 $ ls $src
72- binutils-2.17 gcc-4.1.1 libc linux-2.6.20
73+ binutils-2.22.51 eglibc gcc-4.6.2 linux-3.1
74
75 We're going to place our build directories in a subdirectory 'obj',
76 we'll install the cross-development toolchain in 'tools', and we'll
77@@ -99,7 +102,7 @@
78
79 The First GCC
80
81-For our work, we need a cross-compiler targeting a PowerPC Linux
82+For our work, we need a cross-compiler targeting an ARM Linux
83 system. However, that configuration includes the shared library
84 'libgcc_s.so', which is compiled against the EGLIBC headers (which we
85 haven't installed yet) and linked against 'libc.so' (which we haven't
86@@ -125,7 +128,8 @@
87 > --prefix=$tools \
88 > --without-headers --with-newlib \
89 > --disable-shared --disable-threads --disable-libssp \
90- > --disable-libgomp --disable-libmudflap \
91+ > --disable-libgomp --disable-libmudflap --disable-libquadmath \
92+ > --disable-decimal-float --disable-libffi \
93 > --enable-languages=c
94 $ PATH=$tools/bin:$PATH make
95 $ PATH=$tools/bin:$PATH make install
96@@ -162,12 +166,13 @@
97 > CXX=$tools/bin/$target-g++ \
98 > AR=$tools/bin/$target-ar \
99 > RANLIB=$tools/bin/$target-ranlib \
100- > $src/libc/configure \
101+ > $src/eglibc/libc/configure \
102 > --prefix=/usr \
103 > --with-headers=$sysroot/usr/include \
104 > --build=$build \
105 > --host=$target \
106- > --disable-profile --without-gd --without-cvs --enable-add-ons
107+ > --disable-profile --without-gd --without-cvs \
108+ > --enable-add-ons=nptl,libidn,../ports
109
110 The option '--prefix=/usr' may look strange, but you should never
111 configure EGLIBC with a prefix other than '/usr': in various places,
112@@ -181,6 +186,11 @@
113 The '--with-headers' option tells EGLIBC where the Linux headers have
114 been installed.
115
116+The '--enable-add-ons=nptl,libidn,../ports' option tells EGLIBC to look
117+for the listed glibc add-ons. Most notably the ports add-on (located
118+just above the libc sources in the EGLIBC svn tree) is required to
119+support ARM targets.
120+
121 We can now use the 'install-headers' makefile target to install the
122 headers:
123
124@@ -223,6 +233,7 @@
125 > --prefix=$tools \
126 > --with-sysroot=$sysroot \
127 > --disable-libssp --disable-libgomp --disable-libmudflap \
128+ > --disable-libffi --disable-libquadmath \
129 > --enable-languages=c
130 $ PATH=$tools/bin:$PATH make
131 $ PATH=$tools/bin:$PATH make install
132@@ -240,13 +251,14 @@
133 > CXX=$tools/bin/$target-g++ \
134 > AR=$tools/bin/$target-ar \
135 > RANLIB=$tools/bin/$target-ranlib \
136- > $src/libc/configure \
137+ > $src/eglibc/libc/configure \
138 > --prefix=/usr \
139 > --with-headers=$sysroot/usr/include \
140 > --with-kconfig=$obj/linux/scripts/kconfig \
141 > --build=$build \
142 > --host=$target \
143- > --disable-profile --without-gd --without-cvs --enable-add-ons
144+ > --disable-profile --without-gd --without-cvs \
145+ > --enable-add-ons=nptl,libidn,../ports
146
147 Note the additional '--with-kconfig' option. This tells EGLIBC where to
148 find the host config tools used by the kernel 'make config' and 'make
149@@ -337,15 +349,15 @@
150 ELF Header:
151 ...
152 Type: EXEC (Executable file)
153- Machine: PowerPC
154+ Machine: ARM
155
156 ...
157 Program Headers:
158 Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
159 PHDR 0x000034 0x10000034 0x10000034 0x00100 0x00100 R E 0x4
160- INTERP 0x000134 0x10000134 0x10000134 0x0000d 0x0000d R 0x1
161- [Requesting program interpreter: /lib/ld.so.1]
162- LOAD 0x000000 0x10000000 0x10000000 0x008f0 0x008f0 R E 0x10000
163+ INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
164+ [Requesting program interpreter: /lib/ld-linux.so.3]
165+ LOAD 0x000000 0x00008000 0x00008000 0x0042c 0x0042c R E 0x8000
166 ...
167
168 Looking at the dynamic section of the installed 'libgcc_s.so', we see
169@@ -357,7 +369,6 @@
170 Dynamic section at offset 0x1083c contains 24 entries:
171 Tag Type Name/Value
172 0x00000001 (NEEDED) Shared library: [libc.so.6]
173- 0x00000001 (NEEDED) Shared library: [ld.so.1]
174 0x0000000e (SONAME) Library soname: [libgcc_s.so.1]
175 ...
176
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch b/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch
new file mode 100644
index 0000000000..7258c82418
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/GLRO_dl_debug_mask.patch
@@ -0,0 +1,143 @@
1Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
2so we should use GLRO_dl_debug_mask
3
4Singed-off-by: Khem Raj <raj.khem@gmail.com>
5
6Upstream-Status: Pending
7Index: libc/elf/dl-open.c
8===================================================================
9--- libc.orig/elf/dl-open.c 2012-10-25 10:18:12.000000000 -0700
10+++ libc/elf/dl-open.c 2013-01-09 11:49:02.635577870 -0800
11@@ -155,7 +155,7 @@
12 ns->_ns_main_searchlist->r_list[new_nlist++] = map;
13
14 /* We modify the global scope. Report this. */
15- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
16+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
17 _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
18 map->l_name, map->l_ns);
19 }
20@@ -298,7 +298,7 @@
21 LIBC_PROBE (map_complete, 3, args->nsid, r, new);
22
23 /* Print scope information. */
24- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
25+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
26 _dl_show_scope (new, 0);
27
28 /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
29@@ -515,7 +515,7 @@
30 }
31
32 /* Print scope information. */
33- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
34+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
35 _dl_show_scope (imap, from_scope);
36 }
37
38Index: libc/ports/sysdeps/mips/dl-lookup.c
39===================================================================
40--- libc.orig/ports/sysdeps/mips/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
41+++ libc/ports/sysdeps/mips/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
42@@ -111,7 +111,7 @@
43 continue;
44
45 /* Print some debugging info if wanted. */
46- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
47+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
48 _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
49 undef_name,
50 map->l_name[0] ? map->l_name : rtld_progname,
51@@ -432,7 +432,7 @@
52 hash table. */
53 if (__builtin_expect (tab->size, 0))
54 {
55- assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
56+ assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
57 __rtld_lock_unlock_recursive (tab->lock);
58 goto success;
59 }
60@@ -681,7 +681,7 @@
61 }
62
63 /* Display information if we are debugging. */
64- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
65+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
66 _dl_debug_printf ("\
67 \nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
68 map->l_name[0] ? map->l_name : rtld_progname,
69@@ -788,7 +788,7 @@
70 {
71 if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
72 && skip_map == NULL
73- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
74+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
75 {
76 /* We could find no value for a strong reference. */
77 const char *reference_name = undef_map ? undef_map->l_name : "";
78@@ -861,7 +861,7 @@
79 if (__builtin_expect (current_value.m->l_used == 0, 0))
80 current_value.m->l_used = 1;
81
82- if (__builtin_expect (GLRO(dl_debug_mask)
83+ if (__builtin_expect (GLRO_dl_debug_mask
84 & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
85 _dl_debug_bindings (undef_name, undef_map, ref,
86 &current_value, version, type_class, protected);
87@@ -926,7 +926,7 @@
88 {
89 const char *reference_name = undef_map->l_name;
90
91- if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
92+ if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
93 {
94 _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
95 (reference_name[0]
96@@ -942,7 +942,7 @@
97 _dl_debug_printf_c ("\n");
98 }
99 #ifdef SHARED
100- if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
101+ if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
102 {
103 int conflict = 0;
104 struct sym_val val = { NULL, NULL };
105Index: libc/elf/rtld.c
106===================================================================
107--- libc.orig/elf/rtld.c 2012-10-10 08:35:46.000000000 -0700
108+++ libc/elf/rtld.c 2013-01-09 11:49:02.635577870 -0800
109@@ -2118,7 +2118,7 @@
110 GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
111
112 /* Print scope information. */
113- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
114+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
115 {
116 _dl_debug_printf ("\nInitial object scopes\n");
117
118Index: libc/elf/dl-lookup.c
119===================================================================
120--- libc.orig/elf/dl-lookup.c 2012-08-17 12:39:53.000000000 -0700
121+++ libc/elf/dl-lookup.c 2013-01-09 11:49:02.635577870 -0800
122@@ -771,7 +771,7 @@
123 {
124 if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
125 && skip_map == NULL
126- && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
127+ && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
128 {
129 /* We could find no value for a strong reference. */
130 const char *reference_name = undef_map ? undef_map->l_name : "";
131Index: libc/elf/get-dynamic-info.h
132===================================================================
133--- libc.orig/elf/get-dynamic-info.h 2012-12-02 13:11:45.000000000 -0800
134+++ libc/elf/get-dynamic-info.h 2013-01-09 12:53:51.015657653 -0800
135@@ -157,7 +157,7 @@
136 them. Therefore to avoid breaking existing applications the
137 best we can do is add a warning during debugging with the
138 intent of notifying the user of the problem. */
139- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
140+ if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
141 && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
142 _dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
143 l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch b/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch
new file mode 100644
index 0000000000..cf5803585c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/IO-acquire-lock-fix.patch
@@ -0,0 +1,17 @@
1import http://sourceware.org/ml/libc-ports/2007-12/msg00000.html
2
3Upstream-Status: Pending
4
5Index: libc/bits/stdio-lock.h
6===================================================================
7--- libc.orig/bits/stdio-lock.h 2009-10-28 14:34:19.000000000 -0700
8+++ libc/bits/stdio-lock.h 2009-10-28 14:34:54.000000000 -0700
9@@ -50,6 +50,8 @@ __libc_lock_define_recursive (typedef, _
10 _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \
11 _IO_flockfile (_fp)
12
13+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
14+
15 # define _IO_release_lock(_fp) \
16 _IO_funlockfile (_fp); \
17 _IO_cleanup_region_end (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch b/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch
new file mode 100644
index 0000000000..f5023c08d4
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/add_resource_h_to_wait_h.patch
@@ -0,0 +1,20 @@
1The older versions of perf still require sys/resource.h to be
2present in this header, the newer version of perf in 3.2 and
3beyond directly include sys/resource.h
4
5Upstream-Status: Inapproriate [older kernel/perf specific]
6
7Signed-off-by: Saul Wold <sgw@linux.intel.com>
8
9Index: libc/posix/sys/wait.h
10===================================================================
11--- libc.orig/posix/sys/wait.h
12+++ libc/posix/sys/wait.h
13@@ -28,6 +28,7 @@
14 __BEGIN_DECLS
15
16 #include <signal.h>
17+#include <sys/resource.h>
18
19 /* These macros could also be defined in <stdlib.h>. */
20 #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch b/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch
new file mode 100644
index 0000000000..4313aa5197
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/eglibc-svn-arm-lowlevellock-include-tls.patch
@@ -0,0 +1,21 @@
1In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
2../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
3../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: warning: implicit declaration of function 'THREAD_GETMEM'
4../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'THREAD_SELF' undeclared (first use in this function)
5../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: (Each undeclared identifier is reported only once
6../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: for each function it appears in.)
7../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:34: error: 'header' undeclared (first use in this function)
8make[4]: *** [/var/tmp/portage/sys-libs/glibc-2.7-r1/work/build-default-armv4l-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os] Error 1
9
10Upstream-Status: Pending
11
12--- libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h.orig
13+++ libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
14@@ -25,6 +25,7 @@
15 #include <atomic.h>
16 #include <sysdep.h>
17 #include <kernel-features.h>
18+#include <tls.h>
19
20 #define FUTEX_WAIT 0
21 #define FUTEX_WAKE 1
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch b/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch
new file mode 100644
index 0000000000..bbf4605505
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/eglibc_fix_findidx_parameters.patch
@@ -0,0 +1,38 @@
1Upstream-Status: backport
2
3Imported patch from: http://www.eglibc.org/archives/patches/msg01124.html
4
5Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
62012/05/09
7
8Index: libc/posix/xregex.c
9===================================================================
10--- libc.orig/posix/xregex.c
11+++ libc/posix/xregex.c
12@@ -2943,7 +2943,7 @@ PREFIX(regex_compile) (const char *ARG_P
13 _NL_CURRENT (LC_COLLATE,
14 _NL_COLLATE_INDIRECTWC);
15
16- idx = findidx ((const wint_t**)&cp);
17+ idx = findidx ((const wint_t**)&cp, -1);
18 if (idx == 0 || cp < (wint_t*) str + c1)
19 /* This is no valid character. */
20 FREE_STACK_RETURN (REG_ECOLLATE);
21@@ -3392,7 +3392,7 @@ PREFIX(regex_compile) (const char *ARG_P
22 indirect = (const int32_t *)
23 _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
24
25- idx = findidx (&cp);
26+ idx = findidx (&cp, -1);
27 if (idx == 0 || cp < str + c1)
28 /* This is no valid character. */
29 FREE_STACK_RETURN (REG_ECOLLATE);
30@@ -6363,7 +6363,7 @@ byte_re_match_2_internal (struct re_patt
31 }
32 str_buf[i] = TRANSLATE(*(d+i));
33 str_buf[i+1] = '\0'; /* sentinel */
34- idx2 = findidx ((const wint_t**)&cp);
35+ idx2 = findidx ((const wint_t**)&cp, -1);
36 }
37
38 /* Update d, however d will be incremented at
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/etc/ld.so.conf
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch b/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch
new file mode 100644
index 0000000000..2ca0bca248
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/fileops-without-wchar-io.patch
@@ -0,0 +1,22 @@
1Fix error like
2
3/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/build-mips64-oe-linux/libc_pic.os: In function `_IO_new_file_fopen':
4/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/mips64-oe-linux/eglibc-2.16-r2+svnr19383/eglibc-2_16/libc/libio/fileops.c:431: undefined reference to `_IO_file_close_it_internal'
5collect2: error: ld returned 1 exit status
6
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Upstream-Status: Pending
10Index: libc/libio/fileops.c
11===================================================================
12--- libc.orig/libio/fileops.c 2012-07-04 18:25:47.000000000 -0700
13+++ libc/libio/fileops.c 2012-07-24 00:21:17.220322557 -0700
14@@ -428,7 +428,7 @@
15 result->_mode = 1;
16 #else
17 /* Treat this as if we couldn't find the given character set. */
18- (void) INTUSE(_IO_file_close_it) (fp);
19+ (void) _IO_file_close_it (fp);
20 __set_errno (EINVAL);
21 return NULL;
22 #endif
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch b/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch
new file mode 100644
index 0000000000..25c43a9fe6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/fix-tibetian-locales.patch
@@ -0,0 +1,38 @@
1cross localedef fails to compile these locales because name_fmt field is empty
2It is not acceptable for cross localedef and it errors out
3
4LC_NAME: field `name_fmt' not defined
5
6We therefore give a dummy string to the format, the real fix needs some native
7tibetian person to define proper name_fmt
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13Index: libc/localedata/locales/bo_CN
14===================================================================
15--- libc.orig/localedata/locales/bo_CN 2012-11-17 09:50:14.000000000 -0800
16+++ libc/localedata/locales/bo_CN 2013-01-04 08:55:15.593612288 -0800
17@@ -145,7 +145,7 @@
18 LC_NAME
19 % FIXME
20
21-name_fmt ""
22+name_fmt "FIXME"
23 % name_gen "FIXME"
24 % name_miss "FIXME"
25 % name_mr "FIXME"
26Index: libc/localedata/locales/bo_IN
27===================================================================
28--- libc.orig/localedata/locales/bo_IN 2012-11-17 09:50:14.000000000 -0800
29+++ libc/localedata/locales/bo_IN 2013-01-04 08:54:12.345609028 -0800
30@@ -70,7 +70,7 @@
31
32 LC_NAME
33 % FIXME
34-name_fmt ""
35+name_fmt "FIXME"
36 % name_gen "FIXME"
37 % name_miss "FIXME"
38 % name_mr "FIXME"
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch b/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch
new file mode 100644
index 0000000000..7618c99534
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/fix_for_centos_5.8.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Inappropriate [other]
2
3This is a hack to fix building the locale bits on an older
4CentOs 5.X machine
5
6Index: eglibc-2_16/libc/locale/programs/config.h
7===================================================================
8--- eglibc-2_16.orig/libc/locale/programs/config.h
9+++ eglibc-2_16/libc/locale/programs/config.h
10@@ -19,6 +19,8 @@
11 #ifndef _LD_CONFIG_H
12 #define _LD_CONFIG_H 1
13
14+#define DUMMY_LOCALE_T
15+
16 /* Use the internal textdomain used for libc messages. */
17 #define PACKAGE _libc_intl_domainname
18 #ifndef VERSION
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch
new file mode 100644
index 0000000000..511ee9d19e
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/fsl-ppc-no-fsqrt.patch
@@ -0,0 +1,100 @@
1Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core
2We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its
3already defined before redefining it. This way we can ensure that on e5500 builds it wont
4emit fsqrt intructions
5
6-Khem
7
8Upstream-Status: Pending
9
10Index: libc/sysdeps/powerpc/fpu/math_private.h
11===================================================================
12--- libc.orig/sysdeps/powerpc/fpu/math_private.h
13+++ libc/sysdeps/powerpc/fpu/math_private.h
14@@ -25,10 +25,12 @@
15 #include <dl-procinfo.h>
16 #include_next <math_private.h>
17
18-# if __WORDSIZE == 64 || defined _ARCH_PWR4
19-# define __CPU_HAS_FSQRT 1
20-# else
21-# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
22+# ifndef __CPU_HAS_FSQRT
23+# if __WORDSIZE == 64 || defined _ARCH_PWR4
24+# define __CPU_HAS_FSQRT 1
25+# else
26+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
27+# endif
28 # endif
29
30 extern double __slow_ieee754_sqrt (double);
31Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
32===================================================================
33--- /dev/null
34+++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
35@@ -0,0 +1,9 @@
36+#ifndef _E5500_MATH_PRIVATE_H_
37+#define _E5500_MATH_PRIVATE_H_ 1
38+/* E5500 core FPU does not implement
39+ fsqrt */
40+
41+#define __CPU_HAS_FSQRT 0
42+#include_next <math_private.h>
43+
44+#endif /* _E5500_MATH_PRIVATE_H_ */
45Index: libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
46===================================================================
47--- /dev/null
48+++ libc/ports/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h
49@@ -0,0 +1,9 @@
50+#ifndef _E6500_MATH_PRIVATE_H_
51+#define _E6500_MATH_PRIVATE_H_ 1
52+/* E6500 core FPU does not implement
53+ fsqrt */
54+
55+#define __CPU_HAS_FSQRT 0
56+#include_next <math_private.h>
57+
58+#endif /* _E6500_MATH_PRIVATE_H_ */
59Index: libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
60===================================================================
61--- /dev/null
62+++ libc/ports/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h
63@@ -0,0 +1,9 @@
64+#ifndef _E500MC_MATH_PRIVATE_H_
65+#define _E500MC_MATH_PRIVATE_H_ 1
66+/* E500MC core FPU does not implement
67+ fsqrt */
68+
69+#define __CPU_HAS_FSQRT 0
70+#include_next <math_private.h>
71+
72+#endif /* _E500MC_MATH_PRIVATE_H_ */
73Index: libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
74===================================================================
75--- /dev/null
76+++ libc/ports/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h
77@@ -0,0 +1,9 @@
78+#ifndef _E5500_MATH_PRIVATE_H_
79+#define _E5500_MATH_PRIVATE_H_ 1
80+/* E5500 core FPU does not implement
81+ fsqrt */
82+
83+#define __CPU_HAS_FSQRT 0
84+#include_next <math_private.h>
85+
86+#endif /* _E5500_MATH_PRIVATE_H_ */
87Index: libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
88===================================================================
89--- /dev/null
90+++ libc/ports/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h
91@@ -0,0 +1,9 @@
92+#ifndef _E6500_MATH_PRIVATE_H_
93+#define _E6500_MATH_PRIVATE_H_ 1
94+/* E6500 core FPU does not implement
95+ fsqrt */
96+
97+#define __CPU_HAS_FSQRT 0
98+#include_next <math_private.h>
99+
100+#endif /* _E6500_MATH_PRIVATE_H_ */
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk b/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk
new file mode 100644
index 0000000000..d2a28c2dc6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/generate-supported.mk
@@ -0,0 +1,11 @@
1#!/usr/bin/make
2
3include $(IN)
4
5all:
6 rm -f $(OUT)
7 touch $(OUT)
8 for locale in $(SUPPORTED-LOCALES); do \
9 [ $$locale = true ] && continue; \
10 echo $$locale | sed 's,/, ,' >> $(OUT); \
11 done
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch b/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch
new file mode 100644
index 0000000000..a66972998c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/glibc.fix_sqrt2.patch
@@ -0,0 +1,1491 @@
1Signed-of-by: Edmar Wienskoski <edmar@freescale.com>
2Upstream-Status: Pending
3
4diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
5--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
6+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500
7@@ -0,0 +1,134 @@
8+/* Double-precision floating point square root.
9+ Copyright (C) 2010 Free Software Foundation, Inc.
10+ This file is part of the GNU C Library.
11+
12+ The GNU C Library is free software; you can redistribute it and/or
13+ modify it under the terms of the GNU Lesser General Public
14+ License as published by the Free Software Foundation; either
15+ version 2.1 of the License, or (at your option) any later version.
16+
17+ The GNU C Library is distributed in the hope that it will be useful,
18+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20+ Lesser General Public License for more details.
21+
22+ You should have received a copy of the GNU Lesser General Public
23+ License along with the GNU C Library; if not, write to the Free
24+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25+ 02111-1307 USA. */
26+
27+#include <math.h>
28+#include <math_private.h>
29+#include <fenv_libc.h>
30+#include <inttypes.h>
31+
32+#include <sysdep.h>
33+#include <ldsodefs.h>
34+
35+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
36+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
37+static const float two108 = 3.245185536584267269e+32;
38+static const float twom54 = 5.551115123125782702e-17;
39+static const float half = 0.5;
40+
41+/* The method is based on the descriptions in:
42+
43+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
44+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
45+
46+ We find the actual square root and half of its reciprocal
47+ simultaneously. */
48+
49+#ifdef __STDC__
50+double
51+__ieee754_sqrt (double b)
52+#else
53+double
54+__ieee754_sqrt (b)
55+ double b;
56+#endif
57+{
58+ if (__builtin_expect (b > 0, 1))
59+ {
60+ double y, g, h, d, r;
61+ ieee_double_shape_type u;
62+
63+ if (__builtin_expect (b != a_inf.value, 1))
64+ {
65+ fenv_t fe;
66+
67+ fe = fegetenv_register ();
68+
69+ u.value = b;
70+
71+ relax_fenv_state ();
72+
73+ __asm__ ("frsqrte %[estimate], %[x]\n"
74+ : [estimate] "=f" (y) : [x] "f" (b));
75+
76+ /* Following Muller et al, page 168, equation 5.20.
77+
78+ h goes to 1/(2*sqrt(b))
79+ g goes to sqrt(b).
80+
81+ We need three iterations to get within 1ulp. */
82+
83+ /* Indicate that these can be performed prior to the branch. GCC
84+ insists on sinking them below the branch, however; it seems like
85+ they'd be better before the branch so that we can cover any latency
86+ from storing the argument and loading its high word. Oh well. */
87+
88+ g = b * y;
89+ h = 0.5 * y;
90+
91+ /* Handle small numbers by scaling. */
92+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
93+ return __ieee754_sqrt (b * two108) * twom54;
94+
95+#define FMADD(a_, c_, b_) \
96+ ({ double __r; \
97+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
98+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
99+ __r;})
100+#define FNMSUB(a_, c_, b_) \
101+ ({ double __r; \
102+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
103+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
104+ __r;})
105+
106+ r = FNMSUB (g, h, half);
107+ g = FMADD (g, r, g);
108+ h = FMADD (h, r, h);
109+
110+ r = FNMSUB (g, h, half);
111+ g = FMADD (g, r, g);
112+ h = FMADD (h, r, h);
113+
114+ r = FNMSUB (g, h, half);
115+ g = FMADD (g, r, g);
116+ h = FMADD (h, r, h);
117+
118+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
119+
120+ /* Final refinement. */
121+ d = FNMSUB (g, g, b);
122+
123+ fesetenv_register (fe);
124+ return FMADD (d, h, g);
125+ }
126+ }
127+ else if (b < 0)
128+ {
129+ /* For some reason, some PowerPC32 processors don't implement
130+ FE_INVALID_SQRT. */
131+#ifdef FE_INVALID_SQRT
132+ feraiseexcept (FE_INVALID_SQRT);
133+
134+ fenv_union_t u = { .fenv = fegetenv_register () };
135+ if ((u.l[1] & FE_INVALID) == 0)
136+#endif
137+ feraiseexcept (FE_INVALID);
138+ b = a_nan.value;
139+ }
140+ return f_wash (b);
141+}
142diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
143--- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
144+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500
145@@ -0,0 +1,101 @@
146+/* Single-precision floating point square root.
147+ Copyright (C) 2010 Free Software Foundation, Inc.
148+ This file is part of the GNU C Library.
149+
150+ The GNU C Library is free software; you can redistribute it and/or
151+ modify it under the terms of the GNU Lesser General Public
152+ License as published by the Free Software Foundation; either
153+ version 2.1 of the License, or (at your option) any later version.
154+
155+ The GNU C Library is distributed in the hope that it will be useful,
156+ but WITHOUT ANY WARRANTY; without even the implied warranty of
157+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
158+ Lesser General Public License for more details.
159+
160+ You should have received a copy of the GNU Lesser General Public
161+ License along with the GNU C Library; if not, write to the Free
162+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
163+ 02111-1307 USA. */
164+
165+#include <math.h>
166+#include <math_private.h>
167+#include <fenv_libc.h>
168+#include <inttypes.h>
169+
170+#include <sysdep.h>
171+#include <ldsodefs.h>
172+
173+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
174+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
175+static const float threehalf = 1.5;
176+
177+/* The method is based on the descriptions in:
178+
179+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
180+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
181+
182+ We find the reciprocal square root and use that to compute the actual
183+ square root. */
184+
185+#ifdef __STDC__
186+float
187+__ieee754_sqrtf (float b)
188+#else
189+float
190+__ieee754_sqrtf (b)
191+ float b;
192+#endif
193+{
194+ if (__builtin_expect (b > 0, 1))
195+ {
196+#define FMSUB(a_, c_, b_) \
197+ ({ double __r; \
198+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
199+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
200+ __r;})
201+#define FNMSUB(a_, c_, b_) \
202+ ({ double __r; \
203+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
204+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
205+ __r;})
206+
207+ if (__builtin_expect (b != a_inf.value, 1))
208+ {
209+ double y, x;
210+ fenv_t fe;
211+
212+ fe = fegetenv_register ();
213+
214+ relax_fenv_state ();
215+
216+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
217+ y = FMSUB (threehalf, b, b);
218+
219+ /* Initial estimate. */
220+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
221+
222+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
223+ x = x * FNMSUB (y, x * x, threehalf);
224+ x = x * FNMSUB (y, x * x, threehalf);
225+ x = x * FNMSUB (y, x * x, threehalf);
226+
227+ /* All done. */
228+ fesetenv_register (fe);
229+ return x * b;
230+ }
231+ }
232+ else if (b < 0)
233+ {
234+ /* For some reason, some PowerPC32 processors don't implement
235+ FE_INVALID_SQRT. */
236+#ifdef FE_INVALID_SQRT
237+ feraiseexcept (FE_INVALID_SQRT);
238+
239+ fenv_union_t u = { .fenv = fegetenv_register () };
240+ if ((u.l[1] & FE_INVALID) == 0)
241+#endif
242+ feraiseexcept (FE_INVALID);
243+ b = a_nan.value;
244+ }
245+ return f_washf (b);
246+}
247diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
248--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
249+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2012-06-14 14:55:14.749001061 -0500
250@@ -0,0 +1,134 @@
251+/* Double-precision floating point square root.
252+ Copyright (C) 2010 Free Software Foundation, Inc.
253+ This file is part of the GNU C Library.
254+
255+ The GNU C Library is free software; you can redistribute it and/or
256+ modify it under the terms of the GNU Lesser General Public
257+ License as published by the Free Software Foundation; either
258+ version 2.1 of the License, or (at your option) any later version.
259+
260+ The GNU C Library is distributed in the hope that it will be useful,
261+ but WITHOUT ANY WARRANTY; without even the implied warranty of
262+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
263+ Lesser General Public License for more details.
264+
265+ You should have received a copy of the GNU Lesser General Public
266+ License along with the GNU C Library; if not, write to the Free
267+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
268+ 02111-1307 USA. */
269+
270+#include <math.h>
271+#include <math_private.h>
272+#include <fenv_libc.h>
273+#include <inttypes.h>
274+
275+#include <sysdep.h>
276+#include <ldsodefs.h>
277+
278+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
279+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
280+static const float two108 = 3.245185536584267269e+32;
281+static const float twom54 = 5.551115123125782702e-17;
282+static const float half = 0.5;
283+
284+/* The method is based on the descriptions in:
285+
286+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
287+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
288+
289+ We find the actual square root and half of its reciprocal
290+ simultaneously. */
291+
292+#ifdef __STDC__
293+double
294+__ieee754_sqrt (double b)
295+#else
296+double
297+__ieee754_sqrt (b)
298+ double b;
299+#endif
300+{
301+ if (__builtin_expect (b > 0, 1))
302+ {
303+ double y, g, h, d, r;
304+ ieee_double_shape_type u;
305+
306+ if (__builtin_expect (b != a_inf.value, 1))
307+ {
308+ fenv_t fe;
309+
310+ fe = fegetenv_register ();
311+
312+ u.value = b;
313+
314+ relax_fenv_state ();
315+
316+ __asm__ ("frsqrte %[estimate], %[x]\n"
317+ : [estimate] "=f" (y) : [x] "f" (b));
318+
319+ /* Following Muller et al, page 168, equation 5.20.
320+
321+ h goes to 1/(2*sqrt(b))
322+ g goes to sqrt(b).
323+
324+ We need three iterations to get within 1ulp. */
325+
326+ /* Indicate that these can be performed prior to the branch. GCC
327+ insists on sinking them below the branch, however; it seems like
328+ they'd be better before the branch so that we can cover any latency
329+ from storing the argument and loading its high word. Oh well. */
330+
331+ g = b * y;
332+ h = 0.5 * y;
333+
334+ /* Handle small numbers by scaling. */
335+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
336+ return __ieee754_sqrt (b * two108) * twom54;
337+
338+#define FMADD(a_, c_, b_) \
339+ ({ double __r; \
340+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
341+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
342+ __r;})
343+#define FNMSUB(a_, c_, b_) \
344+ ({ double __r; \
345+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
346+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
347+ __r;})
348+
349+ r = FNMSUB (g, h, half);
350+ g = FMADD (g, r, g);
351+ h = FMADD (h, r, h);
352+
353+ r = FNMSUB (g, h, half);
354+ g = FMADD (g, r, g);
355+ h = FMADD (h, r, h);
356+
357+ r = FNMSUB (g, h, half);
358+ g = FMADD (g, r, g);
359+ h = FMADD (h, r, h);
360+
361+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
362+
363+ /* Final refinement. */
364+ d = FNMSUB (g, g, b);
365+
366+ fesetenv_register (fe);
367+ return FMADD (d, h, g);
368+ }
369+ }
370+ else if (b < 0)
371+ {
372+ /* For some reason, some PowerPC32 processors don't implement
373+ FE_INVALID_SQRT. */
374+#ifdef FE_INVALID_SQRT
375+ feraiseexcept (FE_INVALID_SQRT);
376+
377+ fenv_union_t u = { .fenv = fegetenv_register () };
378+ if ((u.l[1] & FE_INVALID) == 0)
379+#endif
380+ feraiseexcept (FE_INVALID);
381+ b = a_nan.value;
382+ }
383+ return f_wash (b);
384+}
385diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
386--- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
387+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2012-06-14 14:55:14.749001061 -0500
388@@ -0,0 +1,101 @@
389+/* Single-precision floating point square root.
390+ Copyright (C) 2010 Free Software Foundation, Inc.
391+ This file is part of the GNU C Library.
392+
393+ The GNU C Library is free software; you can redistribute it and/or
394+ modify it under the terms of the GNU Lesser General Public
395+ License as published by the Free Software Foundation; either
396+ version 2.1 of the License, or (at your option) any later version.
397+
398+ The GNU C Library is distributed in the hope that it will be useful,
399+ but WITHOUT ANY WARRANTY; without even the implied warranty of
400+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
401+ Lesser General Public License for more details.
402+
403+ You should have received a copy of the GNU Lesser General Public
404+ License along with the GNU C Library; if not, write to the Free
405+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
406+ 02111-1307 USA. */
407+
408+#include <math.h>
409+#include <math_private.h>
410+#include <fenv_libc.h>
411+#include <inttypes.h>
412+
413+#include <sysdep.h>
414+#include <ldsodefs.h>
415+
416+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
417+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
418+static const float threehalf = 1.5;
419+
420+/* The method is based on the descriptions in:
421+
422+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
423+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
424+
425+ We find the reciprocal square root and use that to compute the actual
426+ square root. */
427+
428+#ifdef __STDC__
429+float
430+__ieee754_sqrtf (float b)
431+#else
432+float
433+__ieee754_sqrtf (b)
434+ float b;
435+#endif
436+{
437+ if (__builtin_expect (b > 0, 1))
438+ {
439+#define FMSUB(a_, c_, b_) \
440+ ({ double __r; \
441+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
442+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
443+ __r;})
444+#define FNMSUB(a_, c_, b_) \
445+ ({ double __r; \
446+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
447+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
448+ __r;})
449+
450+ if (__builtin_expect (b != a_inf.value, 1))
451+ {
452+ double y, x;
453+ fenv_t fe;
454+
455+ fe = fegetenv_register ();
456+
457+ relax_fenv_state ();
458+
459+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
460+ y = FMSUB (threehalf, b, b);
461+
462+ /* Initial estimate. */
463+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
464+
465+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
466+ x = x * FNMSUB (y, x * x, threehalf);
467+ x = x * FNMSUB (y, x * x, threehalf);
468+ x = x * FNMSUB (y, x * x, threehalf);
469+
470+ /* All done. */
471+ fesetenv_register (fe);
472+ return x * b;
473+ }
474+ }
475+ else if (b < 0)
476+ {
477+ /* For some reason, some PowerPC32 processors don't implement
478+ FE_INVALID_SQRT. */
479+#ifdef FE_INVALID_SQRT
480+ feraiseexcept (FE_INVALID_SQRT);
481+
482+ fenv_union_t u = { .fenv = fegetenv_register () };
483+ if ((u.l[1] & FE_INVALID) == 0)
484+#endif
485+ feraiseexcept (FE_INVALID);
486+ b = a_nan.value;
487+ }
488+ return f_washf (b);
489+}
490diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
491--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
492+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2012-06-14 14:55:21.812002270 -0500
493@@ -0,0 +1,134 @@
494+/* Double-precision floating point square root.
495+ Copyright (C) 2010 Free Software Foundation, Inc.
496+ This file is part of the GNU C Library.
497+
498+ The GNU C Library is free software; you can redistribute it and/or
499+ modify it under the terms of the GNU Lesser General Public
500+ License as published by the Free Software Foundation; either
501+ version 2.1 of the License, or (at your option) any later version.
502+
503+ The GNU C Library is distributed in the hope that it will be useful,
504+ but WITHOUT ANY WARRANTY; without even the implied warranty of
505+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
506+ Lesser General Public License for more details.
507+
508+ You should have received a copy of the GNU Lesser General Public
509+ License along with the GNU C Library; if not, write to the Free
510+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
511+ 02111-1307 USA. */
512+
513+#include <math.h>
514+#include <math_private.h>
515+#include <fenv_libc.h>
516+#include <inttypes.h>
517+
518+#include <sysdep.h>
519+#include <ldsodefs.h>
520+
521+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
522+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
523+static const float two108 = 3.245185536584267269e+32;
524+static const float twom54 = 5.551115123125782702e-17;
525+static const float half = 0.5;
526+
527+/* The method is based on the descriptions in:
528+
529+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
530+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
531+
532+ We find the actual square root and half of its reciprocal
533+ simultaneously. */
534+
535+#ifdef __STDC__
536+double
537+__ieee754_sqrt (double b)
538+#else
539+double
540+__ieee754_sqrt (b)
541+ double b;
542+#endif
543+{
544+ if (__builtin_expect (b > 0, 1))
545+ {
546+ double y, g, h, d, r;
547+ ieee_double_shape_type u;
548+
549+ if (__builtin_expect (b != a_inf.value, 1))
550+ {
551+ fenv_t fe;
552+
553+ fe = fegetenv_register ();
554+
555+ u.value = b;
556+
557+ relax_fenv_state ();
558+
559+ __asm__ ("frsqrte %[estimate], %[x]\n"
560+ : [estimate] "=f" (y) : [x] "f" (b));
561+
562+ /* Following Muller et al, page 168, equation 5.20.
563+
564+ h goes to 1/(2*sqrt(b))
565+ g goes to sqrt(b).
566+
567+ We need three iterations to get within 1ulp. */
568+
569+ /* Indicate that these can be performed prior to the branch. GCC
570+ insists on sinking them below the branch, however; it seems like
571+ they'd be better before the branch so that we can cover any latency
572+ from storing the argument and loading its high word. Oh well. */
573+
574+ g = b * y;
575+ h = 0.5 * y;
576+
577+ /* Handle small numbers by scaling. */
578+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
579+ return __ieee754_sqrt (b * two108) * twom54;
580+
581+#define FMADD(a_, c_, b_) \
582+ ({ double __r; \
583+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
584+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
585+ __r;})
586+#define FNMSUB(a_, c_, b_) \
587+ ({ double __r; \
588+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
589+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
590+ __r;})
591+
592+ r = FNMSUB (g, h, half);
593+ g = FMADD (g, r, g);
594+ h = FMADD (h, r, h);
595+
596+ r = FNMSUB (g, h, half);
597+ g = FMADD (g, r, g);
598+ h = FMADD (h, r, h);
599+
600+ r = FNMSUB (g, h, half);
601+ g = FMADD (g, r, g);
602+ h = FMADD (h, r, h);
603+
604+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
605+
606+ /* Final refinement. */
607+ d = FNMSUB (g, g, b);
608+
609+ fesetenv_register (fe);
610+ return FMADD (d, h, g);
611+ }
612+ }
613+ else if (b < 0)
614+ {
615+ /* For some reason, some PowerPC32 processors don't implement
616+ FE_INVALID_SQRT. */
617+#ifdef FE_INVALID_SQRT
618+ feraiseexcept (FE_INVALID_SQRT);
619+
620+ fenv_union_t u = { .fenv = fegetenv_register () };
621+ if ((u.l[1] & FE_INVALID) == 0)
622+#endif
623+ feraiseexcept (FE_INVALID);
624+ b = a_nan.value;
625+ }
626+ return f_wash (b);
627+}
628diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
629--- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
630+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2012-06-14 14:55:21.812002270 -0500
631@@ -0,0 +1,101 @@
632+/* Single-precision floating point square root.
633+ Copyright (C) 2010 Free Software Foundation, Inc.
634+ This file is part of the GNU C Library.
635+
636+ The GNU C Library is free software; you can redistribute it and/or
637+ modify it under the terms of the GNU Lesser General Public
638+ License as published by the Free Software Foundation; either
639+ version 2.1 of the License, or (at your option) any later version.
640+
641+ The GNU C Library is distributed in the hope that it will be useful,
642+ but WITHOUT ANY WARRANTY; without even the implied warranty of
643+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
644+ Lesser General Public License for more details.
645+
646+ You should have received a copy of the GNU Lesser General Public
647+ License along with the GNU C Library; if not, write to the Free
648+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
649+ 02111-1307 USA. */
650+
651+#include <math.h>
652+#include <math_private.h>
653+#include <fenv_libc.h>
654+#include <inttypes.h>
655+
656+#include <sysdep.h>
657+#include <ldsodefs.h>
658+
659+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
660+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
661+static const float threehalf = 1.5;
662+
663+/* The method is based on the descriptions in:
664+
665+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
666+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
667+
668+ We find the reciprocal square root and use that to compute the actual
669+ square root. */
670+
671+#ifdef __STDC__
672+float
673+__ieee754_sqrtf (float b)
674+#else
675+float
676+__ieee754_sqrtf (b)
677+ float b;
678+#endif
679+{
680+ if (__builtin_expect (b > 0, 1))
681+ {
682+#define FMSUB(a_, c_, b_) \
683+ ({ double __r; \
684+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
685+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
686+ __r;})
687+#define FNMSUB(a_, c_, b_) \
688+ ({ double __r; \
689+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
690+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
691+ __r;})
692+
693+ if (__builtin_expect (b != a_inf.value, 1))
694+ {
695+ double y, x;
696+ fenv_t fe;
697+
698+ fe = fegetenv_register ();
699+
700+ relax_fenv_state ();
701+
702+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
703+ y = FMSUB (threehalf, b, b);
704+
705+ /* Initial estimate. */
706+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
707+
708+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
709+ x = x * FNMSUB (y, x * x, threehalf);
710+ x = x * FNMSUB (y, x * x, threehalf);
711+ x = x * FNMSUB (y, x * x, threehalf);
712+
713+ /* All done. */
714+ fesetenv_register (fe);
715+ return x * b;
716+ }
717+ }
718+ else if (b < 0)
719+ {
720+ /* For some reason, some PowerPC32 processors don't implement
721+ FE_INVALID_SQRT. */
722+#ifdef FE_INVALID_SQRT
723+ feraiseexcept (FE_INVALID_SQRT);
724+
725+ fenv_union_t u = { .fenv = fegetenv_register () };
726+ if ((u.l[1] & FE_INVALID) == 0)
727+#endif
728+ feraiseexcept (FE_INVALID);
729+ b = a_nan.value;
730+ }
731+ return f_washf (b);
732+}
733diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
734--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
735+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2012-06-14 14:55:24.620001266 -0500
736@@ -0,0 +1,134 @@
737+/* Double-precision floating point square root.
738+ Copyright (C) 2010 Free Software Foundation, Inc.
739+ This file is part of the GNU C Library.
740+
741+ The GNU C Library is free software; you can redistribute it and/or
742+ modify it under the terms of the GNU Lesser General Public
743+ License as published by the Free Software Foundation; either
744+ version 2.1 of the License, or (at your option) any later version.
745+
746+ The GNU C Library is distributed in the hope that it will be useful,
747+ but WITHOUT ANY WARRANTY; without even the implied warranty of
748+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
749+ Lesser General Public License for more details.
750+
751+ You should have received a copy of the GNU Lesser General Public
752+ License along with the GNU C Library; if not, write to the Free
753+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
754+ 02111-1307 USA. */
755+
756+#include <math.h>
757+#include <math_private.h>
758+#include <fenv_libc.h>
759+#include <inttypes.h>
760+
761+#include <sysdep.h>
762+#include <ldsodefs.h>
763+
764+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
765+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
766+static const float two108 = 3.245185536584267269e+32;
767+static const float twom54 = 5.551115123125782702e-17;
768+static const float half = 0.5;
769+
770+/* The method is based on the descriptions in:
771+
772+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
773+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
774+
775+ We find the actual square root and half of its reciprocal
776+ simultaneously. */
777+
778+#ifdef __STDC__
779+double
780+__ieee754_sqrt (double b)
781+#else
782+double
783+__ieee754_sqrt (b)
784+ double b;
785+#endif
786+{
787+ if (__builtin_expect (b > 0, 1))
788+ {
789+ double y, g, h, d, r;
790+ ieee_double_shape_type u;
791+
792+ if (__builtin_expect (b != a_inf.value, 1))
793+ {
794+ fenv_t fe;
795+
796+ fe = fegetenv_register ();
797+
798+ u.value = b;
799+
800+ relax_fenv_state ();
801+
802+ __asm__ ("frsqrte %[estimate], %[x]\n"
803+ : [estimate] "=f" (y) : [x] "f" (b));
804+
805+ /* Following Muller et al, page 168, equation 5.20.
806+
807+ h goes to 1/(2*sqrt(b))
808+ g goes to sqrt(b).
809+
810+ We need three iterations to get within 1ulp. */
811+
812+ /* Indicate that these can be performed prior to the branch. GCC
813+ insists on sinking them below the branch, however; it seems like
814+ they'd be better before the branch so that we can cover any latency
815+ from storing the argument and loading its high word. Oh well. */
816+
817+ g = b * y;
818+ h = 0.5 * y;
819+
820+ /* Handle small numbers by scaling. */
821+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
822+ return __ieee754_sqrt (b * two108) * twom54;
823+
824+#define FMADD(a_, c_, b_) \
825+ ({ double __r; \
826+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
827+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
828+ __r;})
829+#define FNMSUB(a_, c_, b_) \
830+ ({ double __r; \
831+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
832+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
833+ __r;})
834+
835+ r = FNMSUB (g, h, half);
836+ g = FMADD (g, r, g);
837+ h = FMADD (h, r, h);
838+
839+ r = FNMSUB (g, h, half);
840+ g = FMADD (g, r, g);
841+ h = FMADD (h, r, h);
842+
843+ r = FNMSUB (g, h, half);
844+ g = FMADD (g, r, g);
845+ h = FMADD (h, r, h);
846+
847+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
848+
849+ /* Final refinement. */
850+ d = FNMSUB (g, g, b);
851+
852+ fesetenv_register (fe);
853+ return FMADD (d, h, g);
854+ }
855+ }
856+ else if (b < 0)
857+ {
858+ /* For some reason, some PowerPC32 processors don't implement
859+ FE_INVALID_SQRT. */
860+#ifdef FE_INVALID_SQRT
861+ feraiseexcept (FE_INVALID_SQRT);
862+
863+ fenv_union_t u = { .fenv = fegetenv_register () };
864+ if ((u.l[1] & FE_INVALID) == 0)
865+#endif
866+ feraiseexcept (FE_INVALID);
867+ b = a_nan.value;
868+ }
869+ return f_wash (b);
870+}
871diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
872--- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
873+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2012-06-14 14:55:24.620001266 -0500
874@@ -0,0 +1,101 @@
875+/* Single-precision floating point square root.
876+ Copyright (C) 2010 Free Software Foundation, Inc.
877+ This file is part of the GNU C Library.
878+
879+ The GNU C Library is free software; you can redistribute it and/or
880+ modify it under the terms of the GNU Lesser General Public
881+ License as published by the Free Software Foundation; either
882+ version 2.1 of the License, or (at your option) any later version.
883+
884+ The GNU C Library is distributed in the hope that it will be useful,
885+ but WITHOUT ANY WARRANTY; without even the implied warranty of
886+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
887+ Lesser General Public License for more details.
888+
889+ You should have received a copy of the GNU Lesser General Public
890+ License along with the GNU C Library; if not, write to the Free
891+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
892+ 02111-1307 USA. */
893+
894+#include <math.h>
895+#include <math_private.h>
896+#include <fenv_libc.h>
897+#include <inttypes.h>
898+
899+#include <sysdep.h>
900+#include <ldsodefs.h>
901+
902+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
903+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
904+static const float threehalf = 1.5;
905+
906+/* The method is based on the descriptions in:
907+
908+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
909+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
910+
911+ We find the reciprocal square root and use that to compute the actual
912+ square root. */
913+
914+#ifdef __STDC__
915+float
916+__ieee754_sqrtf (float b)
917+#else
918+float
919+__ieee754_sqrtf (b)
920+ float b;
921+#endif
922+{
923+ if (__builtin_expect (b > 0, 1))
924+ {
925+#define FMSUB(a_, c_, b_) \
926+ ({ double __r; \
927+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
928+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
929+ __r;})
930+#define FNMSUB(a_, c_, b_) \
931+ ({ double __r; \
932+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
933+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
934+ __r;})
935+
936+ if (__builtin_expect (b != a_inf.value, 1))
937+ {
938+ double y, x;
939+ fenv_t fe;
940+
941+ fe = fegetenv_register ();
942+
943+ relax_fenv_state ();
944+
945+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
946+ y = FMSUB (threehalf, b, b);
947+
948+ /* Initial estimate. */
949+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
950+
951+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
952+ x = x * FNMSUB (y, x * x, threehalf);
953+ x = x * FNMSUB (y, x * x, threehalf);
954+ x = x * FNMSUB (y, x * x, threehalf);
955+
956+ /* All done. */
957+ fesetenv_register (fe);
958+ return x * b;
959+ }
960+ }
961+ else if (b < 0)
962+ {
963+ /* For some reason, some PowerPC32 processors don't implement
964+ FE_INVALID_SQRT. */
965+#ifdef FE_INVALID_SQRT
966+ feraiseexcept (FE_INVALID_SQRT);
967+
968+ fenv_union_t u = { .fenv = fegetenv_register () };
969+ if ((u.l[1] & FE_INVALID) == 0)
970+#endif
971+ feraiseexcept (FE_INVALID);
972+ b = a_nan.value;
973+ }
974+ return f_washf (b);
975+}
976diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
977--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
978+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500
979@@ -0,0 +1,134 @@
980+/* Double-precision floating point square root.
981+ Copyright (C) 2010 Free Software Foundation, Inc.
982+ This file is part of the GNU C Library.
983+
984+ The GNU C Library is free software; you can redistribute it and/or
985+ modify it under the terms of the GNU Lesser General Public
986+ License as published by the Free Software Foundation; either
987+ version 2.1 of the License, or (at your option) any later version.
988+
989+ The GNU C Library is distributed in the hope that it will be useful,
990+ but WITHOUT ANY WARRANTY; without even the implied warranty of
991+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
992+ Lesser General Public License for more details.
993+
994+ You should have received a copy of the GNU Lesser General Public
995+ License along with the GNU C Library; if not, write to the Free
996+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
997+ 02111-1307 USA. */
998+
999+#include <math.h>
1000+#include <math_private.h>
1001+#include <fenv_libc.h>
1002+#include <inttypes.h>
1003+
1004+#include <sysdep.h>
1005+#include <ldsodefs.h>
1006+
1007+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1008+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1009+static const float two108 = 3.245185536584267269e+32;
1010+static const float twom54 = 5.551115123125782702e-17;
1011+static const float half = 0.5;
1012+
1013+/* The method is based on the descriptions in:
1014+
1015+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1016+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1017+
1018+ We find the actual square root and half of its reciprocal
1019+ simultaneously. */
1020+
1021+#ifdef __STDC__
1022+double
1023+__ieee754_sqrt (double b)
1024+#else
1025+double
1026+__ieee754_sqrt (b)
1027+ double b;
1028+#endif
1029+{
1030+ if (__builtin_expect (b > 0, 1))
1031+ {
1032+ double y, g, h, d, r;
1033+ ieee_double_shape_type u;
1034+
1035+ if (__builtin_expect (b != a_inf.value, 1))
1036+ {
1037+ fenv_t fe;
1038+
1039+ fe = fegetenv_register ();
1040+
1041+ u.value = b;
1042+
1043+ relax_fenv_state ();
1044+
1045+ __asm__ ("frsqrte %[estimate], %[x]\n"
1046+ : [estimate] "=f" (y) : [x] "f" (b));
1047+
1048+ /* Following Muller et al, page 168, equation 5.20.
1049+
1050+ h goes to 1/(2*sqrt(b))
1051+ g goes to sqrt(b).
1052+
1053+ We need three iterations to get within 1ulp. */
1054+
1055+ /* Indicate that these can be performed prior to the branch. GCC
1056+ insists on sinking them below the branch, however; it seems like
1057+ they'd be better before the branch so that we can cover any latency
1058+ from storing the argument and loading its high word. Oh well. */
1059+
1060+ g = b * y;
1061+ h = 0.5 * y;
1062+
1063+ /* Handle small numbers by scaling. */
1064+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
1065+ return __ieee754_sqrt (b * two108) * twom54;
1066+
1067+#define FMADD(a_, c_, b_) \
1068+ ({ double __r; \
1069+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
1070+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1071+ __r;})
1072+#define FNMSUB(a_, c_, b_) \
1073+ ({ double __r; \
1074+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1075+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1076+ __r;})
1077+
1078+ r = FNMSUB (g, h, half);
1079+ g = FMADD (g, r, g);
1080+ h = FMADD (h, r, h);
1081+
1082+ r = FNMSUB (g, h, half);
1083+ g = FMADD (g, r, g);
1084+ h = FMADD (h, r, h);
1085+
1086+ r = FNMSUB (g, h, half);
1087+ g = FMADD (g, r, g);
1088+ h = FMADD (h, r, h);
1089+
1090+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
1091+
1092+ /* Final refinement. */
1093+ d = FNMSUB (g, g, b);
1094+
1095+ fesetenv_register (fe);
1096+ return FMADD (d, h, g);
1097+ }
1098+ }
1099+ else if (b < 0)
1100+ {
1101+ /* For some reason, some PowerPC32 processors don't implement
1102+ FE_INVALID_SQRT. */
1103+#ifdef FE_INVALID_SQRT
1104+ feraiseexcept (FE_INVALID_SQRT);
1105+
1106+ fenv_union_t u = { .fenv = fegetenv_register () };
1107+ if ((u.l[1] & FE_INVALID) == 0)
1108+#endif
1109+ feraiseexcept (FE_INVALID);
1110+ b = a_nan.value;
1111+ }
1112+ return f_wash (b);
1113+}
1114diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
1115--- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
1116+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500
1117@@ -0,0 +1,101 @@
1118+/* Single-precision floating point square root.
1119+ Copyright (C) 2010 Free Software Foundation, Inc.
1120+ This file is part of the GNU C Library.
1121+
1122+ The GNU C Library is free software; you can redistribute it and/or
1123+ modify it under the terms of the GNU Lesser General Public
1124+ License as published by the Free Software Foundation; either
1125+ version 2.1 of the License, or (at your option) any later version.
1126+
1127+ The GNU C Library is distributed in the hope that it will be useful,
1128+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1129+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1130+ Lesser General Public License for more details.
1131+
1132+ You should have received a copy of the GNU Lesser General Public
1133+ License along with the GNU C Library; if not, write to the Free
1134+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1135+ 02111-1307 USA. */
1136+
1137+#include <math.h>
1138+#include <math_private.h>
1139+#include <fenv_libc.h>
1140+#include <inttypes.h>
1141+
1142+#include <sysdep.h>
1143+#include <ldsodefs.h>
1144+
1145+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1146+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1147+static const float threehalf = 1.5;
1148+
1149+/* The method is based on the descriptions in:
1150+
1151+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1152+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1153+
1154+ We find the reciprocal square root and use that to compute the actual
1155+ square root. */
1156+
1157+#ifdef __STDC__
1158+float
1159+__ieee754_sqrtf (float b)
1160+#else
1161+float
1162+__ieee754_sqrtf (b)
1163+ float b;
1164+#endif
1165+{
1166+ if (__builtin_expect (b > 0, 1))
1167+ {
1168+#define FMSUB(a_, c_, b_) \
1169+ ({ double __r; \
1170+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
1171+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1172+ __r;})
1173+#define FNMSUB(a_, c_, b_) \
1174+ ({ double __r; \
1175+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1176+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1177+ __r;})
1178+
1179+ if (__builtin_expect (b != a_inf.value, 1))
1180+ {
1181+ double y, x;
1182+ fenv_t fe;
1183+
1184+ fe = fegetenv_register ();
1185+
1186+ relax_fenv_state ();
1187+
1188+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
1189+ y = FMSUB (threehalf, b, b);
1190+
1191+ /* Initial estimate. */
1192+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
1193+
1194+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
1195+ x = x * FNMSUB (y, x * x, threehalf);
1196+ x = x * FNMSUB (y, x * x, threehalf);
1197+ x = x * FNMSUB (y, x * x, threehalf);
1198+
1199+ /* All done. */
1200+ fesetenv_register (fe);
1201+ return x * b;
1202+ }
1203+ }
1204+ else if (b < 0)
1205+ {
1206+ /* For some reason, some PowerPC32 processors don't implement
1207+ FE_INVALID_SQRT. */
1208+#ifdef FE_INVALID_SQRT
1209+ feraiseexcept (FE_INVALID_SQRT);
1210+
1211+ fenv_union_t u = { .fenv = fegetenv_register () };
1212+ if ((u.l[1] & FE_INVALID) == 0)
1213+#endif
1214+ feraiseexcept (FE_INVALID);
1215+ b = a_nan.value;
1216+ }
1217+ return f_washf (b);
1218+}
1219diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
1220--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600
1221+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2012-06-14 14:56:02.080000985 -0500
1222@@ -0,0 +1,134 @@
1223+/* Double-precision floating point square root.
1224+ Copyright (C) 2010 Free Software Foundation, Inc.
1225+ This file is part of the GNU C Library.
1226+
1227+ The GNU C Library is free software; you can redistribute it and/or
1228+ modify it under the terms of the GNU Lesser General Public
1229+ License as published by the Free Software Foundation; either
1230+ version 2.1 of the License, or (at your option) any later version.
1231+
1232+ The GNU C Library is distributed in the hope that it will be useful,
1233+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1234+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1235+ Lesser General Public License for more details.
1236+
1237+ You should have received a copy of the GNU Lesser General Public
1238+ License along with the GNU C Library; if not, write to the Free
1239+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1240+ 02111-1307 USA. */
1241+
1242+#include <math.h>
1243+#include <math_private.h>
1244+#include <fenv_libc.h>
1245+#include <inttypes.h>
1246+
1247+#include <sysdep.h>
1248+#include <ldsodefs.h>
1249+
1250+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1251+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1252+static const float two108 = 3.245185536584267269e+32;
1253+static const float twom54 = 5.551115123125782702e-17;
1254+static const float half = 0.5;
1255+
1256+/* The method is based on the descriptions in:
1257+
1258+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1259+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1260+
1261+ We find the actual square root and half of its reciprocal
1262+ simultaneously. */
1263+
1264+#ifdef __STDC__
1265+double
1266+__ieee754_sqrt (double b)
1267+#else
1268+double
1269+__ieee754_sqrt (b)
1270+ double b;
1271+#endif
1272+{
1273+ if (__builtin_expect (b > 0, 1))
1274+ {
1275+ double y, g, h, d, r;
1276+ ieee_double_shape_type u;
1277+
1278+ if (__builtin_expect (b != a_inf.value, 1))
1279+ {
1280+ fenv_t fe;
1281+
1282+ fe = fegetenv_register ();
1283+
1284+ u.value = b;
1285+
1286+ relax_fenv_state ();
1287+
1288+ __asm__ ("frsqrte %[estimate], %[x]\n"
1289+ : [estimate] "=f" (y) : [x] "f" (b));
1290+
1291+ /* Following Muller et al, page 168, equation 5.20.
1292+
1293+ h goes to 1/(2*sqrt(b))
1294+ g goes to sqrt(b).
1295+
1296+ We need three iterations to get within 1ulp. */
1297+
1298+ /* Indicate that these can be performed prior to the branch. GCC
1299+ insists on sinking them below the branch, however; it seems like
1300+ they'd be better before the branch so that we can cover any latency
1301+ from storing the argument and loading its high word. Oh well. */
1302+
1303+ g = b * y;
1304+ h = 0.5 * y;
1305+
1306+ /* Handle small numbers by scaling. */
1307+ if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
1308+ return __ieee754_sqrt (b * two108) * twom54;
1309+
1310+#define FMADD(a_, c_, b_) \
1311+ ({ double __r; \
1312+ __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
1313+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1314+ __r;})
1315+#define FNMSUB(a_, c_, b_) \
1316+ ({ double __r; \
1317+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1318+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1319+ __r;})
1320+
1321+ r = FNMSUB (g, h, half);
1322+ g = FMADD (g, r, g);
1323+ h = FMADD (h, r, h);
1324+
1325+ r = FNMSUB (g, h, half);
1326+ g = FMADD (g, r, g);
1327+ h = FMADD (h, r, h);
1328+
1329+ r = FNMSUB (g, h, half);
1330+ g = FMADD (g, r, g);
1331+ h = FMADD (h, r, h);
1332+
1333+ /* g is now +/- 1ulp, or exactly equal to, the square root of b. */
1334+
1335+ /* Final refinement. */
1336+ d = FNMSUB (g, g, b);
1337+
1338+ fesetenv_register (fe);
1339+ return FMADD (d, h, g);
1340+ }
1341+ }
1342+ else if (b < 0)
1343+ {
1344+ /* For some reason, some PowerPC32 processors don't implement
1345+ FE_INVALID_SQRT. */
1346+#ifdef FE_INVALID_SQRT
1347+ feraiseexcept (FE_INVALID_SQRT);
1348+
1349+ fenv_union_t u = { .fenv = fegetenv_register () };
1350+ if ((u.l[1] & FE_INVALID) == 0)
1351+#endif
1352+ feraiseexcept (FE_INVALID);
1353+ b = a_nan.value;
1354+ }
1355+ return f_wash (b);
1356+}
1357diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
1358--- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600
1359+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2012-06-14 14:56:02.080000985 -0500
1360@@ -0,0 +1,101 @@
1361+/* Single-precision floating point square root.
1362+ Copyright (C) 2010 Free Software Foundation, Inc.
1363+ This file is part of the GNU C Library.
1364+
1365+ The GNU C Library is free software; you can redistribute it and/or
1366+ modify it under the terms of the GNU Lesser General Public
1367+ License as published by the Free Software Foundation; either
1368+ version 2.1 of the License, or (at your option) any later version.
1369+
1370+ The GNU C Library is distributed in the hope that it will be useful,
1371+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1372+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1373+ Lesser General Public License for more details.
1374+
1375+ You should have received a copy of the GNU Lesser General Public
1376+ License along with the GNU C Library; if not, write to the Free
1377+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1378+ 02111-1307 USA. */
1379+
1380+#include <math.h>
1381+#include <math_private.h>
1382+#include <fenv_libc.h>
1383+#include <inttypes.h>
1384+
1385+#include <sysdep.h>
1386+#include <ldsodefs.h>
1387+
1388+static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
1389+static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
1390+static const float threehalf = 1.5;
1391+
1392+/* The method is based on the descriptions in:
1393+
1394+ _The Handbook of Floating-Pointer Arithmetic_ by Muller et al., chapter 5;
1395+ _IA-64 and Elementary Functions: Speed and Precision_ by Markstein, chapter 9
1396+
1397+ We find the reciprocal square root and use that to compute the actual
1398+ square root. */
1399+
1400+#ifdef __STDC__
1401+float
1402+__ieee754_sqrtf (float b)
1403+#else
1404+float
1405+__ieee754_sqrtf (b)
1406+ float b;
1407+#endif
1408+{
1409+ if (__builtin_expect (b > 0, 1))
1410+ {
1411+#define FMSUB(a_, c_, b_) \
1412+ ({ double __r; \
1413+ __asm__ ("fmsub %[r], %[a], %[c], %[b]\n" \
1414+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1415+ __r;})
1416+#define FNMSUB(a_, c_, b_) \
1417+ ({ double __r; \
1418+ __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
1419+ : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
1420+ __r;})
1421+
1422+ if (__builtin_expect (b != a_inf.value, 1))
1423+ {
1424+ double y, x;
1425+ fenv_t fe;
1426+
1427+ fe = fegetenv_register ();
1428+
1429+ relax_fenv_state ();
1430+
1431+ /* Compute y = 1.5 * b - b. Uses fewer constants than y = 0.5 * b. */
1432+ y = FMSUB (threehalf, b, b);
1433+
1434+ /* Initial estimate. */
1435+ __asm__ ("frsqrte %[x], %[b]\n" : [x] "=f" (x) : [b] "f" (b));
1436+
1437+ /* Iterate. x_{n+1} = x_n * (1.5 - y * (x_n * x_n)). */
1438+ x = x * FNMSUB (y, x * x, threehalf);
1439+ x = x * FNMSUB (y, x * x, threehalf);
1440+ x = x * FNMSUB (y, x * x, threehalf);
1441+
1442+ /* All done. */
1443+ fesetenv_register (fe);
1444+ return x * b;
1445+ }
1446+ }
1447+ else if (b < 0)
1448+ {
1449+ /* For some reason, some PowerPC32 processors don't implement
1450+ FE_INVALID_SQRT. */
1451+#ifdef FE_INVALID_SQRT
1452+ feraiseexcept (FE_INVALID_SQRT);
1453+
1454+ fenv_union_t u = { .fenv = fegetenv_register () };
1455+ if ((u.l[1] & FE_INVALID) == 0)
1456+#endif
1457+ feraiseexcept (FE_INVALID);
1458+ b = a_nan.value;
1459+ }
1460+ return f_washf (b);
1461+}
1462diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies
1463--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1464+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2012-06-14 14:51:50.452001745 -0500
1465@@ -0,0 +1 @@
1466+powerpc/powerpc32/603e/fpu
1467diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies
1468--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1469+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2012-06-14 14:54:00.481000876 -0500
1470@@ -0,0 +1 @@
1471+powerpc/powerpc32/e500mc/fpu
1472diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies
1473--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1474+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2012-06-14 14:54:17.000001007 -0500
1475@@ -0,0 +1 @@
1476+powerpc/powerpc32/e5500/fpu
1477diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies
1478--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1479+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2012-06-14 14:54:31.054001299 -0500
1480@@ -0,0 +1 @@
1481+powerpc/powerpc32/e6500/fpu
1482diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies
1483--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1484+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2012-06-14 14:51:50.453001709 -0500
1485@@ -0,0 +1 @@
1486+powerpc/powerpc64/e5500/fpu
1487diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies
1488--- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600
1489+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2012-06-14 14:58:14.298001288 -0500
1490@@ -0,0 +1 @@
1491+powerpc/powerpc64/e6500/fpu
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch b/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch
new file mode 100644
index 0000000000..be29856b03
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/initgroups_keys.patch
@@ -0,0 +1,20 @@
1This is needed since initgroups belongs to NET group
2so when NET is disabled in eglibc build then it reports
3as undefined symbol
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Upstream-Status: Pending
7
8Index: libc/nss/getent.c
9===================================================================
10--- libc.orig/nss/getent.c 2012-03-09 09:41:57.099581559 -0800
11+++ libc/nss/getent.c 2012-03-09 09:42:13.095582334 -0800
12@@ -898,7 +898,7 @@
13 D(group)
14 D(gshadow)
15 DN(hosts)
16-D(initgroups)
17+DN(initgroups)
18 DN(netgroup)
19 DN(networks)
20 D(passwd)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch
new file mode 100644
index 0000000000..e83a0ad6d2
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/ld-search-order.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The default lib search path order is:
4
5 1) LD_LIBRARY_PATH
6 2) RPATH from the binary
7 3) ld.so.cache
8 4) default search paths embedded in the linker
9
10For nativesdk binaries which are being used alongside binaries on a host system, we
11need the search paths to firstly search the shipped nativesdk libs but then also
12cover the host system. For example we want the host system's libGL and this may be
13in a non-standard location like /usr/lib/mesa. The only place the location is know
14about is in the ld.so.cache of the host system.
15
16Since nativesdk has a simple structure and doesn't need to use a cache itself, we
17repurpose the cache for use as a last resort in finding host system binaries. This
18means we need to switch the order of 3 and 4 above to make this work effectively.
19
20RP 14/10/2010
21
22Index: libc/elf/dl-load.c
23===================================================================
24--- libc.orig/elf/dl-load.c 2012-12-02 13:11:45.000000000 -0800
25+++ libc/elf/dl-load.c 2013-01-09 07:00:59.135223084 -0800
26@@ -2215,7 +2215,14 @@
27 fd = open_path (name, namelen, mode & __RTLD_SECURE,
28 &loader->l_runpath_dirs, &realname, &fb, loader,
29 LA_SER_RUNPATH, &found_other_class);
30-
31+ /* try the default path. */
32+ if (fd == -1
33+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
34+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
35+ && rtld_search_dirs.dirs != (void *) -1)
36+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
37+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
38+ /* Finally try ld.so.cache */
39 #ifdef USE_LDCONFIG
40 if (fd == -1
41 && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
42@@ -2283,14 +2290,6 @@
43 }
44 #endif
45
46- /* Finally, try the default path. */
47- if (fd == -1
48- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
49- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
50- && rtld_search_dirs.dirs != (void *) -1)
51- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
52- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
53-
54 /* Add another newline when we are tracing the library loading. */
55 if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
56 _dl_debug_printf ("\n");
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch b/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch
new file mode 100644
index 0000000000..9b646fea95
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/mips-rld-map-check.patch
@@ -0,0 +1,26 @@
1
2On mips target, binutils currently sets DT_MIPS_RLD_MAP to 0 in dynamic
3section if a --version-script sets _RLD_MAP to local. This is apparently
4a binutils bug, but libc shouldn't segfault in this case.
5
6see also: http://sourceware.org/bugilla/show_bug.cgi?id=11615
7
8Upstream-Status: Pending
9
109/19/2010 - added by Qing He <qing.he@intel.com>
11
12
13---
14diff -ru glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h glibc-2.10.1/ports/sysdeps/mips/dl-machine.h
15--- glibc-2.10.1.orig/ports/sysdeps/mips/dl-machine.h 2009-05-16 16:36:20.000000000 +0800
16+++ glibc-2.10.1/ports/sysdeps/mips/dl-machine.h 2010-09-19 09:11:53.000000000 +0800
17@@ -70,7 +70,8 @@
18 /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
19 with the run-time address of the r_debug structure */
20 #define ELF_MACHINE_DEBUG_SETUP(l,r) \
21-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
22+do { if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
23+ (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) \
24 *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
25 (ElfW(Addr)) (r); \
26 } while (0)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch b/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch
new file mode 100644
index 0000000000..1542b1b519
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/multilib_readlib.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Replace the OECORE_KNOWN_INTERPRETER_NAMES with the value of
4variable EGLIBC_KNOWN_INTERPRETER_NAMES.
5
6Lianhao Lu, 08/01/2011
7
8--- libc/elf/readlib.c.orig 2011-08-12 17:05:51.864470837 +0800
9+++ libc/elf/readlib.c 2011-08-12 17:06:39.346942074 +0800
10@@ -52,6 +52,7 @@
11 #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
12 SYSDEP_KNOWN_INTERPRETER_NAMES
13 #endif
14+ OECORE_KNOWN_INTERPRETER_NAMES
15 };
16
17 static struct known_names known_libs[] =
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch b/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch
new file mode 100644
index 0000000000..6ea666b1d6
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/ppc-sqrt_finite.patch
@@ -0,0 +1,184 @@
1on ppc fixes the errors like below
2| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
3| collect2: ld returned 1 exit status
4
5Upstream-Status: Pending
6
7ChangeLog
8
92012-01-06 Khem Raj <raj.khem@gmail.com>
10
11 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c: Add __*_finite alias.
12 Remove cruft.
13 * sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c: Ditto.
14 * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c: Ditto.
15 * sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c: Ditto.
16
17Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
18===================================================================
19--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
20+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
21@@ -39,14 +39,8 @@ static const float half = 0.5;
22 We find the actual square root and half of its reciprocal
23 simultaneously. */
24
25-#ifdef __STDC__
26 double
27 __ieee754_sqrt (double b)
28-#else
29-double
30-__ieee754_sqrt (b)
31- double b;
32-#endif
33 {
34 if (__builtin_expect (b > 0, 1))
35 {
36@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
37 }
38 return f_wash (b);
39 }
40+strong_alias (__ieee754_sqrt, __sqrt_finite)
41Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
42===================================================================
43--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
44+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
45@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
46 We find the reciprocal square root and use that to compute the actual
47 square root. */
48
49-#ifdef __STDC__
50 float
51 __ieee754_sqrtf (float b)
52-#else
53-float
54-__ieee754_sqrtf (b)
55- float b;
56-#endif
57 {
58 if (__builtin_expect (b > 0, 1))
59 {
60@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
61 }
62 return f_washf (b);
63 }
64+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
65Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
66===================================================================
67--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
68+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
69@@ -39,14 +39,8 @@ static const float half = 0.5;
70 We find the actual square root and half of its reciprocal
71 simultaneously. */
72
73-#ifdef __STDC__
74 double
75 __ieee754_sqrt (double b)
76-#else
77-double
78-__ieee754_sqrt (b)
79- double b;
80-#endif
81 {
82 if (__builtin_expect (b > 0, 1))
83 {
84@@ -132,3 +126,4 @@ __ieee754_sqrt (b)
85 }
86 return f_wash (b);
87 }
88+strong_alias (__ieee754_sqrt, __sqrt_finite)
89Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
90===================================================================
91--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
92+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
93@@ -37,14 +37,8 @@ static const float threehalf = 1.5;
94 We find the reciprocal square root and use that to compute the actual
95 square root. */
96
97-#ifdef __STDC__
98 float
99 __ieee754_sqrtf (float b)
100-#else
101-float
102-__ieee754_sqrtf (b)
103- float b;
104-#endif
105 {
106 if (__builtin_expect (b > 0, 1))
107 {
108@@ -99,3 +93,4 @@ __ieee754_sqrtf (b)
109 }
110 return f_washf (b);
111 }
112+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
113Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
114===================================================================
115--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
116+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
117@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
118 }
119 return f_wash (b);
120 }
121+strong_alias (__ieee754_sqrt, __sqrt_finite)
122Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
123===================================================================
124--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
125+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
126@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
127 }
128 return f_washf (b);
129 }
130+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
131Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
132===================================================================
133--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
134+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
135@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
136 }
137 return f_wash (b);
138 }
139+strong_alias (__ieee754_sqrt, __sqrt_finite)
140Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
141===================================================================
142--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
143+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
144@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
145 }
146 return f_washf (b);
147 }
148+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
149Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
150===================================================================
151--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
152+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
153@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
154 }
155 return f_wash (b);
156 }
157+strong_alias (__ieee754_sqrt, __sqrt_finite)
158Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
159===================================================================
160--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
161+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
162@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
163 }
164 return f_washf (b);
165 }
166+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
167Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
168===================================================================
169--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
170+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
171@@ -132,3 +132,4 @@ __ieee754_sqrt (b)
172 }
173 return f_wash (b);
174 }
175+strong_alias (__ieee754_sqrt, __sqrt_finite)
176Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
177===================================================================
178--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
179+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
180@@ -99,3 +99,4 @@ __ieee754_sqrtf (b)
181 }
182 return f_washf (b);
183 }
184+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch
new file mode 100644
index 0000000000..60532cbd03
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/ppc_slow_ieee754_sqrt.patch
@@ -0,0 +1,365 @@
1 __ieee754_sqrt{,f} are now inline functions and call out __slow versions
2
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Pending
6Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
7===================================================================
8--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
9+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
10@@ -40,7 +40,7 @@ static const float half = 0.5;
11 simultaneously. */
12
13 double
14-__ieee754_sqrt (double b)
15+__slow_ieee754_sqrt (double b)
16 {
17 if (__builtin_expect (b > 0, 1))
18 {
19@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
20
21 /* Handle small numbers by scaling. */
22 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
23- return __ieee754_sqrt (b * two108) * twom54;
24+ return __slow_ieee754_sqrt (b * two108) * twom54;
25
26 #define FMADD(a_, c_, b_) \
27 ({ double __r; \
28@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
29 }
30 return f_wash (b);
31 }
32+
33+#undef __ieee754_sqrt
34+double
35+__ieee754_sqrt (double x)
36+{
37+ return __slow_ieee754_sqrt (x);
38+}
39+
40 strong_alias (__ieee754_sqrt, __sqrt_finite)
41Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
42===================================================================
43--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
44+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
45@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
46 square root. */
47
48 float
49-__ieee754_sqrtf (float b)
50+__slow_ieee754_sqrtf (float b)
51 {
52 if (__builtin_expect (b > 0, 1))
53 {
54@@ -93,4 +93,10 @@ __ieee754_sqrtf (float b)
55 }
56 return f_washf (b);
57 }
58+#undef __ieee754_sqrtf
59+float
60+__ieee754_sqrtf (float x)
61+{
62+ return __slow_ieee754_sqrtf (x);
63+}
64 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
65Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
66===================================================================
67--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
68+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
69@@ -40,7 +40,7 @@ static const float half = 0.5;
70 simultaneously. */
71
72 double
73-__ieee754_sqrt (double b)
74+__slow_ieee754_sqrt (double b)
75 {
76 if (__builtin_expect (b > 0, 1))
77 {
78@@ -77,7 +77,7 @@ __ieee754_sqrt (double b)
79
80 /* Handle small numbers by scaling. */
81 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
82- return __ieee754_sqrt (b * two108) * twom54;
83+ return __slow_ieee754_sqrt (b * two108) * twom54;
84
85 #define FMADD(a_, c_, b_) \
86 ({ double __r; \
87@@ -126,4 +126,12 @@ __ieee754_sqrt (double b)
88 }
89 return f_wash (b);
90 }
91+
92+#undef __ieee754_sqrt
93+double
94+__ieee754_sqrt (double x)
95+{
96+ return __slow_ieee754_sqrt (x);
97+}
98+
99 strong_alias (__ieee754_sqrt, __sqrt_finite)
100Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
101===================================================================
102--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
103+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
104@@ -38,7 +38,7 @@ static const float threehalf = 1.5;
105 square root. */
106
107 float
108-__ieee754_sqrtf (float b)
109+__slow_ieee754_sqrtf (float b)
110 {
111 if (__builtin_expect (b > 0, 1))
112 {
113@@ -93,4 +93,11 @@ __ieee754_sqrtf (float b)
114 }
115 return f_washf (b);
116 }
117+#undef __ieee754_sqrtf
118+float
119+__ieee754_sqrtf (float x)
120+{
121+ return __slow_ieee754_sqrtf (x);
122+}
123+
124 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
125Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
126===================================================================
127--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
128+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c
129@@ -41,10 +41,10 @@ static const float half = 0.5;
130
131 #ifdef __STDC__
132 double
133-__ieee754_sqrt (double b)
134+__slow_ieee754_sqrt (double b)
135 #else
136 double
137-__ieee754_sqrt (b)
138+__slow_ieee754_sqrt (b)
139 double b;
140 #endif
141 {
142@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
143
144 /* Handle small numbers by scaling. */
145 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
146- return __ieee754_sqrt (b * two108) * twom54;
147+ return __slow_ieee754_sqrt (b * two108) * twom54;
148
149 #define FMADD(a_, c_, b_) \
150 ({ double __r; \
151@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
152 }
153 return f_wash (b);
154 }
155+
156+#undef __ieee754_sqrt
157+double
158+__ieee754_sqrt (double x)
159+{
160+ return __slow_ieee754_sqrt (x);
161+}
162+
163 strong_alias (__ieee754_sqrt, __sqrt_finite)
164Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
165===================================================================
166--- libc.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
167+++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c
168@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
169
170 #ifdef __STDC__
171 float
172-__ieee754_sqrtf (float b)
173+__slow_ieee754_sqrtf (float b)
174 #else
175 float
176-__ieee754_sqrtf (b)
177+__slow_ieee754_sqrtf (b)
178 float b;
179 #endif
180 {
181@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
182 }
183 return f_washf (b);
184 }
185+
186+#undef __ieee754_sqrtf
187+float
188+__ieee754_sqrtf (float x)
189+{
190+ return __slow_ieee754_sqrtf (x);
191+}
192+
193 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
194Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
195===================================================================
196--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
197+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c
198@@ -41,10 +41,10 @@ static const float half = 0.5;
199
200 #ifdef __STDC__
201 double
202-__ieee754_sqrt (double b)
203+__slow_ieee754_sqrt (double b)
204 #else
205 double
206-__ieee754_sqrt (b)
207+__slow_ieee754_sqrt (b)
208 double b;
209 #endif
210 {
211@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
212
213 /* Handle small numbers by scaling. */
214 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
215- return __ieee754_sqrt (b * two108) * twom54;
216+ return __slow_ieee754_sqrt (b * two108) * twom54;
217
218 #define FMADD(a_, c_, b_) \
219 ({ double __r; \
220@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
221 }
222 return f_wash (b);
223 }
224+
225+#undef __ieee754_sqrt
226+double
227+__ieee754_sqrt (double x)
228+{
229+ return __slow_ieee754_sqrt (x);
230+}
231+
232 strong_alias (__ieee754_sqrt, __sqrt_finite)
233Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
234===================================================================
235--- libc.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
236+++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c
237@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
238
239 #ifdef __STDC__
240 float
241-__ieee754_sqrtf (float b)
242+__slow_ieee754_sqrtf (float b)
243 #else
244 float
245-__ieee754_sqrtf (b)
246+__slow_ieee754_sqrtf (b)
247 float b;
248 #endif
249 {
250@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
251 }
252 return f_washf (b);
253 }
254+
255+#undef __ieee754_sqrtf
256+float
257+__ieee754_sqrtf (float x)
258+{
259+ return __slow_ieee754_sqrtf (x);
260+}
261+
262 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
263Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
264===================================================================
265--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
266+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c
267@@ -41,10 +41,10 @@ static const float half = 0.5;
268
269 #ifdef __STDC__
270 double
271-__ieee754_sqrt (double b)
272+__slow_ieee754_sqrt (double b)
273 #else
274 double
275-__ieee754_sqrt (b)
276+__slow_ieee754_sqrt (b)
277 double b;
278 #endif
279 {
280@@ -83,7 +83,7 @@ __ieee754_sqrt (b)
281
282 /* Handle small numbers by scaling. */
283 if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0))
284- return __ieee754_sqrt (b * two108) * twom54;
285+ return __slow_ieee754_sqrt (b * two108) * twom54;
286
287 #define FMADD(a_, c_, b_) \
288 ({ double __r; \
289@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
290 }
291 return f_wash (b);
292 }
293+
294+#undef __ieee754_sqrt
295+double
296+__ieee754_sqrt (double x)
297+{
298+ return __slow_ieee754_sqrt (x);
299+}
300+
301 strong_alias (__ieee754_sqrt, __sqrt_finite)
302Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
303===================================================================
304--- libc.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
305+++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c
306@@ -39,10 +39,10 @@ static const float threehalf = 1.5;
307
308 #ifdef __STDC__
309 float
310-__ieee754_sqrtf (float b)
311+__slow_ieee754_sqrtf (float b)
312 #else
313 float
314-__ieee754_sqrtf (b)
315+__slow_ieee754_sqrtf (b)
316 float b;
317 #endif
318 {
319@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
320 }
321 return f_washf (b);
322 }
323+
324+#undef __ieee754_sqrtf
325+float
326+__ieee754_sqrtf (float x)
327+{
328+ return __slow_ieee754_sqrtf (x);
329+}
330+
331 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
332Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
333===================================================================
334--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
335+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c
336@@ -132,4 +132,12 @@ __ieee754_sqrt (b)
337 }
338 return f_wash (b);
339 }
340+
341+#undef __ieee754_sqrt
342+double
343+__ieee754_sqrt (double x)
344+{
345+ return __slow_ieee754_sqrt (x);
346+}
347+
348 strong_alias (__ieee754_sqrt, __sqrt_finite)
349Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
350===================================================================
351--- libc.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
352+++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c
353@@ -99,4 +99,12 @@ __ieee754_sqrtf (b)
354 }
355 return f_washf (b);
356 }
357+
358+#undef __ieee754_sqrtf
359+float
360+__ieee754_sqrtf (float x)
361+{
362+ return __slow_ieee754_sqrtf (x);
363+}
364+
365 strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch
new file mode 100644
index 0000000000..ca5f17ba58
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk.patch
@@ -0,0 +1,108 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
4and lengths as well as ld.so.cache path in the dynamic loader to specific
5sections in memory. The sections that contain paths have been allocated a 4096
6byte section, which is the maximum path length in linux. This will allow the
7relocating script to parse the ELF binary, detect the section and easily replace
8the strings in a certain path.
9
10Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
11
12Index: libc/elf/interp.c
13===================================================================
14--- libc.orig/elf/interp.c
15+++ libc/elf/interp.c
16@@ -16,5 +16,5 @@
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
21+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
22 = RUNTIME_LINKER;
23Index: libc/elf/dl-load.c
24===================================================================
25--- libc.orig/elf/dl-load.c
26+++ libc/elf/dl-load.c
27@@ -144,8 +144,8 @@ static size_t max_capstrlen attribute_re
28 /* Get the generated information about the trusted directories. */
29 #include "trusted-dirs.h"
30
31-static const char system_dirs[] = SYSTEM_DIRS;
32-static const size_t system_dirs_len[] =
33+static const char system_dirs[4096] __attribute__ ((section (".sysdirs"))) = SYSTEM_DIRS;
34+volatile static const size_t system_dirs_len[] __attribute__ ((section (".sysdirslen"))) =
35 {
36 SYSTEM_DIRS_LEN
37 };
38Index: libc/elf/dl-cache.c
39===================================================================
40--- libc.orig/elf/dl-cache.c
41+++ libc/elf/dl-cache.c
42@@ -133,6 +133,10 @@ do \
43 while (0)
44
45
46+const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) =
47+ SYSCONFDIR "/ld.so.cache";
48+
49+
50 int
51 internal_function
52 _dl_cache_libcmp (const char *p1, const char *p2)
53Index: libc/elf/ldconfig.c
54===================================================================
55--- libc.orig/elf/ldconfig.c
56+++ libc/elf/ldconfig.c
57@@ -166,6 +166,9 @@ static struct argp argp =
58 options, parse_opt, NULL, doc, NULL, more_help, NULL
59 };
60
61+
62+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
63+
64 /* Check if string corresponds to an important hardware capability or
65 a platform. */
66 static int
67Index: libc/sysdeps/generic/dl-cache.h
68===================================================================
69--- libc.orig/sysdeps/generic/dl-cache.h
70+++ libc/sysdeps/generic/dl-cache.h
71@@ -27,10 +27,6 @@
72 ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
73 #endif
74
75-#ifndef LD_SO_CACHE
76-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
77-#endif
78-
79 #ifndef add_system_dir
80 # define add_system_dir(dir) add_dir (dir)
81 #endif
82Index: libc/elf/rtld.c
83===================================================================
84--- libc.orig/elf/rtld.c
85+++ libc/elf/rtld.c
86@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
87 strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
88 #endif
89
90+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
91
92 /* List of auditing DSOs. */
93 static struct audit_list
94@@ -1031,12 +1032,12 @@ of this helper program; chances are you
95 --list list all dependencies and how they are resolved\n\
96 --verify verify that given object really is a dynamically linked\n\
97 object we can handle\n\
98- --inhibit-cache Do not use " LD_SO_CACHE "\n\
99+ --inhibit-cache Do not use %s\n\
100 --library-path PATH use given PATH instead of content of the environment\n\
101 variable LD_LIBRARY_PATH\n\
102 --inhibit-rpath LIST ignore RUNPATH and RPATH information in object names\n\
103 in LIST\n\
104- --audit LIST use objects named in LIST as auditors\n");
105+ --audit LIST use objects named in LIST as auditors\n", LD_SO_CACHE);
106
107 ++_dl_skip_args;
108 --_dl_argc;
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch
new file mode 100644
index 0000000000..f164f8f9ae
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/relocatable_sdk_fix_openpath.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3eglibc-nativesdk: Fix buffer overrun with a relocated SDK
4
5When ld-linux-*.so.2 is relocated to a path that is longer than the
6original fixed location, the dynamic loader will crash in open_path
7because it implicitly assumes that max_dirnamelen is a fixed size that
8never changes.
9
10The allocated buffer will not be large enough to contain the directory
11path string which is larger than the fixed location provided at build
12time.
13
14Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15
16---
17 elf/dl-load.c | 12 ++++++++++++
18 1 file changed, 12 insertions(+)
19
20--- a/elf/dl-load.c
21+++ b/elf/dl-load.c
22@@ -1919,7 +1919,19 @@ open_path (const char *name, size_t name
23 given on the command line when rtld is run directly. */
24 return -1;
25
26+ do
27+ {
28+ struct r_search_path_elem *this_dir = *dirs;
29+ if (this_dir->dirnamelen > max_dirnamelen)
30+ {
31+ max_dirnamelen = this_dir->dirnamelen;
32+ }
33+ }
34+ while (*++dirs != NULL);
35+
36 buf = alloca (max_dirnamelen + max_capstrlen + namelen);
37+
38+ dirs = sps->dirs;
39 do
40 {
41 struct r_search_path_elem *this_dir = *dirs;
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch
new file mode 100644
index 0000000000..dc9949bec9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-awk.patch
@@ -0,0 +1,42 @@
1tzselect: workaround bug in busybox awk
2
3busybox's version of awk in version 1.20.2 and lower doesn't support
4escape sequences in conjunction with the -F option. Use -v FS= instead
5as a workaround until the bug is fixed.
6
7Reference:
8https://bugs.busybox.net/show_bug.cgi?id=5126
9
10Upstream-Status: Inappropriate [other]
11
12Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
13
14--- libc/timezone/tzselect.ksh
15+++ libc/timezone/tzselect.ksh
16@@ -208,7 +208,7 @@ while
17 TZ_for_date=$TZ;;
18 *)
19 # Get list of names of countries in the continent or ocean.
20- countries=$($AWK -F'\t' \
21+ countries=$($AWK -v FS="\t" \
22 -v continent="$continent" \
23 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
24 '
25@@ -252,7 +252,7 @@ while
26
27
28 # Get list of names of time zone rule regions in the country.
29- regions=$($AWK -F'\t' \
30+ regions=$($AWK -v FS="\t" \
31 -v country="$country" \
32 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
33 '
34@@ -289,7 +289,7 @@ while
35 esac
36
37 # Determine TZ from country and region.
38- TZ=$($AWK -F'\t' \
39+ TZ=$($AWK -v FS="\t" \
40 -v country="$country" \
41 -v region="$region" \
42 -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
diff --git a/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch
new file mode 100644
index 0000000000..e9a3691bbb
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.18/tzselect-sh.patch
@@ -0,0 +1,156 @@
1tzselect: eliminate ksh-dependency
2
3This is an adapted version of a patch originally
4by Peter Seebach <peter.seebach@windriver.com> found here:
5http://www.eglibc.org/archives/patches/msg00671.html
6
7Upstream-Status: Pending
8
9Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
10
11Index: libc/timezone/tzselect.ksh
12===================================================================
13--- libc.orig/timezone/tzselect.ksh 2012-11-17 09:50:14.000000000 -0800
14+++ libc/timezone/tzselect.ksh 2013-01-03 22:46:26.423844259 -0800
15@@ -1,4 +1,4 @@
16-#!/bin/bash
17+#!/bin/sh
18
19 PKGVERSION='(tzcode) '
20 TZVERSION=see_Makefile
21@@ -11,23 +11,80 @@
22
23 # Porting notes:
24 #
25-# This script requires a Posix-like shell with the extension of a
26-# 'select' statement. The 'select' statement was introduced in the
27-# Korn shell and is available in Bash and other shell implementations.
28-# If your host lacks both Bash and the Korn shell, you can get their
29-# source from one of these locations:
30+# func_select allows this script to run on shells (such as busybox ash)
31+# which lack the ksh "select" builtin.
32 #
33-# Bash <http://www.gnu.org/software/bash/bash.html>
34-# Korn Shell <http://www.kornshell.com/>
35-# Public Domain Korn Shell <http://www.cs.mun.ca/~michael/pdksh/>
36-#
37-# This script also uses several features of modern awk programs.
38+# This script uses several features of modern awk programs.
39 # If your host lacks awk, or has an old awk that does not conform to Posix,
40 # you can use either of the following free programs instead:
41 #
42 # Gawk (GNU awk) <http://www.gnu.org/software/gawk/>
43 # mawk <http://invisible-island.net/mawk/>
44
45+# Implement ksh-style select in POSIX shell
46+
47+# We need a mostly-portable echo-n.
48+case `echo -n "foo\c"` in
49+*n*c*) func_echo_n() { echo "$*"; } ;;
50+*n*) func_echo_n() { echo "$*\c"; } ;;
51+*) func_echo_n() { echo -n "$*"; } ;;
52+esac
53+
54+# Synopsis: Replace "select foo in list" with "while func_select foo in list"
55+# and this works just like ksh, so far as I know.
56+func_select () {
57+ func_select_args=0
58+ if expr "$1" : "[_a-zA-Z][_a-zA-Z0-9]*$" > /dev/null; then
59+ func_select_var=$1
60+ else
61+ echo >&2 "func_select: '$1' is not a valid variable name."
62+ return 1
63+ fi
64+ shift 1
65+ case $1 in
66+ in) shift 1;;
67+ *) echo >&2 "func_select: usage: func_select var in ... (you must provide
68+arguments)"; return 1;;
69+ esac
70+ case $# in
71+ 0) echo >&2 "func_select: usage: func_select var in ..."; return 1;;
72+ esac
73+ for func_select_arg
74+ do
75+ func_select_args=`expr $func_select_args + 1`
76+ eval func_select_a_$func_select_args=\$func_select_arg
77+ done
78+ REPLY=""
79+ while :
80+ do
81+ if test -z "$REPLY"; then
82+ func_select_i=1
83+ while test $func_select_i -le $func_select_args
84+ do
85+ eval echo "\"\$func_select_i) \$func_select_a_$func_select_i\""
86+ func_select_i=`expr $func_select_i + 1`
87+ done
88+ fi
89+ func_echo_n "${PS3-#? }" >&2
90+ if read REPLY; then
91+ if test -n "${REPLY}"; then
92+ if expr "$REPLY" : '[1-9][0-9]*$' > /dev/null; then
93+ if test "$REPLY" -ge 1 && test "$REPLY" -le $func_select_args; then
94+ eval $func_select_var=\$func_select_a_$REPLY
95+ else
96+ eval $func_select_var=
97+ fi
98+ else
99+ eval $func_select_var=
100+ fi
101+ return 0
102+ fi
103+ else
104+ eval $func_select_var=
105+ return 1
106+ fi
107+ done
108+}
109
110 # Specify default values for environment variables if they are unset.
111 : ${AWK=awk}
112@@ -72,7 +129,7 @@
113
114
115 # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
116-case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
117+case $(echo 1 | (while func_select x in x; do break; done) 2>/dev/null) in
118 ?*) PS3=
119 esac
120
121@@ -92,7 +149,7 @@
122
123 echo >&2 'Please select a continent or ocean.'
124
125- select continent in \
126+ while func_select continent in \
127 Africa \
128 Americas \
129 Antarctica \
130@@ -172,7 +229,7 @@
131 case $countries in
132 *"$newline"*)
133 echo >&2 'Please select a country.'
134- select country in $countries
135+ while func_select country in $countries
136 do
137 case $country in
138 '') echo >&2 'Please enter a number in range.';;
139@@ -211,7 +268,7 @@
140 *"$newline"*)
141 echo >&2 'Please select one of the following' \
142 'time zone regions.'
143- select region in $regions
144+ while func_select region in $regions
145 do
146 case $region in
147 '') echo >&2 'Please enter a number in range.';;
148@@ -288,7 +345,7 @@
149 echo >&2 "Is the above information OK?"
150
151 ok=
152- select ok in Yes No
153+ while func_select ok in Yes No
154 do
155 case $ok in
156 '') echo >&2 'Please enter 1 for Yes, or 2 for No.';;
diff --git a/meta/recipes-core/eglibc/eglibc-collateral.inc b/meta/recipes-core/eglibc/eglibc-collateral.inc
new file mode 100644
index 0000000000..8feca09f2e
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-collateral.inc
@@ -0,0 +1,12 @@
1INHIBIT_DEFAULT_DEPS = "1"
2LICENSE = "GPLv2 & LGPLv2.1"
3HOMEPAGE = "http://www.eglibc.org/"
4
5do_fetch[noexec] = "1"
6do_unpack[noexec] = "1"
7do_patch[noexec] = "1"
8do_configure[noexec] = "1"
9do_compile[noexec] = "1"
10
11do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot"
12
diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
new file mode 100644
index 0000000000..d18786ab93
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-common.inc
@@ -0,0 +1,9 @@
1SUMMARY = "Embedded GLIBC (GNU C Library)"
2DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is designed to work well on embedded systems. EGLIBC strives to be source and binary compatible with GLIBC. EGLIBC's goals include reduced footprint, configurable components, better support for cross-compilation and cross-testing."
3HOMEPAGE = "http://www.eglibc.org/home"
4SECTION = "libs"
5LICENSE = "GPLv2 & LGPLv2.1"
6LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
7 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
8 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
9 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
new file mode 100644
index 0000000000..83b1d2cecf
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -0,0 +1,80 @@
1require eglibc-common.inc
2
3DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
4PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
5
6PACKAGES = ""
7PACKAGES_DYNAMIC = ""
8
9STAGINGCC = "gcc-cross-initial"
10STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
11TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
12
13do_configure () {
14 sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
15 chmod +x ${S}/configure
16 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
17 find ${S} -name "configure" | xargs touch
18 ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
19 --prefix=/usr \
20 --without-cvs --disable-sanity-checks \
21 --with-headers=${STAGING_DIR_TARGET}${includedir} \
22 --with-kconfig=${STAGING_BINDIR_NATIVE} \
23 --enable-hacker-mode --enable-addons
24}
25
26do_compile () {
27 :
28}
29
30do_install () {
31 oe_runmake cross-compiling=yes install_root=${D} \
32 includedir='${includedir}' prefix='${prefix}' \
33 install-bootstrap-headers=yes install-headers
34
35 oe_runmake csu/subdir_lib
36 mkdir -p ${D}${libdir}/
37 install -m 644 csu/crt[1in].o ${D}${libdir}
38
39 # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
40 # so do them by hand. We can tolerate an empty stubs.h for the moment.
41 # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
42 mkdir -p ${D}${includedir}/gnu/
43 touch ${D}${includedir}/gnu/stubs.h
44 cp ${S}/include/features.h ${D}${includedir}/features.h
45
46 if [ -e ${B}/bits/stdio_lim.h ]; then
47 cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/
48 fi
49 # add links to linux-libc-headers: final eglibc build need this.
50 for t in linux asm asm-generic; do
51 ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
52 done
53}
54
55do_install_locale() {
56 :
57}
58
59do_siteconfig () {
60 :
61}
62
63SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst"
64eglibcinitial_sstate_postinst() {
65 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
66 then
67 # Recreate the symlinks to ensure they point to the correct location
68 for t in linux asm asm-generic; do
69 rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t
70 ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/
71 done
72 fi
73}
74
75do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
76
77# We don't install any scripts so there is nothing to evacuate
78do_evacuate_scripts () {
79 :
80}
diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.17.bb b/meta/recipes-core/eglibc/eglibc-initial_2.17.bb
new file mode 100644
index 0000000000..de45079603
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-initial_2.17.bb
@@ -0,0 +1,11 @@
1require eglibc_${PV}.bb
2require eglibc-initial.inc
3
4DEPENDS += "kconfig-frontends-native"
5
6# main eglibc recipes muck with TARGET_CPPFLAGS to point into
7# final target sysroot but we
8# are not there when building eglibc-initial
9# so reset it here
10
11TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/eglibc/eglibc-initial_2.18.bb b/meta/recipes-core/eglibc/eglibc-initial_2.18.bb
new file mode 100644
index 0000000000..de45079603
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-initial_2.18.bb
@@ -0,0 +1,11 @@
1require eglibc_${PV}.bb
2require eglibc-initial.inc
3
4DEPENDS += "kconfig-frontends-native"
5
6# main eglibc recipes muck with TARGET_CPPFLAGS to point into
7# final target sysroot but we
8# are not there when building eglibc-initial
9# so reset it here
10
11TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/eglibc/eglibc-ld.inc b/meta/recipes-core/eglibc/eglibc-ld.inc
new file mode 100644
index 0000000000..b1701f008b
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-ld.inc
@@ -0,0 +1,54 @@
1def ld_append_if_tune_exists(d, infos, dict):
2 tune = d.getVar("DEFAULTTUNE", True) or ""
3 libdir = d.getVar("base_libdir", True) or ""
4 if tune in dict:
5 infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
6 infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
7
8def eglibc_dl_info(d):
9 ld_info_all = {
10 "mips": ["ld.so.1", "FLAG_ELF_LIBC6"],
11 "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
12 "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"],
13 "mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"],
14 "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
15 "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"],
16 "mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
17 "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
18 "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
19 "mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
20 "mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
21 "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
22 "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
23 "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
24 "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"],
25 "core2": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
26 "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
27 "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
28 "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
29 "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
30 }
31
32 infos = {'ldconfig':set(), 'lddrewrite':set()}
33 ld_append_if_tune_exists(d, infos, ld_info_all)
34
35 #DEFAULTTUNE_MULTILIB_ORIGINAL
36 original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL",True)
37 if original_tune:
38 localdata = bb.data.createCopy(d)
39 localdata.setVar("DEFAULTTUNE", original_tune)
40 ld_append_if_tune_exists(localdata, infos, ld_info_all)
41
42 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
43 for item in variants.split():
44 localdata = bb.data.createCopy(d)
45 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
46 localdata.setVar("OVERRIDES", overrides)
47 bb.data.update_data(localdata)
48 ld_append_if_tune_exists(localdata, infos, ld_info_all)
49 infos['ldconfig'] = ','.join(infos['ldconfig'])
50 infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
51 return infos
52
53EGLIBC_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}"
54RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
new file mode 100644
index 0000000000..c3fcc6d749
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -0,0 +1,92 @@
1include eglibc-collateral.inc
2
3SUMMARY = "Locale data from eglibc"
4
5BPN = "eglibc"
6LOCALEBASEPN = "${MLPREFIX}eglibc"
7
8# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
9# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
10# ERROR: Function failed: split_and_strip_files
11DEPENDS_class-target = "virtual/${TARGET_PREFIX}binutils"
12
13# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
14# is set. The idea is to avoid running localedef on the target (at first boot)
15# to decrease initial boot time and avoid localedef being killed by the OOM
16# killer which used to effectively break i18n on machines with < 128MB RAM.
17
18# default to disabled
19ENABLE_BINARY_LOCALE_GENERATION ?= "0"
20ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-eglibc-locale = "0"
21
22#enable locale generation on these arches
23# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
24BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64"
25
26# set "1" to use cross-localedef for locale generation
27# set "0" for qemu emulation of native localedef for locale generation
28LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
29
30PROVIDES = "virtual/libc-locale"
31
32PACKAGES = "localedef ${PN}-dbg"
33
34PACKAGES_DYNAMIC = "^locale-base-.* \
35 ^eglibc-gconv-.* ^eglibc-charmap-.* ^eglibc-localedata-.* ^eglibc-binary-localedata-.* \
36 ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.*"
37
38# Create a eglibc-binaries package
39ALLOW_EMPTY_${BPN}-binaries = "1"
40PACKAGES += "${BPN}-binaries"
41RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-binary") != -1])}"
42
43# Create a eglibc-charmaps package
44ALLOW_EMPTY_${BPN}-charmaps = "1"
45PACKAGES += "${BPN}-charmaps"
46RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-charmap") != -1])}"
47
48# Create a eglibc-gconvs package
49ALLOW_EMPTY_${BPN}-gconvs = "1"
50PACKAGES += "${BPN}-gconvs"
51RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-gconv") != -1])}"
52
53# Create a eglibc-localedatas package
54ALLOW_EMPTY_${BPN}-localedatas = "1"
55PACKAGES += "${BPN}-localedatas"
56RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-localedata") != -1])}"
57
58DESCRIPTION_localedef = "eglibc: compile locale definition files"
59
60# eglibc-gconv is dynamically added into PACKAGES, thus
61# FILES_eglibc-gconv will not be automatically extended in multilib.
62# Explicitly add ${MLPREFIX} for FILES_eglibc-gconv.
63FILES_${MLPREFIX}eglibc-gconv = "${libdir}/gconv/*"
64FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
65FILES_localedef = "${bindir}/localedef"
66
67LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
68
69do_install () {
70 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} ${D}${localedir}
71 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
72 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
73 fi
74 if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then
75 cp -fpPR ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
76 fi
77 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
78 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
79 fi
80 if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
81 cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
82 fi
83 if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
84 cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
85 fi
86 chown root.root -R ${D}
87 cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
88}
89
90inherit libc-package
91
92BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.17.bb b/meta/recipes-core/eglibc/eglibc-locale_2.17.bb
new file mode 100644
index 0000000000..ce6c1d2320
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-locale_2.17.bb
@@ -0,0 +1 @@
require eglibc-locale.inc
diff --git a/meta/recipes-core/eglibc/eglibc-locale_2.18.bb b/meta/recipes-core/eglibc/eglibc-locale_2.18.bb
new file mode 100644
index 0000000000..ce6c1d2320
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-locale_2.18.bb
@@ -0,0 +1 @@
require eglibc-locale.inc
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace.inc b/meta/recipes-core/eglibc/eglibc-mtrace.inc
new file mode 100644
index 0000000000..d68783e439
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-mtrace.inc
@@ -0,0 +1,13 @@
1include eglibc-collateral.inc
2
3SUMMARY = "mtrace utility provided by eglibc"
4DESCRIPTION = "mtrace utility provided by eglibc"
5RDEPENDS_${PN} = "perl"
6RPROVIDES_${PN} = "libc-mtrace"
7
8SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
9
10do_install() {
11 install -d -m 0755 ${D}${bindir}
12 install -m 0755 ${SRC}/mtrace ${D}${bindir}/
13}
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.17.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.17.bb
new file mode 100644
index 0000000000..6fa2be9cc9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-mtrace_2.17.bb
@@ -0,0 +1 @@
require eglibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb b/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb
new file mode 100644
index 0000000000..6fa2be9cc9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-mtrace_2.18.bb
@@ -0,0 +1 @@
require eglibc-mtrace.inc
diff --git a/meta/recipes-core/eglibc/eglibc-options.inc b/meta/recipes-core/eglibc/eglibc-options.inc
new file mode 100644
index 0000000000..c55d05d163
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-options.inc
@@ -0,0 +1,128 @@
1def eglibc_cfg(feature, features, tokens, cnf):
2 if type(tokens) == type(""):
3 tokens = [tokens]
4 if type(features) == type([]) and feature in features:
5 cnf.extend([token + '=y' for token in tokens])
6 else:
7 for token in tokens:
8 cnf.extend([token + '=n'])
9 if token == 'OPTION_EGLIBC_NSSWITCH':
10 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG=\"${S}/nss/nsswitch.conf\""])
11 cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS=\"${S}/nss/fixed-nsswitch.functions\""])
12
13# arrange the dependencies among eglibc configuable options according to file option-groups.def from eglibc source code
14def distro_features_check_deps(distro_features):
15 new_dep = True
16 while new_dep:
17 new_dep = False
18
19 if 'ipv6' in distro_features and 'ipv4' not in distro_features:
20 new_dep = True
21 distro_features.extend(['ipv4'])
22
23 if 'ipv4' in distro_features and 'libc-nsswitch' not in distro_features:
24 new_dep = True
25 distro_features.extend(['libc-nsswitch'])
26
27 if 'libc-cxx-tests' in distro_features:
28 if 'libc-posix-wchar-io' not in distro_features:
29 new_dep = True
30 distro_features.extend(['libc-posix-wchar-io'])
31 if 'libc-libm' not in distro_features:
32 new_dep = True
33 distro_features.extend(['libc-libm'])
34
35 if 'libc-catgets' in distro_features and 'libc-locale-code' not in distro_features:
36 new_dep = True
37 distro_features.extend(['libc-locale-code'])
38
39 if 'libc-crypt-ufc' in distro_features and 'libc-crypt' not in distro_features:
40 new_dep = True
41 distro_features.extend(['libc-crypt'])
42
43 if 'libc-getlogin' in distro_features and 'libc-utmp' not in distro_features:
44 new_dep = True
45 distro_features.extend(['libc-utmp'])
46
47 if 'libc-inet-anl' in distro_features and 'ipv4' not in distro_features:
48 new_dep = True
49 distro_features.extend(['ipv4'])
50
51 if 'libc-locale-code' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
52 new_dep = True
53 distro_features.extend(['libc-posix-clang-wchar'])
54
55 if 'libc-nis' in distro_features:
56 if 'ipv4' not in distro_features:
57 new_dep = True
58 distro_features.extend(['ipv4'])
59 if 'libc-sunrpc' not in distro_features:
60 new_dep = True
61 distro_features.extend(['libc-sunrpc'])
62
63 if 'libc-rcmd' in distro_features and 'ipv4' not in distro_features:
64 new_dep = True
65 distro_features.extend(['ipv4'])
66
67 if 'libc-sunrpc' in distro_features and 'ipv4' not in distro_features:
68 new_dep = True
69 distro_features.extend(['ipv4'])
70
71 if 'libc-utmpx' in distro_features and 'libc-utmp' not in distro_features:
72 new_dep = True
73 distro_features.extend(['libc-utmp'])
74
75 if 'libc-posix-regexp-glibc' in distro_features and 'libc-posix-regexp' not in distro_features:
76 new_dep = True
77 distro_features.extend(['libc-posix-regexp'])
78
79 if 'libc-posix-wchar-io' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
80 new_dep = True
81 distro_features.extend(['libc-posix-clang-wchar'])
82
83# Map distro features to eglibc options settings
84def features_to_eglibc_settings(d):
85 cnf = ([])
86 distro_features = (d.getVar('DISTRO_FEATURES', True) or '').split()
87
88 distro_features_check_deps(distro_features)
89
90 eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
91 eglibc_cfg('libc-backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
92 eglibc_cfg('libc-big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
93 eglibc_cfg('libc-bsd', distro_features, 'OPTION_EGLIBC_BSD', cnf)
94 eglibc_cfg('libc-cxx-tests', distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
95 eglibc_cfg('libc-catgets', distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
96 eglibc_cfg('libc-charsets', distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
97 eglibc_cfg('libc-crypt', distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
98 eglibc_cfg('libc-crypt-ufc', distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
99 eglibc_cfg('libc-db-aliases', distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
100 eglibc_cfg('libc-envz', distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
101 eglibc_cfg('libc-fcvt', distro_features, 'OPTION_EGLIBC_FCVT', cnf)
102 eglibc_cfg('libc-fmtmsg', distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
103 eglibc_cfg('libc-fstab', distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
104 eglibc_cfg('libc-ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
105 eglibc_cfg('libc-getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
106 eglibc_cfg('libc-idn', distro_features, 'OPTION_EGLIBC_IDN', cnf)
107 eglibc_cfg('ipv4', distro_features, 'OPTION_EGLIBC_INET', cnf)
108 eglibc_cfg('libc-inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
109 eglibc_cfg('libc-libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf)
110 eglibc_cfg('libc-locales', distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
111 eglibc_cfg('libc-locale-code', distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
112 eglibc_cfg('libc-memusage', distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
113 eglibc_cfg('libc-nis', distro_features, 'OPTION_EGLIBC_NIS', cnf)
114 eglibc_cfg('libc-nsswitch', distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
115 eglibc_cfg('libc-rcmd', distro_features, 'OPTION_EGLIBC_RCMD', cnf)
116 eglibc_cfg('libc-rtld-debug', distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
117 eglibc_cfg('libc-spawn', distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
118 eglibc_cfg('libc-streams', distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
119 eglibc_cfg('libc-sunrpc', distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
120 eglibc_cfg('libc-utmp', distro_features, 'OPTION_EGLIBC_UTMP', cnf)
121 eglibc_cfg('libc-utmpx', distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
122 eglibc_cfg('libc-wordexp', distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
123 eglibc_cfg('libc-posix-clang-wchar', distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
124 eglibc_cfg('libc-posix-regexp', distro_features, 'OPTION_POSIX_REGEXP', cnf)
125 eglibc_cfg('libc-posix-regexp-glibc', distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
126 eglibc_cfg('libc-posix-wchar-io', distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
127
128 return "\n".join(cnf)
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
new file mode 100644
index 0000000000..3adf1a9ef9
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -0,0 +1,155 @@
1#
2# For now, we will skip building of a gcc package if it is a uclibc one
3# and our build is not a uclibc one, and we skip a eglibc one if our build
4# is a uclibc build.
5#
6# See the note in gcc/gcc_3.4.0.oe
7#
8
9python __anonymous () {
10 import bb, re
11 uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
12 if uc_os:
13 raise bb.parse.SkipPackage("incompatible with target %s" %
14 d.getVar('TARGET_OS', True))
15}
16
17# Set this to zero if you don't want ldconfig in the output package
18USE_LDCONFIG ?= "1"
19
20PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
21
22# The ld.so in this eglibc supports the GNU_HASH
23RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
24RPROVIDES_${PN}-utils = "glibc-utils"
25RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace"
26RPROVIDES_${PN}-pic = "glibc-pic"
27RPROVIDES_${PN}-dev = "glibc-dev libc6-dev virtual-libc-dev"
28RPROVIDES_${PN}-staticdev = "glibc-staticdev"
29RPROVIDES_${PN}-doc = "glibc-doc"
30RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
31RPROVIDES_eglibc-thread-db = "glibc-thread-db"
32RPROVIDES_${PN}-pcprofile = "glibc-pcprofile"
33RPROVIDES_${PN}-dbg = "glibc-dbg"
34libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
35
36FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
37FILES_ldd = "${bindir}/ldd"
38FILES_libsegfault = "${base_libdir}/libSegFault*"
39FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
40FILES_libmemusage = "${base_libdir}/libmemusage.so"
41FILES_eglibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
42FILES_sln = "/sbin/sln"
43FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o"
44FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
45FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
46FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
47FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
48FILES_nscd = "${sbindir}/nscd*"
49FILES_${PN}-mtrace = "${bindir}/mtrace"
50FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
51FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
52FILES_catchsegv = "${bindir}/catchsegv"
53RDEPENDS_catchsegv = "libsegfault"
54FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
55FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
56RPROVIDES_${PN}-dev += "libc-dev"
57RPROVIDES_${PN}-staticdev += "libc-staticdev"
58
59SUMMARY_sln = "The static ln."
60DESCRIPTION_sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional."
61SUMMARY_nscd = "Name service cache daemon"
62DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services."
63SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
64DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
65SUMMARY_ldd = "print shared library dependencies"
66DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line."
67SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc"
68DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
69DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
70
71inherit libc-common multilib_header
72
73do_install_append () {
74 rm -f ${D}${sysconfdir}/localtime
75 rm -rf ${D}${localstatedir}
76
77 # remove empty eglibc dir
78 if [ -d ${D}${libdir}/eglibc -a ! -e ${D}${libdir}/eglibc/pt_chown ]; then
79 rmdir ${D}${libdir}/eglibc
80 fi
81 oe_multilib_header bits/syscall.h
82
83 if [ -f ${D}${bindir}/mtrace ]; then
84 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
85 fi
86 rm -rf ${D}${includedir}/rpcsvc/rquota*
87 # Info dir listing isn't interesting at this point so remove it if it exists.
88 if [ -e "${D}${infodir}/dir" ]; then
89 rm -f ${D}${infodir}/dir
90 fi
91
92 if [ "${USE_LDCONFIG}" != "1" ]; then
93 # We won't ship this file (see FILES above) so let's not install it
94 rm -f ${D}${sysconfdir}/ld.so.conf
95 # This directory will be empty now so remove it too.
96 # But check whether it exists first, since it won't for eglibc-initial.
97 if [ -d ${D}${sysconfdir} ]; then
98 rmdir ${D}${sysconfdir}
99 fi
100 fi
101}
102
103do_install_locale () {
104 dest=${D}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
105 install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
106 if [ "${base_libdir}" != "${libdir}" ]; then
107 cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
108 fi
109 if [ -e ${D}${bindir}/localedef ]; then
110 mv -f ${D}${bindir}/localedef ${dest}${bindir}
111 fi
112 if [ -e ${D}${libdir}/gconv ]; then
113 mv -f ${D}${libdir}/gconv ${dest}${libdir}
114 fi
115 if [ -e ${D}${exec_prefix}/lib ]; then
116 cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
117 fi
118 if [ -e ${D}${datadir}/i18n ]; then
119 mv ${D}${datadir}/i18n ${dest}${datadir}
120 fi
121 cp -fpPR ${D}${datadir}/* ${dest}${datadir}
122 rm -rf ${D}${datadir}/locale/
123 cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
124}
125
126addtask do_install_locale after do_install before do_populate_sysroot do_package
127
128bashscripts = "mtrace sotruss xtrace"
129
130do_evacuate_scripts () {
131 target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
132 mkdir -p $target
133 for i in ${bashscripts}; do
134 if [ -f ${D}${bindir}/$i ]; then
135 cp ${D}${bindir}/$i $target/
136 fi
137 done
138}
139
140addtask evacuate_scripts after do_install before do_populate_sysroot do_package
141
142PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
143
144eglibc_package_preprocess () {
145 rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
146 rm -rf ${PKGD}/${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}
147 for i in ${bashscripts}; do
148 rm -f ${PKGD}${bindir}/$i
149 done
150 rm -rf ${PKGD}/${localedir}
151 if [ "${libdir}" != "${exec_prefix}/lib" ]; then
152 # This dir only exists to hold locales
153 rm -rf ${PKGD}${exec_prefix}/lib
154 fi
155}
diff --git a/meta/recipes-core/eglibc/eglibc-scripts.inc b/meta/recipes-core/eglibc/eglibc-scripts.inc
new file mode 100644
index 0000000000..9ca6673404
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-scripts.inc
@@ -0,0 +1,16 @@
1include eglibc-collateral.inc
2
3SUMMARY = "utility scripts provided by eglibc"
4DESCRIPTION = "utility scripts provided by eglibc"
5RDEPENDS_${PN} = "bash eglibc-mtrace"
6
7SRC = "${STAGING_INCDIR}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
8
9bashscripts = "sotruss xtrace"
10
11do_install() {
12 install -d -m 0755 ${D}${bindir}
13 for i in ${bashscripts}; do
14 install -m 0755 ${SRC}/$i ${D}${bindir}/
15 done
16}
diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.17.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.17.bb
new file mode 100644
index 0000000000..31133621d1
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-scripts_2.17.bb
@@ -0,0 +1 @@
require eglibc-scripts.inc
diff --git a/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb b/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb
new file mode 100644
index 0000000000..31133621d1
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-scripts_2.18.bb
@@ -0,0 +1 @@
require eglibc-scripts.inc
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/eglibc/eglibc-testing.inc
new file mode 100644
index 0000000000..ab3ec1555f
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-testing.inc
@@ -0,0 +1,79 @@
1do_compile_append () {
2 # now generate script to drive testing
3 echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testeglibc
4 set >> ${B}/${HOST_PREFIX}testeglibc
5 # prune out the unneeded vars
6 sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testeglibc
7 sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testeglibc
8 sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testeglibc
9 sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testeglibc
10 sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testeglibc
11 sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testeglibc
12 sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testeglibc
13 sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testeglibc
14 sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testeglibc
15 sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testeglibc
16 sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testeglibc
17 sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testeglibc
18 sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testeglibc
19 sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testeglibc
20 sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testeglibc
21 sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testeglibc
22 sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testeglibc
23 sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testeglibc
24 sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testeglibc
25 sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testeglibc
26 sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testeglibc
27 sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testeglibc
28 sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testeglibc
29 sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testeglibc
30 sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testeglibc
31 sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testeglibc
32 sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
33 sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
34 sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
35
36 # point to real sysroot not the toolchain bootstrap sysroot
37 sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc
38
39 # use the final cross-gcc to test since some tests need libstdc++
40 sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc
41
42 # append execution part script
43cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
44target="\$1"
45if [ "x\$target" = "x" ]
46then
47 echo "Please specify the target machine and remote user in form of user@target"
48 exit 1;
49fi
50ssh \$target ls \$PWD\ 2>&1 > /dev/null
51if [ "x\$?" != "x0" ]
52then
53 echo "Failed connecting to \$target it could be because of:"
54 echo "1. You dont have passwordless ssh setup to access \$target"
55 echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
56 echo " The tree should be accessible at same location on build host and target"
57 echo " You can add nfs-server to IMAGE_FEATURES to get the nfs client on target"
58 echo "3. nfs server on build host is not running."
59 echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
60 echo " to test as root user on target (usually its recommended to create a non"
61 echo " root user."
62 echo " As a sanity check make sure that target can read/write to the eglibc build tree"
63 echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
64 exit 1
65fi
66 echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
67 echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
68
69 fgrep tcbootstrap ${B}/config.make > ${B}/configparms
70 sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
71wrapper="${S}/scripts/cross-test-ssh.sh \$target"
72localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
73make tests-clean
74make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
75rm -rf ${B}/configparms
76STOP
77
78 chmod +x ${B}/${HOST_PREFIX}testeglibc
79}
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
new file mode 100644
index 0000000000..375b9bc116
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -0,0 +1,84 @@
1require eglibc-common.inc
2require eglibc-ld.inc
3require eglibc-testing.inc
4
5STAGINGCC = "gcc-cross-initial"
6STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
7PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
8
9TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
10
11# eglibc can't be built without optimization, if someone tries to compile an
12# entire image as -O0, we override it with -O2 here and give a note about it.
13def get_optimization(d):
14 selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
15 if base_contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
16 bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
17 return selected_optimization.replace("-O0", "-O2")
18 return selected_optimization
19
20SELECTED_OPTIMIZATION := "${@get_optimization(d)}"
21
22# siteconfig.bbclass runs configure which needs a working compiler
23# For the compiler to work we need a working libc yet libc isn't
24# in the sysroots directory at this point. This means the libc.so
25# linker script won't work as the --sysroot setting isn't correct.
26# Here we create a hacked up libc linker script and pass in the right
27# flags to let configure work. Ugly.
28EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
29siteconfig_do_siteconfig_gencache_prepend = " \
30 mkdir -p ${WORKDIR}/site_config_libc; \
31 cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
32 sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
33"
34
35# nptl needs unwind support in gcc, which can't be built without glibc.
36DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
37# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
38#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
39PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
40PROVIDES += "virtual/libintl virtual/libiconv"
41inherit autotools
42require eglibc-options.inc
43
44LEAD_SONAME = "libc.so"
45
46CACHED_CONFIGUREVARS += "ac_cv_path_KSH=${base_bindir}/bash \
47 ac_cv_path_BASH_SHELL=${base_bindir}/bash \
48 libc_cv_localedir=${localedir} \
49 libc_cv_ssp=no \
50 "
51
52GLIBC_EXTRA_OECONF ?= ""
53GLIBC_EXTRA_OECONF_class-nativesdk = ""
54INHIBIT_DEFAULT_DEPS = "1"
55
56ARM_INSTRUCTION_SET = "arm"
57
58# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
59# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
60EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
61EXTRA_OEMAKE[vardepsexclude] += "EGLIBCPARALLELISM"
62EXTRA_OEMAKE += "${EGLIBCPARALLELISM}"
63PARALLEL_MAKE = ""
64
65# eglibc make-syscalls.sh has a number of issues with /bin/dash and
66# it's output which make calls via the SHELL also has issues, so
67# ensure make uses /bin/bash
68EXTRA_OEMAKE += "SHELL=/bin/bash"
69
70OE_FEATURES = "${@features_to_eglibc_settings(d)}"
71do_configure_prepend() {
72 sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
73 echo '${OE_FEATURES}' > ${B}/option-groups.config
74}
75
76do_configure_append() {
77 oe_runmake config
78
79 # Remove quotation marks from OPTION_EGLIBC_NSSWITCH_FIXED_*. This will
80 # avoid install error.
81 sed -i 's/^OPTION_EGLIBC_NSSWITCH_FIXED_\(.*\)="\(.*\)"$/OPTION_EGLIBC_NSSWITCH_FIXED_\1=\2/' option-groups.config
82}
83
84GLIBC_ADDONS ?= "ports,nptl,libidn"
diff --git a/meta/recipes-core/eglibc/eglibc_2.17.bb b/meta/recipes-core/eglibc/eglibc_2.17.bb
new file mode 100644
index 0000000000..22129e6bc3
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc_2.17.bb
@@ -0,0 +1,155 @@
1require eglibc.inc
2
3PR = "r3"
4
5DEPENDS += "gperf-native kconfig-frontends-native"
6
7SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr22064.tar.bz2 \
8 file://eglibc-svn-arm-lowlevellock-include-tls.patch \
9 file://IO-acquire-lock-fix.patch \
10 file://mips-rld-map-check.patch \
11 file://etc/ld.so.conf \
12 file://generate-supported.mk \
13 file://glibc.fix_sqrt2.patch \
14 file://multilib_readlib.patch \
15 file://ppc-sqrt_finite.patch \
16 file://GLRO_dl_debug_mask.patch \
17 file://initgroups_keys.patch \
18 file://eglibc_fix_findidx_parameters.patch \
19 file://ppc_slow_ieee754_sqrt.patch \
20 file://fileops-without-wchar-io.patch \
21 file://add_resource_h_to_wait_h.patch \
22 file://0001-eglibc-menuconfig-support.patch \
23 file://0002-eglibc-menuconfig-hex-string-options.patch \
24 file://0003-eglibc-menuconfig-build-instructions.patch \
25 file://fsl-ppc-no-fsqrt.patch \
26 file://0001-R_ARM_TLS_DTPOFF32.patch \
27 file://tzselect-sh.patch \
28 file://tzselect-awk.patch \
29 file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
30 file://fix-tibetian-locales.patch \
31 ${BACKPORTS} \
32 "
33BACKPORTS = "\
34 file://eglibc-2.17/eglibc-2.17-r22178.patch \
35 file://eglibc-2.17/eglibc-2.17-PR15003-r22243.patch \
36 "
37
38SRC_URI[md5sum] = "1464af54779c2c7d1078df9ce2e41791"
39SRC_URI[sha256sum] = "97c3991a3772f513cf704841d20c275ac48895fad2e27802dda557c0196cba6b"
40
41LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
42 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
43 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
44 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
45
46SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
47 file://relocatable_sdk.patch \
48 file://relocatable_sdk_fix_openpath.patch \
49 "
50S = "${WORKDIR}/eglibc-${PV}/libc"
51B = "${WORKDIR}/build-${TARGET_SYS}"
52
53PACKAGES_DYNAMIC = ""
54
55# the -isystem in bitbake.conf screws up glibc do_stage
56BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
57TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
58
59GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
60
61FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
62
63#
64# For now, we will skip building of a gcc package if it is a uclibc one
65# and our build is not a uclibc one, and we skip a glibc one if our build
66# is a uclibc build.
67#
68# See the note in gcc/gcc_3.4.0.oe
69#
70
71python __anonymous () {
72 import re
73 uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None)
74 if uc_os:
75 raise bb.parse.SkipPackage("incompatible with target %s" %
76 d.getVar('TARGET_OS', True))
77}
78
79export libc_cv_slibdir = "${base_libdir}"
80
81EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
82 --without-cvs --disable-profile \
83 --disable-debug --without-gd \
84 --enable-clocale=gnu \
85 --enable-add-ons \
86 --with-headers=${STAGING_INCDIR} \
87 --without-selinux \
88 --enable-obsolete-rpc \
89 --with-kconfig=${STAGING_BINDIR_NATIVE} \
90 ${GLIBC_EXTRA_OECONF}"
91
92EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
93
94do_patch_append() {
95 bb.build.exec_func('do_fix_readlib_c', d)
96}
97
98# for mips eglibc now builds syscall tables for all abi's
99# so we make sure that we choose right march option which is
100# compatible with o32,n32 and n64 abi's
101# e.g. -march=mips32 is not compatible with n32 and n64 therefore
102# we filter it out in such case -march=from-abi which will be
103# mips1 when using o32 and mips3 when using n32/n64
104
105TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
106TUNE_CCARGS_mipsel := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
107
108do_fix_readlib_c () {
109 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
110}
111
112do_configure () {
113# override this function to avoid the autoconf/automake/aclocal/autoheader
114# calls for now
115# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
116# version check and doesn't really help with anything
117 if [ -z "`which rpcgen`" ]; then
118 echo "rpcgen not found. Install glibc-devel."
119 exit 1
120 fi
121 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
122 find ${S} -name "configure" | xargs touch
123 CPPFLAGS="" oe_runconf
124}
125
126rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
127 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
128 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
129
130do_compile () {
131 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
132 unset LDFLAGS
133 base_do_compile
134 (
135 cd ${S}/sunrpc/rpcsvc
136 for r in ${rpcsvc}; do
137 h=`echo $r|sed -e's,\.x$,.h,'`
138 rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
139 done
140 )
141 echo "Adjust ldd script"
142 if [ -n "${RTLDLIST}" ]
143 then
144 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
145 if [ "${prevrtld}" != "${RTLDLIST}" ]
146 then
147 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
148 fi
149 fi
150
151}
152
153require eglibc-package.inc
154
155BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/eglibc_2.18.bb b/meta/recipes-core/eglibc/eglibc_2.18.bb
new file mode 100644
index 0000000000..710b498a4d
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc_2.18.bb
@@ -0,0 +1,148 @@
1require eglibc.inc
2
3DEPENDS += "gperf-native kconfig-frontends-native"
4
5SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr23787.tar.bz2 \
6 file://eglibc-svn-arm-lowlevellock-include-tls.patch \
7 file://IO-acquire-lock-fix.patch \
8 file://mips-rld-map-check.patch \
9 file://etc/ld.so.conf \
10 file://generate-supported.mk \
11 file://glibc.fix_sqrt2.patch \
12 file://multilib_readlib.patch \
13 file://ppc-sqrt_finite.patch \
14 file://GLRO_dl_debug_mask.patch \
15 file://initgroups_keys.patch \
16 file://eglibc_fix_findidx_parameters.patch \
17 file://ppc_slow_ieee754_sqrt.patch \
18 file://fileops-without-wchar-io.patch \
19 file://add_resource_h_to_wait_h.patch \
20 file://0001-eglibc-menuconfig-support.patch \
21 file://0002-eglibc-menuconfig-hex-string-options.patch \
22 file://0003-eglibc-menuconfig-build-instructions.patch \
23 file://fsl-ppc-no-fsqrt.patch \
24 file://0001-R_ARM_TLS_DTPOFF32.patch \
25 file://tzselect-sh.patch \
26 file://tzselect-awk.patch \
27 file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
28 file://fix-tibetian-locales.patch \
29 file://0001-ARM-Pass-dl_hwcap-to-IFUNC-resolver.patch \
30 "
31SRC_URI[md5sum] = "b395b021422a027d89884992e91734fc"
32SRC_URI[sha256sum] = "15f564b45dc5dd65faf0875579e3447961ae61e876933384ae05d19328539ad4"
33
34LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
35 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
36 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
37 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
38
39SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
40 file://relocatable_sdk.patch \
41 file://relocatable_sdk_fix_openpath.patch \
42 "
43S = "${WORKDIR}/eglibc-${PV}/libc"
44B = "${WORKDIR}/build-${TARGET_SYS}"
45
46PACKAGES_DYNAMIC = ""
47
48# the -isystem in bitbake.conf screws up glibc do_stage
49BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
50TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
51
52GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
53
54FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
55
56#
57# For now, we will skip building of a gcc package if it is a uclibc one
58# and our build is not a uclibc one, and we skip a glibc one if our build
59# is a uclibc build.
60#
61# See the note in gcc/gcc_3.4.0.oe
62#
63
64python __anonymous () {
65 import re
66 uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None)
67 if uc_os:
68 raise bb.parse.SkipPackage("incompatible with target %s" %
69 d.getVar('TARGET_OS', True))
70}
71
72export libc_cv_slibdir = "${base_libdir}"
73
74EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
75 --without-cvs --disable-profile \
76 --disable-debug --without-gd \
77 --enable-clocale=gnu \
78 --enable-add-ons \
79 --with-headers=${STAGING_INCDIR} \
80 --without-selinux \
81 --enable-obsolete-rpc \
82 --with-kconfig=${STAGING_BINDIR_NATIVE} \
83 ${GLIBC_EXTRA_OECONF}"
84
85EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
86
87do_patch_append() {
88 bb.build.exec_func('do_fix_readlib_c', d)
89}
90
91# for mips eglibc now builds syscall tables for all abi's
92# so we make sure that we choose right march option which is
93# compatible with o32,n32 and n64 abi's
94# e.g. -march=mips32 is not compatible with n32 and n64 therefore
95# we filter it out in such case -march=from-abi which will be
96# mips1 when using o32 and mips3 when using n32/n64
97
98TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
99TUNE_CCARGS_mipsel := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
100
101do_fix_readlib_c () {
102 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
103}
104
105do_configure () {
106# override this function to avoid the autoconf/automake/aclocal/autoheader
107# calls for now
108# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
109# version check and doesn't really help with anything
110 if [ -z "`which rpcgen`" ]; then
111 echo "rpcgen not found. Install glibc-devel."
112 exit 1
113 fi
114 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
115 find ${S} -name "configure" | xargs touch
116 CPPFLAGS="" oe_runconf
117}
118
119rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
120 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
121 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
122
123do_compile () {
124 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
125 unset LDFLAGS
126 base_do_compile
127 (
128 cd ${S}/sunrpc/rpcsvc
129 for r in ${rpcsvc}; do
130 h=`echo $r|sed -e's,\.x$,.h,'`
131 rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
132 done
133 )
134 echo "Adjust ldd script"
135 if [ -n "${RTLDLIST}" ]
136 then
137 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
138 if [ "${prevrtld}" != "${RTLDLIST}" ]
139 then
140 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
141 fi
142 fi
143
144}
145
146require eglibc-package.inc
147
148BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch
new file mode 100644
index 0000000000..cdfeaeadd8
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/32and64bit.patch
@@ -0,0 +1,331 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3We run the ldconfig in the cross fashion. make the code bitsize aware so that
4we can cross build ldconfig cache for various architectures.
5
6Richard Purdie <richard.purdie@linuxfoundation.org> 2009/05/19
7Nitin A Kamble <nitin.a.kamble@intel.com> 2009/03/29
8
9Index: ldconfig-native-2.12.1/readelflib.c
10===================================================================
11--- ldconfig-native-2.12.1.orig/readelflib.c
12+++ ldconfig-native-2.12.1/readelflib.c
13@@ -40,39 +40,212 @@ do \
14
15 /* Returns 0 if everything is ok, != 0 in case of error. */
16 int
17-process_elf_file (const char *file_name, const char *lib, int *flag,
18+process_elf_file32 (const char *file_name, const char *lib, int *flag,
19 unsigned int *osversion, char **soname, void *file_contents,
20 size_t file_length)
21 {
22 int i;
23 unsigned int j;
24- ElfW(Addr) loadaddr;
25+ Elf32_Addr loadaddr;
26 unsigned int dynamic_addr;
27 size_t dynamic_size;
28 char *program_interpreter;
29
30- ElfW(Ehdr) *elf_header;
31- ElfW(Phdr) *elf_pheader, *segment;
32- ElfW(Dyn) *dynamic_segment, *dyn_entry;
33+ Elf32_Ehdr *elf_header;
34+ Elf32_Phdr *elf_pheader, *segment;
35+ Elf32_Dyn *dynamic_segment, *dyn_entry;
36 char *dynamic_strings;
37
38- elf_header = (ElfW(Ehdr) *) file_contents;
39+ elf_header = (Elf32_Ehdr *) file_contents;
40 *osversion = 0;
41
42- if (elf_header->e_ident [EI_CLASS] != ElfW (CLASS))
43+ if (elf_header->e_type != ET_DYN)
44 {
45- if (opt_verbose)
46+ error (0, 0, _("%s is not a shared object file (Type: %d).\n"), file_name,
47+ elf_header->e_type);
48+ return 1;
49+ }
50+
51+ /* Get information from elf program header. */
52+ elf_pheader = (Elf32_Phdr *) (elf_header->e_phoff + file_contents);
53+ check_ptr (elf_pheader);
54+
55+ /* The library is an elf library, now search for soname and
56+ libc5/libc6. */
57+ *flag = FLAG_ELF;
58+
59+ loadaddr = -1;
60+ dynamic_addr = 0;
61+ dynamic_size = 0;
62+ program_interpreter = NULL;
63+ for (i = 0, segment = elf_pheader;
64+ i < elf_header->e_phnum; i++, segment++)
65+ {
66+ check_ptr (segment);
67+
68+ switch (segment->p_type)
69 {
70- if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
71- error (0, 0, _("%s is a 32 bit ELF file.\n"), file_name);
72- else if (elf_header->e_ident [EI_CLASS] == ELFCLASS64)
73- error (0, 0, _("%s is a 64 bit ELF file.\n"), file_name);
74- else
75- error (0, 0, _("Unknown ELFCLASS in file %s.\n"), file_name);
76+ case PT_LOAD:
77+ if (loadaddr == (Elf32_Addr) -1)
78+ loadaddr = segment->p_vaddr - segment->p_offset;
79+ break;
80+
81+ case PT_DYNAMIC:
82+ if (dynamic_addr)
83+ error (0, 0, _("more than one dynamic segment\n"));
84+
85+ dynamic_addr = segment->p_offset;
86+ dynamic_size = segment->p_filesz;
87+ break;
88+
89+ case PT_INTERP:
90+ program_interpreter = (char *) (file_contents + segment->p_offset);
91+ check_ptr (program_interpreter);
92+
93+ /* Check if this is enough to classify the binary. */
94+ for (j = 0; j < sizeof (interpreters) / sizeof (interpreters [0]);
95+ ++j)
96+ if (strcmp (program_interpreter, interpreters[j].soname) == 0)
97+ {
98+ *flag = interpreters[j].flag;
99+ break;
100+ }
101+ break;
102+
103+ case PT_NOTE:
104+ if (!*osversion && segment->p_filesz >= 32 && segment->p_align >= 4)
105+ {
106+ Elf32_Word *abi_note = (Elf32_Word *) (file_contents
107+ + segment->p_offset);
108+ Elf32_Addr size = segment->p_filesz;
109+
110+ while (abi_note [0] != 4 || abi_note [1] != 16
111+ || abi_note [2] != 1
112+ || memcmp (abi_note + 3, "GNU", 4) != 0)
113+ {
114+#define ROUND(len) (((len) + sizeof (Elf32_Word)) - 1) & -sizeof (Elf32_Word)))
115+ Elf32_Addr) note_size = 3 * sizeof (Elf32_Word))
116+ + ROUND (abi_note[0])
117+ + ROUND (abi_note[1]);
118+
119+ if (size - 32 < note_size || note_size == 0)
120+ {
121+ size = 0;
122+ break;
123+ }
124+ size -= note_size;
125+ abi_note = (void *) abi_note + note_size;
126+ }
127+
128+ if (size == 0)
129+ break;
130+
131+ *osversion = (abi_note [4] << 24) |
132+ ((abi_note [5] & 0xff) << 16) |
133+ ((abi_note [6] & 0xff) << 8) |
134+ (abi_note [7] & 0xff);
135+ }
136+ break;
137+
138+ default:
139+ break;
140+ }
141+
142+ }
143+ if (loadaddr == (Elf32_Addr) -1)
144+ {
145+ /* Very strange. */
146+ loadaddr = 0;
147+ }
148+
149+ /* Now we can read the dynamic sections. */
150+ if (dynamic_size == 0)
151+ return 1;
152+
153+ dynamic_segment = (Elf32_Dyn *) (file_contents + dynamic_addr);
154+ check_ptr (dynamic_segment);
155+
156+ /* Find the string table. */
157+ dynamic_strings = NULL;
158+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
159+ ++dyn_entry)
160+ {
161+ check_ptr (dyn_entry);
162+ if (dyn_entry->d_tag == DT_STRTAB)
163+ {
164+ dynamic_strings = (char *) (file_contents + dyn_entry->d_un.d_val - loadaddr);
165+ check_ptr (dynamic_strings);
166+ break;
167 }
168- return 1;
169 }
170
171+ if (dynamic_strings == NULL)
172+ return 1;
173+
174+ /* Now read the DT_NEEDED and DT_SONAME entries. */
175+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
176+ ++dyn_entry)
177+ {
178+ if (dyn_entry->d_tag == DT_NEEDED || dyn_entry->d_tag == DT_SONAME)
179+ {
180+ char *name = dynamic_strings + dyn_entry->d_un.d_val;
181+ check_ptr (name);
182+
183+ if (dyn_entry->d_tag == DT_NEEDED)
184+ {
185+
186+ if (*flag == FLAG_ELF)
187+ {
188+ /* Check if this is enough to classify the binary. */
189+ for (j = 0;
190+ j < sizeof (known_libs) / sizeof (known_libs [0]);
191+ ++j)
192+ if (strcmp (name, known_libs [j].soname) == 0)
193+ {
194+ *flag = known_libs [j].flag;
195+ break;
196+ }
197+ }
198+ }
199+
200+ else if (dyn_entry->d_tag == DT_SONAME)
201+ *soname = xstrdup (name);
202+
203+ /* Do we have everything we need? */
204+ if (*soname && *flag != FLAG_ELF)
205+ return 0;
206+ }
207+ }
208+
209+ /* We reach this point only if the file doesn't contain a DT_SONAME
210+ or if we can't classify the library. If it doesn't have a
211+ soname, return the name of the library. */
212+ if (*soname == NULL)
213+ *soname = xstrdup (lib);
214+
215+ return 0;
216+}
217+
218+int
219+process_elf_file64 (const char *file_name, const char *lib, int *flag,
220+ unsigned int *osversion, char **soname, void *file_contents,
221+ size_t file_length)
222+{
223+ int i;
224+ unsigned int j;
225+ Elf64_Addr loadaddr;
226+ unsigned int dynamic_addr;
227+ size_t dynamic_size;
228+ char *program_interpreter;
229+
230+ Elf64_Ehdr *elf_header;
231+ Elf64_Phdr *elf_pheader, *segment;
232+ Elf64_Dyn *dynamic_segment, *dyn_entry;
233+ char *dynamic_strings;
234+
235+ elf_header = (Elf64_Ehdr *) file_contents;
236+ *osversion = 0;
237+
238 if (elf_header->e_type != ET_DYN)
239 {
240 error (0, 0, _("%s is not a shared object file (Type: %d).\n"), file_name,
241@@ -81,7 +254,7 @@ process_elf_file (const char *file_name,
242 }
243
244 /* Get information from elf program header. */
245- elf_pheader = (ElfW(Phdr) *) (elf_header->e_phoff + file_contents);
246+ elf_pheader = (Elf64_Phdr *) (elf_header->e_phoff + file_contents);
247 check_ptr (elf_pheader);
248
249 /* The library is an elf library, now search for soname and
250@@ -100,7 +273,7 @@ process_elf_file (const char *file_name,
251 switch (segment->p_type)
252 {
253 case PT_LOAD:
254- if (loadaddr == (ElfW(Addr)) -1)
255+ if (loadaddr == (Elf64_Addr) -1)
256 loadaddr = segment->p_vaddr - segment->p_offset;
257 break;
258
259@@ -129,16 +302,16 @@ process_elf_file (const char *file_name,
260 case PT_NOTE:
261 if (!*osversion && segment->p_filesz >= 32 && segment->p_align >= 4)
262 {
263- ElfW(Word) *abi_note = (ElfW(Word) *) (file_contents
264+ Elf64_Word *abi_note = (Elf64_Word *) (file_contents
265 + segment->p_offset);
266- ElfW(Addr) size = segment->p_filesz;
267+ Elf64_Addr size = segment->p_filesz;
268
269 while (abi_note [0] != 4 || abi_note [1] != 16
270 || abi_note [2] != 1
271 || memcmp (abi_note + 3, "GNU", 4) != 0)
272 {
273-#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
274- ElfW(Addr) note_size = 3 * sizeof (ElfW(Word))
275+#define ROUND(len) (((len) + sizeof (Elf64_Word) - 1) & -sizeof (Elf64_Word))
276+ Elf64_Addr note_size = 3 * sizeof (Elf64_Word)
277 + ROUND (abi_note[0])
278 + ROUND (abi_note[1]);
279
280@@ -166,7 +339,7 @@ process_elf_file (const char *file_name,
281 }
282
283 }
284- if (loadaddr == (ElfW(Addr)) -1)
285+ if (loadaddr == (Elf64_Addr) -1)
286 {
287 /* Very strange. */
288 loadaddr = 0;
289@@ -176,7 +349,7 @@ process_elf_file (const char *file_name,
290 if (dynamic_size == 0)
291 return 1;
292
293- dynamic_segment = (ElfW(Dyn) *) (file_contents + dynamic_addr);
294+ dynamic_segment = (Elf64_Dyn *) (file_contents + dynamic_addr);
295 check_ptr (dynamic_segment);
296
297 /* Find the string table. */
298@@ -233,3 +406,33 @@ process_elf_file (const char *file_name,
299
300 return 0;
301 }
302+/* Returns 0 if everything is ok, != 0 in case of error. */
303+int
304+process_elf_file (const char *file_name, const char *lib, int *flag,
305+ unsigned int *osversion, char **soname, void *file_contents,
306+ size_t file_length)
307+{
308+ int i;
309+ unsigned int j;
310+ ElfW(Addr) loadaddr;
311+ unsigned int dynamic_addr;
312+ size_t dynamic_size;
313+ char *program_interpreter;
314+
315+ ElfW(Ehdr) *elf_header;
316+ ElfW(Phdr) *elf_pheader, *segment;
317+ ElfW(Dyn) *dynamic_segment, *dyn_entry;
318+ char *dynamic_strings;
319+
320+ elf_header = (ElfW(Ehdr) *) file_contents;
321+ *osversion = 0;
322+
323+ if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
324+ return process_elf_file32(file_name, lib,flag, osversion, soname, file_contents, file_length);
325+ else if (elf_header->e_ident [EI_CLASS] == ELFCLASS64)
326+ return process_elf_file64(file_name, lib,flag, osversion, soname, file_contents, file_length);
327+ error (0, 0, _("Unknown ELFCLASS in file %s.\n"), file_name);
328+ return 1;
329+}
330+
331+
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README
new file mode 100644
index 0000000000..43fb983729
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/README
@@ -0,0 +1,8 @@
1The files are pulled verbatim from glibc 2.5 and then patched to allow
2standalone compilation of ldconfig.
3
4Richard Purdie
5OpenedHand Ltd.
6
7Upgraded the ldconfig recipe to eglibc 2.12.1
8Nitin A Kamble <nitin.a.kamble@intel.com> 2011/03/29
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch
new file mode 100644
index 0000000000..7f8e4db78a
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endian-ness_handling.patch
@@ -0,0 +1,454 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Do data input/output handling according to endien-ness of the library file. That
4enables use of ldconfig in the cross fashion for any architecture.
5
62011/04/04
7Richard Purdie <richard.purdie@linuxfoundation.org>
8Nitin Kamble <nitin.a.kamble@intel.com>
9
10Index: ldconfig-native-2.12.1/readelflib.c
11===================================================================
12--- ldconfig-native-2.12.1.orig/readelflib.c
13+++ ldconfig-native-2.12.1/readelflib.c
14@@ -38,6 +38,28 @@ do \
15 } \
16 while (0);
17
18+int be;
19+static uint16_t read16(uint16_t x, int be)
20+{
21+ if (be)
22+ return be16toh(x);
23+ return le16toh(x);
24+}
25+
26+static uint32_t read32(uint32_t x, int be)
27+{
28+ if (be)
29+ return be32toh(x);
30+ return le32toh(x);
31+}
32+
33+static uint64_t read64(uint64_t x, int be)
34+{
35+ if (be)
36+ return be64toh(x);
37+ return le64toh(x);
38+}
39+
40 /* Returns 0 if everything is ok, != 0 in case of error. */
41 int
42 process_elf_file32 (const char *file_name, const char *lib, int *flag,
43@@ -59,15 +81,17 @@ process_elf_file32 (const char *file_nam
44 elf_header = (Elf32_Ehdr *) file_contents;
45 *osversion = 0;
46
47- if (elf_header->e_type != ET_DYN)
48+ be = (elf_header->e_ident[EI_DATA] == ELFDATA2MSB);
49+
50+ if (read16(elf_header->e_type, be) != ET_DYN)
51 {
52 error (0, 0, _("%s is not a shared object file (Type: %d).\n"), file_name,
53- elf_header->e_type);
54+ read16(elf_header->e_type, be));
55 return 1;
56 }
57
58 /* Get information from elf program header. */
59- elf_pheader = (Elf32_Phdr *) (elf_header->e_phoff + file_contents);
60+ elf_pheader = (Elf32_Phdr *) (read32(elf_header->e_phoff, be) + file_contents);
61 check_ptr (elf_pheader);
62
63 /* The library is an elf library, now search for soname and
64@@ -79,27 +103,27 @@ process_elf_file32 (const char *file_nam
65 dynamic_size = 0;
66 program_interpreter = NULL;
67 for (i = 0, segment = elf_pheader;
68- i < elf_header->e_phnum; i++, segment++)
69+ i < read16(elf_header->e_phnum, be); i++, segment++)
70 {
71 check_ptr (segment);
72
73- switch (segment->p_type)
74+ switch (read32(segment->p_type, be))
75 {
76 case PT_LOAD:
77 if (loadaddr == (Elf32_Addr) -1)
78- loadaddr = segment->p_vaddr - segment->p_offset;
79+ loadaddr = read32(segment->p_vaddr, be) - read32(segment->p_offset, be);
80 break;
81
82 case PT_DYNAMIC:
83 if (dynamic_addr)
84 error (0, 0, _("more than one dynamic segment\n"));
85
86- dynamic_addr = segment->p_offset;
87- dynamic_size = segment->p_filesz;
88+ dynamic_addr = read32(segment->p_offset, be);
89+ dynamic_size = read32(segment->p_filesz, be);
90 break;
91
92 case PT_INTERP:
93- program_interpreter = (char *) (file_contents + segment->p_offset);
94+ program_interpreter = (char *) (file_contents + read32(segment->p_offset, be));
95 check_ptr (program_interpreter);
96
97 /* Check if this is enough to classify the binary. */
98@@ -113,20 +137,20 @@ process_elf_file32 (const char *file_nam
99 break;
100
101 case PT_NOTE:
102- if (!*osversion && segment->p_filesz >= 32 && segment->p_align >= 4)
103+ if (!*osversion && read32(segment->p_filesz, be) >= 32 && segment->p_align >= 4)
104 {
105 Elf32_Word *abi_note = (Elf32_Word *) (file_contents
106- + segment->p_offset);
107- Elf32_Addr size = segment->p_filesz;
108+ + read32(segment->p_offset, be));
109+ Elf32_Addr size = read32(segment->p_filesz, be);
110
111- while (abi_note [0] != 4 || abi_note [1] != 16
112- || abi_note [2] != 1
113+ while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16
114+ || read32(abi_note [2], be) != 1
115 || memcmp (abi_note + 3, "GNU", 4) != 0)
116 {
117-#define ROUND(len) (((len) + sizeof (Elf32_Word)) - 1) & -sizeof (Elf32_Word)))
118- Elf32_Addr) note_size = 3 * sizeof (Elf32_Word))
119- + ROUND (abi_note[0])
120- + ROUND (abi_note[1]);
121+#define ROUND(len) (((len) + sizeof (Elf32_Word) - 1) & -sizeof (Elf32_Word))
122+ Elf32_Addr note_size = 3 * sizeof (Elf32_Word)
123+ + ROUND (read32(abi_note[0], be))
124+ + ROUND (read32(abi_note[1], be));
125
126 if (size - 32 < note_size || note_size == 0)
127 {
128@@ -140,10 +164,10 @@ process_elf_file32 (const char *file_nam
129 if (size == 0)
130 break;
131
132- *osversion = (abi_note [4] << 24) |
133- ((abi_note [5] & 0xff) << 16) |
134- ((abi_note [6] & 0xff) << 8) |
135- (abi_note [7] & 0xff);
136+ *osversion = (read32(abi_note [4], be) << 24) |
137+ ((read32(abi_note [5], be) & 0xff) << 16) |
138+ ((read32(abi_note [6], be) & 0xff) << 8) |
139+ (read32(abi_note [7], be) & 0xff);
140 }
141 break;
142
143@@ -167,13 +191,13 @@ process_elf_file32 (const char *file_nam
144
145 /* Find the string table. */
146 dynamic_strings = NULL;
147- for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
148+ for (dyn_entry = dynamic_segment; read32(dyn_entry->d_tag, be) != DT_NULL;
149 ++dyn_entry)
150 {
151 check_ptr (dyn_entry);
152- if (dyn_entry->d_tag == DT_STRTAB)
153+ if (read32(dyn_entry->d_tag, be) == DT_STRTAB)
154 {
155- dynamic_strings = (char *) (file_contents + dyn_entry->d_un.d_val - loadaddr);
156+ dynamic_strings = (char *) (file_contents + read32(dyn_entry->d_un.d_val, be) - loadaddr);
157 check_ptr (dynamic_strings);
158 break;
159 }
160@@ -183,15 +207,15 @@ process_elf_file32 (const char *file_nam
161 return 1;
162
163 /* Now read the DT_NEEDED and DT_SONAME entries. */
164- for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
165+ for (dyn_entry = dynamic_segment; read32(dyn_entry->d_tag, be) != DT_NULL;
166 ++dyn_entry)
167 {
168- if (dyn_entry->d_tag == DT_NEEDED || dyn_entry->d_tag == DT_SONAME)
169+ if (read32(dyn_entry->d_tag, be) == DT_NEEDED || read32(dyn_entry->d_tag, be) == DT_SONAME)
170 {
171- char *name = dynamic_strings + dyn_entry->d_un.d_val;
172+ char *name = dynamic_strings + read32(dyn_entry->d_un.d_val, be);
173 check_ptr (name);
174
175- if (dyn_entry->d_tag == DT_NEEDED)
176+ if (read32(dyn_entry->d_tag, be) == DT_NEEDED)
177 {
178
179 if (*flag == FLAG_ELF)
180@@ -208,7 +232,7 @@ process_elf_file32 (const char *file_nam
181 }
182 }
183
184- else if (dyn_entry->d_tag == DT_SONAME)
185+ else if (read32(dyn_entry->d_tag, be) == DT_SONAME)
186 *soname = xstrdup (name);
187
188 /* Do we have everything we need? */
189@@ -246,15 +270,17 @@ process_elf_file64 (const char *file_nam
190 elf_header = (Elf64_Ehdr *) file_contents;
191 *osversion = 0;
192
193- if (elf_header->e_type != ET_DYN)
194+ be = (elf_header->e_ident[EI_DATA] == ELFDATA2MSB);
195+
196+ if (read16(elf_header->e_type, be) != ET_DYN)
197 {
198 error (0, 0, _("%s is not a shared object file (Type: %d).\n"), file_name,
199- elf_header->e_type);
200+ read16(elf_header->e_type, be));
201 return 1;
202 }
203
204 /* Get information from elf program header. */
205- elf_pheader = (Elf64_Phdr *) (elf_header->e_phoff + file_contents);
206+ elf_pheader = (Elf64_Phdr *) (read64(elf_header->e_phoff, be) + file_contents);
207 check_ptr (elf_pheader);
208
209 /* The library is an elf library, now search for soname and
210@@ -266,27 +292,27 @@ process_elf_file64 (const char *file_nam
211 dynamic_size = 0;
212 program_interpreter = NULL;
213 for (i = 0, segment = elf_pheader;
214- i < elf_header->e_phnum; i++, segment++)
215+ i < read16(elf_header->e_phnum, be); i++, segment++)
216 {
217 check_ptr (segment);
218
219- switch (segment->p_type)
220+ switch (read32(segment->p_type, be))
221 {
222 case PT_LOAD:
223 if (loadaddr == (Elf64_Addr) -1)
224- loadaddr = segment->p_vaddr - segment->p_offset;
225+ loadaddr = read64(segment->p_vaddr, be) - read64(segment->p_offset, be);
226 break;
227
228 case PT_DYNAMIC:
229 if (dynamic_addr)
230 error (0, 0, _("more than one dynamic segment\n"));
231
232- dynamic_addr = segment->p_offset;
233- dynamic_size = segment->p_filesz;
234+ dynamic_addr = read64(segment->p_offset, be);
235+ dynamic_size = read32(segment->p_filesz, be);
236 break;
237
238 case PT_INTERP:
239- program_interpreter = (char *) (file_contents + segment->p_offset);
240+ program_interpreter = (char *) (file_contents + read64(segment->p_offset, be));
241 check_ptr (program_interpreter);
242
243 /* Check if this is enough to classify the binary. */
244@@ -300,20 +326,21 @@ process_elf_file64 (const char *file_nam
245 break;
246
247 case PT_NOTE:
248- if (!*osversion && segment->p_filesz >= 32 && segment->p_align >= 4)
249+ if (!*osversion && read32(segment->p_filesz, be) >= 32 && read32(segment->p_align, be) >= 4)
250 {
251 Elf64_Word *abi_note = (Elf64_Word *) (file_contents
252- + segment->p_offset);
253- Elf64_Addr size = segment->p_filesz;
254+ + read64(segment->p_offset, be));
255+ Elf64_Addr size = read32(segment->p_filesz, be);
256
257- while (abi_note [0] != 4 || abi_note [1] != 16
258- || abi_note [2] != 1
259+ while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16
260+ || read32(abi_note [2], be) != 1
261 || memcmp (abi_note + 3, "GNU", 4) != 0)
262 {
263+#undef ROUND
264 #define ROUND(len) (((len) + sizeof (Elf64_Word) - 1) & -sizeof (Elf64_Word))
265 Elf64_Addr note_size = 3 * sizeof (Elf64_Word)
266- + ROUND (abi_note[0])
267- + ROUND (abi_note[1]);
268+ + ROUND (read32(abi_note[0], be))
269+ + ROUND (read32(abi_note[1], be));
270
271 if (size - 32 < note_size || note_size == 0)
272 {
273@@ -327,10 +354,10 @@ process_elf_file64 (const char *file_nam
274 if (size == 0)
275 break;
276
277- *osversion = (abi_note [4] << 24) |
278- ((abi_note [5] & 0xff) << 16) |
279- ((abi_note [6] & 0xff) << 8) |
280- (abi_note [7] & 0xff);
281+ *osversion = (read32(abi_note [4], be) << 24) |
282+ ((read32(abi_note [5], be) & 0xff) << 16) |
283+ ((read32(abi_note [6], be) & 0xff) << 8) |
284+ (read32(abi_note [7], be) & 0xff);
285 }
286 break;
287
288@@ -354,13 +381,13 @@ process_elf_file64 (const char *file_nam
289
290 /* Find the string table. */
291 dynamic_strings = NULL;
292- for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
293+ for (dyn_entry = dynamic_segment; read64(dyn_entry->d_tag, be) != DT_NULL;
294 ++dyn_entry)
295 {
296 check_ptr (dyn_entry);
297- if (dyn_entry->d_tag == DT_STRTAB)
298+ if (read64(dyn_entry->d_tag, be) == DT_STRTAB)
299 {
300- dynamic_strings = (char *) (file_contents + dyn_entry->d_un.d_val - loadaddr);
301+ dynamic_strings = (char *) (file_contents + read64(dyn_entry->d_un.d_val, be) - loadaddr);
302 check_ptr (dynamic_strings);
303 break;
304 }
305@@ -370,15 +397,15 @@ process_elf_file64 (const char *file_nam
306 return 1;
307
308 /* Now read the DT_NEEDED and DT_SONAME entries. */
309- for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL;
310+ for (dyn_entry = dynamic_segment; read64(dyn_entry->d_tag, be) != DT_NULL;
311 ++dyn_entry)
312 {
313- if (dyn_entry->d_tag == DT_NEEDED || dyn_entry->d_tag == DT_SONAME)
314+ if (read64(dyn_entry->d_tag, be) == DT_NEEDED || read64(dyn_entry->d_tag, be) == DT_SONAME)
315 {
316- char *name = dynamic_strings + dyn_entry->d_un.d_val;
317+ char *name = dynamic_strings + read64(dyn_entry->d_un.d_val, be);
318 check_ptr (name);
319
320- if (dyn_entry->d_tag == DT_NEEDED)
321+ if (read64(dyn_entry->d_tag, be) == DT_NEEDED)
322 {
323
324 if (*flag == FLAG_ELF)
325@@ -395,7 +422,7 @@ process_elf_file64 (const char *file_nam
326 }
327 }
328
329- else if (dyn_entry->d_tag == DT_SONAME)
330+ else if (read64(dyn_entry->d_tag, be) == DT_SONAME)
331 *soname = xstrdup (name);
332
333 /* Do we have everything we need? */
334Index: ldconfig-native-2.12.1/readlib.c
335===================================================================
336--- ldconfig-native-2.12.1.orig/readlib.c
337+++ ldconfig-native-2.12.1/readlib.c
338@@ -169,7 +169,8 @@ process_file (const char *real_file_name
339 ret = 1;
340 }
341 /* Libraries have to be shared object files. */
342- else if (elf_header->e_type != ET_DYN)
343+ else if ((elf_header->e_ident[EI_DATA] == ELFDATA2MSB && be16toh(elf_header->e_type) != ET_DYN) ||
344+ (elf_header->e_ident[EI_DATA] == ELFDATA2LSB && le16toh(elf_header->e_type) != ET_DYN))
345 ret = 1;
346 else if (process_elf_file (file_name, lib, flag, osversion, soname,
347 file_contents, statbuf.st_size))
348Index: ldconfig-native-2.12.1/cache.c
349===================================================================
350--- ldconfig-native-2.12.1.orig/cache.c
351+++ ldconfig-native-2.12.1/cache.c
352@@ -39,6 +39,29 @@
353 # define N_(msgid) msgid
354 #define _(msg) msg
355
356+extern int be;
357+
358+static uint16_t write16(uint16_t x, int be)
359+{
360+ if (be)
361+ return htobe16(x);
362+ return htole16(x);
363+}
364+
365+static uint32_t write32(uint32_t x, int be)
366+{
367+ if (be)
368+ return htobe32(x);
369+ return htole32(x);
370+}
371+
372+static uint64_t write64(uint64_t x, int be)
373+{
374+ if (be)
375+ return htobe64(x);
376+ return htole64(x);
377+}
378+
379 struct cache_entry
380 {
381 char *lib; /* Library name. */
382@@ -279,7 +302,12 @@ save_cache (const char *cache_name)
383 /* Number of normal cache entries. */
384 int cache_entry_old_count = 0;
385
386- for (entry = entries; entry != NULL; entry = entry->next)
387+ if (be)
388+ printf("saving cache in big endian encoding\n");
389+ else
390+ printf("saving cache in little endian encoding\n");
391+
392+ for (entry = entries; entry != NULL; entry = entry->next)
393 {
394 /* Account the final NULs. */
395 total_strlen += strlen (entry->lib) + strlen (entry->path) + 2;
396@@ -310,7 +338,7 @@ save_cache (const char *cache_name)
397 memset (file_entries, '\0', sizeof (struct cache_file));
398 memcpy (file_entries->magic, CACHEMAGIC, sizeof CACHEMAGIC - 1);
399
400- file_entries->nlibs = cache_entry_old_count;
401+ file_entries->nlibs = write32(cache_entry_old_count, be);
402 }
403
404 struct cache_file_new *file_entries_new = NULL;
405@@ -330,8 +358,8 @@ save_cache (const char *cache_name)
406 memcpy (file_entries_new->version, CACHE_VERSION,
407 sizeof CACHE_VERSION - 1);
408
409- file_entries_new->nlibs = cache_entry_count;
410- file_entries_new->len_strings = total_strlen;
411+ file_entries_new->nlibs = write32(cache_entry_count, be);
412+ file_entries_new->len_strings = write32(total_strlen, be);
413 }
414
415 /* Pad for alignment of cache_file_new. */
416@@ -358,9 +386,9 @@ save_cache (const char *cache_name)
417 /* First the library. */
418 if (opt_format != 2 && entry->hwcap == 0)
419 {
420- file_entries->libs[idx_old].flags = entry->flags;
421+ file_entries->libs[idx_old].flags = write32(entry->flags, be);
422 /* XXX: Actually we can optimize here and remove duplicates. */
423- file_entries->libs[idx_old].key = str_offset + pad;
424+ file_entries->libs[idx_old].key = write32(str_offset + pad, be);
425 }
426 if (opt_format != 0)
427 {
428@@ -368,10 +396,10 @@ save_cache (const char *cache_name)
429 not doing so makes the code easier, the string table
430 always begins at the beginning of the the new cache
431 struct. */
432- file_entries_new->libs[idx_new].flags = entry->flags;
433- file_entries_new->libs[idx_new].osversion = entry->osversion;
434- file_entries_new->libs[idx_new].hwcap = entry->hwcap;
435- file_entries_new->libs[idx_new].key = str_offset;
436+ file_entries_new->libs[idx_new].flags = write32(entry->flags, be);
437+ file_entries_new->libs[idx_new].osversion = write32(entry->osversion, be);
438+ file_entries_new->libs[idx_new].hwcap = write64(entry->hwcap, be);
439+ file_entries_new->libs[idx_new].key = write32(str_offset, be);
440 }
441
442 size_t len = strlen (entry->lib) + 1;
443@@ -379,9 +407,9 @@ save_cache (const char *cache_name)
444 str_offset += len;
445 /* Then the path. */
446 if (opt_format != 2 && entry->hwcap == 0)
447- file_entries->libs[idx_old].value = str_offset + pad;
448+ file_entries->libs[idx_old].value = write32(str_offset + pad, be);
449 if (opt_format != 0)
450- file_entries_new->libs[idx_new].value = str_offset;
451+ file_entries_new->libs[idx_new].value = write32(str_offset, be);
452 len = strlen (entry->path) + 1;
453 str = mempcpy (str, entry->path, len);
454 str_offset += len;
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch
new file mode 100644
index 0000000000..a18b2c20de
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/endianess-header.patch
@@ -0,0 +1,113 @@
1Upstream-Status: Inappropriate [fix poky patch]
2
3This patch fixes build issues with a previous endian-ness_handling.patch on
4distros that don't have macros referenced
5
67/20/2011
7Matthew McClintock <msm@freescale.com>
8
9diff -purN ldconfig-native-2.12.1.orig/endian_extra.h ldconfig-native-2.12.1/endian_extra.h
10--- ldconfig-native-2.12.1.orig/endian_extra.h 1969-12-31 18:00:00.000000000 -0600
11+++ ldconfig-native-2.12.1/endian_extra.h 2011-07-19 18:09:14.323048417 -0500
12@@ -0,0 +1,64 @@
13+/* Copyright (C) 1992, 1996, 1997, 2000, 2008 Free Software Foundation, Inc.
14+ This file is part of the GNU C Library.
15+
16+ The GNU C Library is free software; you can redistribute it and/or
17+ modify it under the terms of the GNU Lesser General Public
18+ License as published by the Free Software Foundation; either
19+ version 2.1 of the License, or (at your option) any later version.
20+
21+ The GNU C Library is distributed in the hope that it will be useful,
22+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24+ Lesser General Public License for more details.
25+
26+ You should have received a copy of the GNU Lesser General Public
27+ License along with the GNU C Library; if not, write to the Free
28+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
29+ 02111-1307 USA. */
30+
31+#include <endian.h>
32+
33+#ifndef _ENDIAN_EXTRA_H
34+#define _ENDIAN_EXTRA_H 1
35+
36+/* Don't redefine these macros if they already exist */
37+#ifndef htobe16
38+#ifdef __USE_BSD
39+/* Conversion interfaces. */
40+# include <byteswap.h>
41+
42+# if __BYTE_ORDER == __LITTLE_ENDIAN
43+# define htobe16(x) __bswap_16 (x)
44+# define htole16(x) (x)
45+# define be16toh(x) __bswap_16 (x)
46+# define le16toh(x) (x)
47+
48+# define htobe32(x) __bswap_32 (x)
49+# define htole32(x) (x)
50+# define be32toh(x) __bswap_32 (x)
51+# define le32toh(x) (x)
52+
53+# define htobe64(x) __bswap_64 (x)
54+# define htole64(x) (x)
55+# define be64toh(x) __bswap_64 (x)
56+# define le64toh(x) (x)
57+# else
58+# define htobe16(x) (x)
59+# define htole16(x) __bswap_16 (x)
60+# define be16toh(x) (x)
61+# define le16toh(x) __bswap_16 (x)
62+
63+# define htobe32(x) (x)
64+# define htole32(x) __bswap_32 (x)
65+# define be32toh(x) (x)
66+# define le32toh(x) __bswap_32 (x)
67+
68+# define htobe64(x) (x)
69+# define htole64(x) __bswap_64 (x)
70+# define be64toh(x) (x)
71+# define le64toh(x) __bswap_64 (x)
72+# endif
73+#endif
74+#endif
75+
76+#endif /* endian_extra.h */
77diff -purN ldconfig-native-2.12.1.orig/cache.c ldconfig-native-2.12.1/cache.c
78--- ldconfig-native-2.12.1.orig/cache.c 2011-07-19 18:21:28.347041301 -0500
79+++ ldconfig-native-2.12.1/cache.c 2011-07-19 18:22:54.118048064 -0500
80@@ -39,6 +39,8 @@
81 # define N_(msgid) msgid
82 #define _(msg) msg
83
84+#include "endian_extra.h"
85+
86 extern int be;
87
88 static uint16_t write16(uint16_t x, int be)
89diff -purN ldconfig-native-2.12.1.orig/readelflib.c ldconfig-native-2.12.1/readelflib.c
90--- ldconfig-native-2.12.1.orig/readelflib.c 2011-07-19 18:21:28.346041593 -0500
91+++ ldconfig-native-2.12.1/readelflib.c 2011-07-19 18:23:05.324059875 -0500
92@@ -25,6 +25,9 @@
93
94 /* check_ptr checks that a pointer is in the mmaped file and doesn't
95 point outside it. */
96+
97+#include "endian_extra.h"
98+
99 #undef check_ptr
100 #define check_ptr(ptr) \
101 do \
102diff -purN ldconfig-native-2.12.1.orig/readlib.c ldconfig-native-2.12.1/readlib.c
103--- ldconfig-native-2.12.1.orig/readlib.c 2011-07-19 18:21:28.346041593 -0500
104+++ ldconfig-native-2.12.1/readlib.c 2011-07-19 18:23:23.877046210 -0500
105@@ -40,6 +40,8 @@
106
107 #include "ldconfig.h"
108
109+#include "endian_extra.h"
110+
111 #define _(msg) msg
112
113 #define Elf32_CLASS ELFCLASS32
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch
new file mode 100644
index 0000000000..4e9aab9416
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/flag_fix.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The native version of ldconfig was using native definition of LD_SO (i.e.
4ld-linux-x86-64.so.2 ) which is not correct for doing the cross ldconfig.
5This was causing libc.so on the target marked as ELF lib rather than
6FLAG_ELF_LIBC6 in the ld.so.cache.
7
8Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/4
9
10Index: ldconfig-native-2.12.1/readlib.c
11===================================================================
12--- ldconfig-native-2.12.1.orig/readlib.c
13+++ ldconfig-native-2.12.1/readlib.c
14@@ -51,6 +51,10 @@ struct known_names
15 int flag;
16 };
17
18+/* don't use host's definition of LD_SO */
19+#undef LD_SO
20+#define LD_SO "ld.so.1"
21+
22 static struct known_names interpreters[] =
23 {
24 { "/lib/" LD_SO, FLAG_ELF_LIBC6 },
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2 b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
new file mode 100644
index 0000000000..dc1e79888e
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig-native-2.12.1.tar.bz2
Binary files differ
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch
new file mode 100644
index 0000000000..52986e61c7
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig.patch
@@ -0,0 +1,471 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3enable standalone building of ldconfig
4
5---
6 cache.c | 11 +-
7 chroot_canon.c | 7 +
8 dl-cache.c | 235 ---------------------------------------------------------
9 dl-cache.h | 3
10 ldconfig.c | 27 ++++--
11 readlib.c | 7 +
12 xstrdup.c | 11 --
13 7 files changed, 45 insertions(+), 256 deletions(-)
14
15Index: ldconfig-native-2.12.1/cache.c
16===================================================================
17--- ldconfig-native-2.12.1.orig/cache.c
18+++ ldconfig-native-2.12.1/cache.c
19@@ -16,6 +16,9 @@
20 along with this program; if not, write to the Free Software Foundation,
21 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22
23+#define _LARGEFILE64_SOURCE
24+#define _GNU_SOURCE
25+
26 #include <errno.h>
27 #include <error.h>
28 #include <dirent.h>
29@@ -31,8 +34,10 @@
30 #include <sys/stat.h>
31 #include <sys/types.h>
32
33-#include <ldconfig.h>
34-#include <dl-cache.h>
35+#include "ldconfig.h"
36+#include "dl-cache.h"
37+# define N_(msgid) msgid
38+#define _(msg) msg
39
40 struct cache_entry
41 {
42Index: ldconfig-native-2.12.1/chroot_canon.c
43===================================================================
44--- ldconfig-native-2.12.1.orig/chroot_canon.c
45+++ ldconfig-native-2.12.1/chroot_canon.c
46@@ -17,6 +17,9 @@
47 along with this program; if not, write to the Free Software Foundation,
48 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
49
50+#define _LARGEFILE64_SOURCE
51+#define _GNU_SOURCE
52+
53 #include <stdlib.h>
54 #include <string.h>
55 #include <unistd.h>
56@@ -27,7 +30,9 @@
57 #include <stddef.h>
58 #include <stdint.h>
59
60-#include <ldconfig.h>
61+#include "ldconfig.h"
62+
63+#define __set_errno(Val) errno = (Val)
64
65 #ifndef PATH_MAX
66 #define PATH_MAX 1024
67Index: ldconfig-native-2.12.1/dl-cache.c
68===================================================================
69--- ldconfig-native-2.12.1.orig/dl-cache.c
70+++ ldconfig-native-2.12.1/dl-cache.c
71@@ -20,12 +20,12 @@
72
73 #include <assert.h>
74 #include <unistd.h>
75-#include <ldsodefs.h>
76+//#include "ldsodefs.h"
77 #include <sys/mman.h>
78 #include <dl-cache.h>
79 #include <dl-procinfo.h>
80
81-#include <stdio-common/_itoa.h>
82+//#include "_itoa.h"
83
84 #ifndef _DL_PLATFORMS_COUNT
85 # define _DL_PLATFORMS_COUNT 0
86@@ -39,103 +39,7 @@ static size_t cachesize;
87 /* 1 if cache_data + PTR points into the cache. */
88 #define _dl_cache_verify_ptr(ptr) (ptr < cache_data_size)
89
90-#define SEARCH_CACHE(cache) \
91-/* We use binary search since the table is sorted in the cache file. \
92- The first matching entry in the table is returned. \
93- It is important to use the same algorithm as used while generating \
94- the cache file. */ \
95-do \
96- { \
97- left = 0; \
98- right = cache->nlibs - 1; \
99- \
100- while (left <= right) \
101- { \
102- __typeof__ (cache->libs[0].key) key; \
103- \
104- middle = (left + right) / 2; \
105- \
106- key = cache->libs[middle].key; \
107- \
108- /* Make sure string table indices are not bogus before using \
109- them. */ \
110- if (! _dl_cache_verify_ptr (key)) \
111- { \
112- cmpres = 1; \
113- break; \
114- } \
115- \
116- /* Actually compare the entry with the key. */ \
117- cmpres = _dl_cache_libcmp (name, cache_data + key); \
118- if (__builtin_expect (cmpres == 0, 0)) \
119- { \
120- /* Found it. LEFT now marks the last entry for which we \
121- know the name is correct. */ \
122- left = middle; \
123- \
124- /* There might be entries with this name before the one we \
125- found. So we have to find the beginning. */ \
126- while (middle > 0) \
127- { \
128- __typeof__ (cache->libs[0].key) key; \
129- \
130- key = cache->libs[middle - 1].key; \
131- /* Make sure string table indices are not bogus before \
132- using them. */ \
133- if (! _dl_cache_verify_ptr (key) \
134- /* Actually compare the entry. */ \
135- || _dl_cache_libcmp (name, cache_data + key) != 0) \
136- break; \
137- --middle; \
138- } \
139- \
140- do \
141- { \
142- int flags; \
143- __typeof__ (cache->libs[0]) *lib = &cache->libs[middle]; \
144- \
145- /* Only perform the name test if necessary. */ \
146- if (middle > left \
147- /* We haven't seen this string so far. Test whether the \
148- index is ok and whether the name matches. Otherwise \
149- we are done. */ \
150- && (! _dl_cache_verify_ptr (lib->key) \
151- || (_dl_cache_libcmp (name, cache_data + lib->key) \
152- != 0))) \
153- break; \
154- \
155- flags = lib->flags; \
156- if (_dl_cache_check_flags (flags) \
157- && _dl_cache_verify_ptr (lib->value)) \
158- { \
159- if (best == NULL || flags == GLRO(dl_correct_cache_id)) \
160- { \
161- HWCAP_CHECK; \
162- best = cache_data + lib->value; \
163- \
164- if (flags == GLRO(dl_correct_cache_id)) \
165- /* We've found an exact match for the shared \
166- object and no general `ELF' release. Stop \
167- searching. */ \
168- break; \
169- } \
170- } \
171- } \
172- while (++middle <= right); \
173- break; \
174- } \
175- \
176- if (cmpres < 0) \
177- left = middle + 1; \
178- else \
179- right = middle - 1; \
180- } \
181- } \
182-while (0)
183-
184-
185 int
186-internal_function
187 _dl_cache_libcmp (const char *p1, const char *p2)
188 {
189 while (*p1 != '\0')
190@@ -172,139 +76,3 @@ _dl_cache_libcmp (const char *p1, const
191 }
192 return *p1 - *p2;
193 }
194-
195-
196-/* Look up NAME in ld.so.cache and return the file name stored there,
197- or null if none is found. */
198-
199-const char *
200-internal_function
201-_dl_load_cache_lookup (const char *name)
202-{
203- int left, right, middle;
204- int cmpres;
205- const char *cache_data;
206- uint32_t cache_data_size;
207- const char *best;
208-
209- /* Print a message if the loading of libs is traced. */
210- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
211- _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
212-
213- if (cache == NULL)
214- {
215- /* Read the contents of the file. */
216- void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize,
217- PROT_READ);
218-
219- /* We can handle three different cache file formats here:
220- - the old libc5/glibc2.0/2.1 format
221- - the old format with the new format in it
222- - only the new format
223- The following checks if the cache contains any of these formats. */
224- if (file != MAP_FAILED && cachesize > sizeof *cache
225- && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0)
226- {
227- size_t offset;
228- /* Looks ok. */
229- cache = file;
230-
231- /* Check for new version. */
232- offset = ALIGN_CACHE (sizeof (struct cache_file)
233- + cache->nlibs * sizeof (struct file_entry));
234-
235- cache_new = (struct cache_file_new *) ((void *) cache + offset);
236- if (cachesize < (offset + sizeof (struct cache_file_new))
237- || memcmp (cache_new->magic, CACHEMAGIC_VERSION_NEW,
238- sizeof CACHEMAGIC_VERSION_NEW - 1) != 0)
239- cache_new = (void *) -1;
240- }
241- else if (file != MAP_FAILED && cachesize > sizeof *cache_new
242- && memcmp (file, CACHEMAGIC_VERSION_NEW,
243- sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
244- {
245- cache_new = file;
246- cache = file;
247- }
248- else
249- {
250- if (file != MAP_FAILED)
251- __munmap (file, cachesize);
252- cache = (void *) -1;
253- }
254-
255- assert (cache != NULL);
256- }
257-
258- if (cache == (void *) -1)
259- /* Previously looked for the cache file and didn't find it. */
260- return NULL;
261-
262- best = NULL;
263-
264- if (cache_new != (void *) -1)
265- {
266- uint64_t platform;
267-
268- /* This is where the strings start. */
269- cache_data = (const char *) cache_new;
270-
271- /* Now we can compute how large the string table is. */
272- cache_data_size = (const char *) cache + cachesize - cache_data;
273-
274- platform = _dl_string_platform (GLRO(dl_platform));
275- if (platform != (uint64_t) -1)
276- platform = 1ULL << platform;
277-
278-#define _DL_HWCAP_TLS_MASK (1LL << 63)
279- uint64_t hwcap_exclude = ~((GLRO(dl_hwcap) & GLRO(dl_hwcap_mask))
280- | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK);
281-
282- /* Only accept hwcap if it's for the right platform. */
283-#define HWCAP_CHECK \
284- if (lib->hwcap & hwcap_exclude) \
285- continue; \
286- if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion)) \
287- continue; \
288- if (_DL_PLATFORMS_COUNT \
289- && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
290- && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \
291- continue
292- SEARCH_CACHE (cache_new);
293- }
294- else
295- {
296- /* This is where the strings start. */
297- cache_data = (const char *) &cache->libs[cache->nlibs];
298-
299- /* Now we can compute how large the string table is. */
300- cache_data_size = (const char *) cache + cachesize - cache_data;
301-
302-#undef HWCAP_CHECK
303-#define HWCAP_CHECK do {} while (0)
304- SEARCH_CACHE (cache);
305- }
306-
307- /* Print our result if wanted. */
308- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)
309- && best != NULL)
310- _dl_debug_printf (" trying file=%s\n", best);
311-
312- return best;
313-}
314-
315-#ifndef MAP_COPY
316-/* If the system does not support MAP_COPY we cannot leave the file open
317- all the time since this would create problems when the file is replaced.
318- Therefore we provide this function to close the file and open it again
319- once needed. */
320-void
321-_dl_unload_cache (void)
322-{
323- if (cache != NULL && cache != (struct cache_file *) -1)
324- {
325- __munmap (cache, cachesize);
326- cache = NULL;
327- }
328-}
329-#endif
330Index: ldconfig-native-2.12.1/dl-cache.h
331===================================================================
332--- ldconfig-native-2.12.1.orig/dl-cache.h
333+++ ldconfig-native-2.12.1/dl-cache.h
334@@ -101,5 +101,4 @@ struct cache_file_new
335 (((addr) + __alignof__ (struct cache_file_new) -1) \
336 & (~(__alignof__ (struct cache_file_new) - 1)))
337
338-extern int _dl_cache_libcmp (const char *p1, const char *p2)
339- internal_function;
340+extern int _dl_cache_libcmp (const char *p1, const char *p2);
341Index: ldconfig-native-2.12.1/ldconfig.c
342===================================================================
343--- ldconfig-native-2.12.1.orig/ldconfig.c
344+++ ldconfig-native-2.12.1/ldconfig.c
345@@ -16,6 +16,9 @@
346 along with this program; if not, write to the Free Software Foundation,
347 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
348
349+#define _LARGEFILE64_SOURCE
350+#define _GNU_SOURCE
351+
352 #define PROCINFO_CLASS static
353 #include <alloca.h>
354 #include <argp.h>
355@@ -39,10 +42,20 @@
356 #include <glob.h>
357 #include <libgen.h>
358
359-#include <ldconfig.h>
360-#include <dl-cache.h>
361+#include "ldconfig.h"
362+#include "dl-cache.h"
363+
364+#include "dl-procinfo.h"
365+
366+#include "argp.h"
367+
368+
369+#define SYSCONFDIR "/etc"
370+#define LIBDIR "/usr/lib"
371+#define SLIBDIR "/lib"
372+# define N_(msgid) msgid
373+#define _(msg) msg
374
375-#include <dl-procinfo.h>
376
377 #ifdef _DL_FIRST_PLATFORM
378 # define _DL_FIRST_EXTRA (_DL_FIRST_PLATFORM + _DL_PLATFORMS_COUNT)
379@@ -55,7 +68,7 @@
380 #endif
381
382 /* Get libc version number. */
383-#include <version.h>
384+#include "version.h"
385
386 #define PACKAGE _libc_intl_domainname
387
388@@ -152,8 +165,8 @@ static const struct argp_option options[
389 { NULL, 0, NULL, 0, NULL, 0 }
390 };
391
392-#define PROCINFO_CLASS static
393-#include <dl-procinfo.c>
394+//#define PROCINFO_CLASS static
395+//#include <dl-procinfo.c>
396
397 /* Short description of program. */
398 static const char doc[] = N_("Configure Dynamic Linker Run Time Bindings.");
399@@ -291,6 +304,7 @@ parse_opt (int key, char *arg, struct ar
400 return 0;
401 }
402
403+#define REPORT_BUGS_TO "mailing list : poky@yoctoproject.org"
404 /* Print bug-reporting information in the help message. */
405 static char *
406 more_help (int key, const char *text, void *input)
407@@ -315,7 +329,7 @@ For bug reporting instructions, please s
408 static void
409 print_version (FILE *stream, struct argp_state *state)
410 {
411- fprintf (stream, "ldconfig %s%s\n", PKGVERSION, VERSION);
412+ fprintf (stream, "ldconfig (Hacked Poky Version)\n");
413 fprintf (stream, gettext ("\
414 Copyright (C) %s Free Software Foundation, Inc.\n\
415 This is free software; see the source for copying conditions. There is NO\n\
416@@ -1233,6 +1247,7 @@ set_hwcap (void)
417 hwcap_mask = strtoul (mask, NULL, 0);
418 }
419
420+const char _libc_intl_domainname[] = "libc";
421
422 int
423 main (int argc, char **argv)
424Index: ldconfig-native-2.12.1/readlib.c
425===================================================================
426--- ldconfig-native-2.12.1.orig/readlib.c
427+++ ldconfig-native-2.12.1/readlib.c
428@@ -22,6 +22,9 @@
429 development version. Besides the simplification, it has also been
430 modified to read some other file formats. */
431
432+#define _LARGEFILE64_SOURCE
433+#define _GNU_SOURCE
434+
435 #include <a.out.h>
436 #include <elf.h>
437 #include <error.h>
438@@ -35,7 +38,9 @@
439 #include <sys/stat.h>
440 #include <gnu/lib-names.h>
441
442-#include <ldconfig.h>
443+#include "ldconfig.h"
444+
445+#define _(msg) msg
446
447 #define Elf32_CLASS ELFCLASS32
448 #define Elf64_CLASS ELFCLASS64
449Index: ldconfig-native-2.12.1/xstrdup.c
450===================================================================
451--- ldconfig-native-2.12.1.orig/xstrdup.c
452+++ ldconfig-native-2.12.1/xstrdup.c
453@@ -16,15 +16,10 @@
454 along with this program; if not, write to the Free Software Foundation,
455 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
456
457-#ifdef HAVE_CONFIG_H
458-# include <config.h>
459-#endif
460+#define _GNU_SOURCE
461+
462+#include <string.h>
463
464-#if defined STDC_HEADERS || defined HAVE_STRING_H || _LIBC
465-# include <string.h>
466-#else
467-# include <strings.h>
468-#endif
469 void *xmalloc (size_t n) __THROW;
470 char *xstrdup (char *string) __THROW;
471
diff --git a/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
new file mode 100644
index 0000000000..27bc411078
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native-2.12.1/ldconfig_aux-cache_path_fix.patch
@@ -0,0 +1,36 @@
1Upstream-Status: Pending
2
3Coming from this bug: http://sourceware.org/bugzilla/show_bug.cgi?id=11149
4
5Nitin A Kamble <nitin.a.kamble@intel.com>2011/03/29
6
7--- ldconfig-native-2.12.1.orig/ldconfig.c
8+++ ldconfig-native-2.12.1/ldconfig.c
9@@ -1359,14 +1359,9 @@ main (int argc, char **argv)
10
11 const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
12 if (opt_chroot)
13- {
14- aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
15- if (aux_cache_file == NULL)
16- error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
17- _PATH_LDCONFIG_AUX_CACHE);
18- }
19+ aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
20
21- if (! opt_ignore_aux_cache)
22+ if (! opt_ignore_aux_cache && aux_cache_file)
23 load_aux_cache (aux_cache_file);
24 else
25 init_aux_cache ();
26@@ -1376,7 +1371,8 @@ main (int argc, char **argv)
27 if (opt_build_cache)
28 {
29 save_cache (cache_file);
30- save_aux_cache (aux_cache_file);
31+ if (aux_cache_file)
32+ save_aux_cache (aux_cache_file);
33 }
34
35 return 0;
36
diff --git a/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb
new file mode 100644
index 0000000000..63ef95b7e7
--- /dev/null
+++ b/meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "A standalone native ldconfig build"
2
3LICENSE = "GPLv2+"
4
5LIC_FILES_CHKSUM = "file://${S}/ldconfig.c;endline=17;md5=1d15f20937c055cb5de2329a4c054399"
6
7SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
8 file://ldconfig.patch \
9 file://ldconfig_aux-cache_path_fix.patch \
10 file://32and64bit.patch \
11 file://endian-ness_handling.patch \
12 file://flag_fix.patch \
13 file://endianess-header.patch"
14
15PR = "r2"
16
17FILESPATH = "${FILE_DIRNAME}/${PN}-${PV}/"
18
19inherit native
20
21S = "${WORKDIR}/${PN}-${PV}"
22
23do_compile () {
24 $CC ldconfig.c -std=gnu99 chroot_canon.c xmalloc.c xstrdup.c cache.c readlib.c -I. dl-cache.c -o ldconfig
25}
26
27do_install () {
28 install -d ${D}/${bindir}/
29 install ldconfig ${D}/${bindir}/
30}
diff --git a/meta/recipes-core/eglibc/site_config/funcs b/meta/recipes-core/eglibc/site_config/funcs
new file mode 100644
index 0000000000..ccc85392d7
--- /dev/null
+++ b/meta/recipes-core/eglibc/site_config/funcs
@@ -0,0 +1,474 @@
1a64l
2abs
3access
4__adjtimex
5alarm
6alphasort
7argz_append
8__argz_count
9argz_create_sep
10argz_insert
11__argz_next
12argz_next
13__argz_stringify
14argz_stringify
15asprintf
16atexit
17atof
18atoi
19bcmp
20bcopy
21bindresvport
22bind_textdomain_codeset
23btowc
24bzero
25calloc
26canonicalize_file_name
27catgets
28cfgetospeed
29cfsetispeed
30cfsetspeed
31chmod
32chown
33chroot
34clock
35close
36closedir
37closelog
38confstr
39connect
40daemon
41dcgettext
42difftime
43dirfd
44dirname
45dngettext
46dup2
47ecvt
48endgrent
49endmntent
50endpwent
51endutent
52endutxent
53epoll_ctl
54err
55ether_hostton
56ether_ntohost
57euidaccess
58execv
59fchdir
60fchmod
61fchmodat
62fchown
63fchownat
64fcntl
65fcvt
66fdatasync
67fdopendir
68feof_unlocked
69fgets_unlocked
70fgetxattr
71finite
72flistxattr
73flock
74flockfile
75fnmatch
76fork
77fpathconf
78__fpending
79fprintf
80free
81freeaddrinfo
82freeifaddrs
83fseeko
84__fsetlocking
85fsetxattr
86fstat64
87fstat
88fstatfs
89fsync
90ftello
91ftime
92ftruncate
93funlockfile
94futimes
95futimesat
96gai_strerror
97gcvt
98getaddrinfo
99getc_unlocked
100getcwd
101getdelim
102getdomainname
103getdtablesize
104getegid
105getenv
106geteuid
107getgid
108getgrent
109getgrent_r
110getgrgid_r
111getgrnam
112getgrnam_r
113getgrouplist
114getgroups
115gethostbyaddr_r
116gethostbyname2
117gethostbyname
118gethostbyname_r
119gethostent
120gethostid
121gethostname
122getifaddrs
123getline
124getloadavg
125getmntent
126getmsg
127getnameinfo
128getnetbyaddr_r
129getnetgrent_r
130getopt
131getopt_long
132getopt_long_only
133getpagesize
134getpass
135getpeername
136getpgrp
137getpid
138getppid
139getprotoent_r
140getpwent
141getpwent_r
142getpwnam
143getpwnam_r
144getpwuid
145getpwuid_r
146getresuid
147getrlimit
148getrusage
149getservbyname
150getservbyname_r
151getservbyport_r
152getservent
153getservent_r
154getspnam
155getspnam_r
156gettimeofday
157getttyent
158getttynam
159getuid
160getusershell
161getutent
162getutid
163getutline
164getutmp
165getutmpx
166getutxent
167getutxid
168getutxline
169getwd
170getxattr
171glob
172gmtime
173gmtime_r
174grantpt
175group_member
176herror
177hstrerror
178iconv
179iconv_open
180if_freenameindex
181if_indextoname
182if_nameindex
183if_nametoindex
184index
185inet_addr
186inet_aton
187inet_ntoa
188inet_ntop
189inet_pton
190initgroups
191innetgr
192iruserok
193isascii
194isatty
195isblank
196isgraph
197isinf
198isnan
199isprint
200isspace
201iswalnum
202iswcntrl
203iswctype
204iswprint
205iswspace
206iswupper
207isxdigit
208kill
209killpg
210lchown
211lckpwdf
212lgetxattr
213link
214listxattr
215llistxattr
216localtime
217localtime_r
218lockf
219lrand48
220lsearch
221lseek64
222lsetxattr
223lstat
224mallinfo
225malloc
226mblen
227mbrlen
228mbrtowc
229mbsinit
230mbsrtowcs
231mbtowc
232memalign
233memchr
234memcmp
235memcpy
236memmove
237mempcpy
238memrchr
239memset
240mkdir
241mkdirat
242mkdtemp
243mkfifo
244mknod
245mkstemp64
246mkstemp
247mktime
248mlock
249mmap
250mtrace
251munlock
252munmap
253nanosleep
254nice
255nl_langinfo
256ntp_adjtime
257ntp_gettime
258_obstack_free
259on_exit
260open64
261open
262openat
263opendir
264openlog
265pathconf
266pipe
267poll
268popen
269posix_memalign
270prctl
271pread
272printf
273__progname
274pselect
275pthread_mutex_lock
276ptsname
277putenv
278putgrent
279putpwent
280putspent
281pututline
282pututxline
283putwc
284pwrite
285qsort
286raise
287rand
288random
289rand_r
290read
291readdir
292readdir_r
293readlink
294realloc
295realpath
296re_comp
297recvmsg
298re_exec
299regcomp
300regexec
301remove
302rename
303re_search
304rmdir
305rpmatch
306rresvport_af
307ruserok
308ruserok_af
309sbrk
310scandir
311sched_setscheduler
312sched_yield
313__secure_getenv
314select
315semctl
316semget
317sendmsg
318setbuf
319setbuffer
320setegid
321setenv
322seteuid
323setgid
324setgroups
325sethostname
326setitimer
327_setjmp
328setjmp
329setlinebuf
330setlocale
331setmntent
332setpgid
333setpgrp
334setpriority
335setregid
336setresgid
337setresuid
338setreuid
339setrlimit
340setsid
341setsockopt
342settimeofday
343setuid
344setutent
345setutxent
346setvbuf
347setxattr
348sgetspent
349shmat
350shmctl
351shmdt
352shmget
353shutdown
354sigaction
355sigaddset
356sigaltstack
357sigblock
358sigemptyset
359sighold
360siginterrupt
361signal
362sigprocmask
363sigset
364sigsetmask
365sigstack
366sigsuspend
367sigvec
368snprintf
369socket
370socketpair
371sprintf
372srand48
373srand
374srandom
375sscanf
376stat
377statfs
378statvfs
379stime
380stpcpy
381strcasecmp
382strcasestr
383strchr
384strchrnul
385strcmp
386strcspn
387strdup
388strerror
389strerror_r
390strftime
391strlen
392strncasecmp
393strncmp
394strndup
395strnlen
396strpbrk
397strptime
398strrchr
399strsep
400strsignal
401strspn
402strstr
403strtod
404strtoimax
405strtok_r
406strtol
407strtoll
408strtoul
409strtoull
410strtoumax
411strverscmp
412strxfrm
413symlink
414sync
415sysconf
416sysctl
417sysinfo
418syslog
419_sys_siglist
420sys_siglist
421system
422tcgetattr
423tcgetpgrp
424tcsetattr
425tcsetpgrp
426time
427timegm
428times
429timezone
430tmpnam
431towlower
432towupper
433truncate
434tsearch
435ttyname
436tzset
437ulimit
438umask
439uname
440unlink
441unsetenv
442unshare
443updwtmp
444updwtmpx
445usleep
446ustat
447utime
448utimes
449utmpname
450utmpxname
451valloc
452vasprintf
453verrx
454vfork
455vfprintf
456vfscanf
457vhangup
458vprintf
459vsnprintf
460vsprintf
461wait3
462wait4
463waitpid
464wcrtomb
465wcscoll
466wcsdup
467wcslen
468wctob
469wctomb
470wctype
471wcwidth
472wmemchr
473wmemcpy
474wmempcpy
diff --git a/meta/recipes-core/eglibc/site_config/headers b/meta/recipes-core/eglibc/site_config/headers
new file mode 100644
index 0000000000..609ab53797
--- /dev/null
+++ b/meta/recipes-core/eglibc/site_config/headers
@@ -0,0 +1,156 @@
1aio.h
2alloca.h
3argz.h
4arpa/inet.h
5arpa/nameser.h
6asm/byteorder.h
7asm/ioctls.h
8asm/page.h
9asm/types.h
10assert.h
11byteswap.h
12crypt.h
13ctype.h
14dirent.h
15dlfcn.h
16elf.h
17endian.h
18err.h
19errno.h
20execinfo.h
21fcntl.h
22features.h
23float.h
24fstab.h
25ftw.h
26getopt.h
27glob.h
28grp.h
29iconv.h
30ifaddrs.h
31inttypes.h
32langinfo.h
33lastlog.h
34libgen.h
35libintl.h
36limits.h
37linux/capability.h
38linux/fd.h
39linux/fs.h
40linux/hayesesp.h
41linux/hdreg.h
42linux/icmp.h
43linux/in6.h
44linux/joystick.h
45linux/ptrace.h
46linux/serial.h
47linux/sonypi.h
48linux/unistd.h
49linux/utsname.h
50linux/version.h
51locale.h
52malloc.h
53math.h
54mcheck.h
55memory.h
56mntent.h
57mqueue.h
58netdb.h
59net/if.h
60netinet/ether.h
61netinet/in.h
62netinet/ip6.h
63netinet/ip.h
64netinet/tcp.h
65netinet/udp.h
66netipx/ipx.h
67net/route.h
68paths.h
69poll.h
70pthread.h
71pty.h
72pwd.h
73regex.h
74resolv.h
75rpc/rpc.h
76rpc/types.h
77sched.h
78scsi/scsi.h
79search.h
80semaphore.h
81setjmp.h
82sgtty.h
83shadow.h
84signal.h
85stdarg.h
86stdbool.h
87stdc
88stddef.h
89stdint.h
90stdio.h
91stdlib.h
92string.h
93strings.h
94stropts.h
95sys/bitypes.h
96sys/cdefs.h
97sys/dir.h
98sys/epoll.h
99sysexits.h
100sys/fcntl.h
101sys/file.h
102sys/fsuid.h
103sys/ioctl.h
104sys/ipc.h
105syslog.h
106sys/mman.h
107sys/mount.h
108sys/mtio.h
109sys/param.h
110sys/poll.h
111sys/prctl.h
112sys/ptrace.h
113sys/queue.h
114sys/reg.h
115sys/resource.h
116sys/select.h
117sys/sem.h
118sys/shm.h
119sys/signal.h
120sys/socket.h
121sys/socketvar.h
122sys/soundcard.h
123sys/statfs.h
124sys/stat.h
125sys/statvfs.h
126sys/stropts.h
127sys/swap.h
128sys/sysctl.h
129sys/sysinfo.h
130sys/sysmacros.h
131sys/termios.h
132sys/timeb.h
133sys/time.h
134sys/times.h
135sys/timex.h
136sys/types.h
137sys/uio.h
138sys/un.h
139sys/unistd.h
140sys/user.h
141sys/utsname.h
142sys/vfs.h
143sys/wait.h
144termio.h
145termios.h
146time.h
147ttyent.h
148ulimit.h
149unistd.h
150ustat.h
151utime.h
152utmp.h
153utmpx.h
154values.h
155wchar.h
156wctype.h
diff --git a/meta/recipes-core/eglibc/site_config/types b/meta/recipes-core/eglibc/site_config/types
new file mode 100644
index 0000000000..178bd85a00
--- /dev/null
+++ b/meta/recipes-core/eglibc/site_config/types
@@ -0,0 +1,21 @@
1char
2char *
3double
4float
5int
6long
7long double
8long int
9long long
10long long int
11short
12short int
13signed char
14unsigned char
15unsigned int
16unsigned long
17unsigned long int
18unsigned long long int
19unsigned short
20unsigned short int
21void *
diff --git a/meta/recipes-core/expat/expat-2.1.0/autotools.patch b/meta/recipes-core/expat/expat-2.1.0/autotools.patch
new file mode 100644
index 0000000000..0e599697a6
--- /dev/null
+++ b/meta/recipes-core/expat/expat-2.1.0/autotools.patch
@@ -0,0 +1,24 @@
1Avoid using expat's m4 files
2
3Upstream-Status: Inappropriate [Other]
4Workaround specific to our build system.
5
6Signed-off-by: Kevin Tian <kevin.tian@intel.com>
7Signed-off-by: Scott Garman <scott.a.garman@intel.com>
8
9Updated to apply over expat 2.1.0
10
11Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
12
13diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
14--- expat-2.1.0/configure.in 2012-03-04 01:45:53.000000000 +0200
15+++ expat-2.1.0/configure.in 2012-05-10 21:04:44.000000000 +0300
16@@ -51,8 +51,6 @@
17
18 AC_CONFIG_HEADER(expat_config.h)
19
20-sinclude(conftools/ac_c_bigendian_cross.m4)
21-
22 AC_LIBTOOL_WIN32_DLL
23 AC_PROG_LIBTOOL
24
diff --git a/meta/recipes-core/expat/expat.inc b/meta/recipes-core/expat/expat.inc
new file mode 100644
index 0000000000..459ccb3b5b
--- /dev/null
+++ b/meta/recipes-core/expat/expat.inc
@@ -0,0 +1,20 @@
1SUMMARY = "A stream-oriented XML parser library."
2DESCRIPTION = "Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags)"
3HOMEPAGE = "http://expat.sourceforge.net/"
4SECTION = "libs"
5LICENSE = "MIT"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \
8 file://autotools.patch"
9
10inherit autotools lib_package gzipnative
11
12# This package uses an archive format known to have issue with some
13# versions of gzip
14do_unpack[depends] += "gzip-native:do_populate_sysroot"
15
16do_configure_prepend () {
17 rm -f ${S}/conftools/libtool.m4
18}
19
20BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/expat/expat_2.1.0.bb b/meta/recipes-core/expat/expat_2.1.0.bb
new file mode 100644
index 0000000000..1ce18444e7
--- /dev/null
+++ b/meta/recipes-core/expat/expat_2.1.0.bb
@@ -0,0 +1,6 @@
1require expat.inc
2LIC_FILES_CHKSUM = "file://COPYING;md5=1b71f681713d1256e1c23b0890920874"
3PR = "r0"
4
5SRC_URI[md5sum] = "dd7dab7a5fea97d2a6a43f511449b7cd"
6SRC_URI[sha256sum] = "823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86"
diff --git a/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb b/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb
new file mode 100644
index 0000000000..14f1d4194a
--- /dev/null
+++ b/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb
@@ -0,0 +1,44 @@
1DESCRIPTION = "Poky example feed configuration"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4PR = "r2"
5PACKAGE_ARCH = "${MACHINE_ARCH}"
6INHIBIT_DEFAULT_DEPS = "1"
7
8#FEEDNAMEPREFIX ?= "INVALID"
9#FEEDURIPREFIX ?= "INVALID"
10
11do_compile() {
12 mkdir -p ${S}/${sysconfdir}/opkg/
13
14 archconf=${S}/${sysconfdir}/opkg/arch.conf
15
16 rm -f $archconf
17 ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
18 priority=1
19 for arch in $ipkgarchs; do
20 echo "arch $arch $priority" >> $archconf
21 priority=$(expr $priority + 5)
22 done
23
24 basefeedconf=${S}/${sysconfdir}/opkg/base-feeds.conf
25
26 rm -f $basefeedconf
27 touch $basefeedconf
28
29 #for arch in $ipkgarchs; do
30 # echo "src/gz ${FEEDNAMEPREFIX}-$arch http://pokylinux.org/${FEEDURIPREFIX}$arch" >> $basefeedconf
31 #done
32}
33
34
35do_install () {
36 install -d ${D}${sysconfdir}/opkg
37 install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
38}
39
40FILES_${PN} = "${sysconfdir}/opkg/ "
41
42CONFFILES_${PN} += "${sysconfdir}/opkg/base-feeds.conf \
43 ${sysconfdir}/opkg/arch.conf"
44
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch b/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch
new file mode 100644
index 0000000000..e4c5f1566b
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/disable_java.patch
@@ -0,0 +1,39 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8Index: gettext-0.16.1/gettext-tools/configure.ac
9===================================================================
10--- gettext-0.16.1.orig/gettext-tools/configure.ac 2006-11-27 09:02:01.000000000 -0800
11+++ gettext-0.16.1/gettext-tools/configure.ac 2011-03-16 16:55:36.111396557 -0700
12@@ -36,27 +36,15 @@
13 gt_JAVA_CHOICE
14
15 gt_GCJ
16-if test -n "$HAVE_GCJ" && test "$JAVA_CHOICE" = yes; then
17- BUILDJAVAEXE=yes
18-else
19 BUILDJAVAEXE=no
20-fi
21 AC_SUBST(BUILDJAVAEXE)
22
23 gt_JAVAEXEC
24 gt_JAVACOMP([1.3])
25 AC_CHECK_PROG(JAR, jar, jar)
26-if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
27- BUILDJAVA=yes
28-else
29 BUILDJAVA=no
30-fi
31 AC_SUBST(BUILDJAVA)
32-if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
33- TESTJAVA=yes
34-else
35 TESTJAVA=no
36-fi
37 AC_SUBST(TESTJAVA)
38
39 gt_CSHARPCOMP
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch b/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
new file mode 100644
index 0000000000..7293f5b08d
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
@@ -0,0 +1,110 @@
1
2This patch updates the required version number from 2.61 to the
3current 2.65 version of aclocal, this will need to be updated
4when we update aclocal
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by Saul Wold <sgw@linux.intel.com>
9
10Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
11===================================================================
12--- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:36.391519775 -0700
13+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 02:24:45.569526073 -0700
14@@ -148,7 +148,7 @@
15 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
16 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
17 dnl Autoconf >= 2.61 supports dots in --with options.
18- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
19+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.65]),[-1],[translit([$1],[.],[_])],[$1])])
20 dnl By default, look in $includedir and $libdir.
21 use_additional=yes
22 AC_LIB_WITH_FINAL_PREFIX([
23Index: gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4
24===================================================================
25--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
26+++ gettext-0.16.1/autoconf-lib-link/tests/rpathly/aclocal.m4 2011-03-17 02:24:45.570526904 -0700
27@@ -11,8 +11,8 @@
28 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
29 # PARTICULAR PURPOSE.
30
31-m4_if(m4_PACKAGE_VERSION, [2.61],,
32-[m4_fatal([this file was generated for autoconf 2.61.
33+m4_if(m4_PACKAGE_VERSION, [2.65],,
34+[m4_fatal([this file was generated for autoconf 2.65.
35 You have another version of autoconf. If you want to use that,
36 you should regenerate the build system entirely.], [63])])
37
38Index: gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4
39===================================================================
40--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
41+++ gettext-0.16.1/autoconf-lib-link/tests/rpathx/aclocal.m4 2011-03-17 02:24:45.572525773 -0700
42@@ -11,8 +11,8 @@
43 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
44 # PARTICULAR PURPOSE.
45
46-m4_if(m4_PACKAGE_VERSION, [2.61],,
47-[m4_fatal([this file was generated for autoconf 2.61.
48+m4_if(m4_PACKAGE_VERSION, [2.65],,
49+[m4_fatal([this file was generated for autoconf 2.65.
50 You have another version of autoconf. If you want to use that,
51 you should regenerate the build system entirely.], [63])])
52
53Index: gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4
54===================================================================
55--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
56+++ gettext-0.16.1/autoconf-lib-link/tests/rpathy/aclocal.m4 2011-03-17 02:24:45.578394916 -0700
57@@ -11,7 +11,7 @@
58 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
59 # PARTICULAR PURPOSE.
60
61-m4_if(m4_PACKAGE_VERSION, [2.61],,
62+m4_if(m4_PACKAGE_VERSION, [2.65],,
63 [m4_fatal([this file was generated for autoconf 2.61.
64 You have another version of autoconf. If you want to use that,
65 you should regenerate the build system entirely.], [63])])
66Index: gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4
67===================================================================
68--- gettext-0.16.1.orig/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:36.391519775 -0700
69+++ gettext-0.16.1/autoconf-lib-link/tests/rpathz/aclocal.m4 2011-03-17 02:24:45.586395416 -0700
70@@ -11,8 +11,8 @@
71 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
72 # PARTICULAR PURPOSE.
73
74-m4_if(m4_PACKAGE_VERSION, [2.61],,
75-[m4_fatal([this file was generated for autoconf 2.61.
76+m4_if(m4_PACKAGE_VERSION, [2.65],,
77+[m4_fatal([this file was generated for autoconf 2.65.
78 You have another version of autoconf. If you want to use that,
79 you should regenerate the build system entirely.], [63])])
80
81Index: gettext-0.16.1/gettext-tools/aclocal.m4
82===================================================================
83--- gettext-0.16.1.orig/gettext-tools/aclocal.m4 2006-11-27 09:34:32.000000000 -0800
84+++ gettext-0.16.1/gettext-tools/aclocal.m4 2011-03-17 02:27:01.135682807 -0700
85@@ -11,8 +11,8 @@
86 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
87 # PARTICULAR PURPOSE.
88
89-m4_if(m4_PACKAGE_VERSION, [2.61],,
90-[m4_fatal([this file was generated for autoconf 2.61.
91+m4_if(m4_PACKAGE_VERSION, [2.65],,
92+[m4_fatal([this file was generated for autoconf 2.65.
93 You have another version of autoconf. If you want to use that,
94 you should regenerate the build system entirely.], [63])])
95
96Index: gettext-0.16.1/gettext-tools/examples/aclocal.m4
97===================================================================
98--- gettext-0.16.1.orig/gettext-tools/examples/aclocal.m4 2006-11-27 09:16:23.000000000 -0800
99+++ gettext-0.16.1/gettext-tools/examples/aclocal.m4 2011-03-17 02:26:52.589396683 -0700
100@@ -11,8 +11,8 @@
101 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
102 # PARTICULAR PURPOSE.
103
104-m4_if(m4_PACKAGE_VERSION, [2.61],,
105-[m4_fatal([this file was generated for autoconf 2.61.
106+m4_if(m4_PACKAGE_VERSION, [2.65],,
107+[m4_fatal([this file was generated for autoconf 2.65.
108 You have another version of autoconf. If you want to use that,
109 you should regenerate the build system entirely.], [63])])
110
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch b/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
new file mode 100644
index 0000000000..06861492c0
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
@@ -0,0 +1,348 @@
1
2This patch removes the circular dependency on AC_GNU_SOURCE in
3AC_USE_SYSTEM_EXTENSIONS.
4
5Thanks to Mark Hatle for the timely pointers and fixes.
6
7Upstream-Status: Inappropriate [licensing]
8
9Signed-off-by Saul Wold <sgw@linux.intel.com>
10
11diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 gettext.patched/gettext-runtime/gnulib-m4/extensions.m4
12--- gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 2006-11-27 09:14:38.000000000 -0800
13+++ gettext.patched/gettext-runtime/gnulib-m4/extensions.m4 2011-03-16 23:54:01.711923448 -0700
14@@ -16,43 +16,47 @@
15 # ------------------------
16 # Enable extensions on systems that normally disable them,
17 # typically due to standards-conformance issues.
18-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
19-[
20- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
21- AC_BEFORE([$0], [AC_RUN_IFELSE])
22-
23- AC_REQUIRE([AC_GNU_SOURCE])
24- AC_REQUIRE([AC_AIX])
25- AC_REQUIRE([AC_MINIX])
26-
27- AH_VERBATIM([__EXTENSIONS__],
28-[/* Enable extensions on Solaris. */
29-#ifndef __EXTENSIONS__
30-# undef __EXTENSIONS__
31-#endif
32-#ifndef _POSIX_PTHREAD_SEMANTICS
33-# undef _POSIX_PTHREAD_SEMANTICS
34-#endif
35-#ifndef _TANDEM_SOURCE
36-# undef _TANDEM_SOURCE
37-#endif])
38- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
39- [ac_cv_safe_to_define___extensions__],
40- [AC_COMPILE_IFELSE(
41- [AC_LANG_PROGRAM([
42-# define __EXTENSIONS__ 1
43- AC_INCLUDES_DEFAULT])],
44- [ac_cv_safe_to_define___extensions__=yes],
45- [ac_cv_safe_to_define___extensions__=no])])
46- test $ac_cv_safe_to_define___extensions__ = yes &&
47- AC_DEFINE([__EXTENSIONS__])
48- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
49- AC_DEFINE([_TANDEM_SOURCE])
50-])
51+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
52+#[
53+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
54+# AC_BEFORE([$0], [AC_RUN_IFELSE])
55+#
56+# AC_REQUIRE([AC_GNU_SOURCE])
57+# AC_REQUIRE([AC_AIX])
58+# AC_REQUIRE([AC_MINIX])
59+#
60+# AH_VERBATIM([__EXTENSIONS__],
61+#[/* Enable extensions on Solaris. */
62+##ifndef __EXTENSIONS__
63+## undef __EXTENSIONS__
64+##endif
65+##ifndef _POSIX_PTHREAD_SEMANTICS
66+## undef _POSIX_PTHREAD_SEMANTICS
67+##endif
68+##ifndef _TANDEM_SOURCE
69+## undef _TANDEM_SOURCE
70+##endif])
71+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
72+# [ac_cv_safe_to_define___extensions__],
73+# [AC_COMPILE_IFELSE(
74+# [AC_LANG_PROGRAM([
75+## define __EXTENSIONS__ 1
76+# AC_INCLUDES_DEFAULT])],
77+# [ac_cv_safe_to_define___extensions__=yes],
78+# [ac_cv_safe_to_define___extensions__=no])])
79+# test $ac_cv_safe_to_define___extensions__ = yes &&
80+# AC_DEFINE([__EXTENSIONS__])
81+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
82+# AC_DEFINE([_TANDEM_SOURCE])
83+#])
84
85 # gl_USE_SYSTEM_EXTENSIONS
86 # ------------------------
87 # Enable extensions on systems that normally disable them,
88 # typically due to standards-conformance issues.
89 AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
90- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
91+[
92+ AC_REQUIRE([AC_GNU_SOURCE])
93+
94+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
95+])
96diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4
97--- gettext-0.16.1/gettext-runtime/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:19.000000000 -0800
98+++ gettext.patched/gettext-runtime/gnulib-m4/gnulib-comp.m4 2011-03-16 23:50:17.471531838 -0700
99@@ -25,7 +25,7 @@
100 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
101 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
102 AC_REQUIRE([AC_PROG_RANLIB])
103- AC_REQUIRE([AC_GNU_SOURCE])
104+ dnl AC_REQUIRE([AC_GNU_SOURCE])
105 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
106 ])
107
108diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4
109--- gettext-0.16.1/gettext-runtime/gnulib-m4/mbchar.m4 2006-11-27 09:14:38.000000000 -0800
110+++ gettext.patched/gettext-runtime/gnulib-m4/mbchar.m4 2011-03-16 23:50:10.814396529 -0700
111@@ -9,7 +9,7 @@
112
113 AC_DEFUN([gl_MBCHAR],
114 [
115- AC_REQUIRE([AC_GNU_SOURCE])
116+ dnl AC_REQUIRE([AC_GNU_SOURCE])
117 dnl The following line is that so the user can test HAVE_WCHAR_H
118 dnl before #include "mbchar.h".
119 AC_CHECK_HEADERS_ONCE([wchar.h])
120diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4
121--- gettext-0.16.1/gettext-runtime/gnulib-m4/wcwidth.m4 2006-11-27 09:14:38.000000000 -0800
122+++ gettext.patched/gettext-runtime/gnulib-m4/wcwidth.m4 2011-03-16 23:50:08.357396247 -0700
123@@ -7,7 +7,7 @@
124 AC_DEFUN([gl_FUNC_WCWIDTH],
125 [
126 dnl Persuade glibc <wchar.h> to declare wcwidth().
127- AC_REQUIRE([AC_GNU_SOURCE])
128+ dnl AC_REQUIRE([AC_GNU_SOURCE])
129
130 AC_REQUIRE([AC_C_INLINE])
131 AC_REQUIRE([gt_TYPE_WCHAR_T])
132diff -ru gettext-0.16.1/gettext-runtime/m4/lock.m4 gettext.patched/gettext-runtime/m4/lock.m4
133--- gettext-0.16.1/gettext-runtime/m4/lock.m4 2006-10-24 13:59:59.000000000 -0700
134+++ gettext.patched/gettext-runtime/m4/lock.m4 2011-03-16 23:50:04.355891676 -0700
135@@ -35,7 +35,7 @@
136 AC_BEFORE([$0], [gl_ARGP])dnl
137
138 AC_REQUIRE([AC_CANONICAL_HOST])
139- AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
140+ dnl AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
141 dnl Check for multithreading.
142 AC_ARG_ENABLE(threads,
143 AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
144diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 gettext.patched/gettext-tools/gnulib-m4/extensions.m4
145--- gettext-0.16.1/gettext-tools/gnulib-m4/extensions.m4 2006-11-27 09:14:54.000000000 -0800
146+++ gettext.patched/gettext-tools/gnulib-m4/extensions.m4 2011-03-16 23:53:28.487671266 -0700
147@@ -16,43 +16,47 @@
148 # ------------------------
149 # Enable extensions on systems that normally disable them,
150 # typically due to standards-conformance issues.
151-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
152-[
153- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
154- AC_BEFORE([$0], [AC_RUN_IFELSE])
155-
156- AC_REQUIRE([AC_GNU_SOURCE])
157- AC_REQUIRE([AC_AIX])
158- AC_REQUIRE([AC_MINIX])
159-
160- AH_VERBATIM([__EXTENSIONS__],
161-[/* Enable extensions on Solaris. */
162-#ifndef __EXTENSIONS__
163-# undef __EXTENSIONS__
164-#endif
165-#ifndef _POSIX_PTHREAD_SEMANTICS
166-# undef _POSIX_PTHREAD_SEMANTICS
167-#endif
168-#ifndef _TANDEM_SOURCE
169-# undef _TANDEM_SOURCE
170-#endif])
171- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
172- [ac_cv_safe_to_define___extensions__],
173- [AC_COMPILE_IFELSE(
174- [AC_LANG_PROGRAM([
175-# define __EXTENSIONS__ 1
176- AC_INCLUDES_DEFAULT])],
177- [ac_cv_safe_to_define___extensions__=yes],
178- [ac_cv_safe_to_define___extensions__=no])])
179- test $ac_cv_safe_to_define___extensions__ = yes &&
180- AC_DEFINE([__EXTENSIONS__])
181- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
182- AC_DEFINE([_TANDEM_SOURCE])
183-])
184+#AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
185+#[
186+# AC_BEFORE([$0], [AC_COMPILE_IFELSE])
187+# AC_BEFORE([$0], [AC_RUN_IFELSE])
188+#
189+# AC_REQUIRE([AC_GNU_SOURCE])
190+# AC_REQUIRE([AC_AIX])
191+# AC_REQUIRE([AC_MINIX])
192+#
193+# AH_VERBATIM([__EXTENSIONS__],
194+#[/* Enable extensions on Solaris. */
195+##ifndef __EXTENSIONS__
196+## undef __EXTENSIONS__
197+##endif
198+##ifndef _POSIX_PTHREAD_SEMANTICS
199+## undef _POSIX_PTHREAD_SEMANTICS
200+##endif
201+##ifndef _TANDEM_SOURCE
202+## undef _TANDEM_SOURCE
203+##endif])
204+# AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
205+# [ac_cv_safe_to_define___extensions__],
206+# [AC_COMPILE_IFELSE(
207+# [AC_LANG_PROGRAM([
208+## define __EXTENSIONS__ 1
209+# AC_INCLUDES_DEFAULT])],
210+# [ac_cv_safe_to_define___extensions__=yes],
211+# [ac_cv_safe_to_define___extensions__=no])])
212+# test $ac_cv_safe_to_define___extensions__ = yes &&
213+# AC_DEFINE([__EXTENSIONS__])
214+# AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
215+# AC_DEFINE([_TANDEM_SOURCE])
216+#])
217
218 # gl_USE_SYSTEM_EXTENSIONS
219 # ------------------------
220 # Enable extensions on systems that normally disable them,
221 # typically due to standards-conformance issues.
222 AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
223- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
224+[
225+ AC_REQUIRE([AC_GNU_SOURCE])
226+
227+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
228+])
229diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4
230--- gettext-0.16.1/gettext-tools/gnulib-m4/fnmatch.m4 2006-11-27 09:14:54.000000000 -0800
231+++ gettext.patched/gettext-tools/gnulib-m4/fnmatch.m4 2011-03-16 23:52:06.477463671 -0700
232@@ -91,7 +91,7 @@
233 AC_DEFUN([gl_FUNC_FNMATCH_GNU],
234 [
235 dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
236- AC_REQUIRE([AC_GNU_SOURCE])
237+ dnl AC_REQUIRE([AC_GNU_SOURCE])
238
239 FNMATCH_H=
240 _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
241diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 gettext.patched/gettext-tools/gnulib-m4/getdelim.m4
242--- gettext-0.16.1/gettext-tools/gnulib-m4/getdelim.m4 2006-11-27 09:14:54.000000000 -0800
243+++ gettext.patched/gettext-tools/gnulib-m4/getdelim.m4 2011-03-16 23:52:22.871674845 -0700
244@@ -12,7 +12,7 @@
245 [
246
247 dnl Persuade glibc <stdio.h> to declare getdelim().
248- AC_REQUIRE([AC_GNU_SOURCE])
249+ dnl AC_REQUIRE([AC_GNU_SOURCE])
250
251 AC_REPLACE_FUNCS(getdelim)
252 AC_CHECK_DECLS_ONCE(getdelim)
253diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 gettext.patched/gettext-tools/gnulib-m4/getline.m4
254--- gettext-0.16.1/gettext-tools/gnulib-m4/getline.m4 2006-11-27 09:14:54.000000000 -0800
255+++ gettext.patched/gettext-tools/gnulib-m4/getline.m4 2011-03-16 23:51:49.829971108 -0700
256@@ -16,7 +16,7 @@
257 AC_DEFUN([gl_FUNC_GETLINE],
258 [
259 dnl Persuade glibc <stdio.h> to declare getline().
260- AC_REQUIRE([AC_GNU_SOURCE])
261+ dnl AC_REQUIRE([AC_GNU_SOURCE])
262
263 AC_CHECK_DECLS([getline])
264
265diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4
266--- gettext-0.16.1/gettext-tools/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:36.000000000 -0800
267+++ gettext.patched/gettext-tools/gnulib-m4/gnulib-comp.m4 2011-03-16 23:52:18.970450488 -0700
268@@ -25,7 +25,7 @@
269 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
270 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
271 AC_REQUIRE([AC_PROG_RANLIB])
272- AC_REQUIRE([AC_GNU_SOURCE])
273+ dnl AC_REQUIRE([AC_GNU_SOURCE])
274 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
275 AC_REQUIRE([gl_LOCK_EARLY])
276 ])
277diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 gettext.patched/gettext-tools/gnulib-m4/mbchar.m4
278--- gettext-0.16.1/gettext-tools/gnulib-m4/mbchar.m4 2006-11-27 09:14:55.000000000 -0800
279+++ gettext.patched/gettext-tools/gnulib-m4/mbchar.m4 2011-03-16 23:51:40.844410216 -0700
280@@ -9,7 +9,7 @@
281
282 AC_DEFUN([gl_MBCHAR],
283 [
284- AC_REQUIRE([AC_GNU_SOURCE])
285+ dnl AC_REQUIRE([AC_GNU_SOURCE])
286 dnl The following line is that so the user can test HAVE_WCHAR_H
287 dnl before #include "mbchar.h".
288 AC_CHECK_HEADERS_ONCE([wchar.h])
289diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4
290--- gettext-0.16.1/gettext-tools/gnulib-m4/stpcpy.m4 2006-11-27 09:14:55.000000000 -0800
291+++ gettext.patched/gettext-tools/gnulib-m4/stpcpy.m4 2011-03-16 23:52:14.691396045 -0700
292@@ -7,7 +7,7 @@
293 AC_DEFUN([gl_FUNC_STPCPY],
294 [
295 dnl Persuade glibc <string.h> to declare stpcpy().
296- AC_REQUIRE([AC_GNU_SOURCE])
297+ dnl AC_REQUIRE([AC_GNU_SOURCE])
298
299 AC_REPLACE_FUNCS(stpcpy)
300 if test $ac_cv_func_stpcpy = no; then
301diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4
302--- gettext-0.16.1/gettext-tools/gnulib-m4/stpncpy.m4 2006-11-27 09:14:55.000000000 -0800
303+++ gettext.patched/gettext-tools/gnulib-m4/stpncpy.m4 2011-03-16 23:52:10.356641459 -0700
304@@ -7,7 +7,7 @@
305 AC_DEFUN([gl_FUNC_STPNCPY],
306 [
307 dnl Persuade glibc <string.h> to declare stpncpy().
308- AC_REQUIRE([AC_GNU_SOURCE])
309+ dnl AC_REQUIRE([AC_GNU_SOURCE])
310
311 dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function
312 dnl declared in <string.h>. Its side effects are the same as those
313diff -ru gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4
314--- gettext-0.16.1/gettext-tools/gnulib-m4/wcwidth.m4 2006-11-27 09:14:55.000000000 -0800
315+++ gettext.patched/gettext-tools/gnulib-m4/wcwidth.m4 2011-03-16 23:51:08.260324221 -0700
316@@ -7,7 +7,7 @@
317 AC_DEFUN([gl_FUNC_WCWIDTH],
318 [
319 dnl Persuade glibc <wchar.h> to declare wcwidth().
320- AC_REQUIRE([AC_GNU_SOURCE])
321+ dnl AC_REQUIRE([AC_GNU_SOURCE])
322
323 AC_REQUIRE([AC_C_INLINE])
324 AC_REQUIRE([gt_TYPE_WCHAR_T])
325diff -ru gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4
326--- gettext-0.16.1/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2006-11-27 09:33:45.000000000 -0800
327+++ gettext.patched/gettext-tools/libgettextpo/gnulib-m4/gnulib-comp.m4 2011-03-16 23:51:02.036061317 -0700
328@@ -25,7 +25,7 @@
329 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
330 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
331 AC_REQUIRE([AC_PROG_RANLIB])
332- AC_REQUIRE([AC_GNU_SOURCE])
333+ dnl AC_REQUIRE([AC_GNU_SOURCE])
334 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
335 AC_REQUIRE([gl_LOCK_EARLY])
336 ])
337diff -ru gettext-0.16.1/gettext-tools/m4/regex.m4 gettext.patched/gettext-tools/m4/regex.m4
338--- gettext-0.16.1/gettext-tools/m4/regex.m4 2006-11-27 09:02:05.000000000 -0800
339+++ gettext.patched/gettext-tools/m4/regex.m4 2011-03-16 23:50:53.533477195 -0700
340@@ -116,7 +116,7 @@
341 dnl to get them.
342
343 dnl Persuade glibc <string.h> to declare mempcpy().
344- AC_REQUIRE([AC_GNU_SOURCE])
345+ dnl AC_REQUIRE([AC_GNU_SOURCE])
346
347 AC_REQUIRE([AC_C_RESTRICT])
348 AC_REQUIRE([AC_FUNC_ALLOCA])
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/fixchicken.patch b/meta/recipes-core/gettext/gettext-0.16.1/fixchicken.patch
new file mode 100644
index 0000000000..36ce4630a2
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/fixchicken.patch
@@ -0,0 +1,33 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8Index: gettext-tools/m4/csharpcomp.m4
9===================================================================
10RCS file: /cvs/gettext/gettext/gettext-tools/m4/csharpcomp.m4,v
11retrieving revision 1.4
12retrieving revision 1.6
13diff -u -r1.4 -r1.6
14--- a/gettext-tools/m4/csharpcomp.m4 30 Jan 2004 11:01:18 -0000 1.4
15+++ a/gettext-tools/m4/csharpcomp.m4 26 May 2004 12:15:23 -0000 1.6
16@@ -1,4 +1,4 @@
17-# csharpcomp.m4 serial 2 (gettext-0.14.1)
18+# csharpcomp.m4 serial 4 (gettext-0.15)
19 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
20 dnl This file is free software, distributed under the terms of the GNU
21 dnl General Public License. As a special exception to the GNU General
22@@ -43,7 +43,8 @@
23 ;;
24 sscli)
25 if test -n "$HAVE_CSC_IN_PATH" \
26- && csc -help >/dev/null 2>/dev/null; then
27+ && csc -help >/dev/null 2>/dev/null \
28+ && { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then
29 HAVE_CSC=1
30 ac_result="csc"
31 break
32
33
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/getline.m4.patch b/meta/recipes-core/gettext/gettext-0.16.1/getline.m4.patch
new file mode 100644
index 0000000000..bf995bc622
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/getline.m4.patch
@@ -0,0 +1,39 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8--- /gettext-tools/m4/orig-getline.m4 2003-07-18 18:11:37.000000000 +0300
9+++ /gettext-tools/m4/getline.m4 2007-02-03 13:33:41.000000000 +0200
10@@ -42,12 +42,23 @@
11 return 1;
12 len = getline (&line, &siz, in);
13 exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
14- }
15- ], am_cv_func_working_getline=yes dnl The library version works.
16- , am_cv_func_working_getline=no dnl The library version does NOT work.
17- , am_cv_func_working_getline=no dnl We're cross compiling.
18- )])
19- fi
20+ }
21+ ], am_cv_func_working_getline=yes dnl The library version works.
22+ , am_cv_func_working_getline=no dnl The library version does NOT work.
23+! , dnl We're cross compiling. Assume ir works on glibc2 systems.
24+! [AC_EGREP_CPP([Lucky GNU user],
25+! [
26+! #include <features.h>
27+! #ifdef __GNU_LIBRARY__
28+! #if (__GLIBC__ >= 2)
29+! Lucky GNU user
30+! #endif
31+! #endif
32+! ],
33+! [am_cv_func_working_getline=yes],
34+! [am_cv_func_working_getline=no])]
35+ )])
36+ fi
37
38 if test $am_cv_func_working_getline = no; then
39 dnl We must choose a different name for our function, since on ELF systems
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch b/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch
new file mode 100644
index 0000000000..072fe5ff6c
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/gettext-autoconf-lib-link-no-L.patch
@@ -0,0 +1,19 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8--- gettext-0.17/autoconf-lib-link/m4/lib-link.m4~ 2009-04-17 15:12:30.000000000 -0700
9+++ gettext-0.17/autoconf-lib-link/m4/lib-link.m4 2009-04-17 15:37:39.000000000 -0700
10@@ -267,6 +267,9 @@
11 fi
12 fi
13 fi
14+ dnl Just let the compiler find the library, the compiler and user are smarter then this script
15+ dnl when cross compiling and working with a relocated install.
16+ found_dir=""
17 if test "X$found_dir" = "X"; then
18 for x in $LDFLAGS $LTLIB[]NAME; do
19 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/gettext-error_print_progname.patch b/meta/recipes-core/gettext/gettext-0.16.1/gettext-error_print_progname.patch
new file mode 100644
index 0000000000..93d91942f0
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/gettext-error_print_progname.patch
@@ -0,0 +1,19 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8diff -ur gettext-0.14.6/gettext-tools/lib/error.h gettext-0.14.6-patched/gettext-tools/lib/error.h
9--- gettext-0.14.6/gettext-tools/lib/error.h 2005-05-20 16:03:42.000000000 -0500
10+++ gettext-0.14.6-patched/gettext-tools/lib/error.h 2007-01-13 20:57:24.422168053 -0600
11@@ -50,7 +50,7 @@
12 /* If NULL, error will flush stdout, then print on stderr the program
13 name, a colon and a space. Otherwise, error will call this
14 function without parameters instead. */
15-extern DLL_VARIABLE void (*error_print_progname) (void);
16+void (*error_print_progname) (void);
17
18 /* This variable is incremented each time `error' is called. */
19 extern DLL_VARIABLE unsigned int error_message_count;
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch b/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch
new file mode 100644
index 0000000000..f09e450efe
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/gettext-vpath.patch
@@ -0,0 +1,20 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8Index: gettext-0.16.1/gettext-runtime/intl/Makefile.in
9===================================================================
10--- gettext-0.16.1.orig/gettext-runtime/intl/Makefile.in 2006-11-27 09:02:00.000000000 -0800
11+++ gettext-0.16.1/gettext-runtime/intl/Makefile.in 2011-03-16 16:04:49.175419930 -0700
12@@ -35,7 +35,7 @@
13 # 'make' does the wrong thing if GNU gettext was configured with
14 # "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
15 # files it finds in srcdir = ../../gettext-runtime/intl.
16-VPATH = $(srcdir)
17+#VPATH = $(srcdir)
18
19 prefix = @prefix@
20 exec_prefix = @exec_prefix@
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch b/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch
new file mode 100644
index 0000000000..4da8dd4536
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/hardcode_macro_version.patch
@@ -0,0 +1,51 @@
1
2This patch hardcodes in version 0.17 for the GETTEXT_MACRO_VERSION,
3the version check is only part of 0.17 and will not affect any 0.16.1
4operations
5
6Upstream-Status: Inappropriate [licensing]
7
8Signed-off-by: Saul Wold <sgw@linux.intel.com>
9
10Index: gettext-0.16.1/gettext-runtime/m4/po.m4
11===================================================================
12--- gettext-0.16.1.orig/gettext-runtime/m4/po.m4 2011-03-17 02:24:28.953520231 -0700
13+++ gettext-0.16.1/gettext-runtime/m4/po.m4 2011-03-17 02:28:25.455396862 -0700
14@@ -27,6 +27,9 @@
15 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
16 AC_REQUIRE([AM_NLS])dnl
17
18+ dnl Hardcode the MACRO_VERSION to 0.17 for gnutls
19+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
20+
21 dnl Perform the following tests also if --disable-nls has been given,
22 dnl because they are needed for "make dist" to work.
23
24Index: gettext-0.16.1/gettext-runtime/po/Makefile.in.in
25===================================================================
26--- gettext-0.16.1.orig/gettext-runtime/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
27+++ gettext-0.16.1/gettext-runtime/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
28@@ -10,6 +10,9 @@
29 #
30 # Origin: gettext-0.16
31
32+# Hardcode this value for gnutls building against gplv2 code
33+GETTEXT_MACRO_VERSION = 0.17
34+
35 PACKAGE = @PACKAGE@
36 VERSION = @VERSION@
37 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
38Index: gettext-0.16.1/gettext-tools/po/Makefile.in.in
39===================================================================
40--- gettext-0.16.1.orig/gettext-tools/po/Makefile.in.in 2011-03-17 02:24:28.953520231 -0700
41+++ gettext-0.16.1/gettext-tools/po/Makefile.in.in 2011-03-17 02:28:07.574395144 -0700
42@@ -10,6 +10,9 @@
43 #
44 # Origin: gettext-0.16
45
46+# Hardcode this value for gnutls building against gplv2 code
47+GETTEXT_MACRO_VERSION = 0.17
48+
49 PACKAGE = @PACKAGE@
50 VERSION = @VERSION@
51 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch b/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch
new file mode 100644
index 0000000000..d921069711
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.16.1/linklib_from_0.17.patch
@@ -0,0 +1,720 @@
1
2# Pulled from OpenEmbedded
3#
4# Commented by: Saul Wold <saul.wold@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
9===================================================================
10--- gettext-0.16.1.orig/autoconf-lib-link/m4/lib-link.m4 2006-11-27 09:01:58.000000000 -0800
11+++ gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4 2011-03-17 00:36:08.710836720 -0700
12@@ -6,12 +6,14 @@
13
14 dnl From Bruno Haible.
15
16-AC_PREREQ(2.50)
17+AC_PREREQ(2.54)
18
19 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
20 dnl the libraries corresponding to explicit and implicit dependencies.
21 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
22 dnl augments the CPPFLAGS variable.
23+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
24+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
25 AC_DEFUN([AC_LIB_LINKFLAGS],
26 [
27 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
28@@ -24,13 +26,16 @@
29 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
30 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
31 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
32+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
33 ])
34 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
35 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
36 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
37+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
38 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
39 AC_SUBST([LIB]NAME)
40 AC_SUBST([LTLIB]NAME)
41+ AC_SUBST([LIB]NAME[_PREFIX])
42 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
43 dnl results of this search when this library appears as a dependency.
44 HAVE_LIB[]NAME=yes
45@@ -46,6 +51,8 @@
46 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
47 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
48 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
49+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
50+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
51 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
52 [
53 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
54@@ -82,17 +89,24 @@
55 CPPFLAGS="$ac_save_CPPFLAGS"
56 LIB[]NAME=
57 LTLIB[]NAME=
58+ LIB[]NAME[]_PREFIX=
59+
60 fi
61 AC_SUBST([HAVE_LIB]NAME)
62 AC_SUBST([LIB]NAME)
63 AC_SUBST([LTLIB]NAME)
64+ AC_SUBST([LIB]NAME[_PREFIX])
65 undefine([Name])
66 undefine([NAME])
67 ])
68
69 dnl Determine the platform dependent parameters needed to use rpath:
70-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
71-dnl hardcode_direct, hardcode_minus_L.
72+dnl acl_libext,
73+dnl acl_shlibext,
74+dnl acl_hardcode_libdir_flag_spec,
75+dnl acl_hardcode_libdir_separator,
76+dnl acl_hardcode_direct,
77+dnl acl_hardcode_minus_L.
78 AC_DEFUN([AC_LIB_RPATH],
79 [
80 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
81@@ -109,12 +123,14 @@
82 acl_cv_rpath=done
83 ])
84 wl="$acl_cv_wl"
85- libext="$acl_cv_libext"
86- shlibext="$acl_cv_shlibext"
87- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
88- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
89- hardcode_direct="$acl_cv_hardcode_direct"
90- hardcode_minus_L="$acl_cv_hardcode_minus_L"
91+ acl_libext="$acl_cv_libext"
92+ acl_shlibext="$acl_cv_shlibext"
93+ acl_libname_spec="$acl_cv_libname_spec"
94+ acl_library_names_spec="$acl_cv_library_names_spec"
95+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
96+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
97+ acl_hardcode_direct="$acl_cv_hardcode_direct"
98+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
99 dnl Determine whether the user wants rpath handling at all.
100 AC_ARG_ENABLE(rpath,
101 [ --disable-rpath do not hardcode runtime library paths],
102@@ -124,20 +140,24 @@
103 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
104 dnl the libraries corresponding to explicit and implicit dependencies.
105 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
106+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
107+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
108 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
109 [
110 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
111 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
112 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
113+ dnl Autoconf >= 2.61 supports dots in --with options.
114+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
115 dnl By default, look in $includedir and $libdir.
116 use_additional=yes
117 AC_LIB_WITH_FINAL_PREFIX([
118 eval additional_includedir=\"$includedir\"
119 eval additional_libdir=\"$libdir\"
120 ])
121- AC_LIB_ARG_WITH([lib$1-prefix],
122-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
123- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
124+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
125+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
126+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
127 [
128 if test "X$withval" = "Xno"; then
129 use_additional=no
130@@ -158,6 +178,7 @@
131 LIB[]NAME=
132 LTLIB[]NAME=
133 INC[]NAME=
134+ LIB[]NAME[]_PREFIX=
135 rpathdirs=
136 ltrpathdirs=
137 names_already_handled=
138@@ -197,27 +218,53 @@
139 found_la=
140 found_so=
141 found_a=
142+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
143+ if test -n "$acl_shlibext"; then
144+ shrext=".$acl_shlibext" # typically: shrext=.so
145+ else
146+ shrext=
147+ fi
148 if test $use_additional = yes; then
149- if test -n "$shlibext" \
150- && { test -f "$additional_libdir/lib$name.$shlibext" \
151- || { test "$shlibext" = dll \
152- && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
153- found_dir="$additional_libdir"
154- if test -f "$additional_libdir/lib$name.$shlibext"; then
155- found_so="$additional_libdir/lib$name.$shlibext"
156+ dir="$additional_libdir"
157+ dnl The same code as in the loop below:
158+ dnl First look for a shared library.
159+ if test -n "$acl_shlibext"; then
160+ if test -f "$dir/$libname$shrext"; then
161+ found_dir="$dir"
162+ found_so="$dir/$libname$shrext"
163 else
164- found_so="$additional_libdir/lib$name.dll.a"
165+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
166+ ver=`(cd "$dir" && \
167+ for f in "$libname$shrext".*; do echo "$f"; done \
168+ | sed -e "s,^$libname$shrext\\\\.,," \
169+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
170+ | sed 1q ) 2>/dev/null`
171+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
172+ found_dir="$dir"
173+ found_so="$dir/$libname$shrext.$ver"
174+ fi
175+ else
176+ eval library_names=\"$acl_library_names_spec\"
177+ for f in $library_names; do
178+ if test -f "$dir/$f"; then
179+ found_dir="$dir"
180+ found_so="$dir/$f"
181+ break
182+ fi
183+ done
184+ fi
185 fi
186- if test -f "$additional_libdir/lib$name.la"; then
187- found_la="$additional_libdir/lib$name.la"
188+ fi
189+ dnl Then look for a static library.
190+ if test "X$found_dir" = "X"; then
191+ if test -f "$dir/$libname.$acl_libext"; then
192+ found_dir="$dir"
193+ found_a="$dir/$libname.$acl_libext"
194 fi
195- else
196- if test -f "$additional_libdir/lib$name.$libext"; then
197- found_dir="$additional_libdir"
198- found_a="$additional_libdir/lib$name.$libext"
199- if test -f "$additional_libdir/lib$name.la"; then
200- found_la="$additional_libdir/lib$name.la"
201- fi
202+ fi
203+ if test "X$found_dir" != "X"; then
204+ if test -f "$dir/$libname.la"; then
205+ found_la="$dir/$libname.la"
206 fi
207 fi
208 fi
209@@ -227,26 +274,44 @@
210 case "$x" in
211 -L*)
212 dir=`echo "X$x" | sed -e 's/^X-L//'`
213- if test -n "$shlibext" \
214- && { test -f "$dir/lib$name.$shlibext" \
215- || { test "$shlibext" = dll \
216- && test -f "$dir/lib$name.dll.a"; }; }; then
217- found_dir="$dir"
218- if test -f "$dir/lib$name.$shlibext"; then
219- found_so="$dir/lib$name.$shlibext"
220+ dnl First look for a shared library.
221+ if test -n "$acl_shlibext"; then
222+ if test -f "$dir/$libname$shrext"; then
223+ found_dir="$dir"
224+ found_so="$dir/$libname$shrext"
225 else
226- found_so="$dir/lib$name.dll.a"
227- fi
228- if test -f "$dir/lib$name.la"; then
229- found_la="$dir/lib$name.la"
230+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
231+ ver=`(cd "$dir" && \
232+ for f in "$libname$shrext".*; do echo "$f"; done \
233+ | sed -e "s,^$libname$shrext\\\\.,," \
234+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
235+ | sed 1q ) 2>/dev/null`
236+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
237+ found_dir="$dir"
238+ found_so="$dir/$libname$shrext.$ver"
239+ fi
240+ else
241+ eval library_names=\"$acl_library_names_spec\"
242+ for f in $library_names; do
243+ if test -f "$dir/$f"; then
244+ found_dir="$dir"
245+ found_so="$dir/$f"
246+ break
247+ fi
248+ done
249+ fi
250 fi
251- else
252- if test -f "$dir/lib$name.$libext"; then
253+ fi
254+ dnl Then look for a static library.
255+ if test "X$found_dir" = "X"; then
256+ if test -f "$dir/$libname.$acl_libext"; then
257 found_dir="$dir"
258- found_a="$dir/lib$name.$libext"
259- if test -f "$dir/lib$name.la"; then
260- found_la="$dir/lib$name.la"
261- fi
262+ found_a="$dir/$libname.$acl_libext"
263+ fi
264+ fi
265+ if test "X$found_dir" != "X"; then
266+ if test -f "$dir/$libname.la"; then
267+ found_la="$dir/$libname.la"
268 fi
269 fi
270 ;;
271@@ -282,12 +347,12 @@
272 ltrpathdirs="$ltrpathdirs $found_dir"
273 fi
274 dnl The hardcoding into $LIBNAME is system dependent.
275- if test "$hardcode_direct" = yes; then
276+ if test "$acl_hardcode_direct" = yes; then
277 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
278 dnl resulting binary.
279 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
280 else
281- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
282+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
283 dnl Use an explicit option to hardcode DIR into the resulting
284 dnl binary.
285 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
286@@ -318,13 +383,13 @@
287 if test -z "$haveit"; then
288 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
289 fi
290- if test "$hardcode_minus_L" != no; then
291+ if test "$acl_hardcode_minus_L" != no; then
292 dnl FIXME: Not sure whether we should use
293 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
294 dnl here.
295 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
296 else
297- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
298+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
299 dnl here, because this doesn't fit in flags passed to the
300 dnl compiler. So give up. No hardcoding. This affects only
301 dnl very old systems.
302@@ -512,18 +577,18 @@
303 done
304 done
305 if test "X$rpathdirs" != "X"; then
306- if test -n "$hardcode_libdir_separator"; then
307+ if test -n "$acl_hardcode_libdir_separator"; then
308 dnl Weird platform: only the last -rpath option counts, the user must
309 dnl pass all path elements in one option. We can arrange that for a
310 dnl single library, but not when more than one $LIBNAMEs are used.
311 alldirs=
312 for found_dir in $rpathdirs; do
313- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
314+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
315 done
316- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
317+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
318 acl_save_libdir="$libdir"
319 libdir="$alldirs"
320- eval flag=\"$hardcode_libdir_flag_spec\"
321+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
322 libdir="$acl_save_libdir"
323 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
324 else
325@@ -531,7 +596,7 @@
326 for found_dir in $rpathdirs; do
327 acl_save_libdir="$libdir"
328 libdir="$found_dir"
329- eval flag=\"$hardcode_libdir_flag_spec\"
330+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
331 libdir="$acl_save_libdir"
332 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
333 done
334@@ -642,3 +707,79 @@
335 fi
336 AC_SUBST([$1])
337 ])
338+
339+dnl For those cases where a variable contains several -L and -l options
340+dnl referring to unknown libraries and directories, this macro determines the
341+dnl necessary additional linker options for the runtime path.
342+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
343+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
344+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
345+dnl otherwise linking without libtool is assumed.
346+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
347+[
348+ AC_REQUIRE([AC_LIB_RPATH])
349+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
350+ $1=
351+ if test "$enable_rpath" != no; then
352+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
353+ dnl Use an explicit option to hardcode directories into the resulting
354+ dnl binary.
355+ rpathdirs=
356+ next=
357+ for opt in $2; do
358+ if test -n "$next"; then
359+ dir="$next"
360+ dnl No need to hardcode the standard /usr/lib.
361+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
362+ rpathdirs="$rpathdirs $dir"
363+ fi
364+ next=
365+ else
366+ case $opt in
367+ -L) next=yes ;;
368+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
369+ dnl No need to hardcode the standard /usr/lib.
370+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
371+ rpathdirs="$rpathdirs $dir"
372+ fi
373+ next= ;;
374+ *) next= ;;
375+ esac
376+ fi
377+ done
378+ if test "X$rpathdirs" != "X"; then
379+ if test -n ""$3""; then
380+ dnl libtool is used for linking. Use -R options.
381+ for dir in $rpathdirs; do
382+ $1="${$1}${$1:+ }-R$dir"
383+ done
384+ else
385+ dnl The linker is used for linking directly.
386+ if test -n "$acl_hardcode_libdir_separator"; then
387+ dnl Weird platform: only the last -rpath option counts, the user
388+ dnl must pass all path elements in one option.
389+ alldirs=
390+ for dir in $rpathdirs; do
391+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
392+ done
393+ acl_save_libdir="$libdir"
394+ libdir="$alldirs"
395+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
396+ libdir="$acl_save_libdir"
397+ $1="$flag"
398+ else
399+ dnl The -rpath options are cumulative.
400+ for dir in $rpathdirs; do
401+ acl_save_libdir="$libdir"
402+ libdir="$dir"
403+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
404+ libdir="$acl_save_libdir"
405+ $1="${$1}${$1:+ }$flag"
406+ done
407+ fi
408+ fi
409+ fi
410+ fi
411+ fi
412+ AC_SUBST([$1])
413+])
414Index: gettext-0.16.1/autoconf-lib-link/config.rpath
415===================================================================
416--- gettext-0.16.1.orig/autoconf-lib-link/config.rpath 2006-11-27 09:01:58.000000000 -0800
417+++ gettext-0.16.1/autoconf-lib-link/config.rpath 2011-03-17 00:33:23.336539490 -0700
418@@ -2,7 +2,7 @@
419 # Output a system dependent set of variables, describing how to set the
420 # run time search path of shared libraries in an executable.
421 #
422-# Copyright 1996-2006 Free Software Foundation, Inc.
423+# Copyright 1996-2007 Free Software Foundation, Inc.
424 # Taken from GNU libtool, 2001
425 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
426 #
427@@ -47,6 +47,18 @@
428 done
429 cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
430
431+# Code taken from libtool.m4's _LT_CC_BASENAME.
432+
433+for cc_temp in $CC""; do
434+ case $cc_temp in
435+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
436+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
437+ \-*) ;;
438+ *) break;;
439+ esac
440+done
441+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
442+
443 # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
444
445 wl=
446@@ -64,7 +76,14 @@
447 ;;
448 esac
449 ;;
450- mingw* | pw32* | os2*)
451+ darwin*)
452+ case $cc_basename in
453+ xlc*)
454+ wl='-Wl,'
455+ ;;
456+ esac
457+ ;;
458+ mingw* | cygwin* | pw32* | os2*)
459 ;;
460 hpux9* | hpux10* | hpux11*)
461 wl='-Wl,'
462@@ -74,7 +93,7 @@
463 ;;
464 newsos6)
465 ;;
466- linux*)
467+ linux* | k*bsd*-gnu)
468 case $cc_basename in
469 icc* | ecc*)
470 wl='-Wl,'
471@@ -100,7 +119,7 @@
472 osf3* | osf4* | osf5*)
473 wl='-Wl,'
474 ;;
475- sco3.2v5*)
476+ rdos*)
477 ;;
478 solaris*)
479 wl='-Wl,'
480@@ -108,11 +127,14 @@
481 sunos4*)
482 wl='-Qoption ld '
483 ;;
484- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
485+ sysv4 | sysv4.2uw2* | sysv4.3*)
486 wl='-Wl,'
487 ;;
488 sysv4*MP*)
489 ;;
490+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
491+ wl='-Wl,'
492+ ;;
493 unicos*)
494 wl='-Wl,'
495 ;;
496@@ -141,6 +163,10 @@
497 # we just hope/assume this is gcc and not c89 (= MSVC++)
498 with_gnu_ld=yes
499 ;;
500+ interix*)
501+ # we just hope/assume this is gcc and not c89 (= MSVC++)
502+ with_gnu_ld=yes
503+ ;;
504 openbsd*)
505 with_gnu_ld=no
506 ;;
507@@ -189,11 +215,11 @@
508 ld_shlibs=no
509 fi
510 ;;
511- interix3*)
512+ interix[3-9]*)
513 hardcode_direct=no
514 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
515 ;;
516- linux*)
517+ gnu* | linux* | k*bsd*-gnu)
518 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
519 :
520 else
521@@ -280,7 +306,7 @@
522 strings "$collect2name" | grep resolve_lib_name >/dev/null
523 then
524 # We have reworked collect2
525- hardcode_direct=yes
526+ :
527 else
528 # We have old collect2
529 hardcode_direct=unsupported
530@@ -359,7 +385,7 @@
531 hardcode_direct=yes
532 hardcode_minus_L=yes
533 ;;
534- freebsd* | kfreebsd*-gnu | dragonfly*)
535+ freebsd* | dragonfly*)
536 hardcode_libdir_flag_spec='-R$libdir'
537 hardcode_direct=yes
538 ;;
539@@ -412,18 +438,22 @@
540 hardcode_libdir_separator=:
541 ;;
542 openbsd*)
543- hardcode_direct=yes
544- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
545- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
546+ if test -f /usr/libexec/ld.so; then
547+ hardcode_direct=yes
548+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
549+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
550+ else
551+ case "$host_os" in
552+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
553+ hardcode_libdir_flag_spec='-R$libdir'
554+ ;;
555+ *)
556+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
557+ ;;
558+ esac
559+ fi
560 else
561- case "$host_os" in
562- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
563- hardcode_libdir_flag_spec='-R$libdir'
564- ;;
565- *)
566- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
567- ;;
568- esac
569+ ld_shlibs=no
570 fi
571 ;;
572 os2*)
573@@ -471,7 +501,7 @@
574 ld_shlibs=yes
575 fi
576 ;;
577- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
578+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* |sco3.2v5.0.[024]*)
579 ;;
580 sysv5* | sco3.2v5* | sco5v6*)
581 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
582@@ -488,33 +518,51 @@
583
584 # Check dynamic linker characteristics
585 # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
586+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
587+# only about the one the linker finds when passed -lNAME. This is the last
588+# element of library_names_spec in libtool.m4, or possibly two of them if the
589+# linker has special search rules.
590+library_names_spec= # the last element of library_names_spec in libtool.m4
591 libname_spec='lib$name'
592 case "$host_os" in
593 aix3*)
594+ library_names_spec='$libname.a'
595 ;;
596 aix4* | aix5*)
597+ library_names_spec='$libname$shrext'
598 ;;
599 amigaos*)
600+ library_names_spec='$libname.a'
601 ;;
602 beos*)
603+ library_names_spec='$libname$shrext'
604 ;;
605 bsdi[45]*)
606+ library_names_spec='$libname$shrext'
607 ;;
608 cygwin* | mingw* | pw32*)
609 shrext=.dll
610+ library_names_spec='$libname.dll.a $libname.lib'
611 ;;
612 darwin* | rhapsody*)
613 shrext=.dylib
614+ library_names_spec='$libname$shrext'
615 ;;
616 dgux*)
617+ library_names_spec='$libname$shrext'
618 ;;
619 freebsd1*)
620 ;;
621- kfreebsd*-gnu)
622- ;;
623 freebsd* | dragonfly*)
624+ case "$host_os" in
625+ freebsd[123]*)
626+ library_names_spec='$libname$shrext$versuffix' ;;
627+ *)
628+ library_names_spec='$libname$shrext' ;;
629+ esac
630 ;;
631 gnu*)
632+ library_names_spec='$libname$shrext'
633 ;;
634 hpux9* | hpux10* | hpux11*)
635 case $host_cpu in
636@@ -528,10 +576,13 @@
637 shrext=.sl
638 ;;
639 esac
640+ library_names_spec='$libname$shrext'
641 ;;
642- interix3*)
643+ interix[3-9]*)
644+ library_names_spec='$libname$shrext'
645 ;;
646 irix5* | irix6* | nonstopux*)
647+ library_names_spec='$libname$shrext'
648 case "$host_os" in
649 irix5* | nonstopux*)
650 libsuff= shlibsuff=
651@@ -548,33 +599,46 @@
652 ;;
653 linux*oldld* | linux*aout* | linux*coff*)
654 ;;
655- linux*)
656+ linux* | k*bsd*-gnu)
657+ library_names_spec='$libname$shrext'
658 ;;
659 knetbsd*-gnu)
660+ library_names_spec='$libname$shrext'
661 ;;
662 netbsd*)
663+ library_names_spec='$libname$shrext'
664 ;;
665 newsos6)
666+ library_names_spec='$libname$shrext'
667 ;;
668 nto-qnx*)
669+ library_names_spec='$libname$shrext'
670 ;;
671 openbsd*)
672+ library_names_spec='$libname$shrext$versuffix'
673 ;;
674 os2*)
675 libname_spec='$name'
676 shrext=.dll
677+ library_names_spec='$libname.a'
678 ;;
679 osf3* | osf4* | osf5*)
680+ library_names_spec='$libname$shrext'
681 ;;
682 solaris*)
683+ library_names_spec='$libname$shrext'
684 ;;
685 sunos4*)
686+ library_names_spec='$libname$shrext$versuffix'
687 ;;
688 sysv4 | sysv4.3*)
689+ library_names_spec='$libname$shrext'
690 ;;
691 sysv4*MP*)
692+ library_names_spec='$libname$shrext'
693 ;;
694 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
695+ library_names_spec='$libname$shrext'
696 ;;
697 uts4*)
698 ;;
699@@ -583,6 +647,8 @@
700 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
701 escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
702 shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
703+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
704+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
705 escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
706
707 LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
708@@ -596,6 +662,12 @@
709 # Shared library suffix (normally "so").
710 shlibext="$shlibext"
711
712+# Format of library name prefix.
713+libname_spec="$escaped_libname_spec"
714+
715+# Library names that the linker finds when passed -lNAME.
716+library_names_spec="$escaped_library_names_spec"
717+
718 # Flag to hardcode \$libdir into a binary during linking.
719 # This must work even if \$libdir does not exist.
720 hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
diff --git a/meta/recipes-core/gettext/gettext-0.18.3.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.18.3.1/parallel.patch
new file mode 100644
index 0000000000..f2c567d188
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.18.3.1/parallel.patch
@@ -0,0 +1,36 @@
1instal libgettextlib.a before removing it
2
3In a multiple job build, Makefile can simultaneously
4be installing and removing libgettextlib.a. We serialize
5the operations.
6
7Upstream-Status: Pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11--- a/gettext-tools/gnulib-lib/Makefile.am
12+++ b/gettext-tools/gnulib-lib/Makefile.am
13@@ -57,6 +57,10 @@ endif
14 # Rules generated and collected by gnulib-tool.
15 include Makefile.gnulib
16
17+# defined in Makefile.gnulib but missing this dependency
18+#
19+install-exec-clean: install-libLTLIBRARIES
20+
21 # Which classes to export from the shared library.
22 MOOPPFLAGS += --dllexport=styled_ostream
23
24--- a/gettext-tools/src/Makefile.am
25+++ b/gettext-tools/src/Makefile.am
26@@ -229,8 +229,8 @@ libgettextsrc_la_LDFLAGS += -Wl,--export
27 endif
28
29 # No need to install libgettextsrc.a, except on AIX.
30-install-exec-local: install-libLTLIBRARIES install-exec-clean
31-install-exec-clean:
32+install-exec-local: install-exec-clean
33+install-exec-clean: install-libLTLIBRARIES
34 case "@host_os@" in \
35 aix*) ;; \
36 *) $(RM) $(DESTDIR)$(libdir)/libgettextsrc.a ;; \
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/COPYING b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/COPYING
new file mode 100644
index 0000000000..3485c5a2cb
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/COPYING
@@ -0,0 +1,4 @@
1dnl Copyright (C) 1997-2010 Free Software Foundation, Inc.
2dnl This file is free software; the Free Software Foundation
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makefile.in.in b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makefile.in.in
new file mode 100644
index 0000000000..fabdc76c9c
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makefile.in.in
@@ -0,0 +1,454 @@
1# Makefile for PO directory in any package using GNU gettext.
2# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3#
4# This file can be copied and used freely without restrictions. It can
5# be used in projects which are not available under the GNU General Public
6# License but which still want to provide support for the GNU gettext
7# functionality.
8# Please note that the actual code of GNU gettext is covered by the GNU
9# General Public License and is *not* in the public domain.
10#
11# Origin: gettext-0.18.3
12GETTEXT_MACRO_VERSION = 0.18
13
14PACKAGE = @PACKAGE@
15VERSION = @VERSION@
16PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
17
18SED = @SED@
19SHELL = /bin/sh
20@SET_MAKE@
21
22srcdir = @srcdir@
23top_srcdir = @top_srcdir@
24VPATH = @srcdir@
25
26prefix = @prefix@
27exec_prefix = @exec_prefix@
28datarootdir = @datarootdir@
29datadir = @datadir@
30localedir = @localedir@
31gettextsrcdir = $(datadir)/gettext/po
32
33INSTALL = @INSTALL@
34INSTALL_DATA = @INSTALL_DATA@
35
36# We use $(mkdir_p).
37# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
38# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
39# @install_sh@ does not start with $(SHELL), so we add it.
40# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
41# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
42# versions, $(mkinstalldirs) and $(install_sh) are unused.
43mkinstalldirs = $(SHELL) @install_sh@ -d
44install_sh = $(SHELL) @install_sh@
45MKDIR_P = @MKDIR_P@
46mkdir_p = @mkdir_p@
47
48GMSGFMT_ = @GMSGFMT@
49GMSGFMT_no = @GMSGFMT@
50GMSGFMT_yes = @GMSGFMT_015@
51GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
52MSGFMT_ = @MSGFMT@
53MSGFMT_no = @MSGFMT@
54MSGFMT_yes = @MSGFMT_015@
55MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
56XGETTEXT_ = @XGETTEXT@
57XGETTEXT_no = @XGETTEXT@
58XGETTEXT_yes = @XGETTEXT_015@
59XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
60MSGMERGE = msgmerge
61MSGMERGE_UPDATE = @MSGMERGE@ --update
62MSGINIT = msginit
63MSGCONV = msgconv
64MSGFILTER = msgfilter
65
66POFILES = @POFILES@
67GMOFILES = @GMOFILES@
68UPDATEPOFILES = @UPDATEPOFILES@
69DUMMYPOFILES = @DUMMYPOFILES@
70DISTFILES.common = Makefile.in.in remove-potcdate.sin \
71$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
72DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
73$(POFILES) $(GMOFILES) \
74$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
75
76POTFILES = \
77
78CATALOGS = @CATALOGS@
79
80# Makevars gets inserted here. (Don't remove this line!)
81
82.SUFFIXES:
83.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
84
85.po.mo:
86 @echo "$(MSGFMT) -c -o $@ $<"; \
87 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
88
89.po.gmo:
90 @lang=`echo $* | sed -e 's,.*/,,'`; \
91 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
92 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
93 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
94
95.sin.sed:
96 sed -e '/^#/d' $< > t-$@
97 mv t-$@ $@
98
99
100all: all-@USE_NLS@
101
102all-yes: stamp-po
103all-no:
104
105# Ensure that the gettext macros and this Makefile.in.in are in sync.
106CHECK_MACRO_VERSION = \
107 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
108 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
109 exit 1; \
110 }
111
112# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
113# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
114# we don't want to bother translators with empty POT files). We assume that
115# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
116# In this case, stamp-po is a nop (i.e. a phony target).
117
118# stamp-po is a timestamp denoting the last time at which the CATALOGS have
119# been loosely updated. Its purpose is that when a developer or translator
120# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
121# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
122# invocations of "make" will do nothing. This timestamp would not be necessary
123# if updating the $(CATALOGS) would always touch them; however, the rule for
124# $(POFILES) has been designed to not touch files that don't need to be
125# changed.
126stamp-po: $(srcdir)/$(DOMAIN).pot
127 @$(CHECK_MACRO_VERSION)
128 test ! -f $(srcdir)/$(DOMAIN).pot || \
129 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
130 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
131 echo "touch stamp-po" && \
132 echo timestamp > stamp-poT && \
133 mv stamp-poT stamp-po; \
134 }
135
136# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
137# otherwise packages like GCC can not be built if only parts of the source
138# have been downloaded.
139
140# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
141# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
142# The determination of whether the package xyz is a GNU one is based on the
143# heuristic whether some file in the top level directory mentions "GNU xyz".
144# If GNU 'find' is available, we avoid grepping through monster files.
145$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
146 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
147 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
148 else \
149 LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
150 fi; \
151 } | grep -v 'libtool:' >/dev/null; then \
152 package_gnu='GNU '; \
153 else \
154 package_gnu=''; \
155 fi; \
156 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
157 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
158 else \
159 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
160 fi; \
161 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
162 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
163 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
164 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
165 --files-from=$(srcdir)/POTFILES.in \
166 --copyright-holder='$(COPYRIGHT_HOLDER)' \
167 --msgid-bugs-address="$$msgid_bugs_address" \
168 ;; \
169 *) \
170 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
171 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
172 --files-from=$(srcdir)/POTFILES.in \
173 --copyright-holder='$(COPYRIGHT_HOLDER)' \
174 --package-name="$${package_gnu}@PACKAGE@" \
175 --package-version='@VERSION@' \
176 --msgid-bugs-address="$$msgid_bugs_address" \
177 ;; \
178 esac
179 test ! -f $(DOMAIN).po || { \
180 if test -f $(srcdir)/$(DOMAIN).pot; then \
181 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
182 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
183 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
184 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
185 else \
186 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
187 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
188 fi; \
189 else \
190 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
191 fi; \
192 }
193
194# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
195# every "make" invocation, only create it when it is missing.
196# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
197$(srcdir)/$(DOMAIN).pot:
198 $(MAKE) $(DOMAIN).pot-update
199
200# This target rebuilds a PO file if $(DOMAIN).pot has changed.
201# Note that a PO file is not touched if it doesn't need to be changed.
202$(POFILES): $(srcdir)/$(DOMAIN).pot
203 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
204 if test -f "$(srcdir)/$${lang}.po"; then \
205 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
206 echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
207 cd $(srcdir) \
208 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
209 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
210 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
211 *) \
212 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
213 esac; \
214 }; \
215 else \
216 $(MAKE) $${lang}.po-create; \
217 fi
218
219
220install: install-exec install-data
221install-exec:
222install-data: install-data-@USE_NLS@
223 if test "$(PACKAGE)" = "gettext-tools"; then \
224 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
225 for file in $(DISTFILES.common) Makevars.template; do \
226 $(INSTALL_DATA) $(srcdir)/$$file \
227 $(DESTDIR)$(gettextsrcdir)/$$file; \
228 done; \
229 for file in Makevars; do \
230 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
231 done; \
232 else \
233 : ; \
234 fi
235install-data-no: all
236install-data-yes: all
237 @catalogs='$(CATALOGS)'; \
238 for cat in $$catalogs; do \
239 cat=`basename $$cat`; \
240 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
241 dir=$(localedir)/$$lang/LC_MESSAGES; \
242 $(mkdir_p) $(DESTDIR)$$dir; \
243 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
244 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
245 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
246 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
247 if test -n "$$lc"; then \
248 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
249 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
250 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
251 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
252 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
253 for file in *; do \
254 if test -f $$file; then \
255 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
256 fi; \
257 done); \
258 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
259 else \
260 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
261 :; \
262 else \
263 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
264 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
265 fi; \
266 fi; \
267 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
268 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
269 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
270 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
271 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
272 fi; \
273 done; \
274 done
275
276install-strip: install
277
278installdirs: installdirs-exec installdirs-data
279installdirs-exec:
280installdirs-data: installdirs-data-@USE_NLS@
281 if test "$(PACKAGE)" = "gettext-tools"; then \
282 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
283 else \
284 : ; \
285 fi
286installdirs-data-no:
287installdirs-data-yes:
288 @catalogs='$(CATALOGS)'; \
289 for cat in $$catalogs; do \
290 cat=`basename $$cat`; \
291 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
292 dir=$(localedir)/$$lang/LC_MESSAGES; \
293 $(mkdir_p) $(DESTDIR)$$dir; \
294 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
295 if test -n "$$lc"; then \
296 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
297 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
298 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
299 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
300 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
301 for file in *; do \
302 if test -f $$file; then \
303 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
304 fi; \
305 done); \
306 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
307 else \
308 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
309 :; \
310 else \
311 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
312 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
313 fi; \
314 fi; \
315 fi; \
316 done; \
317 done
318
319# Define this as empty until I found a useful application.
320installcheck:
321
322uninstall: uninstall-exec uninstall-data
323uninstall-exec:
324uninstall-data: uninstall-data-@USE_NLS@
325 if test "$(PACKAGE)" = "gettext-tools"; then \
326 for file in $(DISTFILES.common) Makevars.template; do \
327 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
328 done; \
329 else \
330 : ; \
331 fi
332uninstall-data-no:
333uninstall-data-yes:
334 catalogs='$(CATALOGS)'; \
335 for cat in $$catalogs; do \
336 cat=`basename $$cat`; \
337 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
338 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
339 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
340 done; \
341 done
342
343check: all
344
345info dvi ps pdf html tags TAGS ctags CTAGS ID:
346
347mostlyclean:
348 rm -f remove-potcdate.sed
349 rm -f stamp-poT
350 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
351 rm -fr *.o
352
353clean: mostlyclean
354
355distclean: clean
356 rm -f Makefile Makefile.in POTFILES *.mo
357
358maintainer-clean: distclean
359 @echo "This command is intended for maintainers to use;"
360 @echo "it deletes files that may require special tools to rebuild."
361 rm -f stamp-po $(GMOFILES)
362
363distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
364dist distdir:
365 $(MAKE) update-po
366 @$(MAKE) dist2
367# This is a separate target because 'update-po' must be executed before.
368dist2: stamp-po $(DISTFILES)
369 dists="$(DISTFILES)"; \
370 if test "$(PACKAGE)" = "gettext-tools"; then \
371 dists="$$dists Makevars.template"; \
372 fi; \
373 if test -f $(srcdir)/$(DOMAIN).pot; then \
374 dists="$$dists $(DOMAIN).pot stamp-po"; \
375 fi; \
376 if test -f $(srcdir)/ChangeLog; then \
377 dists="$$dists ChangeLog"; \
378 fi; \
379 for i in 0 1 2 3 4 5 6 7 8 9; do \
380 if test -f $(srcdir)/ChangeLog.$$i; then \
381 dists="$$dists ChangeLog.$$i"; \
382 fi; \
383 done; \
384 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
385 for file in $$dists; do \
386 if test -f $$file; then \
387 cp -p $$file $(distdir) || exit 1; \
388 else \
389 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
390 fi; \
391 done
392
393update-po: Makefile
394 $(MAKE) $(DOMAIN).pot-update
395 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
396 $(MAKE) update-gmo
397
398# General rule for creating PO files.
399
400.nop.po-create:
401 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
402 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
403 exit 1
404
405# General rule for updating PO files.
406
407.nop.po-update:
408 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
409 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
410 tmpdir=`pwd`; \
411 echo "$$lang:"; \
412 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
413 echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
414 cd $(srcdir); \
415 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
416 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
417 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
418 *) \
419 $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
420 esac; \
421 }; then \
422 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
423 rm -f $$tmpdir/$$lang.new.po; \
424 else \
425 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
426 :; \
427 else \
428 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
429 exit 1; \
430 fi; \
431 fi; \
432 else \
433 echo "msgmerge for $$lang.po failed!" 1>&2; \
434 rm -f $$tmpdir/$$lang.new.po; \
435 fi
436
437$(DUMMYPOFILES):
438
439update-gmo: Makefile $(GMOFILES)
440 @:
441
442# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
443# because execution permission bits may not work on the current file system.
444# Use @SHELL@, which is the shell determined by autoconf for the use by its
445# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
446Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
447 cd $(top_builddir) \
448 && @SHELL@ ./config.status $(subdir)/$@.in po-directories
449
450force:
451
452# Tell versions [3.59,3.63) of GNU make not to export all variables.
453# Otherwise a system limit (for SysV at least) may be exceeded.
454.NOEXPORT:
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makevars.template b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makevars.template
new file mode 100644
index 0000000000..4a9ff7d231
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/Makevars.template
@@ -0,0 +1,53 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the email address or URL to which the translators shall report
24# bugs in the untranslated strings:
25# - Strings which are not entire sentences, see the maintainer guidelines
26# in the GNU gettext documentation, section 'Preparing Strings'.
27# - Strings which use unclear terms or require additional context to be
28# understood.
29# - Strings which make invalid assumptions about notation of date, time or
30# money.
31# - Pluralisation problems.
32# - Incorrect English spelling.
33# - Incorrect formatting.
34# It can be your email address, or a mailing list address where translators
35# can write to without being subscribed, or the URL of a web page through
36# which the translators can contact you.
37MSGID_BUGS_ADDRESS =
38
39# This is the list of locale categories, beyond LC_MESSAGES, for which the
40# message catalogs shall be used. It is usually empty.
41EXTRA_LOCALE_CATEGORIES =
42
43# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
44# context. Possible values are "yes" and "no". Set this to yes if the
45# package uses functions taking also a message context, like pgettext(), or
46# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
47USE_MSGCTXT = no
48
49# These options get passed to msgmerge.
50# Useful options are in particular:
51# --previous to keep previous msgids of translated messages,
52# --quiet to reduce the verbosity.
53MSGMERGE_OPTIONS =
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/aclocal.tgz
new file mode 100644
index 0000000000..e0335a3d1c
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/aclocal.tgz
Binary files differ
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/config.rpath b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/config.rpath
new file mode 100755
index 0000000000..c38b914d6b
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/config.rpath
@@ -0,0 +1,690 @@
1#! /bin/sh
2# Output a system dependent set of variables, describing how to set the
3# run time search path of shared libraries in an executable.
4#
5# Copyright 1996-2013 Free Software Foundation, Inc.
6# Taken from GNU libtool, 2001
7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8#
9# This file is free software; the Free Software Foundation gives
10# unlimited permission to copy and/or distribute it, with or without
11# modifications, as long as this notice is preserved.
12#
13# The first argument passed to this file is the canonical host specification,
14# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
15# or
16# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
17# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
18# should be set by the caller.
19#
20# The set of defined variables is at the end of this script.
21
22# Known limitations:
23# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
24# than 256 bytes, otherwise the compiler driver will dump core. The only
25# known workaround is to choose shorter directory names for the build
26# directory and/or the installation directory.
27
28# All known linkers require a '.a' archive for static linking (except MSVC,
29# which needs '.lib').
30libext=a
31shrext=.so
32
33host="$1"
34host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
35host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
36host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
37
38# Code taken from libtool.m4's _LT_CC_BASENAME.
39
40for cc_temp in $CC""; do
41 case $cc_temp in
42 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
43 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
44 \-*) ;;
45 *) break;;
46 esac
47done
48cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
49
50# Code taken from libtool.m4's _LT_COMPILER_PIC.
51
52wl=
53if test "$GCC" = yes; then
54 wl='-Wl,'
55else
56 case "$host_os" in
57 aix*)
58 wl='-Wl,'
59 ;;
60 mingw* | cygwin* | pw32* | os2* | cegcc*)
61 ;;
62 hpux9* | hpux10* | hpux11*)
63 wl='-Wl,'
64 ;;
65 irix5* | irix6* | nonstopux*)
66 wl='-Wl,'
67 ;;
68 linux* | k*bsd*-gnu | kopensolaris*-gnu)
69 case $cc_basename in
70 ecc*)
71 wl='-Wl,'
72 ;;
73 icc* | ifort*)
74 wl='-Wl,'
75 ;;
76 lf95*)
77 wl='-Wl,'
78 ;;
79 nagfor*)
80 wl='-Wl,-Wl,,'
81 ;;
82 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
83 wl='-Wl,'
84 ;;
85 ccc*)
86 wl='-Wl,'
87 ;;
88 xl* | bgxl* | bgf* | mpixl*)
89 wl='-Wl,'
90 ;;
91 como)
92 wl='-lopt='
93 ;;
94 *)
95 case `$CC -V 2>&1 | sed 5q` in
96 *Sun\ F* | *Sun*Fortran*)
97 wl=
98 ;;
99 *Sun\ C*)
100 wl='-Wl,'
101 ;;
102 esac
103 ;;
104 esac
105 ;;
106 newsos6)
107 ;;
108 *nto* | *qnx*)
109 ;;
110 osf3* | osf4* | osf5*)
111 wl='-Wl,'
112 ;;
113 rdos*)
114 ;;
115 solaris*)
116 case $cc_basename in
117 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
118 wl='-Qoption ld '
119 ;;
120 *)
121 wl='-Wl,'
122 ;;
123 esac
124 ;;
125 sunos4*)
126 wl='-Qoption ld '
127 ;;
128 sysv4 | sysv4.2uw2* | sysv4.3*)
129 wl='-Wl,'
130 ;;
131 sysv4*MP*)
132 ;;
133 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
134 wl='-Wl,'
135 ;;
136 unicos*)
137 wl='-Wl,'
138 ;;
139 uts4*)
140 ;;
141 esac
142fi
143
144# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
145
146hardcode_libdir_flag_spec=
147hardcode_libdir_separator=
148hardcode_direct=no
149hardcode_minus_L=no
150
151case "$host_os" in
152 cygwin* | mingw* | pw32* | cegcc*)
153 # FIXME: the MSVC++ port hasn't been tested in a loooong time
154 # When not using gcc, we currently assume that we are using
155 # Microsoft Visual C++.
156 if test "$GCC" != yes; then
157 with_gnu_ld=no
158 fi
159 ;;
160 interix*)
161 # we just hope/assume this is gcc and not c89 (= MSVC++)
162 with_gnu_ld=yes
163 ;;
164 openbsd*)
165 with_gnu_ld=no
166 ;;
167esac
168
169ld_shlibs=yes
170if test "$with_gnu_ld" = yes; then
171 # Set some defaults for GNU ld with shared library support. These
172 # are reset later if shared libraries are not supported. Putting them
173 # here allows them to be overridden if necessary.
174 # Unlike libtool, we use -rpath here, not --rpath, since the documented
175 # option of GNU ld is called -rpath, not --rpath.
176 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
177 case "$host_os" in
178 aix[3-9]*)
179 # On AIX/PPC, the GNU linker is very broken
180 if test "$host_cpu" != ia64; then
181 ld_shlibs=no
182 fi
183 ;;
184 amigaos*)
185 case "$host_cpu" in
186 powerpc)
187 ;;
188 m68k)
189 hardcode_libdir_flag_spec='-L$libdir'
190 hardcode_minus_L=yes
191 ;;
192 esac
193 ;;
194 beos*)
195 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
196 :
197 else
198 ld_shlibs=no
199 fi
200 ;;
201 cygwin* | mingw* | pw32* | cegcc*)
202 # hardcode_libdir_flag_spec is actually meaningless, as there is
203 # no search path for DLLs.
204 hardcode_libdir_flag_spec='-L$libdir'
205 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
206 :
207 else
208 ld_shlibs=no
209 fi
210 ;;
211 haiku*)
212 ;;
213 interix[3-9]*)
214 hardcode_direct=no
215 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
216 ;;
217 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
218 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
219 :
220 else
221 ld_shlibs=no
222 fi
223 ;;
224 netbsd*)
225 ;;
226 solaris*)
227 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
228 ld_shlibs=no
229 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
230 :
231 else
232 ld_shlibs=no
233 fi
234 ;;
235 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
236 case `$LD -v 2>&1` in
237 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
238 ld_shlibs=no
239 ;;
240 *)
241 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
242 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
243 else
244 ld_shlibs=no
245 fi
246 ;;
247 esac
248 ;;
249 sunos4*)
250 hardcode_direct=yes
251 ;;
252 *)
253 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
254 :
255 else
256 ld_shlibs=no
257 fi
258 ;;
259 esac
260 if test "$ld_shlibs" = no; then
261 hardcode_libdir_flag_spec=
262 fi
263else
264 case "$host_os" in
265 aix3*)
266 # Note: this linker hardcodes the directories in LIBPATH if there
267 # are no directories specified by -L.
268 hardcode_minus_L=yes
269 if test "$GCC" = yes; then
270 # Neither direct hardcoding nor static linking is supported with a
271 # broken collect2.
272 hardcode_direct=unsupported
273 fi
274 ;;
275 aix[4-9]*)
276 if test "$host_cpu" = ia64; then
277 # On IA64, the linker does run time linking by default, so we don't
278 # have to do anything special.
279 aix_use_runtimelinking=no
280 else
281 aix_use_runtimelinking=no
282 # Test if we are trying to use run time linking or normal
283 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
284 # need to do runtime linking.
285 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
286 for ld_flag in $LDFLAGS; do
287 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
288 aix_use_runtimelinking=yes
289 break
290 fi
291 done
292 ;;
293 esac
294 fi
295 hardcode_direct=yes
296 hardcode_libdir_separator=':'
297 if test "$GCC" = yes; then
298 case $host_os in aix4.[012]|aix4.[012].*)
299 collect2name=`${CC} -print-prog-name=collect2`
300 if test -f "$collect2name" && \
301 strings "$collect2name" | grep resolve_lib_name >/dev/null
302 then
303 # We have reworked collect2
304 :
305 else
306 # We have old collect2
307 hardcode_direct=unsupported
308 hardcode_minus_L=yes
309 hardcode_libdir_flag_spec='-L$libdir'
310 hardcode_libdir_separator=
311 fi
312 ;;
313 esac
314 fi
315 # Begin _LT_AC_SYS_LIBPATH_AIX.
316 echo 'int main () { return 0; }' > conftest.c
317 ${CC} ${LDFLAGS} conftest.c -o conftest
318 aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
319}'`
320 if test -z "$aix_libpath"; then
321 aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
322}'`
323 fi
324 if test -z "$aix_libpath"; then
325 aix_libpath="/usr/lib:/lib"
326 fi
327 rm -f conftest.c conftest
328 # End _LT_AC_SYS_LIBPATH_AIX.
329 if test "$aix_use_runtimelinking" = yes; then
330 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
331 else
332 if test "$host_cpu" = ia64; then
333 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
334 else
335 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
336 fi
337 fi
338 ;;
339 amigaos*)
340 case "$host_cpu" in
341 powerpc)
342 ;;
343 m68k)
344 hardcode_libdir_flag_spec='-L$libdir'
345 hardcode_minus_L=yes
346 ;;
347 esac
348 ;;
349 bsdi[45]*)
350 ;;
351 cygwin* | mingw* | pw32* | cegcc*)
352 # When not using gcc, we currently assume that we are using
353 # Microsoft Visual C++.
354 # hardcode_libdir_flag_spec is actually meaningless, as there is
355 # no search path for DLLs.
356 hardcode_libdir_flag_spec=' '
357 libext=lib
358 ;;
359 darwin* | rhapsody*)
360 hardcode_direct=no
361 if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
362 :
363 else
364 ld_shlibs=no
365 fi
366 ;;
367 dgux*)
368 hardcode_libdir_flag_spec='-L$libdir'
369 ;;
370 freebsd2.2*)
371 hardcode_libdir_flag_spec='-R$libdir'
372 hardcode_direct=yes
373 ;;
374 freebsd2*)
375 hardcode_direct=yes
376 hardcode_minus_L=yes
377 ;;
378 freebsd* | dragonfly*)
379 hardcode_libdir_flag_spec='-R$libdir'
380 hardcode_direct=yes
381 ;;
382 hpux9*)
383 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
384 hardcode_libdir_separator=:
385 hardcode_direct=yes
386 # hardcode_minus_L: Not really in the search PATH,
387 # but as the default location of the library.
388 hardcode_minus_L=yes
389 ;;
390 hpux10*)
391 if test "$with_gnu_ld" = no; then
392 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
393 hardcode_libdir_separator=:
394 hardcode_direct=yes
395 # hardcode_minus_L: Not really in the search PATH,
396 # but as the default location of the library.
397 hardcode_minus_L=yes
398 fi
399 ;;
400 hpux11*)
401 if test "$with_gnu_ld" = no; then
402 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
403 hardcode_libdir_separator=:
404 case $host_cpu in
405 hppa*64*|ia64*)
406 hardcode_direct=no
407 ;;
408 *)
409 hardcode_direct=yes
410 # hardcode_minus_L: Not really in the search PATH,
411 # but as the default location of the library.
412 hardcode_minus_L=yes
413 ;;
414 esac
415 fi
416 ;;
417 irix5* | irix6* | nonstopux*)
418 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
419 hardcode_libdir_separator=:
420 ;;
421 netbsd*)
422 hardcode_libdir_flag_spec='-R$libdir'
423 hardcode_direct=yes
424 ;;
425 newsos6)
426 hardcode_direct=yes
427 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
428 hardcode_libdir_separator=:
429 ;;
430 *nto* | *qnx*)
431 ;;
432 openbsd*)
433 if test -f /usr/libexec/ld.so; then
434 hardcode_direct=yes
435 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
436 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
437 else
438 case "$host_os" in
439 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
440 hardcode_libdir_flag_spec='-R$libdir'
441 ;;
442 *)
443 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
444 ;;
445 esac
446 fi
447 else
448 ld_shlibs=no
449 fi
450 ;;
451 os2*)
452 hardcode_libdir_flag_spec='-L$libdir'
453 hardcode_minus_L=yes
454 ;;
455 osf3*)
456 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
457 hardcode_libdir_separator=:
458 ;;
459 osf4* | osf5*)
460 if test "$GCC" = yes; then
461 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
462 else
463 # Both cc and cxx compiler support -rpath directly
464 hardcode_libdir_flag_spec='-rpath $libdir'
465 fi
466 hardcode_libdir_separator=:
467 ;;
468 solaris*)
469 hardcode_libdir_flag_spec='-R$libdir'
470 ;;
471 sunos4*)
472 hardcode_libdir_flag_spec='-L$libdir'
473 hardcode_direct=yes
474 hardcode_minus_L=yes
475 ;;
476 sysv4)
477 case $host_vendor in
478 sni)
479 hardcode_direct=yes # is this really true???
480 ;;
481 siemens)
482 hardcode_direct=no
483 ;;
484 motorola)
485 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
486 ;;
487 esac
488 ;;
489 sysv4.3*)
490 ;;
491 sysv4*MP*)
492 if test -d /usr/nec; then
493 ld_shlibs=yes
494 fi
495 ;;
496 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
497 ;;
498 sysv5* | sco3.2v5* | sco5v6*)
499 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
500 hardcode_libdir_separator=':'
501 ;;
502 uts4*)
503 hardcode_libdir_flag_spec='-L$libdir'
504 ;;
505 *)
506 ld_shlibs=no
507 ;;
508 esac
509fi
510
511# Check dynamic linker characteristics
512# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
513# Unlike libtool.m4, here we don't care about _all_ names of the library, but
514# only about the one the linker finds when passed -lNAME. This is the last
515# element of library_names_spec in libtool.m4, or possibly two of them if the
516# linker has special search rules.
517library_names_spec= # the last element of library_names_spec in libtool.m4
518libname_spec='lib$name'
519case "$host_os" in
520 aix3*)
521 library_names_spec='$libname.a'
522 ;;
523 aix[4-9]*)
524 library_names_spec='$libname$shrext'
525 ;;
526 amigaos*)
527 case "$host_cpu" in
528 powerpc*)
529 library_names_spec='$libname$shrext' ;;
530 m68k)
531 library_names_spec='$libname.a' ;;
532 esac
533 ;;
534 beos*)
535 library_names_spec='$libname$shrext'
536 ;;
537 bsdi[45]*)
538 library_names_spec='$libname$shrext'
539 ;;
540 cygwin* | mingw* | pw32* | cegcc*)
541 shrext=.dll
542 library_names_spec='$libname.dll.a $libname.lib'
543 ;;
544 darwin* | rhapsody*)
545 shrext=.dylib
546 library_names_spec='$libname$shrext'
547 ;;
548 dgux*)
549 library_names_spec='$libname$shrext'
550 ;;
551 freebsd* | dragonfly*)
552 case "$host_os" in
553 freebsd[123]*)
554 library_names_spec='$libname$shrext$versuffix' ;;
555 *)
556 library_names_spec='$libname$shrext' ;;
557 esac
558 ;;
559 gnu*)
560 library_names_spec='$libname$shrext'
561 ;;
562 haiku*)
563 library_names_spec='$libname$shrext'
564 ;;
565 hpux9* | hpux10* | hpux11*)
566 case $host_cpu in
567 ia64*)
568 shrext=.so
569 ;;
570 hppa*64*)
571 shrext=.sl
572 ;;
573 *)
574 shrext=.sl
575 ;;
576 esac
577 library_names_spec='$libname$shrext'
578 ;;
579 interix[3-9]*)
580 library_names_spec='$libname$shrext'
581 ;;
582 irix5* | irix6* | nonstopux*)
583 library_names_spec='$libname$shrext'
584 case "$host_os" in
585 irix5* | nonstopux*)
586 libsuff= shlibsuff=
587 ;;
588 *)
589 case $LD in
590 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
591 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
592 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
593 *) libsuff= shlibsuff= ;;
594 esac
595 ;;
596 esac
597 ;;
598 linux*oldld* | linux*aout* | linux*coff*)
599 ;;
600 linux* | k*bsd*-gnu | kopensolaris*-gnu)
601 library_names_spec='$libname$shrext'
602 ;;
603 knetbsd*-gnu)
604 library_names_spec='$libname$shrext'
605 ;;
606 netbsd*)
607 library_names_spec='$libname$shrext'
608 ;;
609 newsos6)
610 library_names_spec='$libname$shrext'
611 ;;
612 *nto* | *qnx*)
613 library_names_spec='$libname$shrext'
614 ;;
615 openbsd*)
616 library_names_spec='$libname$shrext$versuffix'
617 ;;
618 os2*)
619 libname_spec='$name'
620 shrext=.dll
621 library_names_spec='$libname.a'
622 ;;
623 osf3* | osf4* | osf5*)
624 library_names_spec='$libname$shrext'
625 ;;
626 rdos*)
627 ;;
628 solaris*)
629 library_names_spec='$libname$shrext'
630 ;;
631 sunos4*)
632 library_names_spec='$libname$shrext$versuffix'
633 ;;
634 sysv4 | sysv4.3*)
635 library_names_spec='$libname$shrext'
636 ;;
637 sysv4*MP*)
638 library_names_spec='$libname$shrext'
639 ;;
640 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
641 library_names_spec='$libname$shrext'
642 ;;
643 tpf*)
644 library_names_spec='$libname$shrext'
645 ;;
646 uts4*)
647 library_names_spec='$libname$shrext'
648 ;;
649esac
650
651sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
652escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
653shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
654escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
655escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
656escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
657
658LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
659
660# How to pass a linker flag through the compiler.
661wl="$escaped_wl"
662
663# Static library suffix (normally "a").
664libext="$libext"
665
666# Shared library suffix (normally "so").
667shlibext="$shlibext"
668
669# Format of library name prefix.
670libname_spec="$escaped_libname_spec"
671
672# Library names that the linker finds when passed -lNAME.
673library_names_spec="$escaped_library_names_spec"
674
675# Flag to hardcode \$libdir into a binary during linking.
676# This must work even if \$libdir does not exist.
677hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
678
679# Whether we need a single -rpath flag with a separated argument.
680hardcode_libdir_separator="$hardcode_libdir_separator"
681
682# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
683# resulting binary.
684hardcode_direct="$hardcode_direct"
685
686# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
687# resulting binary.
688hardcode_minus_L="$hardcode_minus_L"
689
690EOF
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/remove-potcdate.sin
new file mode 100644
index 0000000000..2436c49e78
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.18.3.1/remove-potcdate.sin
@@ -0,0 +1,19 @@
1# Sed script that remove the POT-Creation-Date line in the header entry
2# from a POT file.
3#
4# The distinction between the first and the following occurrences of the
5# pattern is achieved by looking at the hold space.
6/^"POT-Creation-Date: .*"$/{
7x
8# Test if the hold space is empty.
9s/P/P/
10ta
11# Yes it was empty. First occurrence. Remove the line.
12g
13d
14bb
15:a
16# The hold space was nonempty. Following occurrences. Do nothing.
17x
18:b
19}
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.1.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.1.bb
new file mode 100644
index 0000000000..febad7af4e
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.1.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Minimal gettext for supporting native autoconf/automake"
2DESCRIPTION = "Contains the m4 macros sufficient to support building \
3autoconf/automake. This provides a significant build time speedup by \
4the removal of gettext-native from most dependency chains (now only \
5needed for gettext for the target)."
6SRC_URI = "file://aclocal.tgz \
7 file://config.rpath \
8 file://Makefile.in.in \
9 file://remove-potcdate.sin \
10 file://COPYING"
11
12INHIBIT_DEFAULT_DEPS = "1"
13INHIBIT_AUTOTOOLS_DEPS = "1"
14
15LICENSE = "FSF-Unlimited"
16LIC_FILES_CHKSUM = "file://COPYING;md5=0854da868a929923087141d9d7aba7d5"
17
18inherit native
19
20PR = "r0"
21
22S = "${WORKDIR}"
23
24do_install () {
25 install -d ${D}${datadir}/aclocal/
26 cp ${WORKDIR}/*.m4 ${D}${datadir}/aclocal/
27 install -d ${D}${datadir}/gettext/po/
28 cp ${WORKDIR}/config.rpath ${D}${datadir}/gettext/
29 cp ${WORKDIR}/Makefile.in.in ${D}${datadir}/gettext/po/
30 cp ${WORKDIR}/remove-potcdate.sin ${D}${datadir}/gettext/po/
31}
diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
new file mode 100644
index 0000000000..db8314b02c
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -0,0 +1,97 @@
1DESCRIPTION = "The GNU internationalization library."
2HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
3SECTION = "libs"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=9ea3144f04c41cd2eada5d3f472e6ea5"
6
7PR = "r6"
8DEPENDS = "virtual/libiconv"
9DEPENDS_class-native = ""
10PROVIDES = "virtual/libintl virtual/gettext"
11PROVIDES_class-native = ""
12
13SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
14 file://gettext-vpath.patch \
15 file://linklib_from_0.17.patch \
16 file://gettext-autoconf-lib-link-no-L.patch \
17 file://disable_java.patch \
18 file://fix_aclocal_version.patch \
19 file://fix_gnu_source_circular.patch \
20 file://hardcode_macro_version.patch \
21 "
22
23
24SRC_URI_append_linux-uclibc = " file://gettext-error_print_progname.patch"
25SRC_URI_append_linux-uclibceabi = " file://gettext-error_print_progname.patch"
26
27SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
28SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
29
30PARALLEL_MAKE = ""
31
32inherit autotools
33
34EXTRA_OECONF += "--without-lisp --disable-csharp --disable-openmp --without-emacs"
35acpaths = '-I ${S}/autoconf-lib-link/m4/ \
36 -I ${S}/gettext-runtime/m4 \
37 -I ${S}/gettext-tools/m4'
38
39do_configure_prepend() {
40 rm -f ${S}/config/m4/libtool.m4
41}
42
43# these lack the .x behind the .so, but shouldn't be in the -dev package
44# Otherwise you get the following results:
45# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
46# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
47# because gettext depends on gettext-dev, which pulls in more -dev packages:
48# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
49# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
50# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
51# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
52
53PACKAGES =+ "libgettextlib libgettextsrc"
54FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
55FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
56
57PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-staticdev gettext-runtime-doc"
58
59FILES_${PN} += "${libdir}/${BPN}/*"
60
61FILES_gettext-runtime = "${bindir}/gettext \
62 ${bindir}/ngettext \
63 ${bindir}/envsubst \
64 ${bindir}/gettext.sh \
65 ${libdir}/libasprintf${SODEV} \
66 ${libdir}/GNU.Gettext.dll \
67 "
68FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
69 ${libdir}/charset.alias \
70 "
71FILES_gettext-runtime-staticdev += "${libdir}/libasprintf.a"
72FILES_gettext-runtime-dev += "${includedir}/autosprintf.h \
73 ${libdir}/libasprintf${SOLIBDEV}"
74FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
75 ${includedir}/libintl.h \
76 "
77FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
78 ${mandir}/man1/ngettext.* \
79 ${mandir}/man1/envsubst.* \
80 ${mandir}/man1/.* \
81 ${mandir}/man3/* \
82 ${docdir}/gettext/gettext.* \
83 ${docdir}/gettext/ngettext.* \
84 ${docdir}/gettext/envsubst.* \
85 ${docdir}/gettext/*.3.html \
86 ${datadir}/gettext/ABOUT-NLS \
87 ${docdir}/gettext/csharpdoc/* \
88 ${docdir}/libasprintf/autosprintf.html \
89 ${infodir}/autosprintf.info \
90 "
91
92
93do_install_append() {
94 rm -f ${D}${libdir}/preloadable_libintl.so
95}
96
97BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/gettext/gettext_0.18.3.1.bb b/meta/recipes-core/gettext/gettext_0.18.3.1.bb
new file mode 100644
index 0000000000..1f07ce1580
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext_0.18.3.1.bb
@@ -0,0 +1,106 @@
1SUMMARY = "Utilities and libraries for producing multi-lingual messages."
2DESCRIPTION = "Gettext offers to programmers, translators, and even users, a well integrated set of tools and documentation. Specifically, the GNU `gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings."
3HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
4SECTION = "libs"
5LICENSE = "GPLv3+ & LGPL-2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
8DEPENDS = "gettext-native virtual/libiconv expat"
9DEPENDS_class-native = "gettext-minimal-native"
10PROVIDES = "virtual/libintl virtual/gettext"
11PROVIDES_class-native = "virtual/gettext-native"
12RCONFLICTS_${PN} = "proxy-libintl"
13SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
14 file://parallel.patch \
15 "
16
17PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
18
19LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
20
21SRC_URI[md5sum] = "3fc808f7d25487fc72b5759df7419e02"
22SRC_URI[sha256sum] = "0d8f9a33531b77776b3dc473e7940019ca19bfca5b4c06db6e96065eeb07245d"
23
24inherit autotools
25
26EXTRA_OECONF += "--without-lispdir \
27 --disable-csharp \
28 --disable-libasprintf \
29 --disable-java \
30 --disable-native-java \
31 --disable-openmp \
32 --disable-acl \
33 --with-included-glib \
34 --without-emacs \
35 --without-cvs \
36 --without-git \
37 --with-included-libxml \
38 --with-included-libcroco \
39 --with-included-libunistring \
40 "
41
42acpaths = '-I ${S}/gettext-runtime/m4 \
43 -I ${S}/gettext-tools/m4'
44
45
46# these lack the .x behind the .so, but shouldn't be in the -dev package
47# Otherwise you get the following results:
48# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
49# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
50# because gettext depends on gettext-dev, which pulls in more -dev packages:
51# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
52# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
53# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
54# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
55
56PACKAGES =+ "libgettextlib libgettextsrc"
57FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
58FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
59
60PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
61
62FILES_${PN} += "${libdir}/${BPN}/*"
63
64FILES_gettext-runtime = "${bindir}/gettext \
65 ${bindir}/ngettext \
66 ${bindir}/envsubst \
67 ${bindir}/gettext.sh \
68 ${libdir}/libasprintf.so* \
69 ${libdir}/GNU.Gettext.dll \
70 "
71FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
72 ${libdir}/charset.alias \
73 "
74FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
75 ${includedir}/autosprintf.h \
76 "
77FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
78 ${includedir}/libintl.h \
79 "
80FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
81 ${mandir}/man1/ngettext.* \
82 ${mandir}/man1/envsubst.* \
83 ${mandir}/man1/.* \
84 ${mandir}/man3/* \
85 ${docdir}/gettext/gettext.* \
86 ${docdir}/gettext/ngettext.* \
87 ${docdir}/gettext/envsubst.* \
88 ${docdir}/gettext/*.3.html \
89 ${datadir}/gettext/ABOUT-NLS \
90 ${docdir}/gettext/csharpdoc/* \
91 ${docdir}/libasprintf/autosprintf.html \
92 ${infodir}/autosprintf.info \
93 "
94
95do_install_append() {
96 rm -f ${D}${libdir}/preloadable_libintl.so
97}
98
99do_install_append_class-native () {
100 rm ${D}${datadir}/aclocal/*
101 rm ${D}${datadir}/gettext/config.rpath
102 rm ${D}${datadir}/gettext/po/Makefile.in.in
103 rm ${D}${datadir}/gettext/po/remove-potcdate.sin
104}
105
106BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
new file mode 100644
index 0000000000..40c5b9fdb1
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
@@ -0,0 +1,61 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2Add 'install-ptest' target, to copy needed files to ptest dir.
3
4Signed-off-by: Björn Stenberg <bjst@enea.com>
5Upstream-Status: Pending
6---
7 Makefile.decl | 43 +++++++++++++++++++++++++++++++++++++++++++
8 1 file changed, 43 insertions(+)
9
10--- a/Makefile.decl 2012-03-12 01:42:39.000000000 +0100
11+++ b/Makefile.decl 2012-11-26 13:42:08.436865192 +0100
12@@ -25,6 +25,49 @@
13 test-nonrecursive:
14 endif
15
16+ptest: ptest-nonrecursive
17+ @ for subdir in $(SUBDIRS) .; do \
18+ test -d "$$subdir" -a "$$subdir" != "." -a "$$subdir" != "po" && \
19+ ( test -d $$subdir && cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) \
20+ done
21+
22+ptest-nonrecursive:
23+ @test -z "${TEST_PROGS}" || ${GTESTER} --keep-going --verbose ${TEST_PROGS}
24+
25+install-ptest: install-ptest-nonrecursive
26+ @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
27+ test "$$subdir" == "." || \
28+ (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR)/$$subdir $@ ) \
29+ done
30+
31+# install files used for ptest:
32+# - copy EXTRA_DIST (for test data in glib/tests)
33+# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
34+# - copy TEST_PROGS (the test programs)
35+# - copy INSTALL_PROGS (for glib/gtester)
36+# - avoid libtool wrappers by copying binaries from .libs
37+# - strip Makefile: target from all Makefiles
38+install-ptest-nonrecursive:
39+ @mkdir -p $(DESTDIR)
40+ @if [ -n "${TEST_PROGS}" ]; then \
41+ if [ -n "${EXTRA_DIST}" ]; then \
42+ cp ${EXTRA_DIST} $(DESTDIR); \
43+ fi; \
44+ grep -q dist-hook: Makefile && \
45+ $(MAKE) distdir=$(DESTDIR) dist-hook; \
46+ if [ -d .libs ] ; then \
47+ cd .libs; \
48+ fi; \
49+ cp ${TEST_PROGS} $(DESTDIR); \
50+ fi;
51+ @if [ -n "${INSTALL_PROGS}" ]; then \
52+ if [ -d .libs ] ; then \
53+ cd .libs; \
54+ fi; \
55+ cp ${INSTALL_PROGS} $(DESTDIR); \
56+ fi
57+ @test -f Makefile && sed 's/^Makefile:/_Makefile:/' <Makefile >$(DESTDIR)/Makefile
58+
59 # test-report: run tests in subdirs and generate report
60 # perf-report: run tests in subdirs with -m perf and generate report
61 # full-report: like test-report: with -m perf and -m slow
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
new file mode 100644
index 0000000000..3aac35a5d3
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
@@ -0,0 +1,39 @@
1From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001
2From: Song.Li <Song.Li@windriver.com>
3Date: Thu, 5 Jul 2012 15:09:41 +0800
4Subject: [PATCH] add -march=i486 into CFLAGS automatically
5
6Upstream-Status: Inappropriate [configuration]
7
8glib configure will check if current gcc need -march=i486,
9when gcc need -march=i486 but CFLAGS don't have,
10glib configure will abort and advise the user to add -march=i486 or later.
11This will break the build process,it's not good for automatic build system.
12so change this to adding -march=i485 automatically when it is needed.
13---
14 configure.ac | 6 ++++--
15 1 files changed, 4 insertions(+), 2 deletions(-)
16
17Index: glib-2.36.0/configure.ac
18===================================================================
19--- glib-2.36.0.orig/configure.ac
20+++ glib-2.36.0/configure.ac
21@@ -2378,7 +2378,7 @@ dnl
22 dnl Note that the atomic ops are only available with GCC on x86 when
23 dnl using -march=i486 or higher. If we detect that the atomic ops are
24 dnl not available but would be available given the right flags, we want
25-dnl to abort and advise the user to fix their CFLAGS. It's better to do
26+dnl to add -march=i486 automatically to fix their CFLAGS. It's better to do
27 dnl that then to silently fall back on emulated atomic ops just because
28 dnl the user had the wrong build environment.
29
30@@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int
31 AC_TRY_COMPILE([],
32 [volatile int atomic = 2;\
33 __sync_bool_compare_and_swap (&atomic, 2, 3);],
34- [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])],
35+ [AC_MSG_WARN([GLib must be build with -march=i486 or later.])
36+ SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"],
37 [])
38 CFLAGS="${SAVE_CFLAGS}"
39 fi
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
new file mode 100644
index 0000000000..1d69a3f290
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -0,0 +1,60 @@
1From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 28 Apr 2012 18:24:50 +0200
4Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
5 directly
6
7Poky renames libtool to $host_alias-libtool.
8./$host_alias-libtool isn't created until after configure runs with
9libtool >= 2.2.2
10so we can't call # it at this point. We can safely assume a version is
11available
12from PATH though
13
14Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
15Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
16
17Upstream-Status: Inappropriate [configuration]
18
19Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
20---
21 configure.ac | 8 ++++----
22 1 files changed, 4 insertions(+), 4 deletions(-)
23
24diff --git a/configure.ac b/configure.ac
25index a6478c6..9a93d60 100644
26--- a/configure.ac
27+++ b/configure.ac
28@@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then
29 G_MODULE_LDFLAGS=
30 else
31 export SED
32- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
33+ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
34 fi
35 dnl G_MODULE_IMPL= don't reset, so cmd-line can override
36 G_MODULE_NEED_USCORE=0
37@@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
38 LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
39 dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
40 echo "void glib_plugin_test(void) { }" > plugin.c
41- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
42+ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
43 ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
44- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
45+ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
46 ${LDFLAGS} -module -o plugin.la -export-dynamic \
47 -shrext ".o" -avoid-version plugin.lo \
48 -rpath /dont/care >/dev/null 2>&1
49@@ -1614,7 +1614,7 @@ fi
50
51 AC_MSG_CHECKING(for the suffix of module shared libraries)
52 export SED
53-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
54+shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
55 eval $shrext_cmds
56 module=yes eval std_shrext=$shrext_cmds
57 # chop the initial dot
58--
591.7.8.6
60
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
new file mode 100644
index 0000000000..1571112b0e
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch
@@ -0,0 +1,35 @@
1Rename 'rand' variable to avoid conflict.
2
3Upstream-Status: pending
4Signed-off-by: Björn Stenberg <bjst@enea.com>
5
6diff -u glib-2.34.3/tests/refcount/signals.c~ glib-2.34.3/tests/refcount/signals.c
7--- glib-2.34.3/tests/refcount/signals.c 2012-11-26 17:52:48.000000000 +0100
8+++ glib-2.34.3/tests/refcount/signals.c 2013-02-08 14:24:10.052477546 +0100
9@@ -9,7 +9,7 @@
10 #define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
11 #define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
12
13-static GRand *rand;
14+static GRand *grand;
15
16 typedef struct _GTest GTest;
17 typedef struct _GTestClass GTestClass;
18@@ -84,7 +84,7 @@
19 NULL
20 };
21
22- rand = g_rand_new();
23+ grand = g_rand_new();
24
25 test_type = g_type_register_static (G_TYPE_OBJECT, "GTest",
26 &test_info, 0);
27@@ -218,7 +218,7 @@
28 static void
29 my_test_do_prop (GTest * test)
30 {
31- test->value = g_rand_int (rand);
32+ test->value = g_rand_int (grand);
33 g_object_notify (G_OBJECT (test), "test-prop");
34 }
35
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
new file mode 100644
index 0000000000..9759d11e3c
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
@@ -0,0 +1,29 @@
1configure.ac: change readlink -f to -m
2
3Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir
4may not exist.
5
6This patch should go to the upstream, I will send it sooner.
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11---
12 configure.ac | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/configure.ac b/configure.ac
16--- a/configure.ac
17+++ b/configure.ac
18@@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir,
19 [],
20 [with_runtime_libdir=""])
21 GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
22-ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`"
23+ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
24 AC_SUBST(GLIB_RUNTIME_LIBDIR)
25 AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
26 AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
27--
281.8.1.2
29
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0_fix_for_x32.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0_fix_for_x32.patch
new file mode 100644
index 0000000000..0c243cddae
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0_fix_for_x32.patch
@@ -0,0 +1,42 @@
1Upstream-Status: Pending
2
3Pass CC & CFLAGS vars so that tune parameters get used.
4This fixes compilation with x32 toolchain.
5
6Received this patch from H.J. Lu <hjl.tools@gmail.com>
7Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
8
9Index: glib-2.30.0/glib/Makefile.am
10===================================================================
11--- glib-2.30.0.orig/glib/Makefile.am
12+++ glib-2.30.0/glib/Makefile.am
13@@ -359,10 +359,10 @@ INSTALL_PROGS=
14
15 if ENABLE_DTRACE
16 glib_probes.h: glib_probes.d Makefile
17- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
18+ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
19 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
20 glib_probes.o: glib_probes.d Makefile
21- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
22+ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
23 BUILT_SOURCES += glib_probes.h glib_probes.o
24 CLEANFILES += glib_probes.h glib_probes.h.tmp
25 libglib_2_0_la_LIBADD += glib_probes.o
26Index: glib-2.30.0/gobject/Makefile.am
27===================================================================
28--- glib-2.30.0.orig/gobject/Makefile.am
29+++ glib-2.30.0/gobject/Makefile.am
30@@ -141,10 +141,10 @@ gobject_c_sources = \
31
32 if ENABLE_DTRACE
33 gobject_probes.h: gobject_probes.d Makefile
34- $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp
35+ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -C -h -s $< -o $@.tmp
36 @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp
37 gobject_probes.o: gobject_probes.d Makefile
38- $(AM_V_GEN) $(DTRACE) -G -s $< -o $@
39+ $(AM_V_GEN) CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@
40 BUILT_SOURCES += gobject_probes.h gobject_probes.o
41 CLEANFILES += gobject_probes.h
42 libgobject_2_0_la_LIBADD += gobject_probes.o
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
new file mode 100644
index 0000000000..ee435111fc
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch
@@ -0,0 +1,24 @@
1# an very old patch cherry-picked in every glib-2.0 patch directory. The earliest container
2# for it is 2.6.5 in OE. The earliest commit for it is c8e5702127e507e82e6f68a4b8c546803accea9d
3# in OE side which ports from previous bitkeeper SCM. In OE side it's only used til 2.12.4.
4#
5# keep it since it's always cleaner to not hardcode destination path. Use @datadir@ is more
6# portable here. mark for upstream
7#
8# by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
9# Rebased by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010
10
11Upstream-Status: Inappropriate [configuration]
12
13diff -ruN glib-2.27.3-orig/glib-gettextize.in glib-2.27.3/glib-gettextize.in
14--- glib-2.27.3-orig/glib-gettextize.in 2009-04-01 07:04:20.000000000 +0800
15+++ glib-2.27.3/glib-gettextize.in 2010-11-16 12:55:06.874605916 +0800
16@@ -52,7 +52,7 @@
17 datadir=@datadir@
18 datarootdir=@datarootdir@
19
20-gettext_dir=$prefix/share/glib-2.0/gettext
21+gettext_dir=@datadir@/glib-2.0/gettext
22
23 while test $# -gt 0; do
24 case "$1" in
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
new file mode 100644
index 0000000000..3deb586999
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -k ptest
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.36.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.36.4.bb
new file mode 100644
index 0000000000..d62c1fd36e
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.36.4.bb
@@ -0,0 +1,66 @@
1require glib.inc
2
3PE = "1"
4
5DEPENDS += "libffi zlib"
6DEPENDS_class-native += "libffi-native"
7DEPENDS_class-nativesdk += "nativesdk-libffi nativesdk-zlib ${BPN}-native"
8
9SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
10
11SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
12 file://configure-libtool.patch \
13 file://glib-2.0_fix_for_x32.patch \
14 file://fix-conflicting-rand.patch \
15 file://Makefile-ptest.patch \
16 file://add-march-i486-into-CFLAGS-automatically.patch \
17 file://run-ptest \
18 file://glib-2.0-configure-readlink.patch \
19 "
20
21SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
22
23SRC_URI[md5sum] = "2f4b15f7ef43d8702d067ab987bf7aba"
24SRC_URI[sha256sum] = "f654d2542329012d8475736a165dfbf82fadf3ee940c2e0e6ddd4b2fde5cad7e"
25
26BBCLASSEXTEND = "native nativesdk"
27
28RDEPENDS_${PN}-ptest += "\
29 tzdata \
30 tzdata-americas \
31 tzdata-asia \
32 tzdata-europe \
33 tzdata-posix \
34 python-pygobject \
35 python-dbus \
36 "
37
38RDEPENDS_${PN}-ptest_append_libc-glibc = "\
39 eglibc-gconv-utf-16 \
40 eglibc-charmap-utf-8 \
41 eglibc-gconv-cp1255 \
42 eglibc-charmap-cp1255 \
43 eglibc-gconv-utf-32 \
44 eglibc-gconv-utf-7 \
45 eglibc-charmap-invariant \
46 eglibc-localedata-translit-cjk-variants \
47 "
48EXTRA_OECONF_append_class-target_libc-uclibc = " --with-libiconv=gnu"
49
50do_configure_prepend() {
51 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
52}
53
54do_install_append() {
55 # remove some unpackaged files
56 rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
57 rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
58 # and empty dirs
59 rm -rf ${D}${libdir}/gio
60
61 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
62 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
63 if [ -f ${D}${bindir}/glib-mkenums ]; then
64 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
65 fi
66}
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
new file mode 100644
index 0000000000..e57d2ac934
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -0,0 +1,50 @@
1SUMMARY = "A general-purpose utility library"
2DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on."
3# pcre is under BSD;
4# docs/reference/COPYING is with a 'public domai'-like license!
5LICENSE = "LGPLv2+ & BSD & PD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
7 file://glib/glib.h;beginline=4;endline=17;md5=62b7bd0d17b98573dfb87495ac1c5b4c \
8 file://gmodule/COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
9 file://gmodule/gmodule.h;beginline=4;endline=17;md5=62b7bd0d17b98573dfb87495ac1c5b4c \
10 file://glib/pcre/COPYING;md5=266ebc3ff74ee9ce6fad65577667c0f4 \
11 file://glib/pcre/pcre.h;beginline=11;endline=35;md5=de27f2bf633d20a2b7af0b1983423283 \
12 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
13BUGTRACKER = "http://bugzilla.gnome.org"
14SECTION = "libs"
15
16DEPENDS = "glib-2.0-native virtual/libiconv"
17DEPENDS_class-native = "pkgconfig-native gettext-native"
18DEPENDS_class-nativesdk = "nativesdk-libtool"
19PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
20
21LEAD_SONAME = "libglib-2.0.*"
22FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
23
24inherit autotools gettext gtk-doc pkgconfig ptest
25
26S = "${WORKDIR}/glib-${PV}"
27
28CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
29
30PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-modular-tests', '--disable-modular-tests', d)}"
31EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
32EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux --disable-modular-tests"
33
34FILES_${PN} = "${libdir}/lib*${SOLIBS} ${datadir}/glib-2.0/schemas \
35 ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in"
36FILES_${PN}-dev += "${libdir}/glib-2.0/include \
37 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
38 ${libdir}/gio/modules/*.la"
39FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
40 ${libdir}/gio/modules/.debug"
41FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
42FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
43 ${datadir}/bash-completion"
44
45ARM_INSTRUCTION_SET = "arm"
46USE_NLS = "yes"
47
48do_install_append () {
49 sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
50}
diff --git a/meta/recipes-core/glib-networking/glib-networking_2.36.2.bb b/meta/recipes-core/glib-networking/glib-networking_2.36.2.bb
new file mode 100644
index 0000000000..5200b94ad9
--- /dev/null
+++ b/meta/recipes-core/glib-networking/glib-networking_2.36.2.bb
@@ -0,0 +1,26 @@
1DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
2HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
3BUGTRACKER = "http://bugzilla.gnome.org"
4
5LICENSE = "LGPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
7
8SECTION = "libs"
9DEPENDS = "glib-2.0 gnutls intltool-native"
10
11SRC_URI = "${GNOME_MIRROR}/${BPN}/2.36/${BPN}-${PV}.tar.xz"
12
13SRC_URI[md5sum] = "fb9121742ed36d1723f296eea19dbb3c"
14SRC_URI[sha256sum] = "2108d55b0af3eea56ce256830bcaf1519d6337e0054ef2eff80f2c0ef0eb23f9"
15
16PACKAGECONFIG ??= ""
17PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
18
19EXTRA_OECONF = "--without-ca-certificates --without-gnome-proxy --without-libproxy"
20
21inherit autotools pkgconfig
22
23FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
24FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/"
25FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
26FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
new file mode 100644
index 0000000000..b04a1b6a73
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmx
@@ -0,0 +1,52 @@
1.encoding = "UTF-8"
2displayname = "Yocto Build Appliance"
3guestos = "other"
4tools.syncTime = "FALSE"
5virtualhw.version = "8"
6config.version = "8"
7numvcpus = "2"
8cpuid.coresPerSocket = "1"
9vcpu.hotadd = "TRUE"
10mem.hotadd = "TRUE"
11memsize = "4096"
12svga.autodetect = "TRUE"
13pciBridge0.present = "TRUE"
14mks.enable3d = "TRUE"
15pciBridge4.present = "TRUE"
16pciBridge4.virtualDev = "pcieRootPort"
17pciBridge4.functions = "8"
18pciBridge5.present = "TRUE"
19pciBridge5.virtualDev = "pcieRootPort"
20pciBridge5.functions = "8"
21pciBridge6.present = "TRUE"
22pciBridge6.virtualDev = "pcieRootPort"
23pciBridge6.functions = "8"
24pciBridge7.present = "TRUE"
25pciBridge7.virtualDev = "pcieRootPort"
26pciBridge7.functions = "8"
27vmci0.present = "TRUE"
28floppy0.present = "TRUE"
29floppy0.fileType = "device"
30floppy0.autodetect = "FALSE"
31floppy0.startConnected = "FALSE"
32ide1:0.present = "TRUE"
33ide1:0.deviceType = "atapi-cdrom"
34ide1:0.autodetect = "TRUE"
35ide1:0.startConnected = "FALSE"
36ide0:0.present = "TRUE"
37ide0:0.deviceType = "disk"
38ide0:0.fileName = "Yocto_Build_Appliance.vmdk"
39usb.present = "TRUE"
40scsi0.virtualDev = "lsilogic"
41scsi0.present = "TRUE"
42ethernet0.present = "TRUE"
43ethernet0.virtualDev = "e1000"
44ethernet0.connectionType = "bridged"
45ethernet0.startConnected = "TRUE"
46ethernet0.addressType = "generated"
47sound.present = "TRUE"
48sound.virtualDev = "es1371"
49sound.autodetect = "TRUE"
50extendedConfigFile = "Yocto_Build_Appliance.vmxf"
51sound.fileName = "-1"
52virtualHW.productCompatibility = "hosted"
diff --git a/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
new file mode 100644
index 0000000000..ca3f0264d6
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/Yocto_Build_Appliance.vmxf
@@ -0,0 +1,8 @@
1<?xml version="1.0"?>
2<Foundry>
3<VM>
4<VMId type="string">52 e4 0b df 7b 70 21 f8-88 56 a7 26 47 43 95 93</VMId>
5<ClientMetaData>
6<clientMetaDataAttributes/>
7<HistoryEventList/></ClientMetaData>
8<vmxPathName type="string">Yocto_Build_Appliance.vmx</vmxPathName></VM></Foundry>
diff --git a/meta/recipes-core/images/build-appliance-image_8.0.bb b/meta/recipes-core/images/build-appliance-image_8.0.bb
new file mode 100644
index 0000000000..94892f0d5b
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image_8.0.bb
@@ -0,0 +1,93 @@
1SUMMARY = "An image containing the build system itself"
2DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
3HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted"
10
11IMAGE_FEATURES += "x11-base package-management splash"
12
13# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
14IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
15
16# Do a quiet boot with limited console messages
17APPEND += "quiet"
18
19DEPENDS = "zip-native"
20IMAGE_FSTYPES = "vmdk"
21
22inherit core-image
23
24SRCREV ?= "ee9a3c191c64636971c94d8a9870c41d7bac02bf"
25SRC_URI = "git://git.yoctoproject.org/poky \
26 file://Yocto_Build_Appliance.vmx \
27 file://Yocto_Build_Appliance.vmxf \
28 "
29
30IMAGE_CMD_ext3_append () {
31 # We don't need to reserve much space for root, 0.5% is more than enough
32 tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
33}
34
35fakeroot do_populate_poky_src () {
36 # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
37 # will become invalid in the target.
38 rm -rf ${WORKDIR}/git/.git
39 rm -f ${WORKDIR}/git/.gitignore
40
41 cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
42
43 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
44 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
45 cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
46
47 # Remove the git2_* tarballs -- this is ok since we still have the git2/.
48 rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
49
50 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
51 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
52 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
53 echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
54 echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
55 echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
56
57 chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
58
59 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
60
61 # Allow builder to use sudo to setup tap/tun
62 echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
63
64 # Use Clearlooks GTK+ theme
65 mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
66 echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
67}
68
69IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
70
71addtask rootfs after do_unpack
72
73python () {
74 # Ensure we run these usually noexec tasks
75 d.delVarFlag("do_fetch", "noexec")
76 d.delVarFlag("do_unpack", "noexec")
77}
78
79create_bundle_files () {
80 cd ${WORKDIR}
81 mkdir -p Yocto_Build_Appliance
82 cp *.vmx* Yocto_Build_Appliance
83 ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
84 zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
85 ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip
86}
87
88python do_bundle_files() {
89 bb.build.exec_func('create_bundle_files', d)
90}
91
92addtask bundle_files after do_vmdkimg before do_build
93do_bundle_files[nostamp] = "1"
diff --git a/meta/recipes-core/images/core-image-base.bb b/meta/recipes-core/images/core-image-base.bb
new file mode 100644
index 0000000000..8ef3376bfb
--- /dev/null
+++ b/meta/recipes-core/images/core-image-base.bb
@@ -0,0 +1,8 @@
1DESCRIPTION = "A console-only image that fully supports the target device \
2hardware."
3
4IMAGE_FEATURES += "splash"
5
6LICENSE = "MIT"
7
8inherit core-image
diff --git a/meta/recipes-core/images/core-image-minimal-dev.bb b/meta/recipes-core/images/core-image-minimal-dev.bb
new file mode 100644
index 0000000000..93ead20553
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-dev.bb
@@ -0,0 +1,7 @@
1require core-image-minimal.bb
2
3DESCRIPTION = "A small image just capable of allowing a device to boot and \
4is suitable for development work."
5
6IMAGE_FEATURES += "dev-pkgs"
7
diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
new file mode 100644
index 0000000000..46a9dc41c2
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -0,0 +1,21 @@
1# Simple initramfs image. Mostly used for live images.
2DESCRIPTION = "Small image capable of booting a device. The kernel includes \
3the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
4first 'init' program more efficiently."
5
6IMAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi busybox udev base-passwd"
7
8# Do not pollute the initrd image with rootfs features
9IMAGE_FEATURES = ""
10
11export IMAGE_BASENAME = "core-image-minimal-initramfs"
12IMAGE_LINGUAS = ""
13
14LICENSE = "MIT"
15
16IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
17inherit core-image
18
19IMAGE_ROOTFS_SIZE = "8192"
20
21BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta/recipes-core/images/core-image-minimal-mtdutils.bb b/meta/recipes-core/images/core-image-minimal-mtdutils.bb
new file mode 100644
index 0000000000..c92234c082
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal-mtdutils.bb
@@ -0,0 +1,7 @@
1require core-image-minimal.bb
2
3DESCRIPTION = "Small image capable of booting a device with support for the \
4Minimal MTD Utilities, which let the user interact with the MTD subsystem in \
5the kernel to perform operations on flash devices."
6
7IMAGE_INSTALL += "mtd-utils"
diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb
new file mode 100644
index 0000000000..0b56cc8549
--- /dev/null
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -0,0 +1,12 @@
1DESCRIPTION = "A small image just capable of allowing a device to boot."
2
3IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
4
5IMAGE_LINGUAS = " "
6
7LICENSE = "MIT"
8
9inherit core-image
10
11IMAGE_ROOTFS_SIZE = "8192"
12
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/copyright b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/copyright
new file mode 100644
index 0000000000..2a8e0d1264
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/copyright
@@ -0,0 +1,11 @@
1This package was created by Peter Tobias tobias@et-inf.fho-emden.de on
2Wed, 24 Aug 1994 21:33:28 +0200 and maintained by Anthony Towns
3<ajt@debian.org> until 2001.
4It is currently maintained by Marco d'Itri <md@linux.it>.
5
6Copyright 1994-2010 Peter Tobias, Anthony Towns and Marco d'Itri
7
8The programs in this package are distributed under the terms of the GNU
9General Public License, version 2 as distributed by the Free Software
10Foundation. On Debian systems, a copy of this license may be found in
11/usr/share/common-licenses/GPL-2.
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/init b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/init
new file mode 100644
index 0000000000..fb31c635be
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/init
@@ -0,0 +1,90 @@
1#!/bin/sh -e
2### BEGIN INIT INFO
3# Provides: networking
4# Required-Start: mountvirtfs $local_fs
5# Required-Stop: $local_fs
6# Should-Start: ifupdown
7# Should-Stop: ifupdown
8# Default-Start: S
9# Default-Stop: 0 6
10# Short-Description: Raise network interfaces.
11### END INIT INFO
12
13PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
14
15[ -x /sbin/ifup ] || exit 0
16
17check_network_file_systems() {
18 [ -e /proc/mounts ] || return 0
19
20 if [ -e /etc/iscsi/iscsi.initramfs ]; then
21 echo "not deconfiguring network interfaces: iSCSI root is mounted."
22 exit 0
23 fi
24
25 exec 9<&0 < /proc/mounts
26 while read DEV MTPT FSTYPE REST; do
27 case $DEV in
28 /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
29 echo "not deconfiguring network interfaces: network devices still mounted."
30 exit 0
31 ;;
32 esac
33 case $FSTYPE in
34 nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
35 echo "not deconfiguring network interfaces: network file systems still mounted."
36 exit 0
37 ;;
38 esac
39 done
40 exec 0<&9 9<&-
41}
42
43check_network_swap() {
44 [ -e /proc/swaps ] || return 0
45
46 exec 9<&0 < /proc/swaps
47 while read DEV MTPT FSTYPE REST; do
48 case $DEV in
49 /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
50 echo "not deconfiguring network interfaces: network swap still mounted."
51 exit 0
52 ;;
53 esac
54 done
55 exec 0<&9 9<&-
56}
57
58case "$1" in
59start)
60 echo -n "Configuring network interfaces... "
61 sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
62 ifup -a
63 echo "done."
64 ;;
65
66stop)
67 check_network_file_systems
68 check_network_swap
69
70 echo -n "Deconfiguring network interfaces... "
71 ifdown -a
72 echo "done."
73 ;;
74
75force-reload|restart)
76 echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
77 echo "Reconfiguring network interfaces... "
78 ifdown -a || true
79 ifup -a
80 echo "done."
81 ;;
82
83*)
84 echo "Usage: /etc/init.d/networking {start|stop}"
85 exit 1
86 ;;
87esac
88
89exit 0
90
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces
new file mode 100644
index 0000000000..0acf4cf441
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces
@@ -0,0 +1,31 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wireless interfaces
8iface wlan0 inet dhcp
9 wireless_mode managed
10 wireless_essid any
11 wpa-driver wext
12 wpa-conf /etc/wpa_supplicant.conf
13
14iface atml0 inet dhcp
15
16# Wired or wireless interfaces
17auto eth0
18iface eth0 inet dhcp
19iface eth1 inet dhcp
20
21# Ethernet/RNDIS gadget (g_ether)
22# ... or on host side, usbnet and random hwaddr
23iface usb0 inet static
24 address 192.168.7.2
25 netmask 255.255.255.0
26 network 192.168.7.0
27 gateway 192.168.7.1
28
29# Bluetooth networking
30iface bnep0 inet dhcp
31
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/nfsroot b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/nfsroot
new file mode 100644
index 0000000000..750c0a98f9
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/nfsroot
@@ -0,0 +1,39 @@
1#! /bin/sh
2
3# In case the interface is used as nfsroot, avoid ifup, otherwise
4# nfsroot may lose response
5
6nfsroot=0
7
8if test "x$IFACE" = xlo ; then
9 exit 0
10fi
11
12exec 9<&0 < /proc/mounts
13while read dev mtpt fstype rest; do
14 if test $mtpt = "/" ; then
15 case $fstype in
16 nfs | nfs4)
17 nfsroot=1
18 nfs_addr=`echo $rest | sed -e 's/^.*addr=\([0-9.]*\).*$/\1/'`
19 break
20 ;;
21 *)
22 ;;
23 esac
24 fi
25done
26exec 0<&9 9<&-
27
28test $nfsroot -eq 0 && exit 0
29
30if [ -x /bin/ip -o -x /sbin/ip ] ; then
31 nfs_iface=`ip route get $nfs_addr | grep dev | sed -e 's/^.*dev \([-a-z0-9.]*\).*$/\1/'`
32fi
33
34if test "x$IFACE" = "x$nfs_iface" ; then
35 echo "ifup skipped for nfsroot interface $nfs_iface"
36 exit 1
37fi
38
39exit 0
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm/interfaces
@@ -0,0 +1,5 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv6/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv6/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv6/interfaces
@@ -0,0 +1,5 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv7/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv7/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarmv7/interfaces
@@ -0,0 +1,5 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips64/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips64/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemumips64/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuppc/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuppc/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuppc/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemush4/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemush4/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemush4/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86-64/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86-64/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86-64/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemux86/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7
8
diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
new file mode 100644
index 0000000000..9d3af34717
--- /dev/null
+++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Basic TCP/IP networking init scripts and configuration files"
2DESCRIPTION = "This package provides high level tools to configure network interfaces"
3HOMEPAGE = "http://packages.debian.org/ifupdown"
4SECTION = "base"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://${WORKDIR}/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
7PR = "r3"
8
9inherit update-rc.d
10
11INITSCRIPT_NAME = "networking"
12INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
13
14SRC_URI = "file://copyright \
15 file://init \
16 file://interfaces \
17 file://nfsroot"
18
19do_install () {
20 install -d ${D}${sysconfdir}/init.d \
21 ${D}${sysconfdir}/network/if-pre-up.d \
22 ${D}${sysconfdir}/network/if-up.d \
23 ${D}${sysconfdir}/network/if-down.d \
24 ${D}${sysconfdir}/network/if-post-down.d
25 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking
26 install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
27 install -m 0755 ${WORKDIR}/nfsroot ${D}${sysconfdir}/network/if-pre-up.d
28}
29
30do_install_append_qemuall () {
31 # Disable network manager on machines that commonly do NFS booting
32 touch ${D}${sysconfdir}/network/nm-disabled-eth0
33}
34
35PACKAGE_ARCH_qemuall = "${MACHINE_ARCH}"
36RDEPENDS_${PN} = "netbase"
37RCONFLICTS_${PN} = "netbase (< 1:5.0)"
38
39CONFFILES_${PN} = "${sysconfdir}/network/interfaces"
diff --git a/meta/recipes-core/initrdscripts/files/init-boot.sh b/meta/recipes-core/initrdscripts/files/init-boot.sh
new file mode 100644
index 0000000000..e82eba025d
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/files/init-boot.sh
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4
5mkdir /proc
6mkdir /sys
7mount -t proc proc /proc
8mount -t sysfs sysfs /sys
9
10exec sh
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
new file mode 100644
index 0000000000..9846637316
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -0,0 +1,178 @@
1#!/bin/sh -e
2#
3# Copyright (c) 2012, Intel Corporation.
4# All rights reserved.
5#
6# install.sh [device_name] [rootfs_name]
7#
8
9PATH=/sbin:/bin:/usr/sbin:/usr/bin
10
11# We need 20 Mb for the boot partition
12boot_size=20
13
14# 5% for swap
15swap_ratio=5
16
17found="no"
18
19echo "Searching for a hard drive..."
20for device in 'hda' 'hdb' 'sda' 'sdb' 'mmcblk0' 'mmcblk1'
21do
22 if [ -e /sys/block/${device}/removable ]; then
23 if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then
24 found="yes"
25
26 while true; do
27 # Try sleeping here to avoid getting kernel messages
28 # obscuring/confusing user
29 sleep 5
30 echo "Found drive at /dev/${device}. Do you want to install this image there ? [y/n]"
31 read answer
32 if [ "$answer" = "y" ] ; then
33 break
34 fi
35
36 if [ "$answer" = "n" ] ; then
37 found=no
38 break
39 fi
40
41 echo "Please answer y or n"
42 done
43 fi
44 fi
45
46 if [ "$found" = "yes" ]; then
47 break;
48 fi
49
50done
51
52if [ "$found" = "no" ]; then
53 exit 1
54fi
55
56echo "Installing image on /dev/${device}"
57
58#
59# The udev automounter can cause pain here, kill it
60#
61rm -f /etc/udev/rules.d/automount.rules
62rm -f /etc/udev/scripts/mount*
63
64#
65# Unmount anything the automounter had mounted
66#
67umount /dev/${device}* 2> /dev/null || /bin/true
68
69mkdir -p /tmp
70cat /proc/mounts > /etc/mtab
71
72disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
73
74swap_size=$((disk_size*swap_ratio/100))
75rootfs_size=$((disk_size-boot_size-swap_size))
76
77rootfs_start=$((boot_size))
78rootfs_end=$((rootfs_start+rootfs_size))
79swap_start=$((rootfs_end))
80
81# MMC devices are special in a couple of ways
82# 1) they use a partition prefix character 'p'
83# 2) they are detected asynchronously (need rootwait)
84rootwait=""
85part_prefix=""
86if [ ! "${device#mmcblk}" = "${device}" ]; then
87 part_prefix="p"
88 rootwait="rootwait"
89fi
90bootfs=/dev/${device}${part_prefix}1
91rootfs=/dev/${device}${part_prefix}2
92swap=/dev/${device}${part_prefix}3
93
94echo "*****************"
95echo "Boot partition size: $boot_size MB ($bootfs)"
96echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
97echo "Swap partition size: $swap_size MB ($swap)"
98echo "*****************"
99echo "Deleting partition table on /dev/${device} ..."
100dd if=/dev/zero of=/dev/${device} bs=512 count=2
101
102echo "Creating new partition table on /dev/${device} ..."
103parted /dev/${device} mklabel gpt
104
105echo "Creating boot partition on $bootfs"
106parted /dev/${device} mkpart primary 0% $boot_size
107
108echo "Creating rootfs partition on $rootfs"
109parted /dev/${device} mkpart primary $rootfs_start $rootfs_end
110
111echo "Creating swap partition on $swap"
112parted /dev/${device} mkpart primary $swap_start 100%
113
114parted /dev/${device} print
115
116echo "Formatting $bootfs to vfat..."
117mkfs.vfat $bootfs
118
119echo "Formatting $rootfs to ext3..."
120mkfs.ext3 $rootfs
121
122echo "Formatting swap partition...($swap)"
123mkswap $swap
124
125mkdir /ssd
126mkdir /rootmnt
127mkdir /bootmnt
128
129mount $rootfs /ssd
130mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt
131
132echo "Copying rootfs files..."
133cp -a /rootmnt/* /ssd
134
135if [ -d /ssd/etc/ ] ; then
136 echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab
137
138 # We dont want udev to mount our root device while we're booting...
139 if [ -d /ssd/etc/udev/ ] ; then
140 echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
141 fi
142fi
143
144umount /ssd
145umount /rootmnt
146
147echo "Preparing boot partition..."
148mount $bootfs /ssd
149
150EFIDIR="/ssd/EFI/BOOT"
151mkdir -p $EFIDIR
152GRUBCFG="$EFIDIR/grub.cfg"
153
154cp /media/$1/vmlinuz /ssd
155# Copy the efi loader and config (booti*.efi and grub.cfg)
156cp /media/$1/EFI/BOOT/* $EFIDIR
157
158# Update grub config for the installed image
159# Delete the install entry
160sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
161# Delete the initrd lines
162sed -i "/initrd /d" $GRUBCFG
163# Delete any LABEL= strings
164sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
165# Delete any root= strings
166sed -i "s/ root=[^ ]*/ /" $GRUBCFG
167# Add the root= and other standard boot options
168sed -i "s@linux /vmlinuz *@linux /vmlinuz root=$rootfs rw $rootwait quiet @" $GRUBCFG
169
170umount /ssd
171sync
172
173echo "Remove your installation media, and press ENTER"
174
175read enter
176
177echo "Rebooting..."
178reboot -f
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
new file mode 100644
index 0000000000..8e433d5eda
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -0,0 +1,208 @@
1#!/bin/sh -e
2#
3# Copyright (C) 2008-2011 Intel
4#
5# install.sh [device_name] [rootfs_name] [video_mode] [vga_mode]
6#
7
8PATH=/sbin:/bin:/usr/sbin:/usr/bin
9
10# We need 20 Mb for the boot partition
11boot_size=20
12
13# 5% for the swap
14swap_ratio=5
15
16# Get a list of hard drives
17hdnamelist=""
18live_dev_name=${1%%/*}
19
20echo "Searching for hard drives ..."
21
22for device in `ls /sys/block/`; do
23 case $device in
24 loop*)
25 # skip loop device
26 ;;
27 ram*)
28 # skip ram device
29 ;;
30 *)
31 # skip the device LiveOS is on
32 # Add valid hard drive name to the list
33 if [ $device != $live_dev_name -a -e /dev/$device ]; then
34 hdnamelist="$hdnamelist $device"
35 fi
36 ;;
37 esac
38done
39
40TARGET_DEVICE_NAME=""
41for hdname in $hdnamelist; do
42 # Display found hard drives and their basic info
43 echo "-------------------------------"
44 echo /dev/$hdname
45 if [ -r /sys/block/$hdname/device/vendor ]; then
46 echo -n "VENDOR="
47 cat /sys/block/$hdname/device/vendor
48 fi
49 echo -n "MODEL="
50 cat /sys/block/$hdname/device/model
51 cat /sys/block/$hdname/device/uevent
52 echo
53 # Get user choice
54 while true; do
55 echo -n "Do you want to install this image there? [y/n] "
56 read answer
57 if [ "$answer" = "y" -o "$answer" = "n" ]; then
58 break
59 fi
60 echo "Please answer y or n"
61 done
62 if [ "$answer" = "y" ]; then
63 TARGET_DEVICE_NAME=$hdname
64 break
65 fi
66done
67
68if [ -n "$TARGET_DEVICE_NAME" ]; then
69 echo "Installing image on /dev/$TARGET_DEVICE_NAME ..."
70else
71 echo "No hard drive selected. Installation aborted."
72 exit 1
73fi
74
75device=$TARGET_DEVICE_NAME
76
77#
78# The udev automounter can cause pain here, kill it
79#
80rm -f /etc/udev/rules.d/automount.rules
81rm -f /etc/udev/scripts/mount*
82
83#
84# Unmount anything the automounter had mounted
85#
86umount /dev/${device}* 2> /dev/null || /bin/true
87
88if [ ! -b /dev/loop0 ] ; then
89 mknod /dev/loop0 b 7 0
90fi
91
92mkdir -p /tmp
93cat /proc/mounts > /etc/mtab
94
95disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
96
97swap_size=$((disk_size*swap_ratio/100))
98rootfs_size=$((disk_size-boot_size-swap_size))
99
100rootfs_start=$((boot_size))
101rootfs_end=$((rootfs_start+rootfs_size))
102swap_start=$((rootfs_end))
103
104# MMC devices are special in a couple of ways
105# 1) they use a partition prefix character 'p'
106# 2) they are detected asynchronously (need rootwait)
107rootwait=""
108part_prefix=""
109if [ ! "${device#mmcblk}" = "${device}" ]; then
110 part_prefix="p"
111 rootwait="rootwait"
112fi
113bootfs=/dev/${device}${part_prefix}1
114rootfs=/dev/${device}${part_prefix}2
115swap=/dev/${device}${part_prefix}3
116
117echo "*****************"
118echo "Boot partition size: $boot_size MB ($bootfs)"
119echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
120echo "Swap partition size: $swap_size MB ($swap)"
121echo "*****************"
122echo "Deleting partition table on /dev/${device} ..."
123dd if=/dev/zero of=/dev/${device} bs=512 count=2
124
125echo "Creating new partition table on /dev/${device} ..."
126parted /dev/${device} mklabel msdos
127
128echo "Creating boot partition on $bootfs"
129parted /dev/${device} mkpart primary 0% $boot_size
130
131echo "Creating rootfs partition on $rootfs"
132parted /dev/${device} mkpart primary $rootfs_start $rootfs_end
133
134echo "Creating swap partition on $swap"
135parted /dev/${device} mkpart primary $swap_start 100%
136
137parted /dev/${device} print
138
139echo "Formatting $bootfs to ext3..."
140mkfs.ext3 $bootfs
141
142echo "Formatting $rootfs to ext3..."
143mkfs.ext3 $rootfs
144
145echo "Formatting swap partition...($swap)"
146mkswap $swap
147
148mkdir /tgt_root
149mkdir /src_root
150mkdir -p /boot
151
152# Handling of the target root partition
153mount $rootfs /tgt_root
154mount -o rw,loop,noatime,nodiratime /media/$1/$2 /src_root
155echo "Copying rootfs files..."
156cp -a /src_root/* /tgt_root
157if [ -d /tgt_root/etc/ ] ; then
158 echo "$swap swap swap defaults 0 0" >> /tgt_root/etc/fstab
159 echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
160 # We dont want udev to mount our root device while we're booting...
161 if [ -d /tgt_root/etc/udev/ ] ; then
162 echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
163 fi
164fi
165umount /tgt_root
166umount /src_root
167
168# Handling of the target boot partition
169mount $bootfs /boot
170echo "Preparing boot partition..."
171if [ -f /etc/grub.d/40_custom ] ; then
172 echo "Preparing custom grub2 menu..."
173 GRUBCFG="/boot/grub/grub.cfg"
174 mkdir -p $(dirname $GRUBCFG)
175 cp /etc/grub.d/40_custom $GRUBCFG
176 sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG
177 sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG
178 sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG
179 sed -i "s/__CONSOLE__/$5/g" $GRUBCFG
180 sed -i "/#/d" $GRUBCFG
181 sed -i "/exec tail/d" $GRUBCFG
182 chmod 0444 $GRUBCFG
183fi
184grub-install /dev/${device}
185echo "(hd0) /dev/${device}" > /boot/grub/device.map
186
187# If grub.cfg doesn't exist, assume GRUB 0.97 and create a menu.lst
188if [ ! -f /boot/grub/grub.cfg ] ; then
189 echo "Preparing custom grub menu..."
190 echo "default 0" > /boot/grub/menu.lst
191 echo "timeout 30" >> /boot/grub/menu.lst
192 echo "title Live Boot/Install-Image" >> /boot/grub/menu.lst
193 echo "root (hd0,0)" >> /boot/grub/menu.lst
194 echo "kernel /vmlinuz root=$rootfs rw $3 $4 quiet" >> /boot/grub/menu.lst
195fi
196
197cp /media/$1/vmlinuz /boot/
198
199umount /boot
200
201sync
202
203echo "Remove your installation media, and press ENTER"
204
205read enter
206
207echo "Rebooting..."
208reboot -f
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
new file mode 100644
index 0000000000..3f5fde83bf
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -0,0 +1,218 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4
5ROOT_MOUNT="/rootfs/"
6ROOT_IMAGE="rootfs.img"
7MOUNT="/bin/mount"
8UMOUNT="/bin/umount"
9ISOLINUX=""
10
11# Copied from initramfs-framework. The core of this script probably should be
12# turned into initramfs-framework modules to reduce duplication.
13udev_daemon() {
14 OPTIONS="/sbin/udev/udevd /sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd"
15
16 for o in $OPTIONS; do
17 if [ -x "$o" ]; then
18 echo $o
19 return 0
20 fi
21 done
22
23 return 1
24}
25
26_UDEV_DAEMON=`udev_daemon`
27
28early_setup() {
29 mkdir -p /proc
30 mkdir -p /sys
31 mount -t proc proc /proc
32 mount -t sysfs sysfs /sys
33 mount -t devtmpfs none /dev
34
35 # support modular kernel
36 modprobe isofs 2> /dev/null
37
38 mkdir -p /run
39 mkdir -p /var/run
40
41 $_UDEV_DAEMON --daemon
42 udevadm trigger --action=add
43}
44
45read_args() {
46 [ -z "$CMDLINE" ] && CMDLINE=`cat /proc/cmdline`
47 for arg in $CMDLINE; do
48 optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
49 case $arg in
50 root=*)
51 ROOT_DEVICE=$optarg ;;
52 rootfstype=*)
53 modprobe $optarg 2> /dev/null ;;
54 LABEL=*)
55 label=$optarg ;;
56 video=*)
57 video_mode=$arg ;;
58 vga=*)
59 vga_mode=$arg ;;
60 console=*)
61 if [ -z "${console_params}" ]; then
62 console_params=$arg
63 else
64 console_params="$console_params $arg"
65 fi ;;
66 debugshell*)
67 if [ -z "$optarg" ]; then
68 shelltimeout=30
69 else
70 shelltimeout=$optarg
71 fi
72 esac
73 done
74}
75
76boot_live_root() {
77 # Watches the udev event queue, and exits if all current events are handled
78 udevadm settle --timeout=3 --quiet
79 killall "${_UDEV_DAEMON##*/}" 2>/dev/null
80
81 # Move the mount points of some filesystems over to
82 # the corresponding directories under the real root filesystem.
83 for dir in `awk '/\/dev.* \/media/{print $2}' /proc/mounts`; do
84 mkdir -p ${ROOT_MOUNT}/$dir
85 mount -n --move $dir ${ROOT_MOUNT}/$dir
86 done
87 mount -n --move /proc ${ROOT_MOUNT}/proc
88 mount -n --move /sys ${ROOT_MOUNT}/sys
89 mount -n --move /dev ${ROOT_MOUNT}/dev
90
91 cd $ROOT_MOUNT
92 exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init
93}
94
95fatal() {
96 echo $1 >$CONSOLE
97 echo >$CONSOLE
98 exec sh
99}
100
101early_setup
102
103[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
104
105read_args
106
107echo "Waiting for removable media..."
108C=0
109while true
110do
111 for i in `ls /media 2>/dev/null`; do
112 if [ -f /media/$i/$ROOT_IMAGE ] ; then
113 found="yes"
114 break
115 elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
116 found="yes"
117 ISOLINUX="isolinux"
118 break
119 fi
120 done
121 if [ "$found" = "yes" ]; then
122 break;
123 fi
124 # don't wait for more than $shelltimeout seconds, if it's set
125 if [ -n "$shelltimeout" ]; then
126 echo -n " " $(( $shelltimeout - $C ))
127 if [ $C -ge $shelltimeout ]; then
128 echo "..."
129 echo "Mounted filesystems"
130 mount | grep media
131 echo "Available block devices"
132 ls /dev/sd*
133 fatal "Cannot find rootfs.img file in /media/* , dropping to a shell "
134 fi
135 C=$(( C + 1 ))
136 fi
137 sleep 1
138done
139
140# Try to mount the root image read-write and then boot it up.
141# This function distinguishes between a read-only image and a read-write image.
142# In the former case (typically an iso), it tries to make a union mount if possible.
143# In the latter case, the root image could be mounted and then directly booted up.
144mount_and_boot() {
145 mkdir $ROOT_MOUNT
146 mknod /dev/loop0 b 7 0 2>/dev/null
147
148 if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
149 fatal "Could not mount rootfs image"
150 fi
151
152 if touch $ROOT_MOUNT/bin 2>/dev/null; then
153 # The root image is read-write, directly boot it up.
154 boot_live_root
155 fi
156
157 # determine which unification filesystem to use
158 union_fs_type=""
159 if grep -q -w "overlayfs" /proc/filesystems; then
160 union_fs_type="overlayfs"
161 elif grep -q -w "aufs" /proc/filesystems; then
162 union_fs_type="aufs"
163 else
164 union_fs_type=""
165 fi
166
167 # make a union mount if possible
168 case $union_fs_type in
169 "overlayfs")
170 mkdir -p /rootfs.ro /rootfs.rw
171 if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then
172 rm -rf /rootfs.ro /rootfs.rw
173 fatal "Could not move rootfs mount point"
174 else
175 mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw
176 mount -t overlayfs -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw" overlayfs $ROOT_MOUNT
177 mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw
178 mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
179 mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
180 fi
181 ;;
182 "aufs")
183 mkdir -p /rootfs.ro /rootfs.rw
184 if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then
185 rm -rf /rootfs.ro /rootfs.rw
186 fatal "Could not move rootfs mount point"
187 else
188 mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw
189 mount -t aufs -o "dirs=/rootfs.rw=rw:/rootfs.ro=ro" aufs $ROOT_MOUNT
190 mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw
191 mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
192 mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
193 fi
194 ;;
195 "")
196 mount -t tmpfs -o rw,noatime,mode=755 tmpfs $ROOT_MOUNT/media
197 ;;
198 esac
199
200 # boot the image
201 boot_live_root
202}
203
204case $label in
205 boot)
206 mount_and_boot
207 ;;
208 install|install-efi)
209 if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
210 ./$label.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params
211 else
212 fatal "Could not find $label script"
213 fi
214
215 # If we're getting here, we failed...
216 fatal "Installation image failed"
217 ;;
218esac
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
new file mode 100644
index 0000000000..6f9b4c21f1
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
@@ -0,0 +1,14 @@
1DESCRIPTION = "A live image init script"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-boot.sh"
5
6PR = "r2"
7
8do_install() {
9 install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
10}
11
12inherit allarch
13
14FILES_${PN} += " /init "
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/debug b/meta/recipes-core/initrdscripts/initramfs-framework/debug
new file mode 100644
index 0000000000..00bfd7d3f5
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/debug
@@ -0,0 +1,82 @@
1#!/bin/sh
2# Copyright (C) 2011 O.S. Systems Software LTDA.
3# Licensed on MIT
4
5# Adds support to dynamic debugging of initramfs using bootparam in
6# following format:
7# shell : starts a shell before and after each module
8# shell=before:<module> : starts a shell before <module> is loaded and run
9# shell=after:<module> : starts a shell after <module> is loaded and run
10#
11# shell-debug : run set -x as soon as possible
12# shell-debug=before:<module> : run set -x before <module> is loaded and run
13# shell-debug=after:<module> : run set -x after <module> is loaded and run
14
15DEBUG_SHELL="false"
16
17debug_hook_handler() {
18 status=$1
19 module=$2
20
21 if [ -n "$bootparam_shell" ] && [ "$bootparam_shell" != "true" ]; then
22 shell_wanted_status=`expr $bootparam_shell : '\(.*\):.*'`
23 shell_wanted_module=`expr $bootparam_shell : '.*:\(.*\)'`
24
25 if [ "$shell_wanted_status" = "before" ]; then
26 shell_wanted_status=pre
27 else
28 shell_wanted_status=post
29 fi
30 fi
31
32 if [ "$bootparam_shell" = "true" ] ||
33 ( [ "$status" = "$shell_wanted_status" ] &&
34 [ "$module" = "$shell_wanted_module" ] ); then
35 if [ "$status" = "pre" ]; then
36 status_msg="before"
37 else
38 status_msg="after"
39 fi
40
41 msg "Starting shell $status_msg $module..."
42 sh
43 fi
44
45 if [ -n "$bootparam_shell_debug" ] && [ "$bootparam_shell_debug" != "true" ]; then
46 shell_debug_wanted_status=`expr $bootparam_shell_debug : '\(.*\):.*'`
47 shell_debug_wanted_module=`expr $bootparam_shell_debug : '.*:\(.*\)'`
48
49 if [ "$shell_debug_wanted_status" = "before" ]; then
50 shell_debug_wanted_status=pre
51 else
52 shell_debug_wanted_status=post
53 fi
54 fi
55
56 if [ "$bootparam_shell_debug" = "true" ] ||
57 ( [ "$status" = "$shell_debug_wanted_status" ] &&
58 [ "$module" = "$shell_debug_wanted_module" ] ); then
59 if [ "$DEBUG_SHELL" = "true" ]; then
60 return 0
61 fi
62
63 if [ "$status" = "pre" ]; then
64 status_msg="before"
65 else
66 status_msg="after"
67 fi
68
69 msg "Starting shell debugging $status_msg $module..."
70 DEBUG_SHELL="true"
71 set -x
72 fi
73}
74
75debug_enabled() {
76 return 0
77}
78
79debug_run() {
80 add_module_pre_hook "debug_hook_handler"
81 add_module_post_hook "debug_hook_handler"
82}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/e2fs b/meta/recipes-core/initrdscripts/initramfs-framework/e2fs
new file mode 100755
index 0000000000..29f801a7bd
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/e2fs
@@ -0,0 +1,28 @@
1#!/bin/sh
2# Copyright (C) 2011 O.S. Systems Software LTDA.
3# Licensed on MIT
4
5e2fs_enabled() {
6 return 0
7}
8
9e2fs_run() {
10 filesystems="ext4 ext3 ext2"
11
12 # load modules
13 for fs in $filesystems; do
14 load_kernel_module $fs
15 done
16
17 for fs in $filesystems; do
18 eval "fs_options=\$bootparam_${fs}"
19 if [ -n "$fs_options" ]; then
20 dev=`expr "$fs_options" : '\([^:]*\).*'`
21 path=`expr "$fs_options" : '[^:]*:\([^:]*\).*'`
22
23 info "Mounting $dev as $fs on $path as $fs..."
24 mkdir -p $path
25 mount -t $fs $dev $path
26 fi
27 done
28}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish
new file mode 100755
index 0000000000..325f47be40
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -0,0 +1,47 @@
1#!/bin/sh
2# Copyright (C) 2011 O.S. Systems Software LTDA.
3# Licensed on MIT
4
5finish_enabled() {
6 return 0
7}
8
9finish_run() {
10 if [ -n "$ROOTFS_DIR" ]; then
11 if [ -n "$bootparam_rootdelay" ]; then
12 debug "Sleeping for $rootdelay second(s) to wait root to settle..."
13 sleep $bootparam_rootdelay
14 fi
15
16 if [ -n "$bootparam_root" ]; then
17 debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..."
18
19 if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then
20 root_uuid=`echo $bootparam_root | cut -c6-`
21 bootparam_root="/dev/disk/by-uuid/$root_uuid"
22 fi
23
24 if [ -e "$bootparam_root" ]; then
25 mount $bootparam_root $ROOTFS_DIR
26 else
27 debug "root '$bootparam_root' doesn't exist."
28 fi
29 fi
30
31 if [ ! -d $ROOTFS_DIR/dev ]; then
32 fatal "ERROR: There's no '/dev' on rootfs."
33 fi
34
35 info "Switching root to '$ROOTFS_DIR'..."
36
37 debug "Moving /dev, /proc and /sys onto rootfs..."
38 mount --move /dev $ROOTFS_DIR/dev
39 mount --move /proc $ROOTFS_DIR/proc
40 mount --move /sys $ROOTFS_DIR/sys
41
42 cd $ROOTFS_DIR
43 exec switch_root -c /dev/console $ROOTFS_DIR /sbin/init
44 else
45 debug "No rootfs has been set"
46 fi
47}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
new file mode 100755
index 0000000000..20774aa5e9
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -0,0 +1,140 @@
1#!/bin/sh
2# Copyright (C) 2011 O.S. Systems Software LTDA.
3# Licensed on MIT
4#
5# Provides the API to be used by the initramfs modules
6#
7# Modules need to provide the following functions:
8#
9# <module>_enabled : check if the module ought to run (return 1 to skip)
10# <module>_run : do what is need
11#
12# Boot parameters are available on environment in the as:
13#
14# 'foo=value' as 'bootparam_foo=value'
15# 'foo' as 'bootparam_foo=true'
16
17# Register a function to be called before running a module
18# The hook is called as:
19# <function> pre <module>
20add_module_pre_hook() {
21 MODULE_PRE_HOOKS="$MODULE_PRE_HOOKS $1"
22}
23
24# Register a function to be called after running a module
25# The hook is called as:
26# <function> post <module>
27add_module_post_hook() {
28 MODULE_POST_HOOKS="$MODULE_POST_HOOKS $1"
29}
30
31# Load kernel module
32load_kernel_module() {
33 if modprobe $1 >/dev/null 2>&1; then
34 info "Loaded module $1"
35 else
36 debug "Failed to load module $1"
37 fi
38}
39
40# Prints information
41msg() {
42 echo "$@" >/dev/console
43}
44
45# Prints information if verbose bootparam is used
46info() {
47 [ -n "$bootparam_verbose" ] && echo "$@" >/dev/console
48}
49
50# Prints information if debug bootparam is used
51debug() {
52 [ -n "$bootparam_debug" ] && echo "DEBUG: $@" >/dev/console
53}
54
55# Prints a message and start a endless loop
56fatal() {
57 echo $1 >/dev/console
58 echo >/dev/console
59
60 while [ "true" ]; do
61 sleep 3600
62 done
63}
64
65# Variables shared amoung modules
66ROOTFS_DIR="/rootfs" # where to do the switch root
67MODULE_PRE_HOOKS="" # functions to call before running each module
68MODULE_POST_HOOKS="" # functions to call after running each module
69MODULES_DIR=/init.d # place to look for modules
70
71# make mount stop complaining about missing /etc/fstab
72touch /etc/fstab
73
74# initialize /proc, /sys and /var/lock
75mkdir -p /proc /sys /var/lock
76mount -t proc proc /proc
77mount -t sysfs sysfs /sys
78
79# populate bootparam environment
80for p in `cat /proc/cmdline`; do
81 opt=`echo $p | cut -d'=' -f1`
82 opt=`echo $opt | sed -e 's/-/_/'`
83 if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
84 eval "bootparam_${opt}=true"
85 else
86 value="`echo $p | cut -d'=' -f2-`"
87 eval "bootparam_${opt}=\"${value}\""
88 fi
89done
90
91# use /dev with devtmpfs
92if grep -q devtmpfs /proc/filesystems; then
93 mkdir -p /dev
94 mount -t devtmpfs devtmpfs /dev
95else
96 if [ ! -d /dev ]; then
97 fatal "ERROR: /dev doesn't exist and kernel doesn't has devtmpfs enabled."
98 fi
99fi
100
101mkdir $ROOTFS_DIR
102
103# Load and run modules
104for m in $MODULES_DIR/*; do
105 # Skip backup files
106 if [ "`echo $m | sed -e 's/\~$//'`" = "$m" ]; then
107 continue
108 fi
109
110 module=`basename $m | cut -d'-' -f 2`
111 debug "Loading module $module"
112
113 # pre hooks
114 for h in $MODULE_PRE_HOOKS; do
115 debug "Calling module hook (pre): $h"
116 eval "$h pre $module"
117 debug "Finished module hook (pre): $h"
118 done
119
120 # process module
121 . $m
122
123 if ! eval "${module}_enabled"; then
124 debug "Skipping module $module"
125 continue
126 fi
127
128 debug "Running ${module}_run"
129 eval "${module}_run"
130
131 # post hooks
132 for h in $MODULE_POST_HOOKS; do
133 debug "Calling module hook (post): $h"
134 eval "$h post $module"
135 debug "Finished module hook (post): $h"
136 done
137done
138
139# Catch all
140fatal "ERROR: Initramfs failed to initialize the system."
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/mdev b/meta/recipes-core/initrdscripts/initramfs-framework/mdev
new file mode 100644
index 0000000000..a5df1d717a
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/mdev
@@ -0,0 +1,30 @@
1#!/bin/sh
2# Copyright (C) 2011 O.S. Systems Software LTDA.
3# Licensed on MIT
4
5mdev_enabled() {
6 if [ ! -e /sbin/mdev ]; then
7 debug "/sbin/mdev doesn't exist"
8 return 1
9 fi
10
11 return 0
12}
13
14mdev_run() {
15 # setup the environment
16 mount -t tmpfs tmpfs /dev
17
18 mkdir -m 1777 /dev/shm
19
20 mkdir -m 0755 /dev/pts
21 mount -t devpts devpts /dev/pts
22
23 echo /sbin/mdev > /proc/sys/kernel/hotplug
24 mdev -s
25
26 # load modules for devices
27 find /sys -name modalias | while read m; do
28 load_kernel_module $(cat $m)
29 done
30}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
new file mode 100644
index 0000000000..bb462dc448
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -0,0 +1,45 @@
1#!/bin/sh
2# Copyright (C) 2011, 2012 O.S. Systems Software LTDA.
3# Licensed on MIT
4
5udev_shutdown_hook_handler() {
6 status=$1
7 module=$2
8 if [ "$status" = "pre" ] && [ "$module" = "finish" ]; then
9 killall `basename $_UDEV_DAEMON` 2>/dev/null
10 fi
11}
12
13udev_daemon() {
14 OPTIONS="/sbin/udev/udevd /sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd"
15
16 for o in $OPTIONS; do
17 if [ -x "$o" ]; then
18 echo $o
19 return 0
20 fi
21 done
22
23 return 1
24}
25
26_UDEV_DAEMON=`udev_daemon`
27
28udev_enabled() {
29 if [ -z "$_UDEV_DAEMON" ]; then
30 msg "WARNING: Cannot find the udev daemon; daemon will not be started in initramfs."
31 return 1
32 fi
33
34 return 0
35}
36
37udev_run() {
38 add_module_pre_hook "udev_shutdown_hook_handler"
39
40 mkdir -p /run
41
42 $_UDEV_DAEMON --daemon
43 udevadm trigger --action=add
44 udevadm settle
45}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
new file mode 100644
index 0000000000..a2c0813f30
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -0,0 +1,59 @@
1DESCRIPTION = "initramfs modular system"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4RDEPENDS_${PN} += "busybox"
5
6PR = "r2"
7
8inherit allarch
9
10SRC_URI = "file://init \
11 file://finish \
12 file://mdev \
13 file://udev \
14 file://e2fs \
15 file://debug"
16
17do_install() {
18 install -d ${D}/init.d
19
20 # base
21 install -m 0755 ${WORKDIR}/init ${D}/init
22 install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
23
24 # mdev
25 install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev
26
27 # udev
28 install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev
29
30 # e2fs
31 install -m 0755 ${WORKDIR}/e2fs ${D}/init.d/10-e2fs
32
33 # debug
34 install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
35}
36
37PACKAGES = "${PN}-base \
38 initramfs-module-mdev \
39 initramfs-module-udev \
40 initramfs-module-e2fs \
41 initramfs-module-debug"
42
43FILES_${PN}-base = "/init /init.d/99-finish"
44
45DESCRIPTION_initramfs-module-mdev = "initramfs support for mdev"
46RDEPENDS_initramfs-module-mdev = "${PN}-base"
47FILES_initramfs-module-mdev = "/init.d/01-mdev"
48
49DESCRIPTION_initramfs-module-udev = "initramfs support for udev"
50RDEPENDS_initramfs-module-udev = "${PN}-base udev udev-utils"
51FILES_initramfs-module-udev = "/init.d/01-udev"
52
53DESCRIPTION_initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystems"
54RDEPENDS_initramfs-module-e2fs = "${PN}-base"
55FILES_initramfs-module-e2fs = "/init.d/10-e2fs"
56
57DESCRIPTION_initramfs-module-debug = "initramfs dynamic debug support"
58RDEPENDS_initramfs-module-debug = "${PN}-base"
59FILES_initramfs-module-debug = "/init.d/00-debug"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
new file mode 100644
index 0000000000..8626bb5b33
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "A live image init script"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4DEPENDS = "virtual/kernel"
5RDEPENDS_${PN} = "udev udev-extraconf"
6SRC_URI = "file://init-live.sh"
7
8PR = "r11"
9
10do_install() {
11 install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
12}
13
14FILES_${PN} += " /init "
15
16# Due to kernel depdendency
17PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
new file mode 100644
index 0000000000..264931f9a3
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "A live image init script for grub-efi"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-install-efi.sh"
5
6PR = "r1"
7
8RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools"
9
10do_install() {
11 install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/install-efi.sh
12}
13
14# While this package maybe an allarch due to it being a
15# simple script, reality is that it is Host specific based
16# on the COMPATIBLE_HOST below, which needs to take precedence
17#inherit allarch
18INHIBIT_DEFAULT_DEPS = "1"
19
20FILES_${PN} = " /install-efi.sh "
21
22COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
new file mode 100644
index 0000000000..3a8836d5b9
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "A live image init script for grub"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-install.sh"
5
6PR = "r9"
7
8RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
9
10do_install() {
11 install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh
12}
13
14# While this package maybe an allarch due to it being a
15# simple script, reality is that it is Host specific based
16# on the COMPATIBLE_HOST below, which needs to take precedence
17#inherit allarch
18INHIBIT_DEFAULT_DEPS = "1"
19
20FILES_${PN} = " /install.sh "
21
22COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch b/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch
new file mode 100644
index 0000000000..1ee8181f12
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch
@@ -0,0 +1,347 @@
1Upstream-Status: Inappropriate [licensing]
2
3diff --git a/COPYING b/COPYING
4new file mode 100644
5index 0000000..d511905
6--- /dev/null
7+++ b/COPYING
8@@ -0,0 +1,339 @@
9+ GNU GENERAL PUBLIC LICENSE
10+ Version 2, June 1991
11+
12+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
13+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14+ Everyone is permitted to copy and distribute verbatim copies
15+ of this license document, but changing it is not allowed.
16+
17+ Preamble
18+
19+ The licenses for most software are designed to take away your
20+freedom to share and change it. By contrast, the GNU General Public
21+License is intended to guarantee your freedom to share and change free
22+software--to make sure the software is free for all its users. This
23+General Public License applies to most of the Free Software
24+Foundation's software and to any other program whose authors commit to
25+using it. (Some other Free Software Foundation software is covered by
26+the GNU Lesser General Public License instead.) You can apply it to
27+your programs, too.
28+
29+ When we speak of free software, we are referring to freedom, not
30+price. Our General Public Licenses are designed to make sure that you
31+have the freedom to distribute copies of free software (and charge for
32+this service if you wish), that you receive source code or can get it
33+if you want it, that you can change the software or use pieces of it
34+in new free programs; and that you know you can do these things.
35+
36+ To protect your rights, we need to make restrictions that forbid
37+anyone to deny you these rights or to ask you to surrender the rights.
38+These restrictions translate to certain responsibilities for you if you
39+distribute copies of the software, or if you modify it.
40+
41+ For example, if you distribute copies of such a program, whether
42+gratis or for a fee, you must give the recipients all the rights that
43+you have. You must make sure that they, too, receive or can get the
44+source code. And you must show them these terms so they know their
45+rights.
46+
47+ We protect your rights with two steps: (1) copyright the software, and
48+(2) offer you this license which gives you legal permission to copy,
49+distribute and/or modify the software.
50+
51+ Also, for each author's protection and ours, we want to make certain
52+that everyone understands that there is no warranty for this free
53+software. If the software is modified by someone else and passed on, we
54+want its recipients to know that what they have is not the original, so
55+that any problems introduced by others will not reflect on the original
56+authors' reputations.
57+
58+ Finally, any free program is threatened constantly by software
59+patents. We wish to avoid the danger that redistributors of a free
60+program will individually obtain patent licenses, in effect making the
61+program proprietary. To prevent this, we have made it clear that any
62+patent must be licensed for everyone's free use or not licensed at all.
63+
64+ The precise terms and conditions for copying, distribution and
65+modification follow.
66+
67+ GNU GENERAL PUBLIC LICENSE
68+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
69+
70+ 0. This License applies to any program or other work which contains
71+a notice placed by the copyright holder saying it may be distributed
72+under the terms of this General Public License. The "Program", below,
73+refers to any such program or work, and a "work based on the Program"
74+means either the Program or any derivative work under copyright law:
75+that is to say, a work containing the Program or a portion of it,
76+either verbatim or with modifications and/or translated into another
77+language. (Hereinafter, translation is included without limitation in
78+the term "modification".) Each licensee is addressed as "you".
79+
80+Activities other than copying, distribution and modification are not
81+covered by this License; they are outside its scope. The act of
82+running the Program is not restricted, and the output from the Program
83+is covered only if its contents constitute a work based on the
84+Program (independent of having been made by running the Program).
85+Whether that is true depends on what the Program does.
86+
87+ 1. You may copy and distribute verbatim copies of the Program's
88+source code as you receive it, in any medium, provided that you
89+conspicuously and appropriately publish on each copy an appropriate
90+copyright notice and disclaimer of warranty; keep intact all the
91+notices that refer to this License and to the absence of any warranty;
92+and give any other recipients of the Program a copy of this License
93+along with the Program.
94+
95+You may charge a fee for the physical act of transferring a copy, and
96+you may at your option offer warranty protection in exchange for a fee.
97+
98+ 2. You may modify your copy or copies of the Program or any portion
99+of it, thus forming a work based on the Program, and copy and
100+distribute such modifications or work under the terms of Section 1
101+above, provided that you also meet all of these conditions:
102+
103+ a) You must cause the modified files to carry prominent notices
104+ stating that you changed the files and the date of any change.
105+
106+ b) You must cause any work that you distribute or publish, that in
107+ whole or in part contains or is derived from the Program or any
108+ part thereof, to be licensed as a whole at no charge to all third
109+ parties under the terms of this License.
110+
111+ c) If the modified program normally reads commands interactively
112+ when run, you must cause it, when started running for such
113+ interactive use in the most ordinary way, to print or display an
114+ announcement including an appropriate copyright notice and a
115+ notice that there is no warranty (or else, saying that you provide
116+ a warranty) and that users may redistribute the program under
117+ these conditions, and telling the user how to view a copy of this
118+ License. (Exception: if the Program itself is interactive but
119+ does not normally print such an announcement, your work based on
120+ the Program is not required to print an announcement.)
121+
122+These requirements apply to the modified work as a whole. If
123+identifiable sections of that work are not derived from the Program,
124+and can be reasonably considered independent and separate works in
125+themselves, then this License, and its terms, do not apply to those
126+sections when you distribute them as separate works. But when you
127+distribute the same sections as part of a whole which is a work based
128+on the Program, the distribution of the whole must be on the terms of
129+this License, whose permissions for other licensees extend to the
130+entire whole, and thus to each and every part regardless of who wrote it.
131+
132+Thus, it is not the intent of this section to claim rights or contest
133+your rights to work written entirely by you; rather, the intent is to
134+exercise the right to control the distribution of derivative or
135+collective works based on the Program.
136+
137+In addition, mere aggregation of another work not based on the Program
138+with the Program (or with a work based on the Program) on a volume of
139+a storage or distribution medium does not bring the other work under
140+the scope of this License.
141+
142+ 3. You may copy and distribute the Program (or a work based on it,
143+under Section 2) in object code or executable form under the terms of
144+Sections 1 and 2 above provided that you also do one of the following:
145+
146+ a) Accompany it with the complete corresponding machine-readable
147+ source code, which must be distributed under the terms of Sections
148+ 1 and 2 above on a medium customarily used for software interchange; or,
149+
150+ b) Accompany it with a written offer, valid for at least three
151+ years, to give any third party, for a charge no more than your
152+ cost of physically performing source distribution, a complete
153+ machine-readable copy of the corresponding source code, to be
154+ distributed under the terms of Sections 1 and 2 above on a medium
155+ customarily used for software interchange; or,
156+
157+ c) Accompany it with the information you received as to the offer
158+ to distribute corresponding source code. (This alternative is
159+ allowed only for noncommercial distribution and only if you
160+ received the program in object code or executable form with such
161+ an offer, in accord with Subsection b above.)
162+
163+The source code for a work means the preferred form of the work for
164+making modifications to it. For an executable work, complete source
165+code means all the source code for all modules it contains, plus any
166+associated interface definition files, plus the scripts used to
167+control compilation and installation of the executable. However, as a
168+special exception, the source code distributed need not include
169+anything that is normally distributed (in either source or binary
170+form) with the major components (compiler, kernel, and so on) of the
171+operating system on which the executable runs, unless that component
172+itself accompanies the executable.
173+
174+If distribution of executable or object code is made by offering
175+access to copy from a designated place, then offering equivalent
176+access to copy the source code from the same place counts as
177+distribution of the source code, even though third parties are not
178+compelled to copy the source along with the object code.
179+
180+ 4. You may not copy, modify, sublicense, or distribute the Program
181+except as expressly provided under this License. Any attempt
182+otherwise to copy, modify, sublicense or distribute the Program is
183+void, and will automatically terminate your rights under this License.
184+However, parties who have received copies, or rights, from you under
185+this License will not have their licenses terminated so long as such
186+parties remain in full compliance.
187+
188+ 5. You are not required to accept this License, since you have not
189+signed it. However, nothing else grants you permission to modify or
190+distribute the Program or its derivative works. These actions are
191+prohibited by law if you do not accept this License. Therefore, by
192+modifying or distributing the Program (or any work based on the
193+Program), you indicate your acceptance of this License to do so, and
194+all its terms and conditions for copying, distributing or modifying
195+the Program or works based on it.
196+
197+ 6. Each time you redistribute the Program (or any work based on the
198+Program), the recipient automatically receives a license from the
199+original licensor to copy, distribute or modify the Program subject to
200+these terms and conditions. You may not impose any further
201+restrictions on the recipients' exercise of the rights granted herein.
202+You are not responsible for enforcing compliance by third parties to
203+this License.
204+
205+ 7. If, as a consequence of a court judgment or allegation of patent
206+infringement or for any other reason (not limited to patent issues),
207+conditions are imposed on you (whether by court order, agreement or
208+otherwise) that contradict the conditions of this License, they do not
209+excuse you from the conditions of this License. If you cannot
210+distribute so as to satisfy simultaneously your obligations under this
211+License and any other pertinent obligations, then as a consequence you
212+may not distribute the Program at all. For example, if a patent
213+license would not permit royalty-free redistribution of the Program by
214+all those who receive copies directly or indirectly through you, then
215+the only way you could satisfy both it and this License would be to
216+refrain entirely from distribution of the Program.
217+
218+If any portion of this section is held invalid or unenforceable under
219+any particular circumstance, the balance of the section is intended to
220+apply and the section as a whole is intended to apply in other
221+circumstances.
222+
223+It is not the purpose of this section to induce you to infringe any
224+patents or other property right claims or to contest validity of any
225+such claims; this section has the sole purpose of protecting the
226+integrity of the free software distribution system, which is
227+implemented by public license practices. Many people have made
228+generous contributions to the wide range of software distributed
229+through that system in reliance on consistent application of that
230+system; it is up to the author/donor to decide if he or she is willing
231+to distribute software through any other system and a licensee cannot
232+impose that choice.
233+
234+This section is intended to make thoroughly clear what is believed to
235+be a consequence of the rest of this License.
236+
237+ 8. If the distribution and/or use of the Program is restricted in
238+certain countries either by patents or by copyrighted interfaces, the
239+original copyright holder who places the Program under this License
240+may add an explicit geographical distribution limitation excluding
241+those countries, so that distribution is permitted only in or among
242+countries not thus excluded. In such case, this License incorporates
243+the limitation as if written in the body of this License.
244+
245+ 9. The Free Software Foundation may publish revised and/or new versions
246+of the General Public License from time to time. Such new versions will
247+be similar in spirit to the present version, but may differ in detail to
248+address new problems or concerns.
249+
250+Each version is given a distinguishing version number. If the Program
251+specifies a version number of this License which applies to it and "any
252+later version", you have the option of following the terms and conditions
253+either of that version or of any later version published by the Free
254+Software Foundation. If the Program does not specify a version number of
255+this License, you may choose any version ever published by the Free Software
256+Foundation.
257+
258+ 10. If you wish to incorporate parts of the Program into other free
259+programs whose distribution conditions are different, write to the author
260+to ask for permission. For software which is copyrighted by the Free
261+Software Foundation, write to the Free Software Foundation; we sometimes
262+make exceptions for this. Our decision will be guided by the two goals
263+of preserving the free status of all derivatives of our free software and
264+of promoting the sharing and reuse of software generally.
265+
266+ NO WARRANTY
267+
268+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
269+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
270+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
271+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
272+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
273+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
274+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
275+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
276+REPAIR OR CORRECTION.
277+
278+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
279+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
280+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
281+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
282+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
283+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
284+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
285+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
286+POSSIBILITY OF SUCH DAMAGES.
287+
288+ END OF TERMS AND CONDITIONS
289+
290+ How to Apply These Terms to Your New Programs
291+
292+ If you develop a new program, and you want it to be of the greatest
293+possible use to the public, the best way to achieve this is to make it
294+free software which everyone can redistribute and change under these terms.
295+
296+ To do so, attach the following notices to the program. It is safest
297+to attach them to the start of each source file to most effectively
298+convey the exclusion of warranty; and each file should have at least
299+the "copyright" line and a pointer to where the full notice is found.
300+
301+ <one line to give the program's name and a brief idea of what it does.>
302+ Copyright (C) <year> <name of author>
303+
304+ This program is free software; you can redistribute it and/or modify
305+ it under the terms of the GNU General Public License as published by
306+ the Free Software Foundation; either version 2 of the License, or
307+ (at your option) any later version.
308+
309+ This program is distributed in the hope that it will be useful,
310+ but WITHOUT ANY WARRANTY; without even the implied warranty of
311+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
312+ GNU General Public License for more details.
313+
314+ You should have received a copy of the GNU General Public License along
315+ with this program; if not, write to the Free Software Foundation, Inc.,
316+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
317+
318+Also add information on how to contact you by electronic and paper mail.
319+
320+If the program is interactive, make it output a short notice like this
321+when it starts in an interactive mode:
322+
323+ Gnomovision version 69, Copyright (C) year name of author
324+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
325+ This is free software, and you are welcome to redistribute it
326+ under certain conditions; type `show c' for details.
327+
328+The hypothetical commands `show w' and `show c' should show the appropriate
329+parts of the General Public License. Of course, the commands you use may
330+be called something other than `show w' and `show c'; they could even be
331+mouse-clicks or menu items--whatever suits your program.
332+
333+You should also get your employer (if you work as a programmer) or your
334+school, if any, to sign a "copyright disclaimer" for the program, if
335+necessary. Here is a sample; alter the names:
336+
337+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
338+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
339+
340+ <signature of Ty Coon>, 1 April 1989
341+ Ty Coon, President of Vice
342+
343+This General Public License does not permit incorporating your program into
344+proprietary programs. If your program is a subroutine library, you may
345+consider it more useful to permit linking proprietary applications with the
346+library. If this is what you want to do, use the GNU Lesser General
347+Public License instead of this License.
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh b/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh
new file mode 100644
index 0000000000..b577b9a03a
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/arm/alignment.sh
@@ -0,0 +1,13 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: alignment
4# Required-Start: mountkernfs
5# Required-Stop: mountkernfs
6# Default-Start: S
7# Default-Stop:
8### END INIT INFO
9
10if [ -e /proc/cpu/alignment ]; then
11 echo "3" > /proc/cpu/alignment
12fi
13
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/banner.sh b/meta/recipes-core/initscripts/initscripts-1.0/banner.sh
new file mode 100644
index 0000000000..9e2b091252
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/banner.sh
@@ -0,0 +1,24 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: banner
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8### END INIT INFO
9
10if [ ! -e /dev/tty ]; then
11 /bin/mknod -m 0666 /dev/tty c 5 0
12fi
13
14if ( > /dev/tty0 ) 2>/dev/null; then
15 vtmaster=/dev/tty0
16elif ( > /dev/vc/0 ) 2>/dev/null; then
17 vtmaster=/dev/vc/0
18elif ( > /dev/console ) 2>/dev/null; then
19 vtmaster=/dev/console
20else
21 vtmaster=/dev/null
22fi
23echo > $vtmaster
24echo "Please wait: booting..." > $vtmaster
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
new file mode 100755
index 0000000000..3b5a47fcdd
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -0,0 +1,71 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: bootmisc
4# Required-Start: $local_fs mountvirtfs
5# Required-Stop: $local_fs
6# Default-Start: S
7# Default-Stop: 0 6
8# Short-Description: Misc and other.
9### END INIT INFO
10
11. /etc/default/rcS
12#
13# Put a nologin file in /etc to prevent people from logging in before
14# system startup is complete.
15#
16if test "$DELAYLOGIN" = yes
17then
18 echo "System bootup in progress - please wait" > /etc/nologin
19 cp /etc/nologin /etc/nologin.boot
20fi
21
22#
23# Set pseudo-terminal access permissions.
24#
25if test -c /dev/ttyp0
26then
27 chmod 666 /dev/tty[p-za-e][0-9a-f]
28 chown root:tty /dev/tty[p-za-e][0-9a-f]
29fi
30
31#
32# Apply /proc settings if defined
33#
34SYSCTL_CONF="/etc/sysctl.conf"
35if [ -f "${SYSCTL_CONF}" ]
36then
37 if [ -x "/sbin/sysctl" ]
38 then
39 /sbin/sysctl -p "${SYSCTL_CONF}"
40 else
41 echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
42 fi
43fi
44
45#
46# Update /etc/motd.
47#
48if test "$EDITMOTD" != no
49then
50 uname -a > /etc/motd.tmp
51 sed 1d /etc/motd >> /etc/motd.tmp
52 mv /etc/motd.tmp /etc/motd
53fi
54
55#
56# This is as good a place as any for a sanity check
57#
58# Set the system clock from hardware clock
59# If the timestamp is more recent than the current time,
60# use the timestamp instead.
61test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
62if test -e /etc/timestamp
63then
64 SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
65 read TIMESTAMP < /etc/timestamp
66 if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
67 date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
68 test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
69 fi
70fi
71: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh
new file mode 100755
index 0000000000..62869451b7
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/checkfs.sh
@@ -0,0 +1,50 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: checkfs
4# Required-Start: checkroot
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Check all other file systems
9### END INIT INFO
10
11. /etc/default/rcS
12
13#
14# Check the rest of the filesystems.
15#
16if test ! -f /fastboot
17then
18 if test -f /forcefsck
19 then
20 force="-f"
21 else
22 force=""
23 fi
24 if test "$FSCKFIX" = yes
25 then
26 fix="-y"
27 else
28 fix="-a"
29 fi
30 spinner="-C"
31 case "$TERM" in
32 dumb|network|unknown|"") spinner="" ;;
33 esac
34 test "`uname -m`" = "s390" && spinner="" # This should go away
35 test "$VERBOSE" != no && echo "Checking all filesystems..."
36 fsck $spinner -R -A $fix $force
37 if test "$?" -gt 1
38 then
39 echo
40 echo "fsck failed. Please repair manually."
41 echo
42 echo "CONTROL-D will exit from this shell and continue system startup."
43 echo
44 # Start a single user shell on the console
45 /sbin/sulogin $CONSOLE
46 fi
47fi
48rm -f /fastboot /forcefsck
49
50: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh b/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
new file mode 100755
index 0000000000..dfee2afaad
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
@@ -0,0 +1,148 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: checkroot
4# Required-Start: udev
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Check to root file system.
9### END INIT INFO
10
11. /etc/default/rcS
12
13#
14# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to be spawned
15# from this script *before anything else* with a timeout, like SCO does.
16#
17test "$SULOGIN" = yes && sulogin -t 30 $CONSOLE
18
19#
20# Read /etc/fstab.
21#
22exec 9< /etc/fstab
23rootmode=rw
24rootopts=rw
25rootcheck=$ENABLE_ROOTFS_FSCK
26swap_on_md=no
27devfs=
28while read fs mnt type opts dump pass junk <&9
29do
30 case "$fs" in
31 ""|\#*)
32 continue;
33 ;;
34 /dev/md*)
35 # Swap on md device.
36 test "$type" = swap && swap_on_md=yes
37 ;;
38 /dev/*)
39 ;;
40 *)
41 # Might be a swapfile.
42 test "$type" = swap && swap_on_md=yes
43 ;;
44 esac
45 test "$type" = devfs && devfs="$fs"
46 test "$mnt" != / && continue
47 rootopts="$opts"
48 test "$pass" = 0 -o "$pass" = "" && rootcheck=no
49 case "$opts" in
50 ro|ro,*|*,ro|*,ro,*)
51 rootmode=ro
52 ;;
53 esac
54done
55exec 0>&9 9>&-
56
57# Check for conflicting configurations
58if [ "$rootmode" = "ro" -a "$ROOTFS_READ_ONLY" = "no" ] || \
59 [ "$rootmode" = "rw" -a "$ROOTFS_READ_ONLY" = "yes" ]; then
60 echo ""
61 echo "WARN: conflicting configurations in /etc/fstab and /etc/default/rcS"
62 echo " regarding the writability of rootfs. Please fix one of them."
63 echo ""
64fi
65
66
67#
68# Activate the swap device(s) in /etc/fstab. This needs to be done
69# before fsck, since fsck can be quite memory-hungry.
70#
71test "$VERBOSE" != no && echo "Activating swap"
72swapon -a 2> /dev/null
73
74#
75# Check the root filesystem.
76#
77if test -f /fastboot || test $rootcheck = no
78then
79 test $rootcheck = yes && echo "Fast boot, no filesystem check"
80else
81 #
82 # Ensure that root is quiescent and read-only before fsck'ing.
83 #
84 mount -n -o remount,ro /
85 if test $? = 0
86 then
87 if test -f /forcefsck
88 then
89 force="-f"
90 else
91 force=""
92 fi
93 if test "$FSCKFIX" = yes
94 then
95 fix="-y"
96 else
97 fix="-a"
98 fi
99 spinner="-C"
100 case "$TERM" in
101 dumb|network|unknown|"") spinner="" ;;
102 esac
103 test `uname -m` = s390 && spinner="" # This should go away
104 test "$VERBOSE" != no && echo "Checking root filesystem..."
105 fsck $spinner $force $fix /
106 #
107 # If there was a failure, drop into single-user mode.
108 #
109 # NOTE: "failure" is defined as exiting with a return code of
110 # 2 or larger. A return code of 1 indicates that filesystem
111 # errors were corrected but that the boot may proceed.
112 #
113 if test "$?" -gt 1
114 then
115 # Surprise! Re-directing from a HERE document (as in
116 # "cat << EOF") won't work, because the root is read-only.
117 echo
118 echo "fsck failed. Please repair manually and reboot. Please note"
119 echo "that the root filesystem is currently mounted read-only. To"
120 echo "remount it read-write:"
121 echo
122 echo " # mount -n -o remount,rw /"
123 echo
124 echo "CONTROL-D will exit from this shell and REBOOT the system."
125 echo
126 # Start a single user shell on the console
127 /sbin/sulogin $CONSOLE
128 reboot -f
129 fi
130 else
131 echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!"
132 echo
133 fi
134fi
135
136#
137# If the root filesystem was not marked as read-only in /etc/fstab,
138# remount the rootfs rw but do not try to change mtab because it
139# is on a ro fs until the remount succeeded. Then clean up old mtabs
140# and finally write the new mtab.
141#
142mount -n -o remount,$rootmode /
143if test "$rootmode" = rw
144then
145 ln -sf /proc/mounts /dev/mtab
146fi
147
148: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/devpts b/meta/recipes-core/initscripts/initscripts-1.0/devpts
new file mode 100644
index 0000000000..4a0978b404
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/devpts
@@ -0,0 +1,5 @@
1# GID of the `tty' group
2TTYGRP=5
3
4# Set to 600 to have `mesg n' be the default
5TTYMODE=620
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/devpts.sh b/meta/recipes-core/initscripts/initscripts-1.0/devpts.sh
new file mode 100755
index 0000000000..c6043fb1e6
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/devpts.sh
@@ -0,0 +1,28 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: devpts
4# Required-Start: udev
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Mount /dev/pts file systems.
9### END INIT INFO
10
11. /etc/default/devpts
12
13if grep -q devpts /proc/filesystems
14then
15 #
16 # Create multiplexor device.
17 #
18 test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2
19
20 #
21 # Mount /dev/pts if needed.
22 #
23 if ! grep -q devpts /proc/mounts
24 then
25 mkdir -p /dev/pts
26 mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
27 fi
28fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh b/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
new file mode 100644
index 0000000000..a97b0681e1
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
@@ -0,0 +1,17 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: dmesg
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8### END INIT INFO
9
10if [ -f /var/log/dmesg ]; then
11 if [ -f /usr/sbin/logrotate ]; then
12 logrotate -f /etc/logrotate-dmesg.conf
13 else
14 mv -f /var/log/dmesg /var/log/dmesg.old
15 fi
16fi
17dmesg -s 131072 > /var/log/dmesg
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/functions b/meta/recipes-core/initscripts/initscripts-1.0/functions
new file mode 100644
index 0000000000..8e15762f8a
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/functions
@@ -0,0 +1,60 @@
1# -*-Shell-script-*-
2#
3# functions This file contains functions to be used by most or all
4# shell scripts in the /etc/init.d directory.
5#
6# NOTE: The pidofproc () doesn't support the process which is a script unless
7# the pidof supports "-x" option. If you want to use it for such a
8# process:
9# 1) If there is no "pidof -x", replace the "pidof $1" with another
10# command like(for core-image-minimal):
11# ps | awk '/'"$1"'/ {print $1}'
12# Or
13# 2) If there is "pidof -x", replace "pidof" with "pidof -x".
14#
15# pidofproc - print the pid of a process
16# $1: the name of the process
17pidofproc () {
18
19 # pidof output null when no program is running, so no "2>/dev/null".
20 pid=`pidof $1`
21 status=$?
22 case $status in
23 0)
24 echo $pid
25 return 0
26 ;;
27 127)
28 echo "ERROR: command pidof not found" >&2
29 exit 127
30 ;;
31 *)
32 return $status
33 ;;
34 esac
35}
36
37machine_id() { # return the machine ID
38 awk 'BEGIN { FS=": " } /Hardware/ \
39 { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
40}
41
42killproc() { # kill the named process(es)
43 pid=`pidofproc $1` && kill $pid
44}
45
46status() {
47 local pid
48 if [ "$#" = 0 ]; then
49 echo "Usage: status {program}"
50 return 1
51 fi
52 pid=`pidofproc $1`
53 if [ -n "$pid" ]; then
54 echo "$1 (pid $pid) is running..."
55 return 0
56 else
57 echo "$1 is stopped"
58 fi
59 return 3
60}
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/halt b/meta/recipes-core/initscripts/initscripts-1.0/halt
new file mode 100755
index 0000000000..a56f73421b
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/halt
@@ -0,0 +1,29 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: halt
4# Required-Start:
5# Required-Stop:
6# Default-Start:
7# Default-Stop: 0
8# Short-Description: Execute the halt command.
9# Description:
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14# See if we need to cut the power.
15if test -x /etc/init.d/ups-monitor
16then
17 /etc/init.d/ups-monitor poweroff
18fi
19
20# Don't shut down drives if we're using RAID.
21hddown="-h"
22if grep -qs '^md.*active' /proc/mdstat
23then
24 hddown=""
25fi
26
27halt SED_HALTARGS -p $hddown
28
29: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
new file mode 100755
index 0000000000..78fb91c409
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
@@ -0,0 +1,22 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: hostname
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Set hostname based on /etc/hostname
9### END INIT INFO
10HOSTNAME=$(/bin/hostname)
11
12hostname -b -F /etc/hostname 2> /dev/null
13if [ $? -eq 0 ]; then
14 exit
15fi
16
17# Busybox hostname doesn't support -b so we need implement it on our own
18if [ -f /etc/hostname ];then
19 hostname -F /etc/hostname
20elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
21 hostname localhost
22fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/logrotate-dmesg.conf b/meta/recipes-core/initscripts/initscripts-1.0/logrotate-dmesg.conf
new file mode 100644
index 0000000000..6f46e4216f
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/logrotate-dmesg.conf
@@ -0,0 +1,9 @@
1# see "man logrotate" for details
2# rotate dmesg, and keep 5 versions.
3
4/var/log/dmesg {
5 create
6 rotate 5
7 nodateext
8}
9
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh
new file mode 100755
index 0000000000..94bae420c0
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh
@@ -0,0 +1,39 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: mountall
4# Required-Start: mountvirtfs
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Mount all filesystems.
9# Description:
10### END INIT INFO
11
12. /etc/default/rcS
13
14#
15# Mount local filesystems in /etc/fstab. For some reason, people
16# might want to mount "proc" several times, and mount -v complains
17# about this. So we mount "proc" filesystems without -v.
18#
19test "$VERBOSE" != no && echo "Mounting local filesystems..."
20mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
21
22#
23# We might have mounted something over /dev, see if /dev/initctl is there.
24#
25if test ! -p /dev/initctl
26then
27 rm -f /dev/initctl
28 mknod -m 600 /dev/initctl p
29fi
30kill -USR1 1
31
32#
33# Execute swapon command again, in case we want to swap to
34# a file on a now mounted filesystem.
35#
36swapon -a 2> /dev/null
37
38: exit 0
39
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
new file mode 100755
index 0000000000..4fffe4e808
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
@@ -0,0 +1,90 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: mountnfs
4# Required-Start: $local_fs $network $rpcbind
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8### END INIT INFO
9
10. /etc/default/rcS
11
12#
13# Run in a subshell because of I/O redirection.
14#
15test -f /etc/fstab && (
16
17#
18# Read through fstab line by line. If it is NFS, set the flag
19# for mounting NFS filesystems. If any NFS partition is found and it
20# not mounted with the nolock option, we start the rpcbind.
21#
22rpcbind=no
23mount_nfs=no
24mount_smb=no
25mount_ncp=no
26mount_cifs=no
27while read device mountpt fstype options
28do
29 case "$device" in
30 ""|\#*)
31 continue
32 ;;
33 esac
34
35 case "$options" in
36 *noauto*)
37 continue
38 ;;
39 esac
40
41 if test "$fstype" = nfs
42 then
43 mount_nfs=yes
44 case "$options" in
45 *nolock*)
46 ;;
47 *)
48 rpcbind=yes
49 ;;
50 esac
51 fi
52 if test "$fstype" = smbfs
53 then
54 mount_smb=yes
55 fi
56 if test "$fstype" = ncpfs
57 then
58 mount_ncp=yes
59 fi
60 if test "$fstype" = cifs
61 then
62 mount_cifs=yes
63 fi
64done
65
66exec 0>&1
67
68if test "$rpcbind" = yes
69then
70 if test -x /usr/sbin/rpcbind
71 then
72 echo -n "Starting rpcbind... "
73 start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
74 sleep 2
75 fi
76fi
77
78if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
79then
80 echo "Mounting remote filesystems..."
81 test "$mount_nfs" = yes && mount -a -t nfs
82 test "$mount_smb" = yes && mount -a -t smbfs
83 test "$mount_ncp" = yes && mount -a -t ncpfs
84 test "$mount_cifs" = yes && mount -a -t cifs
85fi
86
87) < /etc/fstab
88
89: exit 0
90
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
new file mode 100755
index 0000000000..6ffe1f2171
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -0,0 +1,220 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: volatile
4# Required-Start: $local_fs
5# Required-Stop: $local_fs
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Populate the volatile filesystem
9### END INIT INFO
10
11# Get ROOT_DIR
12DIRNAME=`dirname $0`
13ROOT_DIR=`echo $DIRNAME | sed -ne 's:/etc/.*::p'`
14
15[ -e ${ROOT_DIR}/etc/default/rcS ] && . ${ROOT_DIR}/etc/default/rcS
16# When running populate-volatile.sh at rootfs time, disable cache.
17[ -n "$ROOT_DIR" ] && VOLATILE_ENABLE_CACHE=no
18# If rootfs is read-only, disable cache.
19[ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
20
21CFGDIR="${ROOT_DIR}/etc/default/volatiles"
22TMPROOT="${ROOT_DIR}/var/volatile/tmp"
23COREDEF="00_core"
24
25[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
26
27create_file() {
28 EXEC="
29 touch \"$1\";
30 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
31 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
32
33 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
34
35 [ -e "$1" ] && {
36 [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
37 } || {
38 if [ -z "$ROOT_DIR" ]; then
39 eval $EXEC &
40 else
41 # Creating some files at rootfs time may fail and should fail,
42 # but these failures should not be logged to make sure the do_rootfs
43 # process doesn't fail. This does no harm, as this script will
44 # run on target to set up the correct files and directories.
45 eval $EXEC > /dev/null 2>&1
46 fi
47 }
48}
49
50mk_dir() {
51 EXEC="
52 mkdir -p \"$1\";
53 chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
54 chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
55
56 test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
57 [ -e "$1" ] && {
58 [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
59 } || {
60 if [ -z "$ROOT_DIR" ]; then
61 eval $EXEC
62 else
63 # For the same reason with create_file(), failures should
64 # not be logged.
65 eval $EXEC > /dev/null 2>&1
66 fi
67 }
68}
69
70link_file() {
71 EXEC="
72 if [ -L \"$2\" ]; then
73 [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
74 elif [ -d \"$2\" ]; then
75 cp -a $2/* $1 2>/dev/null;
76 cp -a $2/.[!.]* $1 2>/dev/null;
77 rm -rf \"$2\";
78 ln -sf \"$1\" \"$2\";
79 else
80 ln -sf \"$1\" \"$2\";
81 fi
82 "
83
84 test "$VOLATILE_ENABLE_CACHE" = yes && echo " $EXEC" >> /etc/volatile.cache.build
85
86 if [ -z "$ROOT_DIR" ]; then
87 eval $EXEC &
88 else
89 # For the same reason with create_file(), failures should
90 # not be logged.
91 eval $EXEC > /dev/null 2>&1
92 fi
93}
94
95check_requirements() {
96 cleanup() {
97 rm "${TMP_INTERMED}"
98 rm "${TMP_DEFINED}"
99 rm "${TMP_COMBINED}"
100 }
101
102 CFGFILE="$1"
103 [ `basename "${CFGFILE}"` = "${COREDEF}" ] && return 0
104
105 TMP_INTERMED="${TMPROOT}/tmp.$$"
106 TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
107 TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
108
109 cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
110 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
111 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
112 NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
113 NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
114
115 [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
116 echo "Undefined users:"
117 diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
118 cleanup
119 return 1
120 }
121
122
123 cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
124 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
125 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
126
127 NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
128 NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
129
130 [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
131 echo "Undefined groups:"
132 diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
133 cleanup
134 return 1
135 }
136
137 # Add checks for required directories here
138
139 cleanup
140 return 0
141}
142
143apply_cfgfile() {
144 CFGFILE="$1"
145
146 check_requirements "${CFGFILE}" || {
147 echo "Skipping ${CFGFILE}"
148 return 1
149 }
150
151 cat ${CFGFILE} | grep -v "^#" | \
152 while read LINE; do
153 eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
154 TNAME=${ROOT_DIR}${TNAME}
155 [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
156
157 [ "${TTYPE}" = "l" ] && {
158 TSOURCE="$TLTARGET"
159 [ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
160 link_file "${TSOURCE}" "${TNAME}"
161 continue
162 }
163
164 [ -L "${TNAME}" ] && {
165 [ "${VERBOSE}" != "no" ] && echo "Found link."
166 NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
167 echo ${NEWNAME} | grep -v "^/" >/dev/null && {
168 TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
169 [ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
170 } || {
171 TNAME="${NEWNAME}"
172 [ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
173 }
174 }
175
176 case "${TTYPE}" in
177 "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
178 create_file "${TNAME}" &
179 ;;
180 "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
181 mk_dir "${TNAME}"
182 # Add check to see if there's an entry in fstab to mount.
183 ;;
184 *) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
185 continue
186 ;;
187 esac
188 done
189 return 0
190}
191
192clearcache=0
193exec 9</proc/cmdline
194while read line <&9
195do
196 case "$line" in
197 *clearcache*) clearcache=1
198 ;;
199 *) continue
200 ;;
201 esac
202done
203exec 9>&-
204
205if test -e ${ROOT_DIR}/etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
206then
207 sh ${ROOT_DIR}/etc/volatile.cache
208else
209 rm -f ${ROOT_DIR}/etc/volatile.cache ${ROOT_DIR}/etc/volatile.cache.build
210 for file in `ls -1 "${CFGDIR}" | sort`; do
211 apply_cfgfile "${CFGDIR}/${file}"
212 done
213
214 [ -e ${ROOT_DIR}/etc/volatile.cache.build ] && sync && mv ${ROOT_DIR}/etc/volatile.cache.build ${ROOT_DIR}/etc/volatile.cache
215fi
216
217if [ -z "${ROOT_DIR}" ] && [ -f /etc/ld.so.cache ] && [ ! -f /var/run/ld.so.cache ]
218then
219 ln -s /etc/ld.so.cache /var/run/ld.so.cache
220fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
new file mode 100644
index 0000000000..1a0328d63e
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
@@ -0,0 +1,38 @@
1#!/bin/sh
2
3. /etc/default/rcS
4
5[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
6
7is_on_read_only_partition () {
8 DIRECTORY=$1
9 dir=`readlink -f $DIRECTORY`
10 while true; do
11 if [ ! -d "$dir" ]; then
12 echo "ERROR: $dir is not a directory"
13 exit 1
14 else
15 for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \
16 END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do
17 [ "$flag" = "FOUND" ] && partition="read-write"
18 [ "$flag" = "ro" ] && { partition="read-only"; break; }
19 done
20 if [ "$dir" = "/" -o -n "$partition" ]; then
21 break
22 else
23 dir=`dirname $dir`
24 fi
25 fi
26 done
27 [ "$partition" = "read-only" ] && echo "yes" || echo "no"
28}
29
30if [ "$1" = "start" ] ; then
31 if [ `is_on_read_only_partition /var/lib` = "yes" ]; then
32 grep -q "tmpfs /var/volatile" /proc/mounts || mount /var/volatile
33 mkdir -p /var/volatile/lib
34 cp -a /var/lib/* /var/volatile/lib
35 mount --bind /var/volatile/lib /var/lib
36 fi
37fi
38
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/reboot b/meta/recipes-core/initscripts/initscripts-1.0/reboot
new file mode 100755
index 0000000000..087d8d5da4
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/reboot
@@ -0,0 +1,15 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: reboot
4# Required-Start:
5# Required-Stop:
6# Default-Start:
7# Default-Stop: 6
8# Short-Description: Execute the reboot command.
9# Description:
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14echo -n "Rebooting... "
15reboot SED_HALTARGS
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/rmnologin.sh b/meta/recipes-core/initscripts/initscripts-1.0/rmnologin.sh
new file mode 100755
index 0000000000..76de3418ac
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/rmnologin.sh
@@ -0,0 +1,20 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: rmnologin
4# Required-Start: $remote_fs $all
5# Required-Stop:
6# Default-Start: 2 3 4 5
7# Default-Stop:
8# Short-Description: Remove /etc/nologin at boot
9# Description: This script removes the /etc/nologin file as the
10# last step in the boot process, if DELAYLOGIN=yes.
11# If DELAYLOGIN=no, /etc/nologin was not created by
12# bootmisc earlier in the boot process.
13### END INIT INFO
14
15if test -f /etc/nologin.boot
16then
17 rm -f /etc/nologin /etc/nologin.boot
18fi
19
20: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
new file mode 100644
index 0000000000..1f804e2374
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -0,0 +1,13 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: save-rtc
4# Required-Start:
5# Required-Stop: $local_fs hwclock
6# Default-Start: S
7# Default-Stop: 0 6
8# Short-Description: Store system clock into file
9# Description:
10### END INIT INFO
11
12# Update the timestamp
13date -u +%4Y%2m%2d%2H%2M > /etc/timestamp
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sendsigs b/meta/recipes-core/initscripts/initscripts-1.0/sendsigs
new file mode 100755
index 0000000000..34e1b7714b
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/sendsigs
@@ -0,0 +1,21 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: sendsigs
4# Required-Start:
5# Required-Stop: umountnfs
6# Default-Start:
7# Default-Stop: 0 6
8# Short-Description: Kill all remaining processes.
9# Description:
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14# Kill all processes.
15echo "Sending all processes the TERM signal..."
16killall5 -15
17sleep 5
18echo "Sending all processes the KILL signal..."
19killall5 -9
20
21: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/single b/meta/recipes-core/initscripts/initscripts-1.0/single
new file mode 100755
index 0000000000..da82d178a1
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/single
@@ -0,0 +1,24 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: single
4# Required-Start: $local_fs $all killprocs
5# Required-Stop:
6# Default-Start: 1
7# Default-Stop:
8# Short-Description: executed by init(8) upon entering runlevel 1 (single).
9### END INIT INFO
10
11PATH="/sbin:/bin:/usr/sbin:/usr/bin"
12
13# Kill all processes.
14echo "Sending all processes the TERM signal..."
15killall5 -15
16sleep 5
17echo "Sending all processes the KILL signal..."
18killall5 -9
19
20# We start update here, since we just killed it.
21test -x /sbin/update && update
22
23echo "Entering single-user mode..."
24exec init -t1 S
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
new file mode 100644
index 0000000000..0cfe76e230
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh
@@ -0,0 +1,23 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: mountvirtfs
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8# Short-Description: Mount kernel virtual file systems.
9# Description: Mount initial set of virtual filesystems the kernel
10# provides and that are required by everything.
11### END INIT INFO
12
13if [ -e /proc ] && ! [ -e /proc/mounts ]; then
14 mount -t proc proc /proc
15fi
16
17if [ -e /sys ] && grep -q sysfs /proc/filesystems && ! [ -e /sys/class ]; then
18 mount -t sysfs sysfs /sys
19fi
20
21if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then
22 mount -t debugfs debugfs /sys/kernel/debug
23fi
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/umountfs b/meta/recipes-core/initscripts/initscripts-1.0/umountfs
new file mode 100755
index 0000000000..61324c630b
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/umountfs
@@ -0,0 +1,24 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: umountfs
4# Required-Start:
5# Required-Stop:
6# Default-Start:
7# Default-Stop: 0 6
8# Short-Description: Turn off swap and unmount all local file systems.
9# Description:
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14echo "Deactivating swap..."
15swapoff -a
16
17# We leave /proc mounted.
18echo "Unmounting local filesystems..."
19grep -q /mnt/ram /proc/mounts && mount -o remount,ro /mnt/ram
20mount -o remount,ro /
21
22umount -f -a -r > /dev/null 2>&1
23
24: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
new file mode 100755
index 0000000000..af075407fd
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: umountnfs
4# Required-Start:
5# Required-Stop: umountfs
6# Should-Stop: $network $portmap
7# Default-Start:
8# Default-Stop: 0 6
9# Short-Description: Unmount all network filesystems
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14# Write a reboot record to /var/log/wtmp before unmounting
15halt -w
16
17echo "Unmounting remote filesystems..."
18
19test -f /etc/fstab && (
20
21#
22# Read through fstab line by line and unount network file systems
23#
24while read device mountpt fstype options
25do
26 if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs || test "$fstype" = cifs
27 then
28 umount -f $mountpt
29 fi
30done
31) < /etc/fstab
32
33: exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/urandom b/meta/recipes-core/initscripts/initscripts-1.0/urandom
new file mode 100755
index 0000000000..eb3a7c3359
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/urandom
@@ -0,0 +1,46 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: urandom
4# Required-Start: $local_fs mountvirtfs
5# Required-Stop: $local_fs
6# Default-Start: S
7# Default-Stop: 0 6
8# Short-Description: Save and restore the random seed
9# Description: Save the random seed on shutdown and restore it on boot,
10# to ensure that the seed isn't predicable on startup
11# (because the boot process is predictable)
12### END INIT INFO
13
14test -c /dev/urandom || exit 0
15. /etc/default/rcS
16
17case "$1" in
18 start|"")
19 test "$VERBOSE" != no && echo "Initializing random number generator..."
20 # Load and then save 512 bytes,
21 # which is the size of the entropy pool
22 if test -f /var/lib/urandom/random-seed
23 then
24 cat /var/lib/urandom/random-seed >/dev/urandom
25 fi
26 rm -f /var/lib/urandom/random-seed
27 umask 077
28 dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
29 >/dev/null 2>&1 || echo "urandom start: failed."
30 umask 022
31 ;;
32 stop)
33 # Carry a random seed from shut-down to start-up;
34 # see documentation in linux/drivers/char/random.c
35 test "$VERBOSE" != no && echo "Saving random seed..."
36 umask 077
37 dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
38 >/dev/null 2>&1 || echo "urandom stop: failed."
39 ;;
40 *)
41 echo "Usage: urandom {start|stop}" >&2
42 exit 1
43 ;;
44esac
45
46exit 0
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
new file mode 100644
index 0000000000..297245d0e4
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -0,0 +1,36 @@
1# This configuration file lists filesystem objects that should get verified
2# during startup and be created if missing.
3#
4# Every line must either be a comment starting with #
5# or a definition of format:
6# <type> <owner> <group> <mode> <path> <linksource>
7# where the items are separated by whitespace !
8#
9# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
10#
11# A linking example:
12# l root root 0777 /var/test /tmp/testfile
13# f root root 0644 /var/test none
14#
15# Understanding links:
16# When populate-volatile is to verify/create a directory or file, it will first
17# check it's existence. If a link is found to exist in the place of the target,
18# the path of the target is replaced with the target the link points to.
19# Thus, if a link is in the place to be verified, the object will be created
20# in the place the link points to instead.
21# This explains the order of "link before object" as in the example above, where
22# a link will be created at /var/test pointing to /tmp/testfile and due to this
23# link the file defined as /var/test will actually be created as /tmp/testfile.
24d root root 1777 /run/lock none
25d root root 0755 /var/volatile/log none
26d root root 1777 /var/volatile/tmp none
27l root root 1777 /var/lock /run/lock
28l root root 0755 /var/log /var/volatile/log
29l root root 0755 /var/run /run
30l root root 1777 /var/tmp /var/volatile/tmp
31l root root 1777 /tmp /var/tmp
32d root root 0755 /var/lock/subsys none
33f root root 0664 /var/log/wtmp none
34f root root 0664 /var/run/utmp none
35l root root 0644 /etc/resolv.conf /var/run/resolv.conf
36f root root 0644 /var/run/resolv.conf none
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
new file mode 100644
index 0000000000..5b5085fc00
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -0,0 +1,130 @@
1SUMMARY = "SysV init scripts"
2DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
3SECTION = "base"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6PR = "r141"
7
8INHIBIT_DEFAULT_DEPS = "1"
9
10SRC_URI = "file://functions \
11 file://halt \
12 file://umountfs \
13 file://devpts.sh \
14 file://devpts \
15 file://hostname.sh \
16 file://mountall.sh \
17 file://banner.sh \
18 file://bootmisc.sh \
19 file://mountnfs.sh \
20 file://reboot \
21 file://checkfs.sh \
22 file://single \
23 file://sendsigs \
24 file://urandom \
25 file://rmnologin.sh \
26 file://checkroot.sh \
27 file://umountnfs.sh \
28 file://sysfs.sh \
29 file://populate-volatile.sh \
30 file://read-only-rootfs-hook.sh \
31 file://volatiles \
32 file://save-rtc.sh \
33 file://GPLv2.patch \
34 file://dmesg.sh \
35 file://logrotate-dmesg.conf \
36"
37
38SRC_URI_append_arm = " file://alignment.sh"
39
40KERNEL_VERSION = ""
41
42inherit update-alternatives
43DEPENDS_append = " update-rc.d-native"
44
45ALTERNATIVE_PRIORITY = "90"
46ALTERNATIVE_${PN} = "functions"
47ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
48
49HALTARGS ?= "-d -f"
50
51do_configure() {
52 sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt
53 sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot
54}
55
56do_install () {
57#
58# Create directories and install device independent scripts
59#
60 install -d ${D}${sysconfdir}/init.d
61 install -d ${D}${sysconfdir}/rcS.d
62 install -d ${D}${sysconfdir}/rc0.d
63 install -d ${D}${sysconfdir}/rc1.d
64 install -d ${D}${sysconfdir}/rc2.d
65 install -d ${D}${sysconfdir}/rc3.d
66 install -d ${D}${sysconfdir}/rc4.d
67 install -d ${D}${sysconfdir}/rc5.d
68 install -d ${D}${sysconfdir}/rc6.d
69 install -d ${D}${sysconfdir}/default
70 install -d ${D}${sysconfdir}/default/volatiles
71 # Holds state information pertaining to urandom
72 install -d ${D}/var/lib/urandom
73
74 install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d
75 install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d
76 install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d
77 install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d
78 install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d
79 install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d
80 install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d
81 install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d
82 install -m 0755 ${WORKDIR}/rmnologin.sh ${D}${sysconfdir}/init.d
83 install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d
84 install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d
85 install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d
86 install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d
87 install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d
88 install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default
89 install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d
90 install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
91 install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
92 install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
93 install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
94 install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
95 install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
96
97 if [ "${TARGET_ARCH}" = "arm" ]; then
98 install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
99 fi
100#
101# Install device dependent scripts
102#
103 install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh
104 install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs
105#
106# Create runlevel links
107#
108 update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
109 update-rc.d -r ${D} sendsigs start 20 0 6 .
110 update-rc.d -r ${D} urandom start 30 S 0 6 .
111 update-rc.d -r ${D} umountnfs.sh start 31 0 6 .
112 update-rc.d -r ${D} umountfs start 40 0 6 .
113 update-rc.d -r ${D} reboot start 90 6 .
114 update-rc.d -r ${D} halt start 90 0 .
115 update-rc.d -r ${D} save-rtc.sh start 25 0 6 .
116 update-rc.d -r ${D} banner.sh start 02 S .
117 update-rc.d -r ${D} checkroot.sh start 10 S .
118 update-rc.d -r ${D} mountall.sh start 35 S .
119 update-rc.d -r ${D} hostname.sh start 39 S .
120 update-rc.d -r ${D} mountnfs.sh start 45 S .
121 update-rc.d -r ${D} bootmisc.sh start 55 S .
122 update-rc.d -r ${D} sysfs.sh start 02 S .
123 update-rc.d -r ${D} populate-volatile.sh start 37 S .
124 update-rc.d -r ${D} read-only-rootfs-hook.sh start 29 S .
125 update-rc.d -r ${D} devpts.sh start 38 S .
126 if [ "${TARGET_ARCH}" = "arm" ]; then
127 update-rc.d -r ${D} alignment.sh start 06 S .
128 fi
129
130}
diff --git a/meta/recipes-core/jpeg/jpeg-8d/debian-libjpeg7_7-1.diff b/meta/recipes-core/jpeg/jpeg-8d/debian-libjpeg7_7-1.diff
new file mode 100755
index 0000000000..3b8fa6980a
--- /dev/null
+++ b/meta/recipes-core/jpeg/jpeg-8d/debian-libjpeg7_7-1.diff
@@ -0,0 +1,1070 @@
1This is a well-known debian patch used by many Linux distribution, but not
2accepted by upstream yet.
3Upstream-Status: Pending
4
5--- libjpeg7-7.orig/config.sub
6+++ libjpeg7-7/config.sub
7@@ -1,4 +1,10 @@
8 #! /bin/sh
9+# autotools-dev hack (<ballombe@debian.org>, Wed, 14 Nov 2001 10:13:10 +0100)
10+if [ -x /usr/share/misc/config.sub ]; then
11+ /usr/share/misc/config.sub $*
12+ exit $?
13+fi
14+
15 # Configuration validation subroutine script.
16 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
17 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
18--- libjpeg7-7.orig/config.guess
19+++ libjpeg7-7/config.guess
20@@ -1,4 +1,10 @@
21 #! /bin/sh
22+# autotools-dev hack (<ballombe@debian.org>, Wed, 14 Nov 2001 10:13:10 +0100)
23+if [ -x /usr/share/misc/config.guess ]; then
24+ /usr/share/misc/config.guess $*
25+ exit $?
26+fi
27+
28 # Attempt to guess a canonical system name.
29 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
30 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
31--- libjpeg7-7.orig/debian/libjpeg7-dev.files
32+++ libjpeg7-7/debian/libjpeg7-dev.files
33@@ -0,0 +1,4 @@
34+usr/include
35+usr/lib/libjpeg.a
36+usr/lib/libjpeg.la
37+usr/lib/libjpeg.so
38--- libjpeg7-7.orig/debian/libjpeg-progs.README.Debian
39+++ libjpeg7-7/debian/libjpeg-progs.README.Debian
40@@ -0,0 +1,13 @@
41+libjpeg-progs for Debian
42+========================
43+
44+This package contains programs for manipulating JPEG files:
45+ cjpeg/djpeg: convert to/from the JPEG file format
46+ rdjpgcom/wrjpgcom: read/write comments in JPEG files
47+ jpegtran: lossless transformations of JPEG files
48+ jpegexiforient/exifautotran: manipulate EXIF orientation tag
49+
50+Thanks for using Debian!
51+
52+--
53+Bill Allombert <ballombe@debian.org> Sun, 05 Jul 2009 15:18:59 +0200
54--- libjpeg7-7.orig/debian/shlibs.local
55+++ libjpeg7-7/debian/shlibs.local
56@@ -0,0 +1 @@
57+libjpeg 7 libjpeg7
58--- libjpeg7-7.orig/debian/rules
59+++ libjpeg7-7/debian/rules
60@@ -0,0 +1,71 @@
61+#!/usr/bin/make -f
62+# Made with the aid of debmake, by Christoph Lameter,
63+# based on the sample debian/rules file for GNU hello by Ian Jackson.
64+
65+package=libjpeg
66+
67+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
68+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
69+
70+export CFLAGS=-D_REENTRANT -g -Wall
71+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
72+CFLAGS += -O0
73+else
74+CFLAGS += -O2
75+endif
76+
77+#export DH_VERBOSE=1
78+
79+build: build-stamp
80+build-stamp:
81+ dh_testdir
82+ ./configure --prefix=/usr --mandir=/usr/share/man \
83+ --enable-static --enable-shared \
84+ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
85+ $(MAKE)
86+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
87+ $(MAKE) check
88+endif
89+ $(MAKE) -C debian/extra
90+
91+ touch build-stamp
92+
93+clean:
94+ dh_testdir
95+ dh_testroot
96+ -rm -f build-stamp
97+ if [ -f Makefile ]; then $(MAKE) distclean; fi
98+ $(MAKE) clean -C debian/extra
99+ dh_clean
100+
101+binary-indep:
102+
103+binary-arch: build
104+ dh_testdir
105+ dh_testroot
106+ dh_clean -k
107+ dh_installdirs
108+ $(MAKE) install DESTDIR=`pwd`/debian/tmp
109+ $(MAKE) install -C debian/extra prefix=/usr DESTDIR=`pwd`/debian/tmp
110+ # fix jconfig.h
111+ rm debian/tmp/usr/include/jconfig.h
112+ sed -e "s/#\(undef\|define\) HAVE_\(LOCALE\|\(STD\(DEF\|LIB\)\)\)_H 1//g" \
113+ jconfig.h > debian/tmp/usr/include/jconfig.h
114+ # separate out lib package
115+ dh_movefiles
116+ # Finish it off with debhelper
117+ dh_installdocs README
118+ dh_installexamples
119+ dh_installchangelogs change.log
120+ dh_strip --dbg-package=libjpeg7-dbg
121+ dh_compress
122+ dh_fixperms
123+ dh_installdeb
124+ dh_shlibdeps -l`pwd`/debian/libjpeg7/usr/lib
125+ dh_gencontrol
126+ dh_md5sums
127+ dh_builddeb
128+
129+binary: binary-indep binary-arch
130+
131+.PHONY: clean binary-indep binary-arch binary build
132--- libjpeg7-7.orig/debian/libjpeg7-dev.README.Debian
133+++ libjpeg7-7/debian/libjpeg7-dev.README.Debian
134@@ -0,0 +1,18 @@
135+IJG JPEG for Debian
136+===================
137+
138+The following patch has been applied to the headers files:
139+
140+--- jconfig.h: Remove unused symbol HAVE_STDDEF_H, HAVE_STDLIB_H and
141+HAVE_LOCALE_H since they are not used by the installed headers files and cause
142+problem with autoconf.
143+
144+This can theoretically cause problems if your software relies on theses symbols
145+being defined by this header. If it ever happens, please define them manually.
146+
147+Note: this is not Debian-specific, others distributions apply similar patches.
148+
149+Thanks for using Debian!
150+
151+---
152+Bill Allombert <ballombe@debian.org> Sun, 05 Jul 2009 15:17:56 +0200
153--- libjpeg7-7.orig/debian/shlibs
154+++ libjpeg7-7/debian/shlibs
155@@ -0,0 +1 @@
156+libjpeg 7 libjpeg7
157--- libjpeg7-7.orig/debian/control
158+++ libjpeg7-7/debian/control
159@@ -0,0 +1,52 @@
160+Source: libjpeg7
161+Maintainer: Bill Allombert <ballombe@debian.org>
162+Section: graphics
163+Priority: optional
164+Build-Depends: debhelper (>= 5), autotools-dev
165+Standards-Version: 3.8.2
166+
167+Package: libjpeg7
168+Architecture: any
169+Section: libs
170+Description: The Independent JPEG Group's JPEG runtime library
171+ The Independent JPEG Group's JPEG library is a library for handling
172+ JPEG files.
173+ .
174+ This package contains the shared library.
175+Depends: ${shlibs:Depends}
176+
177+Package: libjpeg7-dev
178+Architecture: any
179+Section: libdevel
180+Description: Development files for the IJG JPEG library
181+ The Independent JPEG Group's JPEG library is a library for handling
182+ JPEG files.
183+ .
184+ This package contains the static library, headers and documentation.
185+Depends: libjpeg7 (=${binary:Version}), libc-dev
186+Conflicts: libjpeg62-dev
187+Replaces: libjpeg62-dev
188+
189+Package: libjpeg7-dbg
190+Architecture: any
191+Section: debug
192+Priority: extra
193+Description: Development files for the IJG JPEG library
194+ The Independent JPEG Group's JPEG library is a library for handling
195+ JPEG files.
196+ .
197+ This package contains the debugging symbols for libjpeg.
198+Provides: libjpeg-dbg
199+Depends: libjpeg7 (=${binary:Version})
200+Conflicts: libjpeg62-dbg
201+Replaces: libjpeg62-dbg
202+
203+Package: libjpeg-progs
204+Architecture: any
205+Description: Programs for manipulating JPEG files
206+ This package contains programs for manipulating JPEG files:
207+ cjpeg/djpeg: convert to/from the JPEG file format
208+ rdjpgcom/wrjpgcom: read/write comments in JPEG files
209+ jpegtran: lossless transformations of JPEG files
210+ jpegexiforient/exifautotran: manipulate EXIF orientation tag
211+Depends: ${shlibs:Depends}
212--- libjpeg7-7.orig/debian/libjpeg7.files
213+++ libjpeg7-7/debian/libjpeg7.files
214@@ -0,0 +1,2 @@
215+/usr/lib/libjpeg.so.7.0.0
216+/usr/lib/libjpeg.so.7
217--- libjpeg7-7.orig/debian/postinst
218+++ libjpeg7-7/debian/postinst
219@@ -0,0 +1,8 @@
220+#!/bin/sh -e
221+
222+#DEBHELPER#
223+
224+if [ "$1" = "configure" ]; then
225+ ldconfig
226+fi
227+
228--- libjpeg7-7.orig/debian/compat
229+++ libjpeg7-7/debian/compat
230@@ -0,0 +1 @@
231+5
232--- libjpeg7-7.orig/debian/libjpeg7-dev.examples
233+++ libjpeg7-7/debian/libjpeg7-dev.examples
234@@ -0,0 +1 @@
235+example.c
236--- libjpeg7-7.orig/debian/changelog
237+++ libjpeg7-7/debian/changelog
238@@ -0,0 +1,245 @@
239+libjpeg7 (7-1) unstable; urgency=low
240+
241+ * The "Yoan" release.
242+ * New upstream release. closes: #535350
243+ - This release includes configure.ac and Makefile.am. closes: #346126
244+ - All patches merged upstream.
245+ - Remove dpatch support.
246+ * debian/control:
247+ - Remove Build-Dependency on libtool and sharutils.
248+ - Move libjpeg7-dbg to debug section.
249+ - Bump standard version to 3.8.2.
250+ * Skip test-suite if nocheck is set. closes: #451222
251+
252+ -- Bill Allombert <ballombe@debian.org> Sun, 05 Jul 2009 15:29:27 +0200
253+
254+libjpeg6b (6b-14) unstable; urgency=low
255+
256+ * The "Lino" release.
257+ * exifautotran:
258+ - fix typo in manpage. closes: #376371, thanks Reuben Thomas.
259+ - preserve file mode. closes: #383379, thanks Vincent Arkesteijn.
260+ * debian/control, debian/rules, debian/compat:
261+ + switch to debhelper v5
262+ + add libjpeg-dbg debugging package.
263+ * debian/rules: remove - before "make clean" rules.
264+ * Add patch 204_jpegtran_man to improve readability of manpage.
265+ closes: #437453. Thanks Jorgen Grahn.
266+ * jpegexiforient.1: Apply patch from Jorgen Grahn to improve formatting.
267+ closes: #437446.
268+
269+ -- Bill Allombert <ballombe@debian.org> Thu, 16 Aug 2007 22:59:21 +0200
270+
271+libjpeg6b (6b-13) unstable; urgency=low
272+
273+ * The "If at first you don't succeed..." release.
274+ * Change --enable-maxmem to 1024, following Guido advice.
275+ This should fix the slowdowns with large files (for large < 1Gb):
276+ closes: #356556, #365025, Thanks Nicolas.
277+ If you hit performance problems, please set the JPEGMEM variable to
278+ about half your available RAM, see jpegtran(1).
279+ * Update libjpeg-progs README.Debian to reflect the new patch set and
280+ the JPEGMEM feature.
281+ * Bump standard version to 3.7.2.
282+
283+ -- Bill Allombert <ballombe@debian.org> Fri, 5 May 2006 19:14:25 +0200
284+
285+libjpeg6b (6b-12) unstable; urgency=low
286+
287+ * The "vote for me" release
288+ * Bump standard version to 3.6.2.
289+ * Run 'make test' instead of home-made test-suite.
290+ * Switch to debhelper v4.
291+ * libjpeg is now configured with --enable-maxmem=32. This limits the memory
292+ usage to 32Mb and it can be overrided by JPEGMEM. Without this flag
293+ JPEGMEM is ignored and there were no limits.
294+ closes: #346023. Thanks C. Scott Ananian.
295+
296+ -- Bill Allombert <ballombe@debian.org> Thu, 2 Mar 2006 18:52:44 +0100
297+
298+libjpeg6b (6b-11) unstable; urgency=high
299+
300+ * The "Silencio" release
301+ * exifautotran: Apply patch by Uwe Zeisberger to fix bad temporary file
302+ handling. closes: #340079
303+
304+ -- Bill Allombert <ballombe@debian.org> Sun, 20 Nov 2005 20:57:07 +0100
305+
306+libjpeg6b (6b-10) unstable; urgency=low
307+
308+ * The "timeout" release.
309+ * Rebuild with current toolchain.
310+ * Depends on libc-dev instead of libc6-dev. closes: #294696
311+ Thanks Joel Aelwyn for discussing thoroughly the matter.
312+ * Instead of copying /usr/bin/libtool, we replace it by a script that
313+ call libtool (using standard path search). Remarked by Jesus Climent.
314+ * debian/control: remove pre-hamm cruft.
315+ * Add jpegexiforient and jpegautotran by Guido Vollbeding
316+ <http://sylvana.net/jpegcrop/exif_orientation.html> as proposed by Philip
317+ Armstrong. closes: #257061.
318+ * Run the test-suite at build time instead of shipping it in the package:
319+ - /usr/share/doc/libjpeg-progs/tests: removed.
320+ - debian/control: Add Build-Depends on sharutils for uuencode.
321+ - debian/libjpeg-progs.dirs: removed.
322+ - debian/libjpeg-progs.test: removed.
323+
324+ -- Bill Allombert <ballombe@debian.org> Tue, 1 Mar 2005 19:43:26 +0100
325+
326+libjpeg6b (6b-9) unstable; urgency=low
327+
328+ * The "I'm all for aggressive goals" release.
329+ * Rebuild with new libtool. closes: #201943.
330+ * patch 100_crop: Updated from Guido Vollbeding <guido@jpegclub.org>
331+ to include patches 203_jpegtran_errmsg,204_perfect.
332+ * patch 200_crop_man: Include 205_perfect_man.
333+ * patches 203_jpegtran_errmsg, 204_perfect, 205_perfect_man: removed
334+ * Add patch 203_rdppm: fix cjpeg issue with 16-bit PPM files. closes: #208937
335+ * Bump standard version to 3.6.1.
336+ * Update debian/edit-patch.
337+
338+ -- Bill Allombert <ballombe@debian.org> Mon, 8 Sep 2003 16:22:08 +0200
339+
340+libjpeg6b (6b-8) unstable; urgency=low
341+
342+ * The "I *hate* when that happens" release.
343+ * Move libjpeg62-dev to libdevel section.
344+ * See debian/README.sources for detail about the (d)patch system.
345+ * debian/rules: avoid to run configure twice.
346+ * Add patches 204_perfect and 205_perfect_man. They implement the
347+ -perfect jpegtran option as proposed by Mark W. Eichin. closes: #189027
348+ * Bump standard version to 3.5.10.
349+ * Use /usr/bin/libtool instead of ldconfig-generated libtool, and remove
350+ various libtool related kludges, including patch 301_configure.
351+ closes: #195281. Thanks Robert Millan for the suggestion.
352+ * Remove patch 302_makefile. Fix debian/rules instead.
353+
354+ -- Bill Allombert <ballombe@debian.org> Sat, 31 May 2003 16:16:59 +0200
355+
356+libjpeg6b (6b-7) unstable; urgency=low
357+
358+ * Rebuild with new gcc/new glibc/new debhelper.
359+ * Add -g to build options according to new policy.
360+ * Add support for DEB_BUILD_OPTIONS noopt. nostrip is handled by dh_strip.
361+ * Bump standard version to 3.5.9.
362+ * Extend description a bit (If you have a better one please email me!).
363+ * Use dpatch to handle the patches.
364+
365+ -- Bill Allombert <ballombe@debian.org> Sun, 16 Mar 2003 12:19:36 +0100
366+
367+libjpeg6b (6b-6) unstable; urgency=low
368+
369+ * The "Try to break sarge before it even got a name" release
370+ * jpegtran: better error messages when opening files.
371+ closes: #147516 Thanks Mark W. Eichin.
372+ * Add debian/patch dir with my patches.
373+ * Add extern "C" if we are under C++.
374+ closes: #113167 Thanks, Fredrik Jagenheim.
375+ * Remove HAVE_STD{LIB,DEF}_H from jconfig.h since they are not used and
376+ conflict with autoconf. closes: #109516 Thanks <Benedikt.Roth@gmx.net>
377+ * Add README.Debian in /usr/share/libjpeg62-dev
378+
379+ -- Bill Allombert <ballombe@debian.org> Mon, 3 Jun 2002 19:34:08 +0200
380+
381+libjpeg6b (6b-5) unstable; urgency=low
382+
383+ * jpeg-->JPEG in libjpeg-progs description.
384+ * Add lib path to dh_shlibdeps to avoid warning.
385+ * Apply patch from <http://sylvana.net/jpegcrop/croppatch.tar.gz> by
386+ <guido@jpegclub.org> closes: #129412 Thanks, Colin Marquardt.
387+
388+ -- Bill Allombert <ballombe@debian.org> Mon, 20 May 2002 11:55:22 +0200
389+
390+libjpeg6b (6b-4) unstable; urgency=low
391+
392+ * Avoid bashism in debian/rules.
393+ * Update libtool to 1.3.5. (1.4 will break).
394+ closes: #52095 Thanks, <Marcus.Brinkmann@ruhr-uni-bochum.de>
395+ * Patch config.guess to use version in the autotools-dev package.
396+ * Correct Section: field of libjpeg62 and libjpeg62-dev.
397+
398+ -- Bill Allombert <ballombe@debian.org> Tue, 20 Nov 2001 10:23:47 +0100
399+
400+libjpeg6b (6b-3) unstable; urgency=low
401+
402+ * The "Where is ltconfig ?" release.
403+ * Remove jconfig.h in debian/rules clean and do some clean up.
404+ * Install libjpeg.la per Policy 11.2.
405+ * Remove duplicate wizard.doc file in libjpeg62-dev.
406+ * Use dpkg-architecture instead of config.guess.
407+ * Patch config.sub to use version in the autotools-dev package.
408+ closes: #85558, #120039
409+ * Patch rdjpgcom.c to use locales for isprint check on comment chars.
410+ closes: #116589 Thanks, Neal H Walfield <neal@cs.uml.edu>
411+ * Apply patch from <http://sylvana.net/jpegcrop/transupp.c> by
412+ <guido@jpegclub.org> closes: #114415 Thanks, <Jean-Marc.Notin@loria.fr>
413+
414+ -- Bill Allombert <ballombe@debian.org> Tue, 13 Nov 2001 21:41:49 +0000
415+
416+libjpeg6b (6b-2) unstable; urgency=low
417+
418+ * New Maintainer. Mark, If you want back the package, just ask!
419+ * Acknowledge previous NMU:
420+ Jordi: closes: #74087, #24330, #24291
421+ Colin: closes: #80752
422+ Joel: closes: #25324, #27033, #28341
423+ * Write source location as a valid URL in debian/copyright.
424+ closes: #118628 Thanks, Doug Porter <dsp@debian.org>.
425+ * Fix formating of description of libjpeg-progs.
426+ closes: #114378 Thanks, Colin Watson <cjwatson@flatline.org.uk>.
427+ * Install jpegint.h header needed by some apps. closes: #100171
428+ * Remove unused/empty debian/postrm.
429+ closes: #24849 Thanks, Adrian Bridgett <adrian.bridgett@zetnet.co.uk>.
430+ * Install wizard.doc file. closes: #64807 Thanks <amc@arwen.cs.berkeley.edu>.
431+ * Fix libjpeg-progs test.sh.
432+ * Fix lintian bugs: typo in copyright, emacs user info in changelog.
433+ * Fix false lintian bug: unsafe ldconfig in postinst, by reformatting.
434+ * Remove "-g" from CFLAGS per Policy 11.1, hoping m68k is fixed now.
435+ * Remove libtool and Makefile in debian/rules clean.
436+ * Fix the test system. As a side effect,
437+ closes: #109195 Thanks Daniel Schepler <schepler@math.berkeley.edu>
438+ * Standards-Version is now 3.5.6.
439+
440+ -- Bill Allombert <ballombe@debian.org> Fri, 9 Nov 2001 22:40:16 +0100
441+
442+libjpeg6b (6b-1.3) frozen unstable; urgency=low
443+
444+ * Non-Maintainer Upload.
445+ * Added Build-Depends.
446+ * Gil Bahat <coutal@netvision.net.il> did the rest of the changes.
447+ * Close bug regarding non-standard jpegs not being processed
448+ (closes: #74087).
449+ * The output gifs are uncompressed, so have no UNISYS patent issues.
450+ (closes: #24330, #24291).
451+ * Standards-Version is now 3.0.0.
452+
453+ -- Jordi Mallach <jordi@debian.org> Sat, 24 Feb 2001 22:17:38 +0100
454+
455+libjpeg6b (6b-1.2) frozen unstable; urgency=low (HIGH for m68k)
456+
457+ * Non-maintainer release.
458+ * Recompile for m68k since existing djpeg binary claims all jpegs I have
459+ are invalid (yet hamm djpeg has no problem with them).
460+ Specifically, added "-O2 -g -Wall" to CFLAGS -- possible gcc bug?
461+
462+ -- Chris Lawrence <lawrencc@debian.org> Tue, 10 Nov 1998 20:57:38 -0600
463+
464+libjpeg6b (6b-1.1) frozen unstable; urgency=high
465+
466+ * Non-maintainer release.
467+ * Use upstream library soname (62).
468+ * Removed libjpeg-gif package, as the source notes
469+ that the GIF reading has been removed, and the GIFs written
470+ do not infringe on the LZW patent.
471+
472+ -- Joel Klecker <espy@debian.org> Thu, 22 Oct 1998 05:49:48 -0700
473+
474+libjpeg6b (6b-1) unstable; urgency=low
475+
476+ * New binary packages for 6b
477+ * New upstream release
478+
479+ -- Mark Mickan <mmickan@debian.org> Tue, 7 Jul 1998 22:27:10 +0930
480+
481+Local variables:
482+mode: debian-changelog
483+End:
484--- libjpeg7-7.orig/debian/libjpeg-progs.files
485+++ libjpeg7-7/debian/libjpeg-progs.files
486@@ -0,0 +1,2 @@
487+usr/bin
488+usr/share/man/man1
489--- libjpeg7-7.orig/debian/libjpeg7-dev.docs
490+++ libjpeg7-7/debian/libjpeg7-dev.docs
491@@ -0,0 +1,3 @@
492+libjpeg.txt
493+structure.txt
494+coderules.txt
495--- libjpeg7-7.orig/debian/libjpeg-progs.docs
496+++ libjpeg7-7/debian/libjpeg-progs.docs
497@@ -0,0 +1,2 @@
498+usage.txt
499+wizard.txt
500--- libjpeg7-7.orig/debian/copyright
501+++ libjpeg7-7/debian/copyright
502@@ -0,0 +1,96 @@
503+This is Debian's prepackaged version of the `jpeg library' by the Independent
504+JPEG Group.
505+
506+This package was created by Mark Mickan <mmickan@debian.org> from sources
507+which can be found at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
508+
509+It is partly based on the libjpeg6a package originally put together by
510+Andy Guy <awpguy@acs.ucalgary.ca> and later maintained by Mark Mickan.
511+
512+Current Debian maintainer is Bill Allombert <ballombe@debian.org>.
513+
514+LEGAL ISSUES [ from README supplied with source - MM ]
515+============
516+
517+In plain English:
518+
519+1. We don't promise that this software works. (But if you find any bugs,
520+ please let us know!)
521+2. You can use this software for whatever you want. You don't have to pay us.
522+3. You may not pretend that you wrote this software. If you use it in a
523+ program, you must acknowledge somewhere in your documentation that
524+ you've used the IJG code.
525+
526+In legalese:
527+
528+The authors make NO WARRANTY or representation, either express or implied,
529+with respect to this software, its quality, accuracy, merchantability, or
530+fitness for a particular purpose. This software is provided "AS IS", and you,
531+its user, assume the entire risk as to its quality and accuracy.
532+
533+This software is copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding.
534+All Rights Reserved except as specified below.
535+
536+Permission is hereby granted to use, copy, modify, and distribute this
537+software (or portions thereof) for any purpose, without fee, subject to these
538+conditions:
539+(1) If any part of the source code for this software is distributed, then this
540+README file must be included, with this copyright and no-warranty notice
541+unaltered; and any additions, deletions, or changes to the original files
542+must be clearly indicated in accompanying documentation.
543+(2) If only executable code is distributed, then the accompanying
544+documentation must state that "this software is based in part on the work of
545+the Independent JPEG Group".
546+(3) Permission for use of this software is granted only if the user accepts
547+full responsibility for any undesirable consequences; the authors accept
548+NO LIABILITY for damages of any kind.
549+
550+These conditions apply to any software derived from or based on the IJG code,
551+not just to the unmodified library. If you use our work, you ought to
552+acknowledge us.
553+
554+Permission is NOT granted for the use of any IJG author's name or company name
555+in advertising or publicity relating to this software or products derived from
556+it. This software may be referred to only as "the Independent JPEG Group's
557+software".
558+
559+We specifically permit and encourage the use of this software as the basis of
560+commercial products, provided that all warranty or liability claims are
561+assumed by the product vendor.
562+
563+
564+ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
565+sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
566+ansi2knr.c is NOT covered by the above copyright and conditions, but instead
567+by the usual distribution terms of the Free Software Foundation; principally,
568+that you must include source code if you redistribute it. (See the file
569+ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
570+of any program generated from the IJG code, this does not limit you more than
571+the foregoing paragraphs do.
572+
573+The Unix configuration script "configure" was produced with GNU Autoconf.
574+It is copyright by the Free Software Foundation but is freely distributable.
575+The same holds for its supporting scripts (config.guess, config.sub,
576+ltconfig, ltmain.sh). Another support script, install-sh, is copyright
577+by M.I.T. but is also freely distributable.
578+
579+It appears that the arithmetic coding option of the JPEG spec is covered by
580+patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
581+legally be used without obtaining one or more licenses. For this reason,
582+support for arithmetic coding has been removed from the free JPEG software.
583+(Since arithmetic coding provides only a marginal gain over the unpatented
584+Huffman mode, it is unlikely that very many implementations will support it.)
585+So far as we are aware, there are no patent restrictions on the remaining
586+code.
587+
588+The IJG distribution formerly included code to read and write GIF files.
589+To avoid entanglement with the Unisys LZW patent, GIF reading support has
590+been removed altogether, and the GIF writer has been simplified to produce
591+"uncompressed GIFs". This technique does not use the LZW algorithm; the
592+resulting GIF files are larger than usual, but are readable by all standard
593+GIF decoders.
594+
595+We are required to state that
596+ "The Graphics Interchange Format(c) is the Copyright property of
597+ CompuServe Incorporated. GIF(sm) is a Service Mark property of
598+ CompuServe Incorporated."
599--- libjpeg7-7.orig/debian/extra/jpegexiforient.c
600+++ libjpeg7-7/debian/extra/jpegexiforient.c
601@@ -0,0 +1,299 @@
602+/*
603+ * jpegexiforient.c
604+ *
605+ * This is a utility program to get and set the Exif Orientation Tag.
606+ * It can be used together with jpegtran in scripts for automatic
607+ * orientation correction of digital camera pictures.
608+ *
609+ * The Exif orientation value gives the orientation of the camera
610+ * relative to the scene when the image was captured. The relation
611+ * of the '0th row' and '0th column' to visual position is shown as
612+ * below.
613+ *
614+ * Value | 0th Row | 0th Column
615+ * ------+-------------+-----------
616+ * 1 | top | left side
617+ * 2 | top | rigth side
618+ * 3 | bottom | rigth side
619+ * 4 | bottom | left side
620+ * 5 | left side | top
621+ * 6 | right side | top
622+ * 7 | right side | bottom
623+ * 8 | left side | bottom
624+ *
625+ * For convenience, here is what the letter F would look like if it were
626+ * tagged correctly and displayed by a program that ignores the orientation
627+ * tag:
628+ *
629+ * 1 2 3 4 5 6 7 8
630+ *
631+ * 888888 888888 88 88 8888888888 88 88 8888888888
632+ * 88 88 88 88 88 88 88 88 88 88 88 88
633+ * 8888 8888 8888 8888 88 8888888888 8888888888 88
634+ * 88 88 88 88
635+ * 88 88 888888 888888
636+ *
637+ */
638+
639+#include <stdio.h>
640+#include <stdlib.h>
641+
642+static FILE * myfile; /* My JPEG file */
643+
644+static unsigned char exif_data[65536L];
645+
646+/* Return next input byte, or EOF if no more */
647+#define NEXTBYTE() getc(myfile)
648+
649+/* Error exit handler */
650+#define ERREXIT(msg) (exit(0))
651+
652+/* Read one byte, testing for EOF */
653+static int
654+read_1_byte (void)
655+{
656+ int c;
657+
658+ c = NEXTBYTE();
659+ if (c == EOF)
660+ ERREXIT("Premature EOF in JPEG file");
661+ return c;
662+}
663+
664+/* Read 2 bytes, convert to unsigned int */
665+/* All 2-byte quantities in JPEG markers are MSB first */
666+static unsigned int
667+read_2_bytes (void)
668+{
669+ int c1, c2;
670+
671+ c1 = NEXTBYTE();
672+ if (c1 == EOF)
673+ ERREXIT("Premature EOF in JPEG file");
674+ c2 = NEXTBYTE();
675+ if (c2 == EOF)
676+ ERREXIT("Premature EOF in JPEG file");
677+ return (((unsigned int) c1) << 8) + ((unsigned int) c2);
678+}
679+
680+static const char * progname; /* program name for error messages */
681+
682+static void
683+usage (FILE *out)
684+/* complain about bad command line */
685+{
686+ fprintf(out, "jpegexiforient reads or writes the Exif Orientation Tag ");
687+ fprintf(out, "in a JPEG Exif file.\n");
688+
689+ fprintf(out, "Usage: %s [switches] jpegfile\n", progname);
690+
691+ fprintf(out, "Switches:\n");
692+ fprintf(out, " --help display this help and exit\n");
693+ fprintf(out, " --version output version information and exit\n");
694+ fprintf(out, " -n Do not output the trailing newline\n");
695+ fprintf(out, " -1 .. -8 Set orientation value 1 .. 8\n");
696+}
697+
698+/*
699+ * The main program.
700+ */
701+
702+int
703+main (int argc, char **argv)
704+{
705+ int n_flag, set_flag;
706+ unsigned int length, i;
707+ int is_motorola; /* Flag for byte order */
708+ unsigned int offset, number_of_tags, tagnum;
709+
710+ progname = argv[0];
711+ if (progname == NULL || progname[0] == 0)
712+ progname = "jpegexiforient"; /* in case C library doesn't provide it */
713+
714+ if (argc < 2) { usage(stderr); return 1; }
715+
716+ n_flag = 0; set_flag = 0;
717+
718+ i = 1;
719+ while (argv[i][0] == '-') {
720+ switch (argv[i][1]) {
721+ case '-':
722+ switch (argv[i][2]) {
723+ case 'h': usage(stdout); return 0;
724+ case 'v': fprintf(stdout,"jpegexiforient\n"); return 0;
725+ }
726+ case 'n':
727+ n_flag = 1;
728+ break;
729+ case '1':
730+ case '2':
731+ case '3':
732+ case '4':
733+ case '5':
734+ case '6':
735+ case '7':
736+ case '8':
737+ set_flag = argv[i][1] - '0';
738+ break;
739+ default:
740+ usage(stderr); return 1;
741+ }
742+ if (++i >= argc) { usage(stderr); return 1; }
743+ }
744+
745+ if (set_flag) {
746+ if ((myfile = fopen(argv[i], "rb+")) == NULL) {
747+ fprintf(stderr, "%s: can't open %s\n", progname, argv[i]);
748+ return 0;
749+ }
750+ } else {
751+ if ((myfile = fopen(argv[i], "rb")) == NULL) {
752+ fprintf(stderr, "%s: can't open %s\n", progname, argv[i]);
753+ return 0;
754+ }
755+ }
756+
757+ /* Read File head, check for JPEG SOI + Exif APP1 */
758+ for (i = 0; i < 4; i++)
759+ exif_data[i] = (unsigned char) read_1_byte();
760+ if (exif_data[0] != 0xFF ||
761+ exif_data[1] != 0xD8 ||
762+ exif_data[2] != 0xFF ||
763+ exif_data[3] != 0xE1)
764+ return 0;
765+
766+ /* Get the marker parameter length count */
767+ length = read_2_bytes();
768+ /* Length includes itself, so must be at least 2 */
769+ /* Following Exif data length must be at least 6 */
770+ if (length < 8)
771+ return 0;
772+ length -= 8;
773+ /* Read Exif head, check for "Exif" */
774+ for (i = 0; i < 6; i++)
775+ exif_data[i] = (unsigned char) read_1_byte();
776+ if (exif_data[0] != 0x45 ||
777+ exif_data[1] != 0x78 ||
778+ exif_data[2] != 0x69 ||
779+ exif_data[3] != 0x66 ||
780+ exif_data[4] != 0 ||
781+ exif_data[5] != 0)
782+ return 0;
783+ /* Read Exif body */
784+ for (i = 0; i < length; i++)
785+ exif_data[i] = (unsigned char) read_1_byte();
786+
787+ if (length < 12) return 0; /* Length of an IFD entry */
788+
789+ /* Discover byte order */
790+ if (exif_data[0] == 0x49 && exif_data[1] == 0x49)
791+ is_motorola = 0;
792+ else if (exif_data[0] == 0x4D && exif_data[1] == 0x4D)
793+ is_motorola = 1;
794+ else
795+ return 0;
796+
797+ /* Check Tag Mark */
798+ if (is_motorola) {
799+ if (exif_data[2] != 0) return 0;
800+ if (exif_data[3] != 0x2A) return 0;
801+ } else {
802+ if (exif_data[3] != 0) return 0;
803+ if (exif_data[2] != 0x2A) return 0;
804+ }
805+
806+ /* Get first IFD offset (offset to IFD0) */
807+ if (is_motorola) {
808+ if (exif_data[4] != 0) return 0;
809+ if (exif_data[5] != 0) return 0;
810+ offset = exif_data[6];
811+ offset <<= 8;
812+ offset += exif_data[7];
813+ } else {
814+ if (exif_data[7] != 0) return 0;
815+ if (exif_data[6] != 0) return 0;
816+ offset = exif_data[5];
817+ offset <<= 8;
818+ offset += exif_data[4];
819+ }
820+ if (offset > length - 2) return 0; /* check end of data segment */
821+
822+ /* Get the number of directory entries contained in this IFD */
823+ if (is_motorola) {
824+ number_of_tags = exif_data[offset];
825+ number_of_tags <<= 8;
826+ number_of_tags += exif_data[offset+1];
827+ } else {
828+ number_of_tags = exif_data[offset+1];
829+ number_of_tags <<= 8;
830+ number_of_tags += exif_data[offset];
831+ }
832+ if (number_of_tags == 0) return 0;
833+ offset += 2;
834+
835+ /* Search for Orientation Tag in IFD0 */
836+ for (;;) {
837+ if (offset > length - 12) return 0; /* check end of data segment */
838+ /* Get Tag number */
839+ if (is_motorola) {
840+ tagnum = exif_data[offset];
841+ tagnum <<= 8;
842+ tagnum += exif_data[offset+1];
843+ } else {
844+ tagnum = exif_data[offset+1];
845+ tagnum <<= 8;
846+ tagnum += exif_data[offset];
847+ }
848+ if (tagnum == 0x0112) break; /* found Orientation Tag */
849+ if (--number_of_tags == 0) return 0;
850+ offset += 12;
851+ }
852+
853+ if (set_flag) {
854+ /* Set the Orientation value */
855+ if (is_motorola) {
856+ exif_data[offset+2] = 0; /* Format = unsigned short (2 octets) */
857+ exif_data[offset+3] = 3;
858+ exif_data[offset+4] = 0; /* Number Of Components = 1 */
859+ exif_data[offset+5] = 0;
860+ exif_data[offset+6] = 0;
861+ exif_data[offset+7] = 1;
862+ exif_data[offset+8] = 0;
863+ exif_data[offset+9] = (unsigned char)set_flag;
864+ exif_data[offset+10] = 0;
865+ exif_data[offset+11] = 0;
866+ } else {
867+ exif_data[offset+2] = 3; /* Format = unsigned short (2 octets) */
868+ exif_data[offset+3] = 0;
869+ exif_data[offset+4] = 1; /* Number Of Components = 1 */
870+ exif_data[offset+5] = 0;
871+ exif_data[offset+6] = 0;
872+ exif_data[offset+7] = 0;
873+ exif_data[offset+8] = (unsigned char)set_flag;
874+ exif_data[offset+9] = 0;
875+ exif_data[offset+10] = 0;
876+ exif_data[offset+11] = 0;
877+ }
878+ fseek(myfile, (4 + 2 + 6 + 2) + offset, SEEK_SET);
879+ fwrite(exif_data + 2 + offset, 1, 10, myfile);
880+ } else {
881+ /* Get the Orientation value */
882+ if (is_motorola) {
883+ if (exif_data[offset+8] != 0) return 0;
884+ set_flag = exif_data[offset+9];
885+ } else {
886+ if (exif_data[offset+9] != 0) return 0;
887+ set_flag = exif_data[offset+8];
888+ }
889+ if (set_flag > 8) return 0;
890+ }
891+
892+ /* Write out Orientation value */
893+ if (n_flag)
894+ printf("%c", '0' + set_flag);
895+ else
896+ printf("%c\n", '0' + set_flag);
897+
898+ /* All done. */
899+ return 0;
900+}
901--- libjpeg7-7.orig/debian/extra/exifautotran.1
902+++ libjpeg7-7/debian/extra/exifautotran.1
903@@ -0,0 +1,13 @@
904+.TH EXIFAUTOTRAN "1" "February 2005" "exifautotran" "User Commands"
905+.SH NAME
906+exifautotran \- Transforms Exif files so that Orientation becomes 1
907+.SH DESCRIPTION
908+exifautotran [list of files]
909+.PP
910+Take a list of files as input and transform them in place so that the
911+Orientation becomes 1.
912+.SH "AUTHOR"
913+ Guido Vollbeding <guido@jpegclub.org>
914+.SH "SEE ALSO"
915+.BR jpegtran(1)
916+.BR jpegexiforient(1)
917--- libjpeg7-7.orig/debian/extra/jpegexiforient.1
918+++ libjpeg7-7/debian/extra/jpegexiforient.1
919@@ -0,0 +1,73 @@
920+.TH JPEGEXIFORIENT "1" "February 2005" "jpegexiforient" "User Commands"
921+.SH NAME
922+jpegexiforient \- reads or writes the Exif Orientation Tag
923+.SH SYNOPSIS
924+.B jpegexiforient
925+[\fIswitches\fR] \fIjpegfile\fR
926+.SH DESCRIPTION
927+.
928+This is a utility program to get and set the Exif Orientation Tag.
929+It can be used together with jpegtran in scripts for automatic
930+orientation correction of digital camera pictures.
931+.PP
932+The Exif orientation value gives the orientation of the camera
933+relative to the scene when the image was captured. The relation
934+of the '0th row' and '0th column' to visual position is shown as
935+below.
936+.IP
937+.nf
938+.ft CR
939+Value | 0th Row | 0th Column
940+------+-------------+-----------
941+ 1 | top | left side
942+ 2 | top | rigth side
943+ 3 | bottom | rigth side
944+ 4 | bottom | left side
945+ 5 | left side | top
946+ 6 | right side | top
947+ 7 | right side | bottom
948+ 8 | left side | bottom
949+.fi
950+.PP
951+For convenience, here is what the letter F would look like if it were
952+tagged correctly and displayed by a program that ignores the orientation
953+tag:
954+.IP
955+.nf
956+.ft CB
957+ 1 2 3 4
958+
959+888888 888888 88 88
960+88 88 88 88
961+8888 8888 8888 8888
962+88 88 88 88
963+88 88 888888 888888
964+
965+ 5 6 7 8
966+
967+8888888888 88 88 8888888888
968+88 88 88 88 88 88 88 88
969+88 8888888888 8888888888 88
970+.fi
971+.PP
972+jpegexiforient output the Exif Orientation Tag in a JPEG Exif file.
973+With the options -1 .. -8, it can also be used to set the tag.
974+.
975+.SS "OPTIONS"
976+.TP
977+\fB\-\-help\fR
978+display this help and exit
979+.TP
980+\fB\-\-version\fR
981+output version information and exit
982+.TP
983+\fB\-n\fR
984+Do not output the trailing newline
985+.TP
986+\fB\-1\fR .. \fB\-8\fR
987+Set orientation value 1 .. 8
988+.SH "AUTHOR"
989+ Guido Vollbeding <guido@jpegclub.org>
990+.SH "SEE ALSO"
991+.BR jpegtran(1)
992+.BR exifautotran(1)
993--- libjpeg7-7.orig/debian/extra/exifautotran
994+++ libjpeg7-7/debian/extra/exifautotran
995@@ -0,0 +1,50 @@
996+#!/bin/sh
997+# exifautotran [list of files]
998+#
999+# Transforms Exif files so that Orientation becomes 1
1000+#
1001+
1002+trap "if test -n \"\$tempfile\"; then rm -f \"\$tempfile\"; fi" INT QUIT TERM
1003+
1004+for i
1005+do
1006+ case $i in
1007+ -v|--version) echo "exifautotran"; exit 0;;
1008+ -h|--help)
1009+ cat <<EOF
1010+exifautotran [list of files]
1011+
1012+Transforms Exif files so that Orientation becomes 1
1013+EOF
1014+ exit 0;;
1015+ esac
1016+
1017+ case `jpegexiforient -n "$i"` in
1018+ 1) transform="";;
1019+ 2) transform="-flip horizontal";;
1020+ 3) transform="-rotate 180";;
1021+ 4) transform="-flip vertical";;
1022+ 5) transform="-transpose";;
1023+ 6) transform="-rotate 90";;
1024+ 7) transform="-transverse";;
1025+ 8) transform="-rotate 270";;
1026+ *) transform="";;
1027+ esac
1028+ if test -n "$transform"; then
1029+ tempfile=`mktemp`;
1030+ if test "$?" -ne "0"; then
1031+ echo "Failed to create temporary file" >&2
1032+ exit 1;
1033+ fi
1034+ echo Executing: jpegtran -copy all $transform $i >&2
1035+ jpegtran -copy all $transform "$i" > $tempfile
1036+ if test $? -ne 0; then
1037+ echo Error while transforming $i - skipped. >&2
1038+ rm "$tempfile"
1039+ else
1040+ cp "$tempfile" "$i"
1041+ rm "$tempfile"
1042+ jpegexiforient -1 "$i" > /dev/null
1043+ fi
1044+ fi
1045+done
1046--- libjpeg7-7.orig/debian/extra/Makefile
1047+++ libjpeg7-7/debian/extra/Makefile
1048@@ -0,0 +1,22 @@
1049+CFLAGS = -O2 -Wall -g
1050+CC = cc
1051+INSTALL = install -m755 -o root -g root
1052+INSTALLDIR = install -m755 -o root -g root -d
1053+DESTDIR =
1054+prefix = /usr/local
1055+bindir = $(prefix)/bin
1056+mandir = $(prefix)/share/man/man1
1057+
1058+all: jpegexiforient
1059+
1060+jpegexiforient: jpegexiforient.c
1061+ $(CC) $(CFLAGS) -o jpegexiforient jpegexiforient.c
1062+clean:
1063+ -rm -f jpegexiforient
1064+install:
1065+ $(INSTALLDIR) $(DESTDIR)$(bindir)
1066+ $(INSTALLDIR) $(DESTDIR)$(mandir)
1067+ $(INSTALL) jpegexiforient $(DESTDIR)$(bindir)
1068+ $(INSTALL) jpegexiforient.1 $(DESTDIR)$(mandir)
1069+ $(INSTALL) exifautotran $(DESTDIR)$(bindir)
1070+ $(INSTALL) exifautotran.1 $(DESTDIR)$(mandir)
diff --git a/meta/recipes-core/jpeg/jpeg-8d/fix_for_automake_1.12.1.patch b/meta/recipes-core/jpeg/jpeg-8d/fix_for_automake_1.12.1.patch
new file mode 100644
index 0000000000..3a970ea477
--- /dev/null
+++ b/meta/recipes-core/jpeg/jpeg-8d/fix_for_automake_1.12.1.patch
@@ -0,0 +1,44 @@
1Upstream-Status: Pending
2
3The support for automatic de-ANSI-fication has been deprecated in
4automake 1.11.2, and will be removed altogether in automake 1.12
5
6This avoids this error:
7| configure.ac:24: automatic de-ANSI-fication support is deprecated
8| autoreconf: automake failed with exit status: 1
9| ERROR: autoreconf execution failed.
10NOTE: package jpeg-native-8c-r2: task do_configure: Failed
11
12Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
132011/12/28
14
15
16Index: jpeg-8d/configure.ac
17===================================================================
18--- jpeg-8d.orig/configure.ac
19+++ jpeg-8d/configure.ac
20@@ -21,7 +21,7 @@ AC_CANONICAL_TARGET
21
22 # Initialize Automake
23 # Don't require all the GNU mandated files
24-AM_INIT_AUTOMAKE([-Wall -Werror -Wno-obsolete ansi2knr no-dist foreign])
25+AM_INIT_AUTOMAKE([-Wall -Werror -Wno-obsolete no-dist foreign])
26
27 # Make --enable-silent-rules the default.
28 # To get verbose build output you may configure
29@@ -29,7 +29,14 @@ AM_INIT_AUTOMAKE([-Wall -Werror -Wno-obs
30 AM_SILENT_RULES([yes])
31
32 # This is required when using the de-ANSI-fication feature.
33-AM_C_PROTOTYPES
34+#AM_C_PROTOTYPES
35+# add following to avoid this error:
36+#| automake: warnings are treated as errors
37+#| /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libjpeg.la': linking libtool libraries using a non-POSIX
38+#| /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
39+#| Makefile.am:65: while processing Libtool library 'libjpeg.la'
40+#| autoreconf: automake failed with exit status: 1
41+AM_PROG_AR
42
43 # Add configure option --enable-maintainer-mode which enables
44 # dependency checking and generation useful to package maintainers.
diff --git a/meta/recipes-core/jpeg/jpeg_8d.bb b/meta/recipes-core/jpeg/jpeg_8d.bb
new file mode 100644
index 0000000000..eba5bf46d2
--- /dev/null
+++ b/meta/recipes-core/jpeg/jpeg_8d.bb
@@ -0,0 +1,56 @@
1SUMMARY = "libjpeg is a library for handling the JPEG (JFIF) image format."
2DESCRIPTION = "libjpeg contains a library for handling the JPEG (JFIF) image format, as well as related programs for accessing the libjpeg functions."
3HOMEPAGE = "http://www.ijg.org/"
4BUGTRACKER = ""
5
6LICENSE ="BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://README;md5=4f46756b064c225fae088903300e5c98"
8
9SECTION = "libs"
10
11DEPENDS = "libtool-cross"
12DEPENDS_class-native = "libtool-native"
13
14PR = "r1"
15
16SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \
17 file://debian-libjpeg7_7-1.diff \
18 file://fix_for_automake_1.12.1.patch"
19
20SRC_URI[md5sum] = "52654eb3b2e60c35731ea8fc87f1bd29"
21SRC_URI[sha256sum] = "00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3"
22
23inherit autotools
24
25EXTRA_OECONF="--enable-static --enable-shared"
26EXTRA_OEMAKE='"LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"'
27
28CFLAGS_append = " -D_REENTRANT"
29
30do_configure_prepend () {
31 rm -f ${S}/ltconfig
32 rm -f ${S}/ltmain.sh
33}
34
35do_install() {
36 install -d ${D}${bindir} ${D}${includedir} \
37 ${D}${mandir}/man1 ${D}${libdir}
38 oe_runmake 'DESTDIR=${D}' install
39}
40
41PACKAGES =+ "jpeg-tools "
42DESCRIPTION_jpeg-tools = "The jpeg-tools package includes the client programs for access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files."
43FILES_jpeg-tools = "${bindir}/*"
44
45BBCLASSEXTEND = "native"
46
47pkg_postinst_${PN}_linuxstdbase () {
48 if [ "$D" = "" ]; then
49 if [ ! -e ${libdir}/libjpeg.so.62 ]; then
50 JPEG=`find ${libdir} -type f -name libjpeg.so.\*.\*.\*`
51 ln -sf `basename $JPEG` ${libdir}/libjpeg.so.62
52 fi
53 else
54 exit 1
55 fi
56}
diff --git a/meta/recipes-core/kbd/kbd-1.15.2/Allow-resizecons-on-x86_64.patch b/meta/recipes-core/kbd/kbd-1.15.2/Allow-resizecons-on-x86_64.patch
new file mode 100644
index 0000000000..1a49846972
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd-1.15.2/Allow-resizecons-on-x86_64.patch
@@ -0,0 +1,28 @@
1Upstream-status: Accepted
2This patch had accepted at kdb-1.5.4
3
4From e069cfa96b41a6714118e15496cdd6b83fc16ad2 Mon Sep 17 00:00:00 2001
5From: Alexey Gladkov <gladkov.alexey@gmail.com>
6Date: Mon, 27 Feb 2012 14:30:50 +0400
7Subject: [PATCH] Allow resizecons on x86_64
8
9Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
10---
11 configure.ac | 1 +
12 1 files changed, 1 insertions(+), 0 deletions(-)
13
14diff --git a/configure.ac b/configure.ac
15index a8115ed..b58f3bd 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -62,6 +62,7 @@ AM_CONDITIONAL(KEYCODES_PROGS, test "$KEYCODES_PROGS" = "yes")
19
20 case $host_cpu in
21 i?86*) RESIZECONS_PROGS=yes ;;
22+ x86_64*) RESIZECONS_PROGS=yes ;;
23 *) RESIZECONS_PROGS=no ;;
24 esac
25 AM_CONDITIONAL(RESIZECONS_PROGS, test "$RESIZECONS_PROGS" = "yes")
26--
271.7.1
28
diff --git a/meta/recipes-core/kbd/kbd_1.15.2.bb b/meta/recipes-core/kbd/kbd_1.15.2.bb
new file mode 100644
index 0000000000..a150ff1b54
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd_1.15.2.bb
@@ -0,0 +1,32 @@
1DESCRIPTION = "This package contains keytable files and keyboard utilities"
2# everything minus console-fonts is GPLv2+
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=587ce626d15bd61699a64a6b8a5afefb"
5
6inherit autotools gettext
7
8BBCLASSEXTEND = "native"
9RREPLACES_${PN} = "console-tools"
10RPROVIDES_${PN} = "console-tools"
11RCONFLICTS_${PN} = "console-tools"
12
13PR = "r4"
14
15SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2 \
16 file://Allow-resizecons-on-x86_64.patch"
17
18SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
19SRC_URI[sha256sum] = "b3602d191eef7a6a8317fc3cd231efa40a89ac235dce57a77cac825a2a21eba6"
20
21PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
22
23FILES_${PN}-consolefonts = "${datadir}/consolefonts"
24FILES_${PN}-consoletrans = "${datadir}/consoletrans"
25FILES_${PN}-keymaps = "${datadir}/keymaps"
26FILES_${PN}-unimaps = "${datadir}/unimaps"
27
28inherit update-alternatives
29
30
31ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
32ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-core/libcgroup/libcgroup_0.38.bb b/meta/recipes-core/libcgroup/libcgroup_0.38.bb
new file mode 100644
index 0000000000..8bd0ead48b
--- /dev/null
+++ b/meta/recipes-core/libcgroup/libcgroup_0.38.bb
@@ -0,0 +1,43 @@
1SUMMARY = "Linux control group abstraction library"
2DESCRIPTION = "libcgroup is a library that abstracts the control group file system \
3in Linux. Control groups allow you to limit, account and isolate resource usage \
4(CPU, memory, disk I/O, etc.) of groups of processes."
5SECTION = "libs"
6LICENSE = "LGPLv2.1"
7LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
8
9PR = "r1"
10
11inherit autotools pkgconfig
12
13DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
14
15SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v.038/${BPN}-${PV}.tar.bz2"
16
17SRC_URI[md5sum] = "f0f7d4060bf36ccc19d75dbf4f1695db"
18SRC_URI[sha256sum] = "5d36d1a48b95f62fe9fcdf74a5a4089512e5e43e6011aa1504fd6f2a0909867f"
19
20EXTRA_OECONF = "${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
21
22# http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg21444.html
23PARALLEL_MAKE = ""
24
25PACKAGES =+ "cgroups-pam-plugin"
26FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
27FILES_${PN}-dbg += "${base_libdir}/security/.debug"
28FILES_${PN}-dev += "${base_libdir}/security/*.la"
29
30do_install_append() {
31 # Moving libcgroup to base_libdir
32 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
33 mkdir -p ${D}/${base_libdir}/
34 mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
35 rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
36 ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
37 fi
38 # pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
39 if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
40 mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ${D}${base_libdir}/security/pam_cgroup.so
41 rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
42 fi
43}
diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc
new file mode 100644
index 0000000000..7fb2644416
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2.inc
@@ -0,0 +1,60 @@
1SUMMARY = "XML C Parser Library and Toolkit"
2DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
3HOMEPAGE = "http://www.xmlsoft.org/"
4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
5SECTION = "libs"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
8 file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
9 file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
10 file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
11
12DEPENDS_class-nativesdk = "nativesdk-python"
13DEPENDS_class-native = "python-native"
14DEPENDS =+ "zlib"
15
16SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
17 file://libxml-64bit.patch \
18 file://ansidecl.patch \
19 file://runtest.patch \
20 file://run-ptest \
21 "
22
23inherit autotools pkgconfig binconfig pythonnative ptest
24
25RDEPENDS_${PN}-ptest_append_libc-glibc += "eglibc-gconv-ebcdic-us eglibc-gconv-ibm1141"
26
27# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
28do_configure_prepend () {
29 sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
30}
31
32EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
33EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
34EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma"
35EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-catalog --with-docbook --with-c14n --without-lzma"
36
37# required for pythong binding
38export HOST_SYS
39export BUILD_SYS
40export STAGING_LIBDIR
41export STAGING_INCDIR
42
43export LDFLAGS += "-ldl"
44
45python populate_packages_prepend () {
46 # autonamer would call this libxml2-2, but we don't want that
47 if d.getVar('DEBIAN_NAMES', True):
48 d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
49}
50
51PACKAGES += "${PN}-utils"
52
53FILES_${PN}-dev += "${libdir}/xml2Conf.sh"
54FILES_${PN}-utils += "${bindir}/*"
55
56do_install_ptest () {
57 cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
58}
59
60BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/libxml/libxml2/ansidecl.patch b/meta/recipes-core/libxml/libxml2/ansidecl.patch
new file mode 100644
index 0000000000..2452d780d5
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/ansidecl.patch
@@ -0,0 +1,25 @@
1Sadly cmake is broken. If it sees this reference and ansidecl is present, it will add a
2dependency upon it, even if HAVE_ANSIDEC_H is never set.
3
4The easiest solution is to remove these lines, otherwise recipes like libzypp can have a
5dependency on the ansidecl.h header via cmake. This can lead to odd results if the
6header is removed (clean binutils) and then the code is recompiled.
7
8RP 2012/7/10
9
10Upstream-Status: Inappropriate [its really a cmake bug]
11
12Index: libxml2-2.8.0/include/libxml/xmlversion.h.in
13===================================================================
14--- libxml2-2.8.0.orig/include/libxml/xmlversion.h.in 2012-07-10 11:51:52.460750573 +0000
15+++ libxml2-2.8.0/include/libxml/xmlversion.h.in 2012-07-10 11:52:41.436749397 +0000
16@@ -401,9 +401,6 @@
17 #endif
18
19 #ifdef __GNUC__
20-#ifdef HAVE_ANSIDECL_H
21-#include <ansidecl.h>
22-#endif
23
24 /**
25 * ATTRIBUTE_UNUSED:
diff --git a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
new file mode 100644
index 0000000000..1147017b61
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Backport [from debian: bugs.debian.org/439843]
2
3---
4 libxml.h | 3 +++
5 1 file changed, 3 insertions(+)
6
7--- libxml2-2.6.29.orig/libxml.h
8+++ libxml2-2.6.29/libxml.h
9@@ -11,10 +11,13 @@
10
11 #ifndef NO_LARGEFILE_SOURCE
12 #ifndef _LARGEFILE_SOURCE
13 #define _LARGEFILE_SOURCE
14 #endif
15+#ifndef _LARGEFILE64_SOURCE
16+#define _LARGEFILE64_SOURCE
17+#endif
18 #ifndef _FILE_OFFSET_BITS
19 #define _FILE_OFFSET_BITS 64
20 #endif
21 #endif
22
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest
new file mode 100644
index 0000000000..473d0b67a7
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -k runtests
diff --git a/meta/recipes-core/libxml/libxml2/runtest.patch b/meta/recipes-core/libxml/libxml2/runtest.patch
new file mode 100644
index 0000000000..397ab20c30
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -0,0 +1,820 @@
1Add 'install-ptest' rule.
2Print a standard result line for each test.
3
4Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
5Upstream-Status: Pending
6
7diff -uNr a/Makefile.am b/Makefile.am
8--- a/Makefile.am 2013-04-17 14:51:42.633386477 +0200
9+++ b/Makefile.am 2013-04-19 14:47:51.544720568 +0200
10@@ -202,10 +202,19 @@
11 #testOOM_DEPENDENCIES = $(DEPS)
12 #testOOM_LDADD= $(LDADDS)
13
14+install-ptest:
15+ @(if [ -d .libs ] ; then cd .libs; fi; \
16+ install $(noinst_PROGRAMS) $(DESTDIR))
17+ cp -r $(srcdir)/test $(DESTDIR)
18+ cp -r $(srcdir)/result $(DESTDIR)
19+ cp -r $(srcdir)/python $(DESTDIR)
20+ cp Makefile $(DESTDIR)
21+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
22+
23 runtests:
24 [ -d test ] || $(LN_S) $(srcdir)/test .
25 [ -d result ] || $(LN_S) $(srcdir)/result .
26- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
27+ ./runtest$(EXEEXT) ; ./testrecurse$(EXEEXT) ; ./testapi$(EXEEXT) ; ./testchar$(EXEEXT) ; ./testdict$(EXEEXT) ; ./runxmlconf$(EXEEXT)
28 @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
29 $(MAKE) tests ; fi)
30
31diff -uNr a/runsuite.c b/runsuite.c
32--- a/runsuite.c 2013-04-12 16:17:11.462823238 +0200
33+++ b/runsuite.c 2013-04-17 14:07:24.352693211 +0200
34@@ -1162,6 +1162,7 @@
35
36 if (logfile != NULL)
37 fclose(logfile);
38+ printf("%s: runsuite\n\n", (ret == 0) ? "PASS" : "FAIL");
39 return(ret);
40 }
41 #else /* !SCHEMAS */
42diff -uNr a/runtest.c b/runtest.c
43--- a/runtest.c 2013-04-16 13:19:15.087997290 +0200
44+++ b/runtest.c 2013-04-17 14:08:29.529949655 +0200
45@@ -4386,6 +4386,7 @@
46 err++;
47 }
48 }
49+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc);
50 return(err);
51 }
52
53@@ -4455,6 +4456,7 @@
54 xmlCleanupParser();
55 xmlMemoryDump();
56
57+ printf("%s: runtest\n\n", (ret == 0) ? "PASS" : "FAIL");
58 return(ret);
59 }
60
61diff -uNr a/runxmlconf.c b/runxmlconf.c
62--- a/runxmlconf.c 2013-04-16 12:53:49.900982990 +0200
63+++ b/runxmlconf.c 2013-04-17 14:09:21.111778104 +0200
64@@ -595,6 +595,7 @@
65
66 if (logfile != NULL)
67 fclose(logfile);
68+ printf("%s: runxmlconf\n", (ret == 0) ? "PASS" : "FAIL");
69 return(ret);
70 }
71
72diff -uNr a/testapi.c b/testapi.c
73--- a/testapi.c 2013-04-12 16:16:57.763417659 +0200
74+++ b/testapi.c 2013-04-17 14:10:28.876924881 +0200
75@@ -1245,49 +1245,91 @@
76 testlibxml2(void)
77 {
78 int test_ret = 0;
79+ int ret = 0;
80
81- test_ret += test_HTMLparser();
82- test_ret += test_HTMLtree();
83- test_ret += test_SAX2();
84- test_ret += test_c14n();
85- test_ret += test_catalog();
86- test_ret += test_chvalid();
87- test_ret += test_debugXML();
88- test_ret += test_dict();
89- test_ret += test_encoding();
90- test_ret += test_entities();
91- test_ret += test_hash();
92- test_ret += test_list();
93- test_ret += test_nanoftp();
94- test_ret += test_nanohttp();
95- test_ret += test_parser();
96- test_ret += test_parserInternals();
97- test_ret += test_pattern();
98- test_ret += test_relaxng();
99- test_ret += test_schemasInternals();
100- test_ret += test_schematron();
101- test_ret += test_tree();
102- test_ret += test_uri();
103- test_ret += test_valid();
104- test_ret += test_xinclude();
105- test_ret += test_xmlIO();
106- test_ret += test_xmlautomata();
107- test_ret += test_xmlerror();
108- test_ret += test_xmlmodule();
109- test_ret += test_xmlreader();
110- test_ret += test_xmlregexp();
111- test_ret += test_xmlsave();
112- test_ret += test_xmlschemas();
113- test_ret += test_xmlschemastypes();
114- test_ret += test_xmlstring();
115- test_ret += test_xmlunicode();
116- test_ret += test_xmlwriter();
117- test_ret += test_xpath();
118- test_ret += test_xpathInternals();
119- test_ret += test_xpointer();
120+ test_ret += (ret = test_HTMLparser());
121+ printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL");
122+ test_ret += (ret = test_HTMLtree());
123+ printf("%s: HTMLtree\n", (ret == 0) ? "PASS" : "FAIL");
124+ test_ret += (ret = test_SAX2());
125+ printf("%s: SAX2\n", (ret == 0) ? "PASS" : "FAIL");
126+ test_ret += (ret = test_c14n());
127+ printf("%s: c14n\n", (ret == 0) ? "PASS" : "FAIL");
128+ test_ret += (ret = test_catalog());
129+ printf("%s: catalog\n", (ret == 0) ? "PASS" : "FAIL");
130+ test_ret += (ret = test_chvalid());
131+ printf("%s: chvalid\n", (ret == 0) ? "PASS" : "FAIL");
132+ test_ret += (ret = test_debugXML());
133+ printf("%s: debugXML\n", (ret == 0) ? "PASS" : "FAIL");
134+ test_ret += (ret = test_dict());
135+ printf("%s: dict\n", (ret == 0) ? "PASS" : "FAIL");
136+ test_ret += (ret = test_encoding());
137+ printf("%s: encoding\n", (ret == 0) ? "PASS" : "FAIL");
138+ test_ret += (ret = test_entities());
139+ printf("%s: entities\n", (ret == 0) ? "PASS" : "FAIL");
140+ test_ret += (ret = test_hash());
141+ printf("%s: hash\n", (ret == 0) ? "PASS" : "FAIL");
142+ test_ret += (ret = test_list());
143+ printf("%s: list\n", (ret == 0) ? "PASS" : "FAIL");
144+ test_ret += (ret = test_nanoftp());
145+ printf("%s: nanoftp\n", (ret == 0) ? "PASS" : "FAIL");
146+ test_ret += (ret = test_nanohttp());
147+ printf("%s: nanohttp\n", (ret == 0) ? "PASS" : "FAIL");
148+ test_ret += (ret = test_parser());
149+ printf("%s: parser\n", (ret == 0) ? "PASS" : "FAIL");
150+ test_ret += (ret = test_parserInternals());
151+ printf("%s: parserInternals\n", (ret == 0) ? "PASS" : "FAIL");
152+ test_ret += (ret = test_pattern());
153+ printf("%s: pattern\n", (ret == 0) ? "PASS" : "FAIL");
154+ test_ret += (ret = test_relaxng());
155+ printf("%s: relaxng\n", (ret == 0) ? "PASS" : "FAIL");
156+ test_ret += (ret = test_schemasInternals());
157+ printf("%s: schemasInternals\n", (ret == 0) ? "PASS" : "FAIL");
158+ test_ret += (ret = test_schematron());
159+ printf("%s: schematron\n", (ret == 0) ? "PASS" : "FAIL");
160+ test_ret += (ret = test_tree());
161+ printf("%s: tree\n", (ret == 0) ? "PASS" : "FAIL");
162+ test_ret += (ret = test_uri());
163+ printf("%s: uri\n", (ret == 0) ? "PASS" : "FAIL");
164+ test_ret += (ret = test_valid());
165+ printf("%s: valid\n", (ret == 0) ? "PASS" : "FAIL");
166+ test_ret += (ret = test_xinclude());
167+ printf("%s: xinclude\n", (ret == 0) ? "PASS" : "FAIL");
168+ test_ret += (ret = test_xmlIO());
169+ printf("%s: xmlIO\n", (ret == 0) ? "PASS" : "FAIL");
170+ test_ret += (ret = test_xmlautomata());
171+ printf("%s: xmlautomata\n", (ret == 0) ? "PASS" : "FAIL");
172+ test_ret += (ret = test_xmlerror());
173+ printf("%s: xmlerror\n", (ret == 0) ? "PASS" : "FAIL");
174+ test_ret += (ret = test_xmlmodule());
175+ printf("%s: xmlmodule\n", (ret == 0) ? "PASS" : "FAIL");
176+ test_ret += (ret = test_xmlreader());
177+ printf("%s: xmlreader\n", (ret == 0) ? "PASS" : "FAIL");
178+ test_ret += (ret = test_xmlregexp());
179+ printf("%s: xmlregexp\n", (ret == 0) ? "PASS" : "FAIL");
180+ test_ret += (ret = test_xmlsave());
181+ printf("%s: xmlsave\n", (ret == 0) ? "PASS" : "FAIL");
182+ test_ret += (ret = test_xmlschemas());
183+ printf("%s: xmlschemas\n", (ret == 0) ? "PASS" : "FAIL");
184+ test_ret += (ret = test_xmlschemastypes());
185+ printf("%s: xmlschemastypes\n", (ret == 0) ? "PASS" : "FAIL");
186+ test_ret += (ret = test_xmlstring());
187+ printf("%s: xmlstring\n", (ret == 0) ? "PASS" : "FAIL");
188+ test_ret += (ret = test_xmlunicode());
189+ printf("%s: xmlunicode\n", (ret == 0) ? "PASS" : "FAIL");
190+ test_ret += (ret = test_xmlwriter());
191+ printf("%s: xmlwriter\n", (ret == 0) ? "PASS" : "FAIL");
192+ test_ret += (ret = test_xpath());
193+ printf("%s: xpath\n", (ret == 0) ? "PASS" : "FAIL");
194+ test_ret += (ret = test_xpathInternals());
195+ printf("%s: xpathInternals\n", (ret == 0) ? "PASS" : "FAIL");
196+ test_ret += (ret = test_xpointer());
197+ printf("%s: xpointer\n", (ret == 0) ? "PASS" : "FAIL");
198
199 printf("Total: %d functions, %d tests, %d errors\n",
200 function_tests, call_tests, test_ret);
201+
202+ printf("%s: testapi\n\n", (test_ret == 0) ? "PASS" : "FAIL");
203 return(test_ret);
204 }
205
206diff -uNr a/testchar.c b/testchar.c
207--- a/testchar.c 2013-04-17 10:50:30.250147418 +0200
208+++ b/testchar.c 2013-04-18 16:11:28.455733800 +0200
209@@ -23,7 +23,7 @@
210 char document1[100] = "<doc>XXXX</doc>";
211 char document2[100] = "<doc foo='XXXX'/>";
212
213-static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
214+static int testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
215 int len, char *data, int forbid1, int forbid2) {
216 int i;
217 xmlDocPtr res;
218@@ -37,33 +37,41 @@
219 res = xmlReadMemory(document, len, "test", NULL, 0);
220
221 if ((i == forbid1) || (i == forbid2)) {
222- if ((lastError == 0) || (res != NULL))
223+ if ((lastError == 0) || (res != NULL)) {
224 fprintf(stderr,
225 "Failed to detect invalid char for Byte 0x%02X: %c\n",
226 i, i);
227+ return(1);
228+ }
229 }
230
231 else if ((i == '<') || (i == '&')) {
232- if ((lastError == 0) || (res != NULL))
233+ if ((lastError == 0) || (res != NULL)) {
234 fprintf(stderr,
235 "Failed to detect illegal char %c for Byte 0x%02X\n", i, i);
236+ return(1);
237+ }
238 }
239 else if (((i < 0x20) || (i >= 0x80)) &&
240 (i != 0x9) && (i != 0xA) && (i != 0xD)) {
241- if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL))
242+ if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL)) {
243 fprintf(stderr,
244 "Failed to detect invalid char for Byte 0x%02X\n", i);
245+ return(1);
246+ }
247 }
248 else if (res == NULL) {
249 fprintf(stderr,
250 "Failed to parse valid char for Byte 0x%02X : %c\n", i, i);
251+ return(1);
252 }
253 if (res != NULL)
254 xmlFreeDoc(res);
255 }
256+ return(0);
257 }
258
259-static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
260+static int testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
261 int len, char *data) {
262 int i, j;
263 xmlDocPtr res;
264@@ -80,10 +88,12 @@
265
266 /* if first bit of first char is set, then second bit must too */
267 if ((i & 0x80) && ((i & 0x40) == 0)) {
268- if ((lastError == 0) || (res != NULL))
269+ if ((lastError == 0) || (res != NULL)) {
270 fprintf(stderr,
271 "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
272 i, j);
273+ return(1);
274+ }
275 }
276
277 /*
278@@ -91,10 +101,12 @@
279 * bits must be 10
280 */
281 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
282- if ((lastError == 0) || (res != NULL))
283+ if ((lastError == 0) || (res != NULL)) {
284 fprintf(stderr,
285 "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
286 i, j);
287+ return(1);
288+ }
289 }
290
291 /*
292@@ -102,10 +114,12 @@
293 * than 0x80, i.e. one of bits 5 to 1 of i must be set
294 */
295 else if ((i & 0x80) && ((i & 0x1E) == 0)) {
296- if ((lastError == 0) || (res != NULL))
297+ if ((lastError == 0) || (res != NULL)) {
298 fprintf(stderr,
299 "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
300 i, j);
301+ return(1);
302+ }
303 }
304
305 /*
306@@ -113,10 +127,12 @@
307 * at least 3 bytes, but we give only 2 !
308 */
309 else if ((i & 0xE0) == 0xE0) {
310- if ((lastError == 0) || (res != NULL))
311+ if ((lastError == 0) || (res != NULL)) {
312 fprintf(stderr,
313 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
314 i, j);
315+ return(1);
316+ }
317 }
318
319 /*
320@@ -125,11 +141,13 @@
321 else if ((lastError != 0) || (res == NULL)) {
322 fprintf(stderr,
323 "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
324+ return(1);
325 }
326 if (res != NULL)
327 xmlFreeDoc(res);
328 }
329 }
330+ return(0);
331 }
332
333 /**
334@@ -141,9 +159,10 @@
335 * CDATA in text or in attribute values.
336 */
337
338-static void testDocumentRanges(void) {
339+static int testDocumentRanges(void) {
340 xmlParserCtxtPtr ctxt;
341 char *data;
342+ int test_ret = 0;
343
344 /*
345 * Set up a parsing context using the first document as
346@@ -152,7 +171,7 @@
347 ctxt = xmlNewParserCtxt();
348 if (ctxt == NULL) {
349 fprintf(stderr, "Failed to allocate parser context\n");
350- return;
351+ return(1);
352 }
353
354 printf("testing 1 byte char in document: 1");
355@@ -163,7 +182,7 @@
356 data[2] = ' ';
357 data[3] = ' ';
358 /* test 1 byte injection at beginning of area */
359- testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
360+ test_ret += testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
361 data, -1, -1);
362 printf(" 2");
363 fflush(stdout);
364@@ -172,7 +191,7 @@
365 data[2] = ' ';
366 data[3] = ' ';
367 /* test 1 byte injection at end of area */
368- testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
369+ test_ret += testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
370 data + 3, -1, -1);
371
372 printf(" 3");
373@@ -183,7 +202,7 @@
374 data[2] = ' ';
375 data[3] = ' ';
376 /* test 1 byte injection at beginning of area */
377- testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
378+ test_ret += testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
379 data, '\'', -1);
380 printf(" 4");
381 fflush(stdout);
382@@ -192,7 +211,7 @@
383 data[2] = ' ';
384 data[3] = ' ';
385 /* test 1 byte injection at end of area */
386- testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
387+ test_ret += testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
388 data + 3, '\'', -1);
389 printf(" done\n");
390
391@@ -204,7 +223,7 @@
392 data[2] = ' ';
393 data[3] = ' ';
394 /* test 2 byte injection at beginning of area */
395- testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
396+ test_ret += testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
397 data);
398 printf(" 2");
399 fflush(stdout);
400@@ -213,7 +232,7 @@
401 data[2] = ' ';
402 data[3] = ' ';
403 /* test 2 byte injection at end of area */
404- testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
405+ test_ret += testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
406 data + 2);
407
408 printf(" 3");
409@@ -224,7 +243,7 @@
410 data[2] = ' ';
411 data[3] = ' ';
412 /* test 2 byte injection at beginning of area */
413- testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
414+ test_ret += testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
415 data);
416 printf(" 4");
417 fflush(stdout);
418@@ -233,14 +252,15 @@
419 data[2] = ' ';
420 data[3] = ' ';
421 /* test 2 byte injection at end of area */
422- testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
423+ test_ret += testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
424 data + 2);
425 printf(" done\n");
426
427 xmlFreeParserCtxt(ctxt);
428+ return(test_ret);
429 }
430
431-static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
432+static int testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
433 int i = 0;
434 int len, c;
435
436@@ -255,19 +275,25 @@
437 c = xmlCurrentChar(ctxt, &len);
438 if ((i == 0) || (i >= 0x80)) {
439 /* we must see an error there */
440- if (lastError != XML_ERR_INVALID_CHAR)
441+ if (lastError != XML_ERR_INVALID_CHAR) {
442 fprintf(stderr,
443 "Failed to detect invalid char for Byte 0x%02X\n", i);
444+ return(1);
445+ }
446 } else if (i == 0xD) {
447- if ((c != 0xA) || (len != 1))
448+ if ((c != 0xA) || (len != 1)) {
449 fprintf(stderr, "Failed to convert char for Byte 0x%02X\n", i);
450+ return(1);
451+ }
452 } else if ((c != i) || (len != 1)) {
453 fprintf(stderr, "Failed to parse char for Byte 0x%02X\n", i);
454+ return(1);
455 }
456 }
457+ return(0);
458 }
459
460-static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
461+static int testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
462 int i, j;
463 int len, c;
464
465@@ -284,10 +310,12 @@
466
467 /* if first bit of first char is set, then second bit must too */
468 if ((i & 0x80) && ((i & 0x40) == 0)) {
469- if (lastError != XML_ERR_INVALID_CHAR)
470+ if (lastError != XML_ERR_INVALID_CHAR) {
471 fprintf(stderr,
472 "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
473 i, j);
474+ return(1);
475+ }
476 }
477
478 /*
479@@ -295,10 +323,12 @@
480 * bits must be 10
481 */
482 else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
483- if (lastError != XML_ERR_INVALID_CHAR)
484+ if (lastError != XML_ERR_INVALID_CHAR) {
485 fprintf(stderr,
486 "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
487 i, j, c);
488+ return(1);
489+ }
490 }
491
492 /*
493@@ -306,10 +336,12 @@
494 * than 0x80, i.e. one of bits 5 to 1 of i must be set
495 */
496 else if ((i & 0x80) && ((i & 0x1E) == 0)) {
497- if (lastError != XML_ERR_INVALID_CHAR)
498+ if (lastError != XML_ERR_INVALID_CHAR) {
499 fprintf(stderr,
500 "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
501 i, j, c);
502+ return(1);
503+ }
504 }
505
506 /*
507@@ -317,10 +349,12 @@
508 * at least 3 bytes, but we give only 2 !
509 */
510 else if ((i & 0xE0) == 0xE0) {
511- if (lastError != XML_ERR_INVALID_CHAR)
512+ if (lastError != XML_ERR_INVALID_CHAR) {
513 fprintf(stderr,
514 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
515 i, j);
516+ return(1);
517+ }
518 }
519
520 /*
521@@ -329,6 +363,7 @@
522 else if ((lastError != 0) || (len != 2)) {
523 fprintf(stderr,
524 "Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j);
525+ return(1);
526 }
527
528 /*
529@@ -338,12 +373,14 @@
530 fprintf(stderr,
531 "Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n",
532 i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c);
533+ return(1);
534 }
535 }
536 }
537+ return(0);
538 }
539
540-static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
541+static int testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
542 int i, j, k, K;
543 int len, c;
544 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
545@@ -368,20 +405,24 @@
546 * at least 4 bytes, but we give only 3 !
547 */
548 if ((i & 0xF0) == 0xF0) {
549- if (lastError != XML_ERR_INVALID_CHAR)
550+ if (lastError != XML_ERR_INVALID_CHAR) {
551 fprintf(stderr,
552 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
553 i, j, K, data[3]);
554+ return(1);
555+ }
556 }
557
558 /*
559 * The second and the third bytes must start with 10
560 */
561 else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80)) {
562- if (lastError != XML_ERR_INVALID_CHAR)
563+ if (lastError != XML_ERR_INVALID_CHAR) {
564 fprintf(stderr,
565 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
566 i, j, K);
567+ return(1);
568+ }
569 }
570
571 /*
572@@ -390,10 +431,12 @@
573 * the 6th byte of data[1] must be set
574 */
575 else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) {
576- if (lastError != XML_ERR_INVALID_CHAR)
577+ if (lastError != XML_ERR_INVALID_CHAR) {
578 fprintf(stderr,
579 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
580 i, j, K);
581+ return(1);
582+ }
583 }
584
585 /*
586@@ -401,10 +444,12 @@
587 */
588 else if (((value > 0xD7FF) && (value <0xE000)) ||
589 ((value > 0xFFFD) && (value <0x10000))) {
590- if (lastError != XML_ERR_INVALID_CHAR)
591+ if (lastError != XML_ERR_INVALID_CHAR) {
592 fprintf(stderr,
593 "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X\n",
594 value, i, j, K);
595+ return(1);
596+ }
597 }
598
599 /*
600@@ -414,6 +459,7 @@
601 fprintf(stderr,
602 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
603 i, j, K);
604+ return(1);
605 }
606
607 /*
608@@ -423,13 +469,15 @@
609 fprintf(stderr,
610 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
611 i, j, data[2], value, c);
612+ return(1);
613 }
614 }
615 }
616 }
617+ return(0);
618 }
619
620-static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
621+static int testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
622 int i, j, k, K, l, L;
623 int len, c;
624 unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
625@@ -458,10 +506,12 @@
626 * at least 5 bytes, but we give only 4 !
627 */
628 if ((i & 0xF8) == 0xF8) {
629- if (lastError != XML_ERR_INVALID_CHAR)
630+ if (lastError != XML_ERR_INVALID_CHAR) {
631 fprintf(stderr,
632 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
633 i, j, K, data[3]);
634+ return(1);
635+ }
636 }
637
638 /*
639@@ -469,10 +519,12 @@
640 */
641 else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) ||
642 ((L & 0xC0) != 0x80)) {
643- if (lastError != XML_ERR_INVALID_CHAR)
644+ if (lastError != XML_ERR_INVALID_CHAR) {
645 fprintf(stderr,
646 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
647 i, j, K, L);
648+ return(1);
649+ }
650 }
651
652 /*
653@@ -481,10 +533,12 @@
654 * the 6 or 5th byte of j must be set
655 */
656 else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) {
657- if (lastError != XML_ERR_INVALID_CHAR)
658+ if (lastError != XML_ERR_INVALID_CHAR) {
659 fprintf(stderr,
660 "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
661 i, j, K, L);
662+ return(1);
663+ }
664 }
665
666 /*
667@@ -493,10 +547,12 @@
668 else if (((value > 0xD7FF) && (value <0xE000)) ||
669 ((value > 0xFFFD) && (value <0x10000)) ||
670 (value > 0x10FFFF)) {
671- if (lastError != XML_ERR_INVALID_CHAR)
672+ if (lastError != XML_ERR_INVALID_CHAR) {
673 fprintf(stderr,
674 "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
675 value, i, j, K, L);
676+ return(1);
677+ }
678 }
679
680 /*
681@@ -506,6 +562,7 @@
682 fprintf(stderr,
683 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
684 i, j, K);
685+ return(1);
686 }
687
688 /*
689@@ -515,11 +572,13 @@
690 fprintf(stderr,
691 "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
692 i, j, data[2], value, c);
693+ return(1);
694 }
695 }
696 }
697 }
698 }
699+ return(0);
700 }
701
702 /**
703@@ -530,11 +589,12 @@
704 * cover the full range of UTF-8 chars accepted by XML-1.0
705 */
706
707-static void testCharRanges(void) {
708+static int testCharRanges(void) {
709 char data[5];
710 xmlParserCtxtPtr ctxt;
711 xmlParserInputBufferPtr buf;
712 xmlParserInputPtr input;
713+ int test_ret = 0;
714
715 memset(data, 0, 5);
716
717@@ -545,17 +605,19 @@
718 ctxt = xmlNewParserCtxt();
719 if (ctxt == NULL) {
720 fprintf(stderr, "Failed to allocate parser context\n");
721- return;
722+ return(1);
723 }
724 buf = xmlParserInputBufferCreateStatic(data, sizeof(data),
725 XML_CHAR_ENCODING_NONE);
726 if (buf == NULL) {
727 fprintf(stderr, "Failed to allocate input buffer\n");
728+ test_ret = 1;
729 goto error;
730 }
731 input = xmlNewInputStream(ctxt);
732 if (input == NULL) {
733 xmlFreeParserInputBuffer(buf);
734+ test_ret = 1;
735 goto error;
736 }
737 input->filename = NULL;
738@@ -567,25 +629,28 @@
739
740 printf("testing char range: 1");
741 fflush(stdout);
742- testCharRangeByte1(ctxt, data);
743+ test_ret += testCharRangeByte1(ctxt, data);
744 printf(" 2");
745 fflush(stdout);
746- testCharRangeByte2(ctxt, data);
747+ test_ret += testCharRangeByte2(ctxt, data);
748 printf(" 3");
749 fflush(stdout);
750- testCharRangeByte3(ctxt, data);
751+ test_ret += testCharRangeByte3(ctxt, data);
752 printf(" 4");
753 fflush(stdout);
754- testCharRangeByte4(ctxt, data);
755+ test_ret += testCharRangeByte4(ctxt, data);
756 printf(" done\n");
757 fflush(stdout);
758
759 error:
760 xmlFreeParserCtxt(ctxt);
761+ return(test_ret);
762 }
763
764 int main(void) {
765
766+ int ret = 0;
767+
768 /*
769 * this initialize the library and check potential ABI mismatches
770 * between the version it was compiled for and the actual shared
771@@ -602,8 +667,9 @@
772 /*
773 * Run the tests
774 */
775- testCharRanges();
776- testDocumentRanges();
777+ ret += testCharRanges();
778+ ret += testDocumentRanges();
779+ printf("%s: testchar\n\n", (ret == 0) ? "PASS" : "FAIL");
780
781 /*
782 * Cleanup function for the XML library.
783diff -uNr a/testdict.c b/testdict.c
784--- a/testdict.c 2013-04-16 15:08:42.971177193 +0200
785+++ b/testdict.c 2013-04-18 15:59:00.699482439 +0200
786@@ -440,5 +440,6 @@
787 clean_strings();
788 xmlCleanupParser();
789 xmlMemoryDump();
790+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL");
791 return(ret);
792 }
793diff -uNr a/testlimits.c b/testlimits.c
794--- a/testlimits.c 2013-04-12 16:16:36.180354177 +0200
795+++ b/testlimits.c 2013-04-17 14:03:17.203092987 +0200
796@@ -1630,5 +1630,6 @@
797 xmlCleanupParser();
798 xmlMemoryDump();
799
800+ printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL");
801 return(ret);
802 }
803diff -uNr a/testrecurse.c b/testrecurse.c
804--- a/testrecurse.c 2013-04-16 13:19:49.366536295 +0200
805+++ b/testrecurse.c 2013-04-17 14:06:27.367091622 +0200
806@@ -892,6 +892,7 @@
807 err++;
808 }
809 }
810+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc);
811 return(err);
812 }
813
814@@ -961,5 +962,6 @@
815 xmlCleanupParser();
816 xmlMemoryDump();
817
818+ printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL");
819 return(ret);
820 }
diff --git a/meta/recipes-core/libxml/libxml2_2.9.1.bb b/meta/recipes-core/libxml/libxml2_2.9.1.bb
new file mode 100644
index 0000000000..0b6ac5d5c6
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2_2.9.1.bb
@@ -0,0 +1,8 @@
1require libxml2.inc
2
3SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar"
4
5SRC_URI[libtar.md5sum] = "9c0cfef285d5c4a5c80d00904ddab380"
6SRC_URI[libtar.sha256sum] = "fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb"
7SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
8SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
new file mode 100644
index 0000000000..54fba11f8d
--- /dev/null
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -0,0 +1,69 @@
1DESCRIPTION = "SDK type target for building a standalone tarball containing python, chrpath, make, git and tar. The \
2 tarball can be used to run bitbake builds on systems which don't meet the usual version requirements."
3SUMMARY = "Standalone tarball for running builds on systems with inadequate software"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
6 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7
8TOOLCHAIN_TARGET_TASK ?= ""
9
10TOOLCHAIN_HOST_TASK ?= "\
11 nativesdk-python-core \
12 nativesdk-python-textutils \
13 nativesdk-python-sqlite3 \
14 nativesdk-python-pickle \
15 nativesdk-python-logging \
16 nativesdk-python-elementtree \
17 nativesdk-python-curses \
18 nativesdk-python-compile \
19 nativesdk-python-compiler \
20 nativesdk-python-fcntl \
21 nativesdk-python-shell \
22 nativesdk-python-misc \
23 nativesdk-python-multiprocessing \
24 nativesdk-python-subprocess \
25 nativesdk-python-xmlrpc \
26 nativesdk-python-netclient \
27 nativesdk-python-netserver \
28 nativesdk-python-distutils \
29 nativesdk-python-unixadmin \
30 nativesdk-python-compression \
31 nativesdk-python-json \
32 nativesdk-python-unittest \
33 nativesdk-python-mmap \
34 nativesdk-python-difflib \
35 nativesdk-python-pprint \
36 nativesdk-python-git \
37 nativesdk-python-pkgutil \
38 nativesdk-ncurses-terminfo-base \
39 nativesdk-chrpath \
40 nativesdk-tar \
41 nativesdk-git \
42 nativesdk-make \
43 "
44
45TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
46
47RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
48
49EXCLUDE_FROM_WORLD = "1"
50
51inherit meta
52inherit populate_sdk
53
54create_sdk_files_append () {
55 rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
56 rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
57 rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
58
59 # Generate new (mini) sdk-environment-setup file
60 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
61 touch $script
62 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
63 # In order for the self-extraction script to correctly extract and set up things,
64 # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
65 # However, buildtools-tarball is inherently a tool set instead of a fully functional SDK,
66 # so instead of exporting the variable, we use a comment here.
67 echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
68 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
69}
diff --git a/meta/recipes-core/meta/external-sourcery-toolchain.bb b/meta/recipes-core/meta/external-sourcery-toolchain.bb
new file mode 100644
index 0000000000..41d86d628d
--- /dev/null
+++ b/meta/recipes-core/meta/external-sourcery-toolchain.bb
@@ -0,0 +1,149 @@
1require recipes-core/eglibc/eglibc-package.inc
2
3INHIBIT_DEFAULT_DEPS = "1"
4
5# License applies to this recipe code, not the toolchain itself
6SUMMARY = "External Sourcery G++ toolchain"
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
9 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
10
11PROVIDES += "\
12 linux-libc-headers \
13 virtual/${TARGET_PREFIX}gcc \
14 virtual/${TARGET_PREFIX}g++ \
15 virtual/${TARGET_PREFIX}gcc-initial \
16 virtual/${TARGET_PREFIX}gcc-intermediate \
17 virtual/${TARGET_PREFIX}binutils \
18 virtual/${TARGET_PREFIX}libc-for-gcc \
19 virtual/${TARGET_PREFIX}libc-initial \
20 virtual/${TARGET_PREFIX}compilerlibs \
21 virtual/libc \
22 virtual/libintl \
23 virtual/libiconv \
24 glibc-thread-db \
25 libgcc \
26 eglibc \
27 virtual/linux-libc-headers \
28"
29PV = "${CSL_VER_MAIN}"
30PR = "r7"
31
32#SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2"
33
34SRC_URI = "file://SUPPORTED"
35
36do_install() {
37 # Use optimized files if available
38 sysroot="${EXTERNAL_TOOLCHAIN_SYSROOT}"
39
40 cp -a $sysroot${base_libdir}/. ${D}${base_libdir}
41 cp -a $sysroot/etc/. ${D}${sysconfdir}
42 cp -a $sysroot/sbin/. ${D}${base_sbindir}
43
44 install -d ${D}/usr
45 for usr_element in bin libexec sbin share ${base_libdir}; do
46 usr_path=$sysroot/usr/$usr_element
47 cp -a $usr_path ${D}/usr/
48 done
49 for datadir_element in man info; do
50 datadir_path=$sysroot/usr/$datadir_element
51 if [ -e $datadir_path ]; then
52 cp -a $datadir_path ${D}${datadir}/
53 fi
54 done
55
56 # Some toolchains have headers under the core specific area
57 if [ -e $sysroot/usr/include ]; then
58 cp -a $sysroot/usr/include/. ${D}${includedir}
59 else
60 cp -a $sysroot/../usr/include/. ${D}${includedir}
61 fi
62
63 rm ${D}${sysconfdir}/rpc
64 rm -r ${D}${datadir}/zoneinfo
65
66 mv ${D}${libdir}/bin/* ${D}${bindir}/
67 if [ -e ${D}${libdir}/bin/.debug ]; then
68 mv ${D}${libdir}/bin/.debug/* ${D}${bindir}/.debug/
69 fi
70 ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver
71
72 sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h
73 sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so
74 sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so
75}
76
77SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust"
78external_toolchain_sysroot_adjust() {
79 dest_sysroot="$(${CC} -print-sysroot | sed -e's,^${STAGING_DIR_HOST},,; s,/$,,')"
80 if [ -n "$dest_sysroot" ]; then
81 rm -f ${SYSROOT_DESTDIR}/$dest_sysroot
82 ln -s . ${SYSROOT_DESTDIR}/$dest_sysroot
83 fi
84
85 # If the usr/lib directory doesn't exist, the toolchain fails to even
86 # try to find crti.o in a completely different directory (usr/lib64)
87 install -d ${SYSROOT_DESTDIR}/usr/lib
88}
89
90PACKAGES =+ "libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev linux-libc-headers linux-libc-headers-dev gdbserver gdbserver-dbg"
91
92# This test should be fixed to ignore .a files in .debug dirs
93INSANE_SKIP_${PN}-dbg = "staticdev"
94
95# We don't care about GNU_HASH in prebuilt binaries
96INSANE_SKIP_${PN}-utils += "ldflags"
97INSANE_SKIP_libstdc++ += "ldflags"
98INSANE_SKIP_libgcc += "ldflags"
99INSANE_SKIP_gdbserver += "ldflags"
100
101PKG_${PN} = "eglibc"
102PKG_${PN}-dev = "eglibc-dev"
103PKG_${PN}-staticdev = "eglibc-staticdev"
104PKG_${PN}-doc = "eglibc-doc"
105PKG_${PN}-dbg = "eglibc-dbg"
106PKG_${PN}-pic = "eglibc-pic"
107PKG_${PN}-utils = "eglibc-utils"
108PKG_${PN}-gconv = "eglibc-gconv"
109PKG_${PN}-extra-nss = "eglibc-extra-nss"
110PKG_${PN}-thread-db = "eglibc-thread-db"
111PKG_${PN}-pcprofile = "eglibc-pcprofile"
112
113PKGV = "${CSL_VER_LIBC}"
114PKGV_libgcc = "${CSL_VER_GCC}"
115PKGV_libgcc-dev = "${CSL_VER_GCC}"
116PKGV_libstdc++ = "${CSL_VER_GCC}"
117PKGV_libstdc++-dev = "${CSL_VER_GCC}"
118PKGV_libstdc++-staticdev = "${CSL_VER_GCC}"
119PKGV_linux-libc-headers = "${CSL_VER_KERNEL}"
120PKGV_linux-libc-headers-dev = "${CSL_VER_KERNEL}"
121PKGV_gdbserver = "${CSL_VER_GDB}"
122PKGV_gdbserver-dbg = "${CSL_VER_GDB}"
123
124FILES_libgcc = "${base_libdir}/libgcc_s.so.1"
125FILES_libgcc-dev = "${base_libdir}/libgcc_s.so"
126FILES_libstdc++ = "${libdir}/libstdc++.so.*"
127FILES_libstdc++-dev = "${includedir}/c++/${PV} \
128 ${libdir}/libstdc++.so \
129 ${libdir}/libstdc++.la \
130 ${libdir}/libsupc++.la"
131FILES_libstdc++-staticdev = "${libdir}/libstdc++.a ${libdir}/libsupc++.a"
132FILES_linux-libc-headers = "${includedir}/asm* \
133 ${includedir}/linux \
134 ${includedir}/mtd \
135 ${includedir}/rdma \
136 ${includedir}/scsi \
137 ${includedir}/sound \
138 ${includedir}/video \
139"
140FILES_gdbserver = "${bindir}/gdbserver ${libdir}/bin/sysroot-gdbserver"
141FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver"
142
143CSL_VER_MAIN ??= ""
144
145python () {
146 if not d.getVar("CSL_VER_MAIN"):
147 raise bb.parse.SkipPackage("External CSL toolchain not configured (CSL_VER_MAIN not set).")
148}
149
diff --git a/meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED b/meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED
new file mode 100644
index 0000000000..3f746888b4
--- /dev/null
+++ b/meta/recipes-core/meta/external-sourcery-toolchain/SUPPORTED
@@ -0,0 +1,257 @@
1aa_DJ ISO-8859-1
2aa_ER UTF-8
3aa_ER@saaho UTF-8
4aa_ET UTF-8
5af_ZA ISO-8859-1
6am_ET UTF-8
7an_ES ISO-8859-15
8ar_AE ISO-8859-6
9ar_BH ISO-8859-6
10ar_DZ ISO-8859-6
11ar_EG ISO-8859-6
12ar_IN UTF-8
13ar_IQ ISO-8859-6
14ar_JO ISO-8859-6
15ar_KW ISO-8859-6
16ar_LB ISO-8859-6
17ar_LY ISO-8859-6
18ar_MA ISO-8859-6
19ar_OM ISO-8859-6
20ar_QA ISO-8859-6
21ar_SA ISO-8859-6
22ar_SD ISO-8859-6
23ar_SY ISO-8859-6
24ar_TN ISO-8859-6
25ar_YE ISO-8859-6
26ast_ES ISO-8859-15
27be_BY CP1251
28be_BY@latin UTF-8
29ber_DZ UTF-8
30ber_MA UTF-8
31bg_BG CP1251
32bn_BD UTF-8
33bn_IN UTF-8
34bo_CN UTF-8
35bo_IN UTF-8
36br_FR ISO-8859-1
37br_FR@euro ISO-8859-15
38bs_BA ISO-8859-2
39byn_ER UTF-8
40ca_AD ISO-8859-15
41ca_ES ISO-8859-1
42ca_ES@euro ISO-8859-15
43ca_FR ISO-8859-15
44ca_IT ISO-8859-15
45crh_UA UTF-8
46cs_CZ ISO-8859-2
47csb_PL UTF-8
48cy_GB ISO-8859-14
49da_DK ISO-8859-1
50de_AT ISO-8859-1
51de_AT@euro ISO-8859-15
52de_BE ISO-8859-1
53de_BE@euro ISO-8859-15
54de_CH ISO-8859-1
55de_DE ISO-8859-1
56de_DE@euro ISO-8859-15
57de_LU ISO-8859-1
58de_LU@euro ISO-8859-15
59dv_MV UTF-8
60dz_BT UTF-8
61el_GR ISO-8859-7
62el_CY ISO-8859-7
63en_AG UTF-8
64en_AU ISO-8859-1
65en_BW ISO-8859-1
66en_CA ISO-8859-1
67en_DK ISO-8859-1
68en_GB ISO-8859-1
69en_HK ISO-8859-1
70en_IE ISO-8859-1
71en_IE@euro ISO-8859-15
72en_IN UTF-8
73en_NG UTF-8
74en_NZ ISO-8859-1
75en_PH ISO-8859-1
76en_SG ISO-8859-1
77en_US ISO-8859-1
78en_ZA ISO-8859-1
79en_ZW ISO-8859-1
80es_AR ISO-8859-1
81es_BO ISO-8859-1
82es_CL ISO-8859-1
83es_CO ISO-8859-1
84es_DO ISO-8859-1
85es_EC ISO-8859-1
86es_ES ISO-8859-1
87es_ES@euro ISO-8859-15
88es_GT ISO-8859-1
89es_HN ISO-8859-1
90es_MX ISO-8859-1
91es_NI ISO-8859-1
92es_PA ISO-8859-1
93es_PE ISO-8859-1
94es_PR ISO-8859-1
95es_PY ISO-8859-1
96es_SV ISO-8859-1
97es_US ISO-8859-1
98es_UY ISO-8859-1
99es_VE ISO-8859-1
100et_EE ISO-8859-1
101eu_ES ISO-8859-1
102eu_ES@euro ISO-8859-15
103fa_IR UTF-8
104fi_FI ISO-8859-1
105fi_FI@euro ISO-8859-15
106fil_PH UTF-8
107fo_FO ISO-8859-1
108fr_BE ISO-8859-1
109fr_BE@euro ISO-8859-15
110fr_CA ISO-8859-1
111fr_CH ISO-8859-1
112fr_FR ISO-8859-1
113fr_FR@euro ISO-8859-15
114fr_LU ISO-8859-1
115fr_LU@euro ISO-8859-15
116fur_IT UTF-8
117fy_NL UTF-8
118fy_DE UTF-8
119ga_IE ISO-8859-1
120ga_IE@euro ISO-8859-15
121gd_GB ISO-8859-15
122gez_ER UTF-8
123gez_ER@abegede UTF-8
124gez_ET UTF-8
125gez_ET@abegede UTF-8
126gl_ES ISO-8859-1
127gl_ES@euro ISO-8859-15
128gu_IN UTF-8
129gv_GB ISO-8859-1
130ha_NG UTF-8
131he_IL ISO-8859-8
132hi_IN UTF-8
133hne_IN UTF-8
134hr_HR ISO-8859-2
135hsb_DE ISO-8859-2
136ht_HT UTF-8
137hu_HU ISO-8859-2
138hy_AM UTF-8
139id_ID ISO-8859-1
140ig_NG UTF-8
141ik_CA UTF-8
142is_IS ISO-8859-1
143it_CH ISO-8859-1
144it_IT ISO-8859-1
145it_IT@euro ISO-8859-15
146iu_CA UTF-8
147iw_IL ISO-8859-8
148ka_GE GEORGIAN-PS
149kk_KZ PT154
150kk_KZ RK1048
151kl_GL ISO-8859-1
152km_KH UTF-8
153kn_IN UTF-8
154ks_IN UTF-8
155ks_IN@devanagari UTF-8
156ku_TR ISO-8859-9
157kw_GB ISO-8859-1
158ky_KG UTF-8
159lg_UG ISO-8859-10
160li_BE UTF-8
161li_NL UTF-8
162lo_LA UTF-8
163lt_LT ISO-8859-13
164lv_LV ISO-8859-13
165mai_IN UTF-8
166mg_MG ISO-8859-15
167mi_NZ ISO-8859-13
168mk_MK ISO-8859-5
169ml_IN UTF-8
170mn_MN UTF-8
171mr_IN UTF-8
172ms_MY ISO-8859-1
173mt_MT ISO-8859-3
174my_MM UTF-8
175nan_TW@latin UTF-8
176nb_NO ISO-8859-1
177nds_DE UTF-8
178nds_NL UTF-8
179ne_NP UTF-8
180nl_AW UTF-8
181nl_BE ISO-8859-1
182nl_BE@euro ISO-8859-15
183nl_NL ISO-8859-1
184nl_NL@euro ISO-8859-15
185nn_NO ISO-8859-1
186nr_ZA UTF-8
187nso_ZA UTF-8
188oc_FR ISO-8859-1
189om_ET UTF-8
190om_KE ISO-8859-1
191or_IN UTF-8
192pa_IN UTF-8
193pa_PK UTF-8
194pap_AN UTF-8
195pl_PL ISO-8859-2
196ps_AF UTF-8
197pt_BR ISO-8859-1
198pt_PT ISO-8859-1
199pt_PT@euro ISO-8859-15
200ro_RO ISO-8859-2
201ru_RU ISO-8859-5
202ru_UA KOI8-U
203rw_RW UTF-8
204sa_IN UTF-8
205sc_IT UTF-8
206sd_IN UTF-8
207sd_IN@devanagari UTF-8
208se_NO UTF-8
209shs_CA UTF-8
210si_LK UTF-8
211sid_ET UTF-8
212sk_SK ISO-8859-2
213sl_SI ISO-8859-2
214so_DJ ISO-8859-1
215so_ET UTF-8
216so_KE ISO-8859-1
217so_SO ISO-8859-1
218sq_AL ISO-8859-1
219sr_ME UTF-8
220sr_RS UTF-8
221sr_RS@latin UTF-8
222ss_ZA UTF-8
223st_ZA ISO-8859-1
224sv_FI ISO-8859-1
225sv_FI@euro ISO-8859-15
226sv_SE ISO-8859-1
227ta_IN UTF-8
228te_IN UTF-8
229tg_TJ KOI8-T
230th_TH TIS-620
231ti_ER UTF-8
232ti_ET UTF-8
233tig_ER UTF-8
234tk_TM UTF-8
235tl_PH ISO-8859-1
236tn_ZA UTF-8
237tr_CY ISO-8859-9
238tr_TR ISO-8859-9
239ts_ZA UTF-8
240ug_CN UTF-8
241uk_UA KOI8-U
242ur_PK UTF-8
243uz_UZ ISO-8859-1
244uz_UZ@cyrillic UTF-8
245ve_ZA UTF-8
246vi_VN UTF-8
247wa_BE ISO-8859-1
248wa_BE@euro ISO-8859-15
249wo_SN UTF-8
250xh_ZA ISO-8859-1
251yi_US CP1255
252yo_NG UTF-8
253zh_CN GB2312
254zh_HK BIG5-HKSCS
255zh_SG GB2312
256zh_TW BIG5
257zu_ZA ISO-8859-1
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
new file mode 100644
index 0000000000..3a71a9bb2e
--- /dev/null
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -0,0 +1,51 @@
1DESCRIPTION = "Package of environment files for SDK"
2LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
3 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4LICENSE = "MIT"
5PR = "r8"
6
7EXCLUDE_FROM_WORLD = "1"
8
9inherit toolchain-scripts
10TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"
11REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
12
13SDK_DIR = "${WORKDIR}/sdk"
14SDK_OUTPUT = "${SDK_DIR}/image"
15SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
16
17inherit cross-canadian
18
19do_generate_content[nostamp] = "1"
20do_generate_content() {
21
22 rm -rf ${SDK_OUTPUT}
23 mkdir -p ${SDK_OUTPUT}/${SDKPATH}
24
25 toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
26
27 toolchain_create_sdk_env_script_for_installer ${REAL_MULTIMACH_TARGET_SYS}
28
29 # Add version information
30 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
31}
32addtask generate_content before do_install after do_compile
33
34do_install[nostamp] = "1"
35do_install() {
36 install -d ${D}/${SDKPATH}
37 install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
38}
39
40PN = "meta-environment-${MACHINE}"
41PACKAGES = "${PN}"
42FILES_${PN}= " \
43 ${SDKPATH}/* \
44 "
45
46do_fetch[noexec] = "1"
47do_unpack[noexec] = "1"
48do_patch[noexec] = "1"
49do_configure[noexec] = "1"
50do_compile[noexec] = "1"
51do_populate_sysroot[noexec] = "1"
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb
new file mode 100644
index 0000000000..130b1c9494
--- /dev/null
+++ b/meta/recipes-core/meta/meta-ide-support.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
4 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6DEPENDS = "virtual/libc gdb-cross qemu-native qemu-helper-native unfs-server-native"
7PR = "r3"
8
9inherit meta toolchain-scripts
10
11do_populate_ide_support () {
12 toolchain_create_tree_env_script
13}
14
15do_populate_ide_support[nostamp] = "1"
16do_populate_ide_support[recrdeptask] = "do_package_write"
17addtask populate_ide_support before do_build after do_install
diff --git a/meta/recipes-core/meta/meta-toolchain-gmae.bb b/meta/recipes-core/meta/meta-toolchain-gmae.bb
new file mode 100644
index 0000000000..5d805742ac
--- /dev/null
+++ b/meta/recipes-core/meta/meta-toolchain-gmae.bb
@@ -0,0 +1,7 @@
1TOOLCHAIN_TARGET_GMAETASK ?= "packagegroup-core-standalone-gmae-sdk-target packagegroup-core-standalone-gmae-sdk-target-dbg"
2TOOLCHAIN_TARGET_TASK = "${TOOLCHAIN_TARGET_GMAETASK}"
3TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-gmae-${DISTRO_VERSION}"
4PROVIDES = "meta-toolchain-sdk"
5require meta-toolchain.bb
6
7TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb
new file mode 100644
index 0000000000..dccf394c10
--- /dev/null
+++ b/meta/recipes-core/meta/meta-toolchain.bb
@@ -0,0 +1,9 @@
1DESCRIPTION = "Meta package for building a installable toolchain"
2LICENSE = "MIT"
3
4PR = "r7"
5
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8
9inherit populate_sdk
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
new file mode 100644
index 0000000000..76bf331fc7
--- /dev/null
+++ b/meta/recipes-core/meta/package-index.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Rebuild the package index"
2LICENSE = "MIT"
3
4INHIBIT_DEFAULT_DEPS = "1"
5PACKAGES = ""
6
7do_fetch[noexec] = "1"
8do_unpack[noexec] = "1"
9do_patch[noexec] = "1"
10do_configure[noexec] = "1"
11do_compile[noexec] = "1"
12do_install[noexec] = "1"
13do_package[noexec] = "1"
14do_packagedata[noexec] = "1"
15do_package_write[noexec] = "1"
16do_package_write_ipk[noexec] = "1"
17do_package_write_rpm[noexec] = "1"
18do_package_write_deb[noexec] = "1"
19do_populate_sysroot[noexec] = "1"
20
21do_package_index[nostamp] = "1"
22do_package_index[depends] += "${PACKAGEINDEXDEPS}"
23
24do_package_index() {
25 set -ex
26 ${PACKAGEINDEXES}
27 set +ex
28}
29addtask do_package_index before do_build
30EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-core/ncurses/ncurses-5.9/config.cache b/meta/recipes-core/ncurses/ncurses-5.9/config.cache
new file mode 100644
index 0000000000..6a9217d5bb
--- /dev/null
+++ b/meta/recipes-core/ncurses/ncurses-5.9/config.cache
@@ -0,0 +1,4 @@
1#! /bin/sh
2
3cf_cv_func_nanosleep=yes
4cf_cv_func_mkstemp=yes
diff --git a/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch b/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch
new file mode 100644
index 0000000000..cba89d26f5
--- /dev/null
+++ b/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch
@@ -0,0 +1,27 @@
1Upstream-Status: Inappropriate [configuration]
2
3'tic' of some linux distributions (e.g. fedora 11) hang in an infinite
4loop when processing the original file.
5
6Index: ncurses-5.7/misc/terminfo.src
7===================================================================
8--- ncurses-5.7.orig/misc/terminfo.src
9+++ ncurses-5.7/misc/terminfo.src
10@@ -3706,12 +3706,11 @@ konsole-xf3x|KDE console window with key
11 # The value for kbs reflects local customization rather than the settings used
12 # for XFree86 xterm.
13 konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
14- kend=\EOF, khome=\EOH, use=konsole+pcfkeys,
15- use=konsole-vt100,
16-# Konsole does not implement shifted cursor-keys.
17-konsole+pcfkeys|konsole subset of xterm+pcfkeys,
18- kLFT@, kRIT@, kcbt=\E[Z, kind@, kri@, kDN@, kUP@, use=xterm+pcc2,
19- use=xterm+pcf0,
20+ kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R,
21+ kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~,
22+ kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
23+ kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS,
24+ khome=\EOH, use=konsole-vt100,
25 # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
26 # it is still useful for deriving the other entries.
27 konsole-vt100|KDE console window with vt100 (sic) keyboard,
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
new file mode 100644
index 0000000000..671daf89ec
--- /dev/null
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -0,0 +1,294 @@
1SUMMARY = "The New Curses library"
2DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library."
3HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc180a8c44ca642e97c35452fab5f66"
6SECTION = "libs"
7DEPENDS = "ncurses-native"
8DEPENDS_class-native = ""
9INC_PR = "r15"
10
11inherit autotools binconfig multilib_header
12
13# Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
14SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz"
15
16EXTRA_AUTORECONF = "-I m4"
17CONFIG_SITE =+ "${WORKDIR}/config.cache"
18
19# Whether to enable separate widec libraries; must be 'true' or 'false'
20#
21# TODO: remove this variable when widec is supported in every setup?
22ENABLE_WIDEC ?= "true"
23
24# _GNU_SOURCE is required for widec stuff and is detected automatically
25# for target objects. But it must be set manually for native and sdk
26# builds.
27BUILD_CPPFLAGS += "-D_GNU_SOURCE"
28
29# natives don't generally look in base_libdir
30base_libdir_class-native = "${libdir}"
31
32# Display corruption occurs on 64 bit hosts without these settings
33# This was derrived from the upstream debian ncurses which uses
34# these settings for 32 and 64 bit hosts.
35EXCONFIG_ARGS = ""
36EXCONFIG_ARGS_virtclass-native = " \
37 --disable-lp64 \
38 --with-chtype='long' \
39 --with-mmask-t='long'"
40EXCONFIG_ARGS_virtclass-nativesdk = " \
41 --disable-lp64 \
42 --with-chtype='long' \
43 --with-mmask-t='long'"
44
45PACKAGES_DYNAMIC = "^${PN}-lib.*"
46
47# Fall back to the host termcap / terminfo for -nativesdk and -native
48# The reality is a work around for strange problems with things like
49# "bitbake -c menuconfig busybox" where it cannot find the terminfo
50# because the sstate had a hard coded search path. Until this is fixed
51# another way this is deemed good enough.
52EX_TERMCAP = ""
53EX_TERMCAP_virtclass-native = ":/etc/termcap:/usr/share/misc/termcap"
54EX_TERMCAP_virtclass-nativesdk = ":/etc/termcap:/usr/share/misc/termcap"
55EX_TERMINFO = ""
56EX_TERMINFO_virtclass-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
57EX_TERMINFO_virtclass-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo"
58
59# Helper function for do_configure to allow multiple configurations
60# $1 the directory to run configure in
61# $@ the arguments to pass to configure
62ncurses_configure() {
63 mkdir -p $1
64 cd $1
65 shift
66 oe_runconf \
67 --disable-static \
68 --without-debug \
69 --without-ada \
70 --without-gpm \
71 --enable-hard-tabs \
72 --enable-xmc-glitch \
73 --enable-colorfgbg \
74 --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap${EX_TERMCAP}' \
75 --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo${EX_TERMINFO}' \
76 --with-shared \
77 --disable-big-core \
78 --program-prefix= \
79 --with-ticlib \
80 --with-termlib=tinfo \
81 --enable-sigwinch \
82 --enable-pc-files \
83 --disable-rpath-hack \
84 ${EXCONFIG_ARGS} \
85 --with-manpage-format=normal \
86 "$@" || return 1
87 cd ..
88}
89
90# Override the function from the autotools class; ncurses requires a
91# patched autoconf213 to generate the configure script. This autoconf
92# is not available so that the shipped script will be used.
93do_configure() {
94 # check does not work with cross-compiling and is generally
95 # broken because it requires stdin to be pollable (which is
96 # not the case for /dev/null redirections)
97 export cf_cv_working_poll=yes
98
99 ( cd ${S}; gnu-configize --force )
100 ncurses_configure "narrowc" || \
101 return 1
102 ! ${ENABLE_WIDEC} || \
103 ncurses_configure "widec" "--enable-widec" "--without-progs"
104}
105
106do_compile() {
107 oe_runmake -C narrowc libs
108 oe_runmake -C narrowc/progs
109
110 ! ${ENABLE_WIDEC} || \
111 oe_runmake -C widec libs
112}
113
114# set of expected differences between narrowc and widec header
115#
116# TODO: the NCURSES_CH_T difference can cause real problems :(
117_unifdef_cleanup = " \
118 -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \
119 -e '/^#define NCURSES_CH_T /d' \
120 -e '/^#include <wchar.h>/d' \
121 -e '\!^/\* .* \*/!d' \
122"
123
124do_test[depends] = "unifdef-native:do_populate_sysroot"
125do_test[dirs] = "${S}"
126do_test() {
127 ${ENABLE_WIDEC} || return 0
128
129 # make sure that the narrow and widec header are compatible
130 # and differ only in minor details.
131 unifdef -k narrowc/include/curses.h | \
132 sed ${_unifdef_cleanup} > curses-narrowc.h
133 unifdef -k widec/include/curses.h | \
134 sed ${_unifdef_cleanup} > curses-widec.h
135
136 diff curses-narrowc.h curses-widec.h
137}
138
139# Split original _install_opts to two parts.
140# One is the options to install contents, the other is the parameters \
141# when running command "make install"
142_install_opts = "\
143 install.libs install.includes install.man \
144"
145_install_cfgs = "\
146 DESTDIR='${D}' \
147 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
148"
149
150python do_install () {
151 bb.build.exec_func("shell_do_install", d)
152 oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so"))
153}
154
155shell_do_install() {
156 # Order of installation is important; widec installs a 'curses.h'
157 # header with more definitions and must be installed last hence.
158 # Compatibility of these headers will be checked in 'do_test()'.
159 oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \
160 install.progs
161
162 # The install.data should run after install.libs, otherwise
163 # there would be a race issue in a very critical conditon, since
164 # tic will be run by install.data, and tic needs libtinfo.so
165 # which would be regenerated by install.libs.
166 oe_runmake -C narrowc ${_install_cfgs} \
167 install.data
168
169
170 ! ${ENABLE_WIDEC} || \
171 oe_runmake -C widec ${_install_cfgs} ${_install_opts}
172
173 cd narrowc
174
175 # include some basic terminfo files
176 # stolen ;) from gentoo and modified a bit
177 for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 xterm-256color
178 do
179 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
180 local basedir="$(basename $(dirname "${termfile}"))"
181
182 if [ -n "${termfile}" ]
183 then
184 install -d ${D}${sysconfdir}/terminfo/${basedir}
185 mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
186 ln -s /etc/terminfo/${basedir}/${x} \
187 ${D}${datadir}/terminfo/${basedir}/${x}
188 fi
189 done
190 # i think we can use xterm-color as default xterm
191 if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
192 then
193 ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
194 fi
195
196 rm -f ${D}${libdir}/terminfo
197
198 # create linker scripts for libcurses.so and libncurses to
199 # link against -ltinfo when needed. Some builds might break
200 # else when '-Wl,--no-copy-dt-needed-entries' has been set in
201 # linker flags.
202 for i in libncurses libncursesw; do
203 f=${D}${libdir}/$i.so
204 test -h $f || continue
205 rm -f $f
206 echo '/* GNU ld script */' >$f
207 echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f
208 done
209
210 # Make sure that libcurses is linked so that it gets -ltinfo
211 # also, this should be addressed upstream really.
212 ln -sf libncurses.so ${D}${libdir}/libcurses.so
213
214 # create libtermcap.so linker script for backward compatibility
215 f=${D}${libdir}/libtermcap.so
216 echo '/* GNU ld script */' >$f
217 echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f
218
219 if [ ! -d "${D}${base_libdir}" ]; then
220 # Setting base_libdir to libdir as is done in the -native
221 # case will skip this code
222 mkdir ${D}${base_libdir}
223 mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir}
224 ! ${ENABLE_WIDEC} || \
225 mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir}
226
227 mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
228 rm ${D}${libdir}/libtinfo.so
229 # We'll turn this into a relative symlink after do_install returns
230 ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
231 fi
232
233 oe_multilib_header curses.h
234}
235
236python populate_packages_prepend () {
237 libdir = d.expand("${libdir}")
238 base_libdir = d.expand("${base_libdir}")
239 pnbase = d.expand("${PN}-lib%s")
240 do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
241 if libdir is not base_libdir:
242 do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
243}
244
245
246inherit update-alternatives
247
248ALTERNATIVE_PRIORITY = "100"
249
250ALTERNATIVE_ncurses-tools_class-target = "clear reset"
251
252BBCLASSEXTEND = "native nativesdk"
253
254PACKAGES += " \
255 ${PN}-tools \
256 ${PN}-terminfo \
257 ${PN}-terminfo-base \
258"
259
260FILES_${PN} = "\
261 ${bindir}/tput \
262 ${bindir}/tset \
263 ${bindir}/ncurses5-config \
264 ${bindir}/ncursesw5-config \
265 ${datadir}/tabset \
266"
267
268# This keeps only tput/tset in ncurses
269# clear/reset are in already busybox
270FILES_${PN}-tools = "\
271 ${bindir}/tic \
272 ${bindir}/toe \
273 ${bindir}/infotocap \
274 ${bindir}/captoinfo \
275 ${bindir}/infocmp \
276 ${bindir}/clear${@['', '.${BPN\x7d']['${CLASSOVERRIDE}' == 'class-target']} \
277 ${bindir}/reset${@['', '.${BPN\x7d']['${CLASSOVERRIDE}' == 'class-target']} \
278 ${bindir}/tack \
279 ${bindir}/tabs \
280"
281
282# 'reset' is a symlink to 'tset' which is in the 'ncurses' package
283RDEPENDS_${PN}-tools = "${PN}"
284
285FILES_${PN}-terminfo = "\
286 ${datadir}/terminfo \
287"
288
289FILES_${PN}-terminfo-base = "\
290 ${sysconfdir}/terminfo \
291"
292
293RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo"
294RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base"
diff --git a/meta/recipes-core/ncurses/ncurses_5.9.bb b/meta/recipes-core/ncurses/ncurses_5.9.bb
new file mode 100644
index 0000000000..6d23c0c7ea
--- /dev/null
+++ b/meta/recipes-core/ncurses/ncurses_5.9.bb
@@ -0,0 +1,10 @@
1require ncurses.inc
2
3PR = "${INC_PR}.1"
4
5SRC_URI += "file://tic-hang.patch \
6 file://config.cache \
7"
8
9SRC_URI[md5sum] = "8cb9c412e5f2d96bc6f459aa8c6282a1"
10SRC_URI[sha256sum] = "9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b"
diff --git a/meta/recipes-core/ncurses/site_config/headers b/meta/recipes-core/ncurses/site_config/headers
new file mode 100644
index 0000000000..087b7bfd5e
--- /dev/null
+++ b/meta/recipes-core/ncurses/site_config/headers
@@ -0,0 +1,5 @@
1curses.h
2ncurses/curses.h
3ncurses.h
4ncurses/termcap.h
5
diff --git a/meta/recipes-core/netbase/netbase/hosts b/meta/recipes-core/netbase/netbase/hosts
new file mode 100644
index 0000000000..2f332451b5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/hosts
@@ -0,0 +1,2 @@
1127.0.0.1 localhost.localdomain localhost
2
diff --git a/meta/recipes-core/netbase/netbase_5.1.bb b/meta/recipes-core/netbase/netbase_5.1.bb
new file mode 100644
index 0000000000..2b1df07a19
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase_5.1.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Basic TCP/IP networking support"
2DESCRIPTION = "This package provides the necessary infrastructure for basic TCP/IP based networking"
3HOMEPAGE = "http://packages.debian.org/netbase"
4SECTION = "base"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
7PE = "1"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
10 file://hosts"
11
12SRC_URI[md5sum] = "d9ba76be063eb9b31fc60e14ad8a1206"
13SRC_URI[sha256sum] = "0d291fa48e3f6490601b8e8ad62804c530cc937665a79e5c69510cd3c5ec889e"
14
15do_install () {
16 install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
17 install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
18 install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
19 install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
20 install -m 0644 etc-services ${D}${sysconfdir}/services
21}
22
23CONFFILES_${PN} = "${sysconfdir}/hosts"
diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
new file mode 100644
index 0000000000..e298ff4a06
--- /dev/null
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -0,0 +1,33 @@
1#
2# Copyright (C) 2007 OpenedHand Ltd
3#
4
5SUMMARY = "Host packages for the standalone SDK or external toolchain"
6PR = "r11"
7LICENSE = "MIT"
8
9inherit nativesdk packagegroup
10
11PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
12
13RDEPENDS_${PN} = "\
14 nativesdk-pkgconfig \
15 nativesdk-qemu \
16 nativesdk-qemu-helper \
17 nativesdk-pseudo \
18 nativesdk-unfs-server \
19 nativesdk-opkg \
20 nativesdk-libtool \
21 nativesdk-autoconf \
22 nativesdk-automake \
23 nativesdk-shadow \
24 nativesdk-makedevs \
25 "
26
27RDEPENDS_${PN}_darwin = "\
28 odcctools-cross-canadian \
29 llvm-cross-canadian \
30 nativesdk-pkgconfig \
31 nativesdk-opkg \
32 nativesdk-libtool \
33 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb
new file mode 100644
index 0000000000..1c0c7571c2
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -0,0 +1,372 @@
1DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
2LICENSE = "MIT"
3PR = "r76"
4
5inherit packagegroup
6
7PROVIDES = "${PACKAGES}"
8PACKAGES = ' \
9 packagegroup-base \
10 packagegroup-base-extended \
11 packagegroup-distro-base \
12 packagegroup-machine-base \
13 \
14 ${@base_contains("MACHINE_FEATURES", "acpi", "packagegroup-base-acpi", "",d)} \
15 ${@base_contains("MACHINE_FEATURES", "alsa", "packagegroup-base-alsa", "", d)} \
16 ${@base_contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \
17 ${@base_contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \
18 ${@base_contains("MACHINE_FEATURES", "vfat", "packagegroup-base-vfat", "", d)} \
19 ${@base_contains("MACHINE_FEATURES", "irda", "packagegroup-base-irda", "",d)} \
20 ${@base_contains("MACHINE_FEATURES", "keyboard", "packagegroup-base-keyboard", "", d)} \
21 ${@base_contains("MACHINE_FEATURES", "pci", "packagegroup-base-pci", "",d)} \
22 ${@base_contains("MACHINE_FEATURES", "pcmcia", "packagegroup-base-pcmcia", "", d)} \
23 ${@base_contains("MACHINE_FEATURES", "phone", "packagegroup-base-phone", "", d)} \
24 ${@base_contains("MACHINE_FEATURES", "serial", "packagegroup-base-serial", "", d)} \
25 ${@base_contains("MACHINE_FEATURES", "usbgadget", "packagegroup-base-usbgadget", "", d)} \
26 ${@base_contains("MACHINE_FEATURES", "usbhost", "packagegroup-base-usbhost", "", d)} \
27 \
28 ${@base_contains("DISTRO_FEATURES", "bluetooth", "packagegroup-base-bluetooth", "", d)} \
29 ${@base_contains("DISTRO_FEATURES", "wifi", "packagegroup-base-wifi", "", d)} \
30 ${@base_contains("DISTRO_FEATURES", "3g", "packagegroup-base-3g", "", d)} \
31 ${@base_contains("DISTRO_FEATURES", "nfc", "packagegroup-base-nfc", "", d)} \
32 ${@base_contains("DISTRO_FEATURES", "cramfs", "packagegroup-base-cramfs", "", d)} \
33 ${@base_contains("DISTRO_FEATURES", "ipsec", "packagegroup-base-ipsec", "", d)} \
34 ${@base_contains("DISTRO_FEATURES", "ipv6", "packagegroup-base-ipv6", "", d)} \
35 ${@base_contains("DISTRO_FEATURES", "nfs", "packagegroup-base-nfs", "", d)} \
36 ${@base_contains("DISTRO_FEATURES", "ppp", "packagegroup-base-ppp", "", d)} \
37 ${@base_contains("DISTRO_FEATURES", "smbfs", "packagegroup-base-smbfs", "", d)} \
38 ${@base_contains("DISTRO_FEATURES", "zeroconf", "packagegroup-base-zeroconf", "", d)} \
39 \
40 '
41
42#
43# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
44#
45PACKAGE_ARCH = "${MACHINE_ARCH}"
46
47# Override by distro if needed
48VIRTUAL-RUNTIME_keymaps ?= "keymaps"
49
50#
51# packagegroup-base contain stuff needed for base system (machine related)
52#
53RDEPENDS_packagegroup-base = "\
54 packagegroup-distro-base \
55 packagegroup-machine-base \
56 \
57 sysfsutils \
58 module-init-tools \
59 ${@base_contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \
60 ${@base_contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
61 ${@base_contains('MACHINE_FEATURES', 'keyboard', 'packagegroup-base-keyboard', '',d)} \
62 ${@base_contains('MACHINE_FEATURES', 'phone', 'packagegroup-base-phone', '',d)} \
63 \
64 ${@base_contains('COMBINED_FEATURES', 'alsa', 'packagegroup-base-alsa', '',d)} \
65 ${@base_contains('COMBINED_FEATURES', 'ext2', 'packagegroup-base-ext2', '',d)} \
66 ${@base_contains('COMBINED_FEATURES', 'vfat', 'packagegroup-base-vfat', '',d)} \
67 ${@base_contains('COMBINED_FEATURES', 'irda', 'packagegroup-base-irda', '',d)} \
68 ${@base_contains('COMBINED_FEATURES', 'pci', 'packagegroup-base-pci', '',d)} \
69 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'packagegroup-base-pcmcia', '',d)} \
70 ${@base_contains('COMBINED_FEATURES', 'usbgadget', 'packagegroup-base-usbgadget', '',d)} \
71 ${@base_contains('COMBINED_FEATURES', 'usbhost', 'packagegroup-base-usbhost', '',d)} \
72 ${@base_contains('COMBINED_FEATURES', 'bluetooth', 'packagegroup-base-bluetooth', '',d)} \
73 ${@base_contains('COMBINED_FEATURES', 'wifi', 'packagegroup-base-wifi', '',d)} \
74 ${@base_contains('COMBINED_FEATURES', '3g', 'packagegroup-base-3g', '',d)} \
75 ${@base_contains('COMBINED_FEATURES', 'nfc', 'packagegroup-base-nfc', '',d)} \
76 \
77 ${@base_contains('DISTRO_FEATURES', 'nfs', 'packagegroup-base-nfs', '',d)} \
78 ${@base_contains('DISTRO_FEATURES', 'cramfs', 'packagegroup-base-cramfs', '',d)} \
79 ${@base_contains('DISTRO_FEATURES', 'smbfs', 'packagegroup-base-smbfs', '',d)} \
80 ${@base_contains('DISTRO_FEATURES', 'ipv6', 'packagegroup-base-ipv6', '',d)} \
81 ${@base_contains('DISTRO_FEATURES', 'ipsec', 'packagegroup-base-ipsec', '',d)} \
82 ${@base_contains('DISTRO_FEATURES', 'ppp', 'packagegroup-base-ppp', '',d)} \
83 ${@base_contains('DISTRO_FEATURES', 'zeroconf', 'packagegroup-base-zeroconf', '',d)} \
84 "
85
86
87RRECOMMENDS_packagegroup-base = "\
88 kernel-module-nls-utf8 \
89 kernel-module-input \
90 kernel-module-uinput \
91 kernel-module-rtc-dev \
92 kernel-module-rtc-proc \
93 kernel-module-rtc-sysfs \
94 kernel-module-unix"
95
96RDEPENDS_packagegroup-base-extended = "\
97 packagegroup-base \
98 ${ADD_WIFI} \
99 ${ADD_BT} \
100 ${ADD_3G} \
101 ${ADD_NFC} \
102 "
103
104ADD_WIFI = ""
105ADD_BT = ""
106ADD_3G = ""
107ADD_NFC = ""
108
109python __anonymous () {
110 # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
111 # then include packagegroup-base-wifi in packagegroup-base
112
113 distro_features = set(d.getVar("DISTRO_FEATURES", True).split())
114 machine_features= set(d.getVar("MACHINE_FEATURES", True).split())
115
116 if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
117 d.setVar("ADD_BT", "packagegroup-base-bluetooth")
118
119 if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
120 d.setVar("ADD_WIFI", "packagegroup-base-wifi")
121
122 if "3g" in distro_features and not "3g" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
123 d.setVar("ADD_3G", "packagegroup-base-3g")
124
125 if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features):
126 d.setVar("ADD_NFC", "packagegroup-base-nfc")
127
128 # For backwards compatibility after rename
129 packages = d.getVar("PACKAGES", True).split()
130 for pkg in packages:
131 d.appendVar("RPROVIDES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
132 d.appendVar("RREPLACES_%s" % pkg, pkg.replace("packagegroup-", "task-"))
133 d.appendVar("RCONFLICTS_%s" % pkg, pkg.replace("packagegroup-", "task-"))
134}
135
136#
137# packages added by distribution
138#
139SUMMARY_packagegroup-distro-base = "${DISTRO} extras"
140DEPENDS_packagegroup-distro-base = "${DISTRO_EXTRA_DEPENDS}"
141RDEPENDS_packagegroup-distro-base = "${DISTRO_EXTRA_RDEPENDS}"
142RRECOMMENDS_packagegroup-distro-base = "${DISTRO_EXTRA_RRECOMMENDS}"
143
144#
145# packages added by machine config
146#
147SUMMARY_packagegroup-machine-base = "${MACHINE} extras"
148DESCRIPTION_packagegroup-machine-base = "Extra packages required to fully support ${MACHINE} hardware"
149RDEPENDS_packagegroup-machine-base = "${MACHINE_EXTRA_RDEPENDS}"
150RRECOMMENDS_packagegroup-machine-base = "${MACHINE_EXTRA_RRECOMMENDS}"
151
152SUMMARY_packagegroup-base-keyboard = "Keyboard support"
153RDEPENDS_packagegroup-base-keyboard = "\
154 ${VIRTUAL-RUNTIME_keymaps}"
155
156SUMMARY_packagegroup-base-pci = "PCI bus support"
157RDEPENDS_packagegroup-base-pci = "\
158 pciutils"
159
160SUMMARY_packagegroup-base-acpi = "ACPI support"
161RDEPENDS_packagegroup-base-acpi = "\
162 acpid \
163 libacpi "
164
165SUMMARY_packagegroup-base-apm = "APM support"
166RDEPENDS_packagegroup-base-apm = "\
167 ${VIRTUAL-RUNTIME_apm} \
168 apmd"
169
170SUMMARY_packagegroup-base-ext2 = "ext2 filesystem support"
171RDEPENDS_packagegroup-base-ext2 = "\
172 hdparm \
173 e2fsprogs \
174 e2fsprogs-e2fsck \
175 e2fsprogs-mke2fs"
176
177SUMMARY_packagegroup-base-vfat = "FAT filesystem support"
178RRECOMMENDS_packagegroup-base-vfat = "\
179 kernel-module-msdos \
180 kernel-module-vfat \
181 kernel-module-nls-iso8859-1 \
182 kernel-module-nls-cp437 \
183 dosfstools"
184
185SUMMARY_packagegroup-base-alsa = "ALSA sound support"
186RDEPENDS_packagegroup-base-alsa = "\
187 alsa-utils-alsactl \
188 alsa-utils-alsamixer \
189 ${VIRTUAL-RUNTIME_alsa-state}"
190
191RRECOMMENDS_packagegroup-base-alsa = "\
192 kernel-module-snd-mixer-oss \
193 kernel-module-snd-pcm-oss"
194
195SUMMARY_packagegroup-base-pcmcia = "PC card slot support"
196RDEPENDS_packagegroup-base-pcmcia = "\
197 pcmciautils \
198 "
199
200RRECOMMENDS_packagegroup-base-pcmcia = "\
201 kernel-module-pcmcia \
202 kernel-module-airo-cs \
203 kernel-module-pcnet-cs \
204 kernel-module-serial-cs \
205 kernel-module-ide-cs \
206 kernel-module-ide-disk \
207 ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \
208 ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-orinoco-cs', '',d)} \
209 ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}"
210
211SUMMARY_packagegroup-base-bluetooth = "Bluetooth support"
212RDEPENDS_packagegroup-base-bluetooth = "\
213 bluez4 \
214 ${@base_contains('COMBINED_FEATURES', 'alsa', 'libasound-module-bluez', '',d)} \
215 "
216
217RRECOMMENDS_packagegroup-base-bluetooth = "\
218 kernel-module-bluetooth \
219 kernel-module-l2cap \
220 kernel-module-rfcomm \
221 kernel-module-hci-vhci \
222 kernel-module-bnep \
223 kernel-module-hidp \
224 kernel-module-hci-uart \
225 kernel-module-sco \
226 ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-hci-usb', '',d)} \
227 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetooth3c-cs', '',d)} \
228 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluecard-cs', '',d)} \
229 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetoothuart-cs', '',d)} \
230 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \
231 "
232
233SUMMARY_packagegroup-base-irda = "IrDA support"
234RDEPENDS_packagegroup-base-irda = "\
235 irda-utils"
236
237RRECOMMENDS_packagegroup-base-irda = "\
238 kernel-module-pxaficp-ir \
239 kernel-module-irda \
240 kernel-module-ircomm \
241 kernel-module-ircomm-tty \
242 kernel-module-irlan \
243 ${@base_contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \
244 kernel-module-irport \
245 kernel-module-irtty \
246 kernel-module-irtty-sir \
247 kernel-module-sir-dev \
248 ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} "
249
250SUMMARY_packagegroup-base-usbgadget = "USB gadget support"
251RRECOMMENDS_packagegroup-base-usbgadget = "\
252 kernel-module-pxa27x_udc \
253 kernel-module-gadgetfs \
254 kernel-module-g-file-storage \
255 kernel-module-g-serial \
256 kernel-module-g-ether"
257
258SUMMARY_packagegroup-base-usbhost = "USB host support"
259RDEPENDS_packagegroup-base-usbhost = "\
260 usbutils "
261
262RRECOMMENDS_packagegroup-base-usbhost = "\
263 kernel-module-uhci-hcd \
264 kernel-module-ohci-hcd \
265 kernel-module-ehci-hcd \
266 kernel-module-usbcore \
267 kernel-module-usbhid \
268 kernel-module-usbnet \
269 kernel-module-sd-mod \
270 kernel-module-scsi-mod \
271 kernel-module-usbmouse \
272 kernel-module-mousedev \
273 kernel-module-usbserial \
274 kernel-module-usb-storage "
275
276SUMMARY_packagegroup-base-ppp = "PPP dial-up protocol support"
277RDEPENDS_packagegroup-base-ppp = "\
278 ppp \
279 ppp-dialin"
280
281RRECOMMENDS_packagegroup-base-ppp = "\
282 kernel-module-ppp-async \
283 kernel-module-ppp-deflate \
284 kernel-module-ppp-generic \
285 kernel-module-ppp-mppe \
286 kernel-module-slhc"
287
288SUMMARY_packagegroup-base-ipsec = "IPSEC support"
289RDEPENDS_packagegroup-base-ipsec = "\
290 "
291
292RRECOMMENDS_packagegroup-base-ipsec = "\
293 kernel-module-ipsec"
294
295#
296# packagegroup-base-wifi contain everything needed to get WiFi working
297# WEP/WPA connection needs to be supported out-of-box
298#
299SUMMARY_packagegroup-base-wifi = "WiFi support"
300RDEPENDS_packagegroup-base-wifi = "\
301 wireless-tools \
302 ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \
303 ${@base_contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \
304 wpa-supplicant"
305
306RRECOMMENDS_packagegroup-base-wifi = "\
307 ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-zd1211rw', '',d)} \
308 kernel-module-ieee80211-crypt \
309 kernel-module-ieee80211-crypt-ccmp \
310 kernel-module-ieee80211-crypt-tkip \
311 kernel-module-ieee80211-crypt-wep \
312 kernel-module-ecb \
313 kernel-module-arc4 \
314 kernel-module-crypto_algapi \
315 kernel-module-cryptomgr \
316 kernel-module-michael-mic \
317 kernel-module-aes-generic \
318 kernel-module-aes"
319
320SUMMARY_packagegroup-base-nfc = "Near Field Communication support"
321RDEPENDS_packagegroup-base-nfc = "\
322 neard"
323
324RRECOMMENDS_packagegroup-base-nfc = "\
325 kernel-module-nfc"
326
327SUMMARY_packagegroup-base-3g = "Cellular data support"
328RDEPENDS_packagegroup-base-3g = "\
329 ofono"
330
331RRECOMMENDS_packagegroup-base-3g = "\
332 kernel-module-cdc-acm \
333 kernel-module-cdc-wdm"
334
335SUMMARY_packagegroup-base-smbfs = "SMB network filesystem support"
336RRECOMMENDS_packagegroup-base-smbfs = "\
337 kernel-module-cifs \
338 kernel-module-smbfs"
339
340SUMMARY_packagegroup-base-cramfs = "cramfs filesystem support"
341RRECOMMENDS_packagegroup-base-cramfs = "\
342 kernel-module-cramfs"
343
344#
345# packagegroup-base-nfs provides ONLY client support - server is in nfs-utils package
346#
347SUMMARY_packagegroup-base-nfs = "NFS network filesystem support"
348RDEPENDS_packagegroup-base-nfs = "\
349 rpcbind"
350
351RRECOMMENDS_packagegroup-base-nfs = "\
352 kernel-module-nfs "
353
354SUMMARY_packagegroup-base-zeroconf = "Zeroconf support"
355RDEPENDS_packagegroup-base-zeroconf = "\
356 avahi-daemon"
357
358SUMMARY_packagegroup-base-ipv6 = "IPv6 support"
359RDEPENDS_packagegroup-base-ipv6 = "\
360 "
361
362RRECOMMENDS_packagegroup-base-ipv6 = "\
363 kernel-module-ipv6 "
364
365SUMMARY_packagegroup-base-serial = "Serial port support"
366RDEPENDS_packagegroup-base-serial = "\
367 setserial \
368 lrzsz "
369
370SUMMARY_packagegroup-base-phone = "Cellular telephony (voice) support"
371RDEPENDS_packagegroup-base-phone = "\
372 ofono"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
new file mode 100644
index 0000000000..486385aa70
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -0,0 +1,53 @@
1#
2# Copyright (C) 2007 OpenedHand Ltd.
3#
4
5SUMMARY = "Minimal boot requirements"
6DESCRIPTION = "The minimal set of packages required to boot the system"
7LICENSE = "MIT"
8DEPENDS = "virtual/kernel"
9PR = "r11"
10
11inherit packagegroup
12
13PACKAGE_ARCH = "${MACHINE_ARCH}"
14
15#
16# Set by the machine configuration with packages essential for device bootup
17#
18MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
19MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
20
21# For backwards compatibility after rename
22RPROVIDES_${PN} = "task-core-boot"
23RREPLACES_${PN} = "task-core-boot"
24RCONFLICTS_${PN} = "task-core-boot"
25
26# Distro can override the following VIRTUAL-RUNTIME providers:
27VIRTUAL-RUNTIME_dev_manager ?= "udev"
28VIRTUAL-RUNTIME_login_manager ?= "busybox"
29VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
30VIRTUAL-RUNTIME_initscripts ?= "initscripts"
31VIRTUAL-RUNTIME_keymaps ?= "keymaps"
32
33SYSVINIT_SCRIPTS = "${@base_contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
34 modutils-initscripts \
35 init-ifupdown \
36 "
37
38RDEPENDS_${PN} = "\
39 base-files \
40 base-passwd \
41 busybox \
42 ${@base_contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
43 ${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
44 netbase \
45 ${VIRTUAL-RUNTIME_login_manager} \
46 ${VIRTUAL-RUNTIME_init_manager} \
47 ${VIRTUAL-RUNTIME_initscripts} \
48 ${VIRTUAL-RUNTIME_dev_manager} \
49 ${VIRTUAL-RUNTIME_update-alternatives} \
50 ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
51
52RRECOMMENDS_${PN} = "\
53 ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb b/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
new file mode 100644
index 0000000000..164da36686
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
@@ -0,0 +1,30 @@
1#
2# Copyright (C) 2007 OpenedHand Ltd.
3# Copyright (C) 2012 Red Hat, Inc.
4#
5
6SUMMARY = "Essential build dependencies"
7LICENSE = "MIT"
8PR = "r0"
9
10inherit packagegroup
11
12RDEPENDS_packagegroup-core-buildessential = "\
13 autoconf \
14 automake \
15 binutils \
16 binutils-symlinks \
17 cpp \
18 cpp-symlinks \
19 gcc \
20 gcc-symlinks \
21 g++ \
22 g++-symlinks \
23 gettext \
24 make \
25 libstdc++ \
26 libstdc++-dev \
27 libtool \
28 pkgconfig \
29 "
30
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb b/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb
new file mode 100644
index 0000000000..e7b013d406
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb
@@ -0,0 +1,10 @@
1SUMMARY = "Remote debugging tools for Eclipse integration"
2LICENSE = "MIT"
3
4inherit packagegroup
5
6RDEPENDS_${PN} = "\
7 gdbserver \
8 tcf-agent \
9 openssh-sftp-server \
10 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
new file mode 100644
index 0000000000..531eceb5af
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
@@ -0,0 +1,22 @@
1#
2# Copyright (C) 2008 OpenedHand Ltd.
3#
4
5DESCRIPTION = "NFS package groups"
6LICENSE = "MIT"
7PR = "r2"
8
9inherit packagegroup
10
11PACKAGES = "${PN}-server"
12
13# For backwards compatibility after rename
14RPROVIDES_${PN}-server = "task-core-nfs-server"
15RREPLACES_${PN}-server = "task-core-nfs-server"
16RCONFLICTS_${PN}-server = "task-core-nfs-server"
17
18SUMMARY_${PN}-server = "NFS server"
19RDEPENDS_${PN}-server = "\
20 nfs-utils \
21 nfs-utils-client \
22 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
new file mode 100644
index 0000000000..172398929c
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -0,0 +1,77 @@
1#
2# Copyright (C) 2007 OpenedHand Ltd.
3#
4
5SUMMARY = "Software development tools"
6LICENSE = "MIT"
7PR = "r9"
8
9inherit packagegroup
10
11#PACKAGEFUNCS =+ 'generate_sdk_pkgs'
12
13# For backwards compatibility after rename
14RPROVIDES_packagegroup-core-sdk = "task-core-sdk"
15RREPLACES_packagegroup-core-sdk = "task-core-sdk"
16RCONFLICTS_packagegroup-core-sdk = "task-core-sdk"
17
18RDEPENDS_packagegroup-core-sdk = "\
19 packagegroup-core-buildessential \
20 coreutils \
21 ccache \
22 diffutils \
23 intltool \
24 perl-module-re \
25 perl-module-text-wrap \
26 findutils \
27 quilt \
28 less \
29 distcc \
30 ldd \
31 file \
32 tcl"
33
34RRECOMMENDS_packagegroup-core-sdk = "\
35 libgomp \
36 libgomp-dev"
37
38#python generate_sdk_pkgs () {
39# poky_pkgs = read_pkgdata('packagegroup-core', d)['PACKAGES']
40# pkgs = d.getVar('PACKAGES', True).split()
41# for pkg in poky_pkgs.split():
42# newpkg = pkg.replace('packagegroup-core', 'packagegroup-core-sdk')
43#
44# # for each of the task packages, add a corresponding sdk task
45# pkgs.append(newpkg)
46#
47# # for each sdk task, take the rdepends of the non-sdk task, and turn
48# # that into rrecommends upon the -dev versions of those, not unlike
49# # the package depchain code
50# spkgdata = read_subpkgdata(pkg, d)
51#
52# rdepends = explode_deps(spkgdata.get('RDEPENDS_%s' % pkg) or '')
53# rreclist = []
54#
55# for depend in rdepends:
56# split_depend = depend.split(' (')
57# name = split_depend[0].strip()
58# if packaged('%s-dev' % name, d):
59# rreclist.append('%s-dev' % name)
60# else:
61# deppkgdata = read_subpkgdata(name, d)
62# rdepends2 = explode_deps(deppkgdata.get('RDEPENDS_%s' % name) or '')
63# for depend in rdepends2:
64# split_depend = depend.split(' (')
65# name = split_depend[0].strip()
66# if packaged('%s-dev' % name, d):
67# rreclist.append('%s-dev' % name)
68#
69# oldrrec = d.getVar('RRECOMMENDS_%s' % newpkg) or ''
70# d.setVar('RRECOMMENDS_%s' % newpkg, oldrrec + ' ' + ' '.join(rreclist))
71# # bb.note('RRECOMMENDS_%s = "%s"' % (newpkg, d.getVar('RRECOMMENDS_%s' % newpkg)))
72#
73# # bb.note('pkgs is %s' % pkgs)
74# d.setVar('PACKAGES', ' '.join(pkgs))
75#}
76#
77#PACKAGES_DYNAMIC += "^packagegroup-core-sdk-.*"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
new file mode 100644
index 0000000000..458d8fa036
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
@@ -0,0 +1,12 @@
1SUMMARY = "Dropbear SSH client/server"
2LICENSE = "MIT"
3PR = "r1"
4
5inherit packagegroup
6
7# For backwards compatibility after rename
8RPROVIDES_${PN} = "task-core-ssh-dropbear"
9RREPLACES_${PN} = "task-core-ssh-dropbear"
10RCONFLICTS_${PN} = "task-core-ssh-dropbear"
11
12RDEPENDS_${PN} = "dropbear"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
new file mode 100644
index 0000000000..df70962912
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
@@ -0,0 +1,12 @@
1SUMMARY = "OpenSSH SSH client/server"
2LICENSE = "MIT"
3PR = "r1"
4
5inherit packagegroup
6
7# For backwards compatibility after rename
8RPROVIDES_${PN} = "task-core-ssh-openssh"
9RREPLACES_${PN} = "task-core-ssh-openssh"
10RCONFLICTS_${PN} = "task-core-ssh-openssh"
11
12RDEPENDS_${PN} = "openssh"
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
new file mode 100644
index 0000000000..c8b5623bf5
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Target packages for the standalone SDK"
2PR = "r8"
3LICENSE = "MIT"
4
5inherit packagegroup
6
7# For backwards compatibility after rename
8RPROVIDES_${PN} = "task-core-standalone-sdk-target"
9RREPLACES_${PN} = "task-core-standalone-sdk-target"
10RCONFLICTS_${PN} = "task-core-standalone-sdk-target"
11RPROVIDES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
12RREPLACES_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
13RCONFLICTS_${PN}-dbg = "task-core-standalone-sdk-target-dbg"
14
15RDEPENDS_${PN} = "\
16 libgcc \
17 libgcc-dev \
18 libstdc++ \
19 libstdc++-dev \
20 ${LIBC_DEPENDENCIES} \
21 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
new file mode 100644
index 0000000000..f72aae4c9d
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
@@ -0,0 +1,27 @@
1#
2# Copyright (C) 2008 OpenedHand Ltd.
3#
4
5SUMMARY = "Debugging tools"
6LICENSE = "MIT"
7
8inherit packagegroup
9
10PR = "r2"
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14# For backwards compatibility after rename
15RPROVIDES_${PN} = "task-core-tools-debug"
16RREPLACES_${PN} = "task-core-tools-debug"
17RCONFLICTS_${PN} = "task-core-tools-debug"
18
19MTRACE = ""
20MTRACE_libc-glibc = "libc-mtrace"
21
22RDEPENDS_${PN} = "\
23 gdb \
24 gdbserver \
25 strace \
26 ${MTRACE} \
27 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
new file mode 100644
index 0000000000..9eb1458baa
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -0,0 +1,83 @@
1#
2# Copyright (C) 2008 OpenedHand Ltd.
3#
4
5SUMMARY = "Profiling tools"
6LICENSE = "MIT"
7
8PR = "r3"
9
10inherit packagegroup
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14# For backwards compatibility after rename
15RPROVIDES_${PN} = "task-core-tools-profile"
16RREPLACES_${PN} = "task-core-tools-profile"
17RCONFLICTS_${PN} = "task-core-tools-profile"
18
19PROFILE_TOOLS_X = "${@base_contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
20
21RRECOMMENDS_${PN} = "\
22 perf \
23 trace-cmd \
24 kernel-module-oprofile \
25 blktrace \
26 ${PROFILE_TOOLS_X} \
27 "
28
29PROFILETOOLS = "\
30 oprofile \
31 oprofileui-server \
32 powertop \
33 latencytop \
34 "
35
36# systemtap needs elfutils which is not fully buildable on uclibc
37# hence we exclude it from uclibc based builds
38SYSTEMTAP = "systemtap"
39SYSTEMTAP_libc-uclibc = ""
40SYSTEMTAP_mips = ""
41SYSTEMTAP_mips64 = ""
42SYSTEMTAP_aarch64 = ""
43
44# lttng-ust uses sched_getcpu() which is not there on uclibc
45# for some of the architectures it can be patched to call the
46# syscall directly but for x86_64 __NR_getcpu is a vsyscall
47# which means we can not use syscall() to call it. So we ignore
48# it for x86_64/uclibc
49
50LTTNGUST = "lttng-ust"
51LTTNGUST_libc-uclibc = ""
52LTTNGUST_aarch64 = ""
53
54LTTNGTOOLS = "lttng-tools"
55LTTNGTOOLS_aarch64 = ""
56
57LTTNGMODULES = "lttng-modules"
58LTTNGMODULES_aarch64 = ""
59
60BABELTRACE = "babeltrace"
61BABELTRACE_aarch64 = ""
62
63# valgrind does not work on mips
64
65VALGRIND = "valgrind"
66VALGRIND_libc-uclibc = ""
67VALGRIND_mips = ""
68VALGRIND_mips64 = ""
69VALGRIND_arm = ""
70VALGRIND_aarch64 = ""
71
72# exmap-console
73# exmap-server
74
75RDEPENDS_${PN} = "\
76 ${PROFILETOOLS} \
77 ${LTTNGUST} \
78 ${LTTNGTOOLS} \
79 ${LTTNGMODULES} \
80 ${BABELTRACE} \
81 ${SYSTEMTAP} \
82 ${VALGRIND} \
83 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
new file mode 100644
index 0000000000..1861ebea4c
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -0,0 +1,51 @@
1#
2# Copyright (C) 2008 OpenedHand Ltd.
3#
4
5SUMMARY = "Testing tools/applications"
6LICENSE = "MIT"
7
8PR = "r2"
9
10inherit packagegroup
11
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14# For backwards compatibility after rename
15RPROVIDES_${PN} = "task-core-tools-testapps"
16RREPLACES_${PN} = "task-core-tools-testapps"
17RCONFLICTS_${PN} = "task-core-tools-testapps"
18
19# kexec-tools doesn't work on Mips
20KEXECTOOLS ?= "kexec"
21KEXECTOOLS_mips ?= ""
22KEXECTOOLS_mipsel ?= ""
23KEXECTOOLS_powerpc ?= ""
24KEXECTOOLS_e5500-64b ?= ""
25KEXECTOOLS_aarch64 ?= ""
26
27X11TOOLS = "\
28 fstests \
29 owl-video \
30 mesa-demos \
31 x11perf \
32 xrestop \
33 xwininfo \
34 xprop \
35 xvideo-tests \
36 "
37
38RDEPENDS_${PN} = "\
39 blktool \
40 tslib-calibrate \
41 tslib-tests \
42 lrzsz \
43 ${KEXECTOOLS} \
44 alsa-utils-amixer \
45 alsa-utils-aplay \
46 gst-meta-video \
47 gst-meta-audio \
48 ltp \
49 connman-client \
50 ${@base_contains('DISTRO_FEATURES', 'x11', "${X11TOOLS}", "", d)} \
51 "
diff --git a/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
new file mode 100644
index 0000000000..064edfb653
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Host SDK package for cross canadian toolchain"
2PN = "packagegroup-cross-canadian-${MACHINE}"
3PR = "r0"
4LICENSE = "MIT"
5
6# Save TRANSLATED_TARGET_ARCH before allarch tramples it
7TRANSLATED_TARGET_ARCH = "${@d.getVar('TUNE_ARCH', True).replace('_', '-')}"
8
9inherit cross-canadian packagegroup
10
11PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
12
13RDEPENDS_${PN} = "\
14 binutils-cross-canadian-${@' binutils-cross-canadian-'.join(all_multilib_tune_values(d,'TRANSLATED_TARGET_ARCH').split())} \
15 gdb-cross-canadian-${@' gdb-cross-canadian-'.join(all_multilib_tune_values(d, 'TRANSLATED_TARGET_ARCH').split())} \
16 gcc-cross-canadian-${@' gcc-cross-canadian-'.join(all_multilib_tune_values(d, 'TRANSLATED_TARGET_ARCH').split())} \
17 meta-environment-${MACHINE} \
18 "
19
diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
new file mode 100644
index 0000000000..61c99bc40e
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -0,0 +1,226 @@
1#
2# Copyright (C) 2010 Intel Corporation
3#
4
5SUMMARY = "Self-hosting"
6DESCRIPTION = "Packages required to run the build system"
7PR = "r13"
8LICENSE = "MIT"
9
10inherit packagegroup
11
12PACKAGES = "\
13 packagegroup-self-hosted \
14 packagegroup-self-hosted-debug \
15 packagegroup-self-hosted-sdk \
16 packagegroup-self-hosted-extended \
17 packagegroup-self-hosted-graphics \
18 packagegroup-self-hosted-host-tools \
19 "
20
21RDEPENDS_packagegroup-self-hosted = "\
22 packagegroup-self-hosted-debug \
23 packagegroup-self-hosted-sdk \
24 packagegroup-self-hosted-extended \
25 packagegroup-self-hosted-graphics \
26 packagegroup-self-hosted-host-tools \
27 "
28
29RDEPENDS_packagegroup-self-hosted-host-tools = "\
30 connman \
31 connman-plugin-ethernet \
32 dhcp-client \
33 e2fsprogs \
34 e2fsprogs-e2fsck \
35 e2fsprogs-mke2fs \
36 e2fsprogs-tune2fs \
37 genext2fs \
38 hdparm \
39 iptables \
40 lsb \
41 xdg-utils \
42 mc \
43 mc-fish \
44 mc-helpers \
45 mc-helpers-perl \
46 mc-helpers-python \
47 leafpad \
48 midori \
49 pcmanfm \
50 parted \
51 pseudo \
52 screen \
53 vte \
54 "
55
56RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
57 kernel-module-tun \
58 kernel-module-iptable-raw \
59 kernel-module-iptable-nat \
60 kernel-module-iptable-mangle \
61 kernel-module-iptable-filter \
62 "
63
64# eglibc-utils: for rpcgen
65RDEPENDS_packagegroup-self-hosted-sdk = "\
66 autoconf \
67 automake \
68 binutils \
69 binutils-symlinks \
70 ccache \
71 coreutils \
72 cpp \
73 cpp-symlinks \
74 distcc \
75 eglibc-utils \
76 eglibc-gconv-ibm850 \
77 file \
78 findutils \
79 g++ \
80 g++-symlinks \
81 gcc \
82 gcc-symlinks \
83 intltool \
84 ldd \
85 less \
86 libssp \
87 libssp-dev \
88 libssp-staticdev \
89 libstdc++ \
90 libstdc++-dev \
91 libtool \
92 make \
93 mktemp \
94 perl-module-re \
95 perl-module-text-wrap \
96 pkgconfig \
97 quilt \
98 sed \
99 "
100
101RDEPENDS_packagegroup-self-hosted-debug = " \
102 gdb \
103 gdbserver \
104 rsync \
105 strace \
106 tcf-agent"
107
108
109RDEPENDS_packagegroup-self-hosted-extended = "\
110 bzip2 \
111 chkconfig \
112 chrpath \
113 cpio \
114 curl \
115 diffstat \
116 diffutils \
117 elfutils \
118 expat \
119 gamin \
120 gawk \
121 gdbm \
122 gettext \
123 gettext-runtime \
124 git \
125 grep \
126 groff \
127 gzip \
128 settings-daemon \
129 hicolor-icon-theme \
130 sato-icon-theme \
131 libaio \
132 libusb1 \
133 libxml2 \
134 lrzsz \
135 lsof \
136 lzo \
137 man \
138 man-pages \
139 mdadm \
140 minicom \
141 mtools \
142 ncurses \
143 ncurses-terminfo-base \
144 neon \
145 nfs-utils \
146 nfs-utils-client \
147 openssl \
148 openssh-sftp-server \
149 opkg \
150 opkg-utils \
151 patch \
152 perl \
153 perl-dev \
154 perl-modules \
155 perl-pod \
156 ${PTH} \
157 python \
158 python-compile \
159 python-compiler \
160 python-compression \
161 python-core \
162 python-curses \
163 python-datetime \
164 python-difflib \
165 python-distutils \
166 python-elementtree \
167 python-email \
168 python-fcntl \
169 python-git \
170 python-json \
171 python-logging \
172 python-misc \
173 python-mmap \
174 python-multiprocessing \
175 python-netclient \
176 python-netserver \
177 python-pickle \
178 python-pkgutil \
179 python-pprint \
180 python-re \
181 python-rpm \
182 python-shell \
183 python-sqlite3 \
184 python-subprocess \
185 python-textutils \
186 python-unittest \
187 python-unixadmin \
188 python-xmlrpc \
189 quota \
190 readline \
191 rpm \
192 setserial \
193 socat \
194 subversion \
195 sudo \
196 sysstat \
197 tar \
198 tcl \
199 texi2html \
200 texinfo \
201 unzip \
202 usbutils \
203 watchdog \
204 wget \
205 which \
206 xinetd \
207 zip \
208 zlib \
209 xz \
210 "
211
212
213RDEPENDS_packagegroup-self-hosted-graphics = "\
214 builder \
215 libgl \
216 libgl-dev \
217 libglu \
218 libglu-dev \
219 libsdl \
220 libsdl-dev \
221 libx11-dev \
222 python-pygtk \
223 gtk-theme-clearlooks \
224 "
225PTH = "pth"
226PTH_libc-uclibc = ""
diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init
new file mode 100755
index 0000000000..66c85e9335
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-init
@@ -0,0 +1,29 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: psplash
4# Required-Start:
5# Required-Stop:
6# Default-Start: S
7# Default-Stop:
8### END INIT INFO
9
10read CMDLINE < /proc/cmdline
11for x in $CMDLINE; do
12 case $x in
13 psplash=false)
14 echo "Boot splashscreen disabled"
15 exit 0;
16 ;;
17 esac
18done
19
20export TMPDIR=/mnt/.psplash
21mount tmpfs -t tmpfs $TMPDIR -o,size=40k
22
23rotation=0
24if [ -e /etc/rotation ]; then
25 read rotation < /etc/rotation
26fi
27
28/usr/bin/psplash --angle $rotation &
29
diff --git a/meta/recipes-core/psplash/files/psplash-poky-img.h b/meta/recipes-core/psplash/files/psplash-poky-img.h
new file mode 100644
index 0000000000..8d56aa0201
--- /dev/null
+++ b/meta/recipes-core/psplash/files/psplash-poky-img.h
@@ -0,0 +1,1259 @@
1/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */
2
3#define POKY_IMG_ROWSTRIDE (1920)
4#define POKY_IMG_WIDTH (640)
5#define POKY_IMG_HEIGHT (480)
6#define POKY_IMG_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */
7#define POKY_IMG_RLE_PIXEL_DATA ((uint8*) \
8 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
9 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
10 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
11 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
12 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
13 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
14 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
15 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
16 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
17 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
18 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
19 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
20 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
21 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
22 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
23 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
24 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
25 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
26 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
27 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
28 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
29 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
30 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
31 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
32 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
33 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
34 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
35 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
36 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
37 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
38 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
39 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
40 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
41 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
42 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
43 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
44 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
45 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
46 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
47 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
48 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
49 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
50 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
51 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
52 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
53 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
54 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
55 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
56 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
57 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
58 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
59 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
60 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
61 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
62 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
63 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
64 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
65 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
66 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
67 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
68 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
69 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
70 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
71 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
72 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
73 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
74 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
75 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
76 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
77 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
78 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
79 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
80 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
81 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
82 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
83 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
84 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
85 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
86 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
87 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
88 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
89 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
90 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
91 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
92 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
93 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
94 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
95 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
96 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
97 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
98 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
99 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
100 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
101 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
102 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
103 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
104 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
105 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
106 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
107 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
108 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
109 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
110 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
111 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
112 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
113 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
114 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
115 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
116 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
117 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
118 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
119 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
120 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
121 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
122 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
123 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
124 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
125 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
126 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
127 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
128 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
129 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
130 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
131 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
132 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
133 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
134 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
135 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
136 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
137 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
138 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
139 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
140 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
141 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
142 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
143 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
144 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
145 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
146 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
147 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
148 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
149 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
150 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
151 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
152 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
153 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
154 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
155 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
156 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
157 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
158 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
159 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
160 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
161 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
162 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
163 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
164 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
165 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
166 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
167 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
168 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
169 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
170 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
171 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
172 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
173 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
174 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
175 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
176 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
177 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
178 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
179 "\237\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377" \
180 "\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376" \
181 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
182 "\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377" \
183 "\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377" \
184 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376" \
185 "\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
186 "\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377" \
187 "\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361" \
188 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
189 "\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377" \
190 "\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374" \
191 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377" \
192 "\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377" \
193 "\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377" \
194 "\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374" \
195 "\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
196 "\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377" \
197 "\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377" \
198 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
199 "\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377" \
200 "\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377" \
201 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377" \
202 "\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
203 "\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377" \
204 "\377\377\377\377\377\377\377\223\377\377\377\363\376\377\374\3\373\375" \
205 "\372\360\366\370\353\360\363\202\347\355\357\5\346\354\356\347\355\357" \
206 "\351\356\360\360\366\370\371\373\370\363\376\377\374\377\377\377\377" \
207 "\377\377\377\377\377\377\377\377\223\377\377\377\353\376\377\374\10\356" \
208 "\363\366\324\331\333\277\304\306\252\262\272\227\237\247}\220\233p\203" \
209 "\216ew\202\212]oz\10dv\201n\201\214~\215\223\216\236\244\247\257\267" \
210 "\274\301\303\320\326\330\352\357\362\353\376\377\374\377\377\377\377" \
211 "\377\377\377\377\377\377\377\377\223\377\377\377\346\376\377\374\5\366" \
212 "\370\364\320\326\330\255\265\275\210\227\235j}\210\232]oz\5gy\204\204" \
213 "\223\231\250\260\270\314\321\324\355\362\365\346\376\377\374\377\377" \
214 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\342\376\377" \
215 "\374\5\373\375\372\327\334\337\253\263\273x\213\227^p{\243]oz\4q\204" \
216 "\217\242\252\262\320\326\330\365\372\375\342\376\377\374\377\377\377" \
217 "\377\377\377\377\377\377\377\377\377\223\377\377\377\337\376\377\374" \
218 "\4\371\373\370\317\324\327\225\245\253ew\202\252]oz\4bt\177\211\230\236" \
219 "\306\314\316\367\371\366\337\376\377\374\377\377\377\377\377\377\377" \
220 "\377\377\377\377\377\223\377\377\377\335\376\377\374\3\333\340\343\236" \
221 "\246\256fx\203\260]oz\3bt\177\225\235\245\320\326\330\335\376\377\374" \
222 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\332" \
223 "\376\377\374\3\367\371\366\276\303\305u\210\224\266]oz\3m\200\213\257" \
224 "\267\277\355\362\365\332\376\377\374\377\377\377\377\377\377\377\377" \
225 "\377\377\377\377\223\377\377\377\330\376\377\374\3\353\360\363\252\262" \
226 "\272fx\203\272]oz\3as~\230\250\256\342\347\352\330\376\377\374\377\377" \
227 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\326\376\377" \
228 "\374\3\352\357\362\236\246\256as~\276]oz\3^p{\216\236\244\341\346\351" \
229 "\326\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
230 "\377\377\377\324\376\377\374\3\354\361\364\246\256\266as~\302]oz\3^p" \
231 "{\227\237\247\346\354\356\324\376\377\374\377\377\377\377\377\377\377" \
232 "\377\377\377\377\377\223\377\377\377\322\376\377\374\3\372\374\371\265" \
233 "\276\306fx\203\306]oz\3as~\250\260\270\362\367\371\322\376\377\374\377" \
234 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\321\376" \
235 "\377\374\2\320\326\330p\203\216\312]oz\2hz\205\302\307\312\321\376\377" \
236 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
237 "\317\376\377\374\2\356\363\366\231\241\251\316]oz\2\204\223\231\345\352" \
238 "\355\317\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
239 "\223\377\377\377\316\376\377\374\2\311\316\321i{\206\320]oz\2bt\177\264" \
240 "\274\305\316\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
241 "\377\223\377\377\377\314\376\377\374\2\362\367\371\226\246\254\324]o" \
242 "z\2\206\225\233\353\360\363\314\376\377\374\377\377\377\377\377\377\377" \
243 "\377\377\377\377\377\223\377\377\377\313\376\377\374\2\334\342\344o\202" \
244 "\215\326]oz\2gy\204\315\322\325\313\376\377\374\377\377\377\377\377\377" \
245 "\377\377\377\377\377\377\223\377\377\377\312\376\377\374\2\302\307\312" \
246 "as~\330]oz\3^p{\254\264\274\373\375\372\311\376\377\374\377\377\377\377" \
247 "\377\377\377\377\377\377\377\377\223\377\377\377\310\376\377\374\2\372" \
248 "\374\371\236\246\256\334]oz\2\210\227\235\360\366\370\310\376\377\374" \
249 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\307" \
250 "\376\377\374\2\360\366\370\205\224\232\336]oz\2s\206\221\347\355\357" \
251 "\307\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
252 "\377\377\377\306\376\377\374\2\347\355\357t\207\222\340]oz\2i{\206\333" \
253 "\340\343\306\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
254 "\377\223\377\377\377\305\376\377\374\2\343\350\353j}\210\251]oz\7bt\177" \
255 "w\212\226\215\234\243\236\246\256\246\256\266\254\264\274\264\274\305" \
256 "\202\300\305\310\7\264\274\305\255\265\275\250\260\270\233\252\261\222" \
257 "\241\247~\215\223ew\202\251]oz\2cu\200\322\330\332\305\376\377\374\377" \
258 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\304\376" \
259 "\377\374\2\337\344\346i{\206\245]oz\5j}\210\230\240\250\270\300\311\322" \
260 "\330\332\351\356\360\220\376\377\374\5\354\361\364\326\333\335\300\305" \
261 "\310\236\246\256p\203\216\245]oz\2as~\316\323\326\304\376\377\374\377" \
262 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\303\376" \
263 "\377\374\2\335\343\345gy\204\242]oz\4ew\202\222\241\247\276\303\305\342" \
264 "\347\352\232\376\377\374\4\352\357\362\304\311\314\233\243\253j}\210" \
265 "\242]oz\2as~\313\320\322\303\376\377\374\377\377\377\377\377\377\377" \
266 "\377\377\377\377\377\223\377\377\377\302\376\377\374\2\341\346\351hz" \
267 "\205\240]oz\4_q|\211\230\236\307\315\317\370\372\367\240\376\377\374" \
268 "\4\373\375\372\320\326\330\231\241\251bt\177\240]oz\2as~\317\324\327" \
269 "\302\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
270 "\377\377\377\301\376\377\374\2\343\350\353i{\206\237]oz\3q\204\217\266" \
271 "\277\307\354\361\364\246\376\377\374\3\366\370\364\303\310\313\177\216" \
272 "\224\237]oz\2bt\177\325\332\334\301\376\377\374\377\377\377\377\377\377" \
273 "\377\377\377\377\377\377\223\377\377\377\300\376\377\374\2\355\362\365" \
274 "l\177\212\236]oz\3u\210\224\307\315\317\373\375\372\253\376\377\374\2" \
275 "\324\331\333\204\223\231\236]oz\2ew\202\341\346\351\300\376\377\374\377" \
276 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\277\376" \
277 "\377\374\2\365\372\375\177\216\224\235]oz\2~\215\223\315\322\325\260" \
278 "\376\377\374\2\331\336\341\211\230\236\235]oz\2l\177\212\353\360\363" \
279 "\277\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
280 "\377\377\377\277\376\377\374\1\214\233\242\234]oz\2i{\206\305\312\315" \
281 "\264\376\377\374\2\324\331\333q\204\217\234]oz\2u\210\224\367\371\366" \
282 "\276\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
283 "\377\377\377\276\376\377\374\1\257\267\277\233]oz\3^p{\242\252\262\362" \
284 "\367\371\266\376\377\374\3\372\374\371\261\271\302bt\177\233]oz\1\225" \
285 "\235\245\276\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
286 "\377\223\377\377\377\275\376\377\374\2\317\324\327^p{\232]oz\2w\212\226" \
287 "\335\343\345\272\376\377\374\2\351\356\360\211\230\236\233]oz\1\264\274" \
288 "\305\275\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
289 "\223\377\377\377\274\376\377\374\2\347\355\357ew\202\232]oz\2\242\252" \
290 "\262\371\373\370\225\376\377\374\10\336\367\374\262\355\370\220\343\361" \
291 "m\332\361G\317\353,\311\352(\307\350#\304\346\202\0\301\350\10\0\304" \
292 "\352(\307\350,\311\352B\314\347i\326\356\207\341\364\260\353\366\333" \
293 "\364\371\226\376\377\374\2\266\277\307as~\231]oz\2_q|\327\334\337\274" \
294 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
295 "\377\377\273\376\377\374\2\373\375\372}\220\233\231]oz\2ew\202\313\320" \
296 "\322\223\376\377\374\4\334\365\372\233\345\364M\323\357\0\304\352\222" \
297 "\25\274\344\4\0\301\350J\321\355\211\342\365\314\361\372\223\376\377" \
298 "\374\2\332\337\342m\200\213\231]oz\2l\177\212\360\366\370\273\376\377" \
299 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
300 "\273\376\377\374\1\257\267\277\231]oz\2x\213\227\347\355\357\221\376" \
301 "\377\374\3\336\367\374\206\340\363*\310\351\232\25\274\344\3#\304\346" \
302 "w\333\356\316\363\374\221\376\377\374\2\360\366\370\214\233\242\231]" \
303 "oz\1\227\237\247\273\376\377\374\377\377\377\377\377\377\377\377\377" \
304 "\377\377\377\223\377\377\377\272\376\377\374\2\335\343\345_q|\230]oz" \
305 "\2\210\227\235\364\371\374\217\376\377\374\3\370\376\377\256\350\364" \
306 "B\314\347\240\25\274\344\3*\310\351\233\345\364\367\375\377\217\376\377" \
307 "\374\2\373\375\372\242\252\262\231]oz\1\305\312\315\272\376\377\374\377" \
308 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\271\376" \
309 "\377\374\2\372\374\371w\212\226\230]oz\2\231\241\251\372\374\371\216" \
310 "\376\377\374\3\367\375\377\233\345\364(\307\350\244\25\274\344\3\0\302" \
311 "\351\206\340\363\356\373\374\217\376\377\374\1\257\267\277\230]oz\2h" \
312 "z\205\356\363\366\271\376\377\374\377\377\377\377\377\377\377\377\377" \
313 "\377\377\377\223\377\377\377\271\376\377\374\1\257\267\277\230]oz\1\246" \
314 "\256\266\217\376\377\374\2\237\350\367\0\304\352\250\25\274\344\3\0\276" \
315 "\345\207\341\364\370\376\377\216\376\377\374\2\277\304\306_q|\227]oz" \
316 "\1\231\241\251\271\376\377\374\377\377\377\377\377\377\377\377\377\377" \
317 "\377\377\223\377\377\377\270\376\377\374\2\346\354\356bt\177\227]oz\1" \
318 "\251\261\271\216\376\377\374\2\315\362\3731\313\354\254\25\274\344\2" \
319 "(\307\350\262\355\370\216\376\377\374\2\305\312\315^p{\227]oz\1\322\330" \
320 "\332\270\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
321 "\223\377\377\377\270\376\377\374\1\215\234\243\227]oz\1\233\252\261\215" \
322 "\376\377\374\3\367\375\377m\332\361\0\276\345\257\25\274\344\2L\322\356" \
323 "\356\373\374\215\376\377\374\1\274\301\303\227]oz\2t\207\222\373\375" \
324 "\372\267\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
325 "\223\377\377\377\267\376\377\374\1\325\332\334\227]oz\2\214\233\242\373" \
326 "\375\372\214\376\377\374\2\333\364\371,\311\352\262\25\274\344\2\0\304" \
327 "\352\301\356\366\215\376\377\374\1\252\262\272\227]oz\1\274\301\303\267" \
328 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
329 "\377\377\267\376\377\374\1v\211\225\226]oz\2\205\224\232\365\372\375" \
330 "\214\376\377\374\2\236\347\366\0\276\345\264\25\274\344\3\0\276\345\203" \
331 "\334\360\370\376\377\214\376\377\374\1\236\246\256\226]oz\2hz\205\362" \
332 "\367\371\266\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
333 "\377\223\377\377\377\266\376\377\374\1\307\315\317\226]oz\2n\201\214" \
334 "\360\366\370\214\376\377\374\1m\332\361\270\25\274\344\2I\320\354\366" \
335 "\373\376\213\376\377\374\2\373\375\372\203\222\230\226]oz\1\254\264\274" \
336 "\266\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
337 "\377\377\377\265\376\377\374\2\373\375\372s\206\221\225]oz\2as~\333\340" \
338 "\343\213\376\377\374\2\370\376\377M\323\357\272\25\274\344\2""1\313\354" \
339 "\356\373\374\213\376\377\374\2\353\360\363i{\206\225]oz\2ew\202\357\365" \
340 "\367\265\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
341 "\223\377\377\377\265\376\377\374\1\305\312\315\226]oz\1\265\276\306\213" \
342 "\376\377\374\2\366\373\376B\314\347\274\25\274\344\2(\307\350\336\367" \
343 "\374\213\376\377\374\2\322\330\332^p{\225]oz\1\252\262\272\265\376\377" \
344 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
345 "\265\376\377\374\1u\210\224\225]oz\1\214\233\242\213\376\377\374\2\366" \
346 "\373\376B\314\347\276\25\274\344\2#\304\346\337\370\375\213\376\377\374" \
347 "\1\253\263\273\225]oz\2fx\203\367\371\366\264\376\377\374\377\377\377" \
348 "\377\377\377\377\377\377\377\377\377\223\377\377\377\264\376\377\374" \
349 "\1\322\330\332\225]oz\2i{\206\360\366\370\212\376\377\374\2\370\376\377" \
350 "I\320\354\300\25\274\344\2*\310\351\357\374\375\212\376\377\374\2\373" \
351 "\375\372~\215\223\225]oz\1\264\274\305\264\376\377\374\377\377\377\377" \
352 "\377\377\377\377\377\377\377\377\223\377\377\377\264\376\377\374\1\210" \
353 "\227\235\225]oz\1\303\310\313\213\376\377\374\1i\326\356\302\25\274\344" \
354 "\2B\314\347\370\376\377\212\376\377\374\2\335\343\345^p{\224]oz\2m\200" \
355 "\213\373\375\372\263\376\377\374\377\377\377\377\377\377\377\377\377" \
356 "\377\377\377\223\377\377\377\263\376\377\374\2\345\352\355^p{\224]oz" \
357 "\1~\221\235\213\376\377\374\1y\336\360\304\25\274\344\1M\323\357\213" \
358 "\376\377\374\1\242\252\262\225]oz\1\315\322\325\263\376\377\374\377\377" \
359 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\263\376\377" \
360 "\374\1\252\262\272\224]oz\2_q|\341\346\351\212\376\377\374\2\274\355" \
361 "\373\0\276\345\305\25\274\344\1\220\343\361\212\376\377\374\2\360\366" \
362 "\370i{\206\224]oz\1\211\230\236\263\376\377\374\377\377\377\377\377\377" \
363 "\377\377\377\377\377\377\223\377\377\377\262\376\377\374\2\372\374\371" \
364 "i{\206\224]oz\1\250\260\270\212\376\377\374\2\350\371\377\0\304\352\306" \
365 "\25\274\344\2\0\276\345\316\363\374\212\376\377\374\1\303\310\313\224" \
366 "]oz\2^p{\352\357\362\262\376\377\374\377\377\377\377\377\377\377\377" \
367 "\377\377\377\377\223\377\377\377\262\376\377\374\1\315\322\325\224]o" \
368 "z\2dv\201\357\365\367\212\376\377\374\1G\317\353\240\25\274\344\3\0\302" \
369 "\351,\311\352J\321\355\203L\322\356\2B\314\347#\304\346\240\25\274\344" \
370 "\2*\310\351\367\375\377\212\376\377\374\1q\204\217\224]oz\1\257\267\277" \
371 "\262\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
372 "\377\377\377\262\376\377\374\1\230\240\250\224]oz\1\247\257\267\212\376" \
373 "\377\374\1\233\345\364\235\25\274\344\4*\310\351n\333\362\273\354\371" \
374 "\360\375\376\210\376\377\374\4\357\374\375\303\361\370\206\340\363/\312" \
375 "\353\235\25\274\344\1w\333\356\212\376\377\374\1\303\310\313\224]oz\1" \
376 "v\211\225\262\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
377 "\377\223\377\377\377\261\376\377\374\2\365\372\375dv\201\223]oz\2as~" \
378 "\353\360\363\211\376\377\374\2\356\373\374\0\302\351\232\25\274\344\3" \
379 "\0\276\345m\332\361\335\366\373\220\376\377\374\2\336\367\374(\307\350" \
380 "\232\25\274\344\2%\305\347\336\367\374\212\376\377\374\2\372\374\371" \
381 "n\201\214\224]oz\1\343\350\353\261\376\377\374\377\377\377\377\377\377" \
382 "\377\377\377\377\377\377\223\377\377\377\261\376\377\374\1\313\320\322" \
383 "\224]oz\1\233\252\261\212\376\377\374\1k\327\357\231\25\274\344\3\0\276" \
384 "\345\206\340\363\357\374\375\222\376\377\374\1k\327\357\232\25\274\344" \
385 "\2%\305\347\336\367\374\214\376\377\374\1\276\303\305\224]oz\1\257\267" \
386 "\277\261\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
387 "\223\377\377\377\261\376\377\374\1\226\246\254\223]oz\2^p{\347\355\357" \
388 "\211\376\377\374\2\316\363\374\0\276\345\230\25\274\344\2J\321\355\337" \
389 "\370\375\223\376\377\374\1k\327\357\232\25\274\344\2%\305\347\336\367" \
390 "\374\215\376\377\374\2\370\372\367i{\206\223]oz\1\177\216\224\261\376" \
391 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
392 "\377\261\376\377\374\1k~\211\223]oz\1\205\224\232\212\376\377\374\1J" \
393 "\321\355\227\25\274\344\2\0\276\345\257\351\365\224\376\377\374\1m\332" \
394 "\361\232\25\274\344\2%\305\347\336\367\374\217\376\377\374\1\246\256" \
395 "\266\223]oz\2^p{\356\363\366\260\376\377\374\377\377\377\377\377\377" \
396 "\377\377\377\377\377\377\223\377\377\377\260\376\377\374\1\335\343\345" \
397 "\224]oz\1\303\310\313\211\376\377\374\2\333\364\371\0\276\345\226\25" \
398 "\274\344\2#\304\346\316\363\374\224\376\377\374\1m\332\361\232\25\274" \
399 "\344\2%\305\347\336\367\374\220\376\377\374\1\335\343\345\224]oz\1\306" \
400 "\314\316\260\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
401 "\377\223\377\377\377\260\376\377\374\1\264\274\305\223]oz\2cu\200\367" \
402 "\371\366\211\376\377\374\1i\326\356\226\25\274\344\2,\311\352\347\370" \
403 "\376\224\376\377\374\1m\332\361\232\25\274\344\2%\305\347\336\367\374" \
404 "\222\376\377\374\1t\207\222\223]oz\1\236\246\256\260\376\377\374\377" \
405 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\260\376" \
406 "\377\374\1\215\234\243\223]oz\1\231\241\251\211\376\377\374\2\347\370" \
407 "\376\0\276\345\225\25\274\344\2*\310\351\357\374\375\224\376\377\374" \
408 "\1m\332\361\232\25\274\344\2%\305\347\336\367\374\223\376\377\374\1\261" \
409 "\271\302\223]oz\1q\204\217\260\376\377\374\377\377\377\377\377\377\377" \
410 "\377\377\377\377\377\223\377\377\377\260\376\377\374\1i{\206\223]oz\1" \
411 "\317\324\327\211\376\377\374\1\207\341\364\225\25\274\344\2#\304\346" \
412 "\337\370\375\224\376\377\374\1m\332\361\232\25\274\344\2%\305\347\336" \
413 "\367\374\224\376\377\374\1\351\356\360\224]oz\1\356\363\366\257\376\377" \
414 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
415 "\257\376\377\374\1\345\352\355\223]oz\2as~\370\372\367\211\376\377\374" \
416 "\1,\311\352\224\25\274\344\2\0\276\345\313\360\371\224\376\377\374\1" \
417 "m\332\361\232\25\274\344\2%\305\347\336\367\374\226\376\377\374\1q\204" \
418 "\217\223]oz\1\314\321\324\257\376\377\374\377\377\377\377\377\377\377" \
419 "\377\377\377\377\377\223\377\377\377\257\376\377\374\1\311\316\321\223" \
420 "]oz\1\202\221\227\211\376\377\374\1\320\365\376\225\25\274\344\1\207" \
421 "\341\364\224\376\377\374\1m\332\361\232\25\274\344\2%\305\347\336\367" \
422 "\374\214\376\377\374\2\236\347\366\237\350\367\211\376\377\374\1\236" \
423 "\246\256\223]oz\1\255\265\275\257\376\377\374\377\377\377\377\377\377" \
424 "\377\377\377\377\377\377\223\377\377\377\257\376\377\374\1\254\264\274" \
425 "\223]oz\1\255\265\275\211\376\377\374\1y\336\360\224\25\274\344\2/\312" \
426 "\353\370\376\377\223\376\377\374\1m\332\361\232\25\274\344\2%\305\347" \
427 "\336\367\374\214\376\377\374\3\236\347\366\0\276\345J\321\355\211\376" \
428 "\377\374\1\311\316\321\223]oz\1\215\234\243\257\376\377\374\377\377\377" \
429 "\377\377\377\377\377\377\377\377\377\223\377\377\377\257\376\377\374" \
430 "\1\214\233\242\223]oz\1\326\333\335\211\376\377\374\1,\311\352\224\25" \
431 "\274\344\1\312\357\370\223\376\377\374\1n\333\362\232\25\274\344\2%\305" \
432 "\347\336\367\374\214\376\377\374\5\236\347\366\0\276\345\25\274\344\0" \
433 "\276\345\367\375\377\210\376\377\374\2\356\363\366^p{\222]oz\1o\202\215" \
434 "\257\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
435 "\377\377\377\257\376\377\374\1o\202\215\222]oz\2as~\366\373\376\210\376" \
436 "\377\374\2\357\374\375\0\276\345\223\25\274\344\1J\321\355\223\376\377" \
437 "\374\1n\333\362\232\25\274\344\2%\305\347\336\367\374\214\376\377\374" \
438 "\2\236\347\366\0\276\345\203\25\274\344\1\274\355\373\211\376\377\374" \
439 "\1u\210\224\222]oz\2^p{\370\372\367\256\376\377\374\377\377\377\377\377" \
440 "\377\377\377\377\377\377\377\223\377\377\377\256\376\377\374\2\373\375" \
441 "\372_q|\222]oz\1u\210\224\211\376\377\374\1\261\354\367\224\25\274\344" \
442 "\1\312\357\370\222\376\377\374\1n\333\362\232\25\274\344\2%\305\347\336" \
443 "\367\374\214\376\377\374\2\236\347\366\0\276\345\204\25\274\344\1\204" \
444 "\335\361\211\376\377\374\1\230\240\250\223]oz\1\342\347\352\256\376\377" \
445 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
446 "\256\376\377\374\1\351\356\360\223]oz\1\225\235\245\211\376\377\374\1" \
447 "n\333\362\223\25\274\344\1,\311\352\222\376\377\374\1n\333\362\232\25" \
448 "\274\344\2%\305\347\336\367\374\214\376\377\374\2\236\347\366\0\276\345" \
449 "\205\25\274\344\1B\314\347\211\376\377\374\1\257\267\277\223]oz\1\317" \
450 "\324\327\256\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
451 "\377\223\377\377\377\256\376\377\374\1\326\333\335\223]oz\1\253\263\273" \
452 "\211\376\377\374\1B\314\347\223\25\274\344\1\211\342\365\221\376\377" \
453 "\374\1n\333\362\232\25\274\344\2%\305\347\336\367\374\214\376\377\374" \
454 "\2\236\347\366\0\276\345\206\25\274\344\1\0\302\351\211\376\377\374\1" \
455 "\307\315\317\223]oz\1\276\303\305\256\376\377\374\377\377\377\377\377" \
456 "\377\377\377\377\377\377\377\223\377\377\377\256\376\377\374\1\306\314" \
457 "\316\223]oz\1\305\312\315\211\376\377\374\1#\304\346\223\25\274\344\1" \
458 "\337\370\375\220\376\377\374\1w\333\356\232\25\274\344\2%\305\347\336" \
459 "\367\374\214\376\377\374\2\236\347\366\0\276\345\210\25\274\344\1\356" \
460 "\373\374\210\376\377\374\1\337\344\346\223]oz\1\253\263\273\256\376\377" \
461 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
462 "\256\376\377\374\1\274\301\303\223]oz\1\333\340\343\210\376\377\374\2" \
463 "\367\375\377\0\276\345\222\25\274\344\1(\307\350\220\376\377\374\1\231" \
464 "\342\362\232\25\274\344\2%\305\347\336\367\374\214\376\377\374\2\236" \
465 "\347\366\0\276\345\211\25\274\344\1\302\357\367\210\376\377\374\2\364" \
466 "\371\374^p{\222]oz\1\236\246\256\256\376\377\374\377\377\377\377\377" \
467 "\377\377\377\377\377\377\377\223\377\377\377\256\376\377\374\1\257\267" \
468 "\277\223]oz\1\353\360\363\210\376\377\374\1\316\363\374\223\25\274\344" \
469 "\1\\\326\355\217\376\377\374\2\320\365\376\31\275\345\231\25\274\344" \
470 "\2%\305\347\336\367\374\214\376\377\374\2\236\347\366\0\276\345\212\25" \
471 "\274\344\1\237\350\367\211\376\377\374\1gy\204\222]oz\1\216\236\244\256" \
472 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
473 "\377\377\256\376\377\374\1\242\252\262\223]oz\1\366\370\364\210\376\377" \
474 "\374\1\262\355\370\223\25\274\344\1\220\343\361\217\376\377\374\1J\321" \
475 "\355\231\25\274\344\2%\305\347\336\367\374\214\376\377\374\2\236\347" \
476 "\366\0\276\345\213\25\274\344\1\211\342\365\211\376\377\374\1m\200\213" \
477 "\222]oz\1\204\223\231\256\376\377\374\377\377\377\377\377\377\377\377" \
478 "\377\377\377\377\223\377\377\377\256\376\377\374\1\226\246\254\223]o" \
479 "z\211\376\377\374\1\237\350\367\223\25\274\344\1\262\355\370\216\376" \
480 "\377\374\2\350\371\377\0\276\345\230\25\274\344\2%\305\347\336\367\374" \
481 "\214\376\377\374\2\236\347\366\0\276\345\214\25\274\344\1n\333\362\211" \
482 "\376\377\374\1u\210\224\222]oz\1y\214\230\256\376\377\374\377\377\377" \
483 "\377\377\377\377\377\377\377\377\377\223\377\377\377\256\376\377\374" \
484 "\1\231\241\251\222]oz\1cu\200\211\376\377\374\1\233\345\364\223\25\274" \
485 "\344\1\316\363\374\216\376\377\374\1\235\346\365\230\25\274\344\2%\305" \
486 "\347\336\367\374\214\376\377\374\2\236\347\366\0\276\345\215\25\274\344" \
487 "\1k\327\357\211\376\377\374\1\200\217\225\222]oz\1u\210\224\256\376\377" \
488 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
489 "\256\376\377\374\1\222\241\247\222]oz\1j}\210\211\376\377\374\1\220\343" \
490 "\361\223\25\274\344\1\336\367\374\216\376\377\374\1w\333\356\227\25\274" \
491 "\344\2#\304\346\336\367\374\214\376\377\374\2\236\347\366\0\276\345\216" \
492 "\25\274\344\1M\323\357\211\376\377\374\1\210\227\235\222]oz\1s\206\221" \
493 "\256\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
494 "\377\377\377\256\376\377\374\1\211\230\236\222]oz\1n\201\214\211\376" \
495 "\377\374\1\206\340\363\223\25\274\344\1\350\371\377\216\376\377\374\1" \
496 "i\326\356\226\25\274\344\2#\304\346\336\367\374\214\376\377\374\2\236" \
497 "\347\366\0\276\345\217\25\274\344\1M\323\357\211\376\377\374\1\215\234" \
498 "\243\222]oz\1m\200\213\256\376\377\374\377\377\377\377\377\377\377\377" \
499 "\377\377\377\377\223\377\377\377\256\376\377\374\1\222\241\247\222]o" \
500 "z\1l\177\212\211\376\377\374\1\207\341\364\223\25\274\344\1\336\367\374" \
501 "\216\376\377\374\1n\333\362\225\25\274\344\2#\304\346\336\367\374\214" \
502 "\376\377\374\2\235\346\365\0\276\345\220\25\274\344\1M\323\357\211\376" \
503 "\377\374\1\211\230\236\222]oz\1s\206\221\256\376\377\374\377\377\377" \
504 "\377\377\377\377\377\377\377\377\377\223\377\377\377\256\376\377\374" \
505 "\1\231\241\251\222]oz\1ew\202\211\376\377\374\1\231\342\362\223\25\274" \
506 "\344\1\320\365\376\216\376\377\374\1\221\344\362\224\25\274\344\2#\304" \
507 "\346\336\367\374\214\376\377\374\2\235\346\365\0\276\345\221\25\274\344" \
508 "\1i\326\356\211\376\377\374\1\202\221\227\222]oz\1u\210\224\256\376\377" \
509 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
510 "\256\376\377\374\1\242\252\262\222]oz\1^p{\211\376\377\374\1\237\350" \
511 "\367\223\25\274\344\1\301\356\366\216\376\377\374\1\333\364\371\223\25" \
512 "\274\344\2#\304\346\336\367\374\214\376\377\374\2\356\373\374\0\276\345" \
513 "\222\25\274\344\1n\333\362\211\376\377\374\1w\212\226\222]oz\1\202\221" \
514 "\227\256\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
515 "\223\377\377\377\256\376\377\374\1\246\256\266\223]oz\1\370\372\367\210" \
516 "\376\377\374\1\260\353\366\223\25\274\344\1\233\345\364\217\376\377\374" \
517 "\1,\311\352\221\25\274\344\2#\304\346\336\367\374\215\376\377\374\1\312" \
518 "\357\370\223\25\274\344\1\204\335\361\211\376\377\374\1o\202\215\222" \
519 "]oz\1\205\224\232\256\376\377\374\377\377\377\377\377\377\377\377\377" \
520 "\377\377\377\223\377\377\377\256\376\377\374\1\252\262\272\223]oz\1\355" \
521 "\362\365\210\376\377\374\1\314\361\372\223\25\274\344\1m\332\361\217" \
522 "\376\377\374\1\273\354\371\220\25\274\344\2#\304\346\336\367\374\216" \
523 "\376\377\374\1\233\345\364\223\25\274\344\1\236\347\366\211\376\377\374" \
524 "\1i{\206\222]oz\1\211\230\236\256\376\377\374\377\377\377\377\377\377" \
525 "\377\377\377\377\377\377\223\377\377\377\256\376\377\374\1\266\277\307" \
526 "\223]oz\1\340\345\350\210\376\377\374\1\356\373\374\223\25\274\344\1" \
527 ",\311\352\220\376\377\374\1i\326\356\216\25\274\344\2#\304\346\336\367" \
528 "\374\217\376\377\374\1\\\326\355\223\25\274\344\1\274\355\373\210\376" \
529 "\377\374\2\372\374\371_q|\222]oz\1\226\246\254\256\376\377\374\377\377" \
530 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\256\376\377" \
531 "\374\1\307\315\317\223]oz\1\313\320\322\211\376\377\374\1\0\302\351\222" \
532 "\25\274\344\2\0\276\345\357\374\375\217\376\377\374\2\370\376\377G\317" \
533 "\353\214\25\274\344\2(\307\350\336\367\374\220\376\377\374\1%\305\347" \
534 "\223\25\274\344\1\336\367\374\210\376\377\374\1\343\350\353\223]oz\1" \
535 "\254\264\274\256\376\377\374\377\377\377\377\377\377\377\377\377\377" \
536 "\377\377\223\377\377\377\256\376\377\374\1\327\334\337\223]oz\1\257\267" \
537 "\277\211\376\377\374\1B\314\347\223\25\274\344\1\237\350\367\220\376" \
538 "\377\374\3\370\376\377n\333\362\31\275\345\211\25\274\344\2J\321\355" \
539 "\356\373\374\220\376\377\374\1\315\362\373\223\25\274\344\1\0\301\350" \
540 "\211\376\377\374\1\316\323\326\223]oz\1\276\303\305\256\376\377\374\377" \
541 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\256\376" \
542 "\377\374\1\346\354\356\223]oz\1\225\245\253\211\376\377\374\1k\327\357" \
543 "\223\25\274\344\1G\317\353\222\376\377\374\3\320\365\376Z\325\354\0\301" \
544 "\350\204\25\274\344\3\0\276\345G\317\353\274\355\373\222\376\377\374" \
545 "\1w\333\356\223\25\274\344\1""3\314\355\211\376\377\374\1\264\274\305" \
546 "\223]oz\1\315\322\325\256\376\377\374\377\377\377\377\377\377\377\377" \
547 "\377\377\377\377\223\377\377\377\256\376\377\374\1\366\373\376\223]o" \
548 "z\1z\215\231\211\376\377\374\1\237\350\367\223\25\274\344\2\31\275\345" \
549 "\335\366\373\223\376\377\374\2\370\376\377\316\363\374\202\261\354\367" \
550 "\2\313\360\371\366\373\376\223\376\377\374\2\370\376\377\0\302\351\223" \
551 "\25\274\344\1n\333\362\211\376\377\374\1\230\250\256\223]oz\1\334\342" \
552 "\344\256\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
553 "\223\377\377\377\257\376\377\374\1m\200\213\222]oz\1ew\202\211\376\377" \
554 "\374\1\347\370\376\224\25\274\344\1m\332\361\254\376\377\374\1\233\345" \
555 "\364\224\25\274\344\1\261\354\367\211\376\377\374\1}\220\233\223]oz\1" \
556 "\366\370\364\256\376\377\374\377\377\377\377\377\377\377\377\377\377" \
557 "\377\377\223\377\377\377\257\376\377\374\1\211\230\236\223]oz\1\335\343" \
558 "\345\211\376\377\374\1%\305\347\223\25\274\344\2\0\276\345\336\367\374" \
559 "\252\376\377\374\2\367\375\377#\304\346\223\25\274\344\2\31\275\345\357" \
560 "\374\375\210\376\377\374\2\370\372\367as~\222]oz\1m\200\213\257\376\377" \
561 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
562 "\257\376\377\374\1\251\261\271\223]oz\1\264\274\305\211\376\377\374\1" \
563 "k\327\357\224\25\274\344\1L\322\356\252\376\377\374\1\206\340\363\224" \
564 "\25\274\344\1""3\314\355\211\376\377\374\1\322\330\332\223]oz\1\211\230" \
565 "\236\257\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
566 "\223\377\377\377\257\376\377\374\1\305\312\315\223]oz\1\211\230\236\211" \
567 "\376\377\374\1\301\356\366\225\25\274\344\1\262\355\370\250\376\377\374" \
568 "\2\334\365\372\0\276\345\224\25\274\344\1\220\343\361\211\376\377\374" \
569 "\1\252\262\272\223]oz\1\251\261\271\257\376\377\374\377\377\377\377\377" \
570 "\377\377\377\377\377\377\377\223\377\377\377\257\376\377\374\1\337\344" \
571 "\346\223]oz\2ew\202\373\375\372\210\376\377\374\2\370\376\377#\304\346" \
572 "\224\25\274\344\2\0\302\351\347\370\376\246\376\377\374\2\367\375\377" \
573 ",\311\352\224\25\274\344\2\0\276\345\337\370\375\211\376\377\374\1\177" \
574 "\216\224\223]oz\1\305\312\315\257\376\377\374\377\377\377\377\377\377" \
575 "\377\377\377\377\377\377\223\377\377\377\257\376\377\374\2\373\375\372" \
576 "dv\201\223]oz\1\331\336\341\211\376\377\374\1n\333\362\225\25\274\344" \
577 "\2B\314\347\370\376\377\245\376\377\374\1i\326\356\225\25\274\344\1B" \
578 "\314\347\211\376\377\374\2\362\367\371_q|\223]oz\1\346\354\356\257\376" \
579 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
580 "\377\260\376\377\374\1\210\227\235\223]oz\1\246\256\266\211\376\377\374" \
581 "\1\316\363\374\226\25\274\344\2M\323\357\370\376\377\243\376\377\374" \
582 "\1\206\340\363\226\25\274\344\1\256\350\364\211\376\377\374\1\301\306" \
583 "\311\223]oz\1k~\211\260\376\377\374\377\377\377\377\377\377\377\377\377" \
584 "\377\377\377\223\377\377\377\260\376\377\374\1\257\267\277\223]oz\2i" \
585 "{\206\373\375\372\211\376\377\374\1G\317\353\226\25\274\344\2\\\326\355" \
586 "\370\376\377\241\376\377\374\1\220\343\361\226\25\274\344\2\0\304\352" \
587 "\370\376\377\211\376\377\374\1\204\223\231\223]oz\1\230\240\250\260\376" \
588 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
589 "\377\260\376\377\374\1\331\336\341\224]oz\1\317\324\327\211\376\377\374" \
590 "\1\301\356\366\227\25\274\344\2J\321\355\367\375\377\237\376\377\374" \
591 "\1w\333\356\227\25\274\344\1\206\340\363\211\376\377\374\2\351\356\360" \
592 "^p{\223]oz\1\277\304\306\260\376\377\374\377\377\377\377\377\377\377" \
593 "\377\377\377\377\377\223\377\377\377\260\376\377\374\2\372\374\371cu" \
594 "\200\223]oz\1\222\241\247\212\376\377\374\1/\312\353\227\25\274\344\2" \
595 ",\311\352\334\365\372\234\376\377\374\2\356\373\374I\320\354\227\25\274" \
596 "\344\2\0\301\350\366\373\376\211\376\377\374\1\261\271\302\224]oz\1\343" \
597 "\350\353\260\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
598 "\377\223\377\377\377\261\376\377\374\1\216\236\244\223]oz\2cu\200\362" \
599 "\367\371\211\376\377\374\1\261\354\367\230\25\274\344\3\0\276\345\233" \
600 "\345\364\370\376\377\231\376\377\374\2\262\355\370\0\304\352\230\25\274" \
601 "\344\1\206\340\363\212\376\377\374\1s\206\221\223]oz\1q\204\217\261\376" \
602 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
603 "\377\261\376\377\374\1\305\312\315\224]oz\1\257\267\277\212\376\377\374" \
604 "\1B\314\347\231\25\274\344\2""1\313\354\303\361\370\226\376\377\374\2" \
605 "\334\365\372J\321\355\231\25\274\344\2#\304\346\366\373\376\211\376\377" \
606 "\374\1\315\322\325\224]oz\1\251\261\271\261\376\377\374\377\377\377\377" \
607 "\377\377\377\377\377\377\377\377\223\377\377\377\261\376\377\374\2\362" \
608 "\367\371as~\223]oz\2hz\205\370\372\367\211\376\377\374\2\334\365\372" \
609 "\0\276\345\232\25\274\344\3B\314\347\262\355\370\370\376\377\221\376" \
610 "\377\374\3\313\360\371L\322\356\0\276\345\232\25\274\344\1\256\350\364" \
611 "\212\376\377\374\1z\215\231\224]oz\1\333\340\343\261\376\377\374\377" \
612 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\262\376" \
613 "\377\374\1\207\226\234\224]oz\1\270\300\311\212\376\377\374\1w\333\356" \
614 "\234\25\274\344\4\0\304\352m\332\361\273\354\371\366\373\376\212\376" \
615 "\377\374\4\370\376\377\302\357\367y\336\360(\307\350\234\25\274\344\1" \
616 "B\314\347\212\376\377\374\1\324\331\333\224]oz\1k~\211\262\376\377\374" \
617 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\262" \
618 "\376\377\374\1\301\306\311\224]oz\2k~\211\372\374\371\211\376\377\374" \
619 "\2\366\373\376(\307\350\236\25\274\344\5\31\275\345,\311\352M\323\357" \
620 "y\336\360\211\342\365\202\233\345\364\5\220\343\361\204\335\361Z\325" \
621 "\3541\313\354\0\276\345\236\25\274\344\2\0\301\350\336\367\374\212\376" \
622 "\377\374\1\205\224\232\224]oz\1\246\256\266\262\376\377\374\377\377\377" \
623 "\377\377\377\377\377\377\377\377\377\223\377\377\377\262\376\377\374" \
624 "\2\367\371\366dv\201\224]oz\1\274\301\303\212\376\377\374\2\315\362\373" \
625 "\0\276\345\307\25\274\344\1\236\347\366\212\376\377\374\1\325\332\334" \
626 "\225]oz\1\341\346\351\262\376\377\374\377\377\377\377\377\377\377\377" \
627 "\377\377\377\377\223\377\377\377\263\376\377\374\1\236\246\256\224]o" \
628 "z\2fx\203\356\363\366\212\376\377\374\1\221\344\362\306\25\274\344\1" \
629 "M\323\357\212\376\377\374\2\372\374\371t\207\222\224]oz\1\177\216\224" \
630 "\263\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
631 "\377\377\377\263\376\377\374\1\333\340\343\225]oz\1\226\246\254\213\376" \
632 "\377\374\1L\322\356\304\25\274\344\2,\311\352\366\373\376\212\376\377" \
633 "\374\1\265\276\306\225]oz\1\302\307\312\263\376\377\374\377\377\377\377" \
634 "\377\377\377\377\377\377\377\377\223\377\377\377\264\376\377\374\1u\210" \
635 "\224\224]oz\2^p{\331\336\341\212\376\377\374\2\366\373\376/\312\353\302" \
636 "\25\274\344\2\0\302\351\336\367\374\212\376\377\374\2\353\360\363dv\201" \
637 "\224]oz\2dv\201\364\371\374\263\376\377\374\377\377\377\377\377\377\377" \
638 "\377\377\377\377\377\223\377\377\377\264\376\377\374\1\302\307\312\225" \
639 "]oz\2w\212\226\372\374\371\212\376\377\374\2\350\371\377%\305\347\300" \
640 "\25\274\344\2\0\301\350\314\361\372\213\376\377\374\1\227\237\247\225" \
641 "]oz\1\246\256\266\264\376\377\374\377\377\377\377\377\377\377\377\377" \
642 "\377\377\377\223\377\377\377\264\376\377\374\2\372\374\371l\177\212\225" \
643 "]oz\1\252\262\272\213\376\377\374\2\337\370\375\0\304\352\276\25\274" \
644 "\344\2\0\276\345\274\355\373\213\376\377\374\1\305\312\315\225]oz\2a" \
645 "s~\353\360\363\264\376\377\374\377\377\377\377\377\377\377\377\377\377" \
646 "\377\377\223\377\377\377\265\376\377\374\1\270\300\311\225]oz\2^p{\322" \
647 "\330\332\213\376\377\374\2\332\363\370#\304\346\274\25\274\344\2\0\276" \
648 "\345\273\354\371\213\376\377\374\2\343\350\353dv\201\225]oz\1\236\246" \
649 "\256\265\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
650 "\223\377\377\377\265\376\377\374\2\365\372\375hz\205\225]oz\2i{\206\354" \
651 "\361\364\213\376\377\374\2\337\370\375*\310\351\272\25\274\344\2\0\302" \
652 "\351\314\361\372\213\376\377\374\2\371\373\370x\213\227\225]oz\2_q|\346" \
653 "\354\356\265\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
654 "\377\223\377\377\377\266\376\377\374\1\261\271\302\226]oz\2\205\224\232" \
655 "\373\375\372\213\376\377\374\2\356\373\374B\314\347\270\25\274\344\2" \
656 "%\305\347\335\366\373\214\376\377\374\1\242\252\262\226]oz\1\231\241" \
657 "\251\266\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
658 "\223\377\377\377\266\376\377\374\2\370\372\367m\200\213\226]oz\1\242" \
659 "\252\262\214\376\377\374\2\367\375\377i\326\356\266\25\274\344\2B\314" \
660 "\347\350\371\377\214\376\377\374\1\277\304\306\226]oz\2bt\177\351\356" \
661 "\360\266\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
662 "\223\377\377\377\267\376\377\374\1\305\312\315\227]oz\1\261\271\302\215" \
663 "\376\377\374\2\250\347\371\0\301\350\262\25\274\344\3\31\275\345\206" \
664 "\340\363\370\376\377\214\376\377\374\2\316\323\326_q|\226]oz\1\251\261" \
665 "\271\267\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
666 "\223\377\377\377\270\376\377\374\1y\214\230\226]oz\2^p{\301\306\311\215" \
667 "\376\377\374\2\335\366\373/\312\353\260\25\274\344\2#\304\346\312\357" \
668 "\370\215\376\377\374\2\330\335\340cu\200\226]oz\2hz\205\366\370\364\267" \
669 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
670 "\377\377\270\376\377\374\1\332\337\342\230\222\241\247\1\353\360\363" \
671 "\215\376\377\374\3\370\376\377\231\342\362\0\301\350\254\25\274\344\3" \
672 "\0\276\345w\333\356\366\373\376\215\376\377\374\2\365\372\375\236\246" \
673 "\256\227\222\241\247\1\307\315\317\270\376\377\374\377\377\377\377\377" \
674 "\377\377\377\377\377\377\377\223\377\377\377\341\376\377\374\3\356\373" \
675 "\374i\326\356\0\276\345\251\25\274\344\2J\321\355\335\366\373\341\376" \
676 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
677 "\377\343\376\377\374\3\316\363\374Z\325\354\31\275\345\245\25\274\344" \
678 "\2G\317\353\302\357\367\343\376\377\374\377\377\377\377\377\377\377\377" \
679 "\377\377\377\377\223\377\377\377\345\376\377\374\3\336\367\374m\332\361" \
680 "\0\276\345\240\25\274\344\3\31\275\345M\323\357\316\363\374\345\376\377" \
681 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
682 "\347\376\377\374\4\366\373\376\237\350\367I\320\354\31\275\345\232\25" \
683 "\274\344\4\0\276\345B\314\347\231\342\362\356\373\374\347\376\377\374" \
684 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\352" \
685 "\376\377\374\4\356\373\374\235\346\365Z\325\354#\304\346\224\25\274\344" \
686 "\4\0\302\351L\322\356\221\344\362\336\367\374\352\376\377\374\377\377" \
687 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\356\376\377" \
688 "\374\6\336\367\374\237\350\367w\333\356M\323\357,\311\352\0\276\345\210" \
689 "\25\274\344\6\0\276\345*\310\351J\321\355n\333\362\233\345\364\320\365" \
690 "\376\356\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
691 "\223\377\377\377\364\376\377\374\10\367\375\377\356\373\374\335\366\373" \
692 "\316\363\374\315\362\373\335\366\373\350\371\377\366\373\376\364\376" \
693 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
694 "\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377" \
695 "\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377" \
696 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376" \
697 "\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
698 "\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377" \
699 "\377\377\377\377\377\377\377\377\223\377\377\377\375\376\377\374\202" \
700 "\370\376\377\250\376\377\374\1\367\375\377\217\376\377\374\1\367\375" \
701 "\377\237\376\377\374\1\367\375\377\230\376\377\374\377\377\377\377\377" \
702 "\377\377\377\377\377\377\377\223\377\377\377\374\376\377\374\4\237\350" \
703 "\367\0\276\345\31\275\345\203\334\360\245\376\377\374\5\316\363\374#" \
704 "\304\346\25\274\344G\317\353\367\375\377\213\376\377\374\5\335\366\373" \
705 "(\307\350\25\274\344B\314\347\366\373\376\233\376\377\374\5\356\373\374" \
706 "/\312\353\25\274\344*\310\351\337\370\375\226\376\377\374\377\377\377" \
707 "\377\377\377\377\377\377\377\377\377\223\377\377\377\374\376\377\374" \
708 "\1#\304\346\203\25\274\344\1\357\374\375\244\376\377\374\1i\326\356\203" \
709 "\25\274\344\1\260\353\366\213\376\377\374\1n\333\362\203\25\274\344\1" \
710 "\235\346\365\233\376\377\374\1\231\342\362\203\25\274\344\1y\336\360" \
711 "\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
712 "\377\377\377\374\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374" \
713 "\244\376\377\374\1I\320\354\203\25\274\344\1\231\342\362\213\376\377" \
714 "\374\1M\323\357\203\25\274\344\1\206\340\363\233\376\377\374\1\206\340" \
715 "\363\203\25\274\344\1k\327\357\226\376\377\374\377\377\377\377\377\377" \
716 "\377\377\377\377\377\377\223\377\377\377\374\376\377\374\1\0\301\350" \
717 "\203\25\274\344\1\336\367\374\244\376\377\374\1I\320\354\203\25\274\344" \
718 "\1\231\342\362\213\376\377\374\1M\323\357\203\25\274\344\1\206\340\363" \
719 "\233\376\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377" \
720 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
721 "\374\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374\244\376\377" \
722 "\374\1I\320\354\203\25\274\344\1\231\342\362\213\376\377\374\1M\323\357" \
723 "\203\25\274\344\1\206\340\363\233\376\377\374\1\206\340\363\203\25\274" \
724 "\344\1k\327\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377" \
725 "\377\377\223\377\377\377\374\376\377\374\1\0\301\350\203\25\274\344\1" \
726 "\336\367\374\244\376\377\374\1I\320\354\203\25\274\344\1\231\342\362" \
727 "\213\376\377\374\1M\323\357\203\25\274\344\1\206\340\363\233\376\377" \
728 "\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377\374\377\377" \
729 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\374\376\377" \
730 "\374\1\0\301\350\203\25\274\344\1\336\367\374\244\376\377\374\1I\320" \
731 "\354\203\25\274\344\1\231\342\362\213\376\377\374\1M\323\357\203\25\274" \
732 "\344\1\206\340\363\233\376\377\374\1\206\340\363\203\25\274\344\1k\327" \
733 "\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
734 "\223\377\377\377\232\376\377\374\7\311\316\321\211\230\236j}\210cu\200" \
735 "n\201\214\233\243\253\333\340\343\206\376\377\374\2\236\246\256dv\201" \
736 "\205]oz\4_q|k~\211\222\241\247\337\344\346\210\376\377\374\7\322\330" \
737 "\332\222\241\247l\177\212cu\200k~\211\222\241\247\322\330\332\206\376" \
738 "\377\374\2\257\267\277gy\204\205]oz\4^p{i{\206\211\230\236\325\332\334" \
739 "\210\376\377\374\10\313\360\371\\\326\355%\305\347\0\276\345\0\302\351" \
740 "G\317\353\237\350\367\370\376\377\205\376\377\374\2\235\346\365\0\304" \
741 "\352\212\25\274\344\4\0\276\345\0\304\352M\323\357\315\362\373\205\376" \
742 "\377\374\1\0\301\350\207\25\274\344\4\0\301\350B\314\347\233\345\364" \
743 "\370\376\377\207\376\377\374\7\302\357\367M\323\357#\304\346\0\276\345" \
744 "\0\304\352J\321\355\260\353\366\210\376\377\374\4\315\362\373M\323\357" \
745 "#\304\346\31\275\345\207\25\274\344\1\231\342\362\204\376\377\374\4\323" \
746 "\364\367\\\326\355%\305\347\0\276\345\207\25\274\344\1\206\340\363\205" \
747 "\376\377\374\10\334\365\372m\332\361(\307\350\0\276\345\0\302\351B\314" \
748 "\347\233\345\364\370\376\377\207\376\377\374\4\336\367\374m\332\361(" \
749 "\307\350\0\276\345\207\25\274\344\1k\327\357\226\376\377\374\377\377" \
750 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\230\376\377" \
751 "\374\2\356\363\366\202\221\227\206]oz\3^p{\247\257\267\373\375\372\203" \
752 "\376\377\374\1\327\334\337\212]oz\2_q|\303\310\313\205\376\377\374\2" \
753 "\364\371\374\222\241\247\207]oz\2\222\241\247\370\372\367\203\376\377" \
754 "\374\2\353\360\363^p{\212]oz\1\254\264\274\205\376\377\374\2\370\376" \
755 "\377m\332\361\207\25\274\344\2B\314\347\350\371\377\203\376\377\374\2" \
756 "\370\376\377\0\276\345\216\25\274\344\2\31\275\345\235\346\365\204\376" \
757 "\377\374\1\0\301\350\212\25\274\344\2B\314\347\357\374\375\204\376\377" \
758 "\374\2\367\375\377Z\325\354\207\25\274\344\2G\317\353\357\374\375\205" \
759 "\376\377\374\2\235\346\365\31\275\345\212\25\274\344\1\231\342\362\203" \
760 "\376\377\374\2\256\350\364\0\276\345\212\25\274\344\1\206\340\363\204" \
761 "\376\377\374\2\206\340\363\31\275\345\206\25\274\344\2*\310\351\335\366" \
762 "\373\205\376\377\374\2\302\357\367\0\301\350\212\25\274\344\1k\327\357" \
763 "\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
764 "\377\377\377\227\376\377\374\2\364\371\374u\210\224\211]oz\1\242\252" \
765 "\262\203\376\377\374\1\306\314\316\213]oz\2_q|\325\332\334\203\376\377" \
766 "\374\2\373\375\372\210\227\235\211]oz\2\211\230\236\373\375\372\202\376" \
767 "\377\374\1\330\335\340\214]oz\1\304\311\314\204\376\377\374\1i\326\356" \
768 "\211\25\274\344\2*\310\351\366\373\376\202\376\377\374\1\357\374\375" \
769 "\220\25\274\344\2\0\276\345\274\355\373\203\376\377\374\1\0\301\350\213" \
770 "\25\274\344\1M\323\357\204\376\377\374\1L\322\356\211\25\274\344\2""3" \
771 "\314\355\370\376\377\203\376\377\374\2\313\360\371\0\276\345\213\25\274" \
772 "\344\1\231\342\362\202\376\377\374\2\333\364\371\0\276\345\213\25\274" \
773 "\344\1\206\340\363\203\376\377\374\1\206\340\363\211\25\274\344\2\0\304" \
774 "\352\347\370\376\203\376\377\374\2\356\373\374\0\304\352\213\25\274\344" \
775 "\1k\327\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
776 "\377\223\377\377\377\227\376\377\374\1\251\261\271\213]oz\1\322\330\332" \
777 "\202\376\377\374\1\306\314\316\214]oz\1\200\217\225\203\376\377\374\1" \
778 "\277\304\306\213]oz\1\277\304\306\202\376\377\374\1\330\335\340\214]" \
779 "oz\2j}\210\373\375\372\202\376\377\374\1\273\354\371\213\25\274\344\1" \
780 "n\333\362\202\376\377\374\1\357\374\375\221\25\274\344\1""1\313\354\203" \
781 "\376\377\374\1\0\301\350\214\25\274\344\1\332\363\370\202\376\377\374" \
782 "\1\237\350\367\213\25\274\344\1\206\340\363\203\376\377\374\1I\320\354" \
783 "\214\25\274\344\1\231\342\362\202\376\377\374\1M\323\357\214\25\274\344" \
784 "\1\206\340\363\202\376\377\374\2\320\365\376\31\275\345\212\25\274\344" \
785 "\1L\322\356\203\376\377\374\1\203\334\360\214\25\274\344\1k\327\357\226" \
786 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
787 "\377\377\226\376\377\374\2\370\372\367cu\200\203]oz\5s\206\221\317\324" \
788 "\327\343\350\353\276\303\305ew\202\203]oz\1\210\227\235\202\376\377\374" \
789 "\1\306\314\316\203]oz\1y\214\230\203\347\355\357\2\346\354\356\264\274" \
790 "\305\203]oz\2^p{\357\365\367\202\376\377\374\1p\203\216\203]oz\5k~\211" \
791 "\307\315\317\343\350\353\306\314\316k~\211\203]oz\1p\203\216\202\376" \
792 "\377\374\1\330\335\340\203]oz\1k~\211\204\347\355\357\2\304\311\314_" \
793 "q|\203]oz\1\334\342\344\202\376\377\374\1B\314\347\203\25\274\344\5\0" \
794 "\301\350\233\345\364\333\364\371\260\353\366(\307\350\203\25\274\344" \
795 "\4\0\276\345\367\375\377\376\377\374\357\374\375\204\25\274\344\203\335" \
796 "\366\373\204\25\274\344\3\302\357\367\335\366\373\206\340\363\204\25" \
797 "\274\344\1\356\373\374\202\376\377\374\1\0\301\350\203\25\274\344\1\302" \
798 "\357\367\203\335\366\373\2\302\357\367\0\304\352\203\25\274\344\1\207" \
799 "\341\364\202\376\377\374\1,\311\352\203\25\274\344\5\0\302\351\236\347" \
800 "\366\332\363\370\256\350\364#\304\346\203\25\274\344\5\0\302\351\370" \
801 "\376\377\376\377\374\370\376\377\0\276\345\203\25\274\344\1w\333\356" \
802 "\204\335\366\373\1B\314\347\203\25\274\344\1\231\342\362\202\376\377" \
803 "\374\1\0\276\345\203\25\274\344\2m\332\361\334\365\372\203\335\366\373" \
804 "\1I\320\354\203\25\274\344\1\206\340\363\202\376\377\374\1i\326\356\203" \
805 "\25\274\344\5\0\276\345\206\340\363\323\364\367\273\354\3711\313\354" \
806 "\204\25\274\344\1\335\366\373\202\376\377\374\1,\311\352\203\25\274\344" \
807 "\2L\322\356\332\363\370\203\335\366\373\1n\333\362\203\25\274\344\1k" \
808 "\327\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
809 "\377\223\377\377\377\226\376\377\374\1\324\331\333\203]oz\2cu\200\353" \
810 "\360\363\203\376\377\374\1\307\315\317\203]oz\4as~\372\374\371\376\377" \
811 "\374\306\314\316\203]oz\1\202\221\227\205\376\377\374\1hz\205\203]oz" \
812 "\3\341\346\351\376\377\374\347\355\357\203]oz\2^p{\335\343\345\203\376" \
813 "\377\374\1\333\340\343\204]oz\3\347\355\357\376\377\374\330\335\340\203" \
814 "]oz\1m\200\213\205\376\377\374\1~\215\223\203]oz\4\313\320\322\376\377" \
815 "\374\370\376\377\31\275\345\203\25\274\344\1\256\350\364\203\376\377" \
816 "\374\2\336\367\374\0\276\345\203\25\274\344\3\274\355\373\376\377\374" \
817 "\357\374\375\204\25\274\344\203\376\377\374\204\25\274\344\1\336\367" \
818 "\374\202\376\377\374\1\0\301\350\203\25\274\344\1\323\364\367\202\376" \
819 "\377\374\1\0\301\350\203\25\274\344\1\336\367\374\204\376\377\374\1n" \
820 "\333\362\203\25\274\344\3m\332\361\376\377\374\356\373\374\204\25\274" \
821 "\344\1\274\355\373\203\376\377\374\2\323\364\367\0\276\345\203\25\274" \
822 "\344\3\315\362\373\376\377\374\335\366\373\203\25\274\344\2\0\276\345" \
823 "\370\376\377\204\376\377\374\1I\320\354\203\25\274\344\3\231\342\362" \
824 "\376\377\374\366\373\376\204\25\274\344\1\366\373\376\204\376\377\374" \
825 "\1M\323\357\203\25\274\344\1\206\340\363\202\376\377\374\1%\305\347\203" \
826 "\25\274\344\1\207\341\364\203\376\377\374\2\360\375\376\0\304\352\203" \
827 "\25\274\344\1\233\345\364\202\376\377\374\1\0\301\350\203\25\274\344" \
828 "\1\323\364\367\204\376\377\374\1\206\340\363\203\25\274\344\1k\327\357" \
829 "\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
830 "\377\377\377\226\376\377\374\1\303\310\313\203]oz\1\204\223\231\204\376" \
831 "\377\374\2\370\372\367_q|\203]oz\3\354\361\364\376\377\374\306\314\316" \
832 "\203]oz\1\202\221\227\205\376\377\374\1m\200\213\203]oz\3\341\346\351" \
833 "\376\377\374\326\333\335\203]oz\1n\201\214\205\376\377\374\1l\177\212" \
834 "\203]oz\3\327\334\337\376\377\374\330\335\340\203]oz\1m\200\213\205\376" \
835 "\377\374\1\202\221\227\203]oz\3\306\314\316\376\377\374\337\370\375\203" \
836 "\25\274\344\2\31\275\345\370\376\377\204\376\377\374\1""3\314\355\203" \
837 "\25\274\344\3\236\347\366\376\377\374\357\374\375\204\25\274\344\203" \
838 "\376\377\374\204\25\274\344\1\336\367\374\202\376\377\374\1#\304\346" \
839 "\203\25\274\344\1\316\363\374\202\376\377\374\1\0\301\350\203\25\274" \
840 "\344\1\336\367\374\204\376\377\374\1w\333\356\203\25\274\344\3k\327\357" \
841 "\376\377\374\315\362\373\203\25\274\344\1\0\301\350\205\376\377\374\1" \
842 "*\310\351\203\25\274\344\3\261\354\367\376\377\374\316\363\374\203\25" \
843 "\274\344\1\0\301\350\205\376\377\374\1I\320\354\203\25\274\344\3\231" \
844 "\342\362\376\377\374\357\374\375\204\25\274\344\205\376\377\374\1M\323" \
845 "\357\203\25\274\344\1\206\340\363\202\376\377\374\1\31\275\345\203\25" \
846 "\274\344\1\335\366\373\204\376\377\374\1M\323\357\203\25\274\344\1\203" \
847 "\334\360\202\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374\204" \
848 "\376\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377\374" \
849 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\226" \
850 "\376\377\374\1\277\304\306\203]oz\1\211\230\236\205\376\377\374\1ew\202" \
851 "\203]oz\3\352\357\362\376\377\374\306\314\316\203]oz\1\202\221\227\205" \
852 "\376\377\374\1m\200\213\203]oz\3\341\346\351\376\377\374\317\324\327" \
853 "\203]oz\1as~\205o\202\215\1as~\203]oz\3\317\324\327\376\377\374\330\335" \
854 "\340\203]oz\1m\200\213\205\376\377\374\1\202\221\227\203]oz\3\306\314" \
855 "\316\376\377\374\336\367\374\203\25\274\344\1\0\276\345\205%\305\347" \
856 "\1\0\276\345\203\25\274\344\3\231\342\362\376\377\374\357\374\375\204" \
857 "\25\274\344\203\376\377\374\204\25\274\344\1\336\367\374\202\376\377" \
858 "\374\1#\304\346\203\25\274\344\1\316\363\374\202\376\377\374\1\0\301" \
859 "\350\203\25\274\344\1\336\367\374\204\376\377\374\1w\333\356\203\25\274" \
860 "\344\3k\327\357\376\377\374\302\357\367\203\25\274\344\1\31\275\345\205" \
861 "%\305\347\1\0\276\345\203\25\274\344\3\237\350\367\376\377\374\316\363" \
862 "\374\203\25\274\344\1\0\301\350\205\376\377\374\1I\320\354\203\25\274" \
863 "\344\3\231\342\362\376\377\374\357\374\375\204\25\274\344\205\376\377" \
864 "\374\1M\323\357\203\25\274\344\1\206\340\363\202\376\377\374\204\25\274" \
865 "\344\1#\304\346\204%\305\347\1\0\301\350\203\25\274\344\1w\333\356\202" \
866 "\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374\204\376\377\374" \
867 "\1\206\340\363\203\25\274\344\1k\327\357\226\376\377\374\377\377\377" \
868 "\377\377\377\377\377\377\377\377\377\223\377\377\377\226\376\377\374" \
869 "\1\277\304\306\203]oz\1\211\230\236\205\376\377\374\1ew\202\203]oz\3" \
870 "\352\357\362\376\377\374\306\314\316\203]oz\1\202\221\227\205\376\377" \
871 "\374\1m\200\213\203]oz\3\341\346\351\376\377\374\317\324\327\215]oz\3" \
872 "\317\324\327\376\377\374\330\335\340\203]oz\1m\200\213\205\376\377\374" \
873 "\1\202\221\227\203]oz\3\306\314\316\376\377\374\336\367\374\215\25\274" \
874 "\344\3\231\342\362\376\377\374\357\374\375\204\25\274\344\203\376\377" \
875 "\374\204\25\274\344\1\336\367\374\202\376\377\374\1#\304\346\203\25\274" \
876 "\344\1\316\363\374\202\376\377\374\1\0\301\350\203\25\274\344\1\336\367" \
877 "\374\204\376\377\374\1w\333\356\203\25\274\344\3k\327\357\376\377\374" \
878 "\302\357\367\215\25\274\344\3\237\350\367\376\377\374\316\363\374\203" \
879 "\25\274\344\1\0\301\350\205\376\377\374\1I\320\354\203\25\274\344\3\231" \
880 "\342\362\376\377\374\357\374\375\204\25\274\344\205\376\377\374\1M\323" \
881 "\357\203\25\274\344\1\206\340\363\202\376\377\374\215\25\274\344\1w\333" \
882 "\356\202\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374\204\376" \
883 "\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377\374\377" \
884 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\226\376" \
885 "\377\374\1\277\304\306\203]oz\1\211\230\236\205\376\377\374\1ew\202\203" \
886 "]oz\3\352\357\362\376\377\374\306\314\316\203]oz\1\202\221\227\205\376" \
887 "\377\374\1m\200\213\203]oz\3\341\346\351\376\377\374\317\324\327\215" \
888 "]oz\3\317\324\327\376\377\374\330\335\340\203]oz\1m\200\213\205\376\377" \
889 "\374\1\202\221\227\203]oz\3\306\314\316\376\377\374\336\367\374\215\25" \
890 "\274\344\3\231\342\362\376\377\374\357\374\375\204\25\274\344\203\376" \
891 "\377\374\204\25\274\344\1\336\367\374\202\376\377\374\1#\304\346\203" \
892 "\25\274\344\1\316\363\374\202\376\377\374\1\0\301\350\203\25\274\344" \
893 "\1\336\367\374\204\376\377\374\1w\333\356\203\25\274\344\3k\327\357\376" \
894 "\377\374\302\357\367\215\25\274\344\3\237\350\367\376\377\374\316\363" \
895 "\374\203\25\274\344\1\0\301\350\205\376\377\374\1I\320\354\203\25\274" \
896 "\344\3\231\342\362\376\377\374\357\374\375\204\25\274\344\205\376\377" \
897 "\374\1M\323\357\203\25\274\344\1\206\340\363\202\376\377\374\215\25\274" \
898 "\344\1w\333\356\202\376\377\374\1\0\301\350\203\25\274\344\1\336\367" \
899 "\374\204\376\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376" \
900 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
901 "\377\226\376\377\374\1\277\304\306\203]oz\1\211\230\236\205\376\377\374" \
902 "\1ew\202\203]oz\3\352\357\362\376\377\374\306\314\316\203]oz\1\202\221" \
903 "\227\205\376\377\374\1m\200\213\203]oz\3\341\346\351\376\377\374\317" \
904 "\324\327\215]oz\3\317\324\327\376\377\374\330\335\340\203]oz\1m\200\213" \
905 "\205\376\377\374\1\202\221\227\203]oz\3\306\314\316\376\377\374\336\367" \
906 "\374\215\25\274\344\3\231\342\362\376\377\374\357\374\375\204\25\274" \
907 "\344\203\376\377\374\204\25\274\344\1\336\367\374\202\376\377\374\1#" \
908 "\304\346\203\25\274\344\1\316\363\374\202\376\377\374\1\0\301\350\203" \
909 "\25\274\344\1\336\367\374\204\376\377\374\1w\333\356\203\25\274\344\3" \
910 "k\327\357\376\377\374\302\357\367\215\25\274\344\3\237\350\367\376\377" \
911 "\374\316\363\374\203\25\274\344\1\0\301\350\205\376\377\374\1I\320\354" \
912 "\203\25\274\344\3\231\342\362\376\377\374\357\374\375\204\25\274\344" \
913 "\205\376\377\374\1M\323\357\203\25\274\344\1\206\340\363\202\376\377" \
914 "\374\215\25\274\344\1w\333\356\202\376\377\374\1\0\301\350\203\25\274" \
915 "\344\1\336\367\374\204\376\377\374\1\206\340\363\203\25\274\344\1k\327" \
916 "\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
917 "\223\377\377\377\226\376\377\374\1\300\305\310\203]oz\1\211\230\236\205" \
918 "\376\377\374\1bt\177\203]oz\3\352\357\362\376\377\374\306\314\316\203" \
919 "]oz\1\202\221\227\205\376\377\374\1m\200\213\203]oz\3\341\346\351\376" \
920 "\377\374\317\324\327\203]oz\1p\203\216\211\335\343\345\3\366\370\364" \
921 "\376\377\374\330\335\340\203]oz\1m\200\213\205\376\377\374\1\202\221" \
922 "\227\203]oz\3\306\314\316\376\377\374\336\367\374\203\25\274\344\1\0" \
923 "\276\345\211\314\361\372\3\350\371\377\376\377\374\357\374\375\204\25" \
924 "\274\344\203\376\377\374\204\25\274\344\1\336\367\374\202\376\377\374" \
925 "\1#\304\346\203\25\274\344\1\316\363\374\202\376\377\374\1\0\301\350" \
926 "\203\25\274\344\1\336\367\374\204\376\377\374\1w\333\356\203\25\274\344" \
927 "\3k\327\357\376\377\374\302\357\367\203\25\274\344\1\0\302\351\211\314" \
928 "\361\372\3\356\373\374\376\377\374\316\363\374\203\25\274\344\1\0\301" \
929 "\350\205\376\377\374\1I\320\354\203\25\274\344\3\231\342\362\376\377" \
930 "\374\357\374\375\204\25\274\344\205\376\377\374\1M\323\357\203\25\274" \
931 "\344\1\206\340\363\202\376\377\374\204\25\274\344\1\301\356\366\210\314" \
932 "\361\372\1\337\370\375\202\376\377\374\1\0\301\350\203\25\274\344\1\336" \
933 "\367\374\204\376\377\374\1\206\340\363\203\25\274\344\1k\327\357\226" \
934 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
935 "\377\377\226\376\377\374\1\314\321\324\203]oz\2l\177\212\372\374\371" \
936 "\203\376\377\374\1\333\340\343\203]oz\4^p{\366\373\376\376\377\374\306" \
937 "\314\316\203]oz\1\202\221\227\205\376\377\374\1k~\211\203]oz\3\341\346" \
938 "\351\376\377\374\320\326\330\203]oz\1t\207\222\213\376\377\374\1\330" \
939 "\335\340\203]oz\1m\200\213\205\376\377\374\1\202\221\227\203]oz\3\306" \
940 "\314\316\376\377\374\336\367\374\203\25\274\344\1\0\276\345\213\376\377" \
941 "\374\1\357\374\375\204\25\274\344\203\376\377\374\204\25\274\344\1\336" \
942 "\367\374\202\376\377\374\1#\304\346\203\25\274\344\1\316\363\374\202" \
943 "\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374\204\376\377\374" \
944 "\1n\333\362\203\25\274\344\3k\327\357\376\377\374\303\361\370\203\25" \
945 "\274\344\1\0\304\352\213\376\377\374\1\332\363\370\203\25\274\344\1\0" \
946 "\276\345\205\376\377\374\1I\320\354\203\25\274\344\3\231\342\362\376" \
947 "\377\374\357\374\375\204\25\274\344\1\370\376\377\204\376\377\374\1M" \
948 "\323\357\203\25\274\344\1\206\340\363\202\376\377\374\204\25\274\344" \
949 "\1\356\373\374\213\376\377\374\1\0\301\350\203\25\274\344\1\335\366\373" \
950 "\204\376\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377" \
951 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
952 "\226\376\377\374\2\353\360\363^p{\203]oz\5\236\246\256\366\373\376\376" \
953 "\377\374\347\355\357w\212\226\203]oz\1~\215\223\202\376\377\374\1\306" \
954 "\314\316\203]oz\1\202\221\227\204\376\377\374\2\335\343\345^p{\203]o" \
955 "z\3\351\356\360\376\377\374\335\343\345\203]oz\2bt\177\343\350\353\212" \
956 "\376\377\374\1\330\335\340\203]oz\1m\200\213\205\376\377\374\1\202\221" \
957 "\227\203]oz\3\306\314\316\376\377\374\356\373\374\204\25\274\344\1\274" \
958 "\355\373\212\376\377\374\1\357\374\375\204\25\274\344\203\376\377\374" \
959 "\204\25\274\344\1\336\367\374\202\376\377\374\1#\304\346\203\25\274\344" \
960 "\1\316\363\374\202\376\377\374\1\0\301\350\203\25\274\344\1\336\367\374" \
961 "\203\376\377\374\2\367\375\377/\312\353\203\25\274\344\3\204\335\361" \
962 "\376\377\374\334\365\372\203\25\274\344\2\0\276\345\314\361\372\212\376" \
963 "\377\374\1\356\373\374\204\25\274\344\1\274\355\373\204\376\377\374\1" \
964 "I\320\354\203\25\274\344\4\231\342\362\376\377\374\370\376\377\0\276" \
965 "\345\203\25\274\344\1\257\351\365\204\376\377\374\1M\323\357\203\25\274" \
966 "\344\1\206\340\363\202\376\377\374\1\0\301\350\203\25\274\344\1\233\345" \
967 "\364\213\376\377\374\1#\304\346\203\25\274\344\1\207\341\364\204\376" \
968 "\377\374\1\206\340\363\203\25\274\344\1k\327\357\226\376\377\374\377" \
969 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\227\376" \
970 "\377\374\1\211\230\236\204]oz\3cu\200p\203\216^p{\204]oz\1\277\304\306" \
971 "\202\376\377\374\1\306\314\316\203]oz\1dv\201\203~\215\223\2v\211\225" \
972 "as~\203]oz\1n\201\214\202\376\377\374\2\371\373\370dv\201\203]oz\2bt" \
973 "\177w\212\226\205~\215\223\2\203\222\230\304\311\314\202\376\377\374" \
974 "\1\330\335\340\203]oz\1m\200\213\205\376\377\374\1\202\221\227\203]o" \
975 "z\1\306\314\316\202\376\377\374\1(\307\350\203\25\274\344\2\0\276\345" \
976 "*\310\351\205,\311\352\2""1\313\354\207\341\364\202\376\377\374\1\357" \
977 "\374\375\204\25\274\344\203\376\377\374\204\25\274\344\1\336\367\374" \
978 "\202\376\377\374\1#\304\346\203\25\274\344\1\316\363\374\202\376\377" \
979 "\374\1\0\301\350\203\25\274\344\1*\310\351\203,\311\352\1\0\302\351\204" \
980 "\25\274\344\4\274\355\373\376\377\374\370\376\377\0\302\351\203\25\274" \
981 "\344\2\31\275\345*\310\351\205,\311\352\2B\314\347\231\342\362\203\376" \
982 "\377\374\1%\305\347\203\25\274\344\2\0\276\345*\310\351\203,\311\352" \
983 "\1\0\301\350\203\25\274\344\1\231\342\362\202\376\377\374\1/\312\353" \
984 "\203\25\274\344\2\0\276\345*\310\351\203,\311\352\1\0\301\350\203\25" \
985 "\274\344\1\206\340\363\202\376\377\374\1G\317\353\204\25\274\344\1(\307" \
986 "\350\205,\311\352\3""1\313\354w\333\356\370\376\377\202\376\377\374\1" \
987 "M\323\357\204\25\274\344\1(\307\350\203,\311\352\1\0\304\352\203\25\274" \
988 "\344\1k\327\357\226\376\377\374\377\377\377\377\377\377\377\377\377\377" \
989 "\377\377\223\377\377\377\227\376\377\374\2\343\350\353ew\202\211]oz\2" \
990 "\177\216\224\373\375\372\202\376\377\374\1\306\314\316\214]oz\1\270\300" \
991 "\311\203\376\377\374\1\253\263\273\213]oz\4_q|\352\357\362\376\377\374" \
992 "\330\335\340\203]oz\1m\200\213\205\376\377\374\1\202\221\227\203]oz\1" \
993 "\306\314\316\202\376\377\374\1\233\345\364\214\25\274\344\3\301\356\366" \
994 "\376\377\374\357\374\375\204\25\274\344\203\376\377\374\204\25\274\344" \
995 "\1\336\367\374\202\376\377\374\1#\304\346\203\25\274\344\1\316\363\374" \
996 "\202\376\377\374\1\0\301\350\213\25\274\344\2,\311\352\370\376\377\202" \
997 "\376\377\374\1\206\340\363\214\25\274\344\1\316\363\374\202\376\377\374" \
998 "\1\233\345\364\214\25\274\344\1\231\342\362\202\376\377\374\1\250\347" \
999 "\371\214\25\274\344\1\206\340\363\202\376\377\374\1\273\354\371\214\25" \
1000 "\274\344\1\236\347\366\202\376\377\374\2\313\360\371\0\276\345\213\25" \
1001 "\274\344\1k\327\357\226\376\377\374\377\377\377\377\377\377\377\377\377" \
1002 "\377\377\377\223\377\377\377\230\376\377\374\2\325\332\334gy\204\207" \
1003 "]oz\2x\213\227\354\361\364\203\376\377\374\1\306\314\316\213]oz\1\225" \
1004 "\235\245\204\376\377\374\2\372\374\371~\221\235\213]oz\3\333\340\343" \
1005 "\376\377\374\342\347\352\203]oz\1t\207\222\205\376\377\374\1\211\230" \
1006 "\236\203]oz\1\317\324\327\203\376\377\374\1M\323\357\213\25\274\344\4" \
1007 "\237\350\367\376\377\374\367\375\377\0\276\345\202\25\274\344\1\0\276" \
1008 "\345\203\376\377\374\1\0\301\350\203\25\274\344\1\357\374\375\202\376" \
1009 "\377\374\1(\307\350\203\25\274\344\1\335\366\373\202\376\377\374\1\0" \
1010 "\302\351\212\25\274\344\2\0\301\350\333\364\371\203\376\377\374\2\370" \
1011 "\376\377G\317\353\213\25\274\344\1\273\354\371\203\376\377\374\1M\323" \
1012 "\357\213\25\274\344\1\237\350\367\203\376\377\374\1k\327\357\213\25\274" \
1013 "\344\1\231\342\362\203\376\377\374\1w\333\356\213\25\274\344\1\206\340" \
1014 "\363\203\376\377\374\1\207\341\364\213\25\274\344\1n\333\362\226\376" \
1015 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
1016 "\377\231\376\377\374\3\351\356\360\231\241\251bt\177\203]oz\3k~\211\257" \
1017 "\267\277\370\372\367\204\376\377\374\1\306\314\316\211]oz\3gy\204\261" \
1018 "\271\302\373\375\372\205\376\377\374\3\371\373\370\252\262\272dv\201" \
1019 "\210]oz\2x\213\227\372\374\371\202\376\377\374\4}\220\233]oz^p{\266\277" \
1020 "\307\205\376\377\374\5\311\316\321_q|]ozq\204\217\370\372\367\203\376" \
1021 "\377\374\3\370\376\377\211\342\365\0\301\350\210\25\274\344\2\0\304\352" \
1022 "\356\373\374\202\376\377\374\1M\323\357\202\25\274\344\1m\332\361\203" \
1023 "\376\377\374\1n\333\362\202\25\274\344\1L\322\356\203\376\377\374\1\206" \
1024 "\340\363\202\25\274\344\2B\314\347\370\376\377\202\376\377\374\1w\333" \
1025 "\356\210\25\274\344\3\0\276\345L\322\356\336\367\374\205\376\377\374" \
1026 "\3\370\376\377\204\335\361\0\301\350\210\25\274\344\2(\307\350\366\373" \
1027 "\376\203\376\377\374\3\370\376\377\211\342\365\0\301\350\210\25\274\344" \
1028 "\2#\304\346\356\373\374\204\376\377\374\2\233\345\364\0\302\351\210\25" \
1029 "\274\344\2\0\302\351\337\370\375\204\376\377\374\2\237\350\367#\304\346" \
1030 "\210\25\274\344\2\0\301\350\333\364\371\204\376\377\374\2\257\351\365" \
1031 "%\305\347\210\25\274\344\2\0\276\345\314\361\372\226\376\377\374\377" \
1032 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\233\376" \
1033 "\377\374\4\365\372\375\335\343\345\325\332\334\343\350\353\207\376\377" \
1034 "\374\1\306\314\316\203]oz\1u\210\224\204\324\331\333\2\335\343\345\373" \
1035 "\375\372\211\376\377\374\2\372\374\371\334\342\344\206\324\331\333\2" \
1036 "\331\336\341\372\374\371\203\376\377\374\3\373\375\372\332\337\342\343" \
1037 "\350\353\207\376\377\374\3\351\356\360\330\335\340\366\373\376\206\376" \
1038 "\377\374\2\370\376\377\316\363\374\206\273\354\371\2\302\357\367\366" \
1039 "\373\376\204\376\377\374\2\314\361\372\315\362\373\205\376\377\374\2" \
1040 "\316\363\374\313\360\371\205\376\377\374\3\332\363\370\312\357\370\370" \
1041 "\376\377\204\376\377\374\1\316\363\374\206\273\354\371\2\302\357\367" \
1042 "\356\373\374\211\376\377\374\2\370\376\377\314\361\372\206\273\354\371" \
1043 "\2\302\357\367\367\375\377\206\376\377\374\2\370\376\377\316\363\374" \
1044 "\206\273\354\371\2\302\357\367\366\373\376\206\376\377\374\2\370\376" \
1045 "\377\316\363\374\206\273\354\371\2\301\356\366\357\374\375\207\376\377" \
1046 "\374\1\332\363\370\206\273\354\371\2\301\356\366\356\373\374\207\376" \
1047 "\377\374\2\333\364\371\274\355\373\205\273\354\371\2\274\355\373\350" \
1048 "\371\377\227\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
1049 "\377\223\377\377\377\246\376\377\374\1\306\314\316\203]oz\1\202\221\227" \
1050 "\377\376\377\374\306\376\377\374\377\377\377\377\377\377\377\377\377" \
1051 "\377\377\377\223\377\377\377\246\376\377\374\1\306\314\316\203]oz\1\202" \
1052 "\221\227\377\376\377\374\306\376\377\374\377\377\377\377\377\377\377" \
1053 "\377\377\377\377\377\223\377\377\377\246\376\377\374\1\306\314\316\203" \
1054 "]oz\1\202\221\227\377\376\377\374\306\376\377\374\377\377\377\377\377" \
1055 "\377\377\377\377\377\377\377\223\377\377\377\246\376\377\374\1\306\314" \
1056 "\316\203]oz\1\202\221\227\377\376\377\374\306\376\377\374\377\377\377" \
1057 "\377\377\377\377\377\377\377\377\377\223\377\377\377\246\376\377\374" \
1058 "\1\315\322\325\203]oz\1\211\230\236\377\376\377\374\306\376\377\374\377" \
1059 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\246\376" \
1060 "\377\374\2\360\366\370i{\206\202]oz\1\302\307\312\377\376\377\374\306" \
1061 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
1062 "\377\377\247\376\377\374\3\357\365\367\313\320\322\335\343\345\377\376" \
1063 "\377\374\307\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
1064 "\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377" \
1065 "\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361" \
1066 "\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377" \
1067 "\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377" \
1068 "\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374" \
1069 "\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377" \
1070 "\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377" \
1071 "\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377" \
1072 "\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374" \
1073 "\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223" \
1074 "\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377" \
1075 "\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377" \
1076 "\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377" \
1077 "\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377" \
1078 "\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377\377" \
1079 "\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376\377" \
1080 "\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377\377" \
1081 "\223\377\377\377\377\376\377\374\361\376\377\374\377\377\377\377\377" \
1082 "\377\377\377\377\377\377\377\223\377\377\377\377\376\377\374\361\376" \
1083 "\377\374\377\377\377\377\377\377\377\377\377\377\377\377\223\377\377" \
1084 "\377\377\376\377\374\361\376\377\374\377\377\377\377\377\377\377\377" \
1085 "\377\377\377\377\223\377\377\377\377\376\377\374\361\376\377\374\377" \
1086 "\377\377\377\377\377\377\377\377\377\377\377\223\377\377\377\377\376" \
1087 "\377\374\361\376\377\374\377\377\377\377\377\377\377\377\377\377\377" \
1088 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1089 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1090 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1091 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1092 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1093 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1094 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1095 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1096 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1097 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1098 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1099 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1100 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1101 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1102 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1103 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1104 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1105 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1106 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1107 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1108 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1109 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1110 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1111 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1112 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1113 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1114 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1115 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1116 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1117 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1118 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1119 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1120 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1121 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1122 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1123 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1124 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1125 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1126 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1127 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1128 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1129 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1130 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1131 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1132 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1133 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1134 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1135 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1136 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1137 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1138 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1139 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1140 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1141 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1142 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1143 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1144 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1145 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1146 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1147 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1148 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1149 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1150 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1151 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1152 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1153 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1154 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1155 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1156 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1157 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1158 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1159 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1160 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1161 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1162 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1163 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1164 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1165 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1166 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1167 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1168 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1169 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1170 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1171 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1172 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1173 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1174 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1175 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1176 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1177 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1178 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1179 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1180 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1181 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1182 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1183 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1184 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1185 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1186 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1187 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1188 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1189 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1190 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1191 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1192 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1193 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1194 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1195 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1196 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1197 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1198 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1199 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1200 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1201 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1202 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1203 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1204 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1205 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1206 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1207 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1208 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1209 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1210 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1211 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1212 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1213 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1214 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1215 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1216 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1217 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1218 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1219 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1220 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1221 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1222 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1223 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1224 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1225 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1226 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1227 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1228 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1229 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1230 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1231 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1232 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1233 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1234 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1235 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1236 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1237 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1238 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1239 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1240 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1241 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1242 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1243 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1244 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1245 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1246 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1247 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1248 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1249 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1250 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1251 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1252 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1253 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1254 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1255 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1256 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
1257 "\377\377\377\377\232\377\377\377")
1258
1259
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
new file mode 100644
index 0000000000..1cab2962b2
--- /dev/null
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -0,0 +1,111 @@
1SUMMARY = "Userspace framebuffer boot logo based on usplash."
2DESCRIPTION = "PSplash is a userspace graphical boot splash screen for mainly embedded Linux devices supporting a 16bpp or 32bpp framebuffer. It has few dependencies (just libc), supports basic images and text and handles rotation. Its visual look is configurable by basic source changes. Also included is a 'client' command utility for sending information to psplash such as boot progress information."
3HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/psplash"
4SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
7
8SRCREV = "afd4e228c606a9998feae44a3fed4474803240b7"
9PV = "0.1+git${SRCPV}"
10PR = "r15"
11
12SRC_URI = "git://git.yoctoproject.org/${BPN} \
13 file://psplash-init \
14 ${SPLASH_IMAGES}"
15
16SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
17
18python __anonymous() {
19 oldpkgs = d.getVar("PACKAGES", True).split()
20 splashfiles = d.getVar('SPLASH_IMAGES', True).split()
21 pkgs = []
22 localpaths = []
23 haspng = False
24 for uri in splashfiles:
25 fetcher = bb.fetch2.Fetch([uri], d)
26 flocal = os.path.basename(fetcher.localpath(uri))
27 fbase = os.path.splitext(flocal)[0]
28 outsuffix = fetcher.ud[uri].parm.get("outsuffix")
29 if not outsuffix:
30 if fbase.startswith("psplash-"):
31 outsuffix = fbase[8:]
32 else:
33 outsuffix = fbase
34 if outsuffix.endswith('-img'):
35 outsuffix = outsuffix[:-4]
36 outname = "psplash-%s" % outsuffix
37 if outname == '' or outname in oldpkgs:
38 bb.fatal("The output name '%s' derived from the URI %s is not valid, please specify the outsuffix parameter" % (outname, uri))
39 else:
40 pkgs.append(outname)
41 if flocal.endswith(".png"):
42 haspng = True
43 localpaths.append(flocal)
44
45 # Set these so that we have less work to do in do_compile and do_install_append
46 d.setVar("SPLASH_INSTALL", " ".join(pkgs))
47 d.setVar("SPLASH_LOCALPATHS", " ".join(localpaths))
48
49 if haspng:
50 d.appendVar("DEPENDS", " gdk-pixbuf-native")
51
52 d.prependVar("PACKAGES", "%s " % (" ".join(pkgs)))
53 mlprefix = d.getVar('MLPREFIX', True) or ''
54 pn = d.getVar('PN', True) or ''
55 for p in pkgs:
56 ep = '%s%s' % (mlprefix, p)
57 epsplash = '%s%s' % (mlprefix, 'psplash')
58 d.setVar("FILES_%s" % ep, "${bindir}/%s" % p)
59 d.setVar("ALTERNATIVE_%s" % ep, 'psplash')
60 d.setVarFlag("ALTERNATIVE_TARGET_%s" % ep, 'psplash', '${bindir}/%s' % p)
61 d.appendVar("RDEPENDS_%s" % ep, " %s" % pn)
62 if p == "psplash-default":
63 d.appendVar("RRECOMMENDS_%s" % pn, " %s" % ep)
64}
65
66S = "${WORKDIR}/git"
67
68inherit autotools pkgconfig update-rc.d update-alternatives
69
70ALTERNATIVE_PRIORITY = "100"
71ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
72
73python do_compile () {
74 import shutil
75
76 # Build a separate executable for each splash image
77 workdir = d.getVar('WORKDIR', True)
78 convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
79 destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
80 localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
81 outputfiles = d.getVar('SPLASH_INSTALL', True).split()
82 for localfile, outputfile in zip(localfiles, outputfiles):
83 if localfile.endswith(".png"):
84 outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))
85 print(outp[1])
86 fbase = os.path.splitext(localfile)[0]
87 shutil.copyfile("%s-img.h" % fbase, destfile)
88 else:
89 shutil.copyfile(os.path.join(workdir, localfile), destfile)
90 # For some reason just updating the header is not enough, we have to touch the .c
91 # file in order to get it to rebuild
92 os.utime("%s/psplash.c" % d.getVar('S', True), None)
93 bb.build.exec_func("oe_runmake", d)
94 shutil.copyfile("psplash", outputfile)
95}
96
97do_install_append() {
98 install -d ${D}/mnt/.psplash/
99 install -d ${D}${sysconfdir}/init.d/
100 install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
101 install -d ${D}${bindir}
102 for i in ${SPLASH_INSTALL} ; do
103 install -m 0755 $i ${D}${bindir}/$i
104 done
105 rm -f ${D}${bindir}/psplash
106}
107
108FILES_${PN} += "/mnt/.psplash"
109
110INITSCRIPT_NAME = "psplash.sh"
111INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
diff --git a/meta/recipes-core/readline/files/configure-fix.patch b/meta/recipes-core/readline/files/configure-fix.patch
new file mode 100644
index 0000000000..be60a9861e
--- /dev/null
+++ b/meta/recipes-core/readline/files/configure-fix.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Pending
2
3Without this it fails to link against libtermcap causing various missing symbols
4issues.
5
6RP - 8/10/08
7
8Index: readline-5.2/configure.in
9===================================================================
10--- readline-5.2.orig/configure.in 2008-10-08 09:58:52.000000000 +0100
11+++ readline-5.2/configure.in 2008-10-08 09:59:03.000000000 +0100
12@@ -211,10 +211,10 @@
13 AC_MSG_CHECKING(configuration for building shared libraries)
14 eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
15
16-# case "$SHLIB_LIBS" in
17-# *curses*|*termcap*|*termlib*) ;;
18-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
19-# esac
20+ case "$SHLIB_LIBS" in
21+ *curses*|*termcap*|*termlib*) ;;
22+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
23+ esac
24
25 AC_SUBST(SHOBJ_CC)
26 AC_SUBST(SHOBJ_CFLAGS)
diff --git a/meta/recipes-core/readline/readline-5.2/acinclude.m4 b/meta/recipes-core/readline/readline-5.2/acinclude.m4
new file mode 100644
index 0000000000..8a45f99084
--- /dev/null
+++ b/meta/recipes-core/readline/readline-5.2/acinclude.m4
@@ -0,0 +1,1815 @@
1dnl
2dnl Bash specific tests
3dnl
4dnl Some derived from PDKSH 5.1.3 autoconf tests
5dnl
6
7AC_DEFUN([BASH_C_LONG_LONG],
8[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
9[if test "$GCC" = yes; then
10 ac_cv_c_long_long=yes
11else
12AC_TRY_RUN([
13int
14main()
15{
16long long foo = 0;
17exit(sizeof(long long) < sizeof(long));
18}
19], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
20fi])
21if test $ac_cv_c_long_long = yes; then
22 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
23fi
24])
25
26dnl
27dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
28dnl (< changed to <=) added.
29dnl
30AC_DEFUN([BASH_C_LONG_DOUBLE],
31[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
32[if test "$GCC" = yes; then
33 ac_cv_c_long_double=yes
34else
35AC_TRY_RUN([
36int
37main()
38{
39 /* The Stardent Vistra knows sizeof(long double), but does not
40 support it. */
41 long double foo = 0.0;
42 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
43 /* On IRIX 5.3, the compiler converts long double to double with a warning,
44 but compiles this successfully. */
45 exit(sizeof(long double) <= sizeof(double));
46}
47], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
48fi])
49if test $ac_cv_c_long_double = yes; then
50 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
51fi
52])
53
54dnl
55dnl Check for <inttypes.h>. This is separated out so that it can be
56dnl AC_REQUIREd.
57dnl
58dnl BASH_HEADER_INTTYPES
59AC_DEFUN([BASH_HEADER_INTTYPES],
60[
61 AC_CHECK_HEADERS(inttypes.h)
62])
63
64dnl
65dnl check for typedef'd symbols in header files, but allow the caller to
66dnl specify the include files to be checked in addition to the default
67dnl
68dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
69AC_DEFUN([BASH_CHECK_TYPE],
70[
71AC_REQUIRE([AC_HEADER_STDC])dnl
72AC_REQUIRE([BASH_HEADER_INTTYPES])
73AC_MSG_CHECKING(for $1)
74AC_CACHE_VAL(bash_cv_type_$1,
75[AC_EGREP_CPP($1, [#include <sys/types.h>
76#if STDC_HEADERS
77#include <stdlib.h>
78#include <stddef.h>
79#endif
80#if HAVE_INTTYPES_H
81#include <inttypes.h>
82#endif
83$2
84], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
85AC_MSG_RESULT($bash_cv_type_$1)
86ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
87 AC_DEFINE($4)
88 fi])
89if test $bash_cv_type_$1 = no; then
90 AC_DEFINE_UNQUOTED($1, $3)
91fi
92])
93
94dnl
95dnl BASH_CHECK_DECL(FUNC)
96dnl
97dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
98dnl AC_CHECK_DECL
99dnl
100AC_DEFUN([BASH_CHECK_DECL],
101[
102AC_REQUIRE([AC_HEADER_STDC])
103AC_REQUIRE([BASH_HEADER_INTTYPES])
104AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
105[AC_TRY_LINK(
106[
107#if STDC_HEADERS
108# include <stdlib.h>
109#endif
110#if HAVE_INTTYPES_H
111# include <inttypes.h>
112#endif
113],
114[return !$1;],
115bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
116bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
117if test $bash_cv_decl_$1 = yes; then
118 AC_DEFINE_UNQUOTED($bash_tr_func, 1)
119else
120 AC_DEFINE_UNQUOTED($bash_tr_func, 0)
121fi
122])
123
124AC_DEFUN([BASH_DECL_PRINTF],
125[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
126AC_CACHE_VAL(bash_cv_printf_declared,
127[AC_TRY_RUN([
128#include <stdio.h>
129#ifdef __STDC__
130typedef int (*_bashfunc)(const char *, ...);
131#else
132typedef int (*_bashfunc)();
133#endif
134main()
135{
136_bashfunc pf;
137pf = (_bashfunc) printf;
138exit(pf == 0);
139}
140], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
141 [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
142 bash_cv_printf_declared=yes]
143)])
144AC_MSG_RESULT($bash_cv_printf_declared)
145if test $bash_cv_printf_declared = yes; then
146AC_DEFINE(PRINTF_DECLARED)
147fi
148])
149
150AC_DEFUN([BASH_DECL_SBRK],
151[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
152AC_CACHE_VAL(bash_cv_sbrk_declared,
153[AC_EGREP_HEADER(sbrk, unistd.h,
154 bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
155AC_MSG_RESULT($bash_cv_sbrk_declared)
156if test $bash_cv_sbrk_declared = yes; then
157AC_DEFINE(SBRK_DECLARED)
158fi
159])
160
161dnl
162dnl Check for sys_siglist[] or _sys_siglist[]
163dnl
164AC_DEFUN([BASH_DECL_UNDER_SYS_SIGLIST],
165[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
166AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
167[AC_TRY_COMPILE([
168#include <sys/types.h>
169#include <signal.h>
170#ifdef HAVE_UNISTD_H
171#include <unistd.h>
172#endif], [ char *msg = _sys_siglist[2]; ],
173 bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
174 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
175AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
176if test $bash_cv_decl_under_sys_siglist = yes; then
177AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
178fi
179])
180
181AC_DEFUN([BASH_UNDER_SYS_SIGLIST],
182[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
183AC_MSG_CHECKING([for _sys_siglist in system C library])
184AC_CACHE_VAL(bash_cv_under_sys_siglist,
185[AC_TRY_RUN([
186#include <sys/types.h>
187#include <signal.h>
188#ifdef HAVE_UNISTD_H
189#include <unistd.h>
190#endif
191#ifndef UNDER_SYS_SIGLIST_DECLARED
192extern char *_sys_siglist[];
193#endif
194main()
195{
196char *msg = (char *)_sys_siglist[2];
197exit(msg == 0);
198}],
199 bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
200 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
201 bash_cv_under_sys_siglist=no])])
202AC_MSG_RESULT($bash_cv_under_sys_siglist)
203if test $bash_cv_under_sys_siglist = yes; then
204AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
205fi
206])
207
208AC_DEFUN([BASH_SYS_SIGLIST],
209[
210AC_CHECK_DECLS([sys_siglist])
211AC_MSG_CHECKING([for sys_siglist in system C library])
212AC_CACHE_VAL(bash_cv_sys_siglist,
213[AC_TRY_RUN([
214#include <sys/types.h>
215#include <signal.h>
216#ifdef HAVE_UNISTD_H
217#include <unistd.h>
218#endif
219#ifndef HAVE_DECL_SYS_SIGLIST
220extern char *sys_siglist[];
221#endif
222main()
223{
224char *msg = sys_siglist[2];
225exit(msg == 0);
226}],
227 bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
228 [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
229 bash_cv_sys_siglist=no])])
230AC_MSG_RESULT($bash_cv_sys_siglist)
231if test $bash_cv_sys_siglist = yes; then
232AC_DEFINE(HAVE_SYS_SIGLIST)
233fi
234])
235
236dnl Check for the various permutations of sys_siglist and make sure we
237dnl compile in siglist.o if they're not defined
238AC_DEFUN([BASH_CHECK_SYS_SIGLIST], [
239AC_REQUIRE([BASH_SYS_SIGLIST])
240AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
241AC_REQUIRE([BASH_FUNC_STRSIGNAL])
242if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
243 SIGLIST_O=siglist.o
244else
245 SIGLIST_O=
246fi
247AC_SUBST([SIGLIST_O])
248])
249
250dnl Check for sys_errlist[] and sys_nerr, check for declaration
251AC_DEFUN([BASH_SYS_ERRLIST],
252[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
253AC_CACHE_VAL(bash_cv_sys_errlist,
254[AC_TRY_LINK([#include <errno.h>],
255[extern char *sys_errlist[];
256 extern int sys_nerr;
257 char *msg = sys_errlist[sys_nerr - 1];],
258 bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
259AC_MSG_RESULT($bash_cv_sys_errlist)
260if test $bash_cv_sys_errlist = yes; then
261AC_DEFINE(HAVE_SYS_ERRLIST)
262fi
263])
264
265dnl
266dnl Check if dup2() does not clear the close on exec flag
267dnl
268AC_DEFUN([BASH_FUNC_DUP2_CLOEXEC_CHECK],
269[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
270AC_CACHE_VAL(bash_cv_dup2_broken,
271[AC_TRY_RUN([
272#include <sys/types.h>
273#include <fcntl.h>
274main()
275{
276 int fd1, fd2, fl;
277 fd1 = open("/dev/null", 2);
278 if (fcntl(fd1, 2, 1) < 0)
279 exit(1);
280 fd2 = dup2(fd1, 1);
281 if (fd2 < 0)
282 exit(2);
283 fl = fcntl(fd2, 1, 0);
284 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
285 exit(fl != 1);
286}
287], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
288 [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
289 bash_cv_dup2_broken=no])
290])
291AC_MSG_RESULT($bash_cv_dup2_broken)
292if test $bash_cv_dup2_broken = yes; then
293AC_DEFINE(DUP2_BROKEN)
294fi
295])
296
297AC_DEFUN([BASH_FUNC_STRSIGNAL],
298[AC_MSG_CHECKING([for the existence of strsignal])
299AC_CACHE_VAL(bash_cv_have_strsignal,
300[AC_TRY_LINK([#include <sys/types.h>
301#include <signal.h>],
302[char *s = (char *)strsignal(2);],
303 bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
304AC_MSG_RESULT($bash_cv_have_strsignal)
305if test $bash_cv_have_strsignal = yes; then
306AC_DEFINE(HAVE_STRSIGNAL)
307fi
308])
309
310dnl Check to see if opendir will open non-directories (not a nice thing)
311AC_DEFUN([BASH_FUNC_OPENDIR_CHECK],
312[AC_REQUIRE([AC_HEADER_DIRENT])dnl
313AC_MSG_CHECKING(if opendir() opens non-directories)
314AC_CACHE_VAL(bash_cv_opendir_not_robust,
315[AC_TRY_RUN([
316#include <stdio.h>
317#include <sys/types.h>
318#include <fcntl.h>
319#ifdef HAVE_UNISTD_H
320# include <unistd.h>
321#endif /* HAVE_UNISTD_H */
322#if defined(HAVE_DIRENT_H)
323# include <dirent.h>
324#else
325# define dirent direct
326# ifdef HAVE_SYS_NDIR_H
327# include <sys/ndir.h>
328# endif /* SYSNDIR */
329# ifdef HAVE_SYS_DIR_H
330# include <sys/dir.h>
331# endif /* SYSDIR */
332# ifdef HAVE_NDIR_H
333# include <ndir.h>
334# endif
335#endif /* HAVE_DIRENT_H */
336main()
337{
338DIR *dir;
339int fd, err;
340err = mkdir("/tmp/bash-aclocal", 0700);
341if (err < 0) {
342 perror("mkdir");
343 exit(1);
344}
345unlink("/tmp/bash-aclocal/not_a_directory");
346fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
347write(fd, "\n", 1);
348close(fd);
349dir = opendir("/tmp/bash-aclocal/not_a_directory");
350unlink("/tmp/bash-aclocal/not_a_directory");
351rmdir("/tmp/bash-aclocal");
352exit (dir == 0);
353}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
354 [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
355 bash_cv_opendir_not_robust=no]
356)])
357AC_MSG_RESULT($bash_cv_opendir_not_robust)
358if test $bash_cv_opendir_not_robust = yes; then
359AC_DEFINE(OPENDIR_NOT_ROBUST)
360fi
361])
362
363dnl
364AH_TEMPLATE([VOID_SIGHANDLER], [Define if signal handlers return type void])
365AC_DEFUN([BASH_TYPE_SIGHANDLER],
366[AC_MSG_CHECKING([whether signal handlers are of type void])
367AC_CACHE_VAL(bash_cv_void_sighandler,
368[AC_TRY_COMPILE([#include <sys/types.h>
369#include <signal.h>
370#ifdef signal
371#undef signal
372#endif
373#ifdef __cplusplus
374extern "C"
375#endif
376void (*signal ()) ();],
377[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
378AC_MSG_RESULT($bash_cv_void_sighandler)
379if test $bash_cv_void_sighandler = yes; then
380AC_DEFINE(VOID_SIGHANDLER)
381fi
382])
383
384dnl
385dnl A signed 16-bit integer quantity
386dnl
387AC_DEFUN([BASH_TYPE_BITS16_T],
388[
389if test "$ac_cv_sizeof_short" = 2; then
390 AC_CHECK_TYPE(bits16_t, short)
391elif test "$ac_cv_sizeof_char" = 2; then
392 AC_CHECK_TYPE(bits16_t, char)
393else
394 AC_CHECK_TYPE(bits16_t, short)
395fi
396])
397
398dnl
399dnl An unsigned 16-bit integer quantity
400dnl
401AC_DEFUN([BASH_TYPE_U_BITS16_T],
402[
403if test "$ac_cv_sizeof_short" = 2; then
404 AC_CHECK_TYPE(u_bits16_t, unsigned short)
405elif test "$ac_cv_sizeof_char" = 2; then
406 AC_CHECK_TYPE(u_bits16_t, unsigned char)
407else
408 AC_CHECK_TYPE(u_bits16_t, unsigned short)
409fi
410])
411
412dnl
413dnl A signed 32-bit integer quantity
414dnl
415AC_DEFUN([BASH_TYPE_BITS32_T],
416[
417if test "$ac_cv_sizeof_int" = 4; then
418 AC_CHECK_TYPE(bits32_t, int)
419elif test "$ac_cv_sizeof_long" = 4; then
420 AC_CHECK_TYPE(bits32_t, long)
421else
422 AC_CHECK_TYPE(bits32_t, int)
423fi
424])
425
426dnl
427dnl An unsigned 32-bit integer quantity
428dnl
429AC_DEFUN([BASH_TYPE_U_BITS32_T],
430[
431if test "$ac_cv_sizeof_int" = 4; then
432 AC_CHECK_TYPE(u_bits32_t, unsigned int)
433elif test "$ac_cv_sizeof_long" = 4; then
434 AC_CHECK_TYPE(u_bits32_t, unsigned long)
435else
436 AC_CHECK_TYPE(u_bits32_t, unsigned int)
437fi
438])
439
440AC_DEFUN([BASH_TYPE_PTRDIFF_T],
441[
442if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
443 AC_CHECK_TYPE(ptrdiff_t, int)
444elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
445 AC_CHECK_TYPE(ptrdiff_t, long)
446elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
447 AC_CHECK_TYPE(ptrdiff_t, [long long])
448else
449 AC_CHECK_TYPE(ptrdiff_t, int)
450fi
451])
452
453dnl
454dnl A signed 64-bit quantity
455dnl
456AC_DEFUN([BASH_TYPE_BITS64_T],
457[
458if test "$ac_cv_sizeof_char_p" = 8; then
459 AC_CHECK_TYPE(bits64_t, char *)
460elif test "$ac_cv_sizeof_double" = 8; then
461 AC_CHECK_TYPE(bits64_t, double)
462elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
463 AC_CHECK_TYPE(bits64_t, [long long])
464elif test "$ac_cv_sizeof_long" = 8; then
465 AC_CHECK_TYPE(bits64_t, long)
466else
467 AC_CHECK_TYPE(bits64_t, double)
468fi
469])
470
471AC_DEFUN([BASH_TYPE_LONG_LONG],
472[
473AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
474[AC_TRY_LINK([
475long long ll = 1; int i = 63;],
476[
477long long llm = (long long) -1;
478return ll << i | ll >> i | llm / ll | llm % ll;
479], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
480if test "$bash_cv_type_long_long" = 'long long'; then
481 AC_DEFINE(HAVE_LONG_LONG, 1)
482fi
483])
484
485AC_DEFUN([BASH_TYPE_UNSIGNED_LONG_LONG],
486[
487AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
488[AC_TRY_LINK([
489unsigned long long ull = 1; int i = 63;],
490[
491unsigned long long ullmax = (unsigned long long) -1;
492return ull << i | ull >> i | ullmax / ull | ullmax % ull;
493], bash_cv_type_unsigned_long_long='unsigned long long',
494 bash_cv_type_unsigned_long_long='unsigned long')])
495if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
496 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
497fi
498])
499
500dnl
501dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
502dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
503dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
504dnl matters, this just checks for rlim_t, quad_t, or long.
505dnl
506AC_DEFUN([BASH_TYPE_RLIMIT],
507[AC_MSG_CHECKING(for size and type of struct rlimit fields)
508AC_CACHE_VAL(bash_cv_type_rlimit,
509[AC_TRY_COMPILE([#include <sys/types.h>
510#include <sys/resource.h>],
511[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
512AC_TRY_RUN([
513#include <sys/types.h>
514#include <sys/time.h>
515#include <sys/resource.h>
516main()
517{
518#ifdef HAVE_QUAD_T
519 struct rlimit rl;
520 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
521 exit(0);
522#endif
523 exit(1);
524}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
525 [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
526 bash_cv_type_rlimit=long])])
527])
528AC_MSG_RESULT($bash_cv_type_rlimit)
529if test $bash_cv_type_rlimit = quad_t; then
530AC_DEFINE(RLIMTYPE, quad_t)
531elif test $bash_cv_type_rlimit = rlim_t; then
532AC_DEFINE(RLIMTYPE, rlim_t)
533fi
534])
535
536AC_DEFUN([BASH_FUNC_LSTAT],
537[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
538dnl inline function in <sys/stat.h>.
539AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
540[AC_TRY_LINK([
541#include <sys/types.h>
542#include <sys/stat.h>
543],[ lstat(".",(struct stat *)0); ],
544bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
545if test $bash_cv_func_lstat = yes; then
546 AC_DEFINE(HAVE_LSTAT)
547fi
548])
549
550AC_DEFUN([BASH_FUNC_INET_ATON],
551[
552AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
553[AC_TRY_LINK([
554#include <sys/types.h>
555#include <netinet/in.h>
556#include <arpa/inet.h>
557struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
558bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
559if test $bash_cv_func_inet_aton = yes; then
560 AC_DEFINE(HAVE_INET_ATON)
561else
562 AC_LIBOBJ(inet_aton)
563fi
564])
565
566AC_DEFUN([BASH_FUNC_GETENV],
567[AC_MSG_CHECKING(to see if getenv can be redefined)
568AC_CACHE_VAL(bash_cv_getenv_redef,
569[AC_TRY_RUN([
570#ifdef HAVE_UNISTD_H
571# include <unistd.h>
572#endif
573#ifndef __STDC__
574# ifndef const
575# define const
576# endif
577#endif
578char *
579getenv (name)
580#if defined (__linux__) || defined (__bsdi__) || defined (convex)
581 const char *name;
582#else
583 char const *name;
584#endif /* !__linux__ && !__bsdi__ && !convex */
585{
586return "42";
587}
588main()
589{
590char *s;
591/* The next allows this program to run, but does not allow bash to link
592 when it redefines getenv. I'm not really interested in figuring out
593 why not. */
594#if defined (NeXT)
595exit(1);
596#endif
597s = getenv("ABCDE");
598exit(s == 0); /* force optimizer to leave getenv in */
599}
600], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
601 [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
602 bash_cv_getenv_redef=yes]
603)])
604AC_MSG_RESULT($bash_cv_getenv_redef)
605if test $bash_cv_getenv_redef = yes; then
606AC_DEFINE(CAN_REDEFINE_GETENV)
607fi
608])
609
610# We should check for putenv before calling this
611AC_DEFUN([BASH_FUNC_STD_PUTENV],
612[
613AC_REQUIRE([AC_HEADER_STDC])
614AC_REQUIRE([AC_C_PROTOTYPES])
615AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
616[AC_TRY_LINK([
617#if STDC_HEADERS
618#include <stdlib.h>
619#include <stddef.h>
620#endif
621#ifndef __STDC__
622# ifndef const
623# define const
624# endif
625#endif
626#ifdef PROTOTYPES
627extern int putenv (char *);
628#else
629extern int putenv ();
630#endif
631],
632[return (putenv == 0);],
633bash_cv_std_putenv=yes, bash_cv_std_putenv=no
634)])
635if test $bash_cv_std_putenv = yes; then
636AC_DEFINE(HAVE_STD_PUTENV)
637fi
638])
639
640# We should check for unsetenv before calling this
641AC_DEFUN([BASH_FUNC_STD_UNSETENV],
642[
643AC_REQUIRE([AC_HEADER_STDC])
644AC_REQUIRE([AC_C_PROTOTYPES])
645AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
646[AC_TRY_LINK([
647#if STDC_HEADERS
648#include <stdlib.h>
649#include <stddef.h>
650#endif
651#ifndef __STDC__
652# ifndef const
653# define const
654# endif
655#endif
656#ifdef PROTOTYPES
657extern int unsetenv (const char *);
658#else
659extern int unsetenv ();
660#endif
661],
662[return (unsetenv == 0);],
663bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
664)])
665if test $bash_cv_std_unsetenv = yes; then
666AC_DEFINE(HAVE_STD_UNSETENV)
667fi
668])
669
670AC_DEFUN([BASH_FUNC_ULIMIT_MAXFDS],
671[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
672AC_CACHE_VAL(bash_cv_ulimit_maxfds,
673[AC_TRY_RUN([
674main()
675{
676long maxfds = ulimit(4, 0L);
677exit (maxfds == -1L);
678}
679], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
680 [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
681 bash_cv_ulimit_maxfds=no]
682)])
683AC_MSG_RESULT($bash_cv_ulimit_maxfds)
684if test $bash_cv_ulimit_maxfds = yes; then
685AC_DEFINE(ULIMIT_MAXFDS)
686fi
687])
688
689AC_DEFUN([BASH_FUNC_GETCWD],
690[AC_MSG_CHECKING([if getcwd() calls popen()])
691AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
692[AC_TRY_RUN([
693#include <stdio.h>
694#ifdef HAVE_UNISTD_H
695#include <unistd.h>
696#endif
697
698#ifndef __STDC__
699#ifndef const
700#define const
701#endif
702#endif
703
704int popen_called;
705
706FILE *
707popen(command, type)
708 const char *command;
709 const char *type;
710{
711 popen_called = 1;
712 return (FILE *)NULL;
713}
714
715FILE *_popen(command, type)
716 const char *command;
717 const char *type;
718{
719 return (popen (command, type));
720}
721
722int
723pclose(stream)
724FILE *stream;
725{
726 return 0;
727}
728
729int
730_pclose(stream)
731FILE *stream;
732{
733 return 0;
734}
735
736main()
737{
738 char lbuf[32];
739 popen_called = 0;
740 getcwd(lbuf, 32);
741 exit (popen_called);
742}
743], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
744 [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
745 bash_cv_getcwd_calls_popen=no]
746)])
747AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
748if test $bash_cv_getcwd_calls_popen = yes; then
749AC_DEFINE(GETCWD_BROKEN)
750AC_LIBOBJ(getcwd)
751fi
752])
753
754dnl
755dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
756dnl system, we can't use AC_PREREQ
757dnl
758AC_DEFUN([BASH_FUNC_GETHOSTBYNAME],
759[if test "X$bash_cv_have_gethostbyname" = "X"; then
760_bash_needmsg=yes
761else
762AC_MSG_CHECKING(for gethostbyname in socket library)
763_bash_needmsg=
764fi
765AC_CACHE_VAL(bash_cv_have_gethostbyname,
766[AC_TRY_LINK([#include <netdb.h>],
767[ struct hostent *hp;
768 hp = gethostbyname("localhost");
769], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
770)
771if test "X$_bash_needmsg" = Xyes; then
772 AC_MSG_CHECKING(for gethostbyname in socket library)
773fi
774AC_MSG_RESULT($bash_cv_have_gethostbyname)
775if test "$bash_cv_have_gethostbyname" = yes; then
776AC_DEFINE(HAVE_GETHOSTBYNAME)
777fi
778])
779
780AC_DEFUN([BASH_FUNC_FNMATCH_EXTMATCH],
781[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
782AC_CACHE_VAL(bash_cv_fnm_extmatch,
783[AC_TRY_RUN([
784#include <fnmatch.h>
785
786main()
787{
788#ifdef FNM_EXTMATCH
789 exit (0);
790#else
791 exit (1);
792#endif
793}
794], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
795 [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
796 bash_cv_fnm_extmatch=no])
797])
798AC_MSG_RESULT($bash_cv_fnm_extmatch)
799if test $bash_cv_fnm_extmatch = yes; then
800AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
801fi
802])
803
804AH_TEMPLATE([HAVE_POSIX_SIGSETJMP], [Define if we POSIX-style sigsetjmp/siglongjmp are available])
805AC_DEFUN([BASH_FUNC_POSIX_SETJMP],
806[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
807AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
808AC_CACHE_VAL(bash_cv_func_sigsetjmp,
809[AC_TRY_RUN([
810#ifdef HAVE_UNISTD_H
811#include <unistd.h>
812#endif
813#include <sys/types.h>
814#include <signal.h>
815#include <setjmp.h>
816
817main()
818{
819#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
820exit (1);
821#else
822
823int code;
824sigset_t set, oset;
825sigjmp_buf xx;
826
827/* get the mask */
828sigemptyset(&set);
829sigemptyset(&oset);
830sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
831sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
832
833/* save it */
834code = sigsetjmp(xx, 1);
835if (code)
836 exit(0); /* could get sigmask and compare to oset here. */
837
838/* change it */
839sigaddset(&set, SIGINT);
840sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
841
842/* and siglongjmp */
843siglongjmp(xx, 10);
844exit(1);
845#endif
846}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
847 [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
848 bash_cv_func_sigsetjmp=missing]
849)])
850AC_MSG_RESULT($bash_cv_func_sigsetjmp)
851if test $bash_cv_func_sigsetjmp = present; then
852AC_DEFINE(HAVE_POSIX_SIGSETJMP)
853fi
854])
855
856AH_TEMPLATE([STRCOLL_BROKEN], [Define if strcoll is broken with respect to strcmp in the default locale.])
857AC_DEFUN([BASH_FUNC_STRCOLL],
858[
859AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
860AC_CACHE_VAL(bash_cv_func_strcoll_broken,
861[AC_TRY_RUN([
862#include <stdio.h>
863#if defined (HAVE_LOCALE_H)
864#include <locale.h>
865#endif
866
867main(c, v)
868int c;
869char *v[];
870{
871 int r1, r2;
872 char *deflocale, *defcoll;
873
874#ifdef HAVE_SETLOCALE
875 deflocale = setlocale(LC_ALL, "");
876 defcoll = setlocale(LC_COLLATE, "");
877#endif
878
879#ifdef HAVE_STRCOLL
880 /* These two values are taken from tests/glob-test. */
881 r1 = strcoll("abd", "aXd");
882#else
883 r1 = 0;
884#endif
885 r2 = strcmp("abd", "aXd");
886
887 /* These two should both be greater than 0. It is permissible for
888 a system to return different values, as long as the sign is the
889 same. */
890
891 /* Exit with 1 (failure) if these two values are both > 0, since
892 this tests whether strcoll(3) is broken with respect to strcmp(3)
893 in the default locale. */
894 exit (r1 > 0 && r2 > 0);
895}
896], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
897 [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
898 bash_cv_func_strcoll_broken=no]
899)])
900AC_MSG_RESULT($bash_cv_func_strcoll_broken)
901if test $bash_cv_func_strcoll_broken = yes; then
902AC_DEFINE(STRCOLL_BROKEN)
903fi
904])
905
906AC_DEFUN([BASH_FUNC_PRINTF_A_FORMAT],
907[AC_MSG_CHECKING([for printf floating point output in hex notation])
908AC_CACHE_VAL(bash_cv_printf_a_format,
909[AC_TRY_RUN([
910#include <stdio.h>
911#include <string.h>
912
913int
914main()
915{
916 double y = 0.0;
917 char abuf[1024];
918
919 sprintf(abuf, "%A", y);
920 exit(strchr(abuf, 'P') == (char *)0);
921}
922], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
923 [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
924 bash_cv_printf_a_format=no]
925)])
926AC_MSG_RESULT($bash_cv_printf_a_format)
927if test $bash_cv_printf_a_format = yes; then
928AC_DEFINE(HAVE_PRINTF_A_FORMAT)
929fi
930])
931
932AC_DEFUN([BASH_STRUCT_TERMIOS_LDISC],
933[
934AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
935#include <sys/types.h>
936#include <termios.h>
937])
938])
939
940AC_DEFUN([BASH_STRUCT_TERMIO_LDISC],
941[
942AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
943#include <sys/types.h>
944#include <termio.h>
945])
946])
947
948dnl
949dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
950dnl
951dnl sets bash_cv_struct_stat_st_blocks
952dnl
953dnl unused for now; we'll see how AC_CHECK_MEMBERS works
954dnl
955AC_DEFUN([BASH_STRUCT_ST_BLOCKS],
956[
957AC_MSG_CHECKING([for struct stat.st_blocks])
958AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
959[AC_TRY_COMPILE(
960[
961#include <sys/types.h>
962#include <sys/stat.h>
963],
964[
965main()
966{
967static struct stat a;
968if (a.st_blocks) return 0;
969return 0;
970}
971], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
972])
973AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
974if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
975AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
976fi
977])
978
979AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
980[
981if test "X$bash_cv_termcap_lib" = "X"; then
982_bash_needmsg=yes
983else
984AC_MSG_CHECKING(which library has the termcap functions)
985_bash_needmsg=
986fi
987AC_CACHE_VAL(bash_cv_termcap_lib,
988[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
989 [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
990 [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
991 [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
992 bash_cv_termcap_lib=gnutermcap)])])])])
993if test "X$_bash_needmsg" = "Xyes"; then
994AC_MSG_CHECKING(which library has the termcap functions)
995fi
996AC_MSG_RESULT(using $bash_cv_termcap_lib)
997if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
998LDFLAGS="$LDFLAGS -L./lib/termcap"
999TERMCAP_LIB="./lib/termcap/libtermcap.a"
1000TERMCAP_DEP="./lib/termcap/libtermcap.a"
1001elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1002TERMCAP_LIB=-ltermcap
1003TERMCAP_DEP=
1004elif test $bash_cv_termcap_lib = libtinfo; then
1005TERMCAP_LIB=-ltinfo
1006TERMCAP_DEP=
1007elif test $bash_cv_termcap_lib = libncurses; then
1008TERMCAP_LIB=-lncurses
1009TERMCAP_DEP=
1010else
1011TERMCAP_LIB=-lcurses
1012TERMCAP_DEP=
1013fi
1014])
1015
1016dnl
1017dnl Check for the presence of getpeername in libsocket.
1018dnl If libsocket is present, check for libnsl and add it to LIBS if
1019dnl it's there, since most systems with libsocket require linking
1020dnl with libnsl as well. This should only be called if getpeername
1021dnl was not found in libc.
1022dnl
1023dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
1024dnl AS WELL
1025dnl
1026AC_DEFUN([BASH_CHECK_LIB_SOCKET],
1027[
1028if test "X$bash_cv_have_socklib" = "X"; then
1029_bash_needmsg=
1030else
1031AC_MSG_CHECKING(for socket library)
1032_bash_needmsg=yes
1033fi
1034AC_CACHE_VAL(bash_cv_have_socklib,
1035[AC_CHECK_LIB(socket, getpeername,
1036 bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
1037if test "X$_bash_needmsg" = Xyes; then
1038 AC_MSG_RESULT($bash_cv_have_socklib)
1039 _bash_needmsg=
1040fi
1041if test $bash_cv_have_socklib = yes; then
1042 # check for libnsl, add it to LIBS if present
1043 if test "X$bash_cv_have_libnsl" = "X"; then
1044 _bash_needmsg=
1045 else
1046 AC_MSG_CHECKING(for libnsl)
1047 _bash_needmsg=yes
1048 fi
1049 AC_CACHE_VAL(bash_cv_have_libnsl,
1050 [AC_CHECK_LIB(nsl, t_open,
1051 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
1052 if test "X$_bash_needmsg" = Xyes; then
1053 AC_MSG_RESULT($bash_cv_have_libnsl)
1054 _bash_needmsg=
1055 fi
1056 if test $bash_cv_have_libnsl = yes; then
1057 LIBS="-lsocket -lnsl $LIBS"
1058 else
1059 LIBS="-lsocket $LIBS"
1060 fi
1061 AC_DEFINE(HAVE_LIBSOCKET)
1062 AC_DEFINE(HAVE_GETPEERNAME)
1063fi
1064])
1065
1066AH_TEMPLATE([STRUCT_DIRENT_HAS_D_INO], [Define if struct dirent has a d_ino member])
1067AC_DEFUN([BASH_STRUCT_DIRENT_D_INO],
1068[AC_REQUIRE([AC_HEADER_DIRENT])
1069AC_MSG_CHECKING(if struct dirent has a d_ino member)
1070AC_CACHE_VAL(bash_cv_dirent_has_dino,
1071[AC_TRY_COMPILE([
1072#include <stdio.h>
1073#include <sys/types.h>
1074#ifdef HAVE_UNISTD_H
1075# include <unistd.h>
1076#endif /* HAVE_UNISTD_H */
1077#if defined(HAVE_DIRENT_H)
1078# include <dirent.h>
1079#else
1080# define dirent direct
1081# ifdef HAVE_SYS_NDIR_H
1082# include <sys/ndir.h>
1083# endif /* SYSNDIR */
1084# ifdef HAVE_SYS_DIR_H
1085# include <sys/dir.h>
1086# endif /* SYSDIR */
1087# ifdef HAVE_NDIR_H
1088# include <ndir.h>
1089# endif
1090#endif /* HAVE_DIRENT_H */
1091],[
1092struct dirent d; int z; z = d.d_ino;
1093], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
1094AC_MSG_RESULT($bash_cv_dirent_has_dino)
1095if test $bash_cv_dirent_has_dino = yes; then
1096AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
1097fi
1098])
1099
1100AH_TEMPLATE([STRUCT_DIRENT_HAS_D_FILENO], [Define if struct dirent has a d_fileno member])
1101AC_DEFUN([BASH_STRUCT_DIRENT_D_FILENO],
1102[AC_REQUIRE([AC_HEADER_DIRENT])
1103AC_MSG_CHECKING(if struct dirent has a d_fileno member)
1104AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
1105[AC_TRY_COMPILE([
1106#include <stdio.h>
1107#include <sys/types.h>
1108#ifdef HAVE_UNISTD_H
1109# include <unistd.h>
1110#endif /* HAVE_UNISTD_H */
1111#if defined(HAVE_DIRENT_H)
1112# include <dirent.h>
1113#else
1114# define dirent direct
1115# ifdef HAVE_SYS_NDIR_H
1116# include <sys/ndir.h>
1117# endif /* SYSNDIR */
1118# ifdef HAVE_SYS_DIR_H
1119# include <sys/dir.h>
1120# endif /* SYSDIR */
1121# ifdef HAVE_NDIR_H
1122# include <ndir.h>
1123# endif
1124#endif /* HAVE_DIRENT_H */
1125],[
1126struct dirent d; int z; z = d.d_fileno;
1127], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
1128AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
1129if test $bash_cv_dirent_has_d_fileno = yes; then
1130AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
1131fi
1132])
1133
1134AC_DEFUN([BASH_STRUCT_TIMEVAL],
1135[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
1136AC_CACHE_VAL(bash_cv_struct_timeval,
1137[
1138AC_EGREP_HEADER(struct timeval, sys/time.h,
1139 bash_cv_struct_timeval=yes,
1140 AC_EGREP_HEADER(struct timeval, time.h,
1141 bash_cv_struct_timeval=yes,
1142 bash_cv_struct_timeval=no))
1143])
1144AC_MSG_RESULT($bash_cv_struct_timeval)
1145if test $bash_cv_struct_timeval = yes; then
1146 AC_DEFINE(HAVE_TIMEVAL)
1147fi
1148])
1149
1150AH_TEMPLATE([STRUCT_WINSIZE_IN_SYS_IOCTL], [Define if struct winsize is in sys/ioctl.h])
1151AH_TEMPLATE([STRUCT_WINSIZE_IN_TERMIOS], [Define if struct winsize is in termios.h])
1152AC_DEFUN([BASH_STRUCT_WINSIZE],
1153[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
1154AC_CACHE_VAL(bash_cv_struct_winsize_header,
1155[AC_TRY_COMPILE([#include <sys/types.h>
1156#include <sys/ioctl.h>], [struct winsize x;],
1157 bash_cv_struct_winsize_header=ioctl_h,
1158 [AC_TRY_COMPILE([#include <sys/types.h>
1159#include <termios.h>], [struct winsize x;],
1160 bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
1161])])
1162if test $bash_cv_struct_winsize_header = ioctl_h; then
1163 AC_MSG_RESULT(sys/ioctl.h)
1164 AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
1165elif test $bash_cv_struct_winsize_header = termios_h; then
1166 AC_MSG_RESULT(termios.h)
1167 AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
1168else
1169 AC_MSG_RESULT(not found)
1170fi
1171])
1172
1173dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
1174AH_TEMPLATE([HAVE_POSIX_SIGNALS], [Define if we have the POSIX signal routines])
1175AH_TEMPLATE([HAVE_BSD_SIGNALS], [Define if we have the BSD signal routines])
1176AH_TEMPLATE([HAVE_USG_SIGHOLD], [Define if we have the USG signal routines])
1177AC_DEFUN([BASH_SYS_SIGNAL_VINTAGE],
1178[AC_REQUIRE([AC_TYPE_SIGNAL])
1179AC_MSG_CHECKING(for type of signal functions)
1180AC_CACHE_VAL(bash_cv_signal_vintage,
1181[
1182 AC_MSG_WARN([checking for posix...])
1183 AC_TRY_LINK([#include <signal.h>],[
1184 sigset_t ss;
1185 struct sigaction sa;
1186 sigemptyset(&ss); sigsuspend(&ss);
1187 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1188 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1189 ], bash_cv_signal_vintage="posix",
1190 [
1191 AC_MSG_WARN([checking for 4.2bsd...])
1192 AC_TRY_LINK([#include <signal.h>], [
1193 int mask = sigmask(SIGINT);
1194 sigsetmask(mask); sigblock(mask); sigpause(mask);
1195 ], bash_cv_signal_vintage="4.2bsd",
1196 [
1197 AC_MSG_WARN([checking for svr3...])
1198 AC_TRY_LINK([
1199 #include <signal.h>
1200 RETSIGTYPE foo() { }], [
1201 int mask = sigmask(SIGINT);
1202 sigset(SIGINT, foo); sigrelse(SIGINT);
1203 sighold(SIGINT); sigpause(SIGINT);
1204 ], bash_cv_signal_vintage="svr3", bash_cv_signal_vintage="v7"
1205 )]
1206 )]
1207)
1208])
1209AC_MSG_RESULT($bash_cv_signal_vintage)
1210if test "$bash_cv_signal_vintage" = "posix"; then
1211AC_DEFINE(HAVE_POSIX_SIGNALS)
1212elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1213AC_DEFINE(HAVE_BSD_SIGNALS)
1214elif test "$bash_cv_signal_vintage" = "svr3"; then
1215AC_DEFINE(HAVE_USG_SIGHOLD)
1216fi
1217])
1218
1219dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
1220AC_DEFUN([BASH_SYS_PGRP_SYNC],
1221[AC_REQUIRE([AC_FUNC_GETPGRP])
1222AC_MSG_CHECKING(whether pgrps need synchronization)
1223AC_CACHE_VAL(bash_cv_pgrp_pipe,
1224[AC_TRY_RUN([
1225#ifdef HAVE_UNISTD_H
1226# include <unistd.h>
1227#endif
1228main()
1229{
1230# ifdef GETPGRP_VOID
1231# define getpgID() getpgrp()
1232# else
1233# define getpgID() getpgrp(0)
1234# define setpgid(x,y) setpgrp(x,y)
1235# endif
1236 int pid1, pid2, fds[2];
1237 int status;
1238 char ok;
1239
1240 switch (pid1 = fork()) {
1241 case -1:
1242 exit(1);
1243 case 0:
1244 setpgid(0, getpid());
1245 exit(0);
1246 }
1247 setpgid(pid1, pid1);
1248
1249 sleep(2); /* let first child die */
1250
1251 if (pipe(fds) < 0)
1252 exit(2);
1253
1254 switch (pid2 = fork()) {
1255 case -1:
1256 exit(3);
1257 case 0:
1258 setpgid(0, pid1);
1259 ok = getpgID() == pid1;
1260 write(fds[1], &ok, 1);
1261 exit(0);
1262 }
1263 setpgid(pid2, pid1);
1264
1265 close(fds[1]);
1266 if (read(fds[0], &ok, 1) != 1)
1267 exit(4);
1268 wait(&status);
1269 wait(&status);
1270 exit(ok ? 0 : 5);
1271}
1272], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
1273 [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
1274 bash_cv_pgrp_pipe=no])
1275])
1276AC_MSG_RESULT($bash_cv_pgrp_pipe)
1277if test $bash_cv_pgrp_pipe = yes; then
1278AC_DEFINE(PGRP_PIPE)
1279fi
1280])
1281
1282AH_TEMPLATE([MUST_REINSTALL_SIGHANDLERS], [Define if signal handlers must be reinstalled when invoked.])
1283AC_DEFUN([BASH_SYS_REINSTALL_SIGHANDLERS],
1284[AC_REQUIRE([AC_TYPE_SIGNAL])
1285AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1286AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
1287AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
1288[AC_TRY_RUN([
1289#include <signal.h>
1290#ifdef HAVE_UNISTD_H
1291#include <unistd.h>
1292#endif
1293
1294typedef RETSIGTYPE sigfunc();
1295
1296int nsigint;
1297
1298#ifdef HAVE_POSIX_SIGNALS
1299sigfunc *
1300set_signal_handler(sig, handler)
1301 int sig;
1302 sigfunc *handler;
1303{
1304 struct sigaction act, oact;
1305 act.sa_handler = handler;
1306 act.sa_flags = 0;
1307 sigemptyset (&act.sa_mask);
1308 sigemptyset (&oact.sa_mask);
1309 sigaction (sig, &act, &oact);
1310 return (oact.sa_handler);
1311}
1312#else
1313#define set_signal_handler(s, h) signal(s, h)
1314#endif
1315
1316RETSIGTYPE
1317sigint(s)
1318int s;
1319{
1320 nsigint++;
1321}
1322
1323main()
1324{
1325 nsigint = 0;
1326 set_signal_handler(SIGINT, sigint);
1327 kill((int)getpid(), SIGINT);
1328 kill((int)getpid(), SIGINT);
1329 exit(nsigint != 2);
1330}
1331], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
1332 [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
1333 bash_cv_must_reinstall_sighandlers=no]
1334)])
1335AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
1336if test $bash_cv_must_reinstall_sighandlers = yes; then
1337AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
1338fi
1339])
1340
1341dnl check that some necessary job control definitions are present
1342AC_DEFUN([BASH_SYS_JOB_CONTROL_MISSING],
1343[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1344AC_MSG_CHECKING(for presence of necessary job control definitions)
1345AC_CACHE_VAL(bash_cv_job_control_missing,
1346[AC_TRY_RUN([
1347#include <sys/types.h>
1348#ifdef HAVE_SYS_WAIT_H
1349#include <sys/wait.h>
1350#endif
1351#ifdef HAVE_UNISTD_H
1352#include <unistd.h>
1353#endif
1354#include <signal.h>
1355
1356/* Add more tests in here as appropriate. */
1357main()
1358{
1359/* signal type */
1360#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
1361exit(1);
1362#endif
1363
1364/* signals and tty control. */
1365#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
1366exit (1);
1367#endif
1368
1369/* process control */
1370#if !defined (WNOHANG) || !defined (WUNTRACED)
1371exit(1);
1372#endif
1373
1374/* Posix systems have tcgetpgrp and waitpid. */
1375#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
1376exit(1);
1377#endif
1378
1379#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
1380exit(1);
1381#endif
1382
1383/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
1384#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
1385exit(1);
1386#endif
1387
1388exit(0);
1389}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
1390 [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
1391 bash_cv_job_control_missing=missing]
1392)])
1393AC_MSG_RESULT($bash_cv_job_control_missing)
1394if test $bash_cv_job_control_missing = missing; then
1395AC_DEFINE(JOB_CONTROL_MISSING)
1396fi
1397])
1398
1399dnl check whether named pipes are present
1400dnl this requires a previous check for mkfifo, but that is awkward to specify
1401AC_DEFUN([BASH_SYS_NAMED_PIPES],
1402[AC_MSG_CHECKING(for presence of named pipes)
1403AC_CACHE_VAL(bash_cv_sys_named_pipes,
1404[AC_TRY_RUN([
1405#include <sys/types.h>
1406#include <sys/stat.h>
1407#ifdef HAVE_UNISTD_H
1408#include <unistd.h>
1409#endif
1410
1411/* Add more tests in here as appropriate. */
1412main()
1413{
1414int fd, err;
1415
1416#if defined (HAVE_MKFIFO)
1417exit (0);
1418#endif
1419
1420#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
1421exit (1);
1422#endif
1423
1424#if defined (NeXT)
1425exit (1);
1426#endif
1427err = mkdir("/tmp/bash-aclocal", 0700);
1428if (err < 0) {
1429 perror ("mkdir");
1430 exit(1);
1431}
1432fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
1433if (fd == -1) {
1434 rmdir ("/tmp/bash-aclocal");
1435 exit (1);
1436}
1437close(fd);
1438unlink ("/tmp/bash-aclocal/sh-np-autoconf");
1439rmdir ("/tmp/bash-aclocal");
1440exit(0);
1441}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
1442 [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
1443 bash_cv_sys_named_pipes=missing]
1444)])
1445AC_MSG_RESULT($bash_cv_sys_named_pipes)
1446if test $bash_cv_sys_named_pipes = missing; then
1447AC_DEFINE(NAMED_PIPES_MISSING)
1448fi
1449])
1450
1451AC_DEFUN([BASH_SYS_DEFAULT_MAIL_DIR],
1452[AC_MSG_CHECKING(for default mail directory)
1453AC_CACHE_VAL(bash_cv_mail_dir,
1454[if test -d /var/mail; then
1455 bash_cv_mail_dir=/var/mail
1456 elif test -d /var/spool/mail; then
1457 bash_cv_mail_dir=/var/spool/mail
1458 elif test -d /usr/mail; then
1459 bash_cv_mail_dir=/usr/mail
1460 elif test -d /usr/spool/mail; then
1461 bash_cv_mail_dir=/usr/spool/mail
1462 else
1463 bash_cv_mail_dir=unknown
1464 fi
1465])
1466AC_MSG_RESULT($bash_cv_mail_dir)
1467AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
1468])
1469
1470AC_DEFUN([BASH_HAVE_TIOCGWINSZ],
1471[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
1472AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
1473[AC_TRY_COMPILE([#include <sys/types.h>
1474#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
1475 bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
1476AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
1477if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
1478AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
1479fi
1480])
1481
1482AH_TEMPLATE([TIOCSTAT_IN_SYS_IOCTL], [Define if TIOCSTAT is in sys/ioctl.h])
1483AC_DEFUN([BASH_HAVE_TIOCSTAT],
1484[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
1485AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
1486[AC_TRY_COMPILE([#include <sys/types.h>
1487#include <sys/ioctl.h>], [int x = TIOCSTAT;],
1488 bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
1489AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
1490if test $bash_cv_tiocstat_in_ioctl = yes; then
1491AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
1492fi
1493])
1494
1495AH_TEMPLATE([FIONREAD_IN_SYS_IOCTL], [Define if FIONREAD is in sys/ioctl.h])
1496AC_DEFUN([BASH_HAVE_FIONREAD],
1497[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
1498AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
1499[AC_TRY_COMPILE([#include <sys/types.h>
1500#include <sys/ioctl.h>], [int x = FIONREAD;],
1501 bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
1502AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
1503if test $bash_cv_fionread_in_ioctl = yes; then
1504AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
1505fi
1506])
1507
1508dnl
1509dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
1510dnl require a definition of speed_t each time <termcap.h> is included,
1511dnl but you can only get speed_t if you include <termios.h> (on some
1512dnl versions) or <sys/types.h> (on others).
1513dnl
1514AH_TEMPLATE([SPEED_T_IN_SYS_TYPES], [Define if speed_t is in sys/types.h])
1515AC_DEFUN([BASH_CHECK_SPEED_T],
1516[AC_MSG_CHECKING(for speed_t in sys/types.h)
1517AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
1518[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
1519 bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
1520AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
1521if test $bash_cv_speed_t_in_sys_types = yes; then
1522AC_DEFINE(SPEED_T_IN_SYS_TYPES)
1523fi
1524])
1525
1526AH_TEMPLATE([HAVE_GETPW_DECLS], [Define if getpw functions are declared in pwd.h])
1527AC_DEFUN([BASH_CHECK_GETPW_FUNCS],
1528[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
1529AC_CACHE_VAL(bash_cv_getpw_declared,
1530[AC_EGREP_CPP(getpwuid,
1531[
1532#include <sys/types.h>
1533#ifdef HAVE_UNISTD_H
1534# include <unistd.h>
1535#endif
1536#include <pwd.h>
1537],
1538bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
1539AC_MSG_RESULT($bash_cv_getpw_declared)
1540if test $bash_cv_getpw_declared = yes; then
1541AC_DEFINE(HAVE_GETPW_DECLS)
1542fi
1543])
1544
1545AC_DEFUN([BASH_CHECK_DEV_FD],
1546[AC_MSG_CHECKING(whether /dev/fd is available)
1547AC_CACHE_VAL(bash_cv_dev_fd,
1548[if test -d /dev/fd && test -r /dev/fd/0; then
1549 bash_cv_dev_fd=standard
1550 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
1551 bash_cv_dev_fd=whacky
1552 else
1553 bash_cv_dev_fd=absent
1554 fi
1555])
1556AC_MSG_RESULT($bash_cv_dev_fd)
1557if test $bash_cv_dev_fd = "standard"; then
1558 AC_DEFINE(HAVE_DEV_FD)
1559 AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
1560elif test $bash_cv_dev_fd = "whacky"; then
1561 AC_DEFINE(HAVE_DEV_FD)
1562 AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
1563fi
1564])
1565
1566AC_DEFUN([BASH_CHECK_DEV_STDIN],
1567[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
1568AC_CACHE_VAL(bash_cv_dev_stdin,
1569[if test -d /dev/fd && test -r /dev/stdin; then
1570 bash_cv_dev_stdin=present
1571 elif test -d /proc/self/fd && test -r /dev/stdin; then
1572 bash_cv_dev_stdin=present
1573 else
1574 bash_cv_dev_stdin=absent
1575 fi
1576])
1577AC_MSG_RESULT($bash_cv_dev_stdin)
1578if test $bash_cv_dev_stdin = "present"; then
1579 AC_DEFINE(HAVE_DEV_STDIN)
1580fi
1581])
1582
1583dnl
1584dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
1585dnl
1586AC_DEFUN([BASH_CHECK_KERNEL_RLIMIT],
1587[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
1588AC_CACHE_VAL(bash_cv_kernel_rlimit,
1589[AC_TRY_COMPILE([
1590#include <sys/types.h>
1591#include <sys/resource.h>
1592],
1593[
1594 int f;
1595 f = RLIMIT_DATA;
1596], bash_cv_kernel_rlimit=no,
1597[AC_TRY_COMPILE([
1598#include <sys/types.h>
1599#define _KERNEL
1600#include <sys/resource.h>
1601#undef _KERNEL
1602],
1603[
1604 int f;
1605 f = RLIMIT_DATA;
1606], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
1607)])
1608AC_MSG_RESULT($bash_cv_kernel_rlimit)
1609if test $bash_cv_kernel_rlimit = yes; then
1610AC_DEFINE(RLIMIT_NEEDS_KERNEL)
1611fi
1612])
1613
1614dnl
1615dnl Check for 64-bit off_t -- used for malloc alignment
1616dnl
1617dnl C does not allow duplicate case labels, so the compile will fail if
1618dnl sizeof(off_t) is > 4.
1619dnl
1620AC_DEFUN([BASH_CHECK_OFF_T_64],
1621[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
1622AC_TRY_COMPILE([
1623#ifdef HAVE_UNISTD_H
1624#include <unistd.h>
1625#endif
1626#include <sys/types.h>
1627],[
1628switch (0) case 0: case (sizeof (off_t) <= 4):;
1629], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
1630if test $bash_cv_off_t_64 = yes; then
1631 AC_DEFINE(HAVE_OFF_T_64)
1632fi])
1633
1634AC_DEFUN([BASH_CHECK_RTSIGS],
1635[AC_MSG_CHECKING(for unusable real-time signals due to large values)
1636AC_CACHE_VAL(bash_cv_unusable_rtsigs,
1637[AC_TRY_RUN([
1638#include <sys/types.h>
1639#include <signal.h>
1640
1641#ifndef NSIG
1642# define NSIG 64
1643#endif
1644
1645main ()
1646{
1647 int n_sigs = 2 * NSIG;
1648#ifdef SIGRTMIN
1649 int rtmin = SIGRTMIN;
1650#else
1651 int rtmin = 0;
1652#endif
1653
1654 exit(rtmin < n_sigs);
1655}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
1656 [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
1657 bash_cv_unusable_rtsigs=yes]
1658)])
1659AC_MSG_RESULT($bash_cv_unusable_rtsigs)
1660if test $bash_cv_unusable_rtsigs = yes; then
1661AC_DEFINE(UNUSABLE_RT_SIGNALS)
1662fi
1663])
1664
1665dnl
1666dnl check for availability of multibyte characters and functions
1667dnl
1668AH_TEMPLATE([HAVE_MBSRTOWCS], [Define if we have the mbsrtowcs function])
1669AH_TEMPLATE([HAVE_WCWIDTH], [Define if we have the wcwidth function])
1670AH_TEMPLATE([HAVE_MBSTATE_T], [Define if we have mbstate_t])
1671AH_TEMPLATE([HAVE_LANGINFO_CODESET], [Define if we have nl_langinfo and CODESET])
1672AC_DEFUN([BASH_CHECK_MULTIBYTE],
1673[
1674AC_CHECK_HEADERS(wctype.h)
1675AC_CHECK_HEADERS(wchar.h)
1676AC_CHECK_HEADERS(langinfo.h)
1677
1678AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
1679AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
1680
1681AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
1682[AC_TRY_RUN([
1683#include <wchar.h>
1684int
1685main ()
1686{
1687 mbstate_t ps;
1688 return 0;
1689}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
1690if test $bash_cv_have_mbstate_t = yes; then
1691 AC_DEFINE(HAVE_MBSTATE_T)
1692fi
1693
1694AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
1695[AC_TRY_LINK(
1696[#include <langinfo.h>],
1697[char* cs = nl_langinfo(CODESET);],
1698bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
1699if test $bash_cv_langinfo_codeset = yes; then
1700 AC_DEFINE(HAVE_LANGINFO_CODESET)
1701fi
1702
1703])
1704
1705dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
1706dnl require:
1707dnl AC_PROG_CC
1708dnl BASH_CHECK_LIB_TERMCAP
1709
1710AC_DEFUN([RL_LIB_READLINE_VERSION],
1711[
1712AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
1713
1714AC_MSG_CHECKING([version of installed readline library])
1715
1716# What a pain in the ass this is.
1717
1718# save cpp and ld options
1719_save_CFLAGS="$CFLAGS"
1720_save_LDFLAGS="$LDFLAGS"
1721_save_LIBS="$LIBS"
1722
1723# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
1724# allows the caller to do something like $_rl_prefix=$withval if the user
1725# specifies --with-installed-readline=PREFIX as an argument to configure
1726
1727if test -z "$ac_cv_rl_prefix"; then
1728test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
1729fi
1730
1731eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
1732eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
1733
1734LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
1735CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
1736LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
1737
1738AC_TRY_RUN([
1739#include <stdio.h>
1740#include <readline/readline.h>
1741
1742main()
1743{
1744 FILE *fp;
1745 fp = fopen("conftest.rlv", "w");
1746 if (fp == 0) exit(1);
1747 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
1748 fclose(fp);
1749 exit(0);
1750}
1751],
1752ac_cv_rl_version=`cat conftest.rlv`,
1753ac_cv_rl_version='0.0',
1754ac_cv_rl_version='4.2')
1755
1756CFLAGS="$_save_CFLAGS"
1757LDFLAGS="$_save_LDFLAGS"
1758LIBS="$_save_LIBS"
1759
1760RL_MAJOR=0
1761RL_MINOR=0
1762
1763# (
1764case "$ac_cv_rl_version" in
17652*|3*|4*|5*|6*|7*|8*|9*)
1766 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
1767 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
1768 ;;
1769esac
1770
1771# (((
1772case $RL_MAJOR in
1773[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
1774[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
1775*) _RL_MAJOR=00 ;;
1776esac
1777
1778# (((
1779case $RL_MINOR in
1780[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
1781[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
1782*) _RL_MINOR=00 ;;
1783esac
1784
1785RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
1786
1787# Readline versions greater than 4.2 have these defines in readline.h
1788
1789if test $ac_cv_rl_version = '0.0' ; then
1790 AC_MSG_WARN([Could not test version of installed readline library.])
1791elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
1792 # set these for use by the caller
1793 RL_PREFIX=$ac_cv_rl_prefix
1794 RL_LIBDIR=$ac_cv_rl_libdir
1795 RL_INCLUDEDIR=$ac_cv_rl_includedir
1796 AC_MSG_RESULT($ac_cv_rl_version)
1797else
1798
1799AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
1800AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
1801AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
1802
1803AC_SUBST(RL_VERSION)
1804AC_SUBST(RL_MAJOR)
1805AC_SUBST(RL_MINOR)
1806
1807# set these for use by the caller
1808RL_PREFIX=$ac_cv_rl_prefix
1809RL_LIBDIR=$ac_cv_rl_libdir
1810RL_INCLUDEDIR=$ac_cv_rl_includedir
1811
1812AC_MSG_RESULT($ac_cv_rl_version)
1813
1814fi
1815])
diff --git a/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch b/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch
new file mode 100644
index 0000000000..3166b470f2
--- /dev/null
+++ b/meta/recipes-core/readline/readline-5.2/fix-redundant-rpath.patch
@@ -0,0 +1,21 @@
1This support script ends up hardcoding unnecessary rpaths into the libraries. We
2will search $libdir automatically so this is just wastes space. There may be some
3cases this is necessary but our use cases aren't one of them.
4
5Upstream-Status: Inappropriate
6
7Signed-off-by: Saul Wold <sgw@linux.intel.com>
8
9Index: readline-5.2/support/shobj-conf
10===================================================================
11--- readline-5.2.orig/support/shobj-conf
12+++ readline-5.2/support/shobj-conf
13@@ -110,7 +110,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*)
14 SHOBJ_LD='${CC}'
15 SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
16
17- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
18+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
19 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
20 ;;
21
diff --git a/meta/recipes-core/readline/readline-6.2/acinclude.m4 b/meta/recipes-core/readline/readline-6.2/acinclude.m4
new file mode 100644
index 0000000000..c30a7d3054
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.2/acinclude.m4
@@ -0,0 +1,1871 @@
1dnl
2dnl Bash specific tests
3dnl
4dnl Some derived from PDKSH 5.1.3 autoconf tests
5dnl
6
7AC_DEFUN([BASH_C_LONG_LONG],
8[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
9[if test "$GCC" = yes; then
10 ac_cv_c_long_long=yes
11else
12AC_TRY_RUN([
13int
14main()
15{
16long long foo = 0;
17exit(sizeof(long long) < sizeof(long));
18}
19], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
20fi])
21if test $ac_cv_c_long_long = yes; then
22 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
23fi
24])
25
26dnl
27dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
28dnl (< changed to <=) added.
29dnl
30AC_DEFUN([BASH_C_LONG_DOUBLE],
31[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
32[if test "$GCC" = yes; then
33 ac_cv_c_long_double=yes
34else
35AC_TRY_RUN([
36int
37main()
38{
39 /* The Stardent Vistra knows sizeof(long double), but does not
40 support it. */
41 long double foo = 0.0;
42 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
43 /* On IRIX 5.3, the compiler converts long double to double with a warning,
44 but compiles this successfully. */
45 exit(sizeof(long double) <= sizeof(double));
46}
47], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
48fi])
49if test $ac_cv_c_long_double = yes; then
50 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
51fi
52])
53
54dnl
55dnl Check for <inttypes.h>. This is separated out so that it can be
56dnl AC_REQUIREd.
57dnl
58dnl BASH_HEADER_INTTYPES
59AC_DEFUN([BASH_HEADER_INTTYPES],
60[
61 AC_CHECK_HEADERS(inttypes.h)
62])
63
64dnl
65dnl check for typedef'd symbols in header files, but allow the caller to
66dnl specify the include files to be checked in addition to the default
67dnl
68dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
69AC_DEFUN([BASH_CHECK_TYPE],
70[
71AC_REQUIRE([AC_HEADER_STDC])dnl
72AC_REQUIRE([BASH_HEADER_INTTYPES])
73AC_MSG_CHECKING(for $1)
74AC_CACHE_VAL(bash_cv_type_$1,
75[AC_EGREP_CPP($1, [#include <sys/types.h>
76#if STDC_HEADERS
77#include <stdlib.h>
78#include <stddef.h>
79#endif
80#if HAVE_INTTYPES_H
81#include <inttypes.h>
82#endif
83$2
84], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
85AC_MSG_RESULT($bash_cv_type_$1)
86ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
87 AC_DEFINE($4)
88 fi])
89if test $bash_cv_type_$1 = no; then
90 AC_DEFINE_UNQUOTED($1, $3)
91fi
92])
93
94dnl
95dnl BASH_CHECK_DECL(FUNC)
96dnl
97dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
98dnl AC_CHECK_DECL
99dnl
100AC_DEFUN([BASH_CHECK_DECL],
101[
102AC_REQUIRE([AC_HEADER_STDC])
103AC_REQUIRE([BASH_HEADER_INTTYPES])
104AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
105[AC_TRY_LINK(
106[
107#if STDC_HEADERS
108# include <stdlib.h>
109#endif
110#if HAVE_INTTYPES_H
111# include <inttypes.h>
112#endif
113],
114[return !$1;],
115bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
116bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
117if test $bash_cv_decl_$1 = yes; then
118 AC_DEFINE_UNQUOTED($bash_tr_func, 1)
119else
120 AC_DEFINE_UNQUOTED($bash_tr_func, 0)
121fi
122])
123
124AC_DEFUN([BASH_DECL_PRINTF],
125[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
126AC_CACHE_VAL(bash_cv_printf_declared,
127[AC_TRY_RUN([
128#include <stdio.h>
129#ifdef __STDC__
130typedef int (*_bashfunc)(const char *, ...);
131#else
132typedef int (*_bashfunc)();
133#endif
134main()
135{
136_bashfunc pf;
137pf = (_bashfunc) printf;
138exit(pf == 0);
139}
140], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
141 [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
142 bash_cv_printf_declared=yes]
143)])
144AC_MSG_RESULT($bash_cv_printf_declared)
145if test $bash_cv_printf_declared = yes; then
146AC_DEFINE(PRINTF_DECLARED)
147fi
148])
149
150AC_DEFUN([BASH_DECL_SBRK],
151[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
152AC_CACHE_VAL(bash_cv_sbrk_declared,
153[AC_EGREP_HEADER(sbrk, unistd.h,
154 bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
155AC_MSG_RESULT($bash_cv_sbrk_declared)
156if test $bash_cv_sbrk_declared = yes; then
157AC_DEFINE(SBRK_DECLARED)
158fi
159])
160
161dnl
162dnl Check for sys_siglist[] or _sys_siglist[]
163dnl
164AC_DEFUN([BASH_DECL_UNDER_SYS_SIGLIST],
165[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
166AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
167[AC_TRY_COMPILE([
168#include <sys/types.h>
169#include <signal.h>
170#ifdef HAVE_UNISTD_H
171#include <unistd.h>
172#endif], [ char *msg = _sys_siglist[2]; ],
173 bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
174 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
175AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
176if test $bash_cv_decl_under_sys_siglist = yes; then
177AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
178fi
179])
180
181AC_DEFUN([BASH_UNDER_SYS_SIGLIST],
182[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
183AC_MSG_CHECKING([for _sys_siglist in system C library])
184AC_CACHE_VAL(bash_cv_under_sys_siglist,
185[AC_TRY_RUN([
186#include <sys/types.h>
187#include <signal.h>
188#ifdef HAVE_UNISTD_H
189#include <unistd.h>
190#endif
191#ifndef UNDER_SYS_SIGLIST_DECLARED
192extern char *_sys_siglist[];
193#endif
194main()
195{
196char *msg = (char *)_sys_siglist[2];
197exit(msg == 0);
198}],
199 bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
200 [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
201 bash_cv_under_sys_siglist=no])])
202AC_MSG_RESULT($bash_cv_under_sys_siglist)
203if test $bash_cv_under_sys_siglist = yes; then
204AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
205fi
206])
207
208AC_DEFUN([BASH_SYS_SIGLIST],
209[
210AC_CHECK_DECLS([sys_siglist])
211AC_MSG_CHECKING([for sys_siglist in system C library])
212AC_CACHE_VAL(bash_cv_sys_siglist,
213[AC_TRY_RUN([
214#include <sys/types.h>
215#include <signal.h>
216#ifdef HAVE_UNISTD_H
217#include <unistd.h>
218#endif
219#ifndef HAVE_DECL_SYS_SIGLIST
220extern char *sys_siglist[];
221#endif
222main()
223{
224char *msg = sys_siglist[2];
225exit(msg == 0);
226}],
227 bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
228 [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
229 bash_cv_sys_siglist=no])])
230AC_MSG_RESULT($bash_cv_sys_siglist)
231if test $bash_cv_sys_siglist = yes; then
232AC_DEFINE(HAVE_SYS_SIGLIST)
233fi
234])
235
236dnl Check for the various permutations of sys_siglist and make sure we
237dnl compile in siglist.o if they're not defined
238AC_DEFUN([BASH_CHECK_SYS_SIGLIST], [
239AC_REQUIRE([BASH_SYS_SIGLIST])
240AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
241AC_REQUIRE([BASH_FUNC_STRSIGNAL])
242if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
243 SIGLIST_O=siglist.o
244else
245 SIGLIST_O=
246fi
247AC_SUBST([SIGLIST_O])
248])
249
250dnl Check for sys_errlist[] and sys_nerr, check for declaration
251AC_DEFUN([BASH_SYS_ERRLIST],
252[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
253AC_CACHE_VAL(bash_cv_sys_errlist,
254[AC_TRY_LINK([#include <errno.h>],
255[extern char *sys_errlist[];
256 extern int sys_nerr;
257 char *msg = sys_errlist[sys_nerr - 1];],
258 bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
259AC_MSG_RESULT($bash_cv_sys_errlist)
260if test $bash_cv_sys_errlist = yes; then
261AC_DEFINE(HAVE_SYS_ERRLIST)
262fi
263])
264
265dnl
266dnl Check if dup2() does not clear the close on exec flag
267dnl
268AC_DEFUN([BASH_FUNC_DUP2_CLOEXEC_CHECK],
269[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
270AC_CACHE_VAL(bash_cv_dup2_broken,
271[AC_TRY_RUN([
272#include <sys/types.h>
273#include <fcntl.h>
274main()
275{
276 int fd1, fd2, fl;
277 fd1 = open("/dev/null", 2);
278 if (fcntl(fd1, 2, 1) < 0)
279 exit(1);
280 fd2 = dup2(fd1, 1);
281 if (fd2 < 0)
282 exit(2);
283 fl = fcntl(fd2, 1, 0);
284 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
285 exit(fl != 1);
286}
287], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
288 [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
289 bash_cv_dup2_broken=no])
290])
291AC_MSG_RESULT($bash_cv_dup2_broken)
292if test $bash_cv_dup2_broken = yes; then
293AC_DEFINE(DUP2_BROKEN)
294fi
295])
296
297AC_DEFUN([BASH_FUNC_STRSIGNAL],
298[AC_MSG_CHECKING([for the existence of strsignal])
299AC_CACHE_VAL(bash_cv_have_strsignal,
300[AC_TRY_LINK([#include <sys/types.h>
301#include <signal.h>],
302[char *s = (char *)strsignal(2);],
303 bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
304AC_MSG_RESULT($bash_cv_have_strsignal)
305if test $bash_cv_have_strsignal = yes; then
306AC_DEFINE(HAVE_STRSIGNAL)
307fi
308])
309
310dnl Check to see if opendir will open non-directories (not a nice thing)
311AC_DEFUN([BASH_FUNC_OPENDIR_CHECK],
312[AC_REQUIRE([AC_HEADER_DIRENT])dnl
313AC_MSG_CHECKING(if opendir() opens non-directories)
314AC_CACHE_VAL(bash_cv_opendir_not_robust,
315[AC_TRY_RUN([
316#include <stdio.h>
317#include <sys/types.h>
318#include <fcntl.h>
319#ifdef HAVE_UNISTD_H
320# include <unistd.h>
321#endif /* HAVE_UNISTD_H */
322#if defined(HAVE_DIRENT_H)
323# include <dirent.h>
324#else
325# define dirent direct
326# ifdef HAVE_SYS_NDIR_H
327# include <sys/ndir.h>
328# endif /* SYSNDIR */
329# ifdef HAVE_SYS_DIR_H
330# include <sys/dir.h>
331# endif /* SYSDIR */
332# ifdef HAVE_NDIR_H
333# include <ndir.h>
334# endif
335#endif /* HAVE_DIRENT_H */
336main()
337{
338DIR *dir;
339int fd, err;
340err = mkdir("/tmp/bash-aclocal", 0700);
341if (err < 0) {
342 perror("mkdir");
343 exit(1);
344}
345unlink("/tmp/bash-aclocal/not_a_directory");
346fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
347write(fd, "\n", 1);
348close(fd);
349dir = opendir("/tmp/bash-aclocal/not_a_directory");
350unlink("/tmp/bash-aclocal/not_a_directory");
351rmdir("/tmp/bash-aclocal");
352exit (dir == 0);
353}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
354 [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
355 bash_cv_opendir_not_robust=no]
356)])
357AC_MSG_RESULT($bash_cv_opendir_not_robust)
358if test $bash_cv_opendir_not_robust = yes; then
359AC_DEFINE(OPENDIR_NOT_ROBUST)
360fi
361])
362
363dnl
364AH_TEMPLATE([VOID_SIGHANDLER], [Define if signal handlers return type void])
365AC_DEFUN([BASH_TYPE_SIGHANDLER],
366[AC_MSG_CHECKING([whether signal handlers are of type void])
367AC_CACHE_VAL(bash_cv_void_sighandler,
368[AC_TRY_COMPILE([#include <sys/types.h>
369#include <signal.h>
370#ifdef signal
371#undef signal
372#endif
373#ifdef __cplusplus
374extern "C"
375#endif
376void (*signal ()) ();],
377[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
378AC_MSG_RESULT($bash_cv_void_sighandler)
379if test $bash_cv_void_sighandler = yes; then
380AC_DEFINE(VOID_SIGHANDLER)
381fi
382])
383
384dnl
385dnl A signed 16-bit integer quantity
386dnl
387AC_DEFUN([BASH_TYPE_BITS16_T],
388[
389if test "$ac_cv_sizeof_short" = 2; then
390 AC_CHECK_TYPE(bits16_t, short)
391elif test "$ac_cv_sizeof_char" = 2; then
392 AC_CHECK_TYPE(bits16_t, char)
393else
394 AC_CHECK_TYPE(bits16_t, short)
395fi
396])
397
398dnl
399dnl An unsigned 16-bit integer quantity
400dnl
401AC_DEFUN([BASH_TYPE_U_BITS16_T],
402[
403if test "$ac_cv_sizeof_short" = 2; then
404 AC_CHECK_TYPE(u_bits16_t, unsigned short)
405elif test "$ac_cv_sizeof_char" = 2; then
406 AC_CHECK_TYPE(u_bits16_t, unsigned char)
407else
408 AC_CHECK_TYPE(u_bits16_t, unsigned short)
409fi
410])
411
412dnl
413dnl A signed 32-bit integer quantity
414dnl
415AC_DEFUN([BASH_TYPE_BITS32_T],
416[
417if test "$ac_cv_sizeof_int" = 4; then
418 AC_CHECK_TYPE(bits32_t, int)
419elif test "$ac_cv_sizeof_long" = 4; then
420 AC_CHECK_TYPE(bits32_t, long)
421else
422 AC_CHECK_TYPE(bits32_t, int)
423fi
424])
425
426dnl
427dnl An unsigned 32-bit integer quantity
428dnl
429AC_DEFUN([BASH_TYPE_U_BITS32_T],
430[
431if test "$ac_cv_sizeof_int" = 4; then
432 AC_CHECK_TYPE(u_bits32_t, unsigned int)
433elif test "$ac_cv_sizeof_long" = 4; then
434 AC_CHECK_TYPE(u_bits32_t, unsigned long)
435else
436 AC_CHECK_TYPE(u_bits32_t, unsigned int)
437fi
438])
439
440AC_DEFUN([BASH_TYPE_PTRDIFF_T],
441[
442if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
443 AC_CHECK_TYPE(ptrdiff_t, int)
444elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
445 AC_CHECK_TYPE(ptrdiff_t, long)
446elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
447 AC_CHECK_TYPE(ptrdiff_t, [long long])
448else
449 AC_CHECK_TYPE(ptrdiff_t, int)
450fi
451])
452
453dnl
454dnl A signed 64-bit quantity
455dnl
456AC_DEFUN([BASH_TYPE_BITS64_T],
457[
458if test "$ac_cv_sizeof_char_p" = 8; then
459 AC_CHECK_TYPE(bits64_t, char *)
460elif test "$ac_cv_sizeof_double" = 8; then
461 AC_CHECK_TYPE(bits64_t, double)
462elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
463 AC_CHECK_TYPE(bits64_t, [long long])
464elif test "$ac_cv_sizeof_long" = 8; then
465 AC_CHECK_TYPE(bits64_t, long)
466else
467 AC_CHECK_TYPE(bits64_t, double)
468fi
469])
470
471AC_DEFUN([BASH_TYPE_LONG_LONG],
472[
473AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
474[AC_TRY_LINK([
475long long ll = 1; int i = 63;],
476[
477long long llm = (long long) -1;
478return ll << i | ll >> i | llm / ll | llm % ll;
479], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
480if test "$bash_cv_type_long_long" = 'long long'; then
481 AC_DEFINE(HAVE_LONG_LONG, 1)
482fi
483])
484
485AC_DEFUN([BASH_TYPE_UNSIGNED_LONG_LONG],
486[
487AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
488[AC_TRY_LINK([
489unsigned long long ull = 1; int i = 63;],
490[
491unsigned long long ullmax = (unsigned long long) -1;
492return ull << i | ull >> i | ullmax / ull | ullmax % ull;
493], bash_cv_type_unsigned_long_long='unsigned long long',
494 bash_cv_type_unsigned_long_long='unsigned long')])
495if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
496 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
497fi
498])
499
500dnl
501dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
502dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
503dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
504dnl matters, this just checks for rlim_t, quad_t, or long.
505dnl
506AC_DEFUN([BASH_TYPE_RLIMIT],
507[AC_MSG_CHECKING(for size and type of struct rlimit fields)
508AC_CACHE_VAL(bash_cv_type_rlimit,
509[AC_TRY_COMPILE([#include <sys/types.h>
510#include <sys/resource.h>],
511[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
512AC_TRY_RUN([
513#include <sys/types.h>
514#include <sys/time.h>
515#include <sys/resource.h>
516main()
517{
518#ifdef HAVE_QUAD_T
519 struct rlimit rl;
520 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
521 exit(0);
522#endif
523 exit(1);
524}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
525 [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
526 bash_cv_type_rlimit=long])])
527])
528AC_MSG_RESULT($bash_cv_type_rlimit)
529if test $bash_cv_type_rlimit = quad_t; then
530AC_DEFINE(RLIMTYPE, quad_t)
531elif test $bash_cv_type_rlimit = rlim_t; then
532AC_DEFINE(RLIMTYPE, rlim_t)
533fi
534])
535
536AC_DEFUN([BASH_FUNC_LSTAT],
537[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
538dnl inline function in <sys/stat.h>.
539AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
540[AC_TRY_LINK([
541#include <sys/types.h>
542#include <sys/stat.h>
543],[ lstat(".",(struct stat *)0); ],
544bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
545if test $bash_cv_func_lstat = yes; then
546 AC_DEFINE(HAVE_LSTAT)
547fi
548])
549
550AC_DEFUN([BASH_FUNC_INET_ATON],
551[
552AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
553[AC_TRY_LINK([
554#include <sys/types.h>
555#include <netinet/in.h>
556#include <arpa/inet.h>
557struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
558bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
559if test $bash_cv_func_inet_aton = yes; then
560 AC_DEFINE(HAVE_INET_ATON)
561else
562 AC_LIBOBJ(inet_aton)
563fi
564])
565
566AC_DEFUN([BASH_FUNC_GETENV],
567[AC_MSG_CHECKING(to see if getenv can be redefined)
568AC_CACHE_VAL(bash_cv_getenv_redef,
569[AC_TRY_RUN([
570#ifdef HAVE_UNISTD_H
571# include <unistd.h>
572#endif
573#ifndef __STDC__
574# ifndef const
575# define const
576# endif
577#endif
578char *
579getenv (name)
580#if defined (__linux__) || defined (__bsdi__) || defined (convex)
581 const char *name;
582#else
583 char const *name;
584#endif /* !__linux__ && !__bsdi__ && !convex */
585{
586return "42";
587}
588main()
589{
590char *s;
591/* The next allows this program to run, but does not allow bash to link
592 when it redefines getenv. I'm not really interested in figuring out
593 why not. */
594#if defined (NeXT)
595exit(1);
596#endif
597s = getenv("ABCDE");
598exit(s == 0); /* force optimizer to leave getenv in */
599}
600], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
601 [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
602 bash_cv_getenv_redef=yes]
603)])
604AC_MSG_RESULT($bash_cv_getenv_redef)
605if test $bash_cv_getenv_redef = yes; then
606AC_DEFINE(CAN_REDEFINE_GETENV)
607fi
608])
609
610# We should check for putenv before calling this
611AC_DEFUN([BASH_FUNC_STD_PUTENV],
612[
613AC_REQUIRE([AC_HEADER_STDC])
614AC_REQUIRE([AC_C_PROTOTYPES])
615AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
616[AC_TRY_LINK([
617#if STDC_HEADERS
618#include <stdlib.h>
619#include <stddef.h>
620#endif
621#ifndef __STDC__
622# ifndef const
623# define const
624# endif
625#endif
626#ifdef PROTOTYPES
627extern int putenv (char *);
628#else
629extern int putenv ();
630#endif
631],
632[return (putenv == 0);],
633bash_cv_std_putenv=yes, bash_cv_std_putenv=no
634)])
635if test $bash_cv_std_putenv = yes; then
636AC_DEFINE(HAVE_STD_PUTENV)
637fi
638])
639
640# We should check for unsetenv before calling this
641AC_DEFUN([BASH_FUNC_STD_UNSETENV],
642[
643AC_REQUIRE([AC_HEADER_STDC])
644AC_REQUIRE([AC_C_PROTOTYPES])
645AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
646[AC_TRY_LINK([
647#if STDC_HEADERS
648#include <stdlib.h>
649#include <stddef.h>
650#endif
651#ifndef __STDC__
652# ifndef const
653# define const
654# endif
655#endif
656#ifdef PROTOTYPES
657extern int unsetenv (const char *);
658#else
659extern int unsetenv ();
660#endif
661],
662[return (unsetenv == 0);],
663bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
664)])
665if test $bash_cv_std_unsetenv = yes; then
666AC_DEFINE(HAVE_STD_UNSETENV)
667fi
668])
669
670AC_DEFUN([BASH_FUNC_ULIMIT_MAXFDS],
671[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
672AC_CACHE_VAL(bash_cv_ulimit_maxfds,
673[AC_TRY_RUN([
674main()
675{
676long maxfds = ulimit(4, 0L);
677exit (maxfds == -1L);
678}
679], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
680 [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
681 bash_cv_ulimit_maxfds=no]
682)])
683AC_MSG_RESULT($bash_cv_ulimit_maxfds)
684if test $bash_cv_ulimit_maxfds = yes; then
685AC_DEFINE(ULIMIT_MAXFDS)
686fi
687])
688
689AC_DEFUN([BASH_FUNC_GETCWD],
690[AC_MSG_CHECKING([if getcwd() calls popen()])
691AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
692[AC_TRY_RUN([
693#include <stdio.h>
694#ifdef HAVE_UNISTD_H
695#include <unistd.h>
696#endif
697
698#ifndef __STDC__
699#ifndef const
700#define const
701#endif
702#endif
703
704int popen_called;
705
706FILE *
707popen(command, type)
708 const char *command;
709 const char *type;
710{
711 popen_called = 1;
712 return (FILE *)NULL;
713}
714
715FILE *_popen(command, type)
716 const char *command;
717 const char *type;
718{
719 return (popen (command, type));
720}
721
722int
723pclose(stream)
724FILE *stream;
725{
726 return 0;
727}
728
729int
730_pclose(stream)
731FILE *stream;
732{
733 return 0;
734}
735
736main()
737{
738 char lbuf[32];
739 popen_called = 0;
740 getcwd(lbuf, 32);
741 exit (popen_called);
742}
743], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
744 [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
745 bash_cv_getcwd_calls_popen=no]
746)])
747AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
748if test $bash_cv_getcwd_calls_popen = yes; then
749AC_DEFINE(GETCWD_BROKEN)
750AC_LIBOBJ(getcwd)
751fi
752])
753
754dnl
755dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
756dnl system, we can't use AC_PREREQ
757dnl
758AC_DEFUN([BASH_FUNC_GETHOSTBYNAME],
759[if test "X$bash_cv_have_gethostbyname" = "X"; then
760_bash_needmsg=yes
761else
762AC_MSG_CHECKING(for gethostbyname in socket library)
763_bash_needmsg=
764fi
765AC_CACHE_VAL(bash_cv_have_gethostbyname,
766[AC_TRY_LINK([#include <netdb.h>],
767[ struct hostent *hp;
768 hp = gethostbyname("localhost");
769], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
770)
771if test "X$_bash_needmsg" = Xyes; then
772 AC_MSG_CHECKING(for gethostbyname in socket library)
773fi
774AC_MSG_RESULT($bash_cv_have_gethostbyname)
775if test "$bash_cv_have_gethostbyname" = yes; then
776AC_DEFINE(HAVE_GETHOSTBYNAME)
777fi
778])
779
780AC_DEFUN([BASH_FUNC_FNMATCH_EXTMATCH],
781[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
782AC_CACHE_VAL(bash_cv_fnm_extmatch,
783[AC_TRY_RUN([
784#include <fnmatch.h>
785
786main()
787{
788#ifdef FNM_EXTMATCH
789 exit (0);
790#else
791 exit (1);
792#endif
793}
794], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
795 [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
796 bash_cv_fnm_extmatch=no])
797])
798AC_MSG_RESULT($bash_cv_fnm_extmatch)
799if test $bash_cv_fnm_extmatch = yes; then
800AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
801fi
802])
803
804AH_TEMPLATE([HAVE_POSIX_SIGSETJMP], [Define if we POSIX-style sigsetjmp/siglongjmp are available])
805AC_DEFUN([BASH_FUNC_POSIX_SETJMP],
806[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
807AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
808AC_CACHE_VAL(bash_cv_func_sigsetjmp,
809[AC_TRY_RUN([
810#ifdef HAVE_UNISTD_H
811#include <unistd.h>
812#endif
813#include <sys/types.h>
814#include <signal.h>
815#include <setjmp.h>
816
817main()
818{
819#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
820exit (1);
821#else
822
823int code;
824sigset_t set, oset;
825sigjmp_buf xx;
826
827/* get the mask */
828sigemptyset(&set);
829sigemptyset(&oset);
830sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
831sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
832
833/* save it */
834code = sigsetjmp(xx, 1);
835if (code)
836 exit(0); /* could get sigmask and compare to oset here. */
837
838/* change it */
839sigaddset(&set, SIGINT);
840sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
841
842/* and siglongjmp */
843siglongjmp(xx, 10);
844exit(1);
845#endif
846}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
847 [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
848 bash_cv_func_sigsetjmp=missing]
849)])
850AC_MSG_RESULT($bash_cv_func_sigsetjmp)
851if test $bash_cv_func_sigsetjmp = present; then
852AC_DEFINE(HAVE_POSIX_SIGSETJMP)
853fi
854])
855
856AH_TEMPLATE([STRCOLL_BROKEN], [Define if strcoll is broken with respect to strcmp in the default locale.])
857AC_DEFUN([BASH_FUNC_STRCOLL],
858[
859AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
860AC_CACHE_VAL(bash_cv_func_strcoll_broken,
861[AC_TRY_RUN([
862#include <stdio.h>
863#if defined (HAVE_LOCALE_H)
864#include <locale.h>
865#endif
866
867main(c, v)
868int c;
869char *v[];
870{
871 int r1, r2;
872 char *deflocale, *defcoll;
873
874#ifdef HAVE_SETLOCALE
875 deflocale = setlocale(LC_ALL, "");
876 defcoll = setlocale(LC_COLLATE, "");
877#endif
878
879#ifdef HAVE_STRCOLL
880 /* These two values are taken from tests/glob-test. */
881 r1 = strcoll("abd", "aXd");
882#else
883 r1 = 0;
884#endif
885 r2 = strcmp("abd", "aXd");
886
887 /* These two should both be greater than 0. It is permissible for
888 a system to return different values, as long as the sign is the
889 same. */
890
891 /* Exit with 1 (failure) if these two values are both > 0, since
892 this tests whether strcoll(3) is broken with respect to strcmp(3)
893 in the default locale. */
894 exit (r1 > 0 && r2 > 0);
895}
896], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
897 [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
898 bash_cv_func_strcoll_broken=no]
899)])
900AC_MSG_RESULT($bash_cv_func_strcoll_broken)
901if test $bash_cv_func_strcoll_broken = yes; then
902AC_DEFINE(STRCOLL_BROKEN)
903fi
904])
905
906AC_DEFUN([BASH_FUNC_PRINTF_A_FORMAT],
907[AC_MSG_CHECKING([for printf floating point output in hex notation])
908AC_CACHE_VAL(bash_cv_printf_a_format,
909[AC_TRY_RUN([
910#include <stdio.h>
911#include <string.h>
912
913int
914main()
915{
916 double y = 0.0;
917 char abuf[1024];
918
919 sprintf(abuf, "%A", y);
920 exit(strchr(abuf, 'P') == (char *)0);
921}
922], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
923 [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
924 bash_cv_printf_a_format=no]
925)])
926AC_MSG_RESULT($bash_cv_printf_a_format)
927if test $bash_cv_printf_a_format = yes; then
928AC_DEFINE(HAVE_PRINTF_A_FORMAT)
929fi
930])
931
932AC_DEFUN([BASH_STRUCT_TERMIOS_LDISC],
933[
934AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
935#include <sys/types.h>
936#include <termios.h>
937])
938])
939
940AC_DEFUN([BASH_STRUCT_TERMIO_LDISC],
941[
942AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
943#include <sys/types.h>
944#include <termio.h>
945])
946])
947
948dnl
949dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
950dnl
951dnl sets bash_cv_struct_stat_st_blocks
952dnl
953dnl unused for now; we'll see how AC_CHECK_MEMBERS works
954dnl
955AC_DEFUN([BASH_STRUCT_ST_BLOCKS],
956[
957AC_MSG_CHECKING([for struct stat.st_blocks])
958AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
959[AC_TRY_COMPILE(
960[
961#include <sys/types.h>
962#include <sys/stat.h>
963],
964[
965main()
966{
967static struct stat a;
968if (a.st_blocks) return 0;
969return 0;
970}
971], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
972])
973AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
974if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
975AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
976fi
977])
978
979AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
980[
981if test "X$bash_cv_termcap_lib" = "X"; then
982_bash_needmsg=yes
983else
984AC_MSG_CHECKING(which library has the termcap functions)
985_bash_needmsg=
986fi
987AC_CACHE_VAL(bash_cv_termcap_lib,
988[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
989 [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
990 [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
991 [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
992 bash_cv_termcap_lib=gnutermcap)])])])])
993if test "X$_bash_needmsg" = "Xyes"; then
994AC_MSG_CHECKING(which library has the termcap functions)
995fi
996AC_MSG_RESULT(using $bash_cv_termcap_lib)
997if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
998LDFLAGS="$LDFLAGS -L./lib/termcap"
999TERMCAP_LIB="./lib/termcap/libtermcap.a"
1000TERMCAP_DEP="./lib/termcap/libtermcap.a"
1001elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1002TERMCAP_LIB=-ltermcap
1003TERMCAP_DEP=
1004elif test $bash_cv_termcap_lib = libtinfo; then
1005TERMCAP_LIB=-ltinfo
1006TERMCAP_DEP=
1007elif test $bash_cv_termcap_lib = libncurses; then
1008TERMCAP_LIB=-lncurses
1009TERMCAP_DEP=
1010else
1011TERMCAP_LIB=-lcurses
1012TERMCAP_DEP=
1013fi
1014])
1015
1016dnl
1017dnl Check for the presence of getpeername in libsocket.
1018dnl If libsocket is present, check for libnsl and add it to LIBS if
1019dnl it's there, since most systems with libsocket require linking
1020dnl with libnsl as well. This should only be called if getpeername
1021dnl was not found in libc.
1022dnl
1023dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
1024dnl AS WELL
1025dnl
1026AC_DEFUN([BASH_CHECK_LIB_SOCKET],
1027[
1028if test "X$bash_cv_have_socklib" = "X"; then
1029_bash_needmsg=
1030else
1031AC_MSG_CHECKING(for socket library)
1032_bash_needmsg=yes
1033fi
1034AC_CACHE_VAL(bash_cv_have_socklib,
1035[AC_CHECK_LIB(socket, getpeername,
1036 bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
1037if test "X$_bash_needmsg" = Xyes; then
1038 AC_MSG_RESULT($bash_cv_have_socklib)
1039 _bash_needmsg=
1040fi
1041if test $bash_cv_have_socklib = yes; then
1042 # check for libnsl, add it to LIBS if present
1043 if test "X$bash_cv_have_libnsl" = "X"; then
1044 _bash_needmsg=
1045 else
1046 AC_MSG_CHECKING(for libnsl)
1047 _bash_needmsg=yes
1048 fi
1049 AC_CACHE_VAL(bash_cv_have_libnsl,
1050 [AC_CHECK_LIB(nsl, t_open,
1051 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
1052 if test "X$_bash_needmsg" = Xyes; then
1053 AC_MSG_RESULT($bash_cv_have_libnsl)
1054 _bash_needmsg=
1055 fi
1056 if test $bash_cv_have_libnsl = yes; then
1057 LIBS="-lsocket -lnsl $LIBS"
1058 else
1059 LIBS="-lsocket $LIBS"
1060 fi
1061 AC_DEFINE(HAVE_LIBSOCKET)
1062 AC_DEFINE(HAVE_GETPEERNAME)
1063fi
1064])
1065
1066AH_TEMPLATE([STRUCT_DIRENT_HAS_D_INO], [Define if struct dirent has a d_ino member])
1067AC_DEFUN([BASH_STRUCT_DIRENT_D_INO],
1068[AC_REQUIRE([AC_HEADER_DIRENT])
1069AC_MSG_CHECKING(if struct dirent has a d_ino member)
1070AC_CACHE_VAL(bash_cv_dirent_has_dino,
1071[AC_TRY_COMPILE([
1072#include <stdio.h>
1073#include <sys/types.h>
1074#ifdef HAVE_UNISTD_H
1075# include <unistd.h>
1076#endif /* HAVE_UNISTD_H */
1077#if defined(HAVE_DIRENT_H)
1078# include <dirent.h>
1079#else
1080# define dirent direct
1081# ifdef HAVE_SYS_NDIR_H
1082# include <sys/ndir.h>
1083# endif /* SYSNDIR */
1084# ifdef HAVE_SYS_DIR_H
1085# include <sys/dir.h>
1086# endif /* SYSDIR */
1087# ifdef HAVE_NDIR_H
1088# include <ndir.h>
1089# endif
1090#endif /* HAVE_DIRENT_H */
1091],[
1092struct dirent d; int z; z = d.d_ino;
1093], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
1094AC_MSG_RESULT($bash_cv_dirent_has_dino)
1095if test $bash_cv_dirent_has_dino = yes; then
1096AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
1097fi
1098])
1099
1100AH_TEMPLATE([STRUCT_DIRENT_HAS_D_FILENO], [Define if struct dirent has a d_fileno member])
1101AC_DEFUN([BASH_STRUCT_DIRENT_D_FILENO],
1102[AC_REQUIRE([AC_HEADER_DIRENT])
1103AC_MSG_CHECKING(if struct dirent has a d_fileno member)
1104AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
1105[AC_TRY_COMPILE([
1106#include <stdio.h>
1107#include <sys/types.h>
1108#ifdef HAVE_UNISTD_H
1109# include <unistd.h>
1110#endif /* HAVE_UNISTD_H */
1111#if defined(HAVE_DIRENT_H)
1112# include <dirent.h>
1113#else
1114# define dirent direct
1115# ifdef HAVE_SYS_NDIR_H
1116# include <sys/ndir.h>
1117# endif /* SYSNDIR */
1118# ifdef HAVE_SYS_DIR_H
1119# include <sys/dir.h>
1120# endif /* SYSDIR */
1121# ifdef HAVE_NDIR_H
1122# include <ndir.h>
1123# endif
1124#endif /* HAVE_DIRENT_H */
1125],[
1126struct dirent d; int z; z = d.d_fileno;
1127], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
1128AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
1129if test $bash_cv_dirent_has_d_fileno = yes; then
1130AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
1131fi
1132])
1133
1134AC_DEFUN([BASH_STRUCT_TIMEVAL],
1135[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
1136AC_CACHE_VAL(bash_cv_struct_timeval,
1137[
1138AC_EGREP_HEADER(struct timeval, sys/time.h,
1139 bash_cv_struct_timeval=yes,
1140 AC_EGREP_HEADER(struct timeval, time.h,
1141 bash_cv_struct_timeval=yes,
1142 bash_cv_struct_timeval=no))
1143])
1144AC_MSG_RESULT($bash_cv_struct_timeval)
1145if test $bash_cv_struct_timeval = yes; then
1146 AC_DEFINE(HAVE_TIMEVAL)
1147fi
1148])
1149
1150AH_TEMPLATE([STRUCT_WINSIZE_IN_SYS_IOCTL], [Define if struct winsize is in sys/ioctl.h])
1151AH_TEMPLATE([STRUCT_WINSIZE_IN_TERMIOS], [Define if struct winsize is in termios.h])
1152AC_DEFUN([BASH_STRUCT_WINSIZE],
1153[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
1154AC_CACHE_VAL(bash_cv_struct_winsize_header,
1155[AC_TRY_COMPILE([#include <sys/types.h>
1156#include <sys/ioctl.h>], [struct winsize x;],
1157 bash_cv_struct_winsize_header=ioctl_h,
1158 [AC_TRY_COMPILE([#include <sys/types.h>
1159#include <termios.h>], [struct winsize x;],
1160 bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
1161])])
1162if test $bash_cv_struct_winsize_header = ioctl_h; then
1163 AC_MSG_RESULT(sys/ioctl.h)
1164 AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
1165elif test $bash_cv_struct_winsize_header = termios_h; then
1166 AC_MSG_RESULT(termios.h)
1167 AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
1168else
1169 AC_MSG_RESULT(not found)
1170fi
1171])
1172
1173dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
1174AH_TEMPLATE([HAVE_POSIX_SIGNALS], [Define if we have the POSIX signal routines])
1175AH_TEMPLATE([HAVE_BSD_SIGNALS], [Define if we have the BSD signal routines])
1176AH_TEMPLATE([HAVE_USG_SIGHOLD], [Define if we have the USG signal routines])
1177AC_DEFUN([BASH_SYS_SIGNAL_VINTAGE],
1178[AC_REQUIRE([AC_TYPE_SIGNAL])
1179AC_MSG_CHECKING(for type of signal functions)
1180AC_CACHE_VAL(bash_cv_signal_vintage,
1181[
1182 AC_MSG_WARN([checking for posix...])
1183 AC_TRY_LINK([#include <signal.h>],[
1184 sigset_t ss;
1185 struct sigaction sa;
1186 sigemptyset(&ss); sigsuspend(&ss);
1187 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1188 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1189 ], bash_cv_signal_vintage="posix",
1190 [
1191 AC_MSG_WARN([checking for 4.2bsd...])
1192 AC_TRY_LINK([#include <signal.h>], [
1193 int mask = sigmask(SIGINT);
1194 sigsetmask(mask); sigblock(mask); sigpause(mask);
1195 ], bash_cv_signal_vintage="4.2bsd",
1196 [
1197 AC_MSG_WARN([checking for svr3...])
1198 AC_TRY_LINK([
1199 #include <signal.h>
1200 RETSIGTYPE foo() { }], [
1201 int mask = sigmask(SIGINT);
1202 sigset(SIGINT, foo); sigrelse(SIGINT);
1203 sighold(SIGINT); sigpause(SIGINT);
1204 ], bash_cv_signal_vintage="svr3", bash_cv_signal_vintage="v7"
1205 )]
1206 )]
1207)
1208])
1209AC_MSG_RESULT($bash_cv_signal_vintage)
1210if test "$bash_cv_signal_vintage" = "posix"; then
1211AC_DEFINE(HAVE_POSIX_SIGNALS)
1212elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1213AC_DEFINE(HAVE_BSD_SIGNALS)
1214elif test "$bash_cv_signal_vintage" = "svr3"; then
1215AC_DEFINE(HAVE_USG_SIGHOLD)
1216fi
1217])
1218
1219dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
1220AC_DEFUN([BASH_SYS_PGRP_SYNC],
1221[AC_REQUIRE([AC_FUNC_GETPGRP])
1222AC_MSG_CHECKING(whether pgrps need synchronization)
1223AC_CACHE_VAL(bash_cv_pgrp_pipe,
1224[AC_TRY_RUN([
1225#ifdef HAVE_UNISTD_H
1226# include <unistd.h>
1227#endif
1228main()
1229{
1230# ifdef GETPGRP_VOID
1231# define getpgID() getpgrp()
1232# else
1233# define getpgID() getpgrp(0)
1234# define setpgid(x,y) setpgrp(x,y)
1235# endif
1236 int pid1, pid2, fds[2];
1237 int status;
1238 char ok;
1239
1240 switch (pid1 = fork()) {
1241 case -1:
1242 exit(1);
1243 case 0:
1244 setpgid(0, getpid());
1245 exit(0);
1246 }
1247 setpgid(pid1, pid1);
1248
1249 sleep(2); /* let first child die */
1250
1251 if (pipe(fds) < 0)
1252 exit(2);
1253
1254 switch (pid2 = fork()) {
1255 case -1:
1256 exit(3);
1257 case 0:
1258 setpgid(0, pid1);
1259 ok = getpgID() == pid1;
1260 write(fds[1], &ok, 1);
1261 exit(0);
1262 }
1263 setpgid(pid2, pid1);
1264
1265 close(fds[1]);
1266 if (read(fds[0], &ok, 1) != 1)
1267 exit(4);
1268 wait(&status);
1269 wait(&status);
1270 exit(ok ? 0 : 5);
1271}
1272], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
1273 [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
1274 bash_cv_pgrp_pipe=no])
1275])
1276AC_MSG_RESULT($bash_cv_pgrp_pipe)
1277if test $bash_cv_pgrp_pipe = yes; then
1278AC_DEFINE(PGRP_PIPE)
1279fi
1280])
1281
1282AH_TEMPLATE([MUST_REINSTALL_SIGHANDLERS], [Define if signal handlers must be reinstalled when invoked.])
1283AC_DEFUN([BASH_SYS_REINSTALL_SIGHANDLERS],
1284[AC_REQUIRE([AC_TYPE_SIGNAL])
1285AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1286AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
1287AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
1288[AC_TRY_RUN([
1289#include <signal.h>
1290#ifdef HAVE_UNISTD_H
1291#include <unistd.h>
1292#endif
1293
1294typedef RETSIGTYPE sigfunc();
1295
1296int nsigint;
1297
1298#ifdef HAVE_POSIX_SIGNALS
1299sigfunc *
1300set_signal_handler(sig, handler)
1301 int sig;
1302 sigfunc *handler;
1303{
1304 struct sigaction act, oact;
1305 act.sa_handler = handler;
1306 act.sa_flags = 0;
1307 sigemptyset (&act.sa_mask);
1308 sigemptyset (&oact.sa_mask);
1309 sigaction (sig, &act, &oact);
1310 return (oact.sa_handler);
1311}
1312#else
1313#define set_signal_handler(s, h) signal(s, h)
1314#endif
1315
1316RETSIGTYPE
1317sigint(s)
1318int s;
1319{
1320 nsigint++;
1321}
1322
1323main()
1324{
1325 nsigint = 0;
1326 set_signal_handler(SIGINT, sigint);
1327 kill((int)getpid(), SIGINT);
1328 kill((int)getpid(), SIGINT);
1329 exit(nsigint != 2);
1330}
1331], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
1332 [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
1333 bash_cv_must_reinstall_sighandlers=no]
1334)])
1335AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
1336if test $bash_cv_must_reinstall_sighandlers = yes; then
1337AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
1338fi
1339])
1340
1341dnl check that some necessary job control definitions are present
1342AC_DEFUN([BASH_SYS_JOB_CONTROL_MISSING],
1343[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
1344AC_MSG_CHECKING(for presence of necessary job control definitions)
1345AC_CACHE_VAL(bash_cv_job_control_missing,
1346[AC_TRY_RUN([
1347#include <sys/types.h>
1348#ifdef HAVE_SYS_WAIT_H
1349#include <sys/wait.h>
1350#endif
1351#ifdef HAVE_UNISTD_H
1352#include <unistd.h>
1353#endif
1354#include <signal.h>
1355
1356/* Add more tests in here as appropriate. */
1357main()
1358{
1359/* signal type */
1360#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
1361exit(1);
1362#endif
1363
1364/* signals and tty control. */
1365#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
1366exit (1);
1367#endif
1368
1369/* process control */
1370#if !defined (WNOHANG) || !defined (WUNTRACED)
1371exit(1);
1372#endif
1373
1374/* Posix systems have tcgetpgrp and waitpid. */
1375#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
1376exit(1);
1377#endif
1378
1379#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
1380exit(1);
1381#endif
1382
1383/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
1384#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
1385exit(1);
1386#endif
1387
1388exit(0);
1389}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
1390 [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
1391 bash_cv_job_control_missing=missing]
1392)])
1393AC_MSG_RESULT($bash_cv_job_control_missing)
1394if test $bash_cv_job_control_missing = missing; then
1395AC_DEFINE(JOB_CONTROL_MISSING)
1396fi
1397])
1398
1399dnl check whether named pipes are present
1400dnl this requires a previous check for mkfifo, but that is awkward to specify
1401AC_DEFUN([BASH_SYS_NAMED_PIPES],
1402[AC_MSG_CHECKING(for presence of named pipes)
1403AC_CACHE_VAL(bash_cv_sys_named_pipes,
1404[AC_TRY_RUN([
1405#include <sys/types.h>
1406#include <sys/stat.h>
1407#ifdef HAVE_UNISTD_H
1408#include <unistd.h>
1409#endif
1410
1411/* Add more tests in here as appropriate. */
1412main()
1413{
1414int fd, err;
1415
1416#if defined (HAVE_MKFIFO)
1417exit (0);
1418#endif
1419
1420#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
1421exit (1);
1422#endif
1423
1424#if defined (NeXT)
1425exit (1);
1426#endif
1427err = mkdir("/tmp/bash-aclocal", 0700);
1428if (err < 0) {
1429 perror ("mkdir");
1430 exit(1);
1431}
1432fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
1433if (fd == -1) {
1434 rmdir ("/tmp/bash-aclocal");
1435 exit (1);
1436}
1437close(fd);
1438unlink ("/tmp/bash-aclocal/sh-np-autoconf");
1439rmdir ("/tmp/bash-aclocal");
1440exit(0);
1441}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
1442 [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
1443 bash_cv_sys_named_pipes=missing]
1444)])
1445AC_MSG_RESULT($bash_cv_sys_named_pipes)
1446if test $bash_cv_sys_named_pipes = missing; then
1447AC_DEFINE(NAMED_PIPES_MISSING)
1448fi
1449])
1450
1451AC_DEFUN([BASH_SYS_DEFAULT_MAIL_DIR],
1452[AC_MSG_CHECKING(for default mail directory)
1453AC_CACHE_VAL(bash_cv_mail_dir,
1454[if test -d /var/mail; then
1455 bash_cv_mail_dir=/var/mail
1456 elif test -d /var/spool/mail; then
1457 bash_cv_mail_dir=/var/spool/mail
1458 elif test -d /usr/mail; then
1459 bash_cv_mail_dir=/usr/mail
1460 elif test -d /usr/spool/mail; then
1461 bash_cv_mail_dir=/usr/spool/mail
1462 else
1463 bash_cv_mail_dir=unknown
1464 fi
1465])
1466AC_MSG_RESULT($bash_cv_mail_dir)
1467AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
1468])
1469
1470AC_DEFUN([BASH_HAVE_TIOCGWINSZ],
1471[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
1472AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
1473[AC_TRY_COMPILE([#include <sys/types.h>
1474#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
1475 bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
1476AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
1477if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
1478AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
1479fi
1480])
1481
1482AH_TEMPLATE([TIOCSTAT_IN_SYS_IOCTL], [Define if TIOCSTAT is in sys/ioctl.h])
1483AC_DEFUN([BASH_HAVE_TIOCSTAT],
1484[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
1485AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
1486[AC_TRY_COMPILE([#include <sys/types.h>
1487#include <sys/ioctl.h>], [int x = TIOCSTAT;],
1488 bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
1489AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
1490if test $bash_cv_tiocstat_in_ioctl = yes; then
1491AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
1492fi
1493])
1494
1495AH_TEMPLATE([FIONREAD_IN_SYS_IOCTL], [Define if FIONREAD is in sys/ioctl.h])
1496AC_DEFUN([BASH_HAVE_FIONREAD],
1497[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
1498AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
1499[AC_TRY_COMPILE([#include <sys/types.h>
1500#include <sys/ioctl.h>], [int x = FIONREAD;],
1501 bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
1502AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
1503if test $bash_cv_fionread_in_ioctl = yes; then
1504AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
1505fi
1506])
1507
1508dnl
1509dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
1510dnl require a definition of speed_t each time <termcap.h> is included,
1511dnl but you can only get speed_t if you include <termios.h> (on some
1512dnl versions) or <sys/types.h> (on others).
1513dnl
1514AH_TEMPLATE([SPEED_T_IN_SYS_TYPES], [Define if speed_t is in sys/types.h])
1515AC_DEFUN([BASH_CHECK_SPEED_T],
1516[AC_MSG_CHECKING(for speed_t in sys/types.h)
1517AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
1518[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
1519 bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
1520AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
1521if test $bash_cv_speed_t_in_sys_types = yes; then
1522AC_DEFINE(SPEED_T_IN_SYS_TYPES)
1523fi
1524])
1525
1526AH_TEMPLATE([HAVE_GETPW_DECLS], [Define if getpw functions are declared in pwd.h])
1527AC_DEFUN([BASH_CHECK_GETPW_FUNCS],
1528[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
1529AC_CACHE_VAL(bash_cv_getpw_declared,
1530[AC_EGREP_CPP(getpwuid,
1531[
1532#include <sys/types.h>
1533#ifdef HAVE_UNISTD_H
1534# include <unistd.h>
1535#endif
1536#include <pwd.h>
1537],
1538bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
1539AC_MSG_RESULT($bash_cv_getpw_declared)
1540if test $bash_cv_getpw_declared = yes; then
1541AC_DEFINE(HAVE_GETPW_DECLS)
1542fi
1543])
1544
1545AC_DEFUN([BASH_CHECK_DEV_FD],
1546[AC_MSG_CHECKING(whether /dev/fd is available)
1547AC_CACHE_VAL(bash_cv_dev_fd,
1548[if test -d /dev/fd && test -r /dev/fd/0; then
1549 bash_cv_dev_fd=standard
1550 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
1551 bash_cv_dev_fd=whacky
1552 else
1553 bash_cv_dev_fd=absent
1554 fi
1555])
1556AC_MSG_RESULT($bash_cv_dev_fd)
1557if test $bash_cv_dev_fd = "standard"; then
1558 AC_DEFINE(HAVE_DEV_FD)
1559 AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
1560elif test $bash_cv_dev_fd = "whacky"; then
1561 AC_DEFINE(HAVE_DEV_FD)
1562 AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
1563fi
1564])
1565
1566AC_DEFUN([BASH_CHECK_DEV_STDIN],
1567[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
1568AC_CACHE_VAL(bash_cv_dev_stdin,
1569[if test -d /dev/fd && test -r /dev/stdin; then
1570 bash_cv_dev_stdin=present
1571 elif test -d /proc/self/fd && test -r /dev/stdin; then
1572 bash_cv_dev_stdin=present
1573 else
1574 bash_cv_dev_stdin=absent
1575 fi
1576])
1577AC_MSG_RESULT($bash_cv_dev_stdin)
1578if test $bash_cv_dev_stdin = "present"; then
1579 AC_DEFINE(HAVE_DEV_STDIN)
1580fi
1581])
1582
1583dnl
1584dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
1585dnl
1586AC_DEFUN([BASH_CHECK_KERNEL_RLIMIT],
1587[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
1588AC_CACHE_VAL(bash_cv_kernel_rlimit,
1589[AC_TRY_COMPILE([
1590#include <sys/types.h>
1591#include <sys/resource.h>
1592],
1593[
1594 int f;
1595 f = RLIMIT_DATA;
1596], bash_cv_kernel_rlimit=no,
1597[AC_TRY_COMPILE([
1598#include <sys/types.h>
1599#define _KERNEL
1600#include <sys/resource.h>
1601#undef _KERNEL
1602],
1603[
1604 int f;
1605 f = RLIMIT_DATA;
1606], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
1607)])
1608AC_MSG_RESULT($bash_cv_kernel_rlimit)
1609if test $bash_cv_kernel_rlimit = yes; then
1610AC_DEFINE(RLIMIT_NEEDS_KERNEL)
1611fi
1612])
1613
1614dnl
1615dnl Check for 64-bit off_t -- used for malloc alignment
1616dnl
1617dnl C does not allow duplicate case labels, so the compile will fail if
1618dnl sizeof(off_t) is > 4.
1619dnl
1620AC_DEFUN([BASH_CHECK_OFF_T_64],
1621[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
1622AC_TRY_COMPILE([
1623#ifdef HAVE_UNISTD_H
1624#include <unistd.h>
1625#endif
1626#include <sys/types.h>
1627],[
1628switch (0) case 0: case (sizeof (off_t) <= 4):;
1629], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
1630if test $bash_cv_off_t_64 = yes; then
1631 AC_DEFINE(HAVE_OFF_T_64)
1632fi])
1633
1634AC_DEFUN([BASH_CHECK_RTSIGS],
1635[AC_MSG_CHECKING(for unusable real-time signals due to large values)
1636AC_CACHE_VAL(bash_cv_unusable_rtsigs,
1637[AC_TRY_RUN([
1638#include <sys/types.h>
1639#include <signal.h>
1640
1641#ifndef NSIG
1642# define NSIG 64
1643#endif
1644
1645main ()
1646{
1647 int n_sigs = 2 * NSIG;
1648#ifdef SIGRTMIN
1649 int rtmin = SIGRTMIN;
1650#else
1651 int rtmin = 0;
1652#endif
1653
1654 exit(rtmin < n_sigs);
1655}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
1656 [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
1657 bash_cv_unusable_rtsigs=yes]
1658)])
1659AC_MSG_RESULT($bash_cv_unusable_rtsigs)
1660if test $bash_cv_unusable_rtsigs = yes; then
1661AC_DEFINE(UNUSABLE_RT_SIGNALS)
1662fi
1663])
1664
1665dnl
1666dnl check for availability of multibyte characters and functions
1667dnl
1668AH_TEMPLATE([HAVE_MBSRTOWCS], [Define if we have the mbsrtowcs function])
1669AH_TEMPLATE([HAVE_WCWIDTH], [Define if we have the wcwidth function])
1670AH_TEMPLATE([HAVE_MBSTATE_T], [Define if we have mbstate_t])
1671AH_TEMPLATE([HAVE_LANGINFO_CODESET], [Define if we have nl_langinfo and CODESET])
1672AC_DEFUN([BASH_CHECK_MULTIBYTE],
1673[
1674AC_CHECK_HEADERS(wctype.h)
1675AC_CHECK_HEADERS(wchar.h)
1676AC_CHECK_HEADERS(langinfo.h)
1677
1678AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
1679AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
1680
1681AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
1682[AC_TRY_RUN([
1683#include <wchar.h>
1684int
1685main ()
1686{
1687 mbstate_t ps;
1688 return 0;
1689}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
1690if test $bash_cv_have_mbstate_t = yes; then
1691 AC_DEFINE(HAVE_MBSTATE_T)
1692fi
1693
1694AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
1695[AC_TRY_LINK(
1696[#include <langinfo.h>],
1697[char* cs = nl_langinfo(CODESET);],
1698bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
1699if test $bash_cv_langinfo_codeset = yes; then
1700 AC_DEFINE(HAVE_LANGINFO_CODESET)
1701fi
1702
1703])
1704
1705dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
1706dnl require:
1707dnl AC_PROG_CC
1708dnl BASH_CHECK_LIB_TERMCAP
1709
1710AC_DEFUN([RL_LIB_READLINE_VERSION],
1711[
1712AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
1713
1714AC_MSG_CHECKING([version of installed readline library])
1715
1716# What a pain in the ass this is.
1717
1718# save cpp and ld options
1719_save_CFLAGS="$CFLAGS"
1720_save_LDFLAGS="$LDFLAGS"
1721_save_LIBS="$LIBS"
1722
1723# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
1724# allows the caller to do something like $_rl_prefix=$withval if the user
1725# specifies --with-installed-readline=PREFIX as an argument to configure
1726
1727if test -z "$ac_cv_rl_prefix"; then
1728test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
1729fi
1730
1731eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
1732eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
1733
1734LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
1735CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
1736LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
1737
1738AC_TRY_RUN([
1739#include <stdio.h>
1740#include <readline/readline.h>
1741
1742main()
1743{
1744 FILE *fp;
1745 fp = fopen("conftest.rlv", "w");
1746 if (fp == 0) exit(1);
1747 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
1748 fclose(fp);
1749 exit(0);
1750}
1751],
1752ac_cv_rl_version=`cat conftest.rlv`,
1753ac_cv_rl_version='0.0',
1754ac_cv_rl_version='4.2')
1755
1756CFLAGS="$_save_CFLAGS"
1757LDFLAGS="$_save_LDFLAGS"
1758LIBS="$_save_LIBS"
1759
1760RL_MAJOR=0
1761RL_MINOR=0
1762
1763# (
1764case "$ac_cv_rl_version" in
17652*|3*|4*|5*|6*|7*|8*|9*)
1766 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
1767 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
1768 ;;
1769esac
1770
1771# (((
1772case $RL_MAJOR in
1773[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
1774[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
1775*) _RL_MAJOR=00 ;;
1776esac
1777
1778# (((
1779case $RL_MINOR in
1780[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
1781[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
1782*) _RL_MINOR=00 ;;
1783esac
1784
1785RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
1786
1787# Readline versions greater than 4.2 have these defines in readline.h
1788
1789if test $ac_cv_rl_version = '0.0' ; then
1790 AC_MSG_WARN([Could not test version of installed readline library.])
1791elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
1792 # set these for use by the caller
1793 RL_PREFIX=$ac_cv_rl_prefix
1794 RL_LIBDIR=$ac_cv_rl_libdir
1795 RL_INCLUDEDIR=$ac_cv_rl_includedir
1796 AC_MSG_RESULT($ac_cv_rl_version)
1797else
1798
1799AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
1800AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
1801AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
1802
1803AC_SUBST(RL_VERSION)
1804AC_SUBST(RL_MAJOR)
1805AC_SUBST(RL_MINOR)
1806
1807# set these for use by the caller
1808RL_PREFIX=$ac_cv_rl_prefix
1809RL_LIBDIR=$ac_cv_rl_libdir
1810RL_INCLUDEDIR=$ac_cv_rl_includedir
1811
1812AC_MSG_RESULT($ac_cv_rl_version)
1813
1814fi
1815])
1816
1817AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
1818[
1819AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
1820AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
1821[AC_TRY_RUN([
1822#ifdef HAVE_LOCALE_H
1823#include <locale.h>
1824#endif
1825#include <stdio.h>
1826#include <ctype.h>
1827
1828main(c, v)
1829int c;
1830char *v[];
1831{
1832 char *deflocale;
1833 unsigned char x;
1834 int r1, r2;
1835
1836#ifdef HAVE_SETLOCALE
1837 /* We take a shot here. If that locale is not known, try the
1838 system default. We try this one because '\342' (226) is
1839 known to be a printable character in that locale. */
1840 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
1841 if (deflocale == 0)
1842 deflocale = setlocale(LC_ALL, "");
1843#endif
1844
1845 x = '\342';
1846 r1 = isprint(x);
1847 x -= 128;
1848 r2 = isprint(x);
1849 exit (r1 == 0 || r2 == 0);
1850}
1851], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
1852 [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no)
1853 bash_cv_func_ctype_nonascii=no]
1854)])
1855AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
1856if test $bash_cv_func_ctype_nonascii = yes; then
1857AC_DEFINE(CTYPE_NON_ASCII)
1858fi
1859])
1860
1861AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
1862[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
1863[AC_TRY_LINK([
1864#include <signal.h>
1865],[ sig_atomic_t x; ],
1866ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
1867if test "$ac_cv_have_sig_atomic_t" = "no"
1868then
1869 AC_CHECK_TYPE(sig_atomic_t,int)
1870fi
1871])
diff --git a/meta/recipes-core/readline/readline-6.2/norpath.patch b/meta/recipes-core/readline/readline-6.2/norpath.patch
new file mode 100644
index 0000000000..5d71582b70
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.2/norpath.patch
@@ -0,0 +1,21 @@
1This support script ends up hardcoding unnecessary rpaths into the libraries. We
2will search $libdir automatically so this is just wastes space. There may be some
3cases this is necessary but our use cases aren't one of them.
4
5Upstream-Status: Inappropriate
6
7RP 2012/2/23
8
9Index: readline-6.2/support/shobj-conf
10===================================================================
11--- readline-6.2.orig/support/shobj-conf 2012-02-23 11:06:37.193179379 +0000
12+++ readline-6.2/support/shobj-conf 2012-02-23 11:06:50.049178918 +0000
13@@ -114,7 +114,7 @@
14 SHOBJ_LD='${CC}'
15 SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
16
17- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
18+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
19 SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
20 ;;
21
diff --git a/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch b/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch
new file mode 100644
index 0000000000..ccfdb9f8c9
--- /dev/null
+++ b/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch
@@ -0,0 +1,114 @@
1readline: only enable meta key for a single call readline().
2
3terminal.c
4 - change _rl_enable_meta_key to set a flag indicating that it sent the
5 enable-meta sequence
6 - _rl_disable_meta_key: new function to turn off meta mode after we
7 turned it on with _rl_enable_meta_key
8
9rlprivate.h
10 - extern declaration for _rl_disable_meta_key
11
12readline.c
13- _rl_internal_teardown: add call to _rl_disable_meta_key to make the
14 meta key active only for the duration of the call to readline()
15- _rl_internal_setup: move call to _rl_enable_meta_key here from
16 readline_initialize_everything so the meta key is active only for
17 the duration of the call to readline(). Suggestion from Miroslav
18 Lichvar <mlichvar@redhat.com>
19
20Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21Upstream-Status: backport
22Imported patch from: http://git.savannah.gnu.org/cgit/bash.git/tag/?id=bash-4.3-alpha
23---
24 readline.c | 12 ++++++++----
25 rlprivate.h | 1 +
26 terminal.c | 19 ++++++++++++++++++-
27 3 files changed, 27 insertions(+), 5 deletions(-)
28
29diff --git a/readline.c b/readline.c
30--- a/readline.c
31+++ b/readline.c
32@@ -369,6 +369,11 @@ readline_internal_setup ()
33 _rl_in_stream = rl_instream;
34 _rl_out_stream = rl_outstream;
35
36+ /* Enable the meta key only for the duration of readline(), if this
37+ terminal has one. */
38+ if (_rl_enable_meta)
39+ _rl_enable_meta_key ();
40+
41 if (rl_startup_hook)
42 (*rl_startup_hook) ();
43
44@@ -437,6 +442,9 @@ readline_internal_teardown (eof)
45 if (rl_undo_list)
46 rl_free_undo_list ();
47
48+ /* Disable the meta key, if this terminal has one. */
49+ _rl_disable_meta_key ();
50+
51 /* Restore normal cursor, if available. */
52 _rl_set_insert_mode (RL_IM_INSERT, 0);
53
54@@ -1091,10 +1099,6 @@ readline_initialize_everything ()
55 /* Try to bind a common arrow key prefix, if not already bound. */
56 bind_arrow_keys ();
57
58- /* Enable the meta key, if this terminal has one. */
59- if (_rl_enable_meta)
60- _rl_enable_meta_key ();
61-
62 /* If the completion parser's default word break characters haven't
63 been set yet, then do so now. */
64 if (rl_completer_word_break_characters == (char *)NULL)
65diff --git a/rlprivate.h b/rlprivate.h
66index 384ff67..be2c2c6 100644
67--- a/rlprivate.h
68+++ b/rlprivate.h
69@@ -339,6 +339,7 @@ extern int _rl_output_character_function PARAMS((int));
70 extern void _rl_output_some_chars PARAMS((const char *, int));
71 extern int _rl_backspace PARAMS((int));
72 extern void _rl_enable_meta_key PARAMS((void));
73+extern void _rl_disable_meta_key PARAMS((void));
74 extern void _rl_control_keypad PARAMS((int));
75 extern void _rl_set_cursor PARAMS((int, int));
76
77diff --git a/terminal.c b/terminal.c
78index f8c2f6e..21ee031 100644
79--- a/terminal.c
80+++ b/terminal.c
81@@ -683,12 +683,29 @@ rl_ding ()
82 /* */
83 /* **************************************************************** */
84
85+static int enabled_meta = 0; /* flag indicating we enabled meta mode */
86+
87 void
88 _rl_enable_meta_key ()
89 {
90 #if !defined (__DJGPP__)
91 if (term_has_meta && _rl_term_mm)
92- tputs (_rl_term_mm, 1, _rl_output_character_function);
93+ {
94+ tputs (_rl_term_mm, 1, _rl_output_character_function);
95+ enabled_meta = 1;
96+ }
97+#endif
98+}
99+
100+void
101+_rl_disable_meta_key ()
102+{
103+#if !defined (__DJGPP__)
104+ if (term_has_meta && _rl_term_mo && enabled_meta)
105+ {
106+ tputs (_rl_term_mo, 1, _rl_output_character_function);
107+ enabled_meta = 0;
108+ }
109 #endif
110 }
111
112--
1131.8.1.2
114
diff --git a/meta/recipes-core/readline/readline.inc b/meta/recipes-core/readline/readline.inc
new file mode 100644
index 0000000000..6c43e2df11
--- /dev/null
+++ b/meta/recipes-core/readline/readline.inc
@@ -0,0 +1,37 @@
1SUMMARY = "Library for editing typed command lines"
2DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
3command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
4additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
5lines, and perform csh-like history expansion on previous commands."
6SECTION = "libs"
7
8# GPLv2+ (< 6.0), GPLv3+ (>= 6.0)
9LICENSE = "GPLv3+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
11
12DEPENDS += "ncurses"
13
14SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \
15 file://configure-fix.patch \
16 file://norpath.patch \
17 file://acinclude.m4"
18
19S = "${WORKDIR}/${BPN}-${PV}"
20
21inherit autotools
22
23LEAD_SONAME = "libreadline.so"
24
25do_configure_prepend () {
26 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
27}
28
29do_install_append () {
30 # Make install doesn't properly install these
31 oe_libinstall -so -C shlib libhistory ${D}${libdir}
32 oe_libinstall -so -C shlib libreadline ${D}${libdir}
33
34 rmdir ${D}${bindir}
35}
36
37BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/readline/readline_5.2.bb b/meta/recipes-core/readline/readline_5.2.bb
new file mode 100644
index 0000000000..05ab26f053
--- /dev/null
+++ b/meta/recipes-core/readline/readline_5.2.bb
@@ -0,0 +1,82 @@
1SUMMARY = "Library for editing typed command lines"
2DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \
3command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \
4additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \
5lines, and perform csh-like history expansion on previous commands."
6SECTION = "libs"
7
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=03b36fdd84f74b8d8189a202b980b67f"
10
11DEPENDS += "ncurses"
12
13PR = "r9"
14
15SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \
16 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-001;name=patch1;apply=yes;striplevel=0 \
17 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-002;name=patch2;apply=yes;striplevel=0 \
18 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-003;name=patch3;apply=yes;striplevel=0 \
19 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-004;name=patch4;apply=yes;striplevel=0 \
20 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-005;name=patch5;apply=yes;striplevel=0 \
21 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-006;name=patch6;apply=yes;striplevel=0 \
22 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-007;name=patch7;apply=yes;striplevel=0 \
23 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-008;name=patch8;apply=yes;striplevel=0 \
24 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-009;name=patch9;apply=yes;striplevel=0 \
25 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-010;name=patch10;apply=yes;striplevel=0 \
26 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-011;name=patch11;apply=yes;striplevel=0 \
27 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-012;name=patch12;apply=yes;striplevel=0 \
28 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-013;name=patch13;apply=yes;striplevel=0 \
29 ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-014;name=patch14;apply=yes;striplevel=0 \
30 file://configure-fix.patch \
31 file://acinclude.m4 \
32 file://fix-redundant-rpath.patch"
33
34SRC_URI[archive.md5sum] = "e39331f32ad14009b9ff49cc10c5e751"
35SRC_URI[archive.sha256sum] = "12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45"
36
37SRC_URI[patch1.md5sum] = "9d4d41622aa9b230c57f68548ce87d8f"
38SRC_URI[patch1.sha256sum] = "eac304c369154059f93049ada328739faaf40338d3cb1fb4b544c93d5ce3f8d5"
39SRC_URI[patch2.md5sum] = "f03e512d14206e37f7d6a748b56b9476"
40SRC_URI[patch2.sha256sum] = "9deacaef25507a0c2ae0b661bf9342559b59a2954d66ea3c5f5bcd900fdfcf78"
41SRC_URI[patch3.md5sum] = "252b42d8750f1a94b6bdf086612dceb2"
42SRC_URI[patch3.sha256sum] = "2a55d2ecb1c9b0147aeb193a6323616ab31c1c525a83b2db3a994b15594ba934"
43SRC_URI[patch4.md5sum] = "a32333c2e603a3ed250514e91050e552"
44SRC_URI[patch4.sha256sum] = "a03b65633781efa7c3aae5d57162985e7b7a3c10acf0f2621be610e16f27e5f2"
45SRC_URI[patch5.md5sum] = "8106796c09b789523a3a78ab69c04b6d"
46SRC_URI[patch5.sha256sum] = "06001896514148a757ea6edbbd40c4fc4331dc653847244386c37b138b150f64"
47SRC_URI[patch6.md5sum] = "512188e2bf0837f7eca19dbf71f182ae"
48SRC_URI[patch6.sha256sum] = "dfef3e982c0adf8bb5a9b7d0468ec8f5f18138b325e28759437464de5be71013"
49SRC_URI[patch7.md5sum] = "ac17aca62eb6fb398c9f2fe9de540aff"
50SRC_URI[patch7.sha256sum] = "775b028c7b761397ac6ae1bdfbac7e896dc3b9b3adc2f91312499180ca13bdd1"
51SRC_URI[patch8.md5sum] = "2484c392db021905f112cf97a94dfd4c"
52SRC_URI[patch8.sha256sum] = "a21b4e0bf0530b878bad24d5be23d18a9e03a75a31ae30844dc0933bb3d77ecd"
53SRC_URI[patch9.md5sum] = "fc6eb35d07914fae5c57d49c12483ff7"
54SRC_URI[patch9.sha256sum] = "138d5e0f0709a47a2d1621295a3dd5e3cc73b63b5cc28dab03abc4e94fe95ecf"
55SRC_URI[patch10.md5sum] = "7a2bf3dc7ac7680b1461a5701100e91b"
56SRC_URI[patch10.sha256sum] = "83f8c1aadb86b1a2fad8821a9c6be72a8de5afd7fd9fde58a30b3b57d939693e"
57SRC_URI[patch11.md5sum] = "ef6cef6822663470f6ac8c517c5a7ec6"
58SRC_URI[patch11.sha256sum] = "08ad3384ab0906e6fa4cc417eb8c43ff59375bcead15fd5c8e31730f0413b3d6"
59SRC_URI[patch12.md5sum] = "e3e9f441c8111589855bc363e5640f6c"
60SRC_URI[patch12.sha256sum] = "20f0243be2299c23213492cc2c19cfd15cc528d2b566a76a2de58306bb9e4c9e"
61SRC_URI[patch13.md5sum] = "3e2e5f543ed268a68fd1fa839faade1a"
62SRC_URI[patch13.sha256sum] = "0cc649516a5bdfa61c5e56937407570288b6972d75aa1bd060ad30ebe98144d5"
63SRC_URI[patch14.md5sum] = "a1be30e1c6f1099bb5fcef00a2631fb8"
64SRC_URI[patch14.sha256sum] = "6f1a68320d01522ca1ea5a737124ecc8739f3dcbfea2dee21e3ccf839a21a817"
65
66S = "${WORKDIR}/${BPN}-${PV}"
67
68inherit autotools
69
70LEAD_SONAME = "libreadline.so"
71
72do_configure_prepend () {
73 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
74}
75
76do_install_append () {
77 # Make install doesn't properly install these
78 oe_libinstall -so -C shlib libhistory ${D}${libdir}
79 oe_libinstall -so -C shlib libreadline ${D}${libdir}
80}
81
82BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/readline/readline_6.2.bb b/meta/recipes-core/readline/readline_6.2.bb
new file mode 100644
index 0000000000..87636da4e3
--- /dev/null
+++ b/meta/recipes-core/readline/readline_6.2.bb
@@ -0,0 +1,22 @@
1require readline.inc
2
3PR = "r4"
4
5SRC_URI += "${GNU_MIRROR}/readline/readline-6.2-patches/readline62-001;name=patch1;apply=yes;striplevel=0 \
6${GNU_MIRROR}/readline/readline-6.2-patches/readline62-002;name=patch2;apply=yes;striplevel=0 \
7${GNU_MIRROR}/readline/readline-6.2-patches/readline62-003;name=patch3;apply=yes;striplevel=0 \
8${GNU_MIRROR}/readline/readline-6.2-patches/readline62-004;name=patch4;apply=yes;striplevel=0 \
9file://readline-only-enable-meta-key-for-a-single-call-read.patch \
10"
11
12SRC_URI[archive.md5sum] = "67948acb2ca081f23359d0256e9a271c"
13SRC_URI[archive.sha256sum] = "79a696070a058c233c72dd6ac697021cc64abd5ed51e59db867d66d196a89381"
14
15SRC_URI[patch1.md5sum] = "83287d52a482f790dfb30ec0a8746669"
16SRC_URI[patch1.sha256sum] = "38a86c417437692db01069c8ab40a9a8f548e67ad9af0390221b024b1c39b4e3"
17SRC_URI[patch2.md5sum] = "0665020ea118e8434bd145fb71f452cc"
18SRC_URI[patch2.sha256sum] = "1e6349128cb573172063ea007c67af79256889c809973002ca66c5dfc503c7d4"
19SRC_URI[patch3.md5sum] = "c9d5d79718856e711667dede87cb7622"
20SRC_URI[patch3.sha256sum] = "cb2131ff352d6e5f82edc09755191f74220b15f026bdb6c52624931c79622374"
21SRC_URI[patch4.md5sum] = "c08e787f50579ce301075c523fa660a4"
22SRC_URI[patch4.sha256sum] = "09bd342479ea5bb8b6411bfdf7d302fab2e521d1d241bcb8344d3bad5d9f5476"
diff --git a/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/obsolete_automake_macros.patch b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..9d828d7026
--- /dev/null
+++ b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Submitted [http://sourceforge.net/tracker/?func=detail&aid=3600345&group_id=44427&atid=439544]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd sysfsutils-2.1.0/configure.ac sysfsutils-2.1.0/configure.ac
5--- sysfsutils-2.1.0/configure.ac 2006-08-07 08:08:00.000000000 +0300
6+++ sysfsutils-2.1.0/configure.ac 2013-01-11 08:13:08.651550634 +0200
7@@ -2,7 +2,7 @@
8 AC_INIT(sysfsutils, 2.1.0, linux-diag-devel@lists.sourceforge.net)
9 AM_INIT_AUTOMAKE
10 AC_CONFIG_SRCDIR([config.h.in])
11-AM_CONFIG_HEADER([config.h])
12+AC_CONFIG_HEADERS([config.h])
13
14 # Checks for KLIBC support (should be before AC_PROG_LIBTOOL and AC_PROG_CC)
15 AC_CHECK_KLIBC
diff --git a/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/separatebuild.patch b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/separatebuild.patch
new file mode 100644
index 0000000000..82e725e2ac
--- /dev/null
+++ b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/separatebuild.patch
@@ -0,0 +1,65 @@
1Upstream-Status: Pending
2
3Fix out of tree build issues so ${B} != ${S} works.
4
5RP 2013/03/18
6
7Index: sysfsutils-2.1.0/cmd/Makefile.am
8===================================================================
9--- sysfsutils-2.1.0.orig/cmd/Makefile.am 2013-03-08 08:57:27.224556508 +0000
10+++ sysfsutils-2.1.0/cmd/Makefile.am 2013-03-08 08:57:27.480556502 +0000
11@@ -1,6 +1,6 @@
12 bin_PROGRAMS = systool
13 systool_SOURCES = systool.c names.c names.h
14-INCLUDES = -I../include
15+INCLUDES = -I$(srcdir)/../include
16 LDADD = ../lib/libsysfs.la
17 EXTRA_CFLAGS = @EXTRA_CFLAGS@
18 AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CFLAGS)
19Index: sysfsutils-2.1.0/lib/Makefile.am
20===================================================================
21--- sysfsutils-2.1.0.orig/lib/Makefile.am 2013-03-08 08:57:27.224556508 +0000
22+++ sysfsutils-2.1.0/lib/Makefile.am 2013-03-08 08:57:27.480556502 +0000
23@@ -1,7 +1,7 @@
24 lib_LTLIBRARIES = libsysfs.la
25 libsysfs_la_SOURCES = sysfs_utils.c sysfs_attr.c sysfs_class.c dlist.c \
26 sysfs_device.c sysfs_driver.c sysfs_bus.c sysfs_module.c sysfs.h
27-INCLUDES = -I../include
28+INCLUDES = -I$(srcdir)/../include
29 libsysfs_la_LDFLAGS = -version-info 2:1:0
30 EXTRA_CFLAGS = @EXTRA_CLFAGS@
31 libsysfs_la_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CLFAGS)
32Index: sysfsutils-2.1.0/test/Makefile.am
33===================================================================
34--- sysfsutils-2.1.0.orig/test/Makefile.am 2013-03-08 08:57:27.224556508 +0000
35+++ sysfsutils-2.1.0/test/Makefile.am 2013-03-08 09:06:48.196543326 +0000
36@@ -2,14 +2,14 @@
37 BUILT_SOURCES = test.h
38 CLEANFILES = test.h
39 test.h:
40- ./create-test
41+ $(srcdir)/create-test $(srcdir)/libsysfs.conf
42 get_device_SOURCES = get_device.c
43 get_driver_SOURCES = get_driver.c
44 get_module_SOURCES = get_module.c
45 testlibsysfs_SOURCES = test.c test_attr.c test_bus.c test_class.c \
46 test_device.c test_driver.c test_module.c test_utils.c \
47 testout.c test-defs.h libsysfs.conf create-test
48-INCLUDES = -I../include
49+INCLUDES = -I$(srcdir)/../include
50 LDADD = ../lib/libsysfs.la
51 EXTRA_CFLAGS = @EXTRA_CLFAGS@
52 AM_CFLAGS = -Wall -W -Wstrict-prototypes $(EXTRA_CLFAGS)
53Index: sysfsutils-2.1.0/test/create-test
54===================================================================
55--- sysfsutils-2.1.0.orig/test/create-test 2005-11-28 10:22:10.000000000 +0000
56+++ sysfsutils-2.1.0/test/create-test 2013-03-08 09:07:03.372542838 +0000
57@@ -2,7 +2,7 @@
58
59 rm -f test.h
60
61-conf_file=./libsysfs.conf
62+conf_file=$1
63
64 . $conf_file
65
diff --git a/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch
new file mode 100644
index 0000000000..1a35b7897a
--- /dev/null
+++ b/meta/recipes-core/sysfsutils/sysfsutils-2.1.0/sysfsutils-2.0.0-class-dup.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Backport [from fedora core 9]
2
3This patch is from the Fedora Core 9 sysfsutils-2.1.0-3.fc9 package.
4
5It fixes a problem in the upstream package where not all devices
6will be returned by the function.
7
8The package License indicates this is GPLv2 licensed.
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12diff -puN lib/sysfs_class.c~sysfsutils_class_dup lib/sysfs_class.c
13--- sysfsutils-2.1.0/lib/sysfs_class.c~sysfsutils_class_dup 2006-09-07 17:01:26.000000000 -0500
14+++ sysfsutils-2.1.0-bjking1/lib/sysfs_class.c 2006-09-07 17:01:26.000000000 -0500
15@@ -66,7 +66,7 @@ static int cdev_name_equal(void *a, void
16 return 0;
17
18 if (strncmp((char *)a, ((struct sysfs_class_device *)b)->name,
19- strlen((char *)a)) == 0)
20+ SYSFS_NAME_LEN) == 0)
21 return 1;
22
23 return 0;
diff --git a/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb b/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb
new file mode 100644
index 0000000000..d7b461e03f
--- /dev/null
+++ b/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Tools for working with sysfs."
2DESCRIPTION = "Tools for working with the sysfs virtual filesystem. The tool 'systool' can query devices by bus, class and topology."
3HOMEPAGE = "http://linux-diag.sourceforge.net/Sysfsutils.html"
4
5LICENSE = "GPLv2 & LGPLv2.1"
6LICENSE_${PN} = "GPLv2"
7LICENSE_libsysfs = "LGPLv2.1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=3d06403ea54c7574a9e581c6478cc393 \
9 file://cmd/GPL;md5=d41d4e2e1e108554e0388ea4aecd8d27 \
10 file://lib/LGPL;md5=b75d069791103ffe1c0d6435deeff72e"
11PR = "r5"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/linux-diag/sysfsutils-${PV}.tar.gz \
14 file://sysfsutils-2.0.0-class-dup.patch \
15 file://obsolete_automake_macros.patch \
16 file://separatebuild.patch"
17
18SRC_URI[md5sum] = "14e7dcd0436d2f49aa403f67e1ef7ddc"
19SRC_URI[sha256sum] = "e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a"
20S = "${WORKDIR}/sysfsutils-${PV}"
21
22inherit autotools
23
24PACKAGES =+ "libsysfs libsysfs-dev libsysfs-staticdev"
25FILES_libsysfs = "${libdir}/lib*${SOLIBS}"
26FILES_libsysfs-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
27FILES_libsysfs-staticdev = "${libdir}/lib*.a"
28
29export libdir = "${base_libdir}"
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
new file mode 100644
index 0000000000..c47c14bf95
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -0,0 +1,56 @@
1DESCRIPTION = "Units to make systemd work better with existing sysvinit scripts"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
5
6PR = "r18"
7
8DEPENDS = "systemd-systemctl-native"
9
10inherit allarch
11
12SRC_URI = "file://*.service"
13
14do_install() {
15 install -d ${D}${systemd_unitdir}/system/basic.target.wants
16 install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
17 install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system
18 ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/basic.target.wants/
19 ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
20
21 install -m 0644 ${WORKDIR}/machineid.service ${D}${systemd_unitdir}/system
22 ln -sf ../machineid.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
23 ln -sf ../machineid.service ${D}${systemd_unitdir}/system/basic.target.wants/
24}
25
26SYSTEMD_DISABLED_SYSV_SERVICES = " \
27 busybox-udhcpc \
28 dnsmasq \
29 hwclock \
30 networking \
31 syslog.busybox \
32 dbus-1 \
33"
34
35pkg_postinst_${PN} () {
36 cd $D${sysconfdir}/init.d
37
38 echo "Disabling the following sysv scripts: "
39
40 OPTS=""
41
42 if [ -n "$D" ]; then
43 OPTS="--root=$D"
44 fi
45
46 for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
47 if [ \( -e $i -o $i.sh \) -a ! -e $D${sysconfdir}/systemd/system/$i.service ] ; then
48 echo -n "$i: " ; systemctl ${OPTS} mask $i.service
49 fi
50 done ; echo
51}
52
53FILES_${PN} = "${systemd_unitdir}/system ${bindir}"
54RDPEPENDS_${PN} = "systemd"
55
56
diff --git a/meta/recipes-core/systemd/systemd-compat-units/machineid.service b/meta/recipes-core/systemd/systemd-compat-units/machineid.service
new file mode 100644
index 0000000000..f586c6d60f
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-compat-units/machineid.service
@@ -0,0 +1,16 @@
1[Unit]
2Description=Machine ID first boot configure
3DefaultDependencies=no
4ConditionPathExists=|!/etc/machine-id
5After=systemd-remount-fs.service
6Before=sysinit.target
7
8[Service]
9ExecStart=/bin/systemd-machine-id-setup
10RemainAfterExit=No
11Type=oneshot
12StandardOutput=syslog
13
14[Install]
15WantedBy=basic.target
16WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service b/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
new file mode 100644
index 0000000000..4ebc2344cf
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-compat-units/run-postinsts.service
@@ -0,0 +1,17 @@
1[Unit]
2Description=Run pending postinsts
3DefaultDependencies=no
4ConditionPathExists=|/etc/rcS.d/S99run-postinsts
5After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
6Before=sysinit.target
7
8[Service]
9ExecStart=/etc/rcS.d/S99run-postinsts
10RemainAfterExit=No
11Type=oneshot
12StandardOutput=syslog
13TimeoutSec=0
14
15[Install]
16WantedBy=basic.target
17WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
new file mode 100644
index 0000000000..37c49b12d7
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -0,0 +1,49 @@
1DESCRIPTION = "Systemd serial config"
2LICENSE = "GPLv2+"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
4
5PR = "r3"
6
7SERIAL_CONSOLE ?= "115200 ttyS0"
8
9SRC_URI = "file://serial-getty@.service"
10
11do_install() {
12 if [ ! -z "${SERIAL_CONSOLES}" ] ; then
13 default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
14 install -d ${D}${systemd_unitdir}/system/
15 install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
16 install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/
17 sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/serial-getty@.service
18
19 tmp="${SERIAL_CONSOLES}"
20 for entry in $tmp ; do
21 baudrate=`echo $entry | sed 's/\;.*//'`
22 ttydev=`echo $entry | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'`
23 if [ "$baudrate" = "$default_baudrate" ] ; then
24 # enable the service
25 ln -sf ${systemd_unitdir}/system/serial-getty@.service \
26 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service
27 else
28 # install custom service file for the non-default baudrate
29 install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service
30 sed -i -e s/\@BAUDRATE\@/$baudrate/g ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service
31 # enable the service
32 ln -sf ${systemd_unitdir}/system/serial-getty$baudrate@.service \
33 ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty$baudrate@$ttydev.service
34 fi
35 done
36 fi
37}
38
39RDEPENDS_${PN} = "systemd"
40
41# This is a machine specific file
42FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
43PACKAGE_ARCH = "${MACHINE_ARCH}"
44
45# As this package is tied to systemd, only build it when we're also building systemd.
46python () {
47 if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
48 raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
49}
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
new file mode 100644
index 0000000000..1c14dfea6a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -0,0 +1,36 @@
1# This file is part of systemd.
2#
3# systemd is free software; you can redistribute it and/or modify it
4# under the terms of the GNU Lesser General Public License as published by
5# the Free Software Foundation; either version 2.1 of the License, or
6# (at your option) any later version.
7
8[Unit]
9Description=Serial Getty on %I
10Documentation=man:agetty(8) man:systemd-getty-generator(8)
11Documentation=http://0pointer.de/blog/projects/serial-console.html
12BindsTo=dev-%i.device
13After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
14After=rc-local.service
15
16# If additional gettys are spawned during boot then we should make
17# sure that this is synchronized before getty.target, even though
18# getty.target didn't actually pull it in.
19Before=getty.target
20IgnoreOnIsolate=yes
21
22[Service]
23ExecStart=-/sbin/agetty -s %I @BAUDRATE@ vt102
24Type=idle
25Restart=always
26RestartSec=0
27UtmpIdentifier=%I
28TTYPath=/dev/%I
29TTYReset=yes
30TTYVHangup=yes
31KillMode=process
32IgnoreSIGPIPE=no
33
34# Some login implementations ignore SIGTERM, so we send SIGHUP
35# instead, to ensure that login terminates cleanly.
36KillSignal=SIGHUP
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb
new file mode 100644
index 0000000000..59405842e9
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "Wrapper to enable of systemd services"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
5
6PR = "r6"
7
8inherit native
9
10SRC_URI = "file://systemctl"
11
12do_install() {
13 install -d ${D}${bindir}
14 install -m 0755 ${WORKDIR}/systemctl ${D}${bindir}
15}
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
new file mode 100755
index 0000000000..f7866565b9
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -0,0 +1,127 @@
1#!/bin/sh
2echo "Started $0 $*"
3
4ROOT=
5
6# parse command line params
7action=
8while [ $# != 0 ]; do
9 opt="$1"
10
11 case "$opt" in
12 enable)
13 shift
14
15 action="$opt"
16 services="$1"
17 cmd_args="1"
18 shift
19 ;;
20 disable)
21 shift
22
23 action="$opt"
24 services="$1"
25 cmd_args="1"
26 shift
27 ;;
28 mask)
29 shift
30
31 action="$opt"
32 services="$1"
33 cmd_args="1"
34 shift
35 ;;
36 --root=*)
37 ROOT=${opt##--root=}
38 cmd_args="0"
39 shift
40 ;;
41 *)
42 if [ "$cmd_args" = "1" ]; then
43 services="$services $opt"
44 shift
45 else
46 echo "'$opt' is an unkown option; exiting with error"
47 exit 1
48 fi
49 ;;
50 esac
51done
52
53for service in $services; do
54 if [ "$action" = "mask" ]; then
55 if [ ! -d $ROOT/etc/systemd/system/ ]; then
56 mkdir -p $ROOT/etc/systemd/system/
57 fi
58 cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service"
59 echo "$cmd"
60 $cmd
61 exit 0
62 fi
63
64 echo "Try to find location of $service..."
65 # find service file
66 for p in $ROOT/etc/systemd/system \
67 $ROOT/lib/systemd/system \
68 $ROOT/usr/lib/systemd/system; do
69 if [ -e $p/$service ]; then
70 service_file=$p/$service
71 service_file=${service_file##$ROOT}
72 fi
73 done
74 if [ -z "$service_file" ]; then
75 echo "'$service' couldn't be found; exiting with error"
76 exit 1
77 fi
78 echo "Found $service in $service_file"
79
80 # If any new unit types are added to systemd they should be added
81 # to this regular expression.
82 unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)$'
83
84 # create the required symbolic links
85 wanted_by=$(sed '/^WantedBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
86 | tr ',' '\n' \
87 | grep "$unit_types_re")
88
89 for r in $wanted_by; do
90 echo "WantedBy=$r found in $service"
91 if [ "$action" = "enable" ]; then
92 mkdir -p $ROOT/etc/systemd/system/$r.wants
93 ln -s $service_file $ROOT/etc/systemd/system/$r.wants
94 echo "Enabled $service for $wanted_by."
95 else
96 rm -f $ROOT/etc/systemd/system/$r.wants/$service
97 rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
98 echo "Disabled $service for $wanted_by."
99 fi
100 done
101
102 # create the required symbolic 'Alias' links
103 alias=$(sed '/^Alias[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
104 | tr ',' '\n' \
105 | grep "$unit_types_re")
106
107 for r in $alias; do
108 if [ "$action" = "enable" ]; then
109 mkdir -p $ROOT/etc/systemd/system
110 ln -s $service_file $ROOT/etc/systemd/system/$r
111 echo "Enabled $service for $alias."
112 else
113 rm -f $ROOT/etc/systemd/system/$r
114 echo "Disabled $service for $alias."
115 fi
116 done
117
118 # call us for the other required scripts
119 also=$(sed '/^Also[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
120 | tr ',' '\n')
121 for a in $also; do
122 echo "Also=$a found in $service"
123 if [ "$action" = "enable" ]; then
124 $0 --root=$ROOT enable $a
125 fi
126 done
127done
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
new file mode 100644
index 0000000000..9ffa88e464
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
@@ -0,0 +1,7 @@
1#This goes hand-in-hand with the base-files of OE-Core. The file must
2# be sorted before 'systemd.conf' becuase this attempts to create a file
3# inside /var/log.
4
5
6d /var/volatile/log - - - -
7d /var/volatile/tmp - - - -
diff --git a/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch b/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch
new file mode 100644
index 0000000000..25988fc5a5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch
@@ -0,0 +1,31 @@
1From 5599ab4ae3fe74cdd9699f2874badf241f0148fe Mon Sep 17 00:00:00 2001
2From: Jonathan Liu <net147@gmail.com>
3Date: Wed, 28 Aug 2013 19:09:49 -0700
4Subject: [PATCH] Use /bin/mkdir instead of host mkdir path
5
6If the host system has /usr/bin/mkdir, autoconf would set MKDIR_P to
7/usr/bin/mkdir when it should be /bin/mkdir. As a result, the
8kmod-static-nodes service fails to start on the target because
9/usr/bin/mkdir doesn't exist. This has been observed when building
10systemd on Arch Linux host.
11
12Upstream-Status: Inappropriate [embedded specific]
13Signed-off-by: Jonathan Liu <net147@gmail.com>
14---
15 units/kmod-static-nodes.service.in | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
19index d8a8420..1daed5f 100644
20--- a/units/kmod-static-nodes.service.in
21+++ b/units/kmod-static-nodes.service.in
22@@ -14,5 +14,5 @@ ConditionCapability=CAP_MKNOD
23 [Service]
24 Type=oneshot
25 RemainAfterExit=yes
26-ExecStartPre=@MKDIR_P@ /run/tmpfiles.d
27+ExecStartPre=/bin/mkdir -p /run/tmpfiles.d
28 ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
29--
301.8.3.4
31
diff --git a/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
new file mode 100644
index 0000000000..e204a5063e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-uClibc-doesn-t-implement-pwritev-preadv.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Inappropriate [uclibc specific]
2
3From 7be9273548bcb1f57d011fc252965e45dd2a058c Mon Sep 17 00:00:00 2001
4From: Khem Raj <raj.khem@gmail.com>
5Date: Wed, 21 Aug 2013 19:09:27 -0700
6Subject: [PATCH] uClibc doesn't implement pwritev/preadv
7
8Lets stub out the testcase for building.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/libsystemd-bus/test-bus-memfd.c | 2 ++
13 1 file changed, 2 insertions(+)
14
15diff --git a/src/libsystemd-bus/test-bus-memfd.c b/src/libsystemd-bus/test-bus-memfd.c
16index 05ef555..45e5e44 100644
17--- a/src/libsystemd-bus/test-bus-memfd.c
18+++ b/src/libsystemd-bus/test-bus-memfd.c
19@@ -145,6 +145,7 @@ int main(int argc, char *argv[]) {
20 /* check content */
21 assert_se(memcmp(buf, "ll", 2) == 0);
22
23+#ifndef __UCLIBC__
24 /* writev it out*/
25 iov[0].iov_base = (char *)"ABC";
26 iov[0].iov_len = 3;
27@@ -167,6 +168,7 @@ int main(int argc, char *argv[]) {
28 assert_se(memcmp(bufv[0], "ABC", 3) == 0);
29 assert_se(memcmp(bufv[1], "DEF", 3) == 0);
30 assert_se(memcmp(bufv[2], "GHI", 3) == 0);
31+#endif /* __UCLIBC__ */
32
33 sd_memfd_free(m);
34
35--
361.8.3.4
37
diff --git a/meta/recipes-core/systemd/systemd/0001-use-CAP_MKNOD-ConditionCapability.patch b/meta/recipes-core/systemd/systemd/0001-use-CAP_MKNOD-ConditionCapability.patch
new file mode 100644
index 0000000000..4a35c2301a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-use-CAP_MKNOD-ConditionCapability.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Submitted
2
3From cfdd1eb76dced87c73bac8ec22d3a10244c9bbf6 Mon Sep 17 00:00:00 2001
4From: Khem Raj <raj.khem@gmail.com>
5Date: Wed, 21 Aug 2013 20:25:19 -0700
6Subject: [PATCH] use CAP_MKNOD ConditionCapability
7
8Fixes errors seen when booting VMs on QEMU like
9
10systemd[1]: kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
11systemd[1]: Failed to start Create list of required static device nodes for the current kernel.
12systemd[1]: Unit kmod-static-nodes.service entered failed state.
13
14Make sure that mknod capability is available
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 units/kmod-static-nodes.service.in | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21Index: systemd-206/units/kmod-static-nodes.service.in
22===================================================================
23--- systemd-206.orig/units/kmod-static-nodes.service.in 2013-08-21 19:13:02.000000000 -0700
24+++ systemd-206/units/kmod-static-nodes.service.in 2013-08-21 20:39:13.310689871 -0700
25@@ -9,6 +9,7 @@
26 Description=Create list of required static device nodes for the current kernel
27 DefaultDependencies=no
28 Before=sysinit.target systemd-tmpfiles-setup-dev.service
29+ConditionCapability=CAP_MKNOD
30
31 [Service]
32 Type=oneshot
diff --git a/meta/recipes-core/systemd/systemd/binfmt-install.patch b/meta/recipes-core/systemd/systemd/binfmt-install.patch
new file mode 100644
index 0000000000..c2d5099f24
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/binfmt-install.patch
@@ -0,0 +1,56 @@
1Don't install dependency links at install time for the binfmt services, use
2[Install] blocks so that they get created when the service is enabled like a
3traditional service.
4
5The [Install] blocks were rejected upstream as they don't have a way to "enable"
6it on install without static symlinks which can't be disabled, only masked. We
7however can do that in a postinst.
8
9Upstream-Status: Denied
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12diff --git a/Makefile.am b/Makefile.am
13index 7933de6..78acb6f 100644
14--- a/Makefile.am
15+++ b/Makefile.am
16@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \
17 $(prefix)/lib/binfmt.d \
18 $(sysconfdir)/binfmt.d
19
20-SYSINIT_TARGET_WANTS += \
21- systemd-binfmt.service \
22- proc-sys-fs-binfmt_misc.automount
23-
24 endif
25
26 EXTRA_DIST += \
27diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
28index 6be3893..709adef 100644
29--- a/units/proc-sys-fs-binfmt_misc.automount
30+++ b/units/proc-sys-fs-binfmt_misc.automount
31@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
32
33 [Automount]
34 Where=/proc/sys/fs/binfmt_misc
35+
36+[Install]
37+WantedBy=sysinit.target
38diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
39index 02dfe77..86d3481 100644
40--- a/units/systemd-binfmt.service.in
41+++ b/units/systemd-binfmt.service.in
42@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
43 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
44 DefaultDependencies=no
45 Conflicts=shutdown.target
46+Wants=proc-sys-fs-binfmt_misc.automount
47 After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
48 Before=sysinit.target shutdown.target
49 ConditionPathIsReadWrite=/proc/sys/
50@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
51 Type=oneshot
52 RemainAfterExit=yes
53 ExecStart=@rootlibexecdir@/systemd-binfmt
54+
55+[Install]
56+WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init
new file mode 100644
index 0000000000..ea52be4820
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/init
@@ -0,0 +1,104 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: udev
5# Required-Start: mountvirtfs
6# Required-Stop:
7# Default-Start: S
8# Default-Stop:
9# Short-Description: Start udevd, populate /dev and load drivers.
10### END INIT INFO
11
12. /etc/init.d/functions
13
14export TZ=/etc/localtime
15
16[ -d /sys/class ] || exit 1
17[ -r /proc/mounts ] || exit 1
18[ -x @UDEVD@ ] || exit 1
19[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
20[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
21
22readfile () {
23 filename=$1
24 READDATA=""
25 if [ -r $filename ]; then
26 while read line; do
27 READDATA="$READDATA$line"
28 done < $filename
29 fi
30}
31
32case "$1" in
33 start)
34 export ACTION=add
35 # propagate /dev from /sys
36 echo "Starting udev"
37
38 # mount the devtmpfs on /dev, if not already done
39 LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && {
40 mount -n -o mode=0755 -t devtmpfs none "/dev"
41 }
42 [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
43 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
44 mount -a -t tmpfs 2>/dev/null
45
46 # cache handling
47 if [ "$DEVCACHE" != "" ]; then
48 readfile /proc/version
49 VERSION="$READDATA"
50 readfile /proc/cmdline
51 CMDLINE="$READDATA"
52 readfile /proc/devices
53 DEVICES="$READDATA"
54 readfile /proc/atags
55 ATAGS="$READDATA"
56
57 if [ -e $DEVCACHE ]; then
58 readfile /etc/udev/cache.data
59 if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then
60 (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
61 not_first_boot=1
62 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
63 [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
64 else
65 echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
66 fi
67 else
68 echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache
69 fi
70 fi
71
72 # make_extra_nodes
73 killproc systemd-udevd > "/dev/null" 2>&1
74
75 # trigger the sorted events
76 echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
77 @UDEVD@ -d
78
79 udevadm control --env=STARTUP=1
80 if [ "$not_first_boot" != "" ];then
81 udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
82 (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
83 else
84 udevadm trigger --action=add
85 udevadm settle
86 fi
87 ;;
88 stop)
89 echo "Stopping udevd"
90 start-stop-daemon --stop --name systemd-udevd --quiet
91 ;;
92 restart)
93 $0 stop
94 sleep 1
95 $0 start
96 ;;
97 status)
98 status systemd-udevd
99 ;;
100 *)
101 echo "Usage: $0 {start|stop|status|restart}"
102 exit 1
103esac
104exit 0
diff --git a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
new file mode 100644
index 0000000000..2063268246
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
@@ -0,0 +1,19 @@
1on uclibc secure_getenv is not available
2therefore default to using getenv instead
3
4Upstream-Status: Denied [no desire for uclibc support]
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: git/src/shared/missing.h
8===================================================================
9--- git.orig/src/shared/missing.h 2012-09-22 18:46:44.141282145 -0700
10+++ git/src/shared/missing.h 2012-09-22 18:48:44.081276570 -0700
11@@ -233,6 +233,8 @@
12 #ifndef HAVE_SECURE_GETENV
13 # ifdef HAVE___SECURE_GETENV
14 # define secure_getenv __secure_getenv
15+# elif defined __UCLIBC__
16+# define secure_getenv getenv
17 # else
18 # error neither secure_getenv nor __secure_getenv are available
19 # endif
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
new file mode 100644
index 0000000000..0418bc977b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -0,0 +1,2 @@
1make test/rules-test.sh.log
2make test/udev-test.pl.log
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
new file mode 100644
index 0000000000..d096983837
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4--- systemd-185.orig/configure.ac 2012-06-04 14:15:16.000000000 -0400
5+++ systemd-pam-185/configure.ac 2012-06-21 22:57:10.000000000 -0400
6@@ -63,6 +63,23 @@
7
8 AC_PATH_PROG([M4], [m4])
9
10+# check for few functions not implemented in uClibc
11+
12+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
13+
14+# check for %ms format support - assume always no if cross compiling
15+
16+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
17+
18+AC_RUN_IFELSE(
19+ [AC_LANG_PROGRAM([[ include <stdio.h> ]],
20+ [[ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
21+ int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
22+ return (rc==3)?0:1;]])],
23+ [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
24+ [AC_MSG_RESULT([no])],
25+ [AC_MSG_RESULT([no])])
26+
27 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
28 m4_ifdef([GTK_DOC_CHECK], [
29 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
new file mode 100644
index 0000000000..1d4f2732c4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: git/src/nspawn/nspawn.c
5===================================================================
6--- git.orig/src/nspawn/nspawn.c 2012-09-22 17:57:05.000000000 -0700
7+++ git/src/nspawn/nspawn.c 2012-09-22 18:01:41.541405768 -0700
8@@ -63,6 +63,8 @@
9 LINK_GUEST
10 } LinkJournal;
11
12+#include "config.h"
13+
14 static char *arg_directory = NULL;
15 static char *arg_user = NULL;
16 static char **arg_controllers = NULL;
17@@ -1373,7 +1375,12 @@
18 a[0] = (char*) "/sbin/init";
19 execve(a[0], a, (char**) envp);
20 } else if (argc > optind)
21+#ifdef HAVE_EXECVPE
22 execvpe(argv[optind], argv + optind, (char**) envp);
23+#else
24+ environ = (char **)envp;
25+ execvp(argv[optind], argv + optind);
26+#endif /* HAVE_EXECVPE */
27 else {
28 chdir(home ? home : "/root");
29 execle("/bin/bash", "-bash", NULL, (char**) envp);
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
new file mode 100644
index 0000000000..7cf9626539
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
@@ -0,0 +1,85 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: git/src/journal/journal-file.c
5===================================================================
6--- git.orig/src/journal/journal-file.c 2012-09-02 09:49:15.126089594 -0700
7+++ git/src/journal/journal-file.c 2012-09-02 09:49:17.118089670 -0700
8@@ -34,6 +34,8 @@
9 #include "compress.h"
10 #include "fsprg.h"
11
12+#include "config.h"
13+
14 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
15 #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
16
17@@ -262,7 +264,7 @@
18
19 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
20 uint64_t old_size, new_size;
21- int r;
22+ int r = 0;
23
24 assert(f);
25
26@@ -307,10 +309,25 @@
27 /* Note that the glibc fallocate() fallback is very
28 inefficient, hence we try to minimize the allocation area
29 as we can. */
30+#ifdef HAVE_POSIX_ALLOCATE
31 r = posix_fallocate(f->fd, old_size, new_size - old_size);
32 if (r != 0)
33 return -r;
34
35+#else
36+ /* Use good old method to write zeros into the journal file
37+ perhaps very inefficient yet working. */
38+ if(new_size > old_size) {
39+ char *buf = alloca(new_size - old_size);
40+ off_t oldpos = lseek(f->fd, 0, SEEK_CUR);
41+ bzero(buf, new_size - old_size);
42+ lseek(f->fd, old_size, SEEK_SET);
43+ r = write(f->fd, buf, new_size - old_size);
44+ lseek(f->fd, oldpos, SEEK_SET);
45+ }
46+ if (r < 0)
47+ return -errno;
48+#endif /* HAVE_POSIX_FALLOCATE */
49 if (fstat(f->fd, &f->last_stat) < 0)
50 return -errno;
51
52Index: git/src/journal/journald-kmsg.c
53===================================================================
54--- git.orig/src/journal/journald-kmsg.c 2012-09-02 09:49:15.130089595 -0700
55+++ git/src/journal/journald-kmsg.c 2012-09-02 12:26:17.326447895 -0700
56@@ -404,6 +404,7 @@
57
58 int server_open_kernel_seqnum(Server *s) {
59 int fd;
60+ int r = 0;
61 uint64_t *p;
62
63 assert(s);
64@@ -417,8 +418,19 @@
65 log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
66 return 0;
67 }
68-
69- if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
70+#ifdef HAVE_POSIX_ALLOCATE
71+ r = posix_fallocate(fd, 0, sizeof(uint64_t));
72+#else
73+ /* Use good old method to write zeros into the journal file
74+ perhaps very inefficient yet working. */
75+ char *buf = alloca(sizeof(uint64_t));
76+ off_t oldpos = lseek(fd, 0, SEEK_CUR);
77+ bzero(buf, sizeof(uint64_t));
78+ lseek(fd, 0, SEEK_SET);
79+ r = write(fd, buf, sizeof(uint64_t));
80+ lseek(fd, oldpos, SEEK_SET);
81+#endif /* HAVE_POSIX_FALLOCATE */
82+ if (r < 0) {
83 log_error("Failed to allocate sequential number file, ignoring: %m");
84 close_nointr_nofail(fd);
85 return 0;
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
new file mode 100644
index 0000000000..ceb8483624
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
@@ -0,0 +1,35 @@
1Prefer getty to agetty in console setup systemd units
2
3Upstream-Status: Inappropriate [configuration specific]
4Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
5---
6 units/getty@.service.m4 | 2 +-
7 units/serial-getty@.service.m4 | 2 +-
8 2 files changed, 2 insertions(+), 2 deletions(-)
9
10Index: systemd-206/units/getty@.service.m4
11===================================================================
12--- systemd-206.orig/units/getty@.service.m4 2013-07-21 15:43:28.000000000 -0700
13+++ systemd-206/units/getty@.service.m4 2013-08-21 08:45:48.569886828 -0700
14@@ -27,7 +27,7 @@
15
16 [Service]
17 # the VT is cleared by TTYVTDisallocate
18-ExecStart=-/sbin/agetty --noclear %I
19+ExecStart=-/sbin/getty -L %I
20 Type=idle
21 Restart=always
22 RestartSec=0
23Index: systemd-206/units/serial-getty@.service.m4
24===================================================================
25--- systemd-206.orig/units/serial-getty@.service.m4 2013-07-21 15:43:28.000000000 -0700
26+++ systemd-206/units/serial-getty@.service.m4 2013-08-21 08:48:52.337890275 -0700
27@@ -22,7 +22,7 @@
28 IgnoreOnIsolate=yes
29
30 [Service]
31-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
32+ExecStart=-/sbin/getty -L %I 115200
33 Type=idle
34 Restart=always
35 RestartSec=0
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
new file mode 100644
index 0000000000..99ea5736bc
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
@@ -0,0 +1,170 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: systemd-206/src/journal/journal-send.c
5===================================================================
6--- systemd-206.orig/src/journal/journal-send.c 2013-07-21 15:43:28.000000000 -0700
7+++ systemd-206/src/journal/journal-send.c 2013-08-21 08:50:50.825892498 -0700
8@@ -46,6 +46,8 @@
9 memcpy(*_f + 10, _func, _fl); \
10 } while(false)
11
12+#include "config.h"
13+
14 /* We open a single fd, and we'll share it with the current process,
15 * all its threads, and all its subprocesses. This means we need to
16 * initialize it atomically, and need to operate on it atomically
17@@ -311,8 +313,13 @@
18 /* Message doesn't fit... Let's dump the data in a temporary
19 * file and just pass a file descriptor of it to the other
20 * side */
21-
22+#ifdef HAVE_MKOSTEMP
23 buffer_fd = mkostemp(path, O_CLOEXEC|O_RDWR);
24+#else
25+ buffer_fd = mkstemp(path);
26+ if (buffer_fd >= 0) fcntl(buffer_fd, F_SETFD, FD_CLOEXEC);
27+#endif /* HAVE_MKOSTEMP */
28+
29 if (buffer_fd < 0)
30 return -errno;
31
32Index: systemd-206/src/core/manager.c
33===================================================================
34--- systemd-206.orig/src/core/manager.c 2013-07-21 15:43:28.000000000 -0700
35+++ systemd-206/src/core/manager.c 2013-08-21 08:51:35.209893331 -0700
36@@ -71,6 +71,7 @@
37 #include "audit-fd.h"
38 #include "efivars.h"
39 #include "env-util.h"
40+#include "config.h"
41
42 /* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
43 #define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
44@@ -2058,7 +2059,12 @@
45 return -ENOMEM;
46
47 RUN_WITH_UMASK(0077) {
48+#ifdef HAVE_MKOSTEMP
49 fd = mkostemp(path, O_RDWR|O_CLOEXEC);
50+#else
51+ fd = mkstemp(path);
52+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
53+#endif /* HAVE_MKOSTEMP */
54 }
55
56 if (fd < 0) {
57Index: systemd-206/src/shared/util.c
58===================================================================
59--- systemd-206.orig/src/shared/util.c 2013-07-21 15:43:28.000000000 -0700
60+++ systemd-206/src/shared/util.c 2013-08-21 08:50:50.829892498 -0700
61@@ -74,6 +74,8 @@
62 #include "env-util.h"
63 #include "fileio.h"
64
65+#include "config.h"
66+
67 int saved_argc = 0;
68 char **saved_argv = NULL;
69
70@@ -3980,7 +3982,12 @@
71 t[k] = '.';
72 stpcpy(stpcpy(t+k+1, fn), "XXXXXX");
73
74+#ifdef HAVE_MKOSTEMP
75 fd = mkostemp(t, O_WRONLY|O_CLOEXEC);
76+#else
77+ fd = mkstemp(t);
78+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
79+#endif /* HAVE_MKOSTEMP */
80 if (fd < 0) {
81 free(t);
82 return -errno;
83Index: systemd-206/src/shared/ask-password-api.c
84===================================================================
85--- systemd-206.orig/src/shared/ask-password-api.c 2013-07-21 15:43:28.000000000 -0700
86+++ systemd-206/src/shared/ask-password-api.c 2013-08-21 08:50:50.829892498 -0700
87@@ -37,6 +37,8 @@
88
89 #include "ask-password-api.h"
90
91+#include "config.h"
92+
93 static void backspace_chars(int ttyfd, size_t p) {
94
95 if (ttyfd < 0)
96@@ -325,7 +327,12 @@
97 mkdir_p_label("/run/systemd/ask-password", 0755);
98
99 RUN_WITH_UMASK(0022) {
100+#ifdef HAVE_MKOSTEMP
101 fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);
102+#else
103+ fd = mkstemp(temp);
104+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
105+#endif /* HAVE_MKOSTEMP */
106 }
107
108 if (fd < 0) {
109Index: systemd-206/src/journal/journalctl.c
110===================================================================
111--- systemd-206.orig/src/journal/journalctl.c 2013-07-21 15:43:28.000000000 -0700
112+++ systemd-206/src/journal/journalctl.c 2013-08-21 08:50:50.833892498 -0700
113@@ -1005,7 +1005,13 @@
114 n /= arg_interval;
115
116 close_nointr_nofail(fd);
117+#ifdef HAVE_MKOSTEMP
118 fd = mkostemp(k, O_WRONLY|O_CLOEXEC|O_NOCTTY);
119+#else
120+ fd = mkstemp(k);
121+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
122+#endif /* HAVE_MKOSTEMP */
123+
124 if (fd < 0) {
125 log_error("Failed to open %s: %m", k);
126 r = -errno;
127Index: systemd-206/src/journal/journal-verify.c
128===================================================================
129--- systemd-206.orig/src/journal/journal-verify.c 2013-07-21 15:43:28.000000000 -0700
130+++ systemd-206/src/journal/journal-verify.c 2013-08-21 08:50:50.833892498 -0700
131@@ -811,8 +811,12 @@
132 #endif
133 } else if (f->seal)
134 return -ENOKEY;
135-
136+#ifdef HAVE_MKOSTEMP
137 data_fd = mkostemp(data_path, O_CLOEXEC);
138+#else
139+ data_fd = mkstemp(data_path);
140+ if (data_fd >= 0) fcntl(data_fd, F_SETFD, FD_CLOEXEC);
141+#endif /* HAVE_MKOSTEMP */
142 if (data_fd < 0) {
143 log_error("Failed to create data file: %m");
144 r = -errno;
145@@ -820,7 +824,12 @@
146 }
147 unlink(data_path);
148
149+#ifdef HAVE_MKOSTEMP
150 entry_fd = mkostemp(entry_path, O_CLOEXEC);
151+#else
152+ entry_fd = mkstemp(entry_path);
153+ if (entry_fd >= 0) fcntl(entry_fd, F_SETFD, FD_CLOEXEC);
154+#endif /* HAVE_MKOSTEMP */
155 if (entry_fd < 0) {
156 log_error("Failed to create entry file: %m");
157 r = -errno;
158@@ -828,7 +837,12 @@
159 }
160 unlink(entry_path);
161
162+#ifdef HAVE_MKOSTEMP
163 entry_array_fd = mkostemp(entry_array_path, O_CLOEXEC);
164+#else
165+ entry_array_fd = mkstemp(entry_array_path);
166+ if (entry_array_fd >= 0) fcntl(entry_array_fd, F_SETFD, FD_CLOEXEC);
167+#endif /* HAVE_MKOSTEMP */
168 if (entry_array_fd < 0) {
169 log_error("Failed to create entry array file: %m");
170 r = -errno;
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
new file mode 100644
index 0000000000..77bb305874
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
@@ -0,0 +1,349 @@
1Upstream-Status: Denied [no desire for uclibc support]
2Signed-off-by: Khem Raj <raj.khem@gmail.com>
3
4Index: systemd-204/src/fsck/fsck.c
5===================================================================
6--- systemd-204.orig/src/fsck/fsck.c 2013-04-02 05:48:49.000000000 -0700
7+++ systemd-204/src/fsck/fsck.c 2013-05-23 11:26:51.776345015 -0700
8@@ -37,6 +37,8 @@
9 #include "virt.h"
10 #include "fileio.h"
11
12+#include "config.h"
13+
14 static bool arg_skip = false;
15 static bool arg_force = false;
16 static bool arg_show_progress = false;
17@@ -198,9 +200,16 @@
18 char *device;
19 double p;
20 usec_t t;
21-
22+#ifdef HAVE_MSFORMAT
23 if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
24- break;
25+#else
26+ device = malloc(257);
27+ if (fscanf(f, "%i %lu %lu %256s", &pass, &cur, &max, device) != 4) {
28+ free(device);
29+ }
30+
31+#endif /* HAVE_MSFORMAT */
32+ break;
33
34 /* Only show one progress counter at max */
35 if (!locked) {
36Index: systemd-204/src/core/swap.c
37===================================================================
38--- systemd-204.orig/src/core/swap.c 2013-05-06 12:06:04.000000000 -0700
39+++ systemd-204/src/core/swap.c 2013-05-23 11:26:51.780345015 -0700
40@@ -41,6 +41,8 @@
41 #include "path-util.h"
42 #include "virt.h"
43
44+#include "config.h"
45+
46 static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
47 [SWAP_DEAD] = UNIT_INACTIVE,
48 [SWAP_ACTIVATING] = UNIT_ACTIVATING,
49@@ -1055,6 +1057,7 @@
50 char *dev = NULL, *d;
51 int prio = 0, k;
52
53+#ifdef HAVE_MSFORMAT
54 k = fscanf(m->proc_swaps,
55 "%ms " /* device/file */
56 "%*s " /* type of swap */
57@@ -1062,6 +1065,16 @@
58 "%*s " /* used */
59 "%i\n", /* priority */
60 &dev, &prio);
61+#else
62+ dev = malloc(257);
63+ k = fscanf(m->proc_swaps,
64+ "%256s "/* device/file */
65+ "%*s " /* type of swap */
66+ "%*s " /* swap size */
67+ "%*s " /* used */
68+ "%i\n", /* priority */
69+ dev, &prio);
70+#endif /* HAVE_MSFORMAT */
71 if (k != 2) {
72 if (k == EOF)
73 break;
74Index: systemd-204/src/core/mount-setup.c
75===================================================================
76--- systemd-204.orig/src/core/mount-setup.c 2013-04-24 06:34:38.000000000 -0700
77+++ systemd-204/src/core/mount-setup.c 2013-05-23 11:26:51.780345015 -0700
78@@ -28,6 +28,7 @@
79 #include <assert.h>
80 #include <unistd.h>
81 #include <ftw.h>
82+#include <linux/fs.h>
83
84 #include "mount-setup.h"
85 #include "dev-setup.h"
86@@ -43,6 +44,8 @@
87 #include "virt.h"
88 #include "efivars.h"
89
90+#include "config.h"
91+
92 #ifndef TTY_GID
93 #define TTY_GID 5
94 #endif
95@@ -233,9 +236,12 @@
96 for (;;) {
97 char *controller;
98 int enabled = 0;
99-
100+#ifdef HAVE_MSFORMAT
101 if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
102-
103+#else
104+ controller = malloc(257);
105+ if (fscanf(f, "%256s %*i %*i %i", controller, &enabled) != 2) {
106+#endif /* HAVE_MSFORMAT */
107 if (feof(f))
108 break;
109
110Index: systemd-204/src/core/mount.c
111===================================================================
112--- systemd-204.orig/src/core/mount.c 2013-05-06 12:06:04.000000000 -0700
113+++ systemd-204/src/core/mount.c 2013-05-23 11:26:51.780345015 -0700
114@@ -43,6 +43,8 @@
115 #include "exit-status.h"
116 #include "def.h"
117
118+#include "config.h"
119+
120 static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
121 [MOUNT_DEAD] = UNIT_INACTIVE,
122 [MOUNT_MOUNTING] = UNIT_ACTIVATING,
123@@ -1626,7 +1628,7 @@
124 int k;
125
126 device = path = options = options2 = fstype = d = p = o = NULL;
127-
128+#ifdef HAVE_MSFORMAT
129 if ((k = fscanf(m->proc_self_mountinfo,
130 "%*s " /* (1) mount id */
131 "%*s " /* (2) parent id */
132@@ -1645,7 +1647,31 @@
133 &fstype,
134 &device,
135 &options2)) != 5) {
136-
137+#else
138+ path = malloc(257);
139+ options = malloc(257);
140+ fstype = malloc(257);
141+ device = malloc(257);
142+ options2 = malloc(257);
143+ if ((k = fscanf(m->proc_self_mountinfo,
144+ "%*s " /* (1) mount id */
145+ "%*s " /* (2) parent id */
146+ "%*s " /* (3) major:minor */
147+ "%*s " /* (4) root */
148+ "%256s " /* (5) mount point */
149+ "%256s" /* (6) mount options */
150+ "%*[^-]" /* (7) optional fields */
151+ "- " /* (8) separator */
152+ "%256s " /* (9) file system type */
153+ "%256s" /* (10) mount source */
154+ "%256s" /* (11) mount options 2 */
155+ "%*[^\n]", /* some rubbish at the end */
156+ path,
157+ options,
158+ fstype,
159+ device,
160+ options2)) != 5) {
161+#endif /* HAVE_MSFORMAT */
162 if (k == EOF)
163 break;
164
165Index: systemd-204/src/core/umount.c
166===================================================================
167--- systemd-204.orig/src/core/umount.c 2013-04-18 08:14:11.000000000 -0700
168+++ systemd-204/src/core/umount.c 2013-05-23 11:26:51.780345015 -0700
169@@ -36,6 +36,8 @@
170 #include "util.h"
171 #include "virt.h"
172
173+#include "config.h"
174+
175 typedef struct MountPoint {
176 char *path;
177 dev_t devnum;
178@@ -75,7 +77,7 @@
179 MountPoint *m;
180
181 path = p = NULL;
182-
183+#ifdef HAVE_MSFORMAT
184 if ((k = fscanf(proc_self_mountinfo,
185 "%*s " /* (1) mount id */
186 "%*s " /* (2) parent id */
187@@ -90,6 +92,23 @@
188 "%*s" /* (11) mount options 2 */
189 "%*[^\n]", /* some rubbish at the end */
190 &path)) != 1) {
191+#else
192+ path = malloc(257);
193+ if ((k = fscanf(proc_self_mountinfo,
194+ "%*s " /* (1) mount id */
195+ "%*s " /* (2) parent id */
196+ "%*s " /* (3) major:minor */
197+ "%*s " /* (4) root */
198+ "%256s " /* (5) mount point */
199+ "%*s" /* (6) mount options */
200+ "%*[^-]" /* (7) optional fields */
201+ "- " /* (8) separator */
202+ "%*s " /* (9) file system type */
203+ "%*s" /* (10) mount source */
204+ "%*s" /* (11) mount options 2 */
205+ "%*[^\n]", /* some rubbish at the end */
206+ path)) != 1) {
207+#endif /* HAVE_MSFORMAT */
208 if (k == EOF)
209 break;
210
211@@ -151,7 +170,7 @@
212 MountPoint *swap;
213 char *dev = NULL, *d;
214 int k;
215-
216+#ifdef HAVE_MSFORMAT
217 if ((k = fscanf(proc_swaps,
218 "%ms " /* device/file */
219 "%*s " /* type of swap */
220@@ -159,7 +178,16 @@
221 "%*s " /* used */
222 "%*s\n", /* priority */
223 &dev)) != 1) {
224-
225+#else
226+ dev = malloc(257);
227+ if ((k = fscanf(proc_swaps,
228+ "%256s " /* device/file */
229+ "%*s " /* type of swap */
230+ "%*s " /* swap size */
231+ "%*s " /* used */
232+ "%*s\n", /* priority */
233+ dev)) != 1) {
234+#endif /* HAVE_MSFORMAT */
235 if (k == EOF)
236 break;
237
238Index: systemd-204/src/shared/socket-util.c
239===================================================================
240--- systemd-204.orig/src/shared/socket-util.c 2013-04-18 08:14:11.000000000 -0700
241+++ systemd-204/src/shared/socket-util.c 2013-05-23 11:30:53.528348084 -0700
242@@ -40,6 +40,8 @@
243 #include "missing.h"
244 #include "fileio.h"
245
246+#include "config.h"
247+
248 int socket_address_parse(SocketAddress *a, const char *s) {
249 int r;
250 char *e, *n;
251@@ -203,8 +205,16 @@
252 a->type = SOCK_RAW;
253
254 errno = 0;
255+#ifdef HAVE_MSFORMAT
256 if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
257- return errno > 0 ? -errno : -EINVAL;
258+ return errno ? -errno : -EINVAL;
259+#else
260+ sfamily = malloc(257);
261+ if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
262+ free(sfamily);
263+ return errno ? -errno : -EINVAL;
264+ }
265+#endif /* HAVE_MSFORMAT */
266
267 family = netlink_family_from_string(sfamily);
268 if (family < 0)
269Index: systemd-204/src/tmpfiles/tmpfiles.c
270===================================================================
271--- systemd-204.orig/src/tmpfiles/tmpfiles.c 2013-04-24 06:34:38.000000000 -0700
272+++ systemd-204/src/tmpfiles/tmpfiles.c 2013-05-23 11:26:51.784345016 -0700
273@@ -52,6 +52,8 @@
274 #include "conf-files.h"
275 #include "capability.h"
276
277+#include "config.h"
278+
279 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
280 * them in the file system. This is intended to be used to create
281 * properly owned directories beneath /tmp, /var/tmp, /run, which are
282@@ -1029,6 +1031,7 @@
283 if (!i)
284 return log_oom();
285
286+#ifdef HAVE_MSFORMAT
287 r = sscanf(buffer,
288 "%c %ms %ms %ms %ms %ms %n",
289 &type,
290@@ -1038,6 +1041,29 @@
291 &group,
292 &age,
293 &n);
294+#else
295+ i->path = malloc(257);
296+ mode = malloc(257);
297+ user = malloc(257);
298+ group = malloc(257);
299+ age = malloc(257);
300+ r = sscanf(buffer,
301+ "%c "
302+ "%256s "
303+ "%256s "
304+ "%256s "
305+ "%256s "
306+ "%256s "
307+ "%n",
308+ &type,
309+ i->path,
310+ mode,
311+ user,
312+ group,
313+ age,
314+ &n);
315+#endif /* HAVE_MSFORMAT */
316+
317 if (r < 2) {
318 log_error("[%s:%u] Syntax error.", fname, line);
319 return -EIO;
320Index: systemd-204/src/cryptsetup/cryptsetup-generator.c
321===================================================================
322--- systemd-204.orig/src/cryptsetup/cryptsetup-generator.c 2013-05-06 12:06:04.000000000 -0700
323+++ systemd-204/src/cryptsetup/cryptsetup-generator.c 2013-05-23 11:26:51.784345016 -0700
324@@ -31,6 +31,8 @@
325 #include "strv.h"
326 #include "fileio.h"
327
328+#include "config.h"
329+
330 static const char *arg_dest = "/tmp";
331 static bool arg_enabled = true;
332 static bool arg_read_crypttab = true;
333@@ -398,7 +400,16 @@
334 if (*l == '#' || *l == 0)
335 continue;
336
337+#ifdef HAVE_MSFORMAT
338 k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options);
339+#else
340+ name = malloc(257);
341+ device = malloc(257);
342+ password = malloc(257);
343+ options = malloc(257);
344+ k = sscanf(l, "%256s %256s %256s %256s", name, device, password, options);
345+#endif /* HAVE_MSFORMAT */
346+
347 if (k < 2 || k > 4) {
348 log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
349 r = EXIT_FAILURE;
diff --git a/meta/recipes-core/systemd/systemd/touchscreen.rules b/meta/recipes-core/systemd/systemd/touchscreen.rules
new file mode 100644
index 0000000000..d83fd1673d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/touchscreen.rules
@@ -0,0 +1,18 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Create a symlink to any touchscreen input device
17SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
18SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
diff --git a/meta/recipes-core/systemd/systemd/use-rootlibdir.patch b/meta/recipes-core/systemd/systemd/use-rootlibdir.patch
new file mode 100644
index 0000000000..4c471b673b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/use-rootlibdir.patch
@@ -0,0 +1,107 @@
1Upstream-Status: Undecided
2
3This patch removes some of hardcoded references to /lib
4and /usr/lib since on some architectures it should be
5/lib64 and /usr/lib64 atleast in OE
6
7I am not sure about the intention of hardcoded values
8thats why status is undecided
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Index: git/Makefile.am
13===================================================================
14--- git.orig/Makefile.am 2012-09-22 11:07:58.811981199 -0700
15+++ git/Makefile.am 2012-09-22 11:09:11.267983956 -0700
16@@ -64,25 +64,25 @@
17
18 # Our own, non-special dirs
19 pkgsysconfdir=$(sysconfdir)/systemd
20-userunitdir=$(prefix)/lib/systemd/user
21-userpresetdir=$(prefix)/lib/systemd/user-preset
22-tmpfilesdir=$(prefix)/lib/tmpfiles.d
23-sysctldir=$(prefix)/lib/sysctl.d
24-usergeneratordir=$(prefix)/lib/systemd/user-generators
25+userunitdir=$(prefix)/$(rootlibdir)/systemd/user
26+userpresetdir=$(prefix)/$(rootlibdir)/systemd/user-preset
27+tmpfilesdir=$(prefix)/$(rootlibdir)/tmpfiles.d
28+sysctldir=$(prefix)/$(rootlibdir)/sysctl.d
29+usergeneratordir=$(prefix)/$(rootlibdir)/systemd/user-generators
30 pkgincludedir=$(includedir)/systemd
31 systemgeneratordir=$(rootlibexecdir)/system-generators
32 systemshutdowndir=$(rootlibexecdir)/system-shutdown
33 systemsleepdir=$(rootlibexecdir)/system-sleep
34-systemunitdir=$(rootprefix)/lib/systemd/system
35-systempresetdir=$(rootprefix)/lib/systemd/system-preset
36-udevlibexecdir=$(rootprefix)/lib/udev
37+systemunitdir=$(rootprefix)/$(rootlibdir)/systemd/system
38+systempresetdir=$(rootprefix)/$(rootlibdir)/systemd/system-preset
39+udevlibexecdir=$(rootprefix)/$(rootlibdir)/udev
40 udevhomedir = $(udevlibexecdir)
41 udevrulesdir = $(udevlibexecdir)/rules.d
42
43 # And these are the special ones for /
44 rootprefix=@rootprefix@
45 rootbindir=$(rootprefix)/bin
46-rootlibexecdir=$(rootprefix)/lib/systemd
47+rootlibexecdir=$(rootprefix)/$(rootlibdir)/systemd
48
49 CLEANFILES = $(BUILT_SOURCES)
50 EXTRA_DIST =
51@@ -132,7 +132,7 @@
52 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
53 -DROOTPREFIX=\"$(rootprefix)\" \
54 -DRUNTIME_DIR=\"/run\" \
55- -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
56+ -DRANDOM_SEED=\"$(localstatedir)/$(rootlibdir)/random-seed\" \
57 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
58 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
59 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
60@@ -2692,7 +2692,7 @@
61
62 binfmt-install-data-hook:
63 $(MKDIR_P) -m 0755 \
64- $(DESTDIR)$(prefix)/lib/binfmt.d \
65+ $(DESTDIR)$(prefix)/$(rootlibdir)/binfmt.d \
66 $(DESTDIR)$(sysconfdir)/binfmt.d \
67 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
68 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
69@@ -3107,7 +3107,7 @@
70
71 timedated-install-data-hook:
72 $(MKDIR_P) -m 0755 \
73- $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
74+ $(DESTDIR)$(prefix)/$(rootlibdir)/systemd/ntp-units.d \
75 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
76 ( cd $(DESTDIR)$(systemunitdir) && \
77 rm -f dbus-org.freedesktop.timedate1.service && \
78@@ -3337,7 +3337,7 @@
79 logind-install-data-hook:
80 $(MKDIR_P) -m 0755 \
81 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
82- $(DESTDIR)$(localstatedir)/lib/systemd
83+ $(DESTDIR)$(localstatedir)/$(rootlibdir)/systemd
84 ( cd $(DESTDIR)$(systemunitdir) && \
85 rm -f dbus-org.freedesktop.login1.service && \
86 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
87@@ -3494,7 +3494,7 @@
88 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
89 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
90 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
91- -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
92+ -e 's,@RANDOM_SEED\@,$(localstatedir)/$(rootlibdir)/random-seed,g' \
93 -e 's,@prefix\@,$(prefix),g' \
94 -e 's,@exec_prefix\@,$(exec_prefix),g' \
95 -e 's,@libdir\@,$(libdir),g' \
96@@ -3619,9 +3619,9 @@
97 $(MKDIR_P) -m 0755 \
98 $(DESTDIR)$(tmpfilesdir) \
99 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
100- $(DESTDIR)$(prefix)/lib/modules-load.d \
101+ $(DESTDIR)$(prefix)/$(rootlibdir)/modules-load.d \
102 $(DESTDIR)$(sysconfdir)/modules-load.d \
103- $(DESTDIR)$(prefix)/lib/sysctl.d \
104+ $(DESTDIR)$(prefix)/$(rootlibdir)/sysctl.d \
105 $(DESTDIR)$(sysconfdir)/sysctl.d \
106 $(DESTDIR)$(systemshutdowndir) \
107 $(DESTDIR)$(systemsleepdir) \
diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
new file mode 100644
index 0000000000..a1a8bd7ceb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -0,0 +1,327 @@
1DESCRIPTION = "Systemd a init replacement"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3
4LICENSE = "GPLv2 & LGPLv2.1 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
6 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
7 file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
8
9PROVIDES = "udev"
10
11PE = "1"
12
13DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
14DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
15
16SECTION = "base/shell"
17
18inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest
19
20SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
21 file://0001-use-CAP_MKNOD-ConditionCapability.patch \
22 file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \
23 file://binfmt-install.patch \
24 file://touchscreen.rules \
25 ${UCLIBCPATCHES} \
26 file://00-create-volatile.conf \
27 file://init \
28 file://run-ptest \
29 "
30SRC_URI[md5sum] = "89e36f2d3ba963020b72738549954cbc"
31SRC_URI[sha256sum] = "4c993de071118ea1df7ffc4be26ef0b0d78354ef15b2743a2783d20edfcde9de"
32
33UCLIBCPATCHES = ""
34UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \
35 file://systemd-pam-fix-execvpe.patch \
36 file://systemd-pam-fix-fallocate.patch \
37 file://systemd-pam-fix-getty-unit.patch \
38 file://systemd-pam-fix-mkostemp.patch \
39 file://systemd-pam-fix-msformat.patch \
40 file://optional_secure_getenv.patch \
41 file://0001-uClibc-doesn-t-implement-pwritev-preadv.patch \
42 "
43LDFLAGS_libc-uclibc_append = " -lrt"
44
45GTKDOC_DOCDIR = "${S}/docs/"
46
47PACKAGECONFIG ??= "xz tcp-wrappers"
48# Sign the journal for anti-tampering
49PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
50# regardless of PACKAGECONFIG, libgcrypt is always required to expand
51# the AM_PATH_LIBGCRYPT autoconf macro
52DEPENDS += "libgcrypt"
53# Compress the journal
54PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
55PACKAGECONFIG[tcp-wrappers] = "--enable-tcpwrap,--disable-tcpwrap,tcp-wrappers"
56PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
57
58CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
59
60# Helper variables to clarify locations. This mirrors the logic in systemd's
61# build system.
62rootprefix ?= "${base_prefix}"
63rootlibdir ?= "${base_libdir}"
64rootlibexecdir = "${rootprefix}/lib"
65
66# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
67EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
68 --with-rootlibdir=${rootlibdir} \
69 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
70 --enable-xz \
71 --disable-manpages \
72 --disable-coredump \
73 --disable-introspection \
74 --disable-tcpwrap \
75 --enable-split-usr \
76 --disable-microhttpd \
77 --without-python \
78 --with-sysvrcnd-path=${sysconfdir} \
79 --with-firmware-path=/lib/firmware \
80 ac_cv_path_KILL=${base_bindir}/kill \
81 "
82# uclibc does not have NSS
83EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
84
85do_configure_prepend() {
86 export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
87 export KMOD="${base_bindir}/kmod"
88 sed -i -e 's:=/root:=${ROOT_HOME}:g' ${S}/units/*.service*
89}
90
91do_install() {
92 autotools_do_install
93 install -d ${D}/${base_sbindir}
94 # Provided by a separate recipe
95 rm ${D}${systemd_unitdir}/system/serial-getty* -f
96
97 # Provide support for initramfs
98 ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
99 ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
100
101 # Create dir for journal
102 install -d ${D}${localstatedir}/log/journal
103
104 # Create machine-id
105 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
106 touch ${D}${sysconfdir}/machine-id
107
108 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
109
110 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
111
112 if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
113 install -d ${D}${sysconfdir}/init.d
114 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
115 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
116 fi
117}
118
119do_install_ptest () {
120 install -d ${D}${PTEST_PATH}/test
121 install ${S}/test/* ${D}${PTEST_PATH}/test
122 install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
123 install -d ${D}${PTEST_PATH}/build-aux
124 cp -rf ${B}/rules ${D}${PTEST_PATH}/
125 cp ${B}/Makefile ${D}${PTEST_PATH}/
126 cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
127 tar -C ${D}${PTEST_PATH}/test -xJf ${S}/test/sys.tar.xz
128 sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
129}
130
131python populate_packages_prepend (){
132 systemdlibdir = d.getVar("rootlibdir", True)
133 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
134}
135PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
136
137PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros ${PN}-binfmt"
138
139SYSTEMD_PACKAGES = "${PN}-binfmt"
140SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
141
142USERADD_PACKAGES = "${PN}"
143GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
144
145FILES_${PN}-analyze = "${bindir}/systemd-analyze"
146
147FILES_${PN}-initramfs = "/init"
148RDEPENDS_${PN}-initramfs = "${PN}"
149
150FILES_${PN}-gui = "${bindir}/systemadm"
151
152FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
153 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
154 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
155
156FILES_${PN}-kernel-install = "${bindir}/kernel-install \
157 ${sysconfdir}/kernel/ \
158 ${exec_prefix}/lib/kernel \
159 "
160FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
161 "
162
163FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
164 ${exec_prefix}/lib/binfmt.d \
165 ${rootlibexecdir}/systemd/systemd-binfmt \
166 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
167 ${systemd_unitdir}/system/systemd-binfmt.service"
168RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
169
170RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
171
172CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
173 ${sysconfdir}/systemd/logind.conf \
174 ${sysconfdir}/systemd/system.conf \
175 ${sysconfdir}/systemd/user.conf"
176
177FILES_${PN} = " ${base_bindir}/* \
178 ${datadir}/bash-completion \
179 ${datadir}/dbus-1/services \
180 ${datadir}/dbus-1/system-services \
181 ${datadir}/polkit-1 \
182 ${datadir}/${BPN} \
183 ${sysconfdir}/bash_completion.d/ \
184 ${sysconfdir}/dbus-1/ \
185 ${sysconfdir}/machine-id \
186 ${sysconfdir}/modules-load.d/ \
187 ${sysconfdir}/sysctl.d/ \
188 ${sysconfdir}/systemd/ \
189 ${sysconfdir}/tmpfiles.d/ \
190 ${sysconfdir}/xdg/ \
191 ${sysconfdir}/init.d/README \
192 ${rootlibexecdir}/systemd/* \
193 ${systemd_unitdir}/* \
194 ${base_libdir}/security/*.so \
195 ${libdir}/libnss_myhostname.so.2 \
196 /cgroup \
197 ${bindir}/systemd* \
198 ${bindir}/localectl \
199 ${bindir}/hostnamectl \
200 ${bindir}/timedatectl \
201 ${bindir}/bootctl \
202 ${bindir}/kernel-install \
203 ${exec_prefix}/lib/tmpfiles.d/*.conf \
204 ${exec_prefix}/lib/systemd \
205 ${exec_prefix}/lib/modules-load.d \
206 ${exec_prefix}/lib/sysctl.d \
207 ${localstatedir} \
208 /lib/udev/rules.d/70-uaccess.rules \
209 /lib/udev/rules.d/71-seat.rules \
210 /lib/udev/rules.d/73-seat-late.rules \
211 /lib/udev/rules.d/99-systemd.rules \
212 "
213
214FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
215FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
216
217RDEPENDS_${PN} += "kmod dbus util-linux-mount"
218
219RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \
220 util-linux-agetty \
221 util-linux-fsck e2fsprogs-e2fsck \
222 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
223"
224
225PACKAGES =+ "udev-dbg udev udev-utils udev-hwdb"
226
227FILES_udev-dbg += "/lib/udev/.debug"
228
229RDEPENDS_udev += "udev-utils"
230RPROVIDES_udev = "hotplug"
231RRECOMMENDS_udev += "udev-hwdb"
232
233RDEPENDS_udev-hwdb += "udev-utils"
234
235FILES_udev += "${base_sbindir}/udevd \
236 ${rootlibexecdir}/systemd/systemd-udevd \
237 ${rootlibexecdir}/udev/accelerometer \
238 ${rootlibexecdir}/udev/ata_id \
239 ${rootlibexecdir}/udev/cdrom_id \
240 ${rootlibexecdir}/udev/collect \
241 ${rootlibexecdir}/udev/findkeyboards \
242 ${rootlibexecdir}/udev/keyboard-force-release.sh \
243 ${rootlibexecdir}/udev/keymap \
244 ${rootlibexecdir}/udev/mtd_probe \
245 ${rootlibexecdir}/udev/scsi_id \
246 ${rootlibexecdir}/udev/v4l_id \
247 ${rootlibexecdir}/udev/keymaps \
248 ${rootlibexecdir}/udev/rules.d/4*.rules \
249 ${rootlibexecdir}/udev/rules.d/5*.rules \
250 ${rootlibexecdir}/udev/rules.d/6*.rules \
251 ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
252 ${rootlibexecdir}/udev/rules.d/75*.rules \
253 ${rootlibexecdir}/udev/rules.d/78*.rules \
254 ${rootlibexecdir}/udev/rules.d/8*.rules \
255 ${rootlibexecdir}/udev/rules.d/95*.rules \
256 ${sysconfdir}/udev \
257 ${sysconfdir}/init.d/systemd-udevd \
258 ${systemd_unitdir}/system/*udev* \
259 ${systemd_unitdir}/system/*.wants/*udev* \
260 "
261
262FILES_udev-utils = "${base_bindir}/udevadm ${datadir}/bash-completion/completions/udevadm"
263
264FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
265
266INITSCRIPT_PACKAGES = "udev"
267INITSCRIPT_NAME_udev = "systemd-udevd"
268INITSCRIPT_PARAMS_udev = "start 03 S ."
269
270python __anonymous() {
271 features = d.getVar("DISTRO_FEATURES", True).split()
272 if "sysvinit" not in features:
273 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
274}
275
276# TODO:
277# u-a for runlevel and telinit
278
279ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
280
281ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
282ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
283ALTERNATIVE_PRIORITY[init] ?= "300"
284
285ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
286ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
287ALTERNATIVE_PRIORITY[halt] ?= "300"
288
289ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
290ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
291ALTERNATIVE_PRIORITY[reboot] ?= "300"
292
293ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
294ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
295ALTERNATIVE_PRIORITY[shutdown] ?= "300"
296
297ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
298ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
299ALTERNATIVE_PRIORITY[poweroff] ?= "300"
300
301ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
302ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
303ALTERNATIVE_PRIORITY[runlevel] ?= "300"
304
305pkg_postinst_udev-hwdb () {
306 if test -n "$D"; then
307 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
308 --root $D
309 else
310 udevadm hwdb --update
311 fi
312}
313
314pkg_prerm_udev-hwdb () {
315 if test -n "$D"; then
316 exit 1
317 fi
318
319 rm -f ${sysconfdir}/udev/hwdb.bin
320}
321
322# As this recipe builds udev, respect the systemd DISTRO_FEATURE so we don't try
323# building udev and systemd in world builds.
324python () {
325 if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
326 raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
327}
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch
new file mode 100644
index 0000000000..7b342901e1
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/crypt-lib.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Inappropriate [configuration]
2
3# The src Makefile was checking for libcrypt.a on the host, not in the
4# build environment. This patch checks for $LCRYPT in the environment
5# and uses it if it's there.
6# - jdike@linux.intel.com
7
8Index: sysvinit-2.88dsf/src/Makefile
9===================================================================
10--- sysvinit-2.88dsf.orig/src/Makefile
11+++ sysvinit-2.88dsf/src/Makefile
12@@ -85,9 +85,13 @@ else
13 endif
14
15 # Additional libs for GNU libc.
16+ifneq ($(LCRYPT),)
17+ SULOGINLIBS += $(LCRYPT)
18+else
19 ifneq ($(wildcard /usr/lib*/libcrypt.a),)
20 SULOGINLIBS += -lcrypt
21 endif
22+endif
23
24 all: $(BIN) $(SBIN) $(USRBIN)
25
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch
new file mode 100644
index 0000000000..6c4225a678
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/install.patch
@@ -0,0 +1,83 @@
1Upstream-Status: Pending
2
3diff --git a/src/Makefile b/src/Makefile
4index e2b8028..3e11e92 100644
5--- a/src/Makefile
6+++ b/src/Makefile
7@@ -65,7 +65,14 @@ else
8 INSTALL_DATA = install -m 644
9 endif
10 INSTALL_DIR = install -m 755 -d
11-MANDIR = /usr/share/man
12+
13+ROOT ?=
14+base_bindir ?= /bin
15+base_sbindir ?= /sbin
16+bindir ?= /usr/bin
17+sysconfdir ?= /etc
18+includedir ?= /usr/include
19+mandir ?= /usr/share/man
20
21 ifeq ($(WITH_SELINUX),yes)
22 SELINUX_DEF = -DWITH_SELINUX
23@@ -138,39 +145,39 @@ clobber: cleanobjs
24 distclean: clobber
25
26 install:
27- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
28- $(INSTALL_DIR) $(ROOT)/usr/bin/
29+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
30+ $(INSTALL_DIR) $(ROOT)$(bindir)/
31 for i in $(BIN); do \
32- $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
33+ $(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
34 done
35 for i in $(SBIN); do \
36- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
37+ $(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
38 done
39 for i in $(USRBIN); do \
40- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
41+ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
42 done
43- # $(INSTALL_DIR) $(ROOT)/etc/
44- # $(INSTALL_EXEC) initscript.sample $(ROOT)/etc/
45- ln -sf halt $(ROOT)/sbin/reboot
46- ln -sf halt $(ROOT)/sbin/poweroff
47- ln -sf init $(ROOT)/sbin/telinit
48- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
49- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
50- ln -sf last $(ROOT)/usr/bin/lastb; \
51+ # $(INSTALL_DIR) $(ROOT)$(sysconfdir)/
52+ # $(INSTALL_EXEC) initscript.sample $(ROOT)$(sysconfdir)/
53+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
54+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
55+ ln -sf init $(ROOT)$(base_sbindir)/telinit
56+ ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
57+ if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
58+ ln -sf last $(ROOT)$(bindir)/lastb; \
59 fi
60- $(INSTALL_DIR) $(ROOT)/usr/include/
61- $(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
62- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
63- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man5/
64- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man8/
65+ $(INSTALL_DIR) $(ROOT)$(includedir)/
66+ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
67+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
68+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
69+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
70 for i in $(MAN1); do \
71- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man1/; \
72+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man1/; \
73 done
74 for i in $(MAN5); do \
75- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man5/; \
76+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man5/; \
77 done
78 for i in $(MAN8); do \
79- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man8/; \
80+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man8/; \
81 done
82 ifeq ($(ROOT),)
83 #
diff --git a/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch
new file mode 100644
index 0000000000..5b5dfdc001
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-2.88dsf/pidof-add-m-option.patch
@@ -0,0 +1,189 @@
1pidof: add -m option
2
3When used with -o, will also omit any processes that have the same
4argv[0] and argv[1] as any explicitly omitted process ids. This can be
5used to avoid multiple shell scripts concurrently calling pidof returning
6each other's pids.
7
8https://bugzilla.redhat.com/show_bug.cgi?id=883856
9
10Upstream-Status: backport
11Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
12
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14---
15 man/pidof.8 | 6 ++++++
16 src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
17 2 files changed, 65 insertions(+), 3 deletions(-)
18
19diff --git a/man/pidof.8 b/man/pidof.8
20--- a/man/pidof.8
21+++ b/man/pidof.8
22@@ -24,6 +24,7 @@ pidof -- find the process ID of a running program.
23 .RB [ \-c ]
24 .RB [ \-n ]
25 .RB [ \-x ]
26+.RB [ \-m ]
27 .RB [ \-o
28 .IR omitpid[,omitpid..] ]
29 .RB [ \-o
30@@ -63,6 +64,11 @@ shells running the named scripts.
31 Tells \fIpidof\fP to omit processes with that process id. The special
32 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
33 program, in other words the calling shell or shell script.
34+.IP -m
35+When used with -o, will also omit any processes that have the same
36+argv[0] and argv[1] as any explicitly omitted process ids. This can be
37+used to avoid multiple shell scripts concurrently calling pidof returning
38+each other's pids.
39 .SH "EXIT STATUS"
40 .TP
41 .B 0
42diff --git a/src/killall5.c b/src/killall5.c
43index 5937d98..e73885e 100644
44--- a/src/killall5.c
45+++ b/src/killall5.c
46@@ -118,6 +118,7 @@ typedef struct _s_nfs
47
48 /* List of processes. */
49 PROC *plist;
50+PROC *olist;
51
52 /* List of processes to omit. */
53 OMIT *omit;
54@@ -345,6 +346,20 @@ static void clear_mnt(void)
55 }
56 }
57
58+static void clear_omit(void)
59+{
60+ OMIT *o;
61+ PROC *p;
62+ for (o = omit; o; o = omit) {
63+ omit = omit->next;
64+ free(o);
65+ }
66+ for (p = olist; p; p = olist) {
67+ olist = olist->next;
68+ free(p);
69+ }
70+}
71+
72 /*
73 * Check if path is ia shadow off a NFS partition.
74 */
75@@ -452,6 +467,7 @@ int readproc(int do_stat)
76 DIR *dir;
77 FILE *fp;
78 PROC *p, *n;
79+ OMIT *o, *m;
80 struct dirent *d;
81 struct stat st;
82 char path[PATH_MAX+1];
83@@ -624,6 +640,17 @@ int readproc(int do_stat)
84 p->next = plist;
85 plist = p;
86 p->pid = pid;
87+ /* Could be smarter, but it's a small list. */
88+ m = omit;
89+ for (o = omit; m; o = m) {
90+ m = o->next;
91+ if (o->pid == p->pid) {
92+ n = (PROC*)xmalloc(sizeof(PROC));
93+ *n = *p;
94+ n->next = olist;
95+ olist = n;
96+ }
97+ }
98 }
99 closedir(dir);
100
101@@ -813,6 +840,26 @@ PIDQ_HEAD *pidof(char *prog)
102 return q;
103 }
104
105+int matches(PROC *o, PROC *p)
106+{
107+ int ret = 0;
108+ char *oargv1, *pargv1;
109+ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
110+ if (o->argv1 && p->argv1) {
111+ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
112+ oargv1 = strdup(o->argv1);
113+ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
114+ pargv1 = strdup(p->argv1);
115+ if (! strcmp(oargv1, pargv1)) {
116+ ret = 1;
117+ }
118+ free(oargv1);
119+ free(pargv1);
120+ }
121+ }
122+ return ret;
123+}
124+
125 /* Give usage message and exit. */
126 void usage(void)
127 {
128@@ -845,6 +892,7 @@ void nsyslog(int pri, char *fmt, ...)
129 #define PIDOF_SINGLE 0x01
130 #define PIDOF_OMIT 0x02
131 #define PIDOF_NETFS 0x04
132+#define PIDOF_OMIT_OMIT_MATCHES 0x08
133
134 /*
135 * Pidof functionality.
136@@ -861,6 +909,7 @@ int main_pidof(int argc, char **argv)
137 struct stat st;
138 char tmp[512];
139
140+ olist = (PROC*)0;
141 omit = (OMIT*)0;
142 nlist = (NFS*)0;
143 opterr = 0;
144@@ -868,7 +917,7 @@ int main_pidof(int argc, char **argv)
145 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
146 flags |= PIDOF_NETFS;
147
148- while ((opt = getopt(argc,argv,"hco:sxn")) != EOF) switch (opt) {
149+ while ((opt = getopt(argc,argv,"hcmo:sxn")) != EOF) switch (opt) {
150 case '?':
151 nsyslog(LOG_ERR,"invalid options on command line!\n");
152 closelog();
153@@ -907,6 +956,9 @@ int main_pidof(int argc, char **argv)
154 case 'x':
155 scripts_too++;
156 break;
157+ case 'm':
158+ flags |= PIDOF_OMIT_OMIT_MATCHES;
159+ break;
160 case 'n':
161 flags |= PIDOF_NETFS;
162 break;
163@@ -938,10 +990,13 @@ int main_pidof(int argc, char **argv)
164 pid_t spid = 0;
165 while ((p = get_next_from_pid_q(q))) {
166 if ((flags & PIDOF_OMIT) && omit) {
167- OMIT * optr;
168- for (optr = omit; optr; optr = optr->next) {
169+ PROC * optr;
170+ for (optr = olist; optr; optr = optr->next) {
171 if (optr->pid == p->pid)
172 break;
173+ if (flags & PIDOF_OMIT_OMIT_MATCHES)
174+ if (matches(optr, p))
175+ break;
176 }
177
178 /*
179@@ -977,6 +1032,7 @@ int main_pidof(int argc, char **argv)
180 if (!first)
181 printf("\n");
182
183+ clear_omit();
184 clear_mnt();
185
186 closelog();
187--
1881.8.1.2
189
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/inittab b/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
new file mode 100644
index 0000000000..6abbdf4558
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
@@ -0,0 +1,30 @@
1# /etc/inittab: init(8) configuration.
2# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
3
4# The default runlevel.
5id:5:initdefault:
6
7# Boot-time system configuration/initialization script.
8# This is run first except when booting in emergency (-b) mode.
9si::sysinit:/etc/init.d/rcS
10
11# What to do in single-user mode.
12~~:S:wait:/sbin/sulogin
13
14# /etc/init.d executes the S and K scripts upon change
15# of runlevel.
16#
17# Runlevel 0 is halt.
18# Runlevel 1 is single-user.
19# Runlevels 2-5 are multi-user.
20# Runlevel 6 is reboot.
21
22l0:0:wait:/etc/init.d/rc 0
23l1:1:wait:/etc/init.d/rc 1
24l2:2:wait:/etc/init.d/rc 2
25l3:3:wait:/etc/init.d/rc 3
26l4:4:wait:/etc/init.d/rc 4
27l5:5:wait:/etc/init.d/rc 5
28l6:6:wait:/etc/init.d/rc 6
29# Normally not reached, but fallthrough in case of emergency.
30z6:6:respawn:/sbin/sulogin
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
new file mode 100644
index 0000000000..23c284d131
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -0,0 +1,82 @@
1DESCRIPTION = "Inittab for sysvinit"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
4
5PR = "r9"
6
7SRC_URI = "file://inittab"
8
9S = "${WORKDIR}/sysvinit-${PV}"
10
11INHIBIT_DEFAULT_DEPS = "1"
12
13do_compile() {
14 :
15}
16
17do_install() {
18 install -d ${D}${sysconfdir}
19 install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
20
21 tmp="${SERIAL_CONSOLES}"
22 for i in $tmp
23 do
24 j=`echo ${i} | sed s/\;/\ /g`
25 label=`echo ${i} | sed -e 's/^.*;tty//'`
26 echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
27 done
28
29 if [ "${USE_VT}" = "1" ]; then
30 cat <<EOF >>${D}${sysconfdir}/inittab
31# ${base_sbindir}/getty invocations for the runlevels.
32#
33# The "id" field MUST be the same as the last
34# characters of the device (after "tty").
35#
36# Format:
37# <id>:<runlevels>:<action>:<process>
38#
39
40EOF
41
42 for n in ${SYSVINIT_ENABLED_GETTYS}
43 do
44 echo "$n:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
45 done
46 echo "" >> ${D}${sysconfdir}/inittab
47 fi
48}
49
50pkg_postinst_${PN} () {
51# run this on the target
52if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
53 tmp="${SERIAL_CONSOLES_CHECK}"
54 for i in $tmp
55 do
56 j=`echo ${i} | sed s/^.*\;//g`
57 if [ -z "`cat /proc/consoles | grep ${j}`" ]; then
58 sed -i /^.*${j}$/d /etc/inittab
59 fi
60 done
61 kill -HUP 1
62else
63 if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
64 exit 0
65 else
66 exit 1
67 fi
68fi
69}
70
71# USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf.
72# Set PACKAGE_ARCH appropriately.
73PACKAGE_ARCH = "${MACHINE_ARCH}"
74
75FILES_${PN} = "${sysconfdir}/inittab"
76CONFFILES_${PN} = "${sysconfdir}/inittab"
77
78USE_VT ?= "1"
79SYSVINIT_ENABLED_GETTYS ?= "1"
80
81
82
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
new file mode 100755
index 0000000000..7b87827fdf
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -0,0 +1,92 @@
1#! /bin/sh
2#
3# bootlogd One of the first scripts to be executed. Starts or stops
4# the bootlogd log program. If this script is called as
5# "stop-bootlogd", it will stop the daemon instead of
6# starting it even when called with the "start" argument.
7#
8# Version: @(#)bootlogd 2.85-12 21-Mar-2004 miquels@cistron.nl
9#
10
11PATH=/sbin:/bin:/usr/sbin:/usr/bin
12DAEMON=/sbin/bootlogd
13NAME=bootlogd
14DESC="Bootlog daemon"
15
16# source function library
17. /etc/init.d/functions
18
19test -f $DAEMON || exit 0
20
21[ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
22
23## set -e # not needed
24
25case "$BOOTLOGD_ENABLE" in
26 [Nn]*)
27 exit 0
28 ;;
29esac
30
31STOPPER=
32ACTION="$1"
33case "$0" in
34 *stop-bootlog*)
35 STOPPER=Y
36 if [ "$ACTION" = start ]
37 then
38 ACTION=stop
39 fi
40 ;;
41esac
42
43case "$ACTION" in
44 start)
45 echo -n "Starting $DESC: "
46 if [ -d /proc/1/. ]
47 then
48 umask 027
49 start-stop-daemon --start --quiet \
50 --exec $DAEMON -- -r
51 else
52 $DAEMON -r
53 fi
54 echo "$NAME."
55 ;;
56 stop)
57 echo -n "Stopping $DESC: "
58 start-stop-daemon --stop --quiet --exec $DAEMON
59
60 if [ "$STOPPER" ] && [ -f /var/log/boot ] && \
61 [ -f /var/log/boot~ ]
62 then
63 cd /var/log
64 chgrp adm boot
65 savelog -p -c 5 boot > /dev/null 2>&1
66 mv boot.0 boot
67 mv boot~ boot.0
68 fi
69
70 echo "$NAME."
71 ;;
72 restart|force-reload)
73 echo -n "Restarting $DESC: "
74 start-stop-daemon --stop --quiet --exec $DAEMON
75 sleep 1
76 start-stop-daemon --start --quiet --exec $DAEMON
77 echo "$NAME."
78 ;;
79 status)
80 status $DAEMON
81 exit $?
82 ;;
83 *)
84 N=${0##*/}
85 N=${N#[SK]??}
86 echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
87 exit 1
88 ;;
89esac
90
91exit 0
92
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
new file mode 100755
index 0000000000..655a0b067c
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -0,0 +1,179 @@
1#!/bin/sh
2#
3# rc This file is responsible for starting/stopping
4# services when the runlevel changes.
5#
6# Optimization feature:
7# A startup script is _not_ run when the service was
8# running in the previous runlevel and it wasn't stopped
9# in the runlevel transition (most Debian services don't
10# have K?? links in rc{1,2,3,4,5} )
11#
12# Author: Miquel van Smoorenburg <miquels@cistron.nl>
13# Bruce Perens <Bruce@Pixar.com>
14#
15# Version: @(#)rc 2.78 07-Nov-1999 miquels@cistron.nl
16#
17
18. /etc/default/rcS
19export VERBOSE
20
21startup_progress() {
22 step=$(($step + $step_change))
23 if [ "$num_steps" != "0" ]; then
24 progress=$((($step * $progress_size / $num_steps) + $first_step))
25 else
26 progress=$progress_size
27 fi
28 #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size"
29 #if type psplash-write >/dev/null 2>&1; then
30 # TMPDIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true
31 #fi
32 if [ -e /mnt/.psplash/psplash_fifo ]; then
33 echo "PROGRESS $progress" > /mnt/.psplash/psplash_fifo
34 fi
35}
36
37
38#
39# Start script or program.
40#
41startup() {
42 # Handle verbosity
43 [ "$VERBOSE" = very ] && echo "INIT: Running $@..."
44
45 case "$1" in
46 *.sh)
47 # Source shell script for speed.
48 (
49 trap - INT QUIT TSTP
50 scriptname=$1
51 shift
52 . $scriptname
53 )
54 ;;
55 *)
56 "$@"
57 ;;
58 esac
59 startup_progress
60}
61
62 # Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
63 trap ":" INT QUIT TSTP
64
65 # Set onlcr to avoid staircase effect.
66 stty onlcr 0>&1
67
68 # Now find out what the current and what the previous runlevel are.
69
70 runlevel=$RUNLEVEL
71 # Get first argument. Set new runlevel to this argument.
72 [ "$1" != "" ] && runlevel=$1
73 if [ "$runlevel" = "" ]
74 then
75 echo "Usage: $0 <runlevel>" >&2
76 exit 1
77 fi
78 previous=$PREVLEVEL
79 [ "$previous" = "" ] && previous=N
80
81 export runlevel previous
82
83 # Is there an rc directory for this new runlevel?
84 if [ -d /etc/rc$runlevel.d ]
85 then
86 # Find out where in the progress bar the initramfs got to.
87 PROGRESS_STATE=0
88 #if [ -f /dev/.initramfs/progress_state ]; then
89 # . /dev/.initramfs/progress_state
90 #fi
91
92 # Split the remaining portion of the progress bar into thirds
93 progress_size=$(((100 - $PROGRESS_STATE) / 3))
94
95 case "$runlevel" in
96 0|6)
97 # Count down from -100 to 0 and use the entire bar
98 first_step=-100
99 progress_size=100
100 step_change=1
101 ;;
102 S)
103 # Begin where the initramfs left off and use 2/3
104 # of the remaining space
105 first_step=$PROGRESS_STATE
106 progress_size=$(($progress_size * 2))
107 step_change=1
108 ;;
109 *)
110 # Begin where rcS left off and use the final 1/3 of
111 # the space (by leaving progress_size unchanged)
112 first_step=$(($progress_size * 2 + $PROGRESS_STATE))
113 step_change=1
114 ;;
115 esac
116
117 num_steps=0
118 for s in /etc/rc$runlevel.d/[SK]*; do
119 case "${s##/etc/rc$runlevel.d/S??}" in
120 gdm|xdm|kdm|reboot|halt)
121 break
122 ;;
123 esac
124 num_steps=$(($num_steps + 1))
125 done
126 step=0
127
128 # First, run the KILL scripts.
129 if [ $previous != N ]
130 then
131 for i in /etc/rc$runlevel.d/K[0-9][0-9]*
132 do
133 # Check if the script is there.
134 [ ! -f $i ] && continue
135
136 # Stop the service.
137 startup $i stop
138 done
139 fi
140
141 # Now run the START scripts for this runlevel.
142 for i in /etc/rc$runlevel.d/S*
143 do
144 [ ! -f $i ] && continue
145
146 if [ $previous != N ] && [ $previous != S ]
147 then
148 #
149 # Find start script in previous runlevel and
150 # stop script in this runlevel.
151 #
152 suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
153 stop=/etc/rc$runlevel.d/K[0-9][0-9]$suffix
154 previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
155 #
156 # If there is a start script in the previous level
157 # and _no_ stop script in this level, we don't
158 # have to re-start the service.
159 #
160 [ -f $previous_start ] && [ ! -f $stop ] && continue
161 fi
162 case "$runlevel" in
163 0|6)
164 startup $i stop
165 ;;
166 *)
167 startup $i start
168 ;;
169 esac
170 done
171 fi
172
173#Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch
174if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then
175 if type psplash-write >/dev/null 2>&1; then
176 TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
177 umount /mnt/.psplash
178 fi
179fi
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS b/meta/recipes-core/sysvinit/sysvinit/rcS
new file mode 100755
index 0000000000..080b04f32f
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/rcS
@@ -0,0 +1,34 @@
1#!/bin/sh
2#
3# rcS Call all S??* scripts in /etc/rcS.d in
4# numerical/alphabetical order.
5#
6# Version: @(#)/etc/init.d/rcS 2.76 19-Apr-1999 miquels@cistron.nl
7#
8
9PATH=/sbin:/bin:/usr/sbin:/usr/bin
10runlevel=S
11prevlevel=N
12umask 022
13export PATH runlevel prevlevel
14
15# Make sure proc is mounted
16#
17[ -d "/proc/1" ] || mount /proc
18
19#
20# Source defaults.
21#
22. /etc/default/rcS
23
24#
25# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
26#
27trap ":" INT QUIT TSTP
28
29#
30# Call all parts in order.
31#
32exec /etc/init.d/rc S
33
34
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default
new file mode 100644
index 0000000000..709cdf6ec5
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default
@@ -0,0 +1,29 @@
1#
2# Defaults for the boot scripts in /etc/rcS.d
3#
4
5# Time files in /tmp are kept in days.
6TMPTIME=0
7# Set to yes if you want sulogin to be spawned on bootup
8SULOGIN=no
9# Set to no if you want to be able to login over telnet/rlogin
10# before system startup is complete (as soon as inetd is started)
11DELAYLOGIN=no
12# Assume that the BIOS clock is set to UTC time (recommended)
13UTC=yes
14# Set VERBOSE to "no" if you would like a more quiet bootup.
15VERBOSE=no
16# Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically
17EDITMOTD=no
18# Whether to fsck root on boot
19ENABLE_ROOTFS_FSCK=no
20# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
21FSCKFIX=yes
22# Set TICKADJ to the correct tick value for this specific machine
23#TICKADJ=10000
24# Enable caching in populate-volatile.sh
25VOLATILE_ENABLE_CACHE=yes
26# Indicate whether the rootfs is intended to be read-only or not.
27# Setting ROOTFS_READ_ONLY to yes and rebooting will give you a read-only rootfs.
28# Normally you should not change this value.
29ROOTFS_READ_ONLY=no
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
new file mode 100644
index 0000000000..50842e2fb6
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -0,0 +1,94 @@
1DESCRIPTION = "System-V like init."
2DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts."
3HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
4SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
8PR = "r11"
9
10RDEPENDS_${PN} = "${PN}-inittab"
11
12SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/sysvinit/sysvinit-${PV}.tar.bz2 \
13 file://install.patch \
14 file://crypt-lib.patch \
15 file://pidof-add-m-option.patch \
16 file://rcS-default \
17 file://rc \
18 file://rcS \
19 file://bootlogd.init"
20
21SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f"
22SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
23
24S = "${WORKDIR}/sysvinit-${PV}"
25B = "${S}/src"
26
27inherit update-alternatives
28DEPENDS_append = " update-rc.d-native base-passwd"
29
30ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall"
31
32ALTERNATIVE_PRIORITY = "200"
33
34ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
35ALTERNATIVE_PRIORITY[init] = "50"
36
37ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
38ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
39ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
40ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
41ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
42ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
43
44ALTERNATIVE_${PN}-pidof = "pidof"
45ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
46
47ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
48
49ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
50ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
51ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
52ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
53ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
54ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
55
56PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
57FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
58FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
59FILES_sysvinit-sulogin = "${base_sbindir}/sulogin"
60
61RDEPENDS_${PN} += "sysvinit-pidof"
62
63CFLAGS_prepend = "-D_GNU_SOURCE "
64export LCRYPT = "-lcrypt"
65EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
66 'base_sbindir=${base_sbindir}' \
67 'bindir=${bindir}' \
68 'sbindir=${sbindir}' \
69 'sysconfdir=${sysconfdir}' \
70 'includedir=${includedir}' \
71 'mandir=${mandir}'"
72
73do_install () {
74 oe_runmake 'ROOT=${D}' install
75
76 install -d ${D}${sysconfdir} \
77 ${D}${sysconfdir}/default \
78 ${D}${sysconfdir}/init.d
79 for level in S 0 1 2 3 4 5 6; do
80 install -d ${D}${sysconfdir}/rc$level.d
81 done
82
83 install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS
84 install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d
85 install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d
86 install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
87 ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
88
89 update-rc.d -r ${D} bootlogd start 07 S .
90 update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
91
92 chown root.shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
93 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
94}
diff --git a/meta/recipes-core/uclibc/site_config/funcs b/meta/recipes-core/uclibc/site_config/funcs
new file mode 100644
index 0000000000..ccc85392d7
--- /dev/null
+++ b/meta/recipes-core/uclibc/site_config/funcs
@@ -0,0 +1,474 @@
1a64l
2abs
3access
4__adjtimex
5alarm
6alphasort
7argz_append
8__argz_count
9argz_create_sep
10argz_insert
11__argz_next
12argz_next
13__argz_stringify
14argz_stringify
15asprintf
16atexit
17atof
18atoi
19bcmp
20bcopy
21bindresvport
22bind_textdomain_codeset
23btowc
24bzero
25calloc
26canonicalize_file_name
27catgets
28cfgetospeed
29cfsetispeed
30cfsetspeed
31chmod
32chown
33chroot
34clock
35close
36closedir
37closelog
38confstr
39connect
40daemon
41dcgettext
42difftime
43dirfd
44dirname
45dngettext
46dup2
47ecvt
48endgrent
49endmntent
50endpwent
51endutent
52endutxent
53epoll_ctl
54err
55ether_hostton
56ether_ntohost
57euidaccess
58execv
59fchdir
60fchmod
61fchmodat
62fchown
63fchownat
64fcntl
65fcvt
66fdatasync
67fdopendir
68feof_unlocked
69fgets_unlocked
70fgetxattr
71finite
72flistxattr
73flock
74flockfile
75fnmatch
76fork
77fpathconf
78__fpending
79fprintf
80free
81freeaddrinfo
82freeifaddrs
83fseeko
84__fsetlocking
85fsetxattr
86fstat64
87fstat
88fstatfs
89fsync
90ftello
91ftime
92ftruncate
93funlockfile
94futimes
95futimesat
96gai_strerror
97gcvt
98getaddrinfo
99getc_unlocked
100getcwd
101getdelim
102getdomainname
103getdtablesize
104getegid
105getenv
106geteuid
107getgid
108getgrent
109getgrent_r
110getgrgid_r
111getgrnam
112getgrnam_r
113getgrouplist
114getgroups
115gethostbyaddr_r
116gethostbyname2
117gethostbyname
118gethostbyname_r
119gethostent
120gethostid
121gethostname
122getifaddrs
123getline
124getloadavg
125getmntent
126getmsg
127getnameinfo
128getnetbyaddr_r
129getnetgrent_r
130getopt
131getopt_long
132getopt_long_only
133getpagesize
134getpass
135getpeername
136getpgrp
137getpid
138getppid
139getprotoent_r
140getpwent
141getpwent_r
142getpwnam
143getpwnam_r
144getpwuid
145getpwuid_r
146getresuid
147getrlimit
148getrusage
149getservbyname
150getservbyname_r
151getservbyport_r
152getservent
153getservent_r
154getspnam
155getspnam_r
156gettimeofday
157getttyent
158getttynam
159getuid
160getusershell
161getutent
162getutid
163getutline
164getutmp
165getutmpx
166getutxent
167getutxid
168getutxline
169getwd
170getxattr
171glob
172gmtime
173gmtime_r
174grantpt
175group_member
176herror
177hstrerror
178iconv
179iconv_open
180if_freenameindex
181if_indextoname
182if_nameindex
183if_nametoindex
184index
185inet_addr
186inet_aton
187inet_ntoa
188inet_ntop
189inet_pton
190initgroups
191innetgr
192iruserok
193isascii
194isatty
195isblank
196isgraph
197isinf
198isnan
199isprint
200isspace
201iswalnum
202iswcntrl
203iswctype
204iswprint
205iswspace
206iswupper
207isxdigit
208kill
209killpg
210lchown
211lckpwdf
212lgetxattr
213link
214listxattr
215llistxattr
216localtime
217localtime_r
218lockf
219lrand48
220lsearch
221lseek64
222lsetxattr
223lstat
224mallinfo
225malloc
226mblen
227mbrlen
228mbrtowc
229mbsinit
230mbsrtowcs
231mbtowc
232memalign
233memchr
234memcmp
235memcpy
236memmove
237mempcpy
238memrchr
239memset
240mkdir
241mkdirat
242mkdtemp
243mkfifo
244mknod
245mkstemp64
246mkstemp
247mktime
248mlock
249mmap
250mtrace
251munlock
252munmap
253nanosleep
254nice
255nl_langinfo
256ntp_adjtime
257ntp_gettime
258_obstack_free
259on_exit
260open64
261open
262openat
263opendir
264openlog
265pathconf
266pipe
267poll
268popen
269posix_memalign
270prctl
271pread
272printf
273__progname
274pselect
275pthread_mutex_lock
276ptsname
277putenv
278putgrent
279putpwent
280putspent
281pututline
282pututxline
283putwc
284pwrite
285qsort
286raise
287rand
288random
289rand_r
290read
291readdir
292readdir_r
293readlink
294realloc
295realpath
296re_comp
297recvmsg
298re_exec
299regcomp
300regexec
301remove
302rename
303re_search
304rmdir
305rpmatch
306rresvport_af
307ruserok
308ruserok_af
309sbrk
310scandir
311sched_setscheduler
312sched_yield
313__secure_getenv
314select
315semctl
316semget
317sendmsg
318setbuf
319setbuffer
320setegid
321setenv
322seteuid
323setgid
324setgroups
325sethostname
326setitimer
327_setjmp
328setjmp
329setlinebuf
330setlocale
331setmntent
332setpgid
333setpgrp
334setpriority
335setregid
336setresgid
337setresuid
338setreuid
339setrlimit
340setsid
341setsockopt
342settimeofday
343setuid
344setutent
345setutxent
346setvbuf
347setxattr
348sgetspent
349shmat
350shmctl
351shmdt
352shmget
353shutdown
354sigaction
355sigaddset
356sigaltstack
357sigblock
358sigemptyset
359sighold
360siginterrupt
361signal
362sigprocmask
363sigset
364sigsetmask
365sigstack
366sigsuspend
367sigvec
368snprintf
369socket
370socketpair
371sprintf
372srand48
373srand
374srandom
375sscanf
376stat
377statfs
378statvfs
379stime
380stpcpy
381strcasecmp
382strcasestr
383strchr
384strchrnul
385strcmp
386strcspn
387strdup
388strerror
389strerror_r
390strftime
391strlen
392strncasecmp
393strncmp
394strndup
395strnlen
396strpbrk
397strptime
398strrchr
399strsep
400strsignal
401strspn
402strstr
403strtod
404strtoimax
405strtok_r
406strtol
407strtoll
408strtoul
409strtoull
410strtoumax
411strverscmp
412strxfrm
413symlink
414sync
415sysconf
416sysctl
417sysinfo
418syslog
419_sys_siglist
420sys_siglist
421system
422tcgetattr
423tcgetpgrp
424tcsetattr
425tcsetpgrp
426time
427timegm
428times
429timezone
430tmpnam
431towlower
432towupper
433truncate
434tsearch
435ttyname
436tzset
437ulimit
438umask
439uname
440unlink
441unsetenv
442unshare
443updwtmp
444updwtmpx
445usleep
446ustat
447utime
448utimes
449utmpname
450utmpxname
451valloc
452vasprintf
453verrx
454vfork
455vfprintf
456vfscanf
457vhangup
458vprintf
459vsnprintf
460vsprintf
461wait3
462wait4
463waitpid
464wcrtomb
465wcscoll
466wcsdup
467wcslen
468wctob
469wctomb
470wctype
471wcwidth
472wmemchr
473wmemcpy
474wmempcpy
diff --git a/meta/recipes-core/uclibc/site_config/headers b/meta/recipes-core/uclibc/site_config/headers
new file mode 100644
index 0000000000..609ab53797
--- /dev/null
+++ b/meta/recipes-core/uclibc/site_config/headers
@@ -0,0 +1,156 @@
1aio.h
2alloca.h
3argz.h
4arpa/inet.h
5arpa/nameser.h
6asm/byteorder.h
7asm/ioctls.h
8asm/page.h
9asm/types.h
10assert.h
11byteswap.h
12crypt.h
13ctype.h
14dirent.h
15dlfcn.h
16elf.h
17endian.h
18err.h
19errno.h
20execinfo.h
21fcntl.h
22features.h
23float.h
24fstab.h
25ftw.h
26getopt.h
27glob.h
28grp.h
29iconv.h
30ifaddrs.h
31inttypes.h
32langinfo.h
33lastlog.h
34libgen.h
35libintl.h
36limits.h
37linux/capability.h
38linux/fd.h
39linux/fs.h
40linux/hayesesp.h
41linux/hdreg.h
42linux/icmp.h
43linux/in6.h
44linux/joystick.h
45linux/ptrace.h
46linux/serial.h
47linux/sonypi.h
48linux/unistd.h
49linux/utsname.h
50linux/version.h
51locale.h
52malloc.h
53math.h
54mcheck.h
55memory.h
56mntent.h
57mqueue.h
58netdb.h
59net/if.h
60netinet/ether.h
61netinet/in.h
62netinet/ip6.h
63netinet/ip.h
64netinet/tcp.h
65netinet/udp.h
66netipx/ipx.h
67net/route.h
68paths.h
69poll.h
70pthread.h
71pty.h
72pwd.h
73regex.h
74resolv.h
75rpc/rpc.h
76rpc/types.h
77sched.h
78scsi/scsi.h
79search.h
80semaphore.h
81setjmp.h
82sgtty.h
83shadow.h
84signal.h
85stdarg.h
86stdbool.h
87stdc
88stddef.h
89stdint.h
90stdio.h
91stdlib.h
92string.h
93strings.h
94stropts.h
95sys/bitypes.h
96sys/cdefs.h
97sys/dir.h
98sys/epoll.h
99sysexits.h
100sys/fcntl.h
101sys/file.h
102sys/fsuid.h
103sys/ioctl.h
104sys/ipc.h
105syslog.h
106sys/mman.h
107sys/mount.h
108sys/mtio.h
109sys/param.h
110sys/poll.h
111sys/prctl.h
112sys/ptrace.h
113sys/queue.h
114sys/reg.h
115sys/resource.h
116sys/select.h
117sys/sem.h
118sys/shm.h
119sys/signal.h
120sys/socket.h
121sys/socketvar.h
122sys/soundcard.h
123sys/statfs.h
124sys/stat.h
125sys/statvfs.h
126sys/stropts.h
127sys/swap.h
128sys/sysctl.h
129sys/sysinfo.h
130sys/sysmacros.h
131sys/termios.h
132sys/timeb.h
133sys/time.h
134sys/times.h
135sys/timex.h
136sys/types.h
137sys/uio.h
138sys/un.h
139sys/unistd.h
140sys/user.h
141sys/utsname.h
142sys/vfs.h
143sys/wait.h
144termio.h
145termios.h
146time.h
147ttyent.h
148ulimit.h
149unistd.h
150ustat.h
151utime.h
152utmp.h
153utmpx.h
154values.h
155wchar.h
156wctype.h
diff --git a/meta/recipes-core/uclibc/site_config/types b/meta/recipes-core/uclibc/site_config/types
new file mode 100644
index 0000000000..178bd85a00
--- /dev/null
+++ b/meta/recipes-core/uclibc/site_config/types
@@ -0,0 +1,21 @@
1char
2char *
3double
4float
5int
6long
7long double
8long int
9long long
10long long int
11short
12short int
13signed char
14unsigned char
15unsigned int
16unsigned long
17unsigned long int
18unsigned long long int
19unsigned short
20unsigned short int
21void *
diff --git a/meta/recipes-core/uclibc/uclibc-config.inc b/meta/recipes-core/uclibc/uclibc-config.inc
new file mode 100644
index 0000000000..8b9e41c64d
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-config.inc
@@ -0,0 +1,142 @@
1DEPENDS += "kern-tools-native"
2inherit cml1
3#
4# Set the ARCH environment variable for uClibc compilation.
5# Return value must match one of the architectures known to uClibc:
6# libc/sysdeps/*/*
7#
8
9valid_archs = "\
10alpha \
11arm \
12avr32 \
13bfin \
14c6x \
15cris \
16e1 \
17frv \
18h8300 \
19hppa \
20i386 \
21i960 \
22ia64 \
23m68k \
24microblaze \
25mips \
26nios \
27nios2 \
28powerpc \
29sh \
30sh64 \
31sparc \
32v850 \
33vax \
34x86_64 \
35xtensa \
36"
37def map_uclibc_arch(a, d):
38 """Return the uClibc architecture for the given TARGET_ARCH."""
39 import re
40
41 valid_archs = d.getVar('valid_archs', True).split()
42
43 if re.match('^(arm|sa110).*', a):
44 return 'arm'
45 elif re.match('^(i.86|athlon)$', a):
46 return 'i386'
47 elif re.match('^mips.*', a):
48 return 'mips'
49 elif re.match('^parisc.*', a):
50 return 'hppa'
51 elif re.match('^ppc.*', a):
52 return 'powerpc'
53 elif re.match('^s390.*', a):
54 return 's390'
55 elif re.match('^sh.*', a):
56 return 'sh'
57 elif re.match('^(sun|sparc).*', a):
58 return 'sparc'
59 elif re.match('^xtensa.*', a):
60 return 'xtensa'
61 elif a in valid_archs:
62 return a
63 else:
64 bb.error("cannot map '%s' to a uClibc architecture" % a)
65
66export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}"
67
68def map_uclibc_abi(o, d):
69 """Return the uClibc ABI for the given TARGET_OS."""
70 import re
71
72 arch = d.getVar('TARGET_ARCH', True)
73 if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm":
74 if re.match('.*eabi$', o):
75 return 'ARM_EABI'
76 else:
77 return 'ARM_OABI'
78 # FIXME: This is inaccurate! Handle o32, n32, n64
79 elif re.match('^mips.*64$', arch):
80 return 'MIPS_N64_ABI'
81 elif re.match('^mips.*', arch):
82 return 'MIPS_O32_ABI'
83 return ""
84
85export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}"
86
87def map_uclibc_endian(a, d):
88 """Return the uClibc endianess for the given TARGET_ARCH."""
89 import re
90
91 # Always BE
92 if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a):
93 return 'BIG'
94 # Possibly BE
95 elif re.match('^(((arm|sa110).*eb)|h8300.*eb|(parisc|hppa).*eb|mips|mips64|sh.*eb|xtensa.*eb)$', a):
96 return 'BIG'
97 return 'LITTLE'
98
99export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}"
100
101# internal helper
102def uclibc_cfg(feature, features, tokens, cnf, rem):
103 if type(tokens) == type(""):
104 tokens = [tokens]
105 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
106 if type(features) == type([]) and feature in features:
107 cnf.extend([token + '=y' for token in tokens])
108 else:
109 cnf.extend(['# ' + token + ' is not set' for token in tokens])
110
111# Map distro features to config settings
112def features_to_uclibc_settings(d):
113 cnf, rem = ([], [])
114 distro_features = d.getVar('DISTRO_FEATURES', True).split()
115 uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem)
116 uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem)
117 uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem)
118 uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem)
119 uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem)
120 uclibc_cfg('xattr', distro_features, 'UCLIBC_HAS_XATTR', cnf, rem)
121 uclibc_cfg('ssp', distro_features, 'UCLIBC_HAS_SSP', cnf, rem)
122 uclibc_cfg('argp', distro_features, 'UCLIBC_HAS_ARGP', cnf, rem)
123 uclibc_cfg('libc-posix-clang-wchar', distro_features,'UCLIBC_HAS_WCHAR', cnf, rem)
124 return "\n".join(cnf), "\n".join(rem)
125# X, Y = ${@features_to_uclibc_settings(d)}
126# unfortunately doesn't seem to work with bitbake, workaround:
127def features_to_uclibc_conf(d):
128 cnf, rem = features_to_uclibc_settings(d)
129 return cnf
130def features_to_uclibc_del(d):
131 cnf, rem = features_to_uclibc_settings(d)
132 return rem
133
134# returns all the elements from the src uri that are .cfg files
135def find_cfgs(d):
136 sources=src_patches(d, True)
137 sources_list=[]
138 for s in sources:
139 if s.endswith('.cfg'):
140 sources_list.append(s)
141
142 return sources_list
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
new file mode 100644
index 0000000000..2005ae19e9
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -0,0 +1,26 @@
1SRCREV="f22cca4722fa66e424562e69f4afa2bca0af871d"
2
3PV = "0.9.33+git${SRCPV}"
4
5FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}"
6
7SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
8 file://uClibc.machine \
9 file://uClibc.distro \
10 file://obstack.cfg \
11 file://locale.cfg \
12 file://uclibc_enable_log2_test.patch \
13 file://powerpc_copysignl.patch \
14 file://argp-support.patch \
15 file://argp-headers.patch \
16 file://remove_attribute_optimize_Os.patch \
17 file://compile-arm-fork-with-O2.patch \
18 file://orign_path.patch \
19 file://0001-atexit_old-Do-not-add-it-to-shared-libc.patch \
20 file://0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch \
21 file://0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \
22 file://0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch \
23 file://0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch \
24 file://0001-add-posix_fadvise-for-arm.patch \
25 "
26S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch
new file mode 100644
index 0000000000..4ac765c334
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-Revert-utent.c-wtent.c-move-functions-from-utxent.c.patch
@@ -0,0 +1,319 @@
1Upstream-Status: Pending
2
3From 096abf14d2dc978607ccd8a0d7f42da65d8991f3 Mon Sep 17 00:00:00 2001
4From: Khem Raj <raj.khem@gmail.com>
5Date: Sun, 9 Sep 2012 22:00:04 -0700
6Subject: [PATCH] Revert "utent.c, wtent.c: move functions from utxent.c"
7
8This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18.
9---
10 include/utmp.h | 8 +++++
11 libc/misc/utmp/utent.c | 80 +++++++++++------------------------------------
12 libc/misc/utmp/utxent.c | 4 +--
13 libc/misc/utmp/wtent.c | 14 ++-------
14 4 files changed, 30 insertions(+), 76 deletions(-)
15
16Index: git/include/utmp.h
17===================================================================
18--- git.orig/include/utmp.h 2013-01-21 16:37:18.000000000 -0800
19+++ git/include/utmp.h 2013-01-21 16:40:56.987583099 -0800
20@@ -56,30 +56,37 @@
21 /* Append entry UTMP to the wtmp-like file WTMP_FILE. */
22 extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp)
23 __THROW;
24+libc_hidden_proto(updwtmp)
25
26 /* Change name of the utmp file to be examined. */
27 extern int utmpname (const char *__file) __THROW;
28+libc_hidden_proto(utmpname)
29
30 /* Read next entry from a utmp-like file. */
31 extern struct utmp *getutent (void) __THROW;
32+libc_hidden_proto(getutent)
33
34 /* Reset the input stream to the beginning of the file. */
35 extern void setutent (void) __THROW;
36+libc_hidden_proto(setutent)
37
38 /* Close the current open file. */
39 extern void endutent (void) __THROW;
40+libc_hidden_proto(endutent)
41
42 /* Search forward from the current point in the utmp file until the
43 next entry with a ut_type matching ID->ut_type. */
44 extern struct utmp *getutid (const struct utmp *__id) __THROW;
45+libc_hidden_proto(getutid)
46
47 /* Search forward from the current point in the utmp file until the
48 next entry with a ut_line matching LINE->ut_line. */
49 extern struct utmp *getutline (const struct utmp *__line) __THROW;
50+libc_hidden_proto(getutline)
51
52 /* Write out entry pointed to by UTMP_PTR into the utmp file. */
53 extern struct utmp *pututline (const struct utmp *__utmp_ptr) __THROW;
54-
55+libc_hidden_proto(pututline)
56
57 #if 0 /* def __USE_MISC */
58 /* Reentrant versions of the file for handling utmp files. */
59Index: git/libc/misc/utmp/utent.c
60===================================================================
61--- git.orig/libc/misc/utmp/utent.c 2013-01-21 16:37:18.000000000 -0800
62+++ git/libc/misc/utmp/utent.c 2013-01-21 16:38:14.035578638 -0800
63@@ -19,9 +19,6 @@
64 #include <errno.h>
65 #include <string.h>
66 #include <utmp.h>
67-#ifdef __UCLIBC_HAS_UTMPX__
68-# include <utmpx.h>
69-#endif
70 #include <not-cancel.h>
71
72 #include <bits/uClibc_mutex.h>
73@@ -34,7 +31,7 @@
74 static const char *static_ut_name = default_file_name;
75
76 /* This function must be called with the LOCK held */
77-static void __setutent_unlocked(void)
78+static void __setutent(void)
79 {
80 if (static_fd < 0) {
81 static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC);
82@@ -53,24 +50,19 @@
83 lseek(static_fd, 0, SEEK_SET);
84 }
85 #if defined __UCLIBC_HAS_THREADS__
86-static void __setutent(void)
87+void setutent(void)
88 {
89 __UCLIBC_MUTEX_LOCK(utmplock);
90- __setutent_unlocked();
91+ __setutent();
92 __UCLIBC_MUTEX_UNLOCK(utmplock);
93 }
94 #else
95-static void __setutent(void);
96-strong_alias(__setutent_unlocked,__setutent)
97-#endif
98 strong_alias(__setutent,setutent)
99-
100-#ifdef __UCLIBC_HAS_UTMPX__
101-strong_alias(__setutent,setutxent)
102 #endif
103+libc_hidden_def(setutent)
104
105 /* This function must be called with the LOCK held */
106-static struct utmp *__getutent_unlocked(void)
107+static struct utmp *__getutent(void)
108 {
109 if (static_fd < 0) {
110 __setutent();
111@@ -86,27 +78,19 @@
112 return NULL;
113 }
114 #if defined __UCLIBC_HAS_THREADS__
115-static struct utmp *__getutent(void)
116+struct utmp *getutent(void)
117 {
118 struct utmp *ret;
119
120 __UCLIBC_MUTEX_LOCK(utmplock);
121- ret = __getutent_unlocked();
122+ ret = __getutent();
123 __UCLIBC_MUTEX_UNLOCK(utmplock);
124 return ret;
125 }
126 #else
127-static struct utmp *__getutent(void);
128-strong_alias(__getutent_unlocked,__getutent)
129-#endif
130 strong_alias(__getutent,getutent)
131-
132-#ifdef __UCLIBC_HAS_UTMPX__
133-struct utmpx *getutxent(void)
134-{
135- return (struct utmpx *) __getutent ();
136-}
137 #endif
138+libc_hidden_def(getutent)
139
140 static void __endutent(void)
141 {
142@@ -117,13 +101,10 @@
143 __UCLIBC_MUTEX_UNLOCK(utmplock);
144 }
145 strong_alias(__endutent,endutent)
146-
147-#ifdef __UCLIBC_HAS_UTMPX__
148-strong_alias(__endutent,endutxent)
149-#endif
150+libc_hidden_def(endutent)
151
152 /* This function must be called with the LOCK held */
153-static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry)
154+static struct utmp *__getutid(const struct utmp *utmp_entry)
155 {
156 struct utmp *lutmp;
157 unsigned type;
158@@ -133,7 +114,7 @@
159 type = utmp_entry->ut_type - 1;
160 type /= 4;
161
162- while ((lutmp = __getutent_unlocked()) != NULL) {
163+ while ((lutmp = __getutent()) != NULL) {
164 if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) {
165 /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */
166 return lutmp;
167@@ -147,34 +128,26 @@
168 return NULL;
169 }
170 #if defined __UCLIBC_HAS_THREADS__
171-static struct utmp *__getutid(const struct utmp *utmp_entry)
172+struct utmp *getutid(const struct utmp *utmp_entry)
173 {
174 struct utmp *ret;
175
176 __UCLIBC_MUTEX_LOCK(utmplock);
177- ret = __getutid_unlocked(utmp_entry);
178+ ret = __getutid(utmp_entry);
179 __UCLIBC_MUTEX_UNLOCK(utmplock);
180 return ret;
181 }
182 #else
183-static struct utmp *__getutid(const struct utmp *utmp_entry);
184-strong_alias(__getutid_unlocked,__getutid)
185-#endif
186 strong_alias(__getutid,getutid)
187-
188-#ifdef __UCLIBC_HAS_UTMPX__
189-struct utmpx *getutxid(const struct utmpx *utmp_entry)
190-{
191- return (struct utmpx *) __getutid ((const struct utmp *) utmp_entry);
192-}
193 #endif
194+libc_hidden_def(getutid)
195
196 static struct utmp *__getutline(const struct utmp *utmp_entry)
197 {
198 struct utmp *lutmp;
199
200 __UCLIBC_MUTEX_LOCK(utmplock);
201- while ((lutmp = __getutent_unlocked()) != NULL) {
202+ while ((lutmp = __getutent()) != NULL) {
203 if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) {
204 if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) {
205 break;
206@@ -185,13 +158,7 @@
207 return lutmp;
208 }
209 strong_alias(__getutline,getutline)
210-
211-#ifdef __UCLIBC_HAS_UTMPX__
212-struct utmpx *getutxline(const struct utmpx *utmp_entry)
213-{
214- return (struct utmpx *) __getutline ((const struct utmp *) utmp_entry);
215-}
216-#endif
217+libc_hidden_def(getutline)
218
219 static struct utmp *__pututline(const struct utmp *utmp_entry)
220 {
221@@ -200,7 +167,7 @@
222 the file pointer where they want it, everything will work out. */
223 lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
224
225- if (__getutid_unlocked(utmp_entry) != NULL)
226+ if (__getutid(utmp_entry) != NULL)
227 lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
228 else
229 lseek(static_fd, (off_t) 0, SEEK_END);
230@@ -211,13 +178,7 @@
231 return (struct utmp *)utmp_entry;
232 }
233 strong_alias(__pututline,pututline)
234-
235-#ifdef __UCLIBC_HAS_UTMPX__
236-struct utmpx *pututxline (const struct utmpx *utmp_entry)
237-{
238- return (struct utmpx *) __pututline ((const struct utmp *) utmp_entry);
239-}
240-#endif
241+libc_hidden_def(pututline)
242
243 static int __utmpname(const char *new_ut_name)
244 {
245@@ -241,7 +202,4 @@
246 return 0; /* or maybe return -(static_ut_name != new_ut_name)? */
247 }
248 strong_alias(__utmpname,utmpname)
249-
250-#ifdef __UCLIBC_HAS_UTMPX__
251-strong_alias(__utmpname,utmpxname)
252-#endif
253+libc_hidden_def(utmpname)
254Index: git/libc/misc/utmp/utxent.c
255===================================================================
256--- git.orig/libc/misc/utmp/utxent.c 2013-01-21 16:37:18.000000000 -0800
257+++ git/libc/misc/utmp/utxent.c 2013-01-21 16:38:14.035578638 -0800
258@@ -13,7 +13,6 @@
259 #include <utmpx.h>
260 #include <utmp.h>
261
262-#if 0 /* moved to utent.c */
263 void setutxent(void)
264 {
265 setutent ();
266@@ -49,12 +48,10 @@
267 return utmpname (new_ut_name);
268 }
269
270-/* moved to wtent.c */
271 void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
272 {
273 updwtmp (wtmpx_file, (const struct utmp *) utmpx);
274 }
275-#endif
276
277 /* Copy the information in UTMPX to UTMP. */
278 void getutmp (const struct utmpx *utmpx, struct utmp *utmp)
279@@ -107,3 +104,4 @@
280 utmpx->ut_time = utmp->ut_time;
281 #endif
282 }
283+
284Index: git/libc/misc/utmp/wtent.c
285===================================================================
286--- git.orig/libc/misc/utmp/wtent.c 2013-01-21 16:37:18.000000000 -0800
287+++ git/libc/misc/utmp/wtent.c 2013-01-21 16:38:14.035578638 -0800
288@@ -11,9 +11,6 @@
289 #include <time.h>
290 #include <unistd.h>
291 #include <utmp.h>
292-#ifdef __UCLIBC_HAS_UTMPX__
293-# include <utmpx.h>
294-#endif
295 #include <fcntl.h>
296 #include <sys/file.h>
297 #include <not-cancel.h>
298@@ -36,7 +33,7 @@
299 }
300 #endif
301
302-static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp)
303+void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
304 {
305 int fd;
306
307@@ -49,11 +46,4 @@
308 }
309 }
310 }
311-strong_alias(__updwtmp,updwtmp)
312-
313-#ifdef __UCLIBC_HAS_UTMPX__
314-void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
315-{
316- __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
317-}
318-#endif
319+libc_hidden_def(updwtmp)
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-add-posix_fadvise-for-arm.patch b/meta/recipes-core/uclibc/uclibc-git/0001-add-posix_fadvise-for-arm.patch
new file mode 100644
index 0000000000..7c17a19420
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-add-posix_fadvise-for-arm.patch
@@ -0,0 +1,68 @@
1From 236a65abe0a6810e20498fc0ba8d02d90978953b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 29 Jun 2013 22:46:53 -0700
4Subject: [PATCH] add posix_fadvise() for arm
5
6arm call to posix_fadvise simply calls posix_fadvise64
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 libc/sysdeps/linux/common/posix_fadvise.c | 24 ++++++++++++++++--------
11 1 file changed, 16 insertions(+), 8 deletions(-)
12
13Upstream-Status: Pending
14
15diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c
16index d3e1bd4..e102ce7 100644
17--- a/libc/sysdeps/linux/common/posix_fadvise.c
18+++ b/libc/sysdeps/linux/common/posix_fadvise.c
19@@ -10,30 +10,38 @@
20
21 #include <sys/syscall.h>
22
23-#ifdef __NR_fadvise64
24+#if defined(__NR_fadvise64) || defined(__NR_arm_fadvise64_64)
25 # include <fcntl.h>
26 # include <endian.h>
27 # include <bits/wordsize.h>
28
29+# ifdef __NR_arm_fadvise64_64
30+int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
31+# endif
32+
33 int posix_fadvise(int fd, off_t offset, off_t len, int advice)
34 {
35+# ifdef __NR_arm_fadvise64_64
36+ return posix_fadvise64(fd, offset, len, advice);
37+# else
38 int ret;
39 INTERNAL_SYSCALL_DECL(err);
40-# if __WORDSIZE == 64
41+# if __WORDSIZE == 64
42 ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
43-# else
44-# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
45- ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
46 # else
47+# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
48+ ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
49+# else
50 ret = INTERNAL_SYSCALL(fadvise64, err, 5, fd,
51-# endif
52+# endif
53 OFF_HI_LO (offset), len, advice);
54-# endif
55+# endif
56 if (INTERNAL_SYSCALL_ERROR_P (ret, err))
57 return INTERNAL_SYSCALL_ERRNO (ret, err);
58 return 0;
59+# endif
60 }
61-# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || __WORDSIZE == 64)
62+# if defined __UCLIBC_HAS_LFS__ && ((!defined __NR_fadvise64_64 && !defined __NR_arm_fadvise64_64) || __WORDSIZE == 64)
63 strong_alias(posix_fadvise,posix_fadvise64)
64 # endif
65 #endif
66--
671.7.9.5
68
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-atexit_old-Do-not-add-it-to-shared-libc.patch b/meta/recipes-core/uclibc/uclibc-git/0001-atexit_old-Do-not-add-it-to-shared-libc.patch
new file mode 100644
index 0000000000..b6dfce483e
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-atexit_old-Do-not-add-it-to-shared-libc.patch
@@ -0,0 +1,44 @@
1From 74667582526b39a1906228574d73a6528f4587eb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Jun 2012 13:26:30 -0700
4Subject: [PATCH] atexit_old: Do not add it to shared libc
5
6atexit should only be in either uclibc_nonshared.a
7shared libc case or libc.a in static build case
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Upstream-Status: Pending
12---
13 libc/stdlib/Makefile.in | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in
17index 3166b8e..3d686d9 100644
18--- a/libc/stdlib/Makefile.in
19+++ b/libc/stdlib/Makefile.in
20@@ -60,7 +60,6 @@ CSRC-$(if $(findstring yyy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_HAS_WCHAR)$(UCLIBC_HAS_X
21
22 # multi source _atexit.c
23 CSRC-y += __cxa_atexit.c __cxa_finalize.c __exit_handler.c exit.c on_exit.c
24-CSRC-$(COMPAT_ATEXIT) += old_atexit.c
25
26 STDLIB_DIR := $(top_srcdir)libc/stdlib
27 STDLIB_OUT := $(top_builddir)libc/stdlib
28@@ -70,11 +69,12 @@ STDLIB_OBJ := $(patsubst %.c,$(STDLIB_OUT)/%.o,$(CSRC-y))
29
30 libc-y += $(STDLIB_OBJ)
31 libc-static-y += $(STDLIB_OUT)/atexit.o $(STDLIB_OUT)/system.o
32+libc-static-$(COMPAT_ATEXIT) += $(STDLIB_OUT)/old_atexit.o
33 libc-shared-y += $(STDLIB_OUT)/system.oS
34
35 # this should always be the PIC version, because it could be used in shared libs
36 libc-nonshared-y += $(STDLIB_OUT)/atexit.os
37-
38+libc-nonshared-$(COMPAT_ATEXIT) += $(STDLIB_OUT)/old_atexit.os
39 libc-nomulti-y += $(STDLIB_OUT)/labs.o $(STDLIB_OUT)/atol.o $(STDLIB_OUT)/_stdlib_strto_l.o $(STDLIB_OUT)/_stdlib_strto_ll.o
40 libc-nomulti-$(UCLIBC_HAS_XLOCALE) += $(STDLIB_OUT)/_stdlib_strto_l_l.o $(STDLIB_OUT)/_stdlib_strto_ll_l.o
41
42--
431.7.9.5
44
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch b/meta/recipes-core/uclibc/uclibc-git/0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch
new file mode 100644
index 0000000000..ecb9d31645
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-librt-Use-nodefaultlibs-instead-of-nostdlib.patch
@@ -0,0 +1,33 @@
1From 95f9b6f37152b8316735d3c86c0db963ff59e22d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Jun 2012 16:51:52 -0700
4Subject: [PATCH] librt: Use -nodefaultlibs instead of -nostdlib
5
6nostdlib disables linking in startup files too which is not
7what we want here since it needs to resolve __dso_handle
8which comes from crtbeginS.o, otherwise librt has this
9undefined reference to a weak undefined __dso_handle that
10shows up as error (with gold linker)
11when shared libraries are being built which are
12linking in librt
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Upstream-Status: Pending
16---
17 librt/Makefile.in | 1 +
18 1 file changed, 1 insertion(+)
19
20Index: git/librt/Makefile.in
21===================================================================
22--- git.orig/librt/Makefile.in 2012-06-24 10:32:59.512653237 -0700
23+++ git/librt/Makefile.in 2012-06-24 11:31:00.660821666 -0700
24@@ -15,6 +15,9 @@
25 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
26 LIBS-librt.so += $(top_builddir)lib/libdl.so $(top_builddir)lib/libpthread.so
27 endif
28+START_FILE-librt.so := $(SHARED_START_FILES)
29+END_FILE-librt.so := $(SHARED_END_FILES)
30+
31
32 librt_FULL_NAME := librt-$(VERSION).so
33
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch
new file mode 100644
index 0000000000..7e7c5793f1
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch
@@ -0,0 +1,28 @@
1From 714f543f4fa8fb3911449b6ce1517481359e0cff Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Jun 2012 14:21:17 -0700
4Subject: [PATCH] nptl/arm: Move aeabi_read_tp to uclibc_nonshared.a
5
6Otherwise it creates wrong references from shared libs
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Upstream-Status: Pending
10---
11 libc/sysdeps/linux/arm/Makefile.arch | 4 +++-
12 1 file changed, 3 insertions(+), 1 deletion(-)
13
14Index: git/libc/sysdeps/linux/arm/Makefile.arch
15===================================================================
16--- git.orig/libc/sysdeps/linux/arm/Makefile.arch 2013-05-23 11:13:32.000000000 -0700
17+++ git/libc/sysdeps/linux/arm/Makefile.arch 2013-05-23 11:16:18.304333131 -0700
18@@ -13,7 +13,9 @@
19 vfork.S clone.S
20
21 SSRC-$(UCLIBC_HAS_LFS) += mmap64.S
22-SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-aeabi_read_tp.S libc-thumb_atomics.S
23+SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-thumb_atomics.S
24+libc-nonshared-$(UCLIBC_HAS_THREADS_NATIVE) += $(ARCH_OUT)/libc-aeabi_read_tp.os
25+libc-static-$(UCLIBC_HAS_THREADS_NATIVE) += $(ARCH_OUT)/libc-aeabi_read_tp.o
26 CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
27 SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S swapcontext.S
28
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch
new file mode 100644
index 0000000000..297a40bd04
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch
@@ -0,0 +1,74 @@
1From d021e6252b33e779857846714fb1899a25c9965d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 23 Jun 2012 15:59:01 -0700
4Subject: [PATCH] nptl/atfork: Hide pthread_atfork in shared versions
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Pending
8---
9 libpthread/nptl/Makefile.in | 4 +++-
10 libpthread/nptl/pthread_atfork.c | 12 ++++++++++--
11 2 files changed, 13 insertions(+), 3 deletions(-)
12
13diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
14index 158bcae..3ef7175 100644
15--- a/libpthread/nptl/Makefile.in
16+++ b/libpthread/nptl/Makefile.in
17@@ -16,6 +16,7 @@ libc-shared-routines-y = forward.c libc-cancellation.c
18 libc-static-routines-y = alloca_cutoff.c libc-cancellation.c
19 libpthread-shared-only-routines-y = version.c
20 libpthread-static-only-routines-y = pthread_atfork.c
21+
22 libpthread-routines- += $(notdir $(wildcard $(libpthread_DIR)/gen_*.c)) # dummy generated files
23 libpthread-routines- += allocatestack.c # dummy included by pthread_create.c
24 libpthread-routines- += pthread_mutex_getprioceiling.c pthread_mutex_setprioceiling.c # XXX: delete those or use them!
25@@ -208,7 +209,7 @@ CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables
26 CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables
27
28 CFLAGS-pt-system.c = -fexceptions -I$(top_srcdir)libc/stdlib
29-
30+CFLAGS-pthread_atfork.c = -DNOT_IN_libc
31 #
32 # The rest of this file is uClibc specific.
33 #
34@@ -224,3 +225,4 @@ CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-nptl)
35 CFLAGS-OMIT-forward.c = $(CFLAGS-nptl)
36 CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-nptl)
37 CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-nptl)
38+
39diff --git a/libpthread/nptl/pthread_atfork.c b/libpthread/nptl/pthread_atfork.c
40index e607d49..6224c17 100644
41--- a/libpthread/nptl/pthread_atfork.c
42+++ b/libpthread/nptl/pthread_atfork.c
43@@ -38,13 +38,17 @@
44 #include <fork.h>
45
46 /* This is defined by newer gcc version unique for each module. */
47-extern void *__dso_handle __attribute__ ((__weak__));
48- //,__visibility__ ("hidden")));
49+extern void *__dso_handle __attribute__ ((__weak__,
50+ __visibility__ ("hidden")));
51
52
53 /* Hide the symbol so that no definition but the one locally in the
54 executable or DSO is used. */
55 int
56+#ifndef __pthread_atfork
57+/* Don't mark the compatibility function as hidden. */
58+attribute_hidden
59+#endif
60 __pthread_atfork (
61 void (*prepare) (void),
62 void (*parent) (void),
63@@ -53,4 +57,8 @@ __pthread_atfork (
64 return __register_atfork (prepare, parent, child,
65 &__dso_handle == NULL ? NULL : __dso_handle);
66 }
67+#ifndef __pthread_atfork
68+extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
69+ void (*child) (void)) attribute_hidden;
70 strong_alias (__pthread_atfork, pthread_atfork)
71+#endif
72--
731.7.9.5
74
diff --git a/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch b/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch
new file mode 100644
index 0000000000..b31b991846
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch
@@ -0,0 +1,583 @@
1Added headers file needed by argp sources.
2
3Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
4---
5 include/argp.h | 566 ++++++++++++++++++++++++++++++++++++++++++++
6 libc/argp/argp-fmtstream.h | 314 ++++++++++++++++++++++++
7 2 files changed, 880 insertions(+), 0 deletions(-)
8 create mode 100644 include/argp.h
9 create mode 100644 libc/argp/argp-fmtstream.h
10
11Upstream-Status: Pending
12
13Index: git/include/argp.h
14===================================================================
15--- /dev/null
16+++ git/include/argp.h
17@@ -0,0 +1,566 @@
18+/* Hierarchial argument parsing, layered over getopt.
19+ Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007, 2009
20+ Free Software Foundation, Inc.
21+ This file is part of the GNU C Library.
22+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
23+
24+ The GNU C Library is free software; you can redistribute it and/or
25+ modify it under the terms of the GNU Lesser General Public
26+ License as published by the Free Software Foundation; either
27+ version 2.1 of the License, or (at your option) any later version.
28+
29+ The GNU C Library is distributed in the hope that it will be useful,
30+ but WITHOUT ANY WARRANTY; without even the implied warranty of
31+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
32+ Lesser General Public License for more details.
33+
34+ You should have received a copy of the GNU Lesser General Public
35+ License along with the GNU C Library; if not, write to the Free
36+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
37+ 02111-1307 USA.
38+
39+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
40+*/
41+
42+#ifndef _ARGP_H
43+#define _ARGP_H
44+
45+#include <stdio.h>
46+#include <ctype.h>
47+#include <limits.h>
48+
49+#define __need_error_t
50+#include <errno.h>
51+
52+#ifndef __const
53+# define __const const
54+#endif
55+
56+#ifndef __THROW
57+# define __THROW
58+#endif
59+#ifndef __NTH
60+# define __NTH(fct) fct __THROW
61+#endif
62+
63+#ifndef __attribute__
64+/* This feature is available in gcc versions 2.5 and later. */
65+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__)
66+# define __attribute__(Spec) /* empty */
67+# endif
68+/* The __-protected variants of `format' and `printf' attributes
69+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
70+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__)
71+# define __format__ format
72+# define __printf__ printf
73+# endif
74+#endif
75+
76+/* GCC 2.95 and later have "__restrict"; C99 compilers have
77+ "restrict", and "configure" may have defined "restrict". */
78+#ifndef __restrict
79+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
80+# if defined restrict || 199901L <= __STDC_VERSION__
81+# define __restrict restrict
82+# else
83+# define __restrict
84+# endif
85+# endif
86+#endif
87+
88+#ifndef __error_t_defined
89+typedef int error_t;
90+# define __error_t_defined
91+#endif
92+
93+#ifdef __cplusplus
94+extern "C" {
95+#endif
96+
97+/* A description of a particular option. A pointer to an array of
98+ these is passed in the OPTIONS field of an argp structure. Each option
99+ entry can correspond to one long option and/or one short option; more
100+ names for the same option can be added by following an entry in an option
101+ array with options having the OPTION_ALIAS flag set. */
102+struct argp_option
103+{
104+ /* The long option name. For more than one name for the same option, you
105+ can use following options with the OPTION_ALIAS flag set. */
106+ __const char *name;
107+
108+ /* What key is returned for this option. If > 0 and printable, then it's
109+ also accepted as a short option. */
110+ int key;
111+
112+ /* If non-NULL, this is the name of the argument associated with this
113+ option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
114+ __const char *arg;
115+
116+ /* OPTION_ flags. */
117+ int flags;
118+
119+ /* The doc string for this option. If both NAME and KEY are 0, This string
120+ will be printed outdented from the normal option column, making it
121+ useful as a group header (it will be the first thing printed in its
122+ group); in this usage, it's conventional to end the string with a `:'. */
123+ __const char *doc;
124+
125+ /* The group this option is in. In a long help message, options are sorted
126+ alphabetically within each group, and the groups presented in the order
127+ 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
128+ if this field 0 will inherit the group number of the previous entry, or
129+ zero if it's the first one, unless its a group header (NAME and KEY both
130+ 0), in which case, the previous entry + 1 is the default. Automagic
131+ options such as --help are put into group -1. */
132+ int group;
133+};
134+
135+/* The argument associated with this option is optional. */
136+#define OPTION_ARG_OPTIONAL 0x1
137+
138+/* This option isn't displayed in any help messages. */
139+#define OPTION_HIDDEN 0x2
140+
141+/* This option is an alias for the closest previous non-alias option. This
142+ means that it will be displayed in the same help entry, and will inherit
143+ fields other than NAME and KEY from the aliased option. */
144+#define OPTION_ALIAS 0x4
145+
146+/* This option isn't actually an option (and so should be ignored by the
147+ actual option parser), but rather an arbitrary piece of documentation that
148+ should be displayed in much the same manner as the options. If this flag
149+ is set, then the option NAME field is displayed unmodified (e.g., no `--'
150+ prefix is added) at the left-margin (where a *short* option would normally
151+ be displayed), and the documentation string in the normal place. For
152+ purposes of sorting, any leading whitespace and punctuation is ignored,
153+ except that if the first non-whitespace character is not `-', this entry
154+ is displayed after all options (and OPTION_DOC entries with a leading `-')
155+ in the same group. */
156+#define OPTION_DOC 0x8
157+
158+/* This option shouldn't be included in `long' usage messages (but is still
159+ included in help messages). This is mainly intended for options that are
160+ completely documented in an argp's ARGS_DOC field, in which case including
161+ the option in the generic usage list would be redundant. For instance,
162+ if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
163+ distinguish these two cases, -x should probably be marked
164+ OPTION_NO_USAGE. */
165+#define OPTION_NO_USAGE 0x10
166+
167+struct argp; /* fwd declare this type */
168+struct argp_state; /* " */
169+struct argp_child; /* " */
170+
171+/* The type of a pointer to an argp parsing function. */
172+typedef error_t (*argp_parser_t) (int __key, char *__arg,
173+ struct argp_state *__state);
174+
175+/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
176+ returns will simply be ignored. For user keys, this error will be turned
177+ into EINVAL (if the call to argp_parse is such that errors are propagated
178+ back to the user instead of exiting); returning EINVAL itself would result
179+ in an immediate stop to parsing in *all* cases. */
180+#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
181+
182+/* Special values for the KEY argument to an argument parsing function.
183+ ARGP_ERR_UNKNOWN should be returned if they aren't understood.
184+
185+ The sequence of keys to a parsing function is either (where each
186+ uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
187+
188+ INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
189+ or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
190+ or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
191+
192+ The third case is where every parser returned ARGP_KEY_UNKNOWN for an
193+ argument, in which case parsing stops at that argument (returning the
194+ unparsed arguments to the caller of argp_parse if requested, or stopping
195+ with an error message if not).
196+
197+ If an error occurs (either detected by argp, or because the parsing
198+ function returned an error value), then the parser is called with
199+ ARGP_KEY_ERROR, and no further calls are made. */
200+
201+/* This is not an option at all, but rather a command line argument. If a
202+ parser receiving this key returns success, the fact is recorded, and the
203+ ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
204+ argument, a parser function decrements the NEXT field of the state it's
205+ passed, the option won't be considered processed; this is to allow you to
206+ actually modify the argument (perhaps into an option), and have it
207+ processed again. */
208+#define ARGP_KEY_ARG 0
209+/* There are remaining arguments not parsed by any parser, which may be found
210+ starting at (STATE->argv + STATE->next). If success is returned, but
211+ STATE->next left untouched, it's assumed that all arguments were consume,
212+ otherwise, the parser should adjust STATE->next to reflect any arguments
213+ consumed. */
214+#define ARGP_KEY_ARGS 0x1000006
215+/* There are no more command line arguments at all. */
216+#define ARGP_KEY_END 0x1000001
217+/* Because it's common to want to do some special processing if there aren't
218+ any non-option args, user parsers are called with this key if they didn't
219+ successfully process any non-option arguments. Called just before
220+ ARGP_KEY_END (where more general validity checks on previously parsed
221+ arguments can take place). */
222+#define ARGP_KEY_NO_ARGS 0x1000002
223+/* Passed in before any parsing is done. Afterwards, the values of each
224+ element of the CHILD_INPUT field, if any, in the state structure is
225+ copied to each child's state to be the initial value of the INPUT field. */
226+#define ARGP_KEY_INIT 0x1000003
227+/* Use after all other keys, including SUCCESS & END. */
228+#define ARGP_KEY_FINI 0x1000007
229+/* Passed in when parsing has successfully been completed (even if there are
230+ still arguments remaining). */
231+#define ARGP_KEY_SUCCESS 0x1000004
232+/* Passed in if an error occurs. */
233+#define ARGP_KEY_ERROR 0x1000005
234+
235+/* An argp structure contains a set of options declarations, a function to
236+ deal with parsing one, documentation string, a possible vector of child
237+ argp's, and perhaps a function to filter help output. When actually
238+ parsing options, getopt is called with the union of all the argp
239+ structures chained together through their CHILD pointers, with conflicts
240+ being resolved in favor of the first occurrence in the chain. */
241+struct argp
242+{
243+ /* An array of argp_option structures, terminated by an entry with both
244+ NAME and KEY having a value of 0. */
245+ __const struct argp_option *options;
246+
247+ /* What to do with an option from this structure. KEY is the key
248+ associated with the option, and ARG is any associated argument (NULL if
249+ none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
250+ returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
251+ parsing is stopped immediately, and that value is returned from
252+ argp_parse(). For special (non-user-supplied) values of KEY, see the
253+ ARGP_KEY_ definitions below. */
254+ argp_parser_t parser;
255+
256+ /* A string describing what other arguments are wanted by this program. It
257+ is only used by argp_usage to print the `Usage:' message. If it
258+ contains newlines, the strings separated by them are considered
259+ alternative usage patterns, and printed on separate lines (lines after
260+ the first are prefix by ` or: ' instead of `Usage:'). */
261+ __const char *args_doc;
262+
263+ /* If non-NULL, a string containing extra text to be printed before and
264+ after the options in a long help message (separated by a vertical tab
265+ `\v' character). */
266+ __const char *doc;
267+
268+ /* A vector of argp_children structures, terminated by a member with a 0
269+ argp field, pointing to child argps should be parsed with this one. Any
270+ conflicts are resolved in favor of this argp, or early argps in the
271+ CHILDREN list. This field is useful if you use libraries that supply
272+ their own argp structure, which you want to use in conjunction with your
273+ own. */
274+ __const struct argp_child *children;
275+
276+ /* If non-zero, this should be a function to filter the output of help
277+ messages. KEY is either a key from an option, in which case TEXT is
278+ that option's help text, or a special key from the ARGP_KEY_HELP_
279+ defines, below, describing which other help text TEXT is. The function
280+ should return either TEXT, if it should be used as-is, a replacement
281+ string, which should be malloced, and will be freed by argp, or NULL,
282+ meaning `print nothing'. The value for TEXT is *after* any translation
283+ has been done, so if any of the replacement text also needs translation,
284+ that should be done by the filter function. INPUT is either the input
285+ supplied to argp_parse, or NULL, if argp_help was called directly. */
286+ char *(*help_filter) (int __key, __const char *__text, void *__input);
287+
288+ /* If non-zero the strings used in the argp library are translated using
289+ the domain described by this string. Otherwise the currently installed
290+ default domain is used. */
291+ const char *argp_domain;
292+};
293+
294+/* Possible KEY arguments to a help filter function. */
295+#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
296+#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
297+#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
298+#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
299+ TEXT is NULL for this key. */
300+/* Explanatory note emitted when duplicate option arguments have been
301+ suppressed. */
302+#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
303+#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
304+
305+/* When an argp has a non-zero CHILDREN field, it should point to a vector of
306+ argp_child structures, each of which describes a subsidiary argp. */
307+struct argp_child
308+{
309+ /* The child parser. */
310+ __const struct argp *argp;
311+
312+ /* Flags for this child. */
313+ int flags;
314+
315+ /* If non-zero, an optional header to be printed in help output before the
316+ child options. As a side-effect, a non-zero value forces the child
317+ options to be grouped together; to achieve this effect without actually
318+ printing a header string, use a value of "". */
319+ __const char *header;
320+
321+ /* Where to group the child options relative to the other (`consolidated')
322+ options in the parent argp; the values are the same as the GROUP field
323+ in argp_option structs, but all child-groupings follow parent options at
324+ a particular group level. If both this field and HEADER are zero, then
325+ they aren't grouped at all, but rather merged with the parent options
326+ (merging the child's grouping levels with the parents). */
327+ int group;
328+};
329+
330+/* Parsing state. This is provided to parsing functions called by argp,
331+ which may examine and, as noted, modify fields. */
332+struct argp_state
333+{
334+ /* The top level ARGP being parsed. */
335+ __const struct argp *root_argp;
336+
337+ /* The argument vector being parsed. May be modified. */
338+ int argc;
339+ char **argv;
340+
341+ /* The index in ARGV of the next arg that to be parsed. May be modified. */
342+ int next;
343+
344+ /* The flags supplied to argp_parse. May be modified. */
345+ unsigned flags;
346+
347+ /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
348+ number of the current arg, starting at zero, and incremented after each
349+ such call returns. At all other times, this is the number of such
350+ arguments that have been processed. */
351+ unsigned arg_num;
352+
353+ /* If non-zero, the index in ARGV of the first argument following a special
354+ `--' argument (which prevents anything following being interpreted as an
355+ option). Only set once argument parsing has proceeded past this point. */
356+ int quoted;
357+
358+ /* An arbitrary pointer passed in from the user. */
359+ void *input;
360+ /* Values to pass to child parsers. This vector will be the same length as
361+ the number of children for the current parser. */
362+ void **child_inputs;
363+
364+ /* For the parser's use. Initialized to 0. */
365+ void *hook;
366+
367+ /* The name used when printing messages. This is initialized to ARGV[0],
368+ or PROGRAM_INVOCATION_NAME if that is unavailable. */
369+ char *name;
370+
371+ /* Streams used when argp prints something. */
372+ FILE *err_stream; /* For errors; initialized to stderr. */
373+ FILE *out_stream; /* For information; initialized to stdout. */
374+
375+ void *pstate; /* Private, for use by argp. */
376+};
377+
378+/* Flags for argp_parse (note that the defaults are those that are
379+ convenient for program command line parsing): */
380+
381+/* Don't ignore the first element of ARGV. Normally (and always unless
382+ ARGP_NO_ERRS is set) the first element of the argument vector is
383+ skipped for option parsing purposes, as it corresponds to the program name
384+ in a command line. */
385+#define ARGP_PARSE_ARGV0 0x01
386+
387+/* Don't print error messages for unknown options to stderr; unless this flag
388+ is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
389+ name in the error messages. This flag implies ARGP_NO_EXIT (on the
390+ assumption that silent exiting upon errors is bad behaviour). */
391+#define ARGP_NO_ERRS 0x02
392+
393+/* Don't parse any non-option args. Normally non-option args are parsed by
394+ calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
395+ as the value. Since it's impossible to know which parse function wants to
396+ handle it, each one is called in turn, until one returns 0 or an error
397+ other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
398+ argp_parse returns prematurely (but with a return value of 0). If all
399+ args have been parsed without error, all parsing functions are called one
400+ last time with a key of ARGP_KEY_END. This flag needn't normally be set,
401+ as the normal behavior is to stop parsing as soon as some argument can't
402+ be handled. */
403+#define ARGP_NO_ARGS 0x04
404+
405+/* Parse options and arguments in the same order they occur on the command
406+ line -- normally they're rearranged so that all options come first. */
407+#define ARGP_IN_ORDER 0x08
408+
409+/* Don't provide the standard long option --help, which causes usage and
410+ option help information to be output to stdout, and exit (0) called. */
411+#define ARGP_NO_HELP 0x10
412+
413+/* Don't exit on errors (they may still result in error messages). */
414+#define ARGP_NO_EXIT 0x20
415+
416+/* Use the gnu getopt `long-only' rules for parsing arguments. */
417+#define ARGP_LONG_ONLY 0x40
418+
419+/* Turns off any message-printing/exiting options. */
420+#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
421+
422+/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
423+ FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
424+ index in ARGV of the first unparsed option is returned in it. If an
425+ unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
426+ routine returned a non-zero value, it is returned; otherwise 0 is
427+ returned. This function may also call exit unless the ARGP_NO_HELP flag
428+ is set. INPUT is a pointer to a value to be passed in to the parser. */
429+extern error_t argp_parse (__const struct argp *__restrict __argp,
430+ int __argc, char **__restrict __argv,
431+ unsigned __flags, int *__restrict __arg_index,
432+ void *__restrict __input);
433+
434+/* Global variables. */
435+
436+/* If defined or set by the user program to a non-zero value, then a default
437+ option --version is added (unless the ARGP_NO_HELP flag is used), which
438+ will print this string followed by a newline and exit (unless the
439+ ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
440+extern __const char *argp_program_version;
441+
442+/* If defined or set by the user program to a non-zero value, then a default
443+ option --version is added (unless the ARGP_NO_HELP flag is used), which
444+ calls this function with a stream to print the version to and a pointer to
445+ the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
446+ used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
447+extern void (*argp_program_version_hook) (FILE *__restrict __stream,
448+ struct argp_state *__restrict
449+ __state);
450+
451+/* If defined or set by the user program, it should point to string that is
452+ the bug-reporting address for the program. It will be printed by
453+ argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
454+ standard help messages), embedded in a sentence that says something like
455+ `Report bugs to ADDR.'. */
456+extern __const char *argp_program_bug_address;
457+
458+/* The exit status that argp will use when exiting due to a parsing error.
459+ If not defined or set by the user program, this defaults to EX_USAGE from
460+ <sysexits.h>. */
461+extern error_t argp_err_exit_status;
462+
463+/* Flags for argp_help. */
464+#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
465+#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
466+#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
467+#define ARGP_HELP_LONG 0x08 /* a long help message. */
468+#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
469+#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
470+#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
471+#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
472+#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
473+ reflect ARGP_LONG_ONLY mode. */
474+
475+/* These ARGP_HELP flags are only understood by argp_state_help. */
476+#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
477+#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
478+
479+/* The standard thing to do after a program command line parsing error, if an
480+ error message has already been printed. */
481+#define ARGP_HELP_STD_ERR \
482+ (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
483+/* The standard thing to do after a program command line parsing error, if no
484+ more specific error message has been printed. */
485+#define ARGP_HELP_STD_USAGE \
486+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
487+/* The standard thing to do in response to a --help option. */
488+#define ARGP_HELP_STD_HELP \
489+ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
490+ | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
491+
492+/* Output a usage message for ARGP to STREAM. FLAGS are from the set
493+ ARGP_HELP_*. */
494+extern void argp_help (__const struct argp *__restrict __argp,
495+ FILE *__restrict __stream,
496+ unsigned __flags, char *__restrict __name);
497+
498+/* The following routines are intended to be called from within an argp
499+ parsing routine (thus taking an argp_state structure as the first
500+ argument). They may or may not print an error message and exit, depending
501+ on the flags in STATE -- in any case, the caller should be prepared for
502+ them *not* to exit, and should return an appropiate error after calling
503+ them. [argp_usage & argp_error should probably be called argp_state_...,
504+ but they're used often enough that they should be short] */
505+
506+/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
507+ from the set ARGP_HELP_*. */
508+extern void argp_state_help (__const struct argp_state *__restrict __state,
509+ FILE *__restrict __stream,
510+ unsigned int __flags);
511+/* Possibly output the standard usage message for ARGP to stderr and exit. */
512+extern void argp_usage (__const struct argp_state *__state);
513+
514+/* If appropriate, print the printf string FMT and following args, preceded
515+ by the program name and `:', to stderr, and followed by a `Try ... --help'
516+ message, then exit (1). */
517+extern void argp_error (__const struct argp_state *__restrict __state,
518+ __const char *__restrict __fmt, ...)
519+ __attribute__ ((__format__ (__printf__, 2, 3)));
520+/* Similar to the standard gnu error-reporting function error(), but will
521+ respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
522+ to STATE->err_stream. This is useful for argument parsing code that is
523+ shared between program startup (when exiting is desired) and runtime
524+ option parsing (when typically an error code is returned instead). The
525+ difference between this function and argp_error is that the latter is for
526+ *parsing errors*, and the former is for other problems that occur during
527+ parsing but don't reflect a (syntactic) problem with the input. */
528+extern void argp_failure (__const struct argp_state *__restrict __state,
529+ int __status, int __errnum,
530+ __const char *__restrict __fmt, ...)
531+ __attribute__ ((__format__ (__printf__, 4, 5)));
532+/* Returns true if the option OPT is a valid short option. */
533+extern int _option_is_short (__const struct argp_option *__opt) __THROW;
534+extern int __option_is_short (__const struct argp_option *__opt) __THROW;
535+
536+/* Returns true if the option OPT is in fact the last (unused) entry in an
537+ options array. */
538+extern int _option_is_end (__const struct argp_option *__opt) __THROW;
539+extern int __option_is_end (__const struct argp_option *__opt) __THROW;
540+
541+/* Return the input field for ARGP in the parser corresponding to STATE; used
542+ by the help routines. */
543+/* We think this should not be exported */
544+extern void *__argp_input (__const struct argp *__restrict __argp,
545+ __const struct argp_state *__restrict __state)
546+ __THROW;
547+
548+#ifdef __USE_EXTERN_INLINES
549+
550+# ifndef ARGP_EI
551+# define ARGP_EI __extern_inline
552+# endif
553+
554+ARGP_EI void
555+argp_usage (__const struct argp_state *__state)
556+{
557+ argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
558+}
559+
560+ARGP_EI int
561+__NTH (__option_is_short (__const struct argp_option *__opt))
562+{
563+ if (__opt->flags & OPTION_DOC)
564+ return 0;
565+ else
566+ {
567+ int __key = __opt->key;
568+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
569+ }
570+}
571+
572+ARGP_EI int
573+__NTH (__option_is_end (__const struct argp_option *__opt))
574+{
575+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
576+}
577+#endif /* Use extern inlines. */
578+
579+#ifdef __cplusplus
580+}
581+#endif
582+
583+#endif /* argp.h */
diff --git a/meta/recipes-core/uclibc/uclibc-git/argp-support.patch b/meta/recipes-core/uclibc/uclibc-git/argp-support.patch
new file mode 100644
index 0000000000..bcec6a593a
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/argp-support.patch
@@ -0,0 +1,5192 @@
1From: Salvatore Cro <salvatore.cro at st.com>
2
3Argp is an advanced support for parsing unix-style argument vectors.
4In addition to the common getopt interface, it provides automatic response
5to `--help' and `--version' options and use of custom parser in conjunction
6with argp native option parser, among others.
7Argp support is required by elfutils package and prelink.
8
9In uClibc argp functionalities has been moved from C library to libuargp.so
10Further the libc.so linker script contains an AS_NEEDED entry so that
11it doesn't need to link libuargp.so explicitely.
12
13Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
14Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono at st.com>
15Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
16
17Upstream-Status: Pending
18
19---
20 Makefile.in | 8 +
21 Makerules | 8 +-
22 Rules.mak | 7 +
23 extra/Configs/Config.in | 17 +
24 libc/sysdeps/linux/common/bits/getopt_int.h | 136 ++
25 libc/unistd/getopt.c | 18 +-
26 libc/unistd/getopt_int.h | 134 --
27 libuargp/Makefile | 14 +
28 libuargp/Makefile.in | 76 ++
29 libuargp/argp-ba.c | 26 +
30 libuargp/argp-eexst.c | 32 +
31 libuargp/argp-fmtstream.c | 439 +++++++
32 libuargp/argp-fmtstream.h | 314 +++++
33 libuargp/argp-fs-xinl.c | 44 +
34 libuargp/argp-help.c | 1882 +++++++++++++++++++++++++++
35 libuargp/argp-parse.c | 949 ++++++++++++++
36 libuargp/argp-pv.c | 25 +
37 libuargp/argp-pvh.c | 32 +
38 libuargp/argp-xinl.c | 35 +
39 test/argp/Makefile | 7 +
40 test/argp/Makefile.in | 12 +
41 test/argp/argp-ex1.c | 15 +
42 test/argp/argp-ex2.c | 45 +
43 test/argp/argp-ex3.c | 153 +++
44 test/argp/argp-ex4.c | 167 +++
45 test/argp/argp-test.c | 209 +++
46 test/argp/bug-argp1.c | 26 +
47 test/argp/tst-argp1.c | 118 ++
48 test/argp/tst-argp2.c | 101 ++
49 29 files changed, 4911 insertions(+), 138 deletions(-)
50 create mode 100644 libc/sysdeps/linux/common/bits/getopt_int.h
51 delete mode 100644 libc/unistd/getopt_int.h
52 create mode 100644 libuargp/Makefile
53 create mode 100644 libuargp/Makefile.in
54 create mode 100644 libuargp/argp-ba.c
55 create mode 100644 libuargp/argp-eexst.c
56 create mode 100644 libuargp/argp-fmtstream.c
57 create mode 100644 libuargp/argp-fmtstream.h
58 create mode 100644 libuargp/argp-fs-xinl.c
59 create mode 100644 libuargp/argp-help.c
60 create mode 100644 libuargp/argp-parse.c
61 create mode 100644 libuargp/argp-pv.c
62 create mode 100644 libuargp/argp-pvh.c
63 create mode 100644 libuargp/argp-xinl.c
64 create mode 100644 test/argp/Makefile
65 create mode 100644 test/argp/Makefile.in
66 create mode 100644 test/argp/argp-ex1.c
67 create mode 100644 test/argp/argp-ex2.c
68 create mode 100644 test/argp/argp-ex3.c
69 create mode 100644 test/argp/argp-ex4.c
70 create mode 100644 test/argp/argp-test.c
71 create mode 100644 test/argp/bug-argp1.c
72 create mode 100644 test/argp/tst-argp1.c
73 create mode 100644 test/argp/tst-argp2.c
74
75Index: git/Makefile.in
76===================================================================
77--- git.orig/Makefile.in 2012-06-18 13:10:12.000000000 -0700
78+++ git/Makefile.in 2012-06-18 13:12:06.448829343 -0700
79@@ -48,6 +48,7 @@
80 include $(top_srcdir)libutil/Makefile.in
81 include $(top_srcdir)libpthread/Makefile.in
82 include $(top_srcdir)librt/Makefile.in
83+include $(top_srcdir)libuargp/Makefile.in
84 include $(top_srcdir)libubacktrace/Makefile.in
85 include $(top_srcdir)extra/locale/Makefile.in
86
87@@ -250,6 +251,7 @@
88 endif
89 HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h
90 HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT) += thread_db.h
91+HEADERS_RM-$(UCLIBC_HAS_ARGP) += argp.h
92 HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h
93 HEADERS_RM-$(UCLIBC_HAS_CRYPT) += crypt.h
94 HEADERS_RM-$(UCLIBC_HAS_EPOLL) += sys/epoll.h
95@@ -368,6 +370,12 @@
96 -$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
97 endif
98 echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
99+ifeq ($(UCLIBC_HAS_ARGP),y)
100+# Add the AS_NEEDED entry for libuargp.so
101+ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
102+ echo "GROUP ( $(UARGP_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
103+ fi
104+endif
105 ifeq ($(UCLIBC_HAS_THREADS),y)
106 ifneq ($(LINUXTHREADS_OLD),y)
107 ifeq ($(HARDWIRED_ABSPATH),y)
108Index: git/Makerules
109===================================================================
110--- git.orig/Makerules 2012-06-18 13:10:12.000000000 -0700
111+++ git/Makerules 2012-06-18 13:10:44.052825547 -0700
112@@ -32,12 +32,12 @@
113 $(libpthread-so-y) $(libpthread-nonshared-y) $(libthread_db-so-y) \
114 $(libresolv-so-y) $(librt-so-y) \
115 $(ldso-y) \
116- $(libutil-so-y) $(libubacktrace-so-y)
117+ $(libutil-so-y) $(libubacktrace-so-y) $(libuargp-so-y)
118
119 ar_objs = $(libc-y) $(libc-static-y) $(libcrypt-a-y) \
120 $(libdl-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y) \
121 $(libpthread-a-y) $(libthread_db-a-y) \
122- $(libresolv-a-y) $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y)
123+ $(libresolv-a-y) $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y) $(libuargp-a-y)
124 ifeq ($(DOPIC),y)
125 ar_objs := $(ar_objs:.o=.os)
126 endif
127@@ -472,7 +472,7 @@
128 $(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y) \
129 $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
130 $(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \
131- $(libubacktrace-a-y) $(libubacktrace-so-y)
132+ $(libubacktrace-a-y) $(libubacktrace-so-y) $(libuargp-so-y) $(libuargp-a-y)
133 .depends.dep := \
134 $(patsubst %.s,%.s.dep,$(filter %.s,$(files.dep))) \
135 $(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
136Index: git/Rules.mak
137===================================================================
138--- git.orig/Rules.mak 2012-06-18 13:10:12.000000000 -0700
139+++ git/Rules.mak 2012-06-18 13:10:44.056825544 -0700
140@@ -589,6 +589,13 @@
141 else
142 export UBACKTRACE_ASNEEDED:=""
143 endif
144+ifeq ($(UCLIBC_HAS_ARGP),y)
145+# Only used in installed libc.so linker script
146+UARGP_FULL_NAME := $(RUNTIME_PREFIX)lib/libuargp.so.$(MAJOR_VERSION)
147+export UARGP_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UARGP_FULL_NAME) )" || echo "$(UARGP_FULL_NAME)")
148+else
149+export UARGP_ASNEEDED:=""
150+endif
151 endif
152
153 # Add a bunch of extra pedantic annoyingly strict checks
154Index: git/extra/Configs/Config.in
155===================================================================
156--- git.orig/extra/Configs/Config.in 2012-06-18 13:10:12.000000000 -0700
157+++ git/extra/Configs/Config.in 2012-06-18 13:10:44.056825544 -0700
158@@ -1853,6 +1853,23 @@
159 smaller SUSv3 compatible getsubopt().
160
161 Most people will answer Y.
162+
163+config UCLIBC_HAS_ARGP
164+ bool "Support argp (as standalone shared object)"
165+ default n
166+ help
167+ Argp is an interface for parsing unix-style argument vectors. Unlike
168+ the common getopt interface, it provides many advanced features in
169+ addition to parsing options, such as automatic output in response to
170+ `--help' and `--version' options.
171+ A library can export an argp option parser, which programs can easily
172+ use in conjunction with their own option parser.
173+ A new shared object "libuargp" is created. The "libc.so" linker script
174+ contains the AS_NEEDED entry for getting the libuargp linked automatically.
175+ Argp support is needed by elfutils libdw.
176+
177+ Most people can safely answer N.
178+
179 endmenu
180
181
182Index: git/libc/sysdeps/linux/common/bits/getopt_int.h
183===================================================================
184--- /dev/null 1970-01-01 00:00:00.000000000 +0000
185+++ git/libc/sysdeps/linux/common/bits/getopt_int.h 2012-06-18 13:10:44.056825544 -0700
186@@ -0,0 +1,136 @@
187+/* Internal declarations for getopt.
188+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004
189+ Free Software Foundation, Inc.
190+ This file is part of the GNU C Library.
191+
192+ The GNU C Library is free software; you can redistribute it and/or
193+ modify it under the terms of the GNU Lesser General Public
194+ License as published by the Free Software Foundation; either
195+ version 2.1 of the License, or (at your option) any later version.
196+
197+ The GNU C Library is distributed in the hope that it will be useful,
198+ but WITHOUT ANY WARRANTY; without even the implied warranty of
199+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
200+ Lesser General Public License for more details.
201+
202+ You should have received a copy of the GNU Lesser General Public
203+ License along with the GNU C Library; if not, write to the Free
204+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
205+ 02111-1307 USA. */
206+
207+#ifndef _GETOPT_INT_H
208+#define _GETOPT_INT_H 1
209+
210+extern int _getopt_internal (int ___argc, char *const *___argv,
211+ const char *__shortopts,
212+ const struct option *__longopts, int *__longind,
213+ int __long_only) attribute_hidden;
214+
215+
216+/* Reentrant versions which can handle parsing multiple argument
217+ vectors at the same time. */
218+
219+/* For __ordering member */
220+enum {
221+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
222+};
223+
224+/* Data type for reentrant functions. */
225+
226+struct _getopt_data
227+{
228+ /* These have exactly the same meaning as the corresponding global
229+ variables, except that they are used for the reentrant
230+ versions of getopt. */
231+ int optind;
232+ int opterr;
233+ char *optarg;
234+ smalluint optopt; /* we store characters here, a byte is enough */
235+
236+ /* Internal members. */
237+
238+ /* True if the internal members have been initialized. */
239+ smallint __initialized;
240+
241+ /* Describe how to deal with options that follow non-option ARGV-elements.
242+
243+ If the caller did not specify anything,
244+ the default is REQUIRE_ORDER if the environment variable
245+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
246+
247+ REQUIRE_ORDER means don't recognize them as options;
248+ stop option processing when the first non-option is seen.
249+ This is what Unix does.
250+ This mode of operation is selected by either setting the environment
251+ variable POSIXLY_CORRECT, or using `+' as the first character
252+ of the list of option characters.
253+
254+ PERMUTE is the default. We permute the contents of ARGV as we
255+ scan, so that eventually all the non-options are at the end.
256+ This allows options to be given in any order, even with programs
257+ that were not written to expect this.
258+
259+ RETURN_IN_ORDER is an option available to programs that were
260+ written to expect options and other ARGV-elements in any order
261+ and that care about the ordering of the two. We describe each
262+ non-option ARGV-element as if it were the argument of an option
263+ with character code 1. Using `-' as the first character of the
264+ list of option characters selects this mode of operation.
265+
266+ The special argument `--' forces an end of option-scanning regardless
267+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
268+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
269+ smallint __ordering;
270+
271+ /* If the POSIXLY_CORRECT environment variable is set. */
272+ smallint __posixly_correct;
273+
274+ /* The next char to be scanned in the option-element
275+ in which the last option character we returned was found.
276+ This allows us to pick up the scan where we left off.
277+
278+ If this is zero, or a null string, it means resume the scan
279+ by advancing to the next ARGV-element. */
280+ char *__nextchar;
281+
282+
283+ /* Handle permutation of arguments. */
284+
285+ /* Describe the part of ARGV that contains non-options that have
286+ been skipped. `first_nonopt' is the index in ARGV of the first
287+ of them; `last_nonopt' is the index after the last of them. */
288+
289+ int __first_nonopt;
290+ int __last_nonopt;
291+
292+#if defined _LIBC && defined USE_NONOPTION_FLAGS
293+ int __nonoption_flags_max_len;
294+ int __nonoption_flags_len;
295+# endif
296+};
297+
298+/* The initializer is necessary to set OPTIND and OPTERR to their
299+ default values and to clear the initialization flag. */
300+#define _GETOPT_DATA_INITIALIZER { 1, 1 }
301+
302+#if 0 /* first is static on uClibc, the others not used */
303+extern int _getopt_internal_r (int ___argc, char *const *___argv,
304+ const char *__shortopts,
305+ const struct option *__longopts, int *__longind,
306+ int __long_only, struct _getopt_data *__data);
307+#endif
308+#if defined __UCLIBC_HAS_GNU_GETOPT__ || defined __UCLIBC_HAS_GETOPT_LONG__
309+#ifndef __need_getopt
310+extern int _getopt_long_r (int ___argc, char *const *___argv,
311+ const char *__shortopts,
312+ const struct option *__longopts, int *__longind,
313+ struct _getopt_data *__data);
314+
315+extern int _getopt_long_only_r (int ___argc, char *const *___argv,
316+ const char *__shortopts,
317+ const struct option *__longopts,
318+ int *__longind,
319+ struct _getopt_data *__data);
320+#endif
321+#endif
322+#endif /* getopt_int.h */
323Index: git/libc/unistd/getopt.c
324===================================================================
325--- git.orig/libc/unistd/getopt.c 2012-06-18 13:10:12.000000000 -0700
326+++ git/libc/unistd/getopt.c 2012-06-18 13:10:44.056825544 -0700
327@@ -106,7 +106,7 @@
328 they can distinguish the relative order of options and other arguments. */
329
330 #include <getopt.h>
331-#include "getopt_int.h"
332+#include <bits/getopt_int.h>
333
334
335 /* For communication from `getopt' to the caller.
336@@ -1170,6 +1170,15 @@
337 return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
338 }
339
340+int
341+_getopt_long_r (int argc, char *const *argv, const char *options,
342+ const struct option *long_options, int *opt_index,
343+ struct _getopt_data *d)
344+{
345+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
346+ 0, d);
347+}
348+
349 /* Like getopt_long, but '-' as well as '--' can indicate a long option.
350 If an option that starts with '-' (not '--') doesn't match a long option,
351 but does match a short option, it is parsed as a short option
352@@ -1182,4 +1191,12 @@
353 return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
354 }
355
356+int
357+_getopt_long_only_r (int argc, char *const *argv, const char *options,
358+ const struct option *long_options, int *opt_index,
359+ struct _getopt_data *d)
360+{
361+ return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d);
362+}
363+
364 #endif /* Not ELIDE_CODE. */
365Index: git/libuargp/Makefile
366===================================================================
367--- /dev/null 1970-01-01 00:00:00.000000000 +0000
368+++ git/libuargp/Makefile 2012-06-18 13:10:44.056825544 -0700
369@@ -0,0 +1,14 @@
370+# Makefile for uClibc (libuargp)
371+#
372+# Copyright (C) 2010 STMicroelectronics Ltd
373+# Author(s): Filippo Arcidiacono <filippo.arcidiacono at st.com>
374+#
375+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
376+#
377+
378+top_srcdir=../
379+top_builddir=../
380+include $(top_builddir)Rules.mak
381+all: libs
382+include Makefile.in
383+include $(top_srcdir)Makerules
384Index: git/libuargp/Makefile.in
385===================================================================
386--- /dev/null 1970-01-01 00:00:00.000000000 +0000
387+++ git/libuargp/Makefile.in 2012-06-18 13:10:44.056825544 -0700
388@@ -0,0 +1,73 @@
389+# Makefile for uClibc (libuargp)
390+#
391+# Copyright (C) 2009, 2010 STMicroelectronics Ltd.
392+# Author(s): Salvatore Cro <salvatore.cro at st.com>
393+# - First implementation, embedded into libc
394+# Filippo Arcidiacono <filippo.arcidiacono at st.com>
395+# - Reworked for stand-alone libuargp implementation
396+
397+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
398+#
399+
400+CFLAGS-libuargp := -DNOT_IN_libc -DIS_IN_libuargp $(SSP_ALL_CFLAGS)
401+
402+LDFLAGS-libuargp.so := $(LDFLAGS)
403+
404+LIBS-libuargp.so := $(LIBS)
405+
406+libuargp_FULL_NAME := libuargp-$(VERSION).so
407+
408+libuargp_DIR := $(top_srcdir)libuargp
409+libuargp_OUT := $(top_builddir)libuargp
410+
411+libuargp_SRC-y :=
412+libuargp_SRC-$(UCLIBC_HAS_ARGP) := $(addsuffix .c,$(addprefix argp-, ba \
413+ eexst fmtstream fs-xinl help parse pv pvh xinl))
414+
415+CFLAGS-argp-xinl.c = -fgnu89-inline
416+
417+libuargp_SRC := $(addprefix $(libuargp_DIR)/,$(libuargp_SRC-y))
418+libuargp_OBJ := $(patsubst $(libuargp_DIR)/%.c,$(libuargp_OUT)/%.o,$(libuargp_SRC))
419+
420+libuargp_SRCS := $(libuargp_SRC)
421+libuargp_OBJS := $(libuargp_OBJ)
422+
423+ifeq ($(DOPIC),y)
424+libuargp-a-y := $(libuargp_OBJS:.o=.os)
425+else
426+libuargp-a-y := $(libuargp_OBJS)
427+endif
428+libuargp-so-y := $(libuargp_OBJS:.o=.os)
429+
430+lib-a-$(UCLIBC_HAS_ARGP) += $(top_builddir)lib/libuargp.a
431+lib-so-$(UCLIBC_HAS_ARGP) += $(top_builddir)lib/libuargp.so
432+
433+objclean-y += CLEAN_libuargp
434+
435+ifeq ($(DOMULTI),n)
436+ifeq ($(DOPIC),y)
437+$(top_builddir)lib/libuargp.so: $(top_builddir)lib/libuargp.a $(libc.depend)
438+else
439+$(top_builddir)lib/libuargp.so: $(libuargp_OUT)/libuargp_so.a $(libc.depend)
440+endif
441+ $(call link.so,$(libuargp_FULL_NAME),$(MAJOR_VERSION))
442+else
443+$(top_builddir)lib/libuargp.so: $(libuargp_OUT)/libuargp.oS $(libc.depend)
444+ $(call linkm.so,$(libuargp_FULL_NAME),$(MAJOR_VERSION))
445+endif
446+
447+$(libuargp_OUT)/libuargp_so.a: $(libuargp-so-y)
448+ $(Q)$(RM) $@
449+ $(do_ar)
450+
451+$(libuargp_OUT)/libuargp.oS: $(libuargp_SRCS)
452+ $(Q)$(RM) $@
453+ $(compile-m)
454+
455+$(top_builddir)lib/libuargp.a: $(libuargp-a-y)
456+ $(Q)$(INSTALL) -d $(dir $@)
457+ $(Q)$(RM) $@
458+ $(do_ar)
459+
460+CLEAN_libuargp:
461+ $(do_rm) $(addprefix $(libuargp_OUT)/*., o os oS a)
462Index: git/libuargp/argp-ba.c
463===================================================================
464--- /dev/null 1970-01-01 00:00:00.000000000 +0000
465+++ git/libuargp/argp-ba.c 2012-06-18 13:10:44.056825544 -0700
466@@ -0,0 +1,26 @@
467+/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
468+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
469+ This file is part of the GNU C Library.
470+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
471+
472+ The GNU C Library is free software; you can redistribute it and/or
473+ modify it under the terms of the GNU Lesser General Public
474+ License as published by the Free Software Foundation; either
475+ version 2.1 of the License, or (at your option) any later version.
476+
477+ The GNU C Library is distributed in the hope that it will be useful,
478+ but WITHOUT ANY WARRANTY; without even the implied warranty of
479+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
480+ Lesser General Public License for more details.
481+
482+ You should have received a copy of the GNU Lesser General Public
483+ License along with the GNU C Library; if not, write to the Free
484+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
485+ 02111-1307 USA. */
486+
487+/* If set by the user program, it should point to string that is the
488+ bug-reporting address for the program. It will be printed by argp_help if
489+ the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
490+ messages), embedded in a sentence that says something like `Report bugs to
491+ ADDR.'. */
492+const char *argp_program_bug_address;
493Index: git/libuargp/argp-eexst.c
494===================================================================
495--- /dev/null 1970-01-01 00:00:00.000000000 +0000
496+++ git/libuargp/argp-eexst.c 2012-06-18 13:10:44.056825544 -0700
497@@ -0,0 +1,32 @@
498+/* Default definition for ARGP_ERR_EXIT_STATUS
499+ Copyright (C) 1997 Free Software Foundation, Inc.
500+ This file is part of the GNU C Library.
501+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
502+
503+ The GNU C Library is free software; you can redistribute it and/or
504+ modify it under the terms of the GNU Lesser General Public
505+ License as published by the Free Software Foundation; either
506+ version 2.1 of the License, or (at your option) any later version.
507+
508+ The GNU C Library is distributed in the hope that it will be useful,
509+ but WITHOUT ANY WARRANTY; without even the implied warranty of
510+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
511+ Lesser General Public License for more details.
512+
513+ You should have received a copy of the GNU Lesser General Public
514+ License along with the GNU C Library; if not, write to the Free
515+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
516+ 02111-1307 USA. */
517+
518+#ifdef HAVE_CONFIG_H
519+# include <config.h>
520+#endif
521+
522+#include <sysexits.h>
523+
524+#include <argp.h>
525+
526+/* The exit status that argp will use when exiting due to a parsing error.
527+ If not defined or set by the user program, this defaults to EX_USAGE from
528+ <sysexits.h>. */
529+error_t argp_err_exit_status = EX_USAGE;
530Index: git/libuargp/argp-fmtstream.c
531===================================================================
532--- /dev/null 1970-01-01 00:00:00.000000000 +0000
533+++ git/libuargp/argp-fmtstream.c 2012-06-18 13:10:44.056825544 -0700
534@@ -0,0 +1,439 @@
535+/* Word-wrapping and line-truncating streams
536+ Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
537+ This file is part of the GNU C Library.
538+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
539+
540+ The GNU C Library is free software; you can redistribute it and/or
541+ modify it under the terms of the GNU Lesser General Public
542+ License as published by the Free Software Foundation; either
543+ version 2.1 of the License, or (at your option) any later version.
544+
545+ The GNU C Library is distributed in the hope that it will be useful,
546+ but WITHOUT ANY WARRANTY; without even the implied warranty of
547+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
548+ Lesser General Public License for more details.
549+
550+ You should have received a copy of the GNU Lesser General Public
551+ License along with the GNU C Library; if not, write to the Free
552+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
553+ 02111-1307 USA.
554+
555+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
556+*/
557+
558+/* This package emulates glibc `line_wrap_stream' semantics for systems that
559+ don't have that. */
560+
561+#ifdef HAVE_CONFIG_H
562+# include <config.h>
563+#endif
564+
565+#include <stdlib.h>
566+#include <string.h>
567+#include <errno.h>
568+#include <stdarg.h>
569+#include <ctype.h>
570+
571+#include "argp-fmtstream.h"
572+
573+#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
574+
575+#ifndef isblank
576+#define isblank(ch) ((ch)==' ' || (ch)=='\t')
577+#endif
578+
579+#if defined _LIBC && defined USE_IN_LIBIO
580+# include <wchar.h>
581+# include <libio/libioP.h>
582+# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
583+#else
584+# define __vsnprintf(s, l, f, a) vsnprintf (s, l, f, a)
585+#endif
586+
587+#define INIT_BUF_SIZE 200
588+#define PRINTF_SIZE_GUESS 150
589+
590+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
591+ written on it with LMARGIN spaces and limits them to RMARGIN columns
592+ total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
593+ replacing the whitespace before them with a newline and WMARGIN spaces.
594+ Otherwise, chars beyond RMARGIN are simply dropped until a newline.
595+ Returns NULL if there was an error. */
596+argp_fmtstream_t
597+__argp_make_fmtstream (FILE *stream,
598+ size_t lmargin, size_t rmargin, ssize_t wmargin)
599+{
600+ argp_fmtstream_t fs;
601+
602+ fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));
603+ if (fs != NULL)
604+ {
605+ fs->stream = stream;
606+
607+ fs->lmargin = lmargin;
608+ fs->rmargin = rmargin;
609+ fs->wmargin = wmargin;
610+ fs->point_col = 0;
611+ fs->point_offs = 0;
612+
613+ fs->buf = (char *) malloc (INIT_BUF_SIZE);
614+ if (! fs->buf)
615+ {
616+ free (fs);
617+ fs = 0;
618+ }
619+ else
620+ {
621+ fs->p = fs->buf;
622+ fs->end = fs->buf + INIT_BUF_SIZE;
623+ }
624+ }
625+
626+ return fs;
627+}
628+#if 0
629+/* Not exported. */
630+#ifdef weak_alias
631+weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
632+#endif
633+#endif
634+
635+/* Flush FS to its stream, and free it (but don't close the stream). */
636+void
637+__argp_fmtstream_free (argp_fmtstream_t fs)
638+{
639+ __argp_fmtstream_update (fs);
640+ if (fs->p > fs->buf)
641+ {
642+#ifdef USE_IN_LIBIO
643+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
644+#else
645+ fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
646+#endif
647+ }
648+ free (fs->buf);
649+ free (fs);
650+}
651+#if 0
652+/* Not exported. */
653+#ifdef weak_alias
654+weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
655+#endif
656+#endif
657+
658+/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
659+ end of its buffer. This code is mostly from glibc stdio/linewrap.c. */
660+void
661+__argp_fmtstream_update (argp_fmtstream_t fs)
662+{
663+ char *buf, *nl;
664+ size_t len;
665+
666+ /* Scan the buffer for newlines. */
667+ buf = fs->buf + fs->point_offs;
668+ while (buf < fs->p)
669+ {
670+ size_t r;
671+
672+ if (fs->point_col == 0 && fs->lmargin != 0)
673+ {
674+ /* We are starting a new line. Print spaces to the left margin. */
675+ const size_t pad = fs->lmargin;
676+ if (fs->p + pad < fs->end)
677+ {
678+ /* We can fit in them in the buffer by moving the
679+ buffer text up and filling in the beginning. */
680+ memmove (buf + pad, buf, fs->p - buf);
681+ fs->p += pad; /* Compensate for bigger buffer. */
682+ memset (buf, ' ', pad); /* Fill in the spaces. */
683+ buf += pad; /* Don't bother searching them. */
684+ }
685+ else
686+ {
687+ /* No buffer space for spaces. Must flush. */
688+ size_t i;
689+ for (i = 0; i < pad; i++)
690+ {
691+#ifdef USE_IN_LIBIO
692+ if (_IO_fwide (fs->stream, 0) > 0)
693+ putwc_unlocked (L' ', fs->stream);
694+ else
695+#endif
696+ putc_unlocked (' ', fs->stream);
697+ }
698+ }
699+ fs->point_col = pad;
700+ }
701+
702+ len = fs->p - buf;
703+ nl = memchr (buf, '\n', len);
704+
705+ if (fs->point_col < 0)
706+ fs->point_col = 0;
707+
708+ if (!nl)
709+ {
710+ /* The buffer ends in a partial line. */
711+
712+ if (fs->point_col + len < fs->rmargin)
713+ {
714+ /* The remaining buffer text is a partial line and fits
715+ within the maximum line width. Advance point for the
716+ characters to be written and stop scanning. */
717+ fs->point_col += len;
718+ break;
719+ }
720+ else
721+ /* Set the end-of-line pointer for the code below to
722+ the end of the buffer. */
723+ nl = fs->p;
724+ }
725+ else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
726+ {
727+ /* The buffer contains a full line that fits within the maximum
728+ line width. Reset point and scan the next line. */
729+ fs->point_col = 0;
730+ buf = nl + 1;
731+ continue;
732+ }
733+
734+ /* This line is too long. */
735+ r = fs->rmargin - 1;
736+
737+ if (fs->wmargin < 0)
738+ {
739+ /* Truncate the line by overwriting the excess with the
740+ newline and anything after it in the buffer. */
741+ if (nl < fs->p)
742+ {
743+ memmove (buf + (r - fs->point_col), nl, fs->p - nl);
744+ fs->p -= buf + (r - fs->point_col) - nl;
745+ /* Reset point for the next line and start scanning it. */
746+ fs->point_col = 0;
747+ buf += r + 1; /* Skip full line plus \n. */
748+ }
749+ else
750+ {
751+ /* The buffer ends with a partial line that is beyond the
752+ maximum line width. Advance point for the characters
753+ written, and discard those past the max from the buffer. */
754+ fs->point_col += len;
755+ fs->p -= fs->point_col - r;
756+ break;
757+ }
758+ }
759+ else
760+ {
761+ /* Do word wrap. Go to the column just past the maximum line
762+ width and scan back for the beginning of the word there.
763+ Then insert a line break. */
764+
765+ char *p, *nextline;
766+ int i;
767+
768+ p = buf + (r + 1 - fs->point_col);
769+ while (p >= buf && !isblank (*p))
770+ --p;
771+ nextline = p + 1; /* This will begin the next line. */
772+
773+ if (nextline > buf)
774+ {
775+ /* Swallow separating blanks. */
776+ if (p >= buf)
777+ do
778+ --p;
779+ while (p >= buf && isblank (*p));
780+ nl = p + 1; /* The newline will replace the first blank. */
781+ }
782+ else
783+ {
784+ /* A single word that is greater than the maximum line width.
785+ Oh well. Put it on an overlong line by itself. */
786+ p = buf + (r + 1 - fs->point_col);
787+ /* Find the end of the long word. */
788+ do
789+ ++p;
790+ while (p < nl && !isblank (*p));
791+ if (p == nl)
792+ {
793+ /* It already ends a line. No fussing required. */
794+ fs->point_col = 0;
795+ buf = nl + 1;
796+ continue;
797+ }
798+ /* We will move the newline to replace the first blank. */
799+ nl = p;
800+ /* Swallow separating blanks. */
801+ do
802+ ++p;
803+ while (isblank (*p));
804+ /* The next line will start here. */
805+ nextline = p;
806+ }
807+
808+ /* Note: There are a bunch of tests below for
809+ NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall
810+ at the end of the buffer, and NEXTLINE is in fact empty (and so
811+ we need not be careful to maintain its contents). */
812+
813+ if ((nextline == buf + len + 1
814+ ? fs->end - nl < fs->wmargin + 1
815+ : nextline - (nl + 1) < fs->wmargin)
816+ && fs->p > nextline)
817+ {
818+ /* The margin needs more blanks than we removed. */
819+ if (fs->end - fs->p > fs->wmargin + 1)
820+ /* Make some space for them. */
821+ {
822+ size_t mv = fs->p - nextline;
823+ memmove (nl + 1 + fs->wmargin, nextline, mv);
824+ nextline = nl + 1 + fs->wmargin;
825+ len = nextline + mv - buf;
826+ *nl++ = '\n';
827+ }
828+ else
829+ /* Output the first line so we can use the space. */
830+ {
831+#if defined _LIBC && defined USE_IN_LIBIO
832+ __fxprintf (fs->stream, "%.*s\n",
833+ (int) (nl - fs->buf), fs->buf);
834+#else
835+ if (nl > fs->buf)
836+ fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
837+ putc_unlocked ('\n', fs->stream);
838+#endif
839+
840+ len += buf - fs->buf;
841+ nl = buf = fs->buf;
842+ }
843+ }
844+ else
845+ /* We can fit the newline and blanks in before
846+ the next word. */
847+ *nl++ = '\n';
848+
849+ if (nextline - nl >= fs->wmargin
850+ || (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin))
851+ /* Add blanks up to the wrap margin column. */
852+ for (i = 0; i < fs->wmargin; ++i)
853+ *nl++ = ' ';
854+ else
855+ for (i = 0; i < fs->wmargin; ++i)
856+#ifdef USE_IN_LIBIO
857+ if (_IO_fwide (fs->stream, 0) > 0)
858+ putwc_unlocked (L' ', fs->stream);
859+ else
860+#endif
861+ putc_unlocked (' ', fs->stream);
862+
863+ /* Copy the tail of the original buffer into the current buffer
864+ position. */
865+ if (nl < nextline)
866+ memmove (nl, nextline, buf + len - nextline);
867+ len -= nextline - buf;
868+
869+ /* Continue the scan on the remaining lines in the buffer. */
870+ buf = nl;
871+
872+ /* Restore bufp to include all the remaining text. */
873+ fs->p = nl + len;
874+
875+ /* Reset the counter of what has been output this line. If wmargin
876+ is 0, we want to avoid the lmargin getting added, so we set
877+ point_col to a magic value of -1 in that case. */
878+ fs->point_col = fs->wmargin ? fs->wmargin : -1;
879+ }
880+ }
881+
882+ /* Remember that we've scanned as far as the end of the buffer. */
883+ fs->point_offs = fs->p - fs->buf;
884+}
885+
886+/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
887+ growing the buffer, or by flushing it. True is returned iff we succeed. */
888+int
889+__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
890+{
891+ if ((size_t) (fs->end - fs->p) < amount)
892+ {
893+ ssize_t wrote;
894+
895+ /* Flush FS's buffer. */
896+ __argp_fmtstream_update (fs);
897+
898+#if defined _LIBC && defined USE_IN_LIBIO
899+ __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
900+ wrote = fs->p - fs->buf;
901+#else
902+ wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
903+#endif
904+ if (wrote == fs->p - fs->buf)
905+ {
906+ fs->p = fs->buf;
907+ fs->point_offs = 0;
908+ }
909+ else
910+ {
911+ fs->p -= wrote;
912+ fs->point_offs -= wrote;
913+ memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
914+ return 0;
915+ }
916+
917+ if ((size_t) (fs->end - fs->buf) < amount)
918+ /* Gotta grow the buffer. */
919+ {
920+ size_t old_size = fs->end - fs->buf;
921+ size_t new_size = old_size + amount;
922+ char *new_buf;
923+
924+ if (new_size < old_size || ! (new_buf = realloc (fs->buf, new_size)))
925+ {
926+ __set_errno (ENOMEM);
927+ return 0;
928+ }
929+
930+ fs->buf = new_buf;
931+ fs->end = new_buf + new_size;
932+ fs->p = fs->buf;
933+ }
934+ }
935+
936+ return 1;
937+}
938+
939+ssize_t
940+__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
941+{
942+ int out;
943+ size_t avail;
944+ size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
945+
946+ do
947+ {
948+ va_list args;
949+
950+ if (! __argp_fmtstream_ensure (fs, size_guess))
951+ return -1;
952+
953+ va_start (args, fmt);
954+ avail = fs->end - fs->p;
955+ out = __vsnprintf (fs->p, avail, fmt, args);
956+ va_end (args);
957+ if ((size_t) out >= avail)
958+ size_guess = out + 1;
959+ }
960+ while ((size_t) out >= avail);
961+
962+ fs->p += out;
963+
964+ return out;
965+}
966+#if 0
967+/* Not exported. */
968+#ifdef weak_alias
969+weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
970+#endif
971+#endif
972+
973+#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
974Index: git/libuargp/argp-fmtstream.h
975===================================================================
976--- /dev/null 1970-01-01 00:00:00.000000000 +0000
977+++ git/libuargp/argp-fmtstream.h 2012-06-18 13:10:44.056825544 -0700
978@@ -0,0 +1,314 @@
979+/* Word-wrapping and line-truncating streams.
980+ Copyright (C) 1997 Free Software Foundation, Inc.
981+ This file is part of the GNU C Library.
982+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
983+
984+ The GNU C Library is free software; you can redistribute it and/or
985+ modify it under the terms of the GNU Lesser General Public
986+ License as published by the Free Software Foundation; either
987+ version 2.1 of the License, or (at your option) any later version.
988+
989+ The GNU C Library is distributed in the hope that it will be useful,
990+ but WITHOUT ANY WARRANTY; without even the implied warranty of
991+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
992+ Lesser General Public License for more details.
993+
994+ You should have received a copy of the GNU Lesser General Public
995+ License along with the GNU C Library; if not, write to the Free
996+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
997+ 02111-1307 USA.
998+
999+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
1000+*/
1001+
1002+/* This package emulates glibc `line_wrap_stream' semantics for systems that
1003+ don't have that. If the system does have it, it is just a wrapper for
1004+ that. This header file is only used internally while compiling argp, and
1005+ shouldn't be installed. */
1006+
1007+#ifndef _ARGP_FMTSTREAM_H
1008+#define _ARGP_FMTSTREAM_H
1009+
1010+#include <stdio.h>
1011+#include <string.h>
1012+#include <unistd.h>
1013+
1014+#ifndef __attribute__
1015+/* This feature is available in gcc versions 2.5 and later. */
1016+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__)
1017+# define __attribute__(Spec) /* empty */
1018+# endif
1019+/* The __-protected variants of `format' and `printf' attributes
1020+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
1021+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__)
1022+# define __format__ format
1023+# define __printf__ printf
1024+# endif
1025+#endif
1026+
1027+#if 0 /* uClibc: disabled */
1028+#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
1029+ || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
1030+/* line_wrap_stream is available, so use that. */
1031+#define ARGP_FMTSTREAM_USE_LINEWRAP
1032+#endif
1033+#else
1034+/* line_wrap stream NOT available */
1035+# undef ARGP_FMTSTREAM_USE_LINEWRAP
1036+#endif
1037+
1038+#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
1039+/* Just be a simple wrapper for line_wrap_stream; the semantics are
1040+ *slightly* different, as line_wrap_stream doesn't actually make a new
1041+ object, it just modifies the given stream (reversibly) to do
1042+ line-wrapping. Since we control who uses this code, it doesn't matter. */
1043+
1044+#include <linewrap.h>
1045+
1046+typedef FILE *argp_fmtstream_t;
1047+
1048+#define argp_make_fmtstream line_wrap_stream
1049+#define __argp_make_fmtstream line_wrap_stream
1050+#define argp_fmtstream_free line_unwrap_stream
1051+#define __argp_fmtstream_free line_unwrap_stream
1052+
1053+#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
1054+#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
1055+#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
1056+#define argp_fmtstream_puts(fs,str) fputs(str,fs)
1057+#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
1058+#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
1059+#define __argp_fmtstream_printf fprintf
1060+#define argp_fmtstream_printf fprintf
1061+
1062+#define __argp_fmtstream_lmargin line_wrap_lmargin
1063+#define argp_fmtstream_lmargin line_wrap_lmargin
1064+#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
1065+#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
1066+#define __argp_fmtstream_rmargin line_wrap_rmargin
1067+#define argp_fmtstream_rmargin line_wrap_rmargin
1068+#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
1069+#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
1070+#define __argp_fmtstream_wmargin line_wrap_wmargin
1071+#define argp_fmtstream_wmargin line_wrap_wmargin
1072+#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
1073+#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
1074+#define __argp_fmtstream_point line_wrap_point
1075+#define argp_fmtstream_point line_wrap_point
1076+
1077+#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
1078+/* Guess we have to define our own version. */
1079+
1080+#ifndef __const
1081+#define __const const
1082+#endif
1083+
1084+struct argp_fmtstream
1085+{
1086+ FILE *stream; /* The stream we're outputting to. */
1087+
1088+ size_t lmargin, rmargin; /* Left and right margins. */
1089+ ssize_t wmargin; /* Margin to wrap to, or -1 to truncate. */
1090+
1091+ /* Point in buffer to which we've processed for wrapping, but not output. */
1092+ size_t point_offs;
1093+ /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin. */
1094+ ssize_t point_col;
1095+
1096+ char *buf; /* Output buffer. */
1097+ char *p; /* Current end of text in BUF. */
1098+ char *end; /* Absolute end of BUF. */
1099+};
1100+
1101+typedef struct argp_fmtstream *argp_fmtstream_t;
1102+
1103+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
1104+ written on it with LMARGIN spaces and limits them to RMARGIN columns
1105+ total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
1106+ replacing the whitespace before them with a newline and WMARGIN spaces.
1107+ Otherwise, chars beyond RMARGIN are simply dropped until a newline.
1108+ Returns NULL if there was an error. */
1109+extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
1110+ size_t __lmargin,
1111+ size_t __rmargin,
1112+ ssize_t __wmargin);
1113+extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
1114+ size_t __lmargin,
1115+ size_t __rmargin,
1116+ ssize_t __wmargin);
1117+
1118+/* Flush __FS to its stream, and free it (but don't close the stream). */
1119+extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
1120+extern void argp_fmtstream_free (argp_fmtstream_t __fs);
1121+
1122+extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
1123+ __const char *__fmt, ...)
1124+ __attribute__ ((__format__ (printf, 2, 3)));
1125+extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
1126+ __const char *__fmt, ...)
1127+ __attribute__ ((__format__ (printf, 2, 3)));
1128+
1129+extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
1130+extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
1131+
1132+extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
1133+extern int argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
1134+
1135+extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
1136+ __const char *__str, size_t __len);
1137+extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
1138+ __const char *__str, size_t __len);
1139+
1140+/* Access macros for various bits of state. */
1141+#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
1142+#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
1143+#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
1144+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
1145+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
1146+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
1147+
1148+/* Set __FS's left margin to LMARGIN and return the old value. */
1149+extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
1150+ size_t __lmargin);
1151+extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
1152+ size_t __lmargin);
1153+
1154+/* Set __FS's right margin to __RMARGIN and return the old value. */
1155+extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
1156+ size_t __rmargin);
1157+extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
1158+ size_t __rmargin);
1159+
1160+/* Set __FS's wrap margin to __WMARGIN and return the old value. */
1161+extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
1162+ size_t __wmargin);
1163+extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
1164+ size_t __wmargin);
1165+
1166+/* Return the column number of the current output point in __FS. */
1167+extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
1168+extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
1169+
1170+/* Internal routines. */
1171+extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
1172+extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
1173+extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
1174+extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
1175+
1176+#ifdef __OPTIMIZE__
1177+/* Inline versions of above routines. */
1178+
1179+#if !_LIBC
1180+#define __argp_fmtstream_putc argp_fmtstream_putc
1181+#define __argp_fmtstream_puts argp_fmtstream_puts
1182+#define __argp_fmtstream_write argp_fmtstream_write
1183+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
1184+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
1185+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
1186+#define __argp_fmtstream_point argp_fmtstream_point
1187+#define __argp_fmtstream_update _argp_fmtstream_update
1188+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
1189+#endif
1190+
1191+#ifndef ARGP_FS_EI
1192+#define ARGP_FS_EI __extern_inline
1193+#endif
1194+
1195+ARGP_FS_EI size_t
1196+__argp_fmtstream_write (argp_fmtstream_t __fs,
1197+ __const char *__str, size_t __len)
1198+{
1199+ if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
1200+ {
1201+ memcpy (__fs->p, __str, __len);
1202+ __fs->p += __len;
1203+ return __len;
1204+ }
1205+ else
1206+ return 0;
1207+}
1208+
1209+ARGP_FS_EI int
1210+__argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str)
1211+{
1212+ size_t __len = strlen (__str);
1213+ if (__len)
1214+ {
1215+ size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
1216+ return __wrote == __len ? 0 : -1;
1217+ }
1218+ else
1219+ return 0;
1220+}
1221+
1222+ARGP_FS_EI int
1223+__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
1224+{
1225+ if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
1226+ return *__fs->p++ = __ch;
1227+ else
1228+ return EOF;
1229+}
1230+
1231+/* Set __FS's left margin to __LMARGIN and return the old value. */
1232+ARGP_FS_EI size_t
1233+__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
1234+{
1235+ size_t __old;
1236+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
1237+ __argp_fmtstream_update (__fs);
1238+ __old = __fs->lmargin;
1239+ __fs->lmargin = __lmargin;
1240+ return __old;
1241+}
1242+
1243+/* Set __FS's right margin to __RMARGIN and return the old value. */
1244+ARGP_FS_EI size_t
1245+__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
1246+{
1247+ size_t __old;
1248+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
1249+ __argp_fmtstream_update (__fs);
1250+ __old = __fs->rmargin;
1251+ __fs->rmargin = __rmargin;
1252+ return __old;
1253+}
1254+
1255+/* Set FS's wrap margin to __WMARGIN and return the old value. */
1256+ARGP_FS_EI size_t
1257+__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
1258+{
1259+ size_t __old;
1260+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
1261+ __argp_fmtstream_update (__fs);
1262+ __old = __fs->wmargin;
1263+ __fs->wmargin = __wmargin;
1264+ return __old;
1265+}
1266+
1267+/* Return the column number of the current output point in __FS. */
1268+ARGP_FS_EI size_t
1269+__argp_fmtstream_point (argp_fmtstream_t __fs)
1270+{
1271+ if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
1272+ __argp_fmtstream_update (__fs);
1273+ return __fs->point_col >= 0 ? __fs->point_col : 0;
1274+}
1275+
1276+#if !_LIBC
1277+#undef __argp_fmtstream_putc
1278+#undef __argp_fmtstream_puts
1279+#undef __argp_fmtstream_write
1280+#undef __argp_fmtstream_set_lmargin
1281+#undef __argp_fmtstream_set_rmargin
1282+#undef __argp_fmtstream_set_wmargin
1283+#undef __argp_fmtstream_point
1284+#undef __argp_fmtstream_update
1285+#undef __argp_fmtstream_ensure
1286+#endif
1287+
1288+#endif /* __OPTIMIZE__ */
1289+
1290+#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
1291+
1292+#endif /* argp-fmtstream.h */
1293Index: git/libuargp/argp-fs-xinl.c
1294===================================================================
1295--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1296+++ git/libuargp/argp-fs-xinl.c 2012-06-18 13:10:44.056825544 -0700
1297@@ -0,0 +1,44 @@
1298+/* Real definitions for extern inline functions in argp-fmtstream.h
1299+ Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
1300+ This file is part of the GNU C Library.
1301+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
1302+
1303+ The GNU C Library is free software; you can redistribute it and/or
1304+ modify it under the terms of the GNU Lesser General Public
1305+ License as published by the Free Software Foundation; either
1306+ version 2.1 of the License, or (at your option) any later version.
1307+
1308+ The GNU C Library is distributed in the hope that it will be useful,
1309+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1310+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1311+ Lesser General Public License for more details.
1312+
1313+ You should have received a copy of the GNU Lesser General Public
1314+ License along with the GNU C Library; if not, write to the Free
1315+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1316+ 02111-1307 USA. */
1317+
1318+#ifdef HAVE_CONFIG_H
1319+# include <config.h>
1320+#endif
1321+
1322+#define ARGP_FS_EI
1323+#undef __OPTIMIZE__
1324+#define __OPTIMIZE__ 1
1325+#include "argp-fmtstream.h"
1326+
1327+#if 0
1328+/* Not exported. */
1329+/* Add weak aliases. */
1330+#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
1331+
1332+weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
1333+weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
1334+weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
1335+weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
1336+weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
1337+weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
1338+weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
1339+
1340+#endif
1341+#endif
1342Index: git/libuargp/argp-help.c
1343===================================================================
1344--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1345+++ git/libuargp/argp-help.c 2012-06-18 13:10:44.060825542 -0700
1346@@ -0,0 +1,1882 @@
1347+/* Hierarchial argument parsing help output
1348+ Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
1349+ Free Software Foundation, Inc.
1350+ This file is part of the GNU C Library.
1351+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
1352+
1353+ The GNU C Library is free software; you can redistribute it and/or
1354+ modify it under the terms of the GNU Lesser General Public
1355+ License as published by the Free Software Foundation; either
1356+ version 2.1 of the License, or (at your option) any later version.
1357+
1358+ The GNU C Library is distributed in the hope that it will be useful,
1359+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1360+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1361+ Lesser General Public License for more details.
1362+
1363+ You should have received a copy of the GNU Lesser General Public
1364+ License along with the GNU C Library; if not, write to the Free
1365+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1366+ 02111-1307 USA.
1367+
1368+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
1369+*/
1370+
1371+#ifndef _GNU_SOURCE
1372+# define _GNU_SOURCE 1
1373+#endif
1374+
1375+#ifdef HAVE_CONFIG_H
1376+#include <config.h>
1377+#endif
1378+
1379+/* AIX requires this to be the first thing in the file. */
1380+#ifndef __GNUC__
1381+# if HAVE_ALLOCA_H || defined _LIBC
1382+# include <alloca.h>
1383+# else
1384+# ifdef _AIX
1385+#pragma alloca
1386+# else
1387+# ifndef alloca /* predefined by HP cc +Olibcalls */
1388+char *alloca ();
1389+# endif
1390+# endif
1391+# endif
1392+#endif
1393+
1394+#include <stddef.h>
1395+#include <stdlib.h>
1396+#include <string.h>
1397+#include <assert.h>
1398+#include <stdarg.h>
1399+#include <ctype.h>
1400+#include <limits.h>
1401+#ifdef _LIBC
1402+# include <wchar.h>
1403+#endif
1404+
1405+#include <features.h>
1406+#ifndef _
1407+/* This is for other GNU distributions with internationalized messages. */
1408+# if (defined HAVE_LIBINTL_H || defined _LIBC) && defined __UCLIBC_HAS_GETTEXT_AWARENESS__
1409+# include <libintl.h>
1410+# ifdef _LIBC
1411+# undef dgettext
1412+# define dgettext(domain, msgid) \
1413+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
1414+# endif
1415+# else
1416+# define dgettext(domain, msgid) (msgid)
1417+# endif
1418+#endif
1419+
1420+#ifndef _LIBC
1421+# if HAVE_STRERROR_R
1422+# if !HAVE_DECL_STRERROR_R
1423+char *strerror_r (int errnum, char *buf, size_t buflen);
1424+# endif
1425+# else
1426+# if !HAVE_DECL_STRERROR
1427+char *strerror (int errnum);
1428+# endif
1429+# endif
1430+#endif
1431+
1432+#include <argp.h>
1433+#include "argp-fmtstream.h"
1434+#include <stdbool.h>
1435+#include <stdint.h>
1436+
1437+#ifndef SIZE_MAX
1438+# define SIZE_MAX ((size_t) -1)
1439+#endif
1440+
1441+/* User-selectable (using an environment variable) formatting parameters.
1442+
1443+ These may be specified in an environment variable called `ARGP_HELP_FMT',
1444+ with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
1445+ Where VALn must be a positive integer. The list of variables is in the
1446+ UPARAM_NAMES vector, below. */
1447+
1448+/* Default parameters. */
1449+#define DUP_ARGS 0 /* True if option argument can be duplicated. */
1450+#define DUP_ARGS_NOTE 1 /* True to print a note about duplicate args. */
1451+#define SHORT_OPT_COL 2 /* column in which short options start */
1452+#define LONG_OPT_COL 6 /* column in which long options start */
1453+#define DOC_OPT_COL 2 /* column in which doc options start */
1454+#define OPT_DOC_COL 29 /* column in which option text starts */
1455+#define HEADER_COL 1 /* column in which group headers are printed */
1456+#define USAGE_INDENT 12 /* indentation of wrapped usage lines */
1457+#define RMARGIN 79 /* right margin used for wrapping */
1458+
1459+/* User-selectable (using an environment variable) formatting parameters.
1460+ They must all be of type `int' for the parsing code to work. */
1461+struct uparams
1462+{
1463+ /* If true, arguments for an option are shown with both short and long
1464+ options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
1465+ If false, then if an option has both, the argument is only shown with
1466+ the long one, e.g., `-x, --longx=ARG', and a message indicating that
1467+ this really means both is printed below the options. */
1468+ int dup_args;
1469+
1470+ /* This is true if when DUP_ARGS is false, and some duplicate arguments have
1471+ been suppressed, an explanatory message should be printed. */
1472+ int dup_args_note;
1473+
1474+ /* Various output columns. */
1475+ int short_opt_col;
1476+ int long_opt_col;
1477+ int doc_opt_col;
1478+ int opt_doc_col;
1479+ int header_col;
1480+ int usage_indent;
1481+ int rmargin;
1482+};
1483+
1484+/* This is a global variable, as user options are only ever read once. */
1485+static struct uparams uparams = {
1486+ DUP_ARGS, DUP_ARGS_NOTE,
1487+ SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
1488+ USAGE_INDENT, RMARGIN
1489+};
1490+
1491+/* A particular uparam, and what the user name is. */
1492+struct uparam_name
1493+{
1494+ const char name[14]; /* User name. */
1495+ bool is_bool; /* Whether it's `boolean'. */
1496+ uint8_t uparams_offs; /* Location of the (int) field in UPARAMS. */
1497+};
1498+
1499+/* The name-field mappings we know about. */
1500+static const struct uparam_name uparam_names[] =
1501+{
1502+ { "dup-args", true, offsetof (struct uparams, dup_args) },
1503+ { "dup-args-note", true, offsetof (struct uparams, dup_args_note) },
1504+ { "short-opt-col", false, offsetof (struct uparams, short_opt_col) },
1505+ { "long-opt-col", false, offsetof (struct uparams, long_opt_col) },
1506+ { "doc-opt-col", false, offsetof (struct uparams, doc_opt_col) },
1507+ { "opt-doc-col", false, offsetof (struct uparams, opt_doc_col) },
1508+ { "header-col", false, offsetof (struct uparams, header_col) },
1509+ { "usage-indent", false, offsetof (struct uparams, usage_indent) },
1510+ { "rmargin", false, offsetof (struct uparams, rmargin) }
1511+};
1512+#define nuparam_names (sizeof (uparam_names) / sizeof (uparam_names[0]))
1513+
1514+/* Read user options from the environment, and fill in UPARAMS appropiately. */
1515+static void
1516+fill_in_uparams (const struct argp_state *state)
1517+{
1518+ const char *var = getenv ("ARGP_HELP_FMT");
1519+
1520+#define SKIPWS(p) do { while (isspace (*p)) p++; } while (0);
1521+
1522+ if (var)
1523+ /* Parse var. */
1524+ while (*var)
1525+ {
1526+ SKIPWS (var);
1527+
1528+ if (isalpha (*var))
1529+ {
1530+ size_t var_len;
1531+ const struct uparam_name *un;
1532+ int unspec = 0, val = 0;
1533+ const char *arg = var;
1534+
1535+ while (isalnum (*arg) || *arg == '-' || *arg == '_')
1536+ arg++;
1537+ var_len = arg - var;
1538+
1539+ SKIPWS (arg);
1540+
1541+ if (*arg == '\0' || *arg == ',')
1542+ unspec = 1;
1543+ else if (*arg == '=')
1544+ {
1545+ arg++;
1546+ SKIPWS (arg);
1547+ }
1548+
1549+ if (unspec)
1550+ {
1551+ if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
1552+ {
1553+ val = 0;
1554+ var += 3;
1555+ var_len -= 3;
1556+ }
1557+ else
1558+ val = 1;
1559+ }
1560+ else if (isdigit (*arg))
1561+ {
1562+ val = atoi (arg);
1563+ while (isdigit (*arg))
1564+ arg++;
1565+ SKIPWS (arg);
1566+ }
1567+
1568+ un = uparam_names;
1569+ size_t u;
1570+ for (u = 0; u < nuparam_names; ++un, ++u)
1571+ if (strlen (un->name) == var_len
1572+ && strncmp (var, un->name, var_len) == 0)
1573+ {
1574+ if (unspec && !un->is_bool)
1575+ argp_failure (state, 0, 0,
1576+ dgettext (state == NULL ? NULL
1577+ : state->root_argp->argp_domain,
1578+ "\
1579+%.*s: ARGP_HELP_FMT parameter requires a value"),
1580+ (int) var_len, var);
1581+ else
1582+ *(int *)((char *)&uparams + un->uparams_offs) = val;
1583+ break;
1584+ }
1585+ if (u == nuparam_names)
1586+ argp_failure (state, 0, 0,
1587+ dgettext (state == NULL ? NULL
1588+ : state->root_argp->argp_domain, "\
1589+%.*s: Unknown ARGP_HELP_FMT parameter"),
1590+ (int) var_len, var);
1591+
1592+ var = arg;
1593+ if (*var == ',')
1594+ var++;
1595+ }
1596+ else if (*var)
1597+ {
1598+ argp_failure (state, 0, 0,
1599+ dgettext (state == NULL ? NULL
1600+ : state->root_argp->argp_domain,
1601+ "Garbage in ARGP_HELP_FMT: %s"), var);
1602+ break;
1603+ }
1604+ }
1605+}
1606+
1607+/* Returns true if OPT hasn't been marked invisible. Visibility only affects
1608+ whether OPT is displayed or used in sorting, not option shadowing. */
1609+#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
1610+
1611+/* Returns true if OPT is an alias for an earlier option. */
1612+#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
1613+
1614+/* Returns true if OPT is an documentation-only entry. */
1615+#define odoc(opt) ((opt)->flags & OPTION_DOC)
1616+
1617+/* Returns true if OPT is the end-of-list marker for a list of options. */
1618+#define oend(opt) __option_is_end (opt)
1619+
1620+/* Returns true if OPT has a short option. */
1621+#define oshort(opt) __option_is_short (opt)
1622+
1623+/*
1624+ The help format for a particular option is like:
1625+
1626+ -xARG, -yARG, --long1=ARG, --long2=ARG Documentation...
1627+
1628+ Where ARG will be omitted if there's no argument, for this option, or
1629+ will be surrounded by "[" and "]" appropiately if the argument is
1630+ optional. The documentation string is word-wrapped appropiately, and if
1631+ the list of options is long enough, it will be started on a separate line.
1632+ If there are no short options for a given option, the first long option is
1633+ indented slighly in a way that's supposed to make most long options appear
1634+ to be in a separate column.
1635+
1636+ For example, the following output (from ps):
1637+
1638+ -p PID, --pid=PID List the process PID
1639+ --pgrp=PGRP List processes in the process group PGRP
1640+ -P, -x, --no-parent Include processes without parents
1641+ -Q, --all-fields Don't elide unusable fields (normally if there's
1642+ some reason ps can't print a field for any
1643+ process, it's removed from the output entirely)
1644+ -r, --reverse, --gratuitously-long-reverse-option
1645+ Reverse the order of any sort
1646+ --session[=SID] Add the processes from the session SID (which
1647+ defaults to the sid of the current process)
1648+
1649+ Here are some more options:
1650+ -f ZOT, --foonly=ZOT Glork a foonly
1651+ -z, --zaza Snit a zar
1652+
1653+ -?, --help Give this help list
1654+ --usage Give a short usage message
1655+ -V, --version Print program version
1656+
1657+ The struct argp_option array for the above could look like:
1658+
1659+ {
1660+ {"pid", 'p', "PID", 0, "List the process PID"},
1661+ {"pgrp", OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
1662+ {"no-parent", 'P', 0, 0, "Include processes without parents"},
1663+ {0, 'x', 0, OPTION_ALIAS},
1664+ {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
1665+ " if there's some reason ps can't"
1666+ " print a field for any process, it's"
1667+ " removed from the output entirely)" },
1668+ {"reverse", 'r', 0, 0, "Reverse the order of any sort"},
1669+ {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
1670+ {"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
1671+ "Add the processes from the session"
1672+ " SID (which defaults to the sid of"
1673+ " the current process)" },
1674+
1675+ {0,0,0,0, "Here are some more options:"},
1676+ {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
1677+ {"zaza", 'z', 0, 0, "Snit a zar"},
1678+
1679+ {0}
1680+ }
1681+
1682+ Note that the last three options are automatically supplied by argp_parse,
1683+ unless you tell it not to with ARGP_NO_HELP.
1684+
1685+*/
1686+
1687+/* Returns true if CH occurs between BEG and END. */
1688+static int
1689+find_char (char ch, char *beg, char *end)
1690+{
1691+ while (beg < end)
1692+ if (*beg == ch)
1693+ return 1;
1694+ else
1695+ beg++;
1696+ return 0;
1697+}
1698+
1699+struct hol_cluster; /* fwd decl */
1700+
1701+struct hol_entry
1702+{
1703+ /* First option. */
1704+ const struct argp_option *opt;
1705+ /* Number of options (including aliases). */
1706+ unsigned num;
1707+
1708+ /* A pointers into the HOL's short_options field, to the first short option
1709+ letter for this entry. The order of the characters following this point
1710+ corresponds to the order of options pointed to by OPT, and there are at
1711+ most NUM. A short option recorded in a option following OPT is only
1712+ valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
1713+ probably been shadowed by some other entry). */
1714+ char *short_options;
1715+
1716+ /* Entries are sorted by their group first, in the order:
1717+ 1, 2, ..., n, 0, -m, ..., -2, -1
1718+ and then alphabetically within each group. The default is 0. */
1719+ int group;
1720+
1721+ /* The cluster of options this entry belongs to, or 0 if none. */
1722+ struct hol_cluster *cluster;
1723+
1724+ /* The argp from which this option came. */
1725+ const struct argp *argp;
1726+};
1727+
1728+/* A cluster of entries to reflect the argp tree structure. */
1729+struct hol_cluster
1730+{
1731+ /* A descriptive header printed before options in this cluster. */
1732+ const char *header;
1733+
1734+ /* Used to order clusters within the same group with the same parent,
1735+ according to the order in which they occurred in the parent argp's child
1736+ list. */
1737+ int index;
1738+
1739+ /* How to sort this cluster with respect to options and other clusters at the
1740+ same depth (clusters always follow options in the same group). */
1741+ int group;
1742+
1743+ /* The cluster to which this cluster belongs, or 0 if it's at the base
1744+ level. */
1745+ struct hol_cluster *parent;
1746+
1747+ /* The argp from which this cluster is (eventually) derived. */
1748+ const struct argp *argp;
1749+
1750+ /* The distance this cluster is from the root. */
1751+ int depth;
1752+
1753+ /* Clusters in a given hol are kept in a linked list, to make freeing them
1754+ possible. */
1755+ struct hol_cluster *next;
1756+};
1757+
1758+/* A list of options for help. */
1759+struct hol
1760+{
1761+ /* An array of hol_entry's. */
1762+ struct hol_entry *entries;
1763+ /* The number of entries in this hol. If this field is zero, the others
1764+ are undefined. */
1765+ unsigned num_entries;
1766+
1767+ /* A string containing all short options in this HOL. Each entry contains
1768+ pointers into this string, so the order can't be messed with blindly. */
1769+ char *short_options;
1770+
1771+ /* Clusters of entries in this hol. */
1772+ struct hol_cluster *clusters;
1773+};
1774+
1775+/* Create a struct hol from the options in ARGP. CLUSTER is the
1776+ hol_cluster in which these entries occur, or 0, if at the root. */
1777+static struct hol *
1778+make_hol (const struct argp *argp, struct hol_cluster *cluster)
1779+{
1780+ char *so;
1781+ const struct argp_option *o;
1782+ const struct argp_option *opts = argp->options;
1783+ struct hol_entry *entry;
1784+ unsigned num_short_options = 0;
1785+ struct hol *hol = malloc (sizeof (struct hol));
1786+
1787+ assert (hol);
1788+
1789+ hol->num_entries = 0;
1790+ hol->clusters = 0;
1791+
1792+ if (opts)
1793+ {
1794+ int cur_group = 0;
1795+
1796+ /* The first option must not be an alias. */
1797+ assert (! oalias (opts));
1798+
1799+ /* Calculate the space needed. */
1800+ for (o = opts; ! oend (o); o++)
1801+ {
1802+ if (! oalias (o))
1803+ hol->num_entries++;
1804+ if (oshort (o))
1805+ num_short_options++; /* This is an upper bound. */
1806+ }
1807+
1808+ hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
1809+ hol->short_options = malloc (num_short_options + 1);
1810+
1811+ assert (hol->entries && hol->short_options);
1812+#if SIZE_MAX <= UINT_MAX
1813+ assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
1814+#endif
1815+
1816+ /* Fill in the entries. */
1817+ so = hol->short_options;
1818+ for (o = opts, entry = hol->entries; ! oend (o); entry++)
1819+ {
1820+ entry->opt = o;
1821+ entry->num = 0;
1822+ entry->short_options = so;
1823+ entry->group = cur_group =
1824+ o->group
1825+ ? o->group
1826+ : ((!o->name && !o->key)
1827+ ? cur_group + 1
1828+ : cur_group);
1829+ entry->cluster = cluster;
1830+ entry->argp = argp;
1831+
1832+ do
1833+ {
1834+ entry->num++;
1835+ if (oshort (o) && ! find_char (o->key, hol->short_options, so))
1836+ /* O has a valid short option which hasn't already been used.*/
1837+ *so++ = o->key;
1838+ o++;
1839+ }
1840+ while (! oend (o) && oalias (o));
1841+ }
1842+ *so = '\0'; /* null terminated so we can find the length */
1843+ }
1844+
1845+ return hol;
1846+}
1847+
1848+/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
1849+ associated argp child list entry), INDEX, and PARENT, and return a pointer
1850+ to it. ARGP is the argp that this cluster results from. */
1851+static struct hol_cluster *
1852+hol_add_cluster (struct hol *hol, int group, const char *header, int index,
1853+ struct hol_cluster *parent, const struct argp *argp)
1854+{
1855+ struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
1856+ if (cl)
1857+ {
1858+ cl->group = group;
1859+ cl->header = header;
1860+
1861+ cl->index = index;
1862+ cl->parent = parent;
1863+ cl->argp = argp;
1864+ cl->depth = parent ? parent->depth + 1 : 0;
1865+
1866+ cl->next = hol->clusters;
1867+ hol->clusters = cl;
1868+ }
1869+ return cl;
1870+}
1871+
1872+/* Free HOL and any resources it uses. */
1873+static void
1874+hol_free (struct hol *hol)
1875+{
1876+ struct hol_cluster *cl = hol->clusters;
1877+
1878+ while (cl)
1879+ {
1880+ struct hol_cluster *next = cl->next;
1881+ free (cl);
1882+ cl = next;
1883+ }
1884+
1885+ if (hol->num_entries > 0)
1886+ {
1887+ free (hol->entries);
1888+ free (hol->short_options);
1889+ }
1890+
1891+ free (hol);
1892+}
1893+
1894+static int
1895+hol_entry_short_iterate (const struct hol_entry *entry,
1896+ int (*func)(const struct argp_option *opt,
1897+ const struct argp_option *real,
1898+ const char *domain, void *cookie),
1899+ const char *domain, void *cookie)
1900+{
1901+ unsigned nopts;
1902+ int val = 0;
1903+ const struct argp_option *opt, *real = entry->opt;
1904+ char *so = entry->short_options;
1905+
1906+ for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
1907+ if (oshort (opt) && *so == opt->key)
1908+ {
1909+ if (!oalias (opt))
1910+ real = opt;
1911+ if (ovisible (opt))
1912+ val = (*func)(opt, real, domain, cookie);
1913+ so++;
1914+ }
1915+
1916+ return val;
1917+}
1918+
1919+static __inline__ int
1920+__attribute__ ((always_inline))
1921+hol_entry_long_iterate (const struct hol_entry *entry,
1922+ int (*func)(const struct argp_option *opt,
1923+ const struct argp_option *real,
1924+ const char *domain, void *cookie),
1925+ const char *domain, void *cookie)
1926+{
1927+ unsigned nopts;
1928+ int val = 0;
1929+ const struct argp_option *opt, *real = entry->opt;
1930+
1931+ for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
1932+ if (opt->name)
1933+ {
1934+ if (!oalias (opt))
1935+ real = opt;
1936+ if (ovisible (opt))
1937+ val = (*func)(opt, real, domain, cookie);
1938+ }
1939+
1940+ return val;
1941+}
1942+
1943+/* Iterator that returns true for the first short option. */
1944+static __inline__ int
1945+until_short (const struct argp_option *opt, const struct argp_option *real,
1946+ const char *domain, void *cookie)
1947+{
1948+ return oshort (opt) ? opt->key : 0;
1949+}
1950+
1951+/* Returns the first valid short option in ENTRY, or 0 if there is none. */
1952+static char
1953+hol_entry_first_short (const struct hol_entry *entry)
1954+{
1955+ return hol_entry_short_iterate (entry, until_short,
1956+ entry->argp->argp_domain, 0);
1957+}
1958+
1959+/* Returns the first valid long option in ENTRY, or 0 if there is none. */
1960+static const char *
1961+hol_entry_first_long (const struct hol_entry *entry)
1962+{
1963+ const struct argp_option *opt;
1964+ unsigned num;
1965+ for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
1966+ if (opt->name && ovisible (opt))
1967+ return opt->name;
1968+ return 0;
1969+}
1970+
1971+/* Returns the entry in HOL with the long option name NAME, or 0 if there is
1972+ none. */
1973+static struct hol_entry *
1974+hol_find_entry (struct hol *hol, const char *name)
1975+{
1976+ struct hol_entry *entry = hol->entries;
1977+ unsigned num_entries = hol->num_entries;
1978+
1979+ while (num_entries-- > 0)
1980+ {
1981+ const struct argp_option *opt = entry->opt;
1982+ unsigned num_opts = entry->num;
1983+
1984+ while (num_opts-- > 0)
1985+ if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
1986+ return entry;
1987+ else
1988+ opt++;
1989+
1990+ entry++;
1991+ }
1992+
1993+ return 0;
1994+}
1995+
1996+/* If an entry with the long option NAME occurs in HOL, set it's special
1997+ sort position to GROUP. */
1998+static void
1999+hol_set_group (struct hol *hol, const char *name, int group)
2000+{
2001+ struct hol_entry *entry = hol_find_entry (hol, name);
2002+ if (entry)
2003+ entry->group = group;
2004+}
2005+
2006+/* Order by group: 0, 1, 2, ..., n, -m, ..., -2, -1.
2007+ EQ is what to return if GROUP1 and GROUP2 are the same. */
2008+static int
2009+group_cmp (int group1, int group2, int eq)
2010+{
2011+ if (group1 == group2)
2012+ return eq;
2013+ else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
2014+ return group1 - group2;
2015+ else
2016+ return group2 - group1;
2017+}
2018+
2019+/* Compare clusters CL1 & CL2 by the order that they should appear in
2020+ output. */
2021+static int
2022+hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
2023+{
2024+ /* If one cluster is deeper than the other, use its ancestor at the same
2025+ level, so that finding the common ancestor is straightforward. */
2026+ while (cl1->depth > cl2->depth)
2027+ cl1 = cl1->parent;
2028+ while (cl2->depth > cl1->depth)
2029+ cl2 = cl2->parent;
2030+
2031+ /* Now reduce both clusters to their ancestors at the point where both have
2032+ a common parent; these can be directly compared. */
2033+ while (cl1->parent != cl2->parent)
2034+ cl1 = cl1->parent, cl2 = cl2->parent;
2035+
2036+ return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
2037+}
2038+
2039+/* Return the ancestor of CL that's just below the root (i.e., has a parent
2040+ of 0). */
2041+static struct hol_cluster *
2042+hol_cluster_base (struct hol_cluster *cl)
2043+{
2044+ while (cl->parent)
2045+ cl = cl->parent;
2046+ return cl;
2047+}
2048+
2049+/* Return true if CL1 is a child of CL2. */
2050+static int
2051+hol_cluster_is_child (const struct hol_cluster *cl1,
2052+ const struct hol_cluster *cl2)
2053+{
2054+ while (cl1 && cl1 != cl2)
2055+ cl1 = cl1->parent;
2056+ return cl1 == cl2;
2057+}
2058+
2059+/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
2060+ that should be used for comparisons, and returns true iff it should be
2061+ treated as a non-option. */
2062+static int
2063+canon_doc_option (const char **name)
2064+{
2065+ int non_opt;
2066+ /* Skip initial whitespace. */
2067+ while (isspace (**name))
2068+ (*name)++;
2069+ /* Decide whether this looks like an option (leading `-') or not. */
2070+ non_opt = (**name != '-');
2071+ /* Skip until part of name used for sorting. */
2072+ while (**name && !isalnum (**name))
2073+ (*name)++;
2074+ return non_opt;
2075+}
2076+
2077+/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
2078+ listing. */
2079+static int
2080+hol_entry_cmp (const struct hol_entry *entry1,
2081+ const struct hol_entry *entry2)
2082+{
2083+ /* The group numbers by which the entries should be ordered; if either is
2084+ in a cluster, then this is just the group within the cluster. */
2085+ int group1 = entry1->group, group2 = entry2->group;
2086+
2087+ if (entry1->cluster != entry2->cluster)
2088+ {
2089+ /* The entries are not within the same cluster, so we can't compare them
2090+ directly, we have to use the appropiate clustering level too. */
2091+ if (! entry1->cluster)
2092+ /* ENTRY1 is at the `base level', not in a cluster, so we have to
2093+ compare it's group number with that of the base cluster in which
2094+ ENTRY2 resides. Note that if they're in the same group, the
2095+ clustered option always comes laster. */
2096+ return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
2097+ else if (! entry2->cluster)
2098+ /* Likewise, but ENTRY2's not in a cluster. */
2099+ return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
2100+ else
2101+ /* Both entries are in clusters, we can just compare the clusters. */
2102+ return hol_cluster_cmp (entry1->cluster, entry2->cluster);
2103+ }
2104+ else if (group1 == group2)
2105+ /* The entries are both in the same cluster and group, so compare them
2106+ alphabetically. */
2107+ {
2108+ int short1 = hol_entry_first_short (entry1);
2109+ int short2 = hol_entry_first_short (entry2);
2110+ int doc1 = odoc (entry1->opt);
2111+ int doc2 = odoc (entry2->opt);
2112+ const char *long1 = hol_entry_first_long (entry1);
2113+ const char *long2 = hol_entry_first_long (entry2);
2114+
2115+ if (doc1)
2116+ doc1 = long1 != NULL && canon_doc_option (&long1);
2117+ if (doc2)
2118+ doc2 = long2 != NULL && canon_doc_option (&long2);
2119+
2120+ if (doc1 != doc2)
2121+ /* `documentation' options always follow normal options (or
2122+ documentation options that *look* like normal options). */
2123+ return doc1 - doc2;
2124+ else if (!short1 && !short2 && long1 && long2)
2125+ /* Only long options. */
2126+ return strcasecmp (long1, long2);
2127+ else
2128+ /* Compare short/short, long/short, short/long, using the first
2129+ character of long options. Entries without *any* valid
2130+ options (such as options with OPTION_HIDDEN set) will be put
2131+ first, but as they're not displayed, it doesn't matter where
2132+ they are. */
2133+ {
2134+ char first1 = short1 ? short1 : long1 ? *long1 : 0;
2135+ char first2 = short2 ? short2 : long2 ? *long2 : 0;
2136+#ifdef _tolower
2137+ int lower_cmp = _tolower (first1) - _tolower (first2);
2138+#else
2139+ int lower_cmp = tolower (first1) - tolower (first2);
2140+#endif
2141+ /* Compare ignoring case, except when the options are both the
2142+ same letter, in which case lower-case always comes first. */
2143+ return lower_cmp ? lower_cmp : first2 - first1;
2144+ }
2145+ }
2146+ else
2147+ /* Within the same cluster, but not the same group, so just compare
2148+ groups. */
2149+ return group_cmp (group1, group2, 0);
2150+}
2151+
2152+/* Version of hol_entry_cmp with correct signature for qsort. */
2153+static int
2154+hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
2155+{
2156+ return hol_entry_cmp (entry1_v, entry2_v);
2157+}
2158+
2159+/* Sort HOL by group and alphabetically by option name (with short options
2160+ taking precedence over long). Since the sorting is for display purposes
2161+ only, the shadowing of options isn't effected. */
2162+static void
2163+hol_sort (struct hol *hol)
2164+{
2165+ if (hol->num_entries > 0)
2166+ qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
2167+ hol_entry_qcmp);
2168+}
2169+
2170+/* Append MORE to HOL, destroying MORE in the process. Options in HOL shadow
2171+ any in MORE with the same name. */
2172+static void
2173+hol_append (struct hol *hol, struct hol *more)
2174+{
2175+ struct hol_cluster **cl_end = &hol->clusters;
2176+
2177+ /* Steal MORE's cluster list, and add it to the end of HOL's. */
2178+ while (*cl_end)
2179+ cl_end = &(*cl_end)->next;
2180+ *cl_end = more->clusters;
2181+ more->clusters = 0;
2182+
2183+ /* Merge entries. */
2184+ if (more->num_entries > 0)
2185+ {
2186+ if (hol->num_entries == 0)
2187+ {
2188+ hol->num_entries = more->num_entries;
2189+ hol->entries = more->entries;
2190+ hol->short_options = more->short_options;
2191+ more->num_entries = 0; /* Mark MORE's fields as invalid. */
2192+ }
2193+ else
2194+ /* Append the entries in MORE to those in HOL, taking care to only add
2195+ non-shadowed SHORT_OPTIONS values. */
2196+ {
2197+ unsigned left;
2198+ char *so, *more_so;
2199+ struct hol_entry *e;
2200+ unsigned num_entries = hol->num_entries + more->num_entries;
2201+ struct hol_entry *entries =
2202+ malloc (num_entries * sizeof (struct hol_entry));
2203+ unsigned hol_so_len = strlen (hol->short_options);
2204+ char *short_options =
2205+ malloc (hol_so_len + strlen (more->short_options) + 1);
2206+
2207+ assert (entries && short_options);
2208+#if SIZE_MAX <= UINT_MAX
2209+ assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
2210+#endif
2211+
2212+ mempcpy (mempcpy (entries, hol->entries,
2213+ hol->num_entries * sizeof (struct hol_entry)),
2214+ more->entries,
2215+ more->num_entries * sizeof (struct hol_entry));
2216+
2217+ mempcpy (short_options, hol->short_options, hol_so_len);
2218+
2219+ /* Fix up the short options pointers from HOL. */
2220+ for (e = entries, left = hol->num_entries; left > 0; e++, left--)
2221+ e->short_options += (short_options - hol->short_options);
2222+
2223+ /* Now add the short options from MORE, fixing up its entries
2224+ too. */
2225+ so = short_options + hol_so_len;
2226+ more_so = more->short_options;
2227+ for (left = more->num_entries; left > 0; e++, left--)
2228+ {
2229+ int opts_left;
2230+ const struct argp_option *opt;
2231+
2232+ e->short_options = so;
2233+
2234+ for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
2235+ {
2236+ int ch = *more_so;
2237+ if (oshort (opt) && ch == opt->key)
2238+ /* The next short option in MORE_SO, CH, is from OPT. */
2239+ {
2240+ if (! find_char (ch, short_options,
2241+ short_options + hol_so_len))
2242+ /* The short option CH isn't shadowed by HOL's options,
2243+ so add it to the sum. */
2244+ *so++ = ch;
2245+ more_so++;
2246+ }
2247+ }
2248+ }
2249+
2250+ *so = '\0';
2251+
2252+ free (hol->entries);
2253+ free (hol->short_options);
2254+
2255+ hol->entries = entries;
2256+ hol->num_entries = num_entries;
2257+ hol->short_options = short_options;
2258+ }
2259+ }
2260+
2261+ hol_free (more);
2262+}
2263+
2264+/* Inserts enough spaces to make sure STREAM is at column COL. */
2265+static void
2266+indent_to (argp_fmtstream_t stream, unsigned col)
2267+{
2268+ int needed = col - __argp_fmtstream_point (stream);
2269+ while (needed-- > 0)
2270+ __argp_fmtstream_putc (stream, ' ');
2271+}
2272+
2273+/* Output to STREAM either a space, or a newline if there isn't room for at
2274+ least ENSURE characters before the right margin. */
2275+static void
2276+space (argp_fmtstream_t stream, size_t ensure)
2277+{
2278+ if (__argp_fmtstream_point (stream) + ensure
2279+ >= __argp_fmtstream_rmargin (stream))
2280+ __argp_fmtstream_putc (stream, '\n');
2281+ else
2282+ __argp_fmtstream_putc (stream, ' ');
2283+}
2284+
2285+/* If the option REAL has an argument, we print it in using the printf
2286+ format REQ_FMT or OPT_FMT depending on whether it's a required or
2287+ optional argument. */
2288+static void
2289+arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
2290+ const char *domain, argp_fmtstream_t stream)
2291+{
2292+ if (real->arg)
2293+ {
2294+ if (real->flags & OPTION_ARG_OPTIONAL)
2295+ __argp_fmtstream_printf (stream, opt_fmt,
2296+ dgettext (domain, real->arg));
2297+ else
2298+ __argp_fmtstream_printf (stream, req_fmt,
2299+ dgettext (domain, real->arg));
2300+ }
2301+}
2302+
2303+/* Helper functions for hol_entry_help. */
2304+
2305+/* State used during the execution of hol_help. */
2306+struct hol_help_state
2307+{
2308+ /* PREV_ENTRY should contain the previous entry printed, or 0. */
2309+ struct hol_entry *prev_entry;
2310+
2311+ /* If an entry is in a different group from the previous one, and SEP_GROUPS
2312+ is true, then a blank line will be printed before any output. */
2313+ int sep_groups;
2314+
2315+ /* True if a duplicate option argument was suppressed (only ever set if
2316+ UPARAMS.dup_args is false). */
2317+ int suppressed_dup_arg;
2318+};
2319+
2320+/* Some state used while printing a help entry (used to communicate with
2321+ helper functions). See the doc for hol_entry_help for more info, as most
2322+ of the fields are copied from its arguments. */
2323+struct pentry_state
2324+{
2325+ const struct hol_entry *entry;
2326+ argp_fmtstream_t stream;
2327+ struct hol_help_state *hhstate;
2328+
2329+ /* True if nothing's been printed so far. */
2330+ int first;
2331+
2332+ /* If non-zero, the state that was used to print this help. */
2333+ const struct argp_state *state;
2334+};
2335+
2336+/* If a user doc filter should be applied to DOC, do so. */
2337+static const char *
2338+filter_doc (const char *doc, int key, const struct argp *argp,
2339+ const struct argp_state *state)
2340+{
2341+ if (argp && argp->help_filter)
2342+ /* We must apply a user filter to this output. */
2343+ {
2344+ void *input = __argp_input (argp, state);
2345+ return (*argp->help_filter) (key, doc, input);
2346+ }
2347+ else
2348+ /* No filter. */
2349+ return doc;
2350+}
2351+
2352+/* Prints STR as a header line, with the margin lines set appropiately, and
2353+ notes the fact that groups should be separated with a blank line. ARGP is
2354+ the argp that should dictate any user doc filtering to take place. Note
2355+ that the previous wrap margin isn't restored, but the left margin is reset
2356+ to 0. */
2357+static void
2358+print_header (const char *str, const struct argp *argp,
2359+ struct pentry_state *pest)
2360+{
2361+ const char *tstr = dgettext (argp->argp_domain, str);
2362+ const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state);
2363+
2364+ if (fstr)
2365+ {
2366+ if (*fstr)
2367+ {
2368+ if (pest->hhstate->prev_entry)
2369+ /* Precede with a blank line. */
2370+ __argp_fmtstream_putc (pest->stream, '\n');
2371+ indent_to (pest->stream, uparams.header_col);
2372+ __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col);
2373+ __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col);
2374+ __argp_fmtstream_puts (pest->stream, fstr);
2375+ __argp_fmtstream_set_lmargin (pest->stream, 0);
2376+ __argp_fmtstream_putc (pest->stream, '\n');
2377+ }
2378+
2379+ pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */
2380+ }
2381+
2382+ if (fstr != tstr)
2383+ free ((char *) fstr);
2384+}
2385+
2386+/* Inserts a comma if this isn't the first item on the line, and then makes
2387+ sure we're at least to column COL. If this *is* the first item on a line,
2388+ prints any pending whitespace/headers that should precede this line. Also
2389+ clears FIRST. */
2390+static void
2391+comma (unsigned col, struct pentry_state *pest)
2392+{
2393+ if (pest->first)
2394+ {
2395+ const struct hol_entry *pe = pest->hhstate->prev_entry;
2396+ const struct hol_cluster *cl = pest->entry->cluster;
2397+
2398+ if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
2399+ __argp_fmtstream_putc (pest->stream, '\n');
2400+
2401+ if (cl && cl->header && *cl->header
2402+ && (!pe
2403+ || (pe->cluster != cl
2404+ && !hol_cluster_is_child (pe->cluster, cl))))
2405+ /* If we're changing clusters, then this must be the start of the
2406+ ENTRY's cluster unless that is an ancestor of the previous one
2407+ (in which case we had just popped into a sub-cluster for a bit).
2408+ If so, then print the cluster's header line. */
2409+ {
2410+ int old_wm = __argp_fmtstream_wmargin (pest->stream);
2411+ print_header (cl->header, cl->argp, pest);
2412+ __argp_fmtstream_set_wmargin (pest->stream, old_wm);
2413+ }
2414+
2415+ pest->first = 0;
2416+ }
2417+ else
2418+ __argp_fmtstream_puts (pest->stream, ", ");
2419+
2420+ indent_to (pest->stream, col);
2421+}
2422+
2423+/* Print help for ENTRY to STREAM. */
2424+static void
2425+hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
2426+ argp_fmtstream_t stream, struct hol_help_state *hhstate)
2427+{
2428+ unsigned num;
2429+ const struct argp_option *real = entry->opt, *opt;
2430+ char *so = entry->short_options;
2431+ int have_long_opt = 0; /* We have any long options. */
2432+ /* Saved margins. */
2433+ int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
2434+ int old_wm = __argp_fmtstream_wmargin (stream);
2435+ /* PEST is a state block holding some of our variables that we'd like to
2436+ share with helper functions. */
2437+ struct pentry_state pest = { entry, stream, hhstate, 1, state };
2438+
2439+ if (! odoc (real))
2440+ for (opt = real, num = entry->num; num > 0; opt++, num--)
2441+ if (opt->name && ovisible (opt))
2442+ {
2443+ have_long_opt = 1;
2444+ break;
2445+ }
2446+
2447+ /* First emit short options. */
2448+ __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */
2449+ for (opt = real, num = entry->num; num > 0; opt++, num--)
2450+ if (oshort (opt) && opt->key == *so)
2451+ /* OPT has a valid (non shadowed) short option. */
2452+ {
2453+ if (ovisible (opt))
2454+ {
2455+ comma (uparams.short_opt_col, &pest);
2456+ __argp_fmtstream_putc (stream, '-');
2457+ __argp_fmtstream_putc (stream, *so);
2458+ if (!have_long_opt || uparams.dup_args)
2459+ arg (real, " %s", "[%s]",
2460+ state == NULL ? NULL : state->root_argp->argp_domain,
2461+ stream);
2462+ else if (real->arg)
2463+ hhstate->suppressed_dup_arg = 1;
2464+ }
2465+ so++;
2466+ }
2467+
2468+ /* Now, long options. */
2469+ if (odoc (real))
2470+ /* A `documentation' option. */
2471+ {
2472+ __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
2473+ for (opt = real, num = entry->num; num > 0; opt++, num--)
2474+ if (opt->name && ovisible (opt))
2475+ {
2476+ comma (uparams.doc_opt_col, &pest);
2477+ /* Calling gettext here isn't quite right, since sorting will
2478+ have been done on the original; but documentation options
2479+ should be pretty rare anyway... */
2480+ __argp_fmtstream_puts (stream,
2481+ dgettext (state == NULL ? NULL
2482+ : state->root_argp->argp_domain,
2483+ opt->name));
2484+ }
2485+ }
2486+ else
2487+ /* A real long option. */
2488+ {
2489+ __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
2490+ for (opt = real, num = entry->num; num > 0; opt++, num--)
2491+ if (opt->name && ovisible (opt))
2492+ {
2493+ comma (uparams.long_opt_col, &pest);
2494+ __argp_fmtstream_printf (stream, "--%s", opt->name);
2495+ arg (real, "=%s", "[=%s]",
2496+ state == NULL ? NULL : state->root_argp->argp_domain, stream);
2497+ }
2498+ }
2499+
2500+ /* Next, documentation strings. */
2501+ __argp_fmtstream_set_lmargin (stream, 0);
2502+
2503+ if (pest.first)
2504+ {
2505+ /* Didn't print any switches, what's up? */
2506+ if (!oshort (real) && !real->name)
2507+ /* This is a group header, print it nicely. */
2508+ print_header (real->doc, entry->argp, &pest);
2509+ else
2510+ /* Just a totally shadowed option or null header; print nothing. */
2511+ goto cleanup; /* Just return, after cleaning up. */
2512+ }
2513+ else
2514+ {
2515+ const char *tstr = real->doc ? dgettext (state == NULL ? NULL
2516+ : state->root_argp->argp_domain,
2517+ real->doc) : 0;
2518+ const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
2519+ if (fstr && *fstr)
2520+ {
2521+ unsigned int col = __argp_fmtstream_point (stream);
2522+
2523+ __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
2524+ __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
2525+
2526+ if (col > (unsigned int) (uparams.opt_doc_col + 3))
2527+ __argp_fmtstream_putc (stream, '\n');
2528+ else if (col >= (unsigned int) uparams.opt_doc_col)
2529+ __argp_fmtstream_puts (stream, " ");
2530+ else
2531+ indent_to (stream, uparams.opt_doc_col);
2532+
2533+ __argp_fmtstream_puts (stream, fstr);
2534+ }
2535+ if (fstr && fstr != tstr)
2536+ free ((char *) fstr);
2537+
2538+ /* Reset the left margin. */
2539+ __argp_fmtstream_set_lmargin (stream, 0);
2540+ __argp_fmtstream_putc (stream, '\n');
2541+ }
2542+
2543+ hhstate->prev_entry = entry;
2544+
2545+cleanup:
2546+ __argp_fmtstream_set_lmargin (stream, old_lm);
2547+ __argp_fmtstream_set_wmargin (stream, old_wm);
2548+}
2549+
2550+/* Output a long help message about the options in HOL to STREAM. */
2551+static void
2552+hol_help (struct hol *hol, const struct argp_state *state,
2553+ argp_fmtstream_t stream)
2554+{
2555+ unsigned num;
2556+ struct hol_entry *entry;
2557+ struct hol_help_state hhstate = { 0, 0, 0 };
2558+
2559+ for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
2560+ hol_entry_help (entry, state, stream, &hhstate);
2561+
2562+ if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
2563+ {
2564+ const char *tstr = dgettext (state == NULL ? NULL
2565+ : state->root_argp->argp_domain, "\
2566+Mandatory or optional arguments to long options are also mandatory or \
2567+optional for any corresponding short options.");
2568+ const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
2569+ state ? state->root_argp : 0, state);
2570+ if (fstr && *fstr)
2571+ {
2572+ __argp_fmtstream_putc (stream, '\n');
2573+ __argp_fmtstream_puts (stream, fstr);
2574+ __argp_fmtstream_putc (stream, '\n');
2575+ }
2576+ if (fstr && fstr != tstr)
2577+ free ((char *) fstr);
2578+ }
2579+}
2580+
2581+/* Helper functions for hol_usage. */
2582+
2583+/* If OPT is a short option without an arg, append its key to the string
2584+ pointer pointer to by COOKIE, and advance the pointer. */
2585+static int
2586+add_argless_short_opt (const struct argp_option *opt,
2587+ const struct argp_option *real,
2588+ const char *domain, void *cookie)
2589+{
2590+ char **snao_end = cookie;
2591+ if (!(opt->arg || real->arg)
2592+ && !((opt->flags | real->flags) & OPTION_NO_USAGE))
2593+ *(*snao_end)++ = opt->key;
2594+ return 0;
2595+}
2596+
2597+/* If OPT is a short option with an arg, output a usage entry for it to the
2598+ stream pointed at by COOKIE. */
2599+static int
2600+usage_argful_short_opt (const struct argp_option *opt,
2601+ const struct argp_option *real,
2602+ const char *domain, void *cookie)
2603+{
2604+ argp_fmtstream_t stream = cookie;
2605+ const char *arg = opt->arg;
2606+ int flags = opt->flags | real->flags;
2607+
2608+ if (! arg)
2609+ arg = real->arg;
2610+
2611+ if (arg && !(flags & OPTION_NO_USAGE))
2612+ {
2613+ arg = dgettext (domain, arg);
2614+
2615+ if (flags & OPTION_ARG_OPTIONAL)
2616+ __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
2617+ else
2618+ {
2619+ /* Manually do line wrapping so that it (probably) won't
2620+ get wrapped at the embedded space. */
2621+ space (stream, 6 + strlen (arg));
2622+ __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
2623+ }
2624+ }
2625+
2626+ return 0;
2627+}
2628+
2629+/* Output a usage entry for the long option opt to the stream pointed at by
2630+ COOKIE. */
2631+static int
2632+usage_long_opt (const struct argp_option *opt,
2633+ const struct argp_option *real,
2634+ const char *domain, void *cookie)
2635+{
2636+ argp_fmtstream_t stream = cookie;
2637+ const char *arg = opt->arg;
2638+ int flags = opt->flags | real->flags;
2639+
2640+ if (! arg)
2641+ arg = real->arg;
2642+
2643+ if (! (flags & OPTION_NO_USAGE))
2644+ {
2645+ if (arg)
2646+ {
2647+ arg = dgettext (domain, arg);
2648+ if (flags & OPTION_ARG_OPTIONAL)
2649+ __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
2650+ else
2651+ __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
2652+ }
2653+ else
2654+ __argp_fmtstream_printf (stream, " [--%s]", opt->name);
2655+ }
2656+
2657+ return 0;
2658+}
2659+
2660+/* Print a short usage description for the arguments in HOL to STREAM. */
2661+static void
2662+hol_usage (struct hol *hol, argp_fmtstream_t stream)
2663+{
2664+ if (hol->num_entries > 0)
2665+ {
2666+ unsigned nentries;
2667+ struct hol_entry *entry;
2668+ char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
2669+ char *snao_end = short_no_arg_opts;
2670+
2671+ /* First we put a list of short options without arguments. */
2672+ for (entry = hol->entries, nentries = hol->num_entries
2673+ ; nentries > 0
2674+ ; entry++, nentries--)
2675+ hol_entry_short_iterate (entry, add_argless_short_opt,
2676+ entry->argp->argp_domain, &snao_end);
2677+ if (snao_end > short_no_arg_opts)
2678+ {
2679+ *snao_end++ = 0;
2680+ __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
2681+ }
2682+
2683+ /* Now a list of short options *with* arguments. */
2684+ for (entry = hol->entries, nentries = hol->num_entries
2685+ ; nentries > 0
2686+ ; entry++, nentries--)
2687+ hol_entry_short_iterate (entry, usage_argful_short_opt,
2688+ entry->argp->argp_domain, stream);
2689+
2690+ /* Finally, a list of long options (whew!). */
2691+ for (entry = hol->entries, nentries = hol->num_entries
2692+ ; nentries > 0
2693+ ; entry++, nentries--)
2694+ hol_entry_long_iterate (entry, usage_long_opt,
2695+ entry->argp->argp_domain, stream);
2696+ }
2697+}
2698+
2699+/* Make a HOL containing all levels of options in ARGP. CLUSTER is the
2700+ cluster in which ARGP's entries should be clustered, or 0. */
2701+static struct hol *
2702+argp_hol (const struct argp *argp, struct hol_cluster *cluster)
2703+{
2704+ const struct argp_child *child = argp->children;
2705+ struct hol *hol = make_hol (argp, cluster);
2706+ if (child)
2707+ while (child->argp)
2708+ {
2709+ struct hol_cluster *child_cluster =
2710+ ((child->group || child->header)
2711+ /* Put CHILD->argp within its own cluster. */
2712+ ? hol_add_cluster (hol, child->group, child->header,
2713+ child - argp->children, cluster, argp)
2714+ /* Just merge it into the parent's cluster. */
2715+ : cluster);
2716+ hol_append (hol, argp_hol (child->argp, child_cluster)) ;
2717+ child++;
2718+ }
2719+ return hol;
2720+}
2721+
2722+/* Calculate how many different levels with alternative args strings exist in
2723+ ARGP. */
2724+static size_t
2725+argp_args_levels (const struct argp *argp)
2726+{
2727+ size_t levels = 0;
2728+ const struct argp_child *child = argp->children;
2729+
2730+ if (argp->args_doc && strchr (argp->args_doc, '\n'))
2731+ levels++;
2732+
2733+ if (child)
2734+ while (child->argp)
2735+ levels += argp_args_levels ((child++)->argp);
2736+
2737+ return levels;
2738+}
2739+
2740+/* Print all the non-option args documented in ARGP to STREAM. Any output is
2741+ preceded by a space. LEVELS is a pointer to a byte vector the length
2742+ returned by argp_args_levels; it should be initialized to zero, and
2743+ updated by this routine for the next call if ADVANCE is true. True is
2744+ returned as long as there are more patterns to output. */
2745+static int
2746+argp_args_usage (const struct argp *argp, const struct argp_state *state,
2747+ char **levels, int advance, argp_fmtstream_t stream)
2748+{
2749+ char *our_level = *levels;
2750+ int multiple = 0;
2751+ const struct argp_child *child = argp->children;
2752+ const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
2753+ const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
2754+
2755+ if (fdoc)
2756+ {
2757+ const char *cp = fdoc;
2758+ nl = strchrnul (cp, '\n');
2759+ if (*nl != '\0')
2760+ /* This is a `multi-level' args doc; advance to the correct position
2761+ as determined by our state in LEVELS, and update LEVELS. */
2762+ {
2763+ int i;
2764+ multiple = 1;
2765+ for (i = 0; i < *our_level; i++)
2766+ cp = nl + 1, nl = strchrnul (cp, '\n');
2767+ (*levels)++;
2768+ }
2769+
2770+ /* Manually do line wrapping so that it (probably) won't get wrapped at
2771+ any embedded spaces. */
2772+ space (stream, 1 + nl - cp);
2773+
2774+ __argp_fmtstream_write (stream, cp, nl - cp);
2775+ }
2776+ if (fdoc && fdoc != tdoc)
2777+ free ((char *)fdoc); /* Free user's modified doc string. */
2778+
2779+ if (child)
2780+ while (child->argp)
2781+ advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
2782+
2783+ if (advance && multiple)
2784+ {
2785+ /* Need to increment our level. */
2786+ if (*nl)
2787+ /* There's more we can do here. */
2788+ {
2789+ (*our_level)++;
2790+ advance = 0; /* Our parent shouldn't advance also. */
2791+ }
2792+ else if (*our_level > 0)
2793+ /* We had multiple levels, but used them up; reset to zero. */
2794+ *our_level = 0;
2795+ }
2796+
2797+ return !advance;
2798+}
2799+
2800+/* Print the documentation for ARGP to STREAM; if POST is false, then
2801+ everything preceeding a `\v' character in the documentation strings (or
2802+ the whole string, for those with none) is printed, otherwise, everything
2803+ following the `\v' character (nothing for strings without). Each separate
2804+ bit of documentation is separated a blank line, and if PRE_BLANK is true,
2805+ then the first is as well. If FIRST_ONLY is true, only the first
2806+ occurrence is output. Returns true if anything was output. */
2807+static int
2808+argp_doc (const struct argp *argp, const struct argp_state *state,
2809+ int post, int pre_blank, int first_only,
2810+ argp_fmtstream_t stream)
2811+{
2812+ const char *text;
2813+ const char *inp_text;
2814+ void *input = 0;
2815+ int anything = 0;
2816+ size_t inp_text_limit = 0;
2817+ const char *doc = dgettext (argp->argp_domain, argp->doc);
2818+ const struct argp_child *child = argp->children;
2819+
2820+ if (doc)
2821+ {
2822+ char *vt = strchr (doc, '\v');
2823+ inp_text = post ? (vt ? vt + 1 : 0) : doc;
2824+ inp_text_limit = (!post && vt) ? (vt - doc) : 0;
2825+ }
2826+ else
2827+ inp_text = 0;
2828+
2829+ if (argp->help_filter)
2830+ /* We have to filter the doc strings. */
2831+ {
2832+ if (inp_text_limit)
2833+ /* Copy INP_TEXT so that it's nul-terminated. */
2834+ inp_text = strndup (inp_text, inp_text_limit);
2835+ input = __argp_input (argp, state);
2836+ text =
2837+ (*argp->help_filter) (post
2838+ ? ARGP_KEY_HELP_POST_DOC
2839+ : ARGP_KEY_HELP_PRE_DOC,
2840+ inp_text, input);
2841+ }
2842+ else
2843+ text = (const char *) inp_text;
2844+
2845+ if (text)
2846+ {
2847+ if (pre_blank)
2848+ __argp_fmtstream_putc (stream, '\n');
2849+
2850+ if (text == inp_text && inp_text_limit)
2851+ __argp_fmtstream_write (stream, inp_text, inp_text_limit);
2852+ else
2853+ __argp_fmtstream_puts (stream, text);
2854+
2855+ if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
2856+ __argp_fmtstream_putc (stream, '\n');
2857+
2858+ anything = 1;
2859+ }
2860+
2861+ if (text && text != inp_text)
2862+ free ((char *) text); /* Free TEXT returned from the help filter. */
2863+ if (inp_text && inp_text_limit && argp->help_filter)
2864+ free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */
2865+
2866+ if (post && argp->help_filter)
2867+ /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */
2868+ {
2869+ text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
2870+ if (text)
2871+ {
2872+ if (anything || pre_blank)
2873+ __argp_fmtstream_putc (stream, '\n');
2874+ __argp_fmtstream_puts (stream, text);
2875+ free ((char *) text);
2876+ if (__argp_fmtstream_point (stream)
2877+ > __argp_fmtstream_lmargin (stream))
2878+ __argp_fmtstream_putc (stream, '\n');
2879+ anything = 1;
2880+ }
2881+ }
2882+
2883+ if (child)
2884+ while (child->argp && !(first_only && anything))
2885+ anything |=
2886+ argp_doc ((child++)->argp, state,
2887+ post, anything || pre_blank, first_only,
2888+ stream);
2889+
2890+ return anything;
2891+}
2892+
2893+/* Output a usage message for ARGP to STREAM. If called from
2894+ argp_state_help, STATE is the relevent parsing state. FLAGS are from the
2895+ set ARGP_HELP_*. NAME is what to use wherever a `program name' is
2896+ needed. */
2897+static void
2898+_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
2899+ unsigned flags, char *name)
2900+{
2901+ int anything = 0; /* Whether we've output anything. */
2902+ struct hol *hol = 0;
2903+ argp_fmtstream_t fs;
2904+
2905+ if (! stream)
2906+ return;
2907+
2908+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
2909+ flockfile (stream);
2910+#endif
2911+
2912+ fill_in_uparams (state);
2913+
2914+ fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
2915+ if (! fs)
2916+ {
2917+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
2918+ funlockfile (stream);
2919+#endif
2920+ return;
2921+ }
2922+
2923+ if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
2924+ {
2925+ hol = argp_hol (argp, 0);
2926+
2927+ /* If present, these options always come last. */
2928+ hol_set_group (hol, "help", -1);
2929+ hol_set_group (hol, "version", -1);
2930+
2931+ hol_sort (hol);
2932+ }
2933+
2934+ if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
2935+ /* Print a short `Usage:' message. */
2936+ {
2937+ int first_pattern = 1, more_patterns;
2938+ size_t num_pattern_levels = argp_args_levels (argp);
2939+ char *pattern_levels = alloca (num_pattern_levels);
2940+
2941+ memset (pattern_levels, 0, num_pattern_levels);
2942+
2943+ do
2944+ {
2945+ int old_lm;
2946+ int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
2947+ char *levels = pattern_levels;
2948+
2949+ if (first_pattern)
2950+ __argp_fmtstream_printf (fs, "%s %s",
2951+ dgettext (argp->argp_domain, "Usage:"),
2952+ name);
2953+ else
2954+ __argp_fmtstream_printf (fs, "%s %s",
2955+ dgettext (argp->argp_domain, " or: "),
2956+ name);
2957+
2958+ /* We set the lmargin as well as the wmargin, because hol_usage
2959+ manually wraps options with newline to avoid annoying breaks. */
2960+ old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
2961+
2962+ if (flags & ARGP_HELP_SHORT_USAGE)
2963+ /* Just show where the options go. */
2964+ {
2965+ if (hol->num_entries > 0)
2966+ __argp_fmtstream_puts (fs, dgettext (argp->argp_domain,
2967+ " [OPTION...]"));
2968+ }
2969+ else
2970+ /* Actually print the options. */
2971+ {
2972+ hol_usage (hol, fs);
2973+ flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */
2974+ }
2975+
2976+ more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
2977+
2978+ __argp_fmtstream_set_wmargin (fs, old_wm);
2979+ __argp_fmtstream_set_lmargin (fs, old_lm);
2980+
2981+ __argp_fmtstream_putc (fs, '\n');
2982+ anything = 1;
2983+
2984+ first_pattern = 0;
2985+ }
2986+ while (more_patterns);
2987+ }
2988+
2989+ if (flags & ARGP_HELP_PRE_DOC)
2990+ anything |= argp_doc (argp, state, 0, 0, 1, fs);
2991+
2992+ if (flags & ARGP_HELP_SEE)
2993+ {
2994+ __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
2995+Try `%s --help' or `%s --usage' for more information.\n"),
2996+ name, name);
2997+ anything = 1;
2998+ }
2999+
3000+ if (flags & ARGP_HELP_LONG)
3001+ /* Print a long, detailed help message. */
3002+ {
3003+ /* Print info about all the options. */
3004+ if (hol->num_entries > 0)
3005+ {
3006+ if (anything)
3007+ __argp_fmtstream_putc (fs, '\n');
3008+ hol_help (hol, state, fs);
3009+ anything = 1;
3010+ }
3011+ }
3012+
3013+ if (flags & ARGP_HELP_POST_DOC)
3014+ /* Print any documentation strings at the end. */
3015+ anything |= argp_doc (argp, state, 1, anything, 0, fs);
3016+
3017+ if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
3018+ {
3019+ if (anything)
3020+ __argp_fmtstream_putc (fs, '\n');
3021+ __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
3022+ "Report bugs to %s.\n"),
3023+ argp_program_bug_address);
3024+ anything = 1;
3025+ }
3026+
3027+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
3028+ funlockfile (stream);
3029+#endif
3030+
3031+ if (hol)
3032+ hol_free (hol);
3033+
3034+ __argp_fmtstream_free (fs);
3035+}
3036+
3037+/* Output a usage message for ARGP to STREAM. FLAGS are from the set
3038+ ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */
3039+void argp_help (const struct argp *argp, FILE *stream,
3040+ unsigned flags, char *name)
3041+{
3042+ _help (argp, 0, stream, flags, name);
3043+}
3044+
3045+char *
3046+__argp_short_program_name (void)
3047+{
3048+# ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
3049+/*
3050+ * uClibc provides both program_invocation_name and
3051+ * program_invocation_short_name
3052+ */
3053+ return (char *) program_invocation_short_name;
3054+# else
3055+ /* FIXME: What now? Miles suggests that it is better to use NULL,
3056+ but currently the value is passed on directly to fputs_unlocked,
3057+ so that requires more changes. */
3058+# if __GNUC__
3059+# warning No reasonable value to return
3060+# endif /* __GNUC__ */
3061+ return "";
3062+# endif
3063+}
3064+
3065+/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
3066+ from the set ARGP_HELP_*. */
3067+void
3068+argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
3069+{
3070+ if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
3071+ {
3072+ if (state && (state->flags & ARGP_LONG_ONLY))
3073+ flags |= ARGP_HELP_LONG_ONLY;
3074+
3075+ _help (state ? state->root_argp : 0, state, stream, flags,
3076+ state ? state->name : __argp_short_program_name ());
3077+
3078+ if (!state || ! (state->flags & ARGP_NO_EXIT))
3079+ {
3080+ if (flags & ARGP_HELP_EXIT_ERR)
3081+ exit (argp_err_exit_status);
3082+ if (flags & ARGP_HELP_EXIT_OK)
3083+ exit (0);
3084+ }
3085+ }
3086+}
3087+
3088+/* If appropriate, print the printf string FMT and following args, preceded
3089+ by the program name and `:', to stderr, and followed by a `Try ... --help'
3090+ message, then exit (1). */
3091+void
3092+argp_error (const struct argp_state *state, const char *fmt, ...)
3093+{
3094+ if (!state || !(state->flags & ARGP_NO_ERRS))
3095+ {
3096+ FILE *stream = state ? state->err_stream : stderr;
3097+
3098+ if (stream)
3099+ {
3100+ va_list ap;
3101+
3102+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
3103+ flockfile (stream);
3104+#endif
3105+
3106+ va_start (ap, fmt);
3107+
3108+#if defined _LIBC && defined USE_IN_LIBIO
3109+ char *buf;
3110+
3111+ if (_IO_vasprintf (&buf, fmt, ap) < 0)
3112+ buf = NULL;
3113+
3114+ __fxprintf (stream, "%s: %s\n",
3115+ state ? state->name : __argp_short_program_name (), buf);
3116+
3117+ free (buf);
3118+#else
3119+ fputs_unlocked (state ? state->name : __argp_short_program_name (),
3120+ stream);
3121+ putc_unlocked (':', stream);
3122+ putc_unlocked (' ', stream);
3123+
3124+ vfprintf (stream, fmt, ap);
3125+
3126+ putc_unlocked ('\n', stream);
3127+#endif
3128+
3129+ argp_state_help (state, stream, ARGP_HELP_STD_ERR);
3130+
3131+ va_end (ap);
3132+
3133+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
3134+ funlockfile (stream);
3135+#endif
3136+ }
3137+ }
3138+}
3139+
3140+/* Similar to the standard gnu error-reporting function error(), but will
3141+ respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
3142+ to STATE->err_stream. This is useful for argument parsing code that is
3143+ shared between program startup (when exiting is desired) and runtime
3144+ option parsing (when typically an error code is returned instead). The
3145+ difference between this function and argp_error is that the latter is for
3146+ *parsing errors*, and the former is for other problems that occur during
3147+ parsing but don't reflect a (syntactic) problem with the input. */
3148+void
3149+argp_failure (const struct argp_state *state, int status, int errnum,
3150+ const char *fmt, ...)
3151+{
3152+ if (!state || !(state->flags & ARGP_NO_ERRS))
3153+ {
3154+ FILE *stream = state ? state->err_stream : stderr;
3155+
3156+ if (stream)
3157+ {
3158+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
3159+ flockfile (stream);
3160+#endif
3161+
3162+#if defined _LIBC && defined USE_IN_LIBIO
3163+ __fxprintf (stream, "%s",
3164+ state ? state->name : __argp_short_program_name ());
3165+#else
3166+ fputs_unlocked (state ? state->name : __argp_short_program_name (),
3167+ stream);
3168+#endif
3169+
3170+ if (fmt)
3171+ {
3172+ va_list ap;
3173+
3174+ va_start (ap, fmt);
3175+#if defined _LIBC && defined USE_IN_LIBIO
3176+ char *buf;
3177+
3178+ if (_IO_vasprintf (&buf, fmt, ap) < 0)
3179+ buf = NULL;
3180+
3181+ __fxprintf (stream, ": %s", buf);
3182+
3183+ free (buf);
3184+#else
3185+ putc_unlocked (':', stream);
3186+ putc_unlocked (' ', stream);
3187+
3188+ vfprintf (stream, fmt, ap);
3189+#endif
3190+
3191+ va_end (ap);
3192+ }
3193+
3194+ if (errnum)
3195+ {
3196+#if (defined _LIBC && defined USE_IN_LIBIO) || defined HAVE_STRERROR_R
3197+ char buf[200];
3198+#endif
3199+#if defined _LIBC && defined USE_IN_LIBIO
3200+ __fxprintf (stream, ": %s",
3201+ strerror_r (errnum, buf, sizeof (buf)));
3202+#else
3203+ putc_unlocked (':', stream);
3204+ putc_unlocked (' ', stream);
3205+# ifdef HAVE_STRERROR_R
3206+ fputs (strerror_r (errnum, buf, sizeof (buf)), stream);
3207+# else
3208+ fputs (strerror (errnum), stream);
3209+# endif
3210+#endif
3211+ }
3212+
3213+#ifdef USE_IN_LIBIO
3214+ if (_IO_fwide (stream, 0) > 0)
3215+ putwc_unlocked (L'\n', stream);
3216+ else
3217+#endif
3218+ putc_unlocked ('\n', stream);
3219+
3220+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
3221+ funlockfile (stream);
3222+#endif
3223+
3224+ if (status && (!state || !(state->flags & ARGP_NO_EXIT)))
3225+ exit (status);
3226+ }
3227+ }
3228+}
3229Index: git/libuargp/argp-parse.c
3230===================================================================
3231--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3232+++ git/libuargp/argp-parse.c 2012-06-18 13:10:44.060825542 -0700
3233@@ -0,0 +1,949 @@
3234+/* Hierarchial argument parsing, layered over getopt
3235+ Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
3236+ This file is part of the GNU C Library.
3237+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
3238+
3239+ The GNU C Library is free software; you can redistribute it and/or
3240+ modify it under the terms of the GNU Lesser General Public
3241+ License as published by the Free Software Foundation; either
3242+ version 2.1 of the License, or (at your option) any later version.
3243+
3244+ The GNU C Library is distributed in the hope that it will be useful,
3245+ but WITHOUT ANY WARRANTY; without even the implied warranty of
3246+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3247+ Lesser General Public License for more details.
3248+
3249+ You should have received a copy of the GNU Lesser General Public
3250+ License along with the GNU C Library; if not, write to the Free
3251+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3252+ 02111-1307 USA.
3253+
3254+ Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
3255+*/
3256+
3257+#ifdef HAVE_CONFIG_H
3258+#include <config.h>
3259+#endif
3260+
3261+/* AIX requires this to be the first thing in the file. */
3262+#ifndef __GNUC__
3263+# if HAVE_ALLOCA_H || defined _LIBC
3264+# include <alloca.h>
3265+# else
3266+# ifdef _AIX
3267+#pragma alloca
3268+# else
3269+# ifndef alloca /* predefined by HP cc +Olibcalls */
3270+char *alloca ();
3271+# endif
3272+# endif
3273+# endif
3274+#endif
3275+
3276+#include <stdlib.h>
3277+#include <string.h>
3278+#include <unistd.h>
3279+#include <limits.h>
3280+#include <getopt.h>
3281+#include <bits/getopt_int.h>
3282+
3283+#include <features.h>
3284+#ifndef _
3285+/* This is for other GNU distributions with internationalized messages.
3286+ When compiling libc, the _ macro is predefined. */
3287+# if (defined HAVE_LIBINTL_H || defined _LIBC) && defined __UCLIBC_HAS_GETTEXT_AWARENESS__
3288+# include <libintl.h>
3289+# ifdef _LIBC
3290+# undef dgettext
3291+# define dgettext(domain, msgid) \
3292+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
3293+# endif
3294+# else
3295+# define dgettext(domain, msgid) (msgid)
3296+# define gettext(msgid) (msgid)
3297+# endif
3298+#endif
3299+#ifndef N_
3300+# define N_(msgid) (msgid)
3301+#endif
3302+
3303+#include <argp.h>
3304+
3305+/* Getopt return values. */
3306+#define KEY_END (-1) /* The end of the options. */
3307+#define KEY_ARG 1 /* A non-option argument. */
3308+#define KEY_ERR '?' /* An error parsing the options. */
3309+
3310+/* The meta-argument used to prevent any further arguments being interpreted
3311+ as options. */
3312+#define QUOTE "--"
3313+
3314+/* The number of bits we steal in a long-option value for our own use. */
3315+#define GROUP_BITS CHAR_BIT
3316+
3317+/* The number of bits available for the user value. */
3318+#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
3319+#define USER_MASK ((1 << USER_BITS) - 1)
3320+
3321+/* EZ alias for ARGP_ERR_UNKNOWN. */
3322+#define EBADKEY ARGP_ERR_UNKNOWN
3323+
3324+/* Default options. */
3325+
3326+/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
3327+ for one second intervals, decrementing _ARGP_HANG until it's zero. Thus
3328+ you can force the program to continue by attaching a debugger and setting
3329+ it to 0 yourself. */
3330+static volatile int _argp_hang;
3331+
3332+#define OPT_PROGNAME -2
3333+#define OPT_USAGE -3
3334+#define OPT_HANG -4
3335+
3336+static const struct argp_option argp_default_options[] =
3337+{
3338+ {"help", '?', 0, 0, N_("Give this help list"), -1},
3339+ {"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
3340+ {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
3341+ {"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
3342+ N_("Hang for SECS seconds (default 3600)")},
3343+ {0, 0}
3344+};
3345+
3346+static error_t
3347+argp_default_parser (int key, char *arg, struct argp_state *state)
3348+{
3349+ switch (key)
3350+ {
3351+ case '?':
3352+ argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
3353+ break;
3354+ case OPT_USAGE:
3355+ argp_state_help (state, state->out_stream,
3356+ ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
3357+ break;
3358+
3359+ case OPT_PROGNAME: /* Set the program name. */
3360+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME
3361+ program_invocation_name = arg;
3362+#endif
3363+ /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
3364+ __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
3365+ to be that, so we have to be a bit careful here.] */
3366+
3367+ /* Update what we use for messages. */
3368+ state->name = strrchr (arg, '/');
3369+ if (state->name)
3370+ state->name++;
3371+ else
3372+ state->name = arg;
3373+
3374+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
3375+ program_invocation_short_name = state->name;
3376+#endif
3377+
3378+ if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
3379+ == ARGP_PARSE_ARGV0)
3380+ /* Update what getopt uses too. */
3381+ state->argv[0] = arg;
3382+
3383+ break;
3384+
3385+ case OPT_HANG:
3386+ _argp_hang = atoi (arg ? arg : "3600");
3387+ while (_argp_hang-- > 0)
3388+ sleep (1);
3389+ break;
3390+
3391+ default:
3392+ return EBADKEY;
3393+ }
3394+ return 0;
3395+}
3396+
3397+static const struct argp argp_default_argp =
3398+ {argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"};
3399+
3400+
3401+static const struct argp_option argp_version_options[] =
3402+{
3403+ {"version", 'V', 0, 0, N_("Print program version"), -1},
3404+ {0, 0}
3405+};
3406+
3407+static error_t
3408+argp_version_parser (int key, char *arg, struct argp_state *state)
3409+{
3410+ switch (key)
3411+ {
3412+ case 'V':
3413+ if (argp_program_version_hook)
3414+ (*argp_program_version_hook) (state->out_stream, state);
3415+ else if (argp_program_version)
3416+ fprintf (state->out_stream, "%s\n", argp_program_version);
3417+ else
3418+ argp_error (state, dgettext (state->root_argp->argp_domain,
3419+ "(PROGRAM ERROR) No version known!?"));
3420+ if (! (state->flags & ARGP_NO_EXIT))
3421+ exit (0);
3422+ break;
3423+ default:
3424+ return EBADKEY;
3425+ }
3426+ return 0;
3427+}
3428+
3429+static const struct argp argp_version_argp =
3430+ {argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"};
3431+
3432+/* Returns the offset into the getopt long options array LONG_OPTIONS of a
3433+ long option with called NAME, or -1 if none is found. Passing NULL as
3434+ NAME will return the number of options. */
3435+static int
3436+find_long_option (struct option *long_options, const char *name)
3437+{
3438+ struct option *l = long_options;
3439+ while (l->name != NULL)
3440+ if (name != NULL && strcmp (l->name, name) == 0)
3441+ return l - long_options;
3442+ else
3443+ l++;
3444+ if (name == NULL)
3445+ return l - long_options;
3446+ else
3447+ return -1;
3448+}
3449+
3450+
3451+/* The state of a `group' during parsing. Each group corresponds to a
3452+ particular argp structure from the tree of such descending from the top
3453+ level argp passed to argp_parse. */
3454+struct group
3455+{
3456+ /* This group's parsing function. */
3457+ argp_parser_t parser;
3458+
3459+ /* Which argp this group is from. */
3460+ const struct argp *argp;
3461+
3462+ /* Points to the point in SHORT_OPTS corresponding to the end of the short
3463+ options for this group. We use it to determine from which group a
3464+ particular short options is from. */
3465+ char *short_end;
3466+
3467+ /* The number of non-option args sucessfully handled by this parser. */
3468+ unsigned args_processed;
3469+
3470+ /* This group's parser's parent's group. */
3471+ struct group *parent;
3472+ unsigned parent_index; /* And the our position in the parent. */
3473+
3474+ /* These fields are swapped into and out of the state structure when
3475+ calling this group's parser. */
3476+ void *input, **child_inputs;
3477+ void *hook;
3478+};
3479+
3480+/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
3481+ from STATE before calling, and back into state afterwards. If GROUP has
3482+ no parser, EBADKEY is returned. */
3483+static error_t
3484+group_parse (struct group *group, struct argp_state *state, int key, char *arg)
3485+{
3486+ if (group->parser)
3487+ {
3488+ error_t err;
3489+ state->hook = group->hook;
3490+ state->input = group->input;
3491+ state->child_inputs = group->child_inputs;
3492+ state->arg_num = group->args_processed;
3493+ err = (*group->parser)(key, arg, state);
3494+ group->hook = state->hook;
3495+ return err;
3496+ }
3497+ else
3498+ return EBADKEY;
3499+}
3500+
3501+struct parser
3502+{
3503+ const struct argp *argp;
3504+
3505+ /* SHORT_OPTS is the getopt short options string for the union of all the
3506+ groups of options. */
3507+ char *short_opts;
3508+ /* LONG_OPTS is the array of getop long option structures for the union of
3509+ all the groups of options. */
3510+ struct option *long_opts;
3511+ /* OPT_DATA is the getopt data used for the re-entrant getopt. */
3512+ struct _getopt_data opt_data;
3513+
3514+ /* States of the various parsing groups. */
3515+ struct group *groups;
3516+ /* The end of the GROUPS array. */
3517+ struct group *egroup;
3518+ /* An vector containing storage for the CHILD_INPUTS field in all groups. */
3519+ void **child_inputs;
3520+
3521+ /* True if we think using getopt is still useful; if false, then
3522+ remaining arguments are just passed verbatim with ARGP_KEY_ARG. This is
3523+ cleared whenever getopt returns KEY_END, but may be set again if the user
3524+ moves the next argument pointer backwards. */
3525+ int try_getopt;
3526+
3527+ /* State block supplied to parsing routines. */
3528+ struct argp_state state;
3529+
3530+ /* Memory used by this parser. */
3531+ void *storage;
3532+};
3533+
3534+/* The next usable entries in the various parser tables being filled in by
3535+ convert_options. */
3536+struct parser_convert_state
3537+{
3538+ struct parser *parser;
3539+ char *short_end;
3540+ struct option *long_end;
3541+ void **child_inputs_end;
3542+};
3543+
3544+/* Converts all options in ARGP (which is put in GROUP) and ancestors
3545+ into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
3546+ CVT->LONG_END are the points at which new options are added. Returns the
3547+ next unused group entry. CVT holds state used during the conversion. */
3548+static struct group *
3549+convert_options (const struct argp *argp,
3550+ struct group *parent, unsigned parent_index,
3551+ struct group *group, struct parser_convert_state *cvt)
3552+{
3553+ /* REAL is the most recent non-alias value of OPT. */
3554+ const struct argp_option *real = argp->options;
3555+ const struct argp_child *children = argp->children;
3556+
3557+ if (real || argp->parser)
3558+ {
3559+ const struct argp_option *opt;
3560+
3561+ if (real)
3562+ for (opt = real; !__option_is_end (opt); opt++)
3563+ {
3564+ if (! (opt->flags & OPTION_ALIAS))
3565+ /* OPT isn't an alias, so we can use values from it. */
3566+ real = opt;
3567+
3568+ if (! (real->flags & OPTION_DOC))
3569+ /* A real option (not just documentation). */
3570+ {
3571+ if (__option_is_short (opt))
3572+ /* OPT can be used as a short option. */
3573+ {
3574+ *cvt->short_end++ = opt->key;
3575+ if (real->arg)
3576+ {
3577+ *cvt->short_end++ = ':';
3578+ if (real->flags & OPTION_ARG_OPTIONAL)
3579+ *cvt->short_end++ = ':';
3580+ }
3581+ *cvt->short_end = '\0'; /* keep 0 terminated */
3582+ }
3583+
3584+ if (opt->name
3585+ && find_long_option (cvt->parser->long_opts, opt->name) < 0)
3586+ /* OPT can be used as a long option. */
3587+ {
3588+ cvt->long_end->name = opt->name;
3589+ cvt->long_end->has_arg =
3590+ (real->arg
3591+ ? (real->flags & OPTION_ARG_OPTIONAL
3592+ ? optional_argument
3593+ : required_argument)
3594+ : no_argument);
3595+ cvt->long_end->flag = 0;
3596+ /* we add a disambiguating code to all the user's
3597+ values (which is removed before we actually call
3598+ the function to parse the value); this means that
3599+ the user loses use of the high 8 bits in all his
3600+ values (the sign of the lower bits is preserved
3601+ however)... */
3602+ cvt->long_end->val =
3603+ ((opt->key | real->key) & USER_MASK)
3604+ + (((group - cvt->parser->groups) + 1) << USER_BITS);
3605+
3606+ /* Keep the LONG_OPTS list terminated. */
3607+ (++cvt->long_end)->name = NULL;
3608+ }
3609+ }
3610+ }
3611+
3612+ group->parser = argp->parser;
3613+ group->argp = argp;
3614+ group->short_end = cvt->short_end;
3615+ group->args_processed = 0;
3616+ group->parent = parent;
3617+ group->parent_index = parent_index;
3618+ group->input = 0;
3619+ group->hook = 0;
3620+ group->child_inputs = 0;
3621+
3622+ if (children)
3623+ /* Assign GROUP's CHILD_INPUTS field some space from
3624+ CVT->child_inputs_end.*/
3625+ {
3626+ unsigned num_children = 0;
3627+ while (children[num_children].argp)
3628+ num_children++;
3629+ group->child_inputs = cvt->child_inputs_end;
3630+ cvt->child_inputs_end += num_children;
3631+ }
3632+
3633+ parent = group++;
3634+ }
3635+ else
3636+ parent = 0;
3637+
3638+ if (children)
3639+ {
3640+ unsigned index = 0;
3641+ while (children->argp)
3642+ group =
3643+ convert_options (children++->argp, parent, index++, group, cvt);
3644+ }
3645+
3646+ return group;
3647+}
3648+
3649+/* Find the merged set of getopt options, with keys appropiately prefixed. */
3650+static void
3651+parser_convert (struct parser *parser, const struct argp *argp, int flags)
3652+{
3653+ struct parser_convert_state cvt;
3654+
3655+ cvt.parser = parser;
3656+ cvt.short_end = parser->short_opts;
3657+ cvt.long_end = parser->long_opts;
3658+ cvt.child_inputs_end = parser->child_inputs;
3659+
3660+ if (flags & ARGP_IN_ORDER)
3661+ *cvt.short_end++ = '-';
3662+ else if (flags & ARGP_NO_ARGS)
3663+ *cvt.short_end++ = '+';
3664+ *cvt.short_end = '\0';
3665+
3666+ cvt.long_end->name = NULL;
3667+
3668+ parser->argp = argp;
3669+
3670+ if (argp)
3671+ parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
3672+ else
3673+ parser->egroup = parser->groups; /* No parsers at all! */
3674+}
3675+
3676+/* Lengths of various parser fields which we will allocated. */
3677+struct parser_sizes
3678+{
3679+ size_t short_len; /* Getopt short options string. */
3680+ size_t long_len; /* Getopt long options vector. */
3681+ size_t num_groups; /* Group structures we allocate. */
3682+ size_t num_child_inputs; /* Child input slots. */
3683+};
3684+
3685+/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
3686+ argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
3687+ the maximum lengths of the resulting merged getopt short options string and
3688+ long-options array, respectively. */
3689+static void
3690+calc_sizes (const struct argp *argp, struct parser_sizes *szs)
3691+{
3692+ const struct argp_child *child = argp->children;
3693+ const struct argp_option *opt = argp->options;
3694+
3695+ if (opt || argp->parser)
3696+ {
3697+ szs->num_groups++;
3698+ if (opt)
3699+ {
3700+ int num_opts = 0;
3701+ while (!__option_is_end (opt++))
3702+ num_opts++;
3703+ szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
3704+ szs->long_len += num_opts;
3705+ }
3706+ }
3707+
3708+ if (child)
3709+ while (child->argp)
3710+ {
3711+ calc_sizes ((child++)->argp, szs);
3712+ szs->num_child_inputs++;
3713+ }
3714+}
3715+
3716+
3717+extern char * __argp_short_program_name (void);
3718+/* Initializes PARSER to parse ARGP in a manner described by FLAGS. */
3719+static error_t
3720+parser_init (struct parser *parser, const struct argp *argp,
3721+ int argc, char **argv, int flags, void *input)
3722+{
3723+ error_t err = 0;
3724+ struct group *group;
3725+ struct parser_sizes szs;
3726+ struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER;
3727+
3728+ szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
3729+ szs.long_len = 0;
3730+ szs.num_groups = 0;
3731+ szs.num_child_inputs = 0;
3732+
3733+ if (argp)
3734+ calc_sizes (argp, &szs);
3735+
3736+ /* Lengths of the various bits of storage used by PARSER. */
3737+#define GLEN (szs.num_groups + 1) * sizeof (struct group)
3738+#define CLEN (szs.num_child_inputs * sizeof (void *))
3739+#define LLEN ((szs.long_len + 1) * sizeof (struct option))
3740+#define SLEN (szs.short_len + 1)
3741+
3742+ parser->storage = malloc (GLEN + CLEN + LLEN + SLEN);
3743+ if (! parser->storage)
3744+ return ENOMEM;
3745+
3746+ parser->groups = parser->storage;
3747+ parser->child_inputs = parser->storage + GLEN;
3748+ parser->long_opts = parser->storage + GLEN + CLEN;
3749+ parser->short_opts = parser->storage + GLEN + CLEN + LLEN;
3750+ parser->opt_data = opt_data;
3751+
3752+ memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *));
3753+ parser_convert (parser, argp, flags);
3754+
3755+ memset (&parser->state, 0, sizeof (struct argp_state));
3756+ parser->state.root_argp = parser->argp;
3757+ parser->state.argc = argc;
3758+ parser->state.argv = argv;
3759+ parser->state.flags = flags;
3760+ parser->state.err_stream = stderr;
3761+ parser->state.out_stream = stdout;
3762+ parser->state.next = 0; /* Tell getopt to initialize. */
3763+ parser->state.pstate = parser;
3764+
3765+ parser->try_getopt = 1;
3766+
3767+ /* Call each parser for the first time, giving it a chance to propagate
3768+ values to child parsers. */
3769+ if (parser->groups < parser->egroup)
3770+ parser->groups->input = input;
3771+ for (group = parser->groups;
3772+ group < parser->egroup && (!err || err == EBADKEY);
3773+ group++)
3774+ {
3775+ if (group->parent)
3776+ /* If a child parser, get the initial input value from the parent. */
3777+ group->input = group->parent->child_inputs[group->parent_index];
3778+
3779+ if (!group->parser
3780+ && group->argp->children && group->argp->children->argp)
3781+ /* For the special case where no parsing function is supplied for an
3782+ argp, propagate its input to its first child, if any (this just
3783+ makes very simple wrapper argps more convenient). */
3784+ group->child_inputs[0] = group->input;
3785+
3786+ err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
3787+ }
3788+ if (err == EBADKEY)
3789+ err = 0; /* Some parser didn't understand. */
3790+
3791+ if (err)
3792+ return err;
3793+
3794+ if (parser->state.flags & ARGP_NO_ERRS)
3795+ {
3796+ parser->opt_data.opterr = 0;
3797+ if (parser->state.flags & ARGP_PARSE_ARGV0)
3798+ /* getopt always skips ARGV[0], so we have to fake it out. As long
3799+ as OPTERR is 0, then it shouldn't actually try to access it. */
3800+ parser->state.argv--, parser->state.argc++;
3801+ }
3802+ else
3803+ parser->opt_data.opterr = 1; /* Print error messages. */
3804+
3805+ if (parser->state.argv == argv && argv[0])
3806+ /* There's an argv[0]; use it for messages. */
3807+ {
3808+ char *short_name = strrchr (argv[0], '/');
3809+ parser->state.name = short_name ? short_name + 1 : argv[0];
3810+ }
3811+ else
3812+ parser->state.name = __argp_short_program_name ();
3813+
3814+ return 0;
3815+}
3816+
3817+/* Free any storage consumed by PARSER (but not PARSER itself). */
3818+static error_t
3819+parser_finalize (struct parser *parser,
3820+ error_t err, int arg_ebadkey, int *end_index)
3821+{
3822+ struct group *group;
3823+
3824+ if (err == EBADKEY && arg_ebadkey)
3825+ /* Suppress errors generated by unparsed arguments. */
3826+ err = 0;
3827+
3828+ if (! err)
3829+ {
3830+ if (parser->state.next == parser->state.argc)
3831+ /* We successfully parsed all arguments! Call all the parsers again,
3832+ just a few more times... */
3833+ {
3834+ for (group = parser->groups;
3835+ group < parser->egroup && (!err || err==EBADKEY);
3836+ group++)
3837+ if (group->args_processed == 0)
3838+ err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
3839+ for (group = parser->egroup - 1;
3840+ group >= parser->groups && (!err || err==EBADKEY);
3841+ group--)
3842+ err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
3843+
3844+ if (err == EBADKEY)
3845+ err = 0; /* Some parser didn't understand. */
3846+
3847+ /* Tell the user that all arguments are parsed. */
3848+ if (end_index)
3849+ *end_index = parser->state.next;
3850+ }
3851+ else if (end_index)
3852+ /* Return any remaining arguments to the user. */
3853+ *end_index = parser->state.next;
3854+ else
3855+ /* No way to return the remaining arguments, they must be bogus. */
3856+ {
3857+ if (!(parser->state.flags & ARGP_NO_ERRS)
3858+ && parser->state.err_stream)
3859+ fprintf (parser->state.err_stream,
3860+ dgettext (parser->argp->argp_domain,
3861+ "%s: Too many arguments\n"),
3862+ parser->state.name);
3863+ err = EBADKEY;
3864+ }
3865+ }
3866+
3867+ /* Okay, we're all done, with either an error or success; call the parsers
3868+ to indicate which one. */
3869+
3870+ if (err)
3871+ {
3872+ /* Maybe print an error message. */
3873+ if (err == EBADKEY)
3874+ /* An appropriate message describing what the error was should have
3875+ been printed earlier. */
3876+ argp_state_help (&parser->state, parser->state.err_stream,
3877+ ARGP_HELP_STD_ERR);
3878+
3879+ /* Since we didn't exit, give each parser an error indication. */
3880+ for (group = parser->groups; group < parser->egroup; group++)
3881+ group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
3882+ }
3883+ else
3884+ /* Notify parsers of success, and propagate back values from parsers. */
3885+ {
3886+ /* We pass over the groups in reverse order so that child groups are
3887+ given a chance to do there processing before passing back a value to
3888+ the parent. */
3889+ for (group = parser->egroup - 1
3890+ ; group >= parser->groups && (!err || err == EBADKEY)
3891+ ; group--)
3892+ err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
3893+ if (err == EBADKEY)
3894+ err = 0; /* Some parser didn't understand. */
3895+ }
3896+
3897+ /* Call parsers once more, to do any final cleanup. Errors are ignored. */
3898+ for (group = parser->egroup - 1; group >= parser->groups; group--)
3899+ group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
3900+
3901+ if (err == EBADKEY)
3902+ err = EINVAL;
3903+
3904+ free (parser->storage);
3905+
3906+ return err;
3907+}
3908+
3909+/* Call the user parsers to parse the non-option argument VAL, at the current
3910+ position, returning any error. The state NEXT pointer is assumed to have
3911+ been adjusted (by getopt) to point after this argument; this function will
3912+ adjust it correctly to reflect however many args actually end up being
3913+ consumed. */
3914+static error_t
3915+parser_parse_arg (struct parser *parser, char *val)
3916+{
3917+ /* Save the starting value of NEXT, first adjusting it so that the arg
3918+ we're parsing is again the front of the arg vector. */
3919+ int index = --parser->state.next;
3920+ error_t err = EBADKEY;
3921+ struct group *group;
3922+ int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */
3923+
3924+ /* Try to parse the argument in each parser. */
3925+ for (group = parser->groups
3926+ ; group < parser->egroup && err == EBADKEY
3927+ ; group++)
3928+ {
3929+ parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */
3930+ key = ARGP_KEY_ARG;
3931+ err = group_parse (group, &parser->state, key, val);
3932+
3933+ if (err == EBADKEY)
3934+ /* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
3935+ {
3936+ parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
3937+ key = ARGP_KEY_ARGS;
3938+ err = group_parse (group, &parser->state, key, 0);
3939+ }
3940+ }
3941+
3942+ if (! err)
3943+ {
3944+ if (key == ARGP_KEY_ARGS)
3945+ /* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
3946+ changed by the user, *all* arguments should be considered
3947+ consumed. */
3948+ parser->state.next = parser->state.argc;
3949+
3950+ if (parser->state.next > index)
3951+ /* Remember that we successfully processed a non-option
3952+ argument -- but only if the user hasn't gotten tricky and set
3953+ the clock back. */
3954+ (--group)->args_processed += (parser->state.next - index);
3955+ else
3956+ /* The user wants to reparse some args, give getopt another try. */
3957+ parser->try_getopt = 1;
3958+ }
3959+
3960+ return err;
3961+}
3962+
3963+/* Call the user parsers to parse the option OPT, with argument VAL, at the
3964+ current position, returning any error. */
3965+static error_t
3966+parser_parse_opt (struct parser *parser, int opt, char *val)
3967+{
3968+ /* The group key encoded in the high bits; 0 for short opts or
3969+ group_number + 1 for long opts. */
3970+ int group_key = opt >> USER_BITS;
3971+ error_t err = EBADKEY;
3972+
3973+ if (group_key == 0)
3974+ /* A short option. By comparing OPT's position in SHORT_OPTS to the
3975+ various starting positions in each group's SHORT_END field, we can
3976+ determine which group OPT came from. */
3977+ {
3978+ struct group *group;
3979+ char *short_index = strchr (parser->short_opts, opt);
3980+
3981+ if (short_index)
3982+ for (group = parser->groups; group < parser->egroup; group++)
3983+ if (group->short_end > short_index)
3984+ {
3985+ err = group_parse (group, &parser->state, opt,
3986+ parser->opt_data.optarg);
3987+ break;
3988+ }
3989+ }
3990+ else
3991+ /* A long option. We use shifts instead of masking for extracting
3992+ the user value in order to preserve the sign. */
3993+ err =
3994+ group_parse (&parser->groups[group_key - 1], &parser->state,
3995+ (opt << GROUP_BITS) >> GROUP_BITS,
3996+ parser->opt_data.optarg);
3997+
3998+ if (err == EBADKEY)
3999+ /* At least currently, an option not recognized is an error in the
4000+ parser, because we pre-compute which parser is supposed to deal
4001+ with each option. */
4002+ {
4003+ static const char bad_key_err[] =
4004+ N_("(PROGRAM ERROR) Option should have been recognized!?");
4005+ if (group_key == 0)
4006+ argp_error (&parser->state, "-%c: %s", opt,
4007+ dgettext (parser->argp->argp_domain, bad_key_err));
4008+ else
4009+ {
4010+ struct option *long_opt = parser->long_opts;
4011+ while (long_opt->val != opt && long_opt->name)
4012+ long_opt++;
4013+ argp_error (&parser->state, "--%s: %s",
4014+ long_opt->name ? long_opt->name : "???",
4015+ dgettext (parser->argp->argp_domain, bad_key_err));
4016+ }
4017+ }
4018+
4019+ return err;
4020+}
4021+
4022+/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
4023+ Any error from the parsers is returned, and *ARGP_EBADKEY indicates
4024+ whether a value of EBADKEY is due to an unrecognized argument (which is
4025+ generally not fatal). */
4026+static error_t
4027+parser_parse_next (struct parser *parser, int *arg_ebadkey)
4028+{
4029+ int opt;
4030+ error_t err = 0;
4031+
4032+ if (parser->state.quoted && parser->state.next < parser->state.quoted)
4033+ /* The next argument pointer has been moved to before the quoted
4034+ region, so pretend we never saw the quoting `--', and give getopt
4035+ another chance. If the user hasn't removed it, getopt will just
4036+ process it again. */
4037+ parser->state.quoted = 0;
4038+
4039+ if (parser->try_getopt && !parser->state.quoted)
4040+ /* Give getopt a chance to parse this. */
4041+ {
4042+ /* Put it back in OPTIND for getopt. */
4043+ parser->opt_data.optind = parser->state.next;
4044+ /* Distinguish KEY_ERR from a real option. */
4045+ parser->opt_data.optopt = KEY_END;
4046+ if (parser->state.flags & ARGP_LONG_ONLY)
4047+ opt = _getopt_long_only_r (parser->state.argc, parser->state.argv,
4048+ parser->short_opts, parser->long_opts, 0,
4049+ &parser->opt_data);
4050+ else
4051+ opt = _getopt_long_r (parser->state.argc, parser->state.argv,
4052+ parser->short_opts, parser->long_opts, 0,
4053+ &parser->opt_data);
4054+ /* And see what getopt did. */
4055+ parser->state.next = parser->opt_data.optind;
4056+
4057+ if (opt == KEY_END)
4058+ /* Getopt says there are no more options, so stop using
4059+ getopt; we'll continue if necessary on our own. */
4060+ {
4061+ parser->try_getopt = 0;
4062+ if (parser->state.next > 1
4063+ && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
4064+ == 0)
4065+ /* Not only is this the end of the options, but it's a
4066+ `quoted' region, which may have args that *look* like
4067+ options, so we definitely shouldn't try to use getopt past
4068+ here, whatever happens. */
4069+ parser->state.quoted = parser->state.next;
4070+ }
4071+ else if (opt == KEY_ERR && parser->opt_data.optopt != KEY_END)
4072+ /* KEY_ERR can have the same value as a valid user short
4073+ option, but in the case of a real error, getopt sets OPTOPT
4074+ to the offending character, which can never be KEY_END. */
4075+ {
4076+ *arg_ebadkey = 0;
4077+ return EBADKEY;
4078+ }
4079+ }
4080+ else
4081+ opt = KEY_END;
4082+
4083+ if (opt == KEY_END)
4084+ {
4085+ /* We're past what getopt considers the options. */
4086+ if (parser->state.next >= parser->state.argc
4087+ || (parser->state.flags & ARGP_NO_ARGS))
4088+ /* Indicate that we're done. */
4089+ {
4090+ *arg_ebadkey = 1;
4091+ return EBADKEY;
4092+ }
4093+ else
4094+ /* A non-option arg; simulate what getopt might have done. */
4095+ {
4096+ opt = KEY_ARG;
4097+ parser->opt_data.optarg = parser->state.argv[parser->state.next++];
4098+ }
4099+ }
4100+
4101+ if (opt == KEY_ARG)
4102+ /* A non-option argument; try each parser in turn. */
4103+ err = parser_parse_arg (parser, parser->opt_data.optarg);
4104+ else
4105+ err = parser_parse_opt (parser, opt, parser->opt_data.optarg);
4106+
4107+ if (err == EBADKEY)
4108+ *arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
4109+
4110+ return err;
4111+}
4112+
4113+/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
4114+ FLAGS is one of the ARGP_ flags above. If END_INDEX is non-NULL, the
4115+ index in ARGV of the first unparsed option is returned in it. If an
4116+ unknown option is present, EINVAL is returned; if some parser routine
4117+ returned a non-zero value, it is returned; otherwise 0 is returned. */
4118+error_t
4119+argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
4120+ int *end_index, void *input)
4121+{
4122+ error_t err;
4123+ struct parser parser;
4124+
4125+ /* If true, then err == EBADKEY is a result of a non-option argument failing
4126+ to be parsed (which in some cases isn't actually an error). */
4127+ int arg_ebadkey = 0;
4128+
4129+ if (! (flags & ARGP_NO_HELP))
4130+ /* Add our own options. */
4131+ {
4132+ struct argp_child *child = alloca (4 * sizeof (struct argp_child));
4133+ struct argp *top_argp = alloca (sizeof (struct argp));
4134+
4135+ /* TOP_ARGP has no options, it just serves to group the user & default
4136+ argps. */
4137+ memset (top_argp, 0, sizeof (*top_argp));
4138+ top_argp->children = child;
4139+
4140+ memset (child, 0, 4 * sizeof (struct argp_child));
4141+
4142+ if (argp)
4143+ (child++)->argp = argp;
4144+ (child++)->argp = &argp_default_argp;
4145+ if (argp_program_version || argp_program_version_hook)
4146+ (child++)->argp = &argp_version_argp;
4147+ child->argp = 0;
4148+
4149+ argp = top_argp;
4150+ }
4151+
4152+ /* Construct a parser for these arguments. */
4153+ err = parser_init (&parser, argp, argc, argv, flags, input);
4154+
4155+ if (! err)
4156+ /* Parse! */
4157+ {
4158+ while (! err)
4159+ err = parser_parse_next (&parser, &arg_ebadkey);
4160+ err = parser_finalize (&parser, err, arg_ebadkey, end_index);
4161+ }
4162+
4163+ return err;
4164+}
4165+
4166+/* Return the input field for ARGP in the parser corresponding to STATE; used
4167+ by the help routines. */
4168+void *
4169+__argp_input (const struct argp *argp, const struct argp_state *state)
4170+{
4171+ if (state)
4172+ {
4173+ struct group *group;
4174+ struct parser *parser = state->pstate;
4175+
4176+ for (group = parser->groups; group < parser->egroup; group++)
4177+ if (group->argp == argp)
4178+ return group->input;
4179+ }
4180+
4181+ return 0;
4182+}
4183Index: git/libuargp/argp-pv.c
4184===================================================================
4185--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4186+++ git/libuargp/argp-pv.c 2012-06-18 13:10:44.060825542 -0700
4187@@ -0,0 +1,25 @@
4188+/* Default definition for ARGP_PROGRAM_VERSION.
4189+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
4190+ This file is part of the GNU C Library.
4191+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
4192+
4193+ The GNU C Library is free software; you can redistribute it and/or
4194+ modify it under the terms of the GNU Lesser General Public
4195+ License as published by the Free Software Foundation; either
4196+ version 2.1 of the License, or (at your option) any later version.
4197+
4198+ The GNU C Library is distributed in the hope that it will be useful,
4199+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4200+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4201+ Lesser General Public License for more details.
4202+
4203+ You should have received a copy of the GNU Lesser General Public
4204+ License along with the GNU C Library; if not, write to the Free
4205+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4206+ 02111-1307 USA. */
4207+
4208+/* If set by the user program to a non-zero value, then a default option
4209+ --version is added (unless the ARGP_NO_HELP flag is used), which will
4210+ print this this string followed by a newline and exit (unless the
4211+ ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
4212+const char *argp_program_version;
4213Index: git/libuargp/argp-pvh.c
4214===================================================================
4215--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4216+++ git/libuargp/argp-pvh.c 2012-06-18 13:10:44.060825542 -0700
4217@@ -0,0 +1,32 @@
4218+/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
4219+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
4220+ This file is part of the GNU C Library.
4221+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
4222+
4223+ The GNU C Library is free software; you can redistribute it and/or
4224+ modify it under the terms of the GNU Lesser General Public
4225+ License as published by the Free Software Foundation; either
4226+ version 2.1 of the License, or (at your option) any later version.
4227+
4228+ The GNU C Library is distributed in the hope that it will be useful,
4229+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4230+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4231+ Lesser General Public License for more details.
4232+
4233+ You should have received a copy of the GNU Lesser General Public
4234+ License along with the GNU C Library; if not, write to the Free
4235+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4236+ 02111-1307 USA. */
4237+
4238+#ifdef HAVE_CONFIG_H
4239+#include <config.h>
4240+#endif
4241+
4242+#include <argp.h>
4243+
4244+/* If set by the user program to a non-zero value, then a default option
4245+ --version is added (unless the ARGP_NO_HELP flag is used), which calls
4246+ this function with a stream to print the version to and a pointer to the
4247+ current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
4248+ used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
4249+void (*argp_program_version_hook) (FILE *stream, struct argp_state *state);
4250Index: git/libuargp/argp-xinl.c
4251===================================================================
4252--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4253+++ git/libuargp/argp-xinl.c 2012-06-18 13:10:44.060825542 -0700
4254@@ -0,0 +1,35 @@
4255+/* Real definitions for extern inline functions in argp.h
4256+ Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
4257+ This file is part of the GNU C Library.
4258+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
4259+
4260+ The GNU C Library is free software; you can redistribute it and/or
4261+ modify it under the terms of the GNU Lesser General Public
4262+ License as published by the Free Software Foundation; either
4263+ version 2.1 of the License, or (at your option) any later version.
4264+
4265+ The GNU C Library is distributed in the hope that it will be useful,
4266+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4267+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4268+ Lesser General Public License for more details.
4269+
4270+ You should have received a copy of the GNU Lesser General Public
4271+ License along with the GNU C Library; if not, write to the Free
4272+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4273+ 02111-1307 USA. */
4274+
4275+#ifdef HAVE_CONFIG_H
4276+# include <config.h>
4277+#endif
4278+
4279+#if defined _LIBC || defined HAVE_FEATURES_H
4280+# include <features.h>
4281+#endif
4282+
4283+#ifndef __USE_EXTERN_INLINES
4284+# define __USE_EXTERN_INLINES 1
4285+#endif
4286+#define ARGP_EI
4287+#undef __OPTIMIZE__
4288+#define __OPTIMIZE__ 1
4289+#include <argp.h>
4290Index: git/test/argp/Makefile
4291===================================================================
4292--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4293+++ git/test/argp/Makefile 2012-06-18 13:10:44.060825542 -0700
4294@@ -0,0 +1,7 @@
4295+# uClibc argp tests
4296+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4297+
4298+top_builddir=../../
4299+include ../Rules.mak
4300+-include Makefile.in
4301+include ../Test.mak
4302Index: git/test/argp/Makefile.in
4303===================================================================
4304--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4305+++ git/test/argp/Makefile.in 2012-06-18 13:10:44.060825542 -0700
4306@@ -0,0 +1,12 @@
4307+# uClibc argp tests
4308+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4309+
4310+TESTS := $(addprefix argp-, ex1 ex2 ex3 ex4 test) \
4311+ bug-argp1 tst-argp1 tst-argp2
4312+
4313+EXTRA_LDFLAGS = -luargp
4314+
4315+OPTS_argp-ex3 = ARG1 ARG2
4316+OPTS_argp-ex4 = ARG1 string1 string2 string3
4317+OPTS_bug-argp1 = -- --help
4318+
4319Index: git/test/argp/argp-ex1.c
4320===================================================================
4321--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4322+++ git/test/argp/argp-ex1.c 2012-06-18 13:10:44.060825542 -0700
4323@@ -0,0 +1,15 @@
4324+/* Argp example #1 -- a minimal program using argp */
4325+
4326+/* This is (probably) the smallest possible program that
4327+ uses argp. It won't do much except give an error
4328+ messages and exit when there are any arguments, and print
4329+ a (rather pointless) messages for --help. */
4330+
4331+#include <stdlib.h>
4332+#include <argp.h>
4333+
4334+int main (int argc, char **argv)
4335+{
4336+ argp_parse (0, argc, argv, 0, 0, 0);
4337+ exit (0);
4338+}
4339Index: git/test/argp/argp-ex2.c
4340===================================================================
4341--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4342+++ git/test/argp/argp-ex2.c 2012-06-18 13:10:44.060825542 -0700
4343@@ -0,0 +1,45 @@
4344+/* Argp example #2 -- a pretty minimal program using argp */
4345+
4346+/* This program doesn't use any options or arguments, but uses
4347+ argp to be compliant with the GNU standard command line
4348+ format.
4349+
4350+ In addition to making sure no arguments are given, and
4351+ implementing a --help option, this example will have a
4352+ --version option, and will put the given documentation string
4353+ and bug address in the --help output, as per GNU standards.
4354+
4355+ The variable ARGP contains the argument parser specification;
4356+ adding fields to this structure is the way most parameters are
4357+ passed to argp_parse (the first three fields are usually used,
4358+ but not in this small program). There are also two global
4359+ variables that argp knows about defined here,
4360+ ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are
4361+ global variables because they will almost always be constant
4362+ for a given program, even if it uses different argument
4363+ parsers for various tasks). */
4364+
4365+#include <stdlib.h>
4366+#include <argp.h>
4367+
4368+const char *argp_program_version =
4369+ "argp-ex2 1.0";
4370+const char *argp_program_bug_address =
4371+ "<bug-gnu-utils@@gnu.org>";
4372+
4373+/* Program documentation. */
4374+static char doc[] =
4375+ "Argp example #2 -- a pretty minimal program using argp";
4376+
4377+/* Our argument parser. The @code{options}, @code{parser}, and
4378+ @code{args_doc} fields are zero because we have neither options or
4379+ arguments; @code{doc} and @code{argp_program_bug_address} will be
4380+ used in the output for @samp{--help}, and the @samp{--version}
4381+ option will print out @code{argp_program_version}. */
4382+static struct argp argp = { 0, 0, 0, doc };
4383+
4384+int main (int argc, char **argv)
4385+{
4386+ argp_parse (&argp, argc, argv, 0, 0, 0);
4387+ exit (0);
4388+}
4389Index: git/test/argp/argp-ex3.c
4390===================================================================
4391--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4392+++ git/test/argp/argp-ex3.c 2012-06-18 13:10:44.060825542 -0700
4393@@ -0,0 +1,153 @@
4394+/* Argp example #3 -- a program with options and arguments using argp */
4395+
4396+/* This program uses the same features as example 2, and uses options and
4397+ arguments.
4398+
4399+ We now use the first four fields in ARGP, so here's a description of them:
4400+ OPTIONS -- A pointer to a vector of struct argp_option (see below)
4401+ PARSER -- A function to parse a single option, called by argp
4402+ ARGS_DOC -- A string describing how the non-option arguments should look
4403+ DOC -- A descriptive string about this program; if it contains a
4404+ vertical tab character (\v), the part after it will be
4405+ printed *following* the options
4406+
4407+ The function PARSER takes the following arguments:
4408+ KEY -- An integer specifying which option this is (taken
4409+ from the KEY field in each struct argp_option), or
4410+ a special key specifying something else; the only
4411+ special keys we use here are ARGP_KEY_ARG, meaning
4412+ a non-option argument, and ARGP_KEY_END, meaning
4413+ that all arguments have been parsed
4414+ ARG -- For an option KEY, the string value of its
4415+ argument, or NULL if it has none
4416+ STATE-- A pointer to a struct argp_state, containing
4417+ various useful information about the parsing state; used here
4418+ are the INPUT field, which reflects the INPUT argument to
4419+ argp_parse, and the ARG_NUM field, which is the number of the
4420+ current non-option argument being parsed
4421+ It should return either 0, meaning success, ARGP_ERR_UNKNOWN, meaning the
4422+ given KEY wasn't recognized, or an errno value indicating some other
4423+ error.
4424+
4425+ Note that in this example, main uses a structure to communicate with the
4426+ parse_opt function, a pointer to which it passes in the INPUT argument to
4427+ argp_parse. Of course, it's also possible to use global variables
4428+ instead, but this is somewhat more flexible.
4429+
4430+ The OPTIONS field contains a pointer to a vector of struct argp_option's;
4431+ that structure has the following fields (if you assign your option
4432+ structures using array initialization like this example, unspecified
4433+ fields will be defaulted to 0, and need not be specified):
4434+ NAME -- The name of this option's long option (may be zero)
4435+ KEY -- The KEY to pass to the PARSER function when parsing this option,
4436+ *and* the name of this option's short option, if it is a
4437+ printable ascii character
4438+ ARG -- The name of this option's argument, if any
4439+ FLAGS -- Flags describing this option; some of them are:
4440+ OPTION_ARG_OPTIONAL -- The argument to this option is optional
4441+ OPTION_ALIAS -- This option is an alias for the
4442+ previous option
4443+ OPTION_HIDDEN -- Don't show this option in --help output
4444+ DOC -- A documentation string for this option, shown in --help output
4445+
4446+ An options vector should be terminated by an option with all fields zero. */
4447+
4448+#include <stdlib.h>
4449+#include <argp.h>
4450+
4451+const char *argp_program_version =
4452+ "argp-ex3 1.0";
4453+const char *argp_program_bug_address =
4454+ "<bug-gnu-utils@@gnu.org>";
4455+
4456+/* Program documentation. */
4457+static char doc[] =
4458+ "Argp example #3 -- a program with options and arguments using argp";
4459+
4460+/* A description of the arguments we accept. */
4461+static char args_doc[] = "ARG1 ARG2";
4462+
4463+/* The options we understand. */
4464+static struct argp_option options[] = {
4465+ {"verbose", 'v', 0, 0, "Produce verbose output" },
4466+ {"quiet", 'q', 0, 0, "Don't produce any output" },
4467+ {"silent", 's', 0, OPTION_ALIAS },
4468+ {"output", 'o', "FILE", 0,
4469+ "Output to FILE instead of standard output" },
4470+ { 0 }
4471+};
4472+
4473+/* Used by @code{main} to communicate with @code{parse_opt}. */
4474+struct arguments
4475+{
4476+ char *args[2]; /* @var{arg1} & @var{arg2} */
4477+ int silent, verbose;
4478+ char *output_file;
4479+};
4480+
4481+/* Parse a single option. */
4482+static error_t
4483+parse_opt (int key, char *arg, struct argp_state *state)
4484+{
4485+ /* Get the @var{input} argument from @code{argp_parse}, which we
4486+ know is a pointer to our arguments structure. */
4487+ struct arguments *arguments = state->input;
4488+
4489+ switch (key)
4490+ {
4491+ case 'q': case 's':
4492+ arguments->silent = 1;
4493+ break;
4494+ case 'v':
4495+ arguments->verbose = 1;
4496+ break;
4497+ case 'o':
4498+ arguments->output_file = arg;
4499+ break;
4500+
4501+ case ARGP_KEY_ARG:
4502+ if (state->arg_num >= 2)
4503+ /* Too many arguments. */
4504+ argp_usage (state);
4505+
4506+ arguments->args[state->arg_num] = arg;
4507+
4508+ break;
4509+
4510+ case ARGP_KEY_END:
4511+ if (state->arg_num < 2)
4512+ /* Not enough arguments. */
4513+ argp_usage (state);
4514+ break;
4515+
4516+ default:
4517+ return ARGP_ERR_UNKNOWN;
4518+ }
4519+ return 0;
4520+}
4521+
4522+/* Our argp parser. */
4523+static struct argp argp = { options, parse_opt, args_doc, doc };
4524+
4525+int main (int argc, char **argv)
4526+{
4527+ struct arguments arguments;
4528+
4529+ /* Default values. */
4530+ arguments.silent = 0;
4531+ arguments.verbose = 0;
4532+ arguments.output_file = "-";
4533+
4534+ /* Parse our arguments; every option seen by @code{parse_opt} will
4535+ be reflected in @code{arguments}. */
4536+ argp_parse (&argp, argc, argv, 0, 0, &arguments);
4537+
4538+ printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n"
4539+ "VERBOSE = %s\nSILENT = %s\n",
4540+ arguments.args[0], arguments.args[1],
4541+ arguments.output_file,
4542+ arguments.verbose ? "yes" : "no",
4543+ arguments.silent ? "yes" : "no");
4544+
4545+ exit (0);
4546+}
4547Index: git/test/argp/argp-ex4.c
4548===================================================================
4549--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4550+++ git/test/argp/argp-ex4.c 2012-06-18 13:10:44.060825542 -0700
4551@@ -0,0 +1,167 @@
4552+/* Argp example #4 -- a program with somewhat more complicated options */
4553+
4554+/* This program uses the same features as example 3, but has more
4555+ options, and somewhat more structure in the -help output. It
4556+ also shows how you can `steal' the remainder of the input
4557+ arguments past a certain point, for programs that accept a
4558+ list of items. It also shows the special argp KEY value
4559+ ARGP_KEY_NO_ARGS, which is only given if no non-option
4560+ arguments were supplied to the program.
4561+
4562+ For structuring the help output, two features are used,
4563+ *headers* which are entries in the options vector with the
4564+ first four fields being zero, and a two part documentation
4565+ string (in the variable DOC), which allows documentation both
4566+ before and after the options; the two parts of DOC are
4567+ separated by a vertical-tab character ('\v', or '\013'). By
4568+ convention, the documentation before the options is just a
4569+ short string saying what the program does, and that afterwards
4570+ is longer, describing the behavior in more detail. All
4571+ documentation strings are automatically filled for output,
4572+ although newlines may be included to force a line break at a
4573+ particular point. All documentation strings are also passed to
4574+ the `gettext' function, for possible translation into the
4575+ current locale. */
4576+
4577+#include <stdlib.h>
4578+#include <error.h>
4579+#include <argp.h>
4580+
4581+const char *argp_program_version =
4582+ "argp-ex4 1.0";
4583+const char *argp_program_bug_address =
4584+ "<bug-gnu-utils@@prep.ai.mit.edu>";
4585+
4586+/* Program documentation. */
4587+static char doc[] =
4588+ "Argp example #4 -- a program with somewhat more complicated\
4589+options\
4590+\vThis part of the documentation comes *after* the options;\
4591+ note that the text is automatically filled, but it's possible\
4592+ to force a line-break, e.g.\n<-- here.";
4593+
4594+/* A description of the arguments we accept. */
4595+static char args_doc[] = "ARG1 [STRING...]";
4596+
4597+/* Keys for options without short-options. */
4598+#define OPT_ABORT 1 /* --abort */
4599+
4600+/* The options we understand. */
4601+static struct argp_option options[] = {
4602+ {"verbose", 'v', 0, 0, "Produce verbose output" },
4603+ {"quiet", 'q', 0, 0, "Don't produce any output" },
4604+ {"silent", 's', 0, OPTION_ALIAS },
4605+ {"output", 'o', "FILE", 0,
4606+ "Output to FILE instead of standard output" },
4607+
4608+ {0,0,0,0, "The following options should be grouped together:" },
4609+ {"repeat", 'r', "COUNT", OPTION_ARG_OPTIONAL,
4610+ "Repeat the output COUNT (default 10) times"},
4611+ {"abort", OPT_ABORT, 0, 0, "Abort before showing any output"},
4612+
4613+ { 0 }
4614+};
4615+
4616+/* Used by @code{main} to communicate with @code{parse_opt}. */
4617+struct arguments
4618+{
4619+ char *arg1; /* @var{arg1} */
4620+ char **strings; /* [@var{string}@dots{}] */
4621+ int silent, verbose, abort; /* @samp{-s}, @samp{-v}, @samp{--abort} */
4622+ char *output_file; /* @var{file} arg to @samp{--output} */
4623+ int repeat_count; /* @var{count} arg to @samp{--repeat} */
4624+};
4625+
4626+/* Parse a single option. */
4627+static error_t
4628+parse_opt (int key, char *arg, struct argp_state *state)
4629+{
4630+ /* Get the @code{input} argument from @code{argp_parse}, which we
4631+ know is a pointer to our arguments structure. */
4632+ struct arguments *arguments = state->input;
4633+
4634+ switch (key)
4635+ {
4636+ case 'q': case 's':
4637+ arguments->silent = 1;
4638+ break;
4639+ case 'v':
4640+ arguments->verbose = 1;
4641+ break;
4642+ case 'o':
4643+ arguments->output_file = arg;
4644+ break;
4645+ case 'r':
4646+ arguments->repeat_count = arg ? atoi (arg) : 10;
4647+ break;
4648+ case OPT_ABORT:
4649+ arguments->abort = 1;
4650+ break;
4651+
4652+ case ARGP_KEY_NO_ARGS:
4653+ argp_usage (state);
4654+
4655+ case ARGP_KEY_ARG:
4656+ /* Here we know that @code{state->arg_num == 0}, since we
4657+ force argument parsing to end before any more arguments can
4658+ get here. */
4659+ arguments->arg1 = arg;
4660+
4661+ /* Now we consume all the rest of the arguments.
4662+ @code{state->next} is the index in @code{state->argv} of the
4663+ next argument to be parsed, which is the first @var{string}
4664+ we're interested in, so we can just use
4665+ @code{&state->argv[state->next]} as the value for
4666+ arguments->strings.
4667+
4668+ @emph{In addition}, by setting @code{state->next} to the end
4669+ of the arguments, we can force argp to stop parsing here and
4670+ return. */
4671+ arguments->strings = &state->argv[state->next];
4672+ state->next = state->argc;
4673+
4674+ break;
4675+
4676+ default:
4677+ return ARGP_ERR_UNKNOWN;
4678+ }
4679+ return 0;
4680+}
4681+
4682+/* Our argp parser. */
4683+static struct argp argp = { options, parse_opt, args_doc, doc };
4684+
4685+int main (int argc, char **argv)
4686+{
4687+ int i, j;
4688+ struct arguments arguments;
4689+
4690+ /* Default values. */
4691+ arguments.silent = 0;
4692+ arguments.verbose = 0;
4693+ arguments.output_file = "-";
4694+ arguments.repeat_count = 1;
4695+ arguments.abort = 0;
4696+
4697+ /* Parse our arguments; every option seen by @code{parse_opt} will be
4698+ reflected in @code{arguments}. */
4699+ argp_parse (&argp, argc, argv, 0, 0, &arguments);
4700+
4701+ if (arguments.abort)
4702+ error (10, 0, "ABORTED");
4703+
4704+ for (i = 0; i < arguments.repeat_count; i++)
4705+ {
4706+ printf ("ARG1 = %s\n", arguments.arg1);
4707+ printf ("STRINGS = ");
4708+ for (j = 0; arguments.strings[j]; j++)
4709+ printf (j == 0 ? "%s" : ", %s", arguments.strings[j]);
4710+ printf ("\n");
4711+ printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n",
4712+ arguments.output_file,
4713+ arguments.verbose ? "yes" : "no",
4714+ arguments.silent ? "yes" : "no");
4715+ }
4716+
4717+ exit (0);
4718+}
4719Index: git/test/argp/argp-test.c
4720===================================================================
4721--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4722+++ git/test/argp/argp-test.c 2012-06-18 13:10:44.060825542 -0700
4723@@ -0,0 +1,209 @@
4724+/* Test program for argp argument parser
4725+ Copyright (C) 1997 Free Software Foundation, Inc.
4726+ This file is part of the GNU C Library.
4727+ Written by Miles Bader <miles at gnu.ai.mit.edu>.
4728+
4729+ The GNU C Library is free software; you can redistribute it and/or
4730+ modify it under the terms of the GNU Lesser General Public
4731+ License as published by the Free Software Foundation; either
4732+ version 2.1 of the License, or (at your option) any later version.
4733+
4734+ The GNU C Library is distributed in the hope that it will be useful,
4735+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4736+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4737+ Lesser General Public License for more details.
4738+
4739+ You should have received a copy of the GNU Lesser General Public
4740+ License along with the GNU C Library; if not, write to the Free
4741+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4742+ 02111-1307 USA. */
4743+
4744+#ifdef HAVE_CONFIG_H
4745+#include <config.h>
4746+#endif
4747+
4748+#include <stdlib.h>
4749+#include <time.h>
4750+#include <string.h>
4751+#include <argp.h>
4752+
4753+const char *argp_program_version = "argp-test 1.0";
4754+
4755+struct argp_option sub_options[] =
4756+{
4757+ {"subopt1", 's', 0, 0, "Nested option 1"},
4758+ {"subopt2", 'S', 0, 0, "Nested option 2"},
4759+
4760+ { 0, 0, 0, 0, "Some more nested options:", 10},
4761+ {"subopt3", 'p', 0, 0, "Nested option 3"},
4762+
4763+ {"subopt4", 'q', 0, 0, "Nested option 4", 1},
4764+
4765+ {0}
4766+};
4767+
4768+static const char sub_args_doc[] = "STRING...\n-";
4769+static const char sub_doc[] = "\vThis is the doc string from the sub-arg-parser.";
4770+
4771+static error_t
4772+sub_parse_opt (int key, char *arg, struct argp_state *state)
4773+{
4774+ switch (key)
4775+ {
4776+ case ARGP_KEY_NO_ARGS:
4777+ printf ("NO SUB ARGS\n");
4778+ break;
4779+ case ARGP_KEY_ARG:
4780+ printf ("SUB ARG: %s\n", arg);
4781+ break;
4782+
4783+ case 's' : case 'S': case 'p': case 'q':
4784+ printf ("SUB KEY %c\n", key);
4785+ break;
4786+
4787+ default:
4788+ return ARGP_ERR_UNKNOWN;
4789+ }
4790+ return 0;
4791+}
4792+
4793+static char *
4794+sub_help_filter (int key, const char *text, void *input)
4795+{
4796+ if (key == ARGP_KEY_HELP_EXTRA)
4797+ return strdup ("This is some extra text from the sub parser (note that it \
4798+is preceded by a blank line).");
4799+ else
4800+ return (char *)text;
4801+}
4802+
4803+static struct argp sub_argp = {
4804+ sub_options, sub_parse_opt, sub_args_doc, sub_doc, 0, sub_help_filter
4805+};
4806+
4807+/* Structure used to communicate with the parsing functions. */
4808+struct params
4809+{
4810+ unsigned foonly; /* Value parsed for foonly. */
4811+ unsigned foonly_default; /* Default value for it. */
4812+};
4813+
4814+#define OPT_PGRP 1
4815+#define OPT_SESS 2
4816+
4817+struct argp_option options[] =
4818+{
4819+ {"pid", 'p', "PID", 0, "List the process PID"},
4820+ {"pgrp", OPT_PGRP,"PGRP",0, "List processes in the process group PGRP"},
4821+ {"no-parent", 'P', 0, 0, "Include processes without parents"},
4822+ {0, 'x', 0, OPTION_ALIAS},
4823+ {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
4824+ " if there's some reason ps can't"
4825+ " print a field for any process, it's"
4826+ " removed from the output entirely)" },
4827+ {"reverse", 'r', 0, 0, "Reverse the order of any sort"},
4828+ {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
4829+ {"session", OPT_SESS,"SID", OPTION_ARG_OPTIONAL,
4830+ "Add the processes from the session"
4831+ " SID (which defaults to the sid of"
4832+ " the current process)" },
4833+
4834+ {0,0,0,0, "Here are some more options:"},
4835+ {"foonly", 'f', "ZOT", OPTION_ARG_OPTIONAL, "Glork a foonly"},
4836+ {"zaza", 'z', 0, 0, "Snit a zar"},
4837+
4838+ {0}
4839+};
4840+
4841+static const char args_doc[] = "STRING";
4842+static const char doc[] = "Test program for argp."
4843+ "\vThis doc string comes after the options."
4844+ "\nHey! Some manual formatting!"
4845+ "\nThe current time is: %s";
4846+
4847+static void
4848+popt (int key, char *arg)
4849+{
4850+ char buf[10];
4851+ if (isprint (key))
4852+ sprintf (buf, "%c", key);
4853+ else
4854+ sprintf (buf, "%d", key);
4855+ if (arg)
4856+ printf ("KEY %s: %s\n", buf, arg);
4857+ else
4858+ printf ("KEY %s\n", buf);
4859+}
4860+
4861+static error_t
4862+parse_opt (int key, char *arg, struct argp_state *state)
4863+{
4864+ struct params *params = state->input;
4865+
4866+ switch (key)
4867+ {
4868+ case ARGP_KEY_NO_ARGS:
4869+ printf ("NO ARGS\n");
4870+ break;
4871+
4872+ case ARGP_KEY_ARG:
4873+ if (state->arg_num > 0)
4874+ return ARGP_ERR_UNKNOWN; /* Leave it for the sub-arg parser. */
4875+ printf ("ARG: %s\n", arg);
4876+ break;
4877+
4878+ case 'f':
4879+ if (arg)
4880+ params->foonly = atoi (arg);
4881+ else
4882+ params->foonly = params->foonly_default;
4883+ popt (key, arg);
4884+ break;
4885+
4886+ case 'p': case 'P': case OPT_PGRP: case 'x': case 'Q':
4887+ case 'r': case OPT_SESS: case 'z':
4888+ popt (key, arg);
4889+ break;
4890+
4891+ default:
4892+ return ARGP_ERR_UNKNOWN;
4893+ }
4894+ return 0;
4895+}
4896+
4897+static char *
4898+help_filter (int key, const char *text, void *input)
4899+{
4900+ char *new_text;
4901+ struct params *params = input;
4902+
4903+ if (key == ARGP_KEY_HELP_POST_DOC && text)
4904+ {
4905+ time_t now = time (0);
4906+ asprintf (&new_text, text, ctime (&now));
4907+ }
4908+ else if (key == 'f')
4909+ /* Show the default for the --foonly option. */
4910+ asprintf (&new_text, "%s (ZOT defaults to %x)",
4911+ text, params->foonly_default);
4912+ else
4913+ new_text = (char *)text;
4914+
4915+ return new_text;
4916+}
4917+
4918+static struct argp_child argp_children[] = { { &sub_argp }, { 0 } };
4919+static struct argp argp = {
4920+ options, parse_opt, args_doc, doc, argp_children, help_filter
4921+};
4922+
4923+int
4924+main (int argc, char **argv)
4925+{
4926+ struct params params;
4927+ params.foonly = 0;
4928+ params.foonly_default = random ();
4929+ argp_parse (&argp, argc, argv, 0, 0, &params);
4930+ printf ("After parsing: foonly = %x\n", params.foonly);
4931+ return 0;
4932+}
4933Index: git/test/argp/bug-argp1.c
4934===================================================================
4935--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4936+++ git/test/argp/bug-argp1.c 2012-06-18 13:10:44.060825542 -0700
4937@@ -0,0 +1,26 @@
4938+#include <argp.h>
4939+
4940+
4941+static const struct argp_option test_options[] =
4942+{
4943+ { NULL, 'a', NULL, OPTION_DOC, NULL },
4944+ { NULL, 'b', NULL, OPTION_DOC, NULL },
4945+ { NULL, 0, NULL, 0, NULL }
4946+};
4947+
4948+static struct argp test_argp =
4949+{
4950+ test_options
4951+};
4952+
4953+
4954+static int
4955+do_test (int argc, char *argv[])
4956+{
4957+ int i;
4958+ argp_parse (&test_argp, argc, argv, 0, &i, NULL);
4959+ return 0;
4960+}
4961+
4962+#define TEST_FUNCTION do_test (argc, argv)
4963+#include "../test-skeleton.c"
4964Index: git/test/argp/tst-argp1.c
4965===================================================================
4966--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4967+++ git/test/argp/tst-argp1.c 2012-06-18 13:10:44.060825542 -0700
4968@@ -0,0 +1,118 @@
4969+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
4970+ This file is part of the GNU C Library.
4971+ Contributed by Ulrich Drepper <drepper at redhat.com>, 2002.
4972+
4973+ The GNU C Library is free software; you can redistribute it and/or
4974+ modify it under the terms of the GNU Lesser General Public
4975+ License as published by the Free Software Foundation; either
4976+ version 2.1 of the License, or (at your option) any later version.
4977+
4978+ The GNU C Library is distributed in the hope that it will be useful,
4979+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4980+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4981+ Lesser General Public License for more details.
4982+
4983+ You should have received a copy of the GNU Lesser General Public
4984+ License along with the GNU C Library; if not, write to the Free
4985+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4986+ 02111-1307 USA. */
4987+
4988+#include <argp.h>
4989+
4990+
4991+
4992+
4993+#define OPT_TO_THREAD 300
4994+#define OPT_TO_PROCESS 301
4995+#define OPT_SYNC_SIGNAL 302
4996+#define OPT_SYNC_JOIN 303
4997+#define OPT_TOPLEVEL 304
4998+
4999+
5000+static const struct argp_option test_options[] =
5001+ {
5002+ { NULL, 0, NULL, 0, "\
5003+This is a test for threads so we allow ther user to selection the number of \
5004+threads which are used at any one time. Independently the total number of \
5005+rounds can be selected. This is the total number of threads which will have \
5006+run when the process terminates:" },
5007+ { "threads", 't', "NUMBER", 0, "Number of threads used at once" },
5008+ { "starts", 's', "NUMBER", 0, "Total number of working threads" },
5009+ { "toplevel", OPT_TOPLEVEL, "NUMBER", 0,
5010+ "Number of toplevel threads which start the other threads; this \
5011+implies --sync-join" },
5012+
5013+ { NULL, 0, NULL, 0, "\
5014+Each thread can do one of two things: sleep or do work. The latter is 100% \
5015+CPU bound. The work load is the probability a thread does work. All values \
5016+from zero to 100 (inclusive) are valid. How often each thread repeats this \
5017+can be determined by the number of rounds. The work cost determines how long \
5018+each work session (not sleeping) takes. If it is zero a thread would \
5019+effectively nothing. By setting the number of rounds to zero the thread \
5020+does no work at all and pure thread creation times can be measured." },
5021+ { "workload", 'w', "PERCENT", 0, "Percentage of time spent working" },
5022+ { "workcost", 'c', "NUMBER", 0,
5023+ "Factor in the cost of each round of working" },
5024+ { "rounds", 'r', "NUMBER", 0, "Number of rounds each thread runs" },
5025+
5026+ { NULL, 0, NULL, 0, "\
5027+There are a number of different methods how thread creation can be \
5028+synchronized. Synchronization is necessary since the number of concurrently \
5029+running threads is limited." },
5030+ { "sync-signal", OPT_SYNC_SIGNAL, NULL, 0,
5031+ "Synchronize using a signal (default)" },
5032+ { "sync-join", OPT_SYNC_JOIN, NULL, 0, "Synchronize using pthread_join" },
5033+
5034+ { NULL, 0, NULL, 0, "\
5035+One parameter for each threads execution is the size of the stack. If this \
5036+parameter is not used the system's default stack size is used. If many \
5037+threads are used the stack size should be chosen quite small." },
5038+ { "stacksize", 'S', "BYTES", 0, "Size of threads stack" },
5039+ { "guardsize", 'g', "BYTES", 0,
5040+ "Size of stack guard area; must fit into the stack" },
5041+
5042+ { NULL, 0, NULL, 0, "Signal options:" },
5043+ { "to-thread", OPT_TO_THREAD, NULL, 0, "Send signal to main thread" },
5044+ { "to-process", OPT_TO_PROCESS, NULL, 0,
5045+ "Send signal to process (default)" },
5046+
5047+ { NULL, 0, NULL, 0, "Administrative options:" },
5048+ { "progress", 'p', NULL, 0, "Show signs of progress" },
5049+ { "timing", 'T', NULL, 0,
5050+ "Measure time from startup to the last thread finishing" },
5051+ { NULL, 0, NULL, 0, NULL }
5052+ };
5053+
5054+/* Prototype for option handler. */
5055+static error_t parse_opt (int key, char *arg, struct argp_state *state);
5056+
5057+/* Data structure to communicate with argp functions. */
5058+static struct argp argp =
5059+{
5060+ test_options, parse_opt
5061+};
5062+
5063+
5064+static int
5065+do_test (void)
5066+{
5067+ int argc = 2;
5068+ char *argv[3] = { (char *) "tst-argp1", (char *) "--help", NULL };
5069+ int remaining;
5070+
5071+ /* Parse and process arguments. */
5072+ argp_parse (&argp, argc, argv, 0, &remaining, NULL);
5073+
5074+ return 0;
5075+}
5076+
5077+
5078+/* Handle program arguments. */
5079+static error_t
5080+parse_opt (int key, char *arg, struct argp_state *state)
5081+{
5082+ return ARGP_ERR_UNKNOWN;
5083+}
5084+
5085+#define TEST_FUNCTION do_test ()
5086+#include "../test-skeleton.c"
5087Index: git/test/argp/tst-argp2.c
5088===================================================================
5089--- /dev/null 1970-01-01 00:00:00.000000000 +0000
5090+++ git/test/argp/tst-argp2.c 2012-06-18 13:10:44.064825538 -0700
5091@@ -0,0 +1,101 @@
5092+/* Copyright (C) 2007 Free Software Foundation, Inc.
5093+ This file is part of the GNU C Library.
5094+ Contributed by Jakub Jelinek <jakub at redhat.com>, 2007.
5095+
5096+ The GNU C Library is free software; you can redistribute it and/or
5097+ modify it under the terms of the GNU Lesser General Public
5098+ License as published by the Free Software Foundation; either
5099+ version 2.1 of the License, or (at your option) any later version.
5100+
5101+ The GNU C Library is distributed in the hope that it will be useful,
5102+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5103+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5104+ Lesser General Public License for more details.
5105+
5106+ You should have received a copy of the GNU Lesser General Public
5107+ License along with the GNU C Library; if not, write to the Free
5108+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
5109+ 02111-1307 USA. */
5110+
5111+#include <argp.h>
5112+
5113+static const struct argp_option opt1[] =
5114+ {
5115+ { "opt1", '1', "NUMBER", 0, "Option 1" },
5116+ { NULL, 0, NULL, 0, NULL }
5117+ };
5118+
5119+static const struct argp_option opt2[] =
5120+ {
5121+ { "opt2", '2', "NUMBER", 0, "Option 2" },
5122+ { NULL, 0, NULL, 0, NULL }
5123+ };
5124+
5125+static const struct argp_option opt3[] =
5126+ {
5127+ { "opt3", '3', "NUMBER", 0, "Option 3" },
5128+ { NULL, 0, NULL, 0, NULL }
5129+ };
5130+
5131+static const struct argp_option opt4[] =
5132+ {
5133+ { "opt4", '4', "NUMBER", 0, "Option 4" },
5134+ { NULL, 0, NULL, 0, NULL }
5135+ };
5136+
5137+static const struct argp_option opt5[] =
5138+ {
5139+ { "opt5", '5', "NUMBER", 0, "Option 5" },
5140+ { NULL, 0, NULL, 0, NULL }
5141+ };
5142+
5143+static struct argp argp5 =
5144+ {
5145+ opt5, NULL, "args doc5", "doc5", NULL, NULL, NULL
5146+ };
5147+
5148+static struct argp argp4 =
5149+ {
5150+ opt4, NULL, "args doc4", "doc4", NULL, NULL, NULL
5151+ };
5152+
5153+static struct argp argp3 =
5154+ {
5155+ opt3, NULL, "args doc3", "doc3", NULL, NULL, NULL
5156+ };
5157+
5158+static struct argp_child children2[] =
5159+ {
5160+ { &argp4, 0, "child3", 3 },
5161+ { &argp5, 0, "child4", 4 },
5162+ { NULL, 0, NULL, 0 }
5163+ };
5164+
5165+static struct argp argp2 =
5166+ {
5167+ opt2, NULL, "args doc2", "doc2", children2, NULL, NULL
5168+ };
5169+
5170+static struct argp_child children1[] =
5171+ {
5172+ { &argp2, 0, "child1", 1 },
5173+ { &argp3, 0, "child2", 2 },
5174+ { NULL, 0, NULL, 0 }
5175+ };
5176+
5177+static struct argp argp1 =
5178+ {
5179+ opt1, NULL, "args doc1", "doc1", children1, NULL, NULL
5180+ };
5181+
5182+
5183+static int
5184+do_test (void)
5185+{
5186+ argp_help (&argp1, stdout, ARGP_HELP_LONG, (char *) "tst-argp2");
5187+ return 0;
5188+}
5189+
5190+
5191+#define TEST_FUNCTION do_test ()
5192+#include "../test-skeleton.c"
diff --git a/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
new file mode 100644
index 0000000000..15ee0ca156
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
@@ -0,0 +1,21 @@
1When compiling in thumb mode for arm with -Os gcc gives up since it can not find registers
2to spill. So we use -O2 option for compiling fork.c It may be addressable in gcc.
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5
6Upstream-Status: Pending
7
8diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
9index 329d8a9..41e3646 100644
10--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
11+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
12@@ -30,3 +30,9 @@ CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
13 # This macro should be alternatively implemented in THUMB
14 # assembly.
15 ASFLAGS-vfork.S = -marm
16+
17+# For arm fork.c does not compile with -Os when in compiling
18+# in thumb1 mode
19+ifeq ($(COMPILE_IN_THUMB_MODE),y)
20+CFLAGS-fork.c = -O2
21+endif
diff --git a/meta/recipes-core/uclibc/uclibc-git/locale.cfg b/meta/recipes-core/uclibc/uclibc-git/locale.cfg
new file mode 100644
index 0000000000..fc66435163
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/locale.cfg
@@ -0,0 +1,3 @@
1UCLIBC_HAS_LOCALE=y
2UCLIBC_HAS_XLOCALE=y
3UCLIBC_BUILD_MINIMAL_LOCALE=y
diff --git a/meta/recipes-core/uclibc/uclibc-git/obstack.cfg b/meta/recipes-core/uclibc/uclibc-git/obstack.cfg
new file mode 100644
index 0000000000..36bf9d6e4a
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/obstack.cfg
@@ -0,0 +1 @@
UCLIBC_HAS_OBSTACK=y
diff --git a/meta/recipes-core/uclibc/uclibc-git/orign_path.patch b/meta/recipes-core/uclibc/uclibc-git/orign_path.patch
new file mode 100644
index 0000000000..81bb8f8459
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/orign_path.patch
@@ -0,0 +1,186 @@
1Patch is backported from
2http://lists.busybox.net/pipermail/uclibc/2011-March/045003.html
3
4Upstream-Status: Pending
5
6Index: git/ldso/ldso/dl-elf.c
7===================================================================
8--- git.orig/ldso/ldso/dl-elf.c 2012-06-19 18:29:08.629931662 -0700
9+++ git/ldso/ldso/dl-elf.c 2012-06-19 21:21:14.798431393 -0700
10@@ -133,56 +133,60 @@
11 * in uClibc/ldso/util/ldd.c */
12 static struct elf_resolve *
13 search_for_named_library(const char *name, unsigned rflags, const char *path_list,
14- struct dyn_elf **rpnt)
15+ struct dyn_elf **rpnt, const char* origin)
16 {
17- char *path, *path_n, *mylibname;
18+ char *mylibname;
19 struct elf_resolve *tpnt;
20- int done;
21+ const char *p, *pn;
22+ int plen;
23
24 if (path_list==NULL)
25 return NULL;
26
27- /* We need a writable copy of this string, but we don't
28- * need this allocated permanently since we don't want
29- * to leak memory, so use alloca to put path on the stack */
30- done = _dl_strlen(path_list);
31- path = alloca(done + 1);
32-
33 /* another bit of local storage */
34 mylibname = alloca(2050);
35
36- _dl_memcpy(path, path_list, done+1);
37-
38 /* Unlike ldd.c, don't bother to eliminate double //s */
39
40 /* Replace colons with zeros in path_list */
41 /* : at the beginning or end of path maps to CWD */
42 /* :: anywhere maps CWD */
43 /* "" maps to CWD */
44- done = 0;
45- path_n = path;
46- do {
47- if (*path == 0) {
48- *path = ':';
49- done = 1;
50+ for (p = path_list; p != NULL; p = pn) {
51+ pn = _dl_strchr(p + 1, ':');
52+ if (pn != NULL) {
53+ plen = pn - p;
54+ pn++;
55+ } else
56+ plen = _dl_strlen(p);
57+
58+ if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
59+ int olen;
60+ if (rflags && plen != 7)
61+ continue;
62+ if (origin == NULL)
63+ continue;
64+ for (olen = _dl_strlen(origin) - 1; olen >= 0 && origin[olen] != '/'; olen--)
65+ ;
66+ if (olen <= 0)
67+ continue;
68+ _dl_memcpy(&mylibname[0], origin, olen);
69+ _dl_memcpy(&mylibname[olen], p + 7, plen - 7);
70+ mylibname[olen + plen - 7] = 0;
71+ } else if (plen != 0) {
72+ _dl_memcpy(mylibname, p, plen);
73+ mylibname[plen] = 0;
74+ } else {
75+ _dl_strcpy(mylibname, ".");
76 }
77- if (*path == ':') {
78- *path = 0;
79- if (*path_n)
80- _dl_strcpy(mylibname, path_n);
81- else
82- _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
83- _dl_strcat(mylibname, "/");
84- _dl_strcat(mylibname, name);
85+ _dl_strcat(mylibname, "/");
86+ _dl_strcat(mylibname, name);
87 #ifdef __LDSO_SAFE_RUNPATH__
88- if (*mylibname == '/')
89+ if (*mylibname == '/')
90 #endif
91- if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
92- return tpnt;
93- path_n = path+1;
94- }
95- path++;
96- } while (!done);
97+ if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
98+ return tpnt;
99+ }
100 return NULL;
101 }
102
103@@ -234,8 +238,10 @@
104 if (pnt) {
105 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
106 _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
107- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
108+ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt,
109+ tpnt->libname)) != NULL)
110 return tpnt1;
111+
112 }
113 #endif
114
115@@ -243,7 +249,7 @@
116 /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
117 if (_dl_library_path) {
118 _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
119- if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt)) != NULL)
120+ if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt, NULL)) != NULL)
121 {
122 return tpnt1;
123 }
124@@ -257,7 +263,7 @@
125 if (pnt) {
126 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
127 _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
128- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
129+ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, NULL)) != NULL)
130 return tpnt1;
131 }
132 #endif
133@@ -291,7 +297,7 @@
134 /* Look for libraries wherever the shared library loader
135 * was installed */
136 _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
137- tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt);
138+ tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt, NULL);
139 if (tpnt1 != NULL)
140 return tpnt1;
141 #endif
142@@ -304,7 +310,7 @@
143 #ifndef __LDSO_CACHE_SUPPORT__
144 ":" UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib"
145 #endif
146- , rpnt);
147+ , rpnt, NULL);
148 if (tpnt1 != NULL)
149 return tpnt1;
150
151Index: git/ldso/ldso/ldso.c
152===================================================================
153--- git.orig/ldso/ldso/ldso.c 2012-06-19 18:29:08.633931663 -0700
154+++ git/ldso/ldso/ldso.c 2012-06-19 18:29:10.197931738 -0700
155@@ -403,6 +403,20 @@
156 return p - list;
157 }
158
159+static void _dl_setup_progname(const char *argv0)
160+{
161+ char image[PATH_MAX];
162+ ssize_t s;
163+
164+ s = _dl_readlink("/proc/self/exe", image, sizeof(image));
165+ if (s > 0 && image[0] == '/') {
166+ image[s] = 0;
167+ _dl_progname = _dl_strdup(image);
168+ } else if (argv0) {
169+ _dl_progname = argv0;
170+ }
171+}
172+
173 void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
174 ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv
175 DL_GET_READY_TO_RUN_EXTRA_PARMS)
176@@ -454,9 +468,7 @@
177 * been fixed up by now. Still no function calls outside of this
178 * library, since the dynamic resolver is not yet ready.
179 */
180- if (argv[0]) {
181- _dl_progname = argv[0];
182- }
183+ _dl_setup_progname(argv[0]);
184
185 #ifdef __DSBT__
186 _dl_ldso_dsbt = (void *)tpnt->dynamic_info[DT_DSBT_BASE_IDX];
diff --git a/meta/recipes-core/uclibc/uclibc-git/powerpc_copysignl.patch b/meta/recipes-core/uclibc/uclibc-git/powerpc_copysignl.patch
new file mode 100644
index 0000000000..2f014cd91e
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/powerpc_copysignl.patch
@@ -0,0 +1,113 @@
1Add ppc copysignl implementation
2
3Upstream-Status: Pending
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: git/libc/sysdeps/linux/powerpc/Makefile.arch
8===================================================================
9--- git.orig/libc/sysdeps/linux/powerpc/Makefile.arch 2013-05-23 11:09:50.000000000 -0700
10+++ git/libc/sysdeps/linux/powerpc/Makefile.arch 2013-05-23 11:12:06.072328399 -0700
11@@ -5,7 +5,7 @@
12 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
13 #
14
15-CSRC-y := __syscall_error.c ioctl.c
16+CSRC-y := __syscall_error.c ioctl.c copysignl.c
17
18 SSRC-y := \
19 __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
20Index: git/libc/sysdeps/linux/powerpc/copysignl.c
21===================================================================
22--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23+++ git/libc/sysdeps/linux/powerpc/copysignl.c 2013-05-23 11:11:37.600327865 -0700
24@@ -0,0 +1,89 @@
25+/* s_copysignl.c -- long double version of s_copysign.c.
26+ * Conversion to long double by Ulrich Drepper,
27+ * Cygnus Support, drepper@cygnus.com.
28+ */
29+
30+/*
31+ * ====================================================
32+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
33+ *
34+ * Developed at SunPro, a Sun Microsystems, Inc. business.
35+ * Permission to use, copy, modify, and distribute this
36+ * software is freely granted, provided that this notice
37+ * is preserved.
38+ * ====================================================
39+ */
40+
41+/*
42+ * copysignl(long double x, long double y)
43+ * copysignl(x,y) returns a value with the magnitude of x and
44+ * with the sign bit of y.
45+ */
46+
47+#include <endian.h>
48+#include <stdint.h>
49+
50+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
51+
52+typedef union
53+{
54+ long double value;
55+ struct
56+ {
57+ int sign_exponent:16;
58+ unsigned int empty:16;
59+ uint32_t msw;
60+ uint32_t lsw;
61+ } parts;
62+} ieee_long_double_shape_type;
63+
64+#endif
65+
66+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
67+
68+typedef union
69+{
70+ long double value;
71+ struct
72+ {
73+ uint32_t lsw;
74+ uint32_t msw;
75+ int sign_exponent:16;
76+ unsigned int empty:16;
77+ } parts;
78+} ieee_long_double_shape_type;
79+
80+#endif
81+
82+/* Get int from the exponent of a long double. */
83+
84+#define GET_LDOUBLE_EXP(exp,d) \
85+do { \
86+ ieee_long_double_shape_type ge_u; \
87+ ge_u.value = (d); \
88+ (exp) = ge_u.parts.sign_exponent; \
89+} while (0)
90+
91+/* Set exponent of a long double from an int. */
92+
93+#define SET_LDOUBLE_EXP(d,exp) \
94+do { \
95+ ieee_long_double_shape_type se_u; \
96+ se_u.value = (d); \
97+ se_u.parts.sign_exponent = (exp); \
98+ (d) = se_u.value; \
99+} while (0)
100+
101+long double copysignl(long double x, long double y);
102+libc_hidden_proto(copysignl);
103+
104+long double copysignl(long double x, long double y)
105+{
106+ uint32_t es1,es2;
107+ GET_LDOUBLE_EXP(es1,x);
108+ GET_LDOUBLE_EXP(es2,y);
109+ SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
110+ return x;
111+}
112+
113+libc_hidden_def(copysignl);
diff --git a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
new file mode 100644
index 0000000000..d2a8a81b94
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
@@ -0,0 +1,140 @@
1Dont support localised optimizations this helps to have a global -O level
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5
6Index: git/libpthread/nptl/pthread_mutex_timedlock.c
7===================================================================
8--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:22:20.000000000 -0800
9+++ git/libpthread/nptl/pthread_mutex_timedlock.c 2013-01-21 16:24:12.275557670 -0800
10@@ -28,7 +28,9 @@
11 * error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
12 */
13 int
14+#ifndef __OPTIMIZE__
15 attribute_optimize("Os")
16+#endif
17 pthread_mutex_timedlock (
18 pthread_mutex_t *mutex,
19 const struct timespec *abstime)
20Index: git/libc/sysdeps/linux/powerpc/bits/mathinline.h
21===================================================================
22--- git.orig/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
23+++ git/libc/sysdeps/linux/powerpc/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
24@@ -26,7 +26,7 @@
25 #ifdef __cplusplus
26 # define __MATH_INLINE __inline
27 #else
28-# define __MATH_INLINE extern __inline
29+# define __MATH_INLINE __extern_inline
30 #endif /* __cplusplus */
31
32 #if defined __GNUC__ && !defined _SOFT_FLOAT
33Index: git/libc/sysdeps/linux/alpha/bits/mathinline.h
34===================================================================
35--- git.orig/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
36+++ git/libc/sysdeps/linux/alpha/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
37@@ -24,7 +24,7 @@
38 #ifdef __cplusplus
39 # define __MATH_INLINE __inline
40 #else
41-# define __MATH_INLINE extern __inline
42+# define __MATH_INLINE __extern_inline
43 #endif
44
45 #if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
46Index: git/libc/sysdeps/linux/i386/bits/mathinline.h
47===================================================================
48--- git.orig/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
49+++ git/libc/sysdeps/linux/i386/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
50@@ -25,7 +25,7 @@
51 #ifdef __cplusplus
52 # define __MATH_INLINE __inline
53 #else
54-# define __MATH_INLINE extern __inline
55+# define __MATH_INLINE __extern_inline
56 #endif
57
58
59Index: git/libc/sysdeps/linux/ia64/bits/mathinline.h
60===================================================================
61--- git.orig/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
62+++ git/libc/sysdeps/linux/ia64/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
63@@ -23,7 +23,7 @@
64 #ifdef __cplusplus
65 # define __MATH_INLINE __inline
66 #else
67-# define __MATH_INLINE extern __inline
68+# define __MATH_INLINE __extern_inline
69 #endif
70
71 #if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
72Index: git/libc/sysdeps/linux/m68k/bits/mathinline.h
73===================================================================
74--- git.orig/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
75+++ git/libc/sysdeps/linux/m68k/bits/mathinline.h 2013-01-21 16:24:12.275557670 -0800
76@@ -91,7 +91,7 @@
77 # ifdef __cplusplus
78 # define __m81_inline __inline
79 # else
80-# define __m81_inline extern __inline
81+# define __m81_inline __extern_inline
82 # endif
83 # define __M81_MATH_INLINES 1
84 #endif
85@@ -350,14 +350,14 @@
86 /* Note that there must be no whitespace before the argument passed for
87 NAME, to make token pasting work correctly with -traditional. */
88 # define __inline_forward_c(rettype, name, args1, args2) \
89-extern __inline rettype __attribute__((__const__)) \
90+__extern_inline rettype __attribute__((__const__)) \
91 name args1 \
92 { \
93 return __CONCAT(__,name) args2; \
94 }
95
96 # define __inline_forward(rettype, name, args1, args2) \
97-extern __inline rettype name args1 \
98+__extern_inline rettype name args1 \
99 { \
100 return __CONCAT(__,name) args2; \
101 }
102Index: git/libc/sysdeps/linux/mips/sys/tas.h
103===================================================================
104--- git.orig/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:22:20.000000000 -0800
105+++ git/libc/sysdeps/linux/mips/sys/tas.h 2013-01-21 16:24:12.275557670 -0800
106@@ -29,7 +29,7 @@
107 #ifdef __USE_EXTERN_INLINES
108
109 # ifndef _EXTERN_INLINE
110-# define _EXTERN_INLINE extern __inline
111+# define _EXTERN_INLINE __extern_inline
112 # endif
113
114 _EXTERN_INLINE int
115Index: git/libc/sysdeps/linux/sparc/bits/mathinline.h
116===================================================================
117--- git.orig/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
118+++ git/libc/sysdeps/linux/sparc/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
119@@ -130,7 +130,7 @@
120 # ifdef __cplusplus
121 # define __MATH_INLINE __inline
122 # else
123-# define __MATH_INLINE extern __inline
124+# define __MATH_INLINE __extern_inline
125 # endif /* __cplusplus */
126
127 /* The gcc, version 2.7 or below, has problems with all this inlining
128Index: git/libc/sysdeps/linux/x86_64/bits/mathinline.h
129===================================================================
130--- git.orig/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:22:20.000000000 -0800
131+++ git/libc/sysdeps/linux/x86_64/bits/mathinline.h 2013-01-21 16:24:12.279557671 -0800
132@@ -24,7 +24,7 @@
133 #ifdef __cplusplus
134 # define __MATH_INLINE __inline
135 #else
136-# define __MATH_INLINE extern __inline
137+# define __MATH_INLINE __extern_inline
138 #endif
139
140
diff --git a/meta/recipes-core/uclibc/uclibc-git/uClibc.distro b/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
new file mode 100644
index 0000000000..c309e6f79a
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
@@ -0,0 +1,192 @@
1#
2# General Library Settings
3#
4# HAVE_NO_PIC is not set
5# DOPIC is not set
6# HAVE_NO_SHARED is not set
7# ARCH_HAS_NO_LDSO is not set
8HAVE_SHARED=y
9# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
10LDSO_LDD_SUPPORT=y
11LDSO_CACHE_SUPPORT=y
12# LDSO_PRELOAD_FILE_SUPPORT is not set
13LDSO_BASE_FILENAME="ld.so"
14# UCLIBC_STATIC_LDCONFIG is not set
15LDSO_RUNPATH=y
16UCLIBC_CTOR_DTOR=y
17LDSO_GNU_HASH_SUPPORT=y
18# HAS_NO_THREADS is not set
19UCLIBC_HAS_THREADS=y
20UCLIBC_HAS_THREADS_NATIVE=y
21PTHREADS_DEBUG_SUPPORT=y
22# LINUXTHREADS_OLD is not set
23UCLIBC_HAS_LFS=y
24# MALLOC is not set
25# MALLOC_SIMPLE is not set
26MALLOC_STANDARD=y
27MALLOC_GLIBC_COMPAT=y
28UCLIBC_DYNAMIC_ATEXIT=y
29COMPAT_ATEXIT=y
30UCLIBC_SUSV3_LEGACY=y
31UCLIBC_SUSV3_LEGACY_MACROS=y
32UCLIBC_SUSV4_LEGACY=y
33UCLIBC_HAS_SHADOW=y
34UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
35UCLIBC_HAS___PROGNAME=y
36UNIX98PTY_ONLY=y
37ASSUME_DEVPTS=y
38UCLIBC_HAS_LIBUTIL=y
39UCLIBC_HAS_TM_EXTENSIONS=y
40UCLIBC_HAS_TZ_CACHING=y
41UCLIBC_HAS_TZ_FILE=y
42UCLIBC_HAS_TZ_FILE_READ_MANY=y
43UCLIBC_TZ_FILE_PATH="/etc/TZ"
44
45#
46# Advanced Library Settings
47#
48UCLIBC_PWD_BUFFER_SIZE=256
49UCLIBC_GRP_BUFFER_SIZE=256
50
51#
52# Networking Support
53#
54UCLIBC_HAS_IPV6=y
55UCLIBC_HAS_RPC=y
56UCLIBC_HAS_FULL_RPC=y
57UCLIBC_HAS_REENTRANT_RPC=y
58UCLIBC_USE_NETLINK=y
59UCLIBC_SUPPORT_AI_ADDRCONFIG=y
60
61UCLIBC_HAS_BSD_RES_CLOSE=y
62UCLIBC_HAS_LIBRESOLV_STUB=y
63UCLIBC_HAS_LIBNSL_STUB=y
64
65#
66# String and Stdio Support
67#
68UCLIBC_HAS_STRING_GENERIC_OPT=y
69UCLIBC_HAS_STRING_ARCH_OPT=y
70UCLIBC_HAS_CTYPE_TABLES=y
71UCLIBC_HAS_CTYPE_SIGNED=y
72# UCLIBC_HAS_CTYPE_UNSAFE is not set
73UCLIBC_HAS_CTYPE_CHECKED=y
74# UCLIBC_HAS_CTYPE_ENFORCED is not set
75UCLIBC_HAS_WCHAR=y
76# UCLIBC_HAS_LOCALE is not set
77UCLIBC_HAS_HEXADECIMAL_FLOATS=y
78UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
79UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
80UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
81# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
82UCLIBC_HAS_STDIO_BUFSIZ_256=y
83# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
84# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
85# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
86# UCLIBC_HAS_STDIO_BUFSIZ_4096 is not set
87# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
88UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
89# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
90# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
91# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
92UCLIBC_HAS_STDIO_GETC_MACRO=y
93UCLIBC_HAS_STDIO_PUTC_MACRO=y
94UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
95# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
96UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
97UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
98UCLIBC_HAS_PRINTF_M_SPEC=y
99UCLIBC_HAS_ERRNO_MESSAGES=y
100# UCLIBC_HAS_SYS_ERRLIST is not set
101UCLIBC_HAS_SIGNUM_MESSAGES=y
102# UCLIBC_HAS_SYS_SIGLIST is not set
103UCLIBC_HAS_GNU_GETOPT=y
104UCLIBC_HAS_GNU_GETSUBOPT=y
105
106#
107# Big and Tall
108#
109UCLIBC_HAS_REGEX=y
110# UCLIBC_HAS_REGEX_OLD is not set
111UCLIBC_HAS_FNMATCH=y
112# UCLIBC_HAS_FNMATCH_OLD is not set
113UCLIBC_HAS_WORDEXP=y
114UCLIBC_HAS_NFTW=y
115UCLIBC_HAS_FTW=y
116UCLIBC_HAS_FTS=y
117UCLIBC_HAS_GLOB=y
118UCLIBC_HAS_GNU_GLOB=y
119
120#
121# Library Installation Options
122#
123SHARED_LIB_LOADER_PREFIX="/lib"
124RUNTIME_PREFIX="/"
125DEVEL_PREFIX="//usr"
126
127#
128# Security options
129#
130# UCLIBC_BUILD_PIE is not set
131# UCLIBC_HAS_ARC4RANDOM is not set
132# HAVE_NO_SSP is not set
133# UCLIBC_HAS_SSP is not set
134UCLIBC_BUILD_RELRO=y
135UCLIBC_BUILD_NOW=y
136UCLIBC_BUILD_NOEXECSTACK=y
137
138#
139# uClibc development/debugging options
140#
141CROSS_COMPILER_PREFIX=""
142UCLIBC_EXTRA_CFLAGS=""
143# DODEBUG is not set
144# DODEBUG_PT is not set
145# DOSTRIP is not set
146# DOASSERTS is not set
147# SUPPORT_LD_DEBUG is not set
148# SUPPORT_LD_DEBUG_EARLY is not set
149# UCLIBC_MALLOC_DEBUGGING is not set
150UCLIBC_HAS_BACKTRACE=y
151WARNINGS="-Wall"
152# EXTRA_WARNINGS is not set
153# DOMULTI is not set
154# UCLIBC_MJN3_ONLY is not set
155
156# math stuff for perl
157DO_C99_MATH=y
158UCLIBC_HAS_LONG_DOUBLE_MATH=y
159UCLIBC_HAS_FENV=y
160UCLIBC_LINUX_MODULE_26=y
161# UCLIBC_LINUX_MODULE_24 is not set
162UCLIBC_LINUX_SPECIFIC=y
163UCLIBC_HAS_REALTIME=y
164UCLIBC_HAS_ADVANCED_REALTIME=y
165UCLIBC_HAS_NETWORK_SUPPORT=y
166UCLIBC_HAS_SOCKET=y
167UCLIBC_HAS_BSD_ERR=y
168UCLIBC_HAS_SYSLOG=y
169UCLIBC_HAS_CRYPT=y
170UCLIBC_HAS_CRYPT_IMPL=y
171UCLIBC_HAS_GNU_ERROR=y
172UCLIBC_HAS_PTY=y
173UCLIBC_BSD_SPECIFIC=y
174UCLIBC_HAS_EPOLL=y
175UCLIBC_HAS_FLOATS=y
176
177# The below option is needed for ARM since depending
178# upong what intruction set is chosen this will be
179# enabled. As such it is harmless and will be punted
180# by menuconfig for other arches.
181
182# COMPILE_IN_THUMB_MODE is not set
183
184# needed by systemd
185UCLIBC_HAS_UTMPX=y
186UCLIBC_LINUX_MODULE_26=y
187UCLIBC_HAS_RESOLVER_SUPPORT=y
188# needed for LTP
189UCLIBC_SUSV4_LEGACY=y
190UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
191DO_XSI_MATH=y
192UCLIBC_SV4_DEPRECATED=y
diff --git a/meta/recipes-core/uclibc/uclibc-git/uClibc.machine b/meta/recipes-core/uclibc/uclibc-git/uClibc.machine
new file mode 100644
index 0000000000..595f444dac
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/uClibc.machine
@@ -0,0 +1,14 @@
1#
2# Automatically generated make config: don't edit
3# Version: 0.9.32-git
4# Mon Jul 19 01:34:29 2010
5#
6#
7# Using ELF file format
8#
9FORCE_OPTIONS_FOR_ARCH=y
10ARCH_HAS_MMU=y
11ARCH_USE_MMU=y
12KERNEL_HEADERS="/usr/include"
13HAVE_DOT_CONFIG=y
14
diff --git a/meta/recipes-core/uclibc/uclibc-git/uclibc_enable_log2_test.patch b/meta/recipes-core/uclibc/uclibc-git/uclibc_enable_log2_test.patch
new file mode 100644
index 0000000000..37a59884b8
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/uclibc_enable_log2_test.patch
@@ -0,0 +1,35 @@
1uclibc now has log2 so enable the tests
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5
6Index: uClibc/test/math/libm-test.inc
7===================================================================
8--- uClibc/test/math/libm-test.inc (revision 23784)
9+++ uClibc/test/math/libm-test.inc (working copy)
10@@ -3414,7 +3414,6 @@
11 }
12
13
14-#if 0
15 static void
16 log2_test (void)
17 {
18@@ -3444,7 +3443,6 @@
19
20 END (log2);
21 }
22-#endif
23
24
25 static void
26@@ -4967,9 +4965,7 @@
27 log_test ();
28 log10_test ();
29 log1p_test ();
30-#if 0
31 log2_test ();
32-#endif
33 logb_test ();
34 modf_test ();
35 ilogb_test ();
diff --git a/meta/recipes-core/uclibc/uclibc-initial_git.bb b/meta/recipes-core/uclibc/uclibc-initial_git.bb
new file mode 100644
index 0000000000..3a1140e57b
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-initial_git.bb
@@ -0,0 +1,36 @@
1SECTION = "base"
2require uclibc.inc
3require uclibc-git.inc
4
5DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial kern-tools-native"
6PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
7
8PACKAGES = ""
9PACKAGES_DYNAMIC = ""
10
11STAGINGCC = "gcc-cross-initial"
12STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
13
14do_install() {
15 # Install initial headers into the cross dir
16 make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
17 install_headers install_startfiles
18
19 # add links to linux-libc-headers: final uclibc build need this.
20 for t in linux asm asm-generic; do
21 if [ -d ${D}${includedir}/$t ]; then
22 rm -rf ${D}${includedir}/$t
23 fi
24 ln -sf ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
25 done
26
27}
28do_compile() {
29 :
30}
31
32do_siteconfig () {
33 :
34}
35
36do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
diff --git a/meta/recipes-core/uclibc/uclibc-package.inc b/meta/recipes-core/uclibc/uclibc-package.inc
new file mode 100644
index 0000000000..c1815f9a31
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-package.inc
@@ -0,0 +1,37 @@
1# Ensure the uclibc-dev package is processed before uclibc-staticdev to allow
2# *_nonshared.a libraries to be packaged in the uclibc-dev package.
3PACKAGES = "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db uclibc-argp uclibc-backtrace uclibc-libcrypt uclibc-libintl uclibc-libnsl uclibc-libresolv uclibc-libm uclibc-libdl uclibc-libutil uclibc-libpthread uclibc-librt ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
4
5FILES_uclibc-libcrypt = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so"
6FILES_uclibc-libintl = "${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so"
7FILES_uclibc-libnsl = "${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so"
8FILES_uclibc-libresolv = "${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so"
9FILES_uclibc-libm = "${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so"
10FILES_uclibc-libdl = "${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so"
11FILES_uclibc-libutil = "${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so"
12FILES_uclibc-libpthread = "${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so"
13FILES_uclibc-librt = "${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so"
14
15FILES_ldd = "${bindir}/ldd"
16FILES_uclibc-utils = "${bindir} ${sbindir}"
17FILES_uclibc-utils-dbg += "${bindir}/.debug ${sbindir}/.debug"
18FILES_uclibc-gconv = "${libdir}/gconv"
19FILES_uclibc-thread-db = "${base_libdir}/libthread_db*"
20FILES_uclibc-argp = "${base_libdir}/libuargp-*.so ${base_libdir}/libuargp*.so.*"
21FILES_uclibc-backtrace = "${base_libdir}/libubacktrace-*.so ${base_libdir}/libubacktrace*.so.*"
22
23# The last line (gdb and lib1) is for uclinux-uclibc builds
24uclibc_baselibs = "${base_libdir}/ld*.so.* ${base_libdir}/ld*.so \
25 ${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \
26 ${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \
27 "
28FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
29FILES_${PN}-dev += "\
30 ${libdir}/lib*.so \
31 ${libdir}/*_nonshared.a \
32 ${libdir}/[S]*crt[1in].o \
33 ${libdir}/crtreloc*.o \
34 ${includedir}/*.h ${includedir}/*/*.h \
35 "
36FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \
37 ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
new file mode 100644
index 0000000000..e2de53c467
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -0,0 +1,165 @@
1SUMMARY = "C library for embedded systems"
2DESCRIPTION = "The name uClibc is an abbreviation for 'the \
3microcontroller C library'. For simplicity, uClibc is pronounced \
4'yew-see-lib-see'. The goal of uClibc is to provide as much \
5functionality as possible in a small amount of space, and it is intended \
6primarily for embedded use. It is also highly configurable in supported \
7features, at the cost of ABI differences for different configurations. \
8uClibc has been designed from the ground up to be a C library for \
9embedded Linux. It is NOT compatible with binaries linked against glibc."
10
11LICENSE = "LGPLv2.1+"
12SECTION = "libs"
13LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \
15file://${S}/test/regex/testregex.c;beginline=1;endline=31;md5=234efb227d0a40677f895e4a1e26e960"
16PR = "r9"
17
18require uclibc-config.inc
19
20PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
21TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
22
23# siteconfig.bbclass runs configure which needs a working compiler
24# For the compiler to work we need a working libc yet libc isn't
25# in the sysroots directory at this point. This means the libc.so
26# linker script won't work as the --sysroot setting isn't correct.
27# Here we create a hacked up libc linker script and pass in the right
28# flags to let configure work. Ugly.
29EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
30siteconfig_do_siteconfig_gencache_prepend = " \
31mkdir -p ${WORKDIR}/site_config_libc; \
32cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
33sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
34"
35
36# For now, we will skip building of a gcc package if it is a uclibc one
37# and our build is not a uclibc one, and we skip a glibc one if our build
38# is a uclibc build.
39COMPATIBLE_HOST = ".*-uclibc.*"
40
41INHIBIT_DEFAULT_DEPS = "1"
42
43# do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
44# the CFLAGS (when building the utils).
45OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
46EXTRA_OEMAKE = "${OEMAKE_NO_CC} \
47 'HOSTCC=${BUILD_CC}' \
48 'HOST_CFLAGS=${BUILD_CFLAGS}' \
49 'CC=${CC}' \
50 ARCH=${UCLIBC_ARCH}"
51
52EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
53
54# enable verbose output:
55export V="2"
56
57# -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported
58# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860
59#
60CFLAGS_arm := "${@oe_filter_out('-fno-omit-frame-pointer', '${CFLAGS}', d)}"
61UCLIBC_EXTRA_CFLAGS := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
62UCLIBC_EXTRA_LDFLAGS := "${@oe_filter_out('(-L\S+|-l\S+)', '${LDFLAGS}', d)}"
63
64do_compile_prepend () {
65 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
66 oe_runmake pregen
67}
68
69configmangle = '/^KERNEL_HEADERS/d; \
70 /^RUNTIME_PREFIX/d; \
71 /^DEVEL_PREFIX/d; \
72 /^SHARED_LIB_LOADER_PREFIX/d; \
73 /^UCLIBC_EXTRA_CFLAGS/d; \
74 s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
75 ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) != "arm"]} \
76 ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \
77 ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
78 /^CROSS/d; \
79 /^TARGET_ARCH=/d; \
80 /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \
81 s,^DOSTRIP.*,# DOSTRIP is not set,g; \
82 /_[EO]*ABI/d; \
83 /HAS_FPU/d; \
84 '
85OE_FEATURES := "${@features_to_uclibc_conf(d)}"
86OE_DEL := "${@features_to_uclibc_del(d)}"
87python () {
88 if "${OE_DEL}":
89 d.setVar('configmangle_append', "${OE_DEL}" + "\n")
90
91 # by default uclibc uses mips1 ISA for o32 ABI
92 # if we use TARGET_CC_ARCH="-march=mips32" we end up
93 # with conflicting march options to gcc. Here we
94 # ask for MIPS32 ISA to match the chosen arch
95
96 if "mips32" in d.getVar("TUNE_FEATURES",True):
97 d.setVar('configmangle_append',
98 "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_MIPS32=y\n\n")
99 if "${OE_FEATURES}":
100 d.setVar('configmangle_append',
101 "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
102 ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
103 d.setVar('configmangle_append',
104 "/^### CROSS$/a\\\n%s\n" %
105 ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
106 "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
107 "KERNEL_HEADERS=\"${STAGING_INCDIR}\"",
108 "RUNTIME_PREFIX=\"/\"",
109 "DEVEL_PREFIX=\"/${prefix}\"",
110 "SHARED_LIB_LOADER_PREFIX=\"/lib\"",
111 ])
112 ))
113 d.setVar('configmangle_append',
114 "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" %
115 ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"))
116 d.setVar('configmangle_append',
117 "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', True) in [ 'soft' ]]))
118 if "${UCLIBC_ENDIAN}":
119 d.setVar('configmangle_append',
120 "/^### ABI$/a\\\nARCH_WANTS_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"))
121 if "${UCLIBC_ABI}":
122 d.setVar('configmangle_append',
123 "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}"))
124}
125
126python do_patch_append() {
127 import subprocess
128 subprocess.call("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux", shell=True)
129 subprocess.call("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm", shell=True)
130}
131
132do_configure() {
133 rm -f ${S}/.config
134
135 # OpenEmbedded splits the uClibc.config in two parts:
136 # uClibc.machine, uClibc.distro
137 echo "### uClibc.machine ###" >${S}/merged.config
138 cat ${WORKDIR}/uClibc.machine >>${S}/merged.config
139 echo "### uClibc.distro ###" >>${S}/merged.config
140 cat ${WORKDIR}/uClibc.distro >>${S}/merged.config
141 echo "### CROSS" >>${S}/merged.config
142 echo "### TGT" >>${S}/merged.config
143 echo "### MMU" >>${S}/merged.config
144 echo "### FPU" >>${S}/merged.config
145 echo "### ABI" >>${S}/merged.config
146 echo "### DISTRO FEATURES" >>${S}/merged.config
147 echo "### MIPS32_CHECK" >>${S}/merged.config
148
149 # Mangle the resulting .config depending on OE variables
150 sed -i -e '${configmangle}' ${S}/merged.config
151 cp ${S}/merged.config .config
152 merge_config.sh -r -n -m .config ${@" ".join(find_cfgs(d))}
153 cml1_do_configure
154
155}
156
157do_install() {
158 oe_runmake PREFIX=${D} install
159}
160
161# build ldd, ldconfig and friends but only for full uclibc
162do_install_append_pn-uclibc () {
163 oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" -C utils utils_install
164}
165
diff --git a/meta/recipes-core/uclibc/uclibc_git.bb b/meta/recipes-core/uclibc/uclibc_git.bb
new file mode 100644
index 0000000000..b4f5d9c9dc
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc_git.bb
@@ -0,0 +1,22 @@
1require uclibc.inc
2require uclibc-package.inc
3require uclibc-git.inc
4
5STAGINGCC = "gcc-cross-initial"
6STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
7
8PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
9
10DEPENDS = "virtual/${TARGET_PREFIX}binutils \
11 virtual/${TARGET_PREFIX}gcc-initial \
12 virtual/${TARGET_PREFIX}libc-initial \
13 linux-libc-headers ncurses-native \
14 kern-tools-native"
15
16RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
17RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
18# uclibc does not really have libsegfault but then using the one from glibc is also not
19# going to work. So we pretend that we have it to make bitbake not pull other recipes
20# to satisfy this dependency for the images/tasks
21
22RPROVIDES_${PN} += "libsegfault rtld(GNU_HASH)"
diff --git a/meta/recipes-core/udev/udev-extraconf/automount.rules b/meta/recipes-core/udev/udev-extraconf/automount.rules
new file mode 100644
index 0000000000..7e844c31bd
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/automount.rules
@@ -0,0 +1,19 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Media automounting
17SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
18SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
19
diff --git a/meta/recipes-core/udev/udev-extraconf/autonet.rules b/meta/recipes-core/udev/udev-extraconf/autonet.rules
new file mode 100644
index 0000000000..19676aa13b
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/autonet.rules
@@ -0,0 +1,19 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Handle network interface setup
17SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
18SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
19
diff --git a/meta/recipes-core/udev/udev-extraconf/localextra.rules b/meta/recipes-core/udev/udev-extraconf/localextra.rules
new file mode 100644
index 0000000000..3d51d3e395
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/localextra.rules
@@ -0,0 +1,23 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# The first rtc device is symlinked to /dev/rtc
17KERNEL=="rtc0", SYMLINK+="rtc"
18
19#The first framebuffer is symlinked to /dev/fb
20KERNEL=="fb0", SYMLINK+="fb"
21
22# Make all input devices read-write to the input group
23SUBSYSTEM=="input", GROUP="input", MODE="660"
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.blacklist b/meta/recipes-core/udev/udev-extraconf/mount.blacklist
new file mode 100644
index 0000000000..e49349428b
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/mount.blacklist
@@ -0,0 +1,5 @@
1/dev/loop
2/dev/ram
3/dev/mtdblock
4/dev/md
5/dev/dm-*
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
new file mode 100644
index 0000000000..cb57e47a90
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -0,0 +1,91 @@
1#!/bin/sh
2#
3# Called from udev
4#
5# Attempt to mount any added block devices and umount any removed devices
6
7
8MOUNT="/bin/mount"
9PMOUNT="/usr/bin/pmount"
10UMOUNT="/bin/umount"
11for line in `grep -v ^# /etc/udev/mount.blacklist`
12do
13 if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
14 then
15 logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
16 exit 0
17 fi
18done
19
20automount() {
21 name="`basename "$DEVNAME"`"
22
23 ! test -d "/media/$name" && mkdir -p "/media/$name"
24 # Silent util-linux's version of mounting auto
25 if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
26 then
27 MOUNT="$MOUNT -o silent"
28 fi
29
30 # If filesystem type is vfat, change the ownership group to 'disk', and
31 # grant it with w/r/x permissions.
32 case $ID_FS_TYPE in
33 vfat|fat)
34 MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
35 ;;
36 # TODO
37 *)
38 ;;
39 esac
40
41 if ! $MOUNT -t auto $DEVNAME "/media/$name"
42 then
43 #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
44 rm_dir "/media/$name"
45 else
46 logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
47 touch "/tmp/.automount-$name"
48 fi
49}
50
51rm_dir() {
52 # We do not want to rm -r populated directories
53 if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
54 then
55 ! test -z "$1" && rm -r "$1"
56 else
57 logger "mount.sh/automount" "Not removing non-empty directory [$1]"
58 fi
59}
60
61# No ID_FS_TYPE for cdrom device, yet it should be mounted
62name="`basename "$DEVNAME"`"
63[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
64
65if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then
66 if [ -x "$PMOUNT" ]; then
67 $PMOUNT $DEVNAME 2> /dev/null
68 elif [ -x $MOUNT ]; then
69 $MOUNT $DEVNAME 2> /dev/null
70 fi
71
72 # If the device isn't mounted at this point, it isn't
73 # configured in fstab (note the root filesystem can show up as
74 # /dev/root in /proc/mounts, so check the device number too)
75 if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
76 grep -q "^$DEVNAME " /proc/mounts || automount
77 fi
78fi
79
80
81
82if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
83 for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
84 do
85 $UMOUNT $mnt
86 done
87
88 # Remove empty directories from auto-mounter
89 name="`basename "$DEVNAME"`"
90 test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
91fi
diff --git a/meta/recipes-core/udev/udev-extraconf/network.sh b/meta/recipes-core/udev/udev-extraconf/network.sh
new file mode 100644
index 0000000000..3ee92714af
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/network.sh
@@ -0,0 +1,54 @@
1#!/bin/sh
2
3# We get two "add" events for hostap cards due to wifi0
4echo "$INTERFACE" | grep -q wifi && exit 0
5
6# udevd does clearenv(). Export shell PATH to children.
7export PATH
8
9# Check if /etc/init.d/network has been run yet to see if we are
10# called by starting /etc/rcS.d/S03udev and not by hotplugging a device
11#
12# At this stage, network interfaces should not be brought up
13# automatically because:
14# a) /etc/init.d/network has not been run yet (security issue)
15# b) /var has not been populated yet so /etc/resolv,conf points to
16# oblivion, making the network unusable
17#
18
19spoofp="`grep ^spoofprotect /etc/network/options`"
20if test -z "$spoofp"
21then
22 # This is the default from /etc/init.d/network
23 spoofp_val=yes
24else
25 spoofp_val=${spoofp#spoofprotect=}
26fi
27
28test "$spoofp_val" = yes && spoofp_val=1 || spoofp_val=0
29
30# I think it is safe to assume that "lo" will always be there ;)
31if test "`cat /proc/sys/net/ipv4/conf/lo/rp_filter`" != "$spoofp_val" -a -n "$spoofp_val"
32then
33 echo "$INTERFACE" >> /dev/udev_network_queue
34 exit 0
35fi
36
37#
38# Code taken from pcmcia-cs:/etc/pcmcia/network
39#
40
41# if this interface has an entry in /etc/network/interfaces, let ifupdown
42# handle it
43if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then
44 case $ACTION in
45 add)
46 ifconfig | grep -q "^$INTERFACE" || ifup $INTERFACE
47 ;;
48 remove)
49 ifdown $INTERFACE
50 ;;
51 esac
52
53 exit 0
54fi
diff --git a/meta/recipes-core/udev/udev-extraconf_1.0.bb b/meta/recipes-core/udev/udev-extraconf_1.0.bb
new file mode 100644
index 0000000000..fd9a333fe6
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf_1.0.bb
@@ -0,0 +1,41 @@
1SUMMARY = "Extra machine specific configuration files"
2DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
5 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6
7PR = "r8"
8
9SRC_URI = " \
10 file://automount.rules \
11 file://mount.sh \
12 file://mount.blacklist \
13 file://autonet.rules \
14 file://network.sh \
15 file://localextra.rules \
16"
17
18
19do_install() {
20 install -d ${D}${sysconfdir}/udev/rules.d
21
22 install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules
23 install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules
24 install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules
25
26 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
27
28 install -d ${D}${sysconfdir}/udev/scripts/
29
30 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
31 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
32}
33
34FILES_${PN} = "${sysconfdir}/udev"
35RDEPENDS_${PN} = "udev"
36CONFFILES_${PN} = "${sysconfdir}/udev/mount.blacklist"
37
38# to replace udev-extra-rules from meta-oe
39RPROVIDES_${PN} = "udev-extra-rules"
40RREPLACES_${PN} = "udev-extra-rules"
41RCONFLICTS_${PN} = "udev-extra-rules"
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
new file mode 100644
index 0000000000..0e0917d187
--- /dev/null
+++ b/meta/recipes-core/udev/udev.inc
@@ -0,0 +1,110 @@
1SUMMARY = "/dev/ and hotplug management daemon"
2DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
3/dev/, handles hotplug events and loads drivers at boot time."
4HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html"
5LICENSE = "GPLv2.0+ & LGPLv2.1+"
6LICENSE_${PN} = "GPLv2.0+"
7LICENSE_libudev = "LGPLv2.1+"
8LICENSE_libgudev = "LGPLv2.1+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \
11 file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266"
12
13LDFLAGS += "-lrt"
14
15DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux"
16RPROVIDES_${PN} = "hotplug"
17
18SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
19 file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \
20 file://avoid-mouse-autosuspend.patch \
21 file://run.rules \
22 file://udev.rules \
23 file://devfs-udev.rules \
24 file://links.conf \
25 file://permissions.rules \
26 file://local.rules \
27 file://udev-cache \
28 file://udev-cache.default \
29 file://init \
30 file://add-install-ptest.patch \
31 file://run-ptest \
32 "
33
34inherit autotools pkgconfig update-rc.d ptest
35
36libexecdir = "${base_libdir}"
37EXTRA_OECONF = "--disable-introspection \
38 --with-rootlibdir=${base_libdir} \
39 --with-pci-ids-path=${datadir}/pci.ids \
40 ac_cv_file__usr_share_pci_ids=no \
41 ac_cv_file__usr_share_hwdata_pci_ids=no \
42 ac_cv_file__usr_share_misc_pci_ids=yes \
43 --sbindir=${base_sbindir} \
44 --libexecdir=${nonarch_base_libdir} \
45 --with-rootlibdir=${base_libdir} \
46 --with-rootprefix= \
47 --without-systemdsystemunitdir \
48 "
49
50PACKAGES =+ "udev-utils udev-cache"
51PACKAGES =+ "libudev libudev-dev libudev-dbg"
52PACKAGES =+ "libgudev libgudev-dev libgudev-dbg"
53
54INITSCRIPT_PACKAGES = "udev udev-cache"
55INITSCRIPT_NAME_udev = "udev"
56INITSCRIPT_PARAMS_udev = "start 03 S ."
57INITSCRIPT_NAME_udev-cache = "udev-cache"
58INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
59
60FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev"
61RRECOMMENDS_${PN} += "udev-utils udev-cache"
62
63FILES_${PN}-dbg += "${libexecdir}/.debug"
64FILES_${PN}-dbg += "${base_libdir}/udev/.debug/"
65FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*"
66FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
67FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc"
68FILES_libudev = "${base_libdir}/libudev.so.*"
69FILES_libudev-dbg = "${base_libdir}/.debug/libudev.so.*"
70FILES_libudev-dev = "${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \
71 ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
72FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*"
73FILES_libgudev-dbg = "${base_libdir}/.debug/libgudev*.so.* ${libdir}/.debug/libgudev*.so.*"
74FILES_libgudev-dev = "${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \
75 ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc"
76FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
77
78FILES_udev-utils = "${bindir}/udevadm"
79
80do_install_append () {
81 install -d ${D}${sysconfdir}/init.d
82 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
83 install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
84 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev
85 sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache
86
87 install -d ${D}${sysconfdir}/default
88 install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
89
90 touch ${D}${sysconfdir}/udev/cache.data
91
92 install -d ${D}${sysconfdir}/udev/rules.d/
93
94 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
95
96 # hid2hci has moved to bluez4. removed in udev as of version 169
97 rm -f ${D}${base_libdir}/udev/hid2hci
98
99 echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf
100}
101
102# As systemd also builds udev, skip this package if we're doing a systemd build.
103python () {
104 if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
105 raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
106}
107
108do_compile_ptest() {
109 oe_runmake test-udev
110}
diff --git a/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch b/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
new file mode 100644
index 0000000000..41deafa918
--- /dev/null
+++ b/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
@@ -0,0 +1,35 @@
1From 0f8290c943da298abd269ca60fd8375dfb219971 Mon Sep 17 00:00:00 2001
2From: Alexandru DAMIAN <alexandru.damian@intel.com>
3Date: Thu, 12 Jul 2012 12:54:48 +0300
4Subject: [PATCH] Fixing keyboard_force_release.sh shell script path
5
6With the introduction of rootprefix, the keyboard-force-release.sh.in
7was modified to be executed with @rootprefix@/bin/sh, which is wrong
8because @rootprefix@ defaults to /usr (which is correct), but the
9shell is always at /bin/sh (IEEE Std 1003.2-1992).
10
11Therefore the interpreter for shell scripts needs to be /bin/sh at all times.
12
13The upstream moved to configurable root prefix, this patch taclkes a
14transition bug, and will not be applied upstream.
15
16Upstream-Status: Inappropriate [legacy version]
17
18Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
19---
20 src/keymap/keyboard-force-release.sh.in | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in
24index dd040ce..597a3a6 100755
25--- a/src/keymap/keyboard-force-release.sh.in
26+++ b/src/keymap/keyboard-force-release.sh.in
27@@ -1,4 +1,4 @@
28-#!@rootprefix@/bin/sh -e
29+#!/bin/sh -e
30 # read list of scancodes, convert hex to decimal and
31 # append to the atkbd force_release sysfs attribute
32 # $1 sysfs devpath for serioX
33--
341.7.9.5
35
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch
new file mode 100644
index 0000000000..45ec676ef5
--- /dev/null
+++ b/meta/recipes-core/udev/udev/add-install-ptest.patch
@@ -0,0 +1,60 @@
1Adjustements for ptest:
2
3- Add 'install-ptest' rule.
4- Print a standard result line for each test.
5- Replace the use of "tree" with "find".
6
7Signed-off-by: Björn Stenberg <bjst@enea.com>
8Upstream-status: Pending
9
10--- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100
11+++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100
12@@ -708,3 +708,11 @@
13 for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
14 for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
15 for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
16+
17+install-ptest:
18+ install test-udev $(DESTDIR)
19+ cp Makefile $(DESTDIR)
20+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
21+ $(MKDIR_P) $(DESTDIR)/test
22+ (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
23+ tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
24--- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100
25+++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100
26@@ -1459,11 +1459,13 @@
27 print "add: error";
28 if ($rules->{exp_add_error}) {
29 print " as expected\n";
30+ print "XFAIL: TEST $number: $rules->{desc}: add\n";
31 } else {
32 print "\n";
33- system("tree $udev_root");
34+ system("find $udev_root");
35 print "\n";
36 $error++;
37+ print "FAIL: TEST $number: $rules->{desc}: add\n";
38 sleep(1);
39 }
40 }
41@@ -1479,15 +1481,18 @@
42 print "remove: error";
43 if ($rules->{exp_rem_error}) {
44 print " as expected\n";
45+ print "XFAIL: TEST $number: $rules->{desc}: remove\n";
46 } else {
47 print "\n";
48- system("tree $udev_root");
49+ system("find $udev_root");
50 print "\n";
51 $error++;
52+ print "FAIL: TEST $number: $rules->{desc}: remove\n";
53 sleep(1);
54 }
55 } else {
56 print "remove: ok\n";
57+ print "PASS: TEST $number: $rules->{desc}: remove\n";
58 }
59
60 print "\n";
diff --git a/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch b/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
new file mode 100644
index 0000000000..2c31b33b02
--- /dev/null
+++ b/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
@@ -0,0 +1,25 @@
1Source: http://cgit.freedesktop.org/systemd/systemd/commit/rules/42-usb-hid-pm.rules?id=e0386cf2809219bbdd30895f46f1f567b56902b6
2
3Some USB ports on external hubs may be reported as "fixed". We only want
4to auto-enable this on ports that are internal to the machine, so check
5the parent state as well.
6
7Upstream-Status: backport
8
9Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
102013/09/13
11
12Index: udev-182/rules/42-usb-hid-pm.rules
13===================================================================
14--- udev-182.orig/rules/42-usb-hid-pm.rules
15+++ udev-182/rules/42-usb-hid-pm.rules
16@@ -46,4 +46,9 @@ ACTION=="add", SUBSYSTEM=="usb", ATTRS{i
17 ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="14dd", ATTR{idProduct}="0002", TEST=="power/control", ATTR{power/control}="auto"
18
19 # USB HID devices that are internal to the machine should also be safe to autosuspend
20+# And skip it for devices which are external but say "fixed"
21+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="removable", GOTO="usb_hid_pm_end"
22+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end"
23 ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto"
24+LABEL="usb_hid_pm_end"
25+
diff --git a/meta/recipes-core/udev/udev/devfs-udev.rules b/meta/recipes-core/udev/udev/devfs-udev.rules
new file mode 100644
index 0000000000..0ba1ad4e7f
--- /dev/null
+++ b/meta/recipes-core/udev/udev/devfs-udev.rules
@@ -0,0 +1,108 @@
1# The use of these rules is not recommended or supported.
2# In a world where devices can come and go at any time, the devfs scheme
3# of simple device enumeration does not help _anything_. Just forget about
4# it. Use custom rules to name your device or look at the persistent device
5# naming scheme, which is implemented for disks and add your subsystem.
6
7# ide block devices
8BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
9
10# md block devices
11KERNEL="md[0-9]*", NAME="md/%n"
12
13# floppy devices
14KERNEL="fd[0-9]*", NAME="floppy/%n"
15
16# tty devices
17KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k"
18KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k"
19KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
20
21# vc devices
22KERNEL="vcs", NAME="vcc/0"
23KERNEL="vcs[0-9]*", NAME="vcc/%n"
24KERNEL="vcsa", NAME="vcc/a0"
25KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
26
27# v4l devices
28KERNEL="video[0-9]*", NAME="v4l/video%n"
29KERNEL="radio[0-9]*", NAME="v4l/radio%n"
30KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
31KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
32
33# dm devices (ignore them)
34KERNEL="dm-[0-9]*", NAME=""
35
36# i2c devices
37KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
38
39# loop devices
40KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
41
42# ramdisks
43KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
44
45# framebuffer devices
46KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
47
48# misc
49KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
50KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
51KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
52KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
53KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
54KERNEL="uinput", NAME="misc/%k", SYMLINK="%k"
55
56# alsa devices
57KERNEL="controlC[0-9]*", NAME="snd/%k"
58KERNEL="hw[CD0-9]*", NAME="snd/%k"
59KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
60KERNEL="midi[CD0-9]*", NAME="snd/%k"
61KERNEL="timer", NAME="snd/%k"
62KERNEL="seq", NAME="snd/%k"
63
64# oss devices
65KERNEL="audio*", NAME="sound/%k", SYMLINK="%k"
66KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k"
67KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k"
68KERNEL="midi*", NAME="sound/%k", SYMLINK="%k"
69KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k"
70KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k"
71
72# input devices
73KERNEL="mice", NAME="input/%k"
74KERNEL="mouse*", NAME="input/%k"
75KERNEL="event*", NAME="input/%k"
76KERNEL="js*", NAME="input/%k"
77KERNEL="ts*", NAME="input/%k"
78
79# USB devices
80KERNEL="hiddev*", NAME="usb/%k"
81KERNEL="auer*", NAME="usb/%k"
82KERNEL="legousbtower*", NAME="usb/%k"
83KERNEL="dabusb*", NAME="usb/%k"
84BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
85
86# netlink devices
87KERNEL="route", NAME="netlink/%k"
88KERNEL="skip", NAME="netlink/%k"
89KERNEL="usersock", NAME="netlink/%k"
90KERNEL="fwmonitor", NAME="netlink/%k"
91KERNEL="tcpdiag", NAME="netlink/%k"
92KERNEL="nflog", NAME="netlink/%k"
93KERNEL="xfrm", NAME="netlink/%k"
94KERNEL="arpd", NAME="netlink/%k"
95KERNEL="route6", NAME="netlink/%k"
96KERNEL="ip6_fw", NAME="netlink/%k"
97KERNEL="dnrtmsg", NAME="netlink/%k"
98KERNEL="tap*", NAME="netlink/%k"
99
100# CAPI devices
101KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20"
102KERNEL="capi*", NAME="capi/%n"
103
104# Network devices
105KERNEL="tun", NAME="net/%k"
106
107# raw devices
108KERNEL="raw[0-9]*", NAME="raw/%k"
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
new file mode 100644
index 0000000000..e048a171da
--- /dev/null
+++ b/meta/recipes-core/udev/udev/init
@@ -0,0 +1,131 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: udev
5# Required-Start: mountvirtfs
6# Required-Stop:
7# Default-Start: S
8# Default-Stop:
9# Short-Description: Start udevd, populate /dev and load drivers.
10### END INIT INFO
11
12export TZ=/etc/localtime
13
14[ -d /sys/class ] || exit 1
15[ -r /proc/mounts ] || exit 1
16[ -x @UDEVD@ ] || exit 1
17[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
18[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
19[ -f /etc/default/rcS ] && . /etc/default/rcS
20
21readfiles () {
22 READDATA=""
23 for filename in $@; do
24 if [ -r $filename ]; then
25 while read line; do
26 READDATA="$READDATA$line"
27 done < $filename
28 fi
29 done
30}
31
32kill_udevd () {
33 pid=`pidof -x udevd`
34 [ -n "$pid" ] && kill $pid
35}
36
37case "$1" in
38 start)
39 export ACTION=add
40 # propagate /dev from /sys
41 echo "Starting udev"
42
43 # Check for requireed devtmpfs before trying to start udev and
44 # mount a no-existant fs.
45 if ! grep -q devtmpfs /proc/filesystems
46 then
47 echo "Missing devtmpfs, which is required for udev to run";
48 echo "Halting..."
49 halt
50 fi
51 # mount the devtmpfs on /dev, if not already done
52 LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && {
53 mount -n -o mode=0755 -t devtmpfs none "/dev"
54 }
55 [ -e /dev/pts ] || mkdir -m 0755 /dev/pts
56 [ -e /dev/shm ] || mkdir -m 1777 /dev/shm
57 mount -a -t tmpfs 2>/dev/null
58 mkdir -p /var/volatile/tmp
59
60 # Cache handling.
61 # A list of files which are used as a criteria to judge whether the udev cache could be reused.
62 CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags"
63 if [ "$DEVCACHE" != "" ]; then
64 if [ -e $DEVCACHE ]; then
65 readfiles $CMP_FILE_LIST
66 NEWDATA="$READDATA"
67 readfiles /etc/udev/cache.data
68 OLDDATA="$READDATA"
69 if [ "$OLDDATA" = "$NEWDATA" ]; then
70 (cd /; tar xf $DEVCACHE > /dev/null 2>&1)
71 not_first_boot=1
72 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
73 [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache
74 else
75 # Output detailed reason why the cached /dev is not used
76 if [ "$VERBOSE" != "no" ]; then
77 echo "udev: udev cache not used"
78 echo "udev: we use $CMP_FILE_LIST as criteria to judge whether the cache /dev could be resued"
79 echo "udev: olddata: $OLDDATA"
80 echo "udev: newdata: $NEWDATA"
81 fi
82 echo "$NEWDATA" > /dev/shm/udev.cache
83 fi
84 else
85 if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
86 # If rootfs is not read-only, it's possible that a new udev cache would be generated;
87 # otherwise, we do not bother to read files.
88 readfiles $CMP_FILE_LIST
89 echo "$READDATA" > /dev/shm/udev.cache
90 fi
91 fi
92 fi
93
94 # make_extra_nodes
95 kill_udevd > "/dev/null" 2>&1
96
97 # trigger the sorted events
98 echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
99 @UDEVD@ -d
100
101 udevadm control --env=STARTUP=1
102 if [ "$not_first_boot" != "" ];then
103 udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
104 (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
105 else
106 udevadm trigger --action=add
107 udevadm settle
108 fi
109 ;;
110 stop)
111 echo "Stopping udevd"
112 start-stop-daemon --stop --name udevd --quiet
113 ;;
114 restart)
115 $0 stop
116 sleep 1
117 $0 start
118 ;;
119 status)
120 pid=`pidof -x udevd`
121 if [ -n "$pid" ]; then
122 echo "udevd (pid $pid) is running ..."
123 else
124 echo "udevd is stopped"
125 fi
126 ;;
127 *)
128 echo "Usage: $0 {start|stop|status|restart}"
129 exit 1
130esac
131exit 0
diff --git a/meta/recipes-core/udev/udev/links.conf b/meta/recipes-core/udev/udev/links.conf
new file mode 100644
index 0000000000..8fff922db6
--- /dev/null
+++ b/meta/recipes-core/udev/udev/links.conf
@@ -0,0 +1,21 @@
1# This file does not exist. Please do not ask the debian maintainer about it.
2# You may use it to do strange and wonderful things, at your risk.
3
4L fd /proc/self/fd
5L stdin /proc/self/fd/0
6L stdout /proc/self/fd/1
7L stderr /proc/self/fd/2
8L core /proc/kcore
9L sndstat /proc/asound/oss/sndstat
10L MAKEDEV /sbin/MAKEDEV
11
12D pts
13D shm
14
15# Hic sunt leones.
16M ppp c 108 0
17D loop
18M loop/0 b 7 0
19D net
20M net/tun c 10 200
21
diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules
new file mode 100644
index 0000000000..72d92ef627
--- /dev/null
+++ b/meta/recipes-core/udev/udev/local.rules
@@ -0,0 +1,21 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Try and modprobe for drivers for new hardware
17ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
18
19# Create a symlink to any touchscreen input device
20SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
21
diff --git a/meta/recipes-core/udev/udev/permissions.rules b/meta/recipes-core/udev/udev/permissions.rules
new file mode 100644
index 0000000000..205b733292
--- /dev/null
+++ b/meta/recipes-core/udev/udev/permissions.rules
@@ -0,0 +1,131 @@
1ACTION!="add", GOTO="permissions_end"
2
3# workarounds needed to synchronize with sysfs
4# only needed for kernels < v2.6.18-rc1
5ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
6SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt"
7# only needed for kernels < 2.6.16
8SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
9# only needed for kernels < 2.6.17
10SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
11
12# devices needed to load the drivers providing them
13KERNEL=="tun", OPTIONS+="ignore_remove"
14KERNEL=="ppp", OPTIONS+="ignore_remove"
15KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
16
17# default permissions for block devices
18SUBSYSTEM=="block", GROUP="disk"
19# the aacraid driver is broken and reports that disks removable (see #404927)
20SUBSYSTEM=="block", ATTRS{removable}=="1", \
21 DRIVERS!="aacraid", GROUP="floppy"
22# all block devices on these buses are "removable"
23SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
24
25# IDE devices
26KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
27 IMPORT{program}="cdrom_id --export $tempnode"
28ENV{ID_CDROM}=="?*", GROUP="cdrom"
29KERNEL=="ht[0-9]*", GROUP="tape"
30KERNEL=="nht[0-9]*", GROUP="tape"
31
32# SCSI devices
33KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
34SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
35SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner"
36SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
37SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
38SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
39SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
40SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
41SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
42
43# USB devices
44KERNEL=="legousbtower*", MODE="0666"
45KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
46
47# usbfs-like devices
48SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
49 MODE="0664"
50
51# iRiver music players
52SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
53 ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
54
55# serial devices
56SUBSYSTEM=="tty", GROUP="dialout"
57SUBSYSTEM=="capi", GROUP="dialout"
58SUBSYSTEM=="slamr", GROUP="dialout"
59SUBSYSTEM=="zaptel", GROUP="dialout"
60
61# vc devices (all members of the tty subsystem)
62KERNEL=="ptmx", MODE="0666", GROUP="root"
63KERNEL=="console", MODE="0600", GROUP="root"
64KERNEL=="tty", MODE="0666", GROUP="root"
65KERNEL=="tty[0-9]*", GROUP="root"
66KERNEL=="pty*", MODE="0666", GROUP="tty"
67
68# video devices
69SUBSYSTEM=="video4linux", GROUP="video"
70SUBSYSTEM=="drm", GROUP="video"
71SUBSYSTEM=="dvb", GROUP="video"
72SUBSYSTEM=="em8300", GROUP="video"
73SUBSYSTEM=="graphics", GROUP="video"
74SUBSYSTEM=="nvidia", GROUP="video"
75
76# misc devices
77KERNEL=="random", MODE="0666"
78KERNEL=="urandom", MODE="0666"
79KERNEL=="mem", MODE="0640", GROUP="kmem"
80KERNEL=="kmem", MODE="0640", GROUP="kmem"
81KERNEL=="port", MODE="0640", GROUP="kmem"
82KERNEL=="full", MODE="0666"
83KERNEL=="null", MODE="0666"
84KERNEL=="zero", MODE="0666"
85KERNEL=="inotify", MODE="0666"
86KERNEL=="sgi_fetchop", MODE="0666"
87KERNEL=="sonypi", MODE="0666"
88KERNEL=="agpgart", GROUP="video"
89KERNEL=="nvram", GROUP="nvram"
90KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
91KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
92KERNEL=="fuse", GROUP="fuse"
93KERNEL=="kqemu", MODE="0666"
94KERNEL=="kvm", GROUP="kvm"
95KERNEL=="tun", MODE="0666",
96
97KERNEL=="cdemu[0-9]*", GROUP="cdrom"
98KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
99KERNEL=="pktcdvd", MODE="0644"
100
101KERNEL=="uverbs*", GROUP="rdma"
102KERNEL=="ucm*", GROUP="rdma"
103KERNEL=="rdma_ucm", GROUP="rdma"
104
105# printers and parallel devices
106SUBSYSTEM=="printer", GROUP="lp"
107SUBSYSTEM=="ppdev", GROUP="lp"
108KERNEL=="irlpt*", GROUP="lp"
109KERNEL=="pt[0-9]*", GROUP="tape"
110KERNEL=="pht[0-9]*", GROUP="tape"
111
112# sound devices
113SUBSYSTEM=="sound", GROUP="audio"
114
115# ieee1394 devices
116KERNEL=="raw1394", GROUP="disk"
117KERNEL=="dv1394*", GROUP="video"
118KERNEL=="video1394*", GROUP="video"
119
120# input devices
121KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
122 MODE="0664", GROUP="video"
123KERNEL=="js[0-9]*", MODE="0664"
124KERNEL=="lirc[0-9]*", GROUP="video"
125
126# AOE character devices
127SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
128SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
129
130LABEL="permissions_end"
131
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest
new file mode 100644
index 0000000000..6817ef70e6
--- /dev/null
+++ b/meta/recipes-core/udev/udev/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -k check-TESTS \ No newline at end of file
diff --git a/meta/recipes-core/udev/udev/run.rules b/meta/recipes-core/udev/udev/run.rules
new file mode 100644
index 0000000000..75d71375bb
--- /dev/null
+++ b/meta/recipes-core/udev/udev/run.rules
@@ -0,0 +1,14 @@
1# debugging monitor
2RUN+="socket:/org/kernel/udev/monitor"
3
4# run a command on remove events
5ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
6
7# ignore the events generated by virtual consoles
8KERNEL=="ptmx", OPTIONS+="last_rule"
9KERNEL=="console", OPTIONS+="last_rule"
10KERNEL=="tty" , OPTIONS+="last_rule"
11KERNEL=="tty[0-9]*", OPTIONS+="last_rule"
12KERNEL=="pty*", OPTIONS+="last_rule"
13SUBSYSTEM=="vc", OPTIONS+="last_rule"
14
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
new file mode 100644
index 0000000000..db5a513e14
--- /dev/null
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -0,0 +1,32 @@
1#!/bin/sh -e
2
3### BEGIN INIT INFO
4# Provides: udev-cache
5# Required-Start: mountall
6# Required-Stop:
7# Default-Start: S
8# Default-Stop:
9# Short-Description: cache /dev to speedup the udev next boot
10### END INIT INFO
11
12export TZ=/etc/localtime
13
14[ -r /proc/mounts ] || exit 1
15[ -x @UDEVD@ ] || exit 1
16[ -d /sys/class ] || exit 1
17
18[ -f /etc/default/rcS ] && . /etc/default/rcS
19[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
20
21if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
22 [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache"
23 exit 0
24fi
25
26if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
27 echo "Populating dev cache"
28 (cd /; tar cf "$DEVCACHE" dev)
29 mv /dev/shm/udev.cache /etc/udev/cache.data
30fi
31
32exit 0
diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
new file mode 100644
index 0000000000..5c4937a9a0
--- /dev/null
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -0,0 +1,4 @@
1# Default for /etc/init.d/udev
2
3# Comment this out to disable device cache
4DEVCACHE="/etc/dev.tar"
diff --git a/meta/recipes-core/udev/udev/udev.rules b/meta/recipes-core/udev/udev/udev.rules
new file mode 100644
index 0000000000..a19d4a0bf6
--- /dev/null
+++ b/meta/recipes-core/udev/udev/udev.rules
@@ -0,0 +1,116 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# workaround for devices which do not report media changes
17SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
18 ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
19SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
20 OPTIONS+="all_partitions"
21
22# SCSI devices
23SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
24
25# USB devices
26SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
27SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
28SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
29SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
30SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
31SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
32SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
33 ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
34 SYMLINK+="pilot"
35
36# usbfs-like devices
37SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
38 NAME="%c"
39SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
40
41# serial devices
42KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
43KERNEL=="capi[0-9]*", NAME="capi/%n"
44
45# video devices
46KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
47 NAME="%c"
48KERNEL=="card[0-9]*", NAME="dri/%k"
49
50# misc devices
51KERNEL=="hw_random", NAME="hwrng"
52KERNEL=="tun", NAME="net/%k"
53KERNEL=="evtchn", NAME="xen/%k"
54
55KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
56KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
57KERNEL=="pktcdvd", NAME="pktcdvd/control"
58
59KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
60KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
61KERNEL=="microcode", NAME="cpu/microcode"
62
63KERNEL=="umad*", NAME="infiniband/%k"
64KERNEL=="issm*", NAME="infiniband/%k"
65KERNEL=="uverbs*", NAME="infiniband/%k"
66KERNEL=="ucm*", NAME="infiniband/%k"
67KERNEL=="rdma_ucm", NAME="infiniband/%k"
68
69# ALSA devices
70KERNEL=="controlC[0-9]*", NAME="snd/%k"
71KERNEL=="hwC[D0-9]*", NAME="snd/%k"
72KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
73KERNEL=="midiC[D0-9]*", NAME="snd/%k"
74KERNEL=="timer", NAME="snd/%k"
75KERNEL=="seq", NAME="snd/%k"
76
77# ieee1394 devices
78KERNEL=="dv1394*", NAME="dv1394/%n"
79KERNEL=="video1394*", NAME="video1394/%n"
80
81# input devices
82KERNEL=="mice", NAME="input/%k"
83KERNEL=="mouse[0-9]*", NAME="input/%k"
84KERNEL=="event[0-9]*", NAME="input/%k"
85KERNEL=="js[0-9]*", NAME="input/%k"
86KERNEL=="ts[0-9]*", NAME="input/%k"
87KERNEL=="uinput", NAME="input/%k"
88
89# Zaptel
90KERNEL=="zapctl", NAME="zap/ctl"
91KERNEL=="zaptimer", NAME="zap/timer"
92KERNEL=="zapchannel", NAME="zap/channel"
93KERNEL=="zappseudo", NAME="zap/pseudo"
94KERNEL=="zap[0-9]*", NAME="zap/%n"
95
96# AOE character devices
97SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
98SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
99SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
100SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
101
102# device mapper creates its own device nodes, so ignore these
103KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
104KERNEL=="device-mapper", NAME="mapper/control"
105
106KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660"
107
108# Firmware Helper
109ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware.sh"
110
111# Samsung UARTS
112KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n"
113
114# MXC UARTs
115KERNEL=="ttymxc[0-4]", NAME="ttymxc%n"
116
diff --git a/meta/recipes-core/udev/udev_182.bb b/meta/recipes-core/udev/udev_182.bb
new file mode 100644
index 0000000000..d66292ed7a
--- /dev/null
+++ b/meta/recipes-core/udev/udev_182.bb
@@ -0,0 +1,9 @@
1include udev.inc
2
3PR = "r7"
4
5# module-init-tools from kmod_git will provide libkmod runtime
6DEPENDS += "module-init-tools"
7
8SRC_URI[md5sum] = "1b964456177fbf48023dfee7db3a708d"
9SRC_URI[sha256sum] = "7857ed19fafd8f3ca8de410194e8c7336e9eb8a20626ea8a4ba6449b017faba4"
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch b/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
new file mode 100644
index 0000000000..fb443ff15e
--- /dev/null
+++ b/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
@@ -0,0 +1,49 @@
1Upstream-Status: Pending
2
3--- update-rc.d/update-rc.d.org 2005-01-03 00:30:47.000000000 +0200
4+++ update-rc.d/update-rc.d 2007-12-01 19:41:08.000000000 +0200
5@@ -19,6 +19,7 @@
6 notreally=0
7 force=0
8 dostart=0
9+verbose=0
10
11 usage()
12 {
13@@ -28,6 +29,7 @@
14 update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] .
15 -n: not really
16 -f: force
17+ -v: verbose
18 -r: alternate root path (default is /)
19 -s: invoke start methods if appropriate to current runlevel
20 EOF
21@@ -69,7 +71,7 @@
22 lev=`echo $2 | cut -d/ -f1`
23 nn=`echo $2 | cut -d/ -f2`
24 fn="${etcd}${lev}.d/${startstop}${nn}${bn}"
25- echo " $fn -> ../init.d/$bn"
26+ [ $verbose -eq 1 ] && echo " $fn -> ../init.d/$bn"
27 if [ $notreally -eq 0 ]; then
28 mkdir -p `dirname $fn`
29 ln -s ../init.d/$bn $fn
30@@ -89,7 +91,7 @@
31 exit 0
32 fi
33
34- echo " Adding system startup for $initd/$bn ..."
35+ echo " Adding system startup for $initd/$bn."
36
37 for i in $startlinks; do
38 dolink S $i
39@@ -105,6 +107,10 @@
40 shift
41 continue
42 ;;
43+ -v) verbose=1
44+ shift
45+ continue
46+ ;;
47 -f) force=1
48 shift
49 continue
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
new file mode 100644
index 0000000000..6f402ddb6d
--- /dev/null
+++ b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
@@ -0,0 +1,53 @@
1Check if symlinks are valid
2
3When using root option and $initd/$bn is a symlink, the script would fail because
4the symlink points to a path on target. For example:
5
6/path/to/target/rootfs/etc/init.d/syslog -> /etc/init.d/syslog.busybox
7
8Hence, [ -f /path/to/target/rootfs/etc/init.d/syslog ] condition would return
9false.
10
11This patch adds the posibility to check whether the file the symlink points to
12actually exists in rootfs path and then continue.
13
14Upstream-Status: Pending
15
16Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
17
18Index: git/update-rc.d
19===================================================================
20--- git.orig/update-rc.d 2013-01-16 12:12:58.349814356 +0200
21+++ git/update-rc.d 2013-01-16 13:02:42.490864939 +0200
22@@ -147,13 +147,29 @@
23 bn=$1
24 shift
25
26+sn=$initd/$bn
27+if [ -L "$sn" -a -n "$root" ]; then
28+ readlink=$(which readlink)
29+
30+ if [ -n "$readlink" ]; then
31+ sn=$($readlink "$sn")
32+ case "$sn" in
33+ /*) sn=${root}${sn} ;;
34+ *) sn=$initd/$sn ;;
35+ esac
36+ else
37+ echo "update-rc.d: readlink tool not present, cannot check whether \
38+ $sn symlink points to a valid file." >&2
39+ fi
40+fi
41+
42 if [ $1 != "remove" ]; then
43- if [ ! -f "$initd/$bn" ]; then
44+ if [ ! -f "$sn" ]; then
45 echo "update-rc.d: $initd/$bn: file does not exist" >&2
46 exit 1
47 fi
48 else
49- if [ -f "$initd/$bn" ]; then
50+ if [ -f "$sn" ]; then
51 if [ $force -eq 1 ]; then
52 echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2
53 else
diff --git a/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
new file mode 100644
index 0000000000..add8234aa4
--- /dev/null
+++ b/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
@@ -0,0 +1,30 @@
1SUMMARY = "manage symlinks in /etc/rcN.d."
2DESCRIPTION = "update-rc.d is a utilities that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
3SECTION = "base"
4
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75"
7
8PR = "r5"
9
10# Revision corresponding to tag update-rc.d_0.7
11SRCREV = "eca680ddf28d024954895f59a241a622dd575c11"
12
13SRC_URI = "git://github.com/philb/update-rc.d.git \
14 file://add-verbose.patch \
15 file://check-if-symlinks-are-valid.patch \
16 "
17
18S = "${WORKDIR}/git"
19
20inherit allarch
21
22do_compile() {
23}
24
25do_install() {
26 install -d ${D}${sbindir}
27 install -m 0755 ${S}/update-rc.d ${D}${sbindir}/update-rc.d
28}
29
30BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
new file mode 100644
index 0000000000..812bb06678
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,261 @@
1SUMMARY = "A suite of basic system administration utilities."
2DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
3commonly found on most Linux systems. Some of the more important utilities include \
4disk partitioning, kernel message management, filesystem creation, and system login."
5
6SECTION = "base"
7
8LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
9
10LIC_FILES_CHKSUM = "file://README.licensing;md5=679af3e410ee112a5ec94de6501bf5c3 \
11 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
12 file://Documentation/licenses/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
13 file://Documentation/licenses/COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
14 file://Documentation/licenses/COPYING.BSD-3;md5=58dcd8452651fc8b07d1f65ce07ca8af \
15 file://Documentation/licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
16 file://libuuid/COPYING;md5=aa3ac5b4a5bcb707f714f78794011b80 \
17 file://libmount/COPYING;md5=152f98bc301a5ea649769ede7203ac82 \
18 file://libblkid/COPYING;md5=152f98bc301a5ea649769ede7203ac82"
19
20inherit autotools gettext pkgconfig systemd ptest
21DEPENDS = "zlib ncurses"
22DEPENDS_append_class-native = " lzo-native"
23DEPENDS_append_class-nativesdk = " lzo-native"
24
25SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.bz2 \
26 file://MCONFIG \
27 file://defines.h \
28 file://make_include \
29 file://swapargs.h \
30 file://ptest.patch \
31 file://run-ptest \
32 file://avoid_unsupported_find_opts.patch \
33 file://avoid_unsupported_grep_opts.patch \
34 file://avoid_unsupported_sleep_param.patch \
35 file://display_testname_for_subtest.patch \
36 "
37
38PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
39 util-linux-swaponoff util-linux-losetup util-linux-umount \
40 util-linux-mount util-linux-readprofile util-linux-libblkid \
41 util-linux-libmount util-linux-libmount-dev \
42 util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
43 util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
44 util-linux-mkfs util-linux-mcookie util-linux-reset util-linux-uuidd \
45 util-linux-mkfs.cramfs util-linux-fsck.cramfs \
46 util-linux-partx ${PN}-bash-completion"
47
48EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
49 --disable-makeinstall-chown --enable-elvtune --enable-init \
50 --enable-kill --enable-last --enable-mesg --enable-partx \
51 --enable-raw --enable-rdev --enable-reset --disable-login \
52 --disable-vipw --disable-newgrp --disable-chfn-chsh \
53 --enable-write --enable-arch --enable-mount --with-fsprobe=builtin \
54 --enable-libuuid --enable-libblkid --enable-fsck --without-udev \
55 usrsbin_execdir='${sbindir}' \
56"
57PACKAGECONFIG_class-target ?= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
58 ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} "
59PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
60
61# Respect the systemd feature for uuidd
62PACKAGECONFIG[systemd] = "--enable-socket-activation --with-systemdsystemunitdir=${systemd_unitdir}/system/, --disable-socket-activation --without-systemdsystemunitdir"
63
64FILES_${PN}-bash-completion += "${datadir}/bash-completion"
65FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
66
67FILES_util-linux-agetty = "${base_sbindir}/agetty"
68FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
69FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk"
70FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
71FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} ${base_sbindir}/swapoff.${BPN}"
72FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}"
73FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
74FILES_util-linux-mcookie = "${bindir}/mcookie"
75FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
76FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}"
77FILES_util-linux-uuidgen = "${bindir}/uuidgen"
78FILES_util-linux-uuidd = "${sbindir}/uuidd"
79FILES_util-linux-reset = "${base_bindir}/reset"
80FILES_util-linux-partx = "${sbindir}/partx"
81
82FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
83FILES_util-linux-libblkid-dev = "${base_libdir}/libblkid.so ${base_libdir}/libblkid.la ${includedir}/blkid ${libdir}/pkgconfig/blkid.pc"
84FILES_util-linux-libmount = "${base_libdir}/libmount.so.*"
85FILES_util-linux-libmount-dev = "${base_libdir}/libmount.so ${base_libdir}/libmount.la ${includedir}/libmount ${libdir}/pkgconfig/mount.pc"
86FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*"
87FILES_util-linux-libuuid-dev = "${base_libdir}/libuuid.so ${base_libdir}/libuuid.la ${includedir}/uuid ${libdir}/pkgconfig/uuid.pc"
88FILES_util-linux-lscpu = "${bindir}/lscpu"
89
90FILES_util-linux-fsck = "${base_sbindir}/fsck*"
91FILES_util-linux-mkfs = "${sbindir}/mkfs"
92
93FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
94FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
95
96
97# Util-linux' blkid replaces the e2fsprogs one
98FILES_util-linux-blkid = "${base_sbindir}/blkid*"
99RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
100RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
101
102# reset calls 'tput'
103RDEPENDS_util-linux-reset += "ncurses"
104
105RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
106RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs "
107
108RRECOMMENDS_${PN}_class-native = ""
109RRECOMMENDS_${PN}_class-nativesdk = ""
110RDEPENDS_${PN}_class-native = ""
111RDEPENDS_${PN}_class-nativesdk = ""
112
113SYSTEMD_PACKAGES = "${PN}-uuidd"
114SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service"
115
116do_compile () {
117 set -e
118 install ${WORKDIR}/MCONFIG ${S}/MCONFIG
119 install ${WORKDIR}/make_include ${S}/make_include
120 install ${WORKDIR}/swapargs.h ${S}/mount-deprecated/swapargs.h
121 install ${WORKDIR}/defines.h ${S}/defines.h
122 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
123}
124
125do_install () {
126 # with ccache the timestamps on compiled files may
127 # end up earlier than on their inputs, this allows
128 # for the resultant compilation in the install step.
129 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
130 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
131 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
132
133 mkdir -p ${D}${base_bindir}
134
135 sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
136 sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev"
137 usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt"
138 binprogs_a="dmesg kill more umount mount login reset su"
139
140 if [ "${base_sbindir}" != "${sbindir}" ]; then
141 mkdir -p ${D}${base_sbindir}
142 for p in $sbinprogs $sbinprogs_a; do
143 if [ -f "${D}${sbindir}/$p" ]; then
144 mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
145 fi
146 done
147 fi
148
149 if [ "${base_bindir}" != "${bindir}" ]; then
150 mkdir -p ${D}${base_bindir}
151 for p in $binprogs_a; do
152 if [ -f "${D}${bindir}/$p" ]; then
153 mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
154 fi
155 done
156 fi
157
158 install -d ${D}${sysconfdir}/default/
159 echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
160
161 rm -f ${D}${bindir}/chkdupexe
162}
163
164inherit update-alternatives
165
166ALTERNATIVE_PRIORITY = "100"
167
168ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root"
169ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
170ALTERNATIVE_${PN} += "setsid chrt flock hwclock utmpdump eject getopt"
171
172ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
173ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
174ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
175ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
176ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
177ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
178ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix"
179ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
180ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
181ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt"
182
183ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
184
185ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
186ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
187ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
188ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
189ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
190ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
191
192# There seems to be problem, atleast on nslu2, with these, untill they are
193# fixed the busybox ones have higher priority
194ALTERNATIVE_PRIORITY[hwclock] = "10"
195ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock"
196
197ALTERNATIVE_util-linux-fdisk = "fdisk"
198ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk"
199
200ALTERNATIVE_util-linux-agetty = "getty"
201ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
202ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
203
204ALTERNATIVE_util-linux-mount = "mount"
205ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
206
207ALTERNATIVE_util-linux-umount = "umount"
208ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
209
210ALTERNATIVE_util-linux-losetup = "losetup"
211ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
212
213ALTERNATIVE_util-linux-swaponoff = "swapoff swapon"
214ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff"
215ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon"
216
217ALTERNATIVE_util-linux-fsck = "fsck.minix fsck"
218ALTERNATIVE_LINK_NAME[fsck.minix] = "${base_sbindir}/fsck.minix"
219ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
220
221ALTERNATIVE_util-linux-blkid = "blkid"
222ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
223
224ALTERNATIVE_util-linux-reset = "reset"
225ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
226ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
227
228BBCLASSEXTEND = "native nativesdk"
229
230python do_package_prepend () {
231 if '--enable-su' in d.getVar('EXTRA_OECONF', True).split():
232 alt_name = "su"
233 d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('base_bindir', True), alt_name))
234 d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name)
235}
236
237do_compile_ptest() {
238 oe_runmake buildtest-TESTS
239}
240
241do_install_ptest() {
242 mkdir -p ${D}${PTEST_PATH}/tests/ts
243 find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
244 cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
245 cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
246 cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
247 cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
248
249 list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look lscpu md5 misc more namei paths schedutils script swapon tailf utmpdump"
250 # The following tests are not installed yet:
251 # blkid scsi_debug module dependent
252 # cramfs gcc dependent
253 # eject gcc dependent
254 # fdisk scsi_debug module and gcc dependent
255 # libmount uuidgen dependent
256 # mount gcc dependant
257 # partx blkid dependant
258 for d in $list; do
259 cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
260 done
261}
diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG
new file mode 100644
index 0000000000..3fea2c02d7
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/MCONFIG
@@ -0,0 +1,223 @@
1# MCONFIG -- Configuration stuff for util-linux
2# Created: Sat Feb 4 15:50:30 1995
3# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
4
5# For a user-mode install, make (at least) three changes:
6# - remove the `-o root' part in INSTALLSUID
7# - set USE_TTY_GROUP=no
8# - define DESTDIR
9
10# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
11# Select for CPU i386 if the binaries must be able to run on an intel 386
12# (by default i486 code is generated, see below)
13CPU=$(shell uname -m)
14ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
15
16# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
17# will use PAM for authentication. Additionally, passwd will not be
18# installed as it is not PAM aware.
19HAVE_PAM=no
20
21# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
22# and vipw will not be built or installed from the login-utils
23# subdirectory.
24HAVE_SHADOW=yes
25
26# If HAVE_PASSWD is set to "yes", then passwd will not be built or
27# installed from the login-utils subdirectory (but login, chfn, chsh,
28# newgrp, and vipw *will* be installed).
29HAVE_PASSWD=no
30
31# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
32# non-root users to enter the account password before updating /etc/passwd.
33REQUIRE_PASSWORD=yes
34#REQUIRE_PASSWORD=no
35
36# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
37# the selected shell be listed in /etc/shells -- otherwise only a warning is
38# printed. This prevents someone from setting their shell to /bin/false.
39ONLY_LISTED_SHELLS=yes
40#ONLY_LISTED_SHELLS=no
41
42
43# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
44# be built or installed from the login-utils subdirectory. (The shutdown
45# and halt that come with the SysVinit package should be used with the init
46# found in that package.)
47HAVE_SYSVINIT=no
48
49# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
50# not be built or installed from the login-utils subdirectory. (The
51# shutdown and init from the SysVinit package do not depend on the last,
52# mesg, and wall from that package.)
53HAVE_SYSVINIT_UTILS=no
54
55# If HAVE_WRITE is set to "yes", then write will not be built or
56# installed from the misc-utils subdirectory.
57# (There is a network aware write in netwrite from NetKit 0.16 or later.)
58HAVE_WRITE=no
59
60# If HAVE_GETTY is set to "yes", then agetty will not be built or
61# installed from the login-utils subdirectory. Note that agetty can
62# co-exist with other gettys, so this option should never be used.
63HAVE_GETTY=no
64
65# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
66# setgid to the "tty" group, and mesg will only set the group write bit.
67# Note that this is only useful if login/xterm/etc. change the group of the
68# user's tty to "tty" [The login in util-linux does this correctly, and
69# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
70# properly.]
71USE_TTY_GROUP=no
72
73# If HAVE_KILL is set to "yes", then kill will not be built or
74# installed from the misc-utils subdirectory.
75# (There is also a kill in the procps package.)
76HAVE_KILL=no
77
78# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
79# to the current user, allowing her to make a screendump and do other
80# nifty things on the console, but also allowing him to keep an open
81# file descriptor after logging out to trick the next user.
82ALLOW_VCS_USE=yes
83
84# If HAVE_RESET is set to "yes", then reset won't be installed. The version
85# of reset that comes with the ncurses package is less aggressive.
86HAVE_RESET=yes
87
88# If HAVE_SLN is set to "yes", then sln won't be installed
89# (but the man page sln.8 will be installed anyway).
90# sln also comes with libc and glibc.
91HAVE_SLN=no
92
93# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
94HAVE_FDUTILS=no
95
96# If SILENT_PG is set to "yes", then pg will not ring the bell
97# when an invalid key is pressed
98SILENT_PG=no
99
100# If configure decides that Native Language Support (NLS) is available,
101# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
102# DISABLE_NLS to "yes".
103DISABLE_NLS=no
104
105# Different optimizations for different cpus.
106# gcc 3.0 likes options -mcpu=i486 instead of -m486
107ifeq "$(ARCH)" "intel"
108 ifeq "$(HAVE_OLD_GCC)" "yes"
109 CPUHEAD=-m
110 else
111 CPUHEAD=-mcpu=i
112 endif
113 ifeq "$(CPU)" "i386"
114 CPUTAIL=386
115 else
116 CPUTAIL=486
117 endif
118 CPUOPT= $(CPUHEAD)$(CPUTAIL)
119 OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
120else
121 ifeq "$(ARCH)" "arm"
122 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
123 else
124 OPT= -O2 -fomit-frame-pointer
125 endif
126endif
127
128WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
129
130LIB=../lib
131
132ERR_O=$(LIB)/err.o
133
134# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
135# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
136# HAVE_SLANG=yes
137# There is a subdirectory /usr/include/slang containing slcurses.h
138# SLANGFLAGS=-I/usr/include/slang
139# No such subdirectory - slcurses.h lives in /usr/include
140# (no extra definition required).
141LIBSLANG=-lslang
142
143#
144# Paths used for compilation (not all are actually used, see CFLAGS below)
145#
146DEV_DIR= /dev
147ETC_DIR= /etc
148SBIN_DIR= /sbin
149USRSBIN_DIR= /usr/sbin
150USRLIB_DIR= /usr/lib
151USRBIN_DIR= /usr/bin
152USRGAMES_DIR= /usr/games
153USRSHAREMISC_DIR=/usr/share/misc
154LOCALE_DIR= /usr/share/locale
155BIN_DIR= /bin
156VAR_PATH= /var
157LOG_DIR= /var/log
158MAN_DIR= /usr/share/man
159INFO_DIR= /usr/share/info
160
161#
162# Paths used for install
163#
164DEVDIR= $(DESTDIR)$(DEV_DIR)
165ETCDIR= $(DESTDIR)$(ETC_DIR)
166SBINDIR= $(DESTDIR)$(SBIN_DIR)
167USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
168USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
169USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
170USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
171USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
172LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
173BINDIR= $(DESTDIR)$(BIN_DIR)
174VARPATH= $(DESTDIR)$(VAR_PATH)
175LOGDIR= $(DESTDIR)$(LOG_DIR)
176MANDIR= $(DESTDIR)$(MAN_DIR)
177MAN1DIR= $(MANDIR)/man1
178MAN3DIR= $(MANDIR)/man3
179MAN5DIR= $(MANDIR)/man5
180MAN6DIR= $(MANDIR)/man6
181MAN8DIR= $(MANDIR)/man8
182INFODIR= $(DESTDIR)$(INFO_DIR)
183
184# Directory for shutdown, halt, reboot, etc.
185SHUTDOWNDIR= $(SBINDIR)
186
187# Modes
188DIRMODE= 755
189BINMODE= 755
190MANMODE= 644
191DATMODE= 644
192INFOMODE= 644
193SUIDMODE= 4755
194
195CHMOD= chmod
196INSTALL= install
197INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
198INSTALLBIN= $(INSTALL) -m $(BINMODE)
199INSTALLMAN= $(INSTALL) -m $(MANMODE)
200INSTALLDAT= $(INSTALL) -m $(DATMODE)
201INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
202
203ifeq "$(DISABLE_NLS)" "yes"
204NLSFLAGS = -DDISABLE_NLS
205endif
206
207CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
208 $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
209 -D_FILE_OFFSET_BITS=64 \
210 -DSBINDIR=\"$(SBIN_DIR)\" \
211 -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
212 -DLOGDIR=\"$(LOG_DIR)\" \
213 -DVARPATH=\"$(VAR_PATH)\" \
214 -DLOCALEDIR=\"$(LOCALE_DIR)\" \
215 $(CFLAGS)
216
217
218%.o: %.c
219 $(CC) -c $(CFLAGS) $< -o $@
220
221%: %.cc
222 $(CXX) $(CFLAGS) $< -o $@
223
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch
new file mode 100644
index 0000000000..13dc7ddaa1
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch
@@ -0,0 +1,38 @@
1Avoid unsupported find options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/tests/run.sh b/tests/run.sh
7--- a/tests/run.sh 2013-08-26 23:48:48.868279097 +0200
8+++ b/tests/run.sh 2013-08-27 00:14:35.646730004 +0200
9@@ -91,7 +91,7 @@
10 # selected tests only
11 for s in $SUBTESTS; do
12 if [ -d "$top_srcdir/tests/ts/$s" ]; then
13- co=$(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
14+ co=$(find $top_srcdir/tests/ts/$s -type f -perm -111 -regex ".*/[^\.~]*" | sort)
15 comps="$comps $co"
16 else
17 echo "Unknown test component '$s'"
18@@ -104,7 +104,7 @@
19 exit 1
20 fi
21
22- comps=$(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
23+ comps=$(find $top_srcdir/tests/ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
24 fi
25
26
27diff -ruN a/tests/ts/build-sys/config b/tests/ts/build-sys/config
28--- a/tests/ts/build-sys/config 2013-08-26 23:50:26.800131581 +0200
29+++ b/tests/ts/build-sys/config 2013-08-27 00:10:02.806302850 +0200
30@@ -32,7 +32,7 @@
31 ./configure $opts &> /dev/null
32 make -j &> /dev/null
33
34- bins=$(find . -type f -perm /a+x | sort)
35+ bins=$(find . -type f -perm -111 | sort)
36 for b in $bins; do
37 libs=$(readelf --dynamic $b 2> /dev/null | \
38 awk '/NEEDED/ { print $5 }' | \
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
new file mode 100644
index 0000000000..a0d5efad0f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
@@ -0,0 +1,57 @@
1Avoid unsupported grep options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
7--- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200
8+++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200
9@@ -22,35 +22,35 @@
10 ts_init "$*"
11
12 ts_log "test: shm headers"
13-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT
14-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT
15-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT
16+$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT
17+$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT
18+$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT
19 $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT
20 $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT
21 echo >> $TS_OUTPUT
22
23 ts_log "test: mesg headers"
24-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT
25-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT
26-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT
27+$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT
28+$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT
29+$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT
30 $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT
31 $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT
32 echo >> $TS_OUTPUT
33
34 ts_log "test: sem headers"
35-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT
36-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT
37-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT
38+$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT
39+$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT
40+$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT
41 $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT
42 $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT
43 echo >> $TS_OUTPUT
44
45 ts_log "test: all headers"
46-$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT
47+$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT
48
49-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT
50-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT
51-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT
52+$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT
53+$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT
54+$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT
55 $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT
56 $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT
57
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
new file mode 100644
index 0000000000..3a6206704a
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
@@ -0,0 +1,20 @@
1Avoid unsupported sleep parameter
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/simple b/simple
7--- a/tests/ts/tailf/simple 2013-09-04 11:34:49.971817130 +0200
8+++ b/tests/ts/tailf/simple 2013-09-04 11:34:37.876325128 +0200
9@@ -25,9 +25,9 @@
10
11 $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
12
13-sleep 0.1
14+sleep 1
15 echo {0..9} >> $INPUT
16-sleep 0.1
17+sleep 1
18
19 rm -f $INPUT
20
diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
new file mode 100644
index 0000000000..a5b1ff12e5
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch
@@ -0,0 +1,23 @@
1util-linux: take ${sbindir} from the environment if it is set there
2fix the test, the [ ] syntax was getting eaten by autoconf
3
4Signed-off-by: Phil Blundell <pb@pbcl.net>
5Signed-off-by: Saul Wold <sgw@linux.intel.com
6Upstream-Status: Inappropriate [configuration]
7
8Index: util-linux-2.22.1/configure.ac
9===================================================================
10--- util-linux-2.22.1.orig/configure.ac
11+++ util-linux-2.22.1/configure.ac
12@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
13 usrbin_execdir='${exec_prefix}/bin'
14 AC_SUBST([usrbin_execdir])
15
16-usrsbin_execdir='${exec_prefix}/sbin'
17+if test -z "$usrsbin_execdir" ;
18+then
19+ usrsbin_execdir='${exec_prefix}/sbin'
20+fi
21 AC_SUBST([usrsbin_execdir])
22
23 case $libdir in
diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h
new file mode 100644
index 0000000000..6ce6b86df5
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/defines.h
@@ -0,0 +1,10 @@
1#define UTIL_LINUX_VERSION "2.12"
2#define util_linux_version "util-linux-2.12"
3
4#define HAVE_blkpg_h
5#define HAVE_kd_h
6#define HAVE_locale_h
7#define HAVE_langinfo_h
8#define HAVE_sys_user_h
9#define HAVE_asm_types_h
10//#define NEED_tqueue_h
diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
new file mode 100644
index 0000000000..64f02d570f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -0,0 +1,17 @@
1Display testname for subtest
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/functions.sh b/functions.sh
7--- a/tests/functions.sh 2013-09-04 12:41:07.625488953 +0200
8+++ b/tests/functions.sh 2013-09-04 17:33:02.402802957 +0200
9@@ -209,7 +209,7 @@
10 [ $TS_NSUBTESTS -eq 0 ] && echo
11 TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))
12
13- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
14+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
15 }
16
17 function ts_init {
diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch
new file mode 100644
index 0000000000..0ea23183ca
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/fix-configure.patch
@@ -0,0 +1,20 @@
1The userlib_execdir was not getting set correctly, the quoting
2was wrong as these quoted items were not getting expanded correctly.
3
4Upstream-Status: Pending
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7
8Index: util-linux-2.22.1/configure.ac
9===================================================================
10--- util-linux-2.22.1.orig/configure.ac
11+++ util-linux-2.22.1/configure.ac
12@@ -79,7 +79,7 @@ fi
13 AC_SUBST([usrsbin_execdir])
14
15 case $libdir in
16- '${exec_prefix}/'* | '${prefix}/'* | /usr/*)
17+ ${exec_prefix}/* | ${prefix}/* | /usr/*)
18 usrlib_execdir=$libdir ;;
19 *)
20 usrlib_execdir='${exec_prefix}'$libdir ;;
diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include
new file mode 100644
index 0000000000..e6abcd91f7
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/make_include
@@ -0,0 +1,17 @@
1VERSION=2.12
2CC=gcc
3CFLAGS=
4LDFLAGS=
5HAVE_OLD_GCC=yes
6HAVE_RAW_H=yes
7HAVE_NCURSES=yes
8CURSESFLAGS=-DNCH=1
9LIBCURSES=-lncurses
10HAVE_TERMCAP=no
11NEED_LIBCRYPT=yes
12FOREIGN = --foreign-user
13HAVE_XGETTEXT=yes
14HAVE_OPENPTY=yes
15HAVE_PIVOT_ROOT=yes
16HAVE_GOOD_RPC=yes
17HAVE_ZLIB=yes
diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch
new file mode 100644
index 0000000000..e9adc90a21
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/ptest.patch
@@ -0,0 +1,16 @@
1Define TESTS variable
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/Makefile.am b/Makefile.am
7--- a/Makefile.am 2013-08-26 16:29:42.151429221 +0200
8+++ b/Makefile.am 2013-08-26 17:52:31.013898120 +0200
9@@ -43,7 +43,7 @@
10 dist_usrbin_exec_SCRIPTS =
11 systemdsystemunit_DATA =
12 check_PROGRAMS =
13-TESTS =
14+TESTS = $(check_PROGRAMS)
15
16 PATHFILES =
diff --git a/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch b/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch
new file mode 100644
index 0000000000..ddf14a50d1
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Inappropriate [distribution]
2
3Take out lscpu stuff from the code
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: util-linux-2.22.1/configure.ac
8===================================================================
9--- util-linux-2.22.1.orig/configure.ac
10+++ util-linux-2.22.1/configure.ac
11@@ -937,7 +937,7 @@ UL_REQUIRES_BUILD([lsblk], [libmount])
12 AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes)
13
14
15-UL_BUILD_INIT([lscpu], [check])
16+UL_BUILD_INIT([lscpu], [no])
17 UL_REQUIRES_LINUX([lscpu])
18 UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
19 AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes)
20Index: util-linux-2.22.1/sys-utils/Makemodule.am
21===================================================================
22--- util-linux-2.22.1.orig/sys-utils/Makemodule.am
23+++ util-linux-2.22.1/sys-utils/Makemodule.am
24@@ -224,13 +224,6 @@ swapoff_CFLAGS = $(AM_CFLAGS) -I$(ul_lib
25 swapoff_LDADD = $(LDADD) libmount.la
26 endif
27
28-if BUILD_LSCPU
29-usrbin_exec_PROGRAMS += lscpu
30-lscpu_SOURCES = sys-utils/lscpu.c
31-lscpu_LDADD = $(LDADD) libcommon.la
32-dist_man_MANS += sys-utils/lscpu.1
33-endif
34-
35 if BUILD_CHCPU
36 sbin_PROGRAMS += chcpu
37 chcpu_SOURCES = sys-utils/chcpu.c
diff --git a/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch b/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch
new file mode 100644
index 0000000000..02e4d16ff7
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch
@@ -0,0 +1,35 @@
1simpleinit: remove deprecated sigsetmask()
2
3The sigsetmask() is deprecated in favor of sigprocmask().
4
5This is not needed upstream since simpleinit is removed from
6util-linux-ng master
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Upstream-Status: Inappropriate
11
12Index: util-linux-2.19.1/simpleinit/shutdown.c
13===================================================================
14--- util-linux-2.19.1.orig/simpleinit/shutdown.c 2011-03-04 03:47:47.000000000 -0800
15+++ util-linux-2.19.1/simpleinit/shutdown.c 2011-07-06 08:43:39.183849752 -0700
16@@ -145,7 +145,7 @@
17 {
18 int c, i, fd;
19 char *ptr;
20-
21+ sigset_t sigmask;
22 i = getdtablesize ();
23 for (fd = 3; fd < i; fd++) close (fd);
24 if (getpid () == 1)
25@@ -153,7 +153,9 @@
26 for (fd = 0; fd < 3; fd++) close (fd);
27 while (1) wait (NULL); /* Grim reaper never stops */
28 }
29- sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */
30+ /* simpleinit(8) blocks all signals: undo for ALRM */
31+ sigemptyset(&sigmask);
32+ sigprocmask (SIG_SETMASK, &sigmask, NULL);
33 for (i = 1; i < NSIG; i++) signal (i, SIG_DFL);
34
35 setlocale(LC_ALL, "");
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
new file mode 100644
index 0000000000..b04f14a835
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3cd tests || exit 1
4sh ./run.sh 2>&1 | {
5 sed '{
6 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
7 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
8 s/^\(.*\):\(.*\) \.\.\. IGNORE \(.*\)$/SKIP: \1:\2 \3/
9 }'
10}
diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h
new file mode 100644
index 0000000000..e960eef05f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/swapargs.h
@@ -0,0 +1,3 @@
1#define SWAPON_HAS_TWO_ARGS
2#include <asm/page.h>
3#include <sys/swap.h>
diff --git a/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch
new file mode 100644
index 0000000000..5031a7313e
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch
@@ -0,0 +1,32 @@
1configure should include errno.h instead of argp.h when
2checking for presence of program_invocation_short_name
3uclibc defines this to be const char* unlike util-linux-ng
4which defines this to be char* so this error goes unnoticed
5on glibc/eglibc systems.
6
7here is the error it fixes
8
9in file included from mountP.h:14:0,
10 from cache.c:29:
11/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'
12../../../include/c.h:118:14: note: previous declaration of '__progname' was here
13make[3]: *** [cache.lo] Error 1
14
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Jonathan Liu <net147@gmail.com>
18
19Upstream-Status: Pending
20Index: util-linux-2.22.1/configure.ac
21===================================================================
22--- util-linux-2.22.1.orig/configure.ac
23+++ util-linux-2.22.1/configure.ac
24@@ -372,7 +372,7 @@ esac
25
26 AC_MSG_CHECKING([whether program_invocation_short_name is defined])
27 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
28- #include <argp.h>
29+ #include <errno.h>
30 ]], [[
31 program_invocation_short_name = "test";
32 ]])], [
diff --git a/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch b/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch
new file mode 100644
index 0000000000..75774d8200
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: util-linux-ng-2.16/misc-utils/cal.c
4===================================================================
5--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
6+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
7@@ -407,7 +407,7 @@
8 strcpy(day_headings,"");
9 strcpy(j_day_headings,"");
10
11-#ifdef HAVE_LANGINFO_H
12+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
13 # define weekday(wd) nl_langinfo(ABDAY_1+wd)
14 #else
15 # define weekday(wd) _time_info->abbrev_wkday[wd]
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
new file mode 100644
index 0000000000..e8fcd98c64
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
@@ -0,0 +1,210 @@
1Support older hosts with latest util-linux-native
2
3mkostemp is not defined on older machines. So we detect this and
4provide a define that uses mkstemp instead.
5
6O_CLOEXEC is not defined on older machines. It is however defined
7in the 'c.h' header. Fix up the users to include 'c.h'.
8
9fdisks/fdisksunlabel.c was modified to use qsort_r, however
10this is not defined on older hosts. Revert:
11 commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
12 fdisk: (sun): use ask API, remove global variable
13
14Upstream-Status: Inappropriate [other]
15Patches revert upstream changes in order to support older
16machines.
17
18Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
19
20diff -ur util-linux-2.23/configure.ac /home/lmhatle/util-linux-2.23-fixed/configure.ac
21--- util-linux-2.23/configure.ac 2013-05-29 14:44:35.147853585 -0500
22+++ /home/lmhatle/util-linux-2.23-fixed/configure.ac 2013-05-30 14:56:15.050799650 -0500
23@@ -323,6 +323,7 @@
24 llseek \
25 lseek64 \
26 mempcpy \
27+ mkostemp \
28 nanosleep \
29 personality \
30 posix_fadvise \
31diff -ur util-linux-2.23/include/c.h /home/lmhatle/util-linux-2.23-fixed/include/c.h
32--- util-linux-2.23/include/c.h 2013-04-12 04:25:46.852156874 -0500
33+++ /home/lmhatle/util-linux-2.23-fixed/include/c.h 2013-05-30 14:56:11.310799488 -0500
34@@ -236,6 +236,13 @@
35 #endif
36
37 /*
38+ * mkostemp replacement
39+ */
40+#ifndef HAVE_MKOSTEMP
41+#define mkostemp(template, flags) mkstemp(template)
42+#endif
43+
44+/*
45 * MAXHOSTNAMELEN replacement
46 */
47 static inline size_t get_hostname_max(void)
48diff -ur util-linux-2.23/lib/randutils.c /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c
49--- util-linux-2.23/lib/randutils.c 2013-04-12 04:25:46.855156901 -0500
50+++ /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c 2013-05-30 14:55:26.622799644 -0500
51@@ -16,6 +16,7 @@
52 #include <sys/syscall.h>
53
54 #include "randutils.h"
55+#include "c.h"
56
57 #ifdef HAVE_TLS
58 #define THREAD_LOCAL static __thread
59diff -ur util-linux-2.23/lib/wholedisk.c /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c
60--- util-linux-2.23/lib/wholedisk.c 2013-04-12 04:25:46.855156901 -0500
61+++ /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c 2013-05-30 14:55:31.182799350 -0500
62@@ -10,6 +10,7 @@
63
64 #include "blkdev.h"
65 #include "wholedisk.h"
66+#include "c.h"
67
68 int is_whole_disk_fd(int fd, const char *name)
69 {
70diff -ur util-linux-2.23/fdisks/fdisksunlabel.c /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c
71--- util-linux-2.23/fdisks/fdisksunlabel.c 2013-04-23 09:14:19.229015244 -0500
72+++ /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c 2013-05-30 14:54:55.978799735 -0500
73@@ -383,10 +383,10 @@
74 }
75 }
76
77-static int verify_sun_cmp(int *a, int *b, void *data)
78-{
79- unsigned int *verify_sun_starts = (unsigned int *) data;
80+static unsigned int *verify_sun_starts;
81
82+static int verify_sun_cmp(int *a, int *b)
83+{
84 if (*a == -1)
85 return 1;
86 if (*b == -1)
87@@ -401,7 +401,6 @@
88 uint32_t starts[SUN_MAXPARTITIONS], lens[SUN_MAXPARTITIONS], start, stop;
89 uint32_t i,j,k,starto,endo;
90 int array[SUN_MAXPARTITIONS];
91- unsigned int *verify_sun_starts;
92
93 assert(cxt);
94 assert(cxt->label);
95@@ -442,16 +441,14 @@
96 }
97 }
98 }
99-
100 for (i = 0; i < SUN_MAXPARTITIONS; i++) {
101 if (lens[i])
102 array[i] = i;
103 else
104 array[i] = -1;
105 }
106- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
107- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
108- verify_sun_starts);
109+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
110+ (int (*)(const void *,const void *)) verify_sun_cmp);
111
112 if (array[0] == -1) {
113 fdisk_info(cxt, _("No partitions defined"));
114@@ -468,6 +465,7 @@
115 start = (starts[array[i]] + lens[array[i]]);
116 if (start < stop)
117 fdisk_warnx(cxt, _("Unused gap - sectors %d-%d"), start, stop);
118+
119 return 0;
120 }
121
122@@ -746,18 +744,12 @@
123 }
124 }
125
126-
127 void fdisk_sun_set_alt_cyl(struct fdisk_context *cxt)
128 {
129 struct sun_disklabel *sunlabel = self_disklabel(cxt);
130- uintmax_t res;
131- int rc = fdisk_ask_number(cxt, 0, /* low */
132- be16_to_cpu(sunlabel->acyl), /* default */
133- 65535, /* high */
134- _("Number of alternate cylinders"), /* query */
135- &res); /* result */
136- if (!rc)
137- sunlabel->acyl = cpu_to_be16(res);
138+ sunlabel->acyl =
139+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->acyl), 65535, 0,
140+ _("Number of alternate cylinders")));
141 }
142
143 void fdisk_sun_set_ncyl(struct fdisk_context *cxt, int cyl)
144@@ -769,54 +761,33 @@
145 void fdisk_sun_set_xcyl(struct fdisk_context *cxt)
146 {
147 struct sun_disklabel *sunlabel = self_disklabel(cxt);
148- uintmax_t res;
149- int rc = fdisk_ask_number(cxt, 0, /* low */
150- be16_to_cpu(sunlabel->apc), /* default */
151- cxt->geom.sectors, /* high */
152- _("Extra sectors per cylinder"), /* query */
153- &res); /* result */
154- if (!rc)
155- sunlabel->apc = cpu_to_be16(res);
156+ sunlabel->apc =
157+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->apc), cxt->geom.sectors, 0,
158+ _("Extra sectors per cylinder")));
159 }
160
161 void fdisk_sun_set_ilfact(struct fdisk_context *cxt)
162 {
163 struct sun_disklabel *sunlabel = self_disklabel(cxt);
164- uintmax_t res;
165- int rc = fdisk_ask_number(cxt, 1, /* low */
166- be16_to_cpu(sunlabel->intrlv), /* default */
167- 32, /* high */
168- _("Interleave factor"), /* query */
169- &res); /* result */
170- if (!rc)
171- sunlabel->intrlv = cpu_to_be16(res);
172+ sunlabel->intrlv =
173+ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->intrlv), 32, 0,
174+ _("Interleave factor")));
175 }
176
177 void fdisk_sun_set_rspeed(struct fdisk_context *cxt)
178 {
179 struct sun_disklabel *sunlabel = self_disklabel(cxt);
180- uintmax_t res;
181- int rc = fdisk_ask_number(cxt, 1, /* low */
182- be16_to_cpu(sunlabel->rpm), /* default */
183- USHRT_MAX, /* high */
184- _("Rotation speed (rpm)"), /* query */
185- &res); /* result */
186- if (!rc)
187- sunlabel->rpm = cpu_to_be16(res);
188-
189+ sunlabel->rpm =
190+ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->rpm), 100000, 0,
191+ _("Rotation speed (rpm)")));
192 }
193
194 void fdisk_sun_set_pcylcount(struct fdisk_context *cxt)
195 {
196 struct sun_disklabel *sunlabel = self_disklabel(cxt);
197- uintmax_t res;
198- int rc = fdisk_ask_number(cxt, 0, /* low */
199- be16_to_cpu(sunlabel->pcyl), /* default */
200- USHRT_MAX, /* high */
201- _("Number of physical cylinders"), /* query */
202- &res); /* result */
203- if (!rc)
204- sunlabel->pcyl = cpu_to_be16(res);
205+ sunlabel->pcyl =
206+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->pcyl), 65535, 0,
207+ _("Number of physical cylinders")));
208 }
209
210 static int sun_write_disklabel(struct fdisk_context *cxt)
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch
new file mode 100644
index 0000000000..5773d7ea1b
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch
@@ -0,0 +1,27 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The FHS indicates that /etc must be capable of being mounted R/O.
4
5The FHS also indicates that lock files belong in /var/lock, and /var must
6be R/W as soon as possible during boot.
7
8This patch moves the mtab lock file from the potentially R/O /etc, to the
9R/W /var/lock area. This lock file is used when mounting disks and making
10other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing
11to write to this file does not cause any functional limitations.
12
13(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts)
14
15Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
16
17--- util-linux-ng-2.16/include/pathnames.h.orig
18+++ util-linux-ng-2.16/include/pathnames.h
19@@ -90,7 +90,7 @@
20 # endif
21 #endif
22
23-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
24+#define _PATH_MOUNTED_LOCK "/var/lock/mtab~"
25 #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
26
27 #ifndef _PATH_DEV
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
new file mode 100644
index 0000000000..f131b763ca
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
@@ -0,0 +1,27 @@
1Upstream-Status: Pending
2
3Index: util-linux-2.22.1/login-utils/login.c
4===================================================================
5--- util-linux-2.22.1.orig/login-utils/login.c
6+++ util-linux-2.22.1/login-utils/login.c
7@@ -1239,6 +1239,8 @@ int main(int argc, char **argv)
8 char *buff;
9 int childArgc = 0;
10 int retcode;
11+ struct sigaction act;
12+
13
14 char *pwdbuf = NULL;
15 struct passwd *pwd = NULL, _pwd;
16@@ -1252,7 +1254,10 @@ int main(int argc, char **argv)
17 timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
18
19 signal(SIGALRM, timedout);
20- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */
21+ (void) sigaction(SIGALRM, NULL, &act);
22+ act.sa_flags &= ~SA_RESTART;
23+ sigaction(SIGALRM, &act, NULL);
24+
25 alarm(timeout);
26 signal(SIGQUIT, SIG_IGN);
27 signal(SIGINT, SIG_IGN);
diff --git a/meta/recipes-core/util-linux/util-linux_2.23.2.bb b/meta/recipes-core/util-linux/util-linux_2.23.2.bb
new file mode 100644
index 0000000000..b5c221bb4b
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux_2.23.2.bb
@@ -0,0 +1,22 @@
1MAJOR_VERSION = "2.23"
2require util-linux.inc
3
4# To support older hosts, we need to patch and/or revert
5# some upstream changes. Only do this for native packages.
6OLDHOST = ""
7OLDHOST_class-native = "file://util-linux-native.patch"
8
9SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
10 file://util-linux-ng-2.16-mount_lock_path.patch \
11 file://uclibc-__progname-conflict.patch \
12 file://configure-sbindir.patch \
13 file://fix-configure.patch \
14 ${OLDHOST} \
15"
16
17SRC_URI[md5sum] = "39a02ad0b3b37824c394f40930b7aa38"
18SRC_URI[sha256sum] = "6c5be3f7beec91b4893de14bbd722886fa2521be5bfa0fc079b749d0018633b1"
19
20CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
21EXTRA_OECONF_class-native += "--disable-fallocate --disable-use-tty-group"
22EXTRA_OECONF_class-nativesdk += "--disable-fallocate --disable-use-tty-group"
diff --git a/meta/recipes-core/zlib/site_config/headers b/meta/recipes-core/zlib/site_config/headers
new file mode 100644
index 0000000000..50268918aa
--- /dev/null
+++ b/meta/recipes-core/zlib/site_config/headers
@@ -0,0 +1 @@
zlib.h
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch b/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch
new file mode 100644
index 0000000000..61eea8238a
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.8/Makefile-runtests.patch
@@ -0,0 +1,38 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6diff -uNr a/Makefile.in b/Makefile.in
7--- a/Makefile.in 2013-06-10 13:48:14.321959162 +0200
8+++ b/Makefile.in 2013-06-10 13:49:36.686476448 +0200
9@@ -83,6 +83,9 @@
10 test: all teststatic testshared
11
12 teststatic: static
13+ @make runteststatic
14+
15+runteststatic:
16 @TMPST=tmpst_$$; \
17 if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
18 echo ' *** zlib test OK ***'; \
19@@ -92,6 +95,9 @@
20 rm -f $$TMPST
21
22 testshared: shared
23+ @make runtestshared
24+
25+runtestshared:
26 @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
27 LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
28 DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
29@@ -105,6 +111,9 @@
30 rm -f $$TMPSH
31
32 test64: all64
33+ @make runtestall64
34+
35+runtestall64:
36 @TMP64=tmp64_$$; \
37 if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
38 echo ' *** zlib 64-bit test OK ***'; \
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch b/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch
new file mode 100644
index 0000000000..403b4825c9
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.8/remove.ldconfig.call.patch
@@ -0,0 +1,20 @@
1
2When /etc/ld.so.cache is writeable by user running bitbake then it creates invalid cache
3(in my case libstdc++.so cannot be found after building zlib(-native) and I have to call
4touch */libstdc++.so && /sbin/ldconfig to fix it.
5
6So remove ldconfig call from make install-libs
7
8Upstream-Status: Inappropriate [disable feature]
9
10diff -uNr zlib-1.2.6.orig/Makefile.in zlib-1.2.6/Makefile.in
11--- zlib-1.2.6.orig/Makefile.in 2012-01-28 23:48:50.000000000 +0100
12+++ zlib-1.2.6/Makefile.in 2012-02-13 15:38:20.577700723 +0100
13@@ -199,7 +199,6 @@
14 rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
15 ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
16 ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
17- ($(LDCONFIG) || true) >/dev/null 2>&1; \
18 fi
19 cp zlib.3 $(DESTDIR)$(man3dir)
20 chmod 644 $(DESTDIR)$(man3dir)/zlib.3
diff --git a/meta/recipes-core/zlib/zlib-1.2.8/run-ptest b/meta/recipes-core/zlib/zlib-1.2.8/run-ptest
new file mode 100644
index 0000000000..19d9632501
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib-1.2.8/run-ptest
@@ -0,0 +1,7 @@
1#!/bin/sh
2FILE=zlib-ptest-$$.log
3make -k runteststatic runtestshared > $FILE
4sed -i -r -e 's/^(\s+\*+ (.+?) test OK \*+)/\1\nPASS: \2/' $FILE
5sed -i -r -e 's/^(\s+\*+ (.+?) test FAILED \*+)/\1\nFAIL: \2/' $FILE
6cat $FILE
7rm -f $FILE
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
new file mode 100644
index 0000000000..a7a5b23ffb
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -0,0 +1,61 @@
1SUMMARY = "Zlib Compression Library"
2DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data compression \
3library which is used by many different programs."
4HOMEPAGE = "http://zlib.net/"
5SECTION = "libs"
6LICENSE = "Zlib"
7LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd"
8
9PR = "r0"
10
11SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
12 file://remove.ldconfig.call.patch \
13 file://Makefile-runtests.patch \
14 file://run-ptest \
15 "
16
17SRC_URI[md5sum] = "28f1205d8dd2001f26fec1e8c2cebe37"
18SRC_URI[sha256sum] = "831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057"
19
20RDEPENDS_${PN}-ptest += "make"
21
22inherit ptest
23
24do_configure (){
25 ./configure --prefix=${prefix} --shared --libdir=${libdir}
26}
27
28do_compile (){
29 oe_runmake
30}
31
32do_compile_ptest() {
33 oe_runmake static shared
34}
35
36do_install() {
37 oe_runmake DESTDIR=${D} install
38}
39
40do_install_ptest() {
41 install ${B}/Makefile ${D}${PTEST_PATH}
42 install ${B}/example ${D}${PTEST_PATH}
43 install ${B}/minigzip ${D}${PTEST_PATH}
44 install ${B}/examplesh ${D}${PTEST_PATH}
45 install ${B}/minigzipsh ${D}${PTEST_PATH}
46}
47
48# We move zlib shared libraries for target builds to avoid
49# qa warnings.
50#
51do_install_append_class-target() {
52 if [ ${base_libdir} != ${libdir} ]
53 then
54 mkdir -p ${D}/${base_libdir}
55 mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
56 tmp=`readlink ${D}/${libdir}/libz.so`
57 ln -sf ../../${base_libdir}/$tmp ${D}/${libdir}/libz.so
58 fi
59}
60
61BBCLASSEXTEND = "native nativesdk"