diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-05-28 17:20:00 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-05-28 17:20:00 -0300 |
commit | 6575af67294a57126aa9408ee255db0e7be47bcd (patch) | |
tree | 0ebeb47514aec8981445ad7404d961ade8a41dc7 /core/coreutils | |
parent | 15715eb69d409c77752f91aa6d8080ecc0262af6 (diff) | |
parent | edec45419def1b81bd663a2859684ef55ba56269 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community-testing/collectd/PKGBUILD
community-testing/collectd/install
community-testing/collectd/libperl.patch
community-testing/collectd/rc.d
community-testing/collectd/rtnl_dump_filter.patch
community-testing/freeradius/PKGBUILD
community-testing/freeradius/freeradius.install
community-testing/freeradius/krb5-build-fix.patch
community-testing/freeradius/radiusd
community-testing/inn/PKGBUILD
community-testing/inn/inn.install
community-testing/inn/innd.conf
community-testing/inn/innd.rc
community-testing/inn/nnrpd.conf
community-testing/inn/nnrpd.rc
community-testing/inn/site.make.patch
community-testing/libvirt/PKGBUILD
community-testing/linux-tools/PKGBUILD
community-testing/linux-tools/cpupower.conf
community-testing/linux-tools/cpupower.rc
community-testing/linux-tools/cpupower.service
community-testing/perl-berkeleydb/PKGBUILD
community-testing/perl-class-methodmaker/PKGBUILD
community-testing/perl-clone/PKGBUILD
community-testing/perl-crypt-blowfish/PKGBUILD
community-testing/perl-crypt-des/PKGBUILD
community-testing/perl-curses/PKGBUILD
community-testing/perl-data-structure-util/PKGBUILD
community-testing/perl-datetime/PKGBUILD
community-testing/perl-device-serialport/PKGBUILD
community-testing/perl-file-rsyncp/PKGBUILD
community-testing/perl-fuse/PKGBUILD
community-testing/perl-gd/PKGBUILD
community-testing/perl-gssapi/PKGBUILD
community-testing/perl-html-strip/PKGBUILD
community-testing/perl-inline-java/PKGBUILD
community-testing/perl-io-dirent/PKGBUILD
community-testing/perl-io-tty/PKGBUILD
community-testing/perl-json-xs/PKGBUILD
community-testing/perl-libapreq2/PKGBUILD
community-testing/perl-mail-box-parser-c/PKGBUILD
community-testing/perl-mail-transport-dbx/PKGBUILD
community-testing/perl-net-dbus/PKGBUILD
community-testing/perl-net-libidn/PKGBUILD
community-testing/perl-params-classify/PKGBUILD
community-testing/perl-params-validate/PKGBUILD
community-testing/perl-string-crc32/PKGBUILD
community-testing/perl-text-charwidth/PKGBUILD
community-testing/perl-text-kakasi/ChangeLog
community-testing/perl-text-kakasi/PKGBUILD
community-testing/perl-tie-hash-indexed/PKGBUILD
community-testing/perl-www-curl/PKGBUILD
community-testing/perl-xmms/PKGBUILD
community-testing/pork/PKGBUILD
community-testing/rxvt-unicode/PKGBUILD
community-testing/rxvt-unicode/urxvt-tabbed.desktop
community-testing/rxvt-unicode/urxvt.desktop
community-testing/rxvt-unicode/urxvtc.desktop
community-testing/znc/PKGBUILD
community/blackbox/PKGBUILD
community/ccrtp/PKGBUILD
community/gambas2/poppler-0.20.patch
community/gambas3/poppler-0-20.patch
community/libunistring/PKGBUILD
community/libzrtpcpp/PKGBUILD
community/mplayer2/PKGBUILD
community/pdf2djvu/poppler-0.20.patch
community/sword/PKGBUILD
community/xiphos/PKGBUILD
core/procps/PKGBUILD
extra/dvdrip/PKGBUILD
extra/gstreamer0.10-good/PKGBUILD
extra/inkscape/poppler20.patch
extra/iperf/PKGBUILD
extra/libreoffice/PKGBUILD
extra/libreoffice/fix_broken_hebrew_wordwrapping.diff
extra/libreoffice/libreoffice-base.install
extra/libreoffice/libreoffice-calc.install
extra/libreoffice/libreoffice-common.install
extra/libreoffice/libreoffice-draw.install
extra/libreoffice/libreoffice-impress.install
extra/libreoffice/libreoffice-writer.install
extra/mail-notification/PKGBUILD
extra/nxserver/PKGBUILD
extra/php-suhosin/PKGBUILD
extra/poppler/PKGBUILD
extra/streamtuner/PKGBUILD
extra/systemd/PKGBUILD
extra/tunepimp/PKGBUILD
mozilla-testing/iceweasel-libre/iceweasel.install
multilib/wine/PKGBUILD
staging/gimp-devel/gimp-devel.install
testing/consolekit/PKGBUILD
testing/cryptsetup/PKGBUILD
testing/cryptsetup/encrypt_hook
testing/cryptsetup/encrypt_install
testing/dmraid/PKGBUILD
testing/dmraid/dmraid_install
testing/graphviz/PKGBUILD
testing/imagemagick/PKGBUILD
testing/imagemagick/perlmagick.rpath.patch
testing/irssi/PKGBUILD
testing/kdebindings-perlkde/PKGBUILD
testing/kdebindings-perlqt/PKGBUILD
testing/lvm2/PKGBUILD
testing/lvm2/lvm2_hook
testing/lvm2/lvm2_install
testing/mdadm/PKGBUILD
testing/mdadm/mdadm_install
testing/mdadm/mdadm_udev_install
testing/mkinitcpio-nfs-utils/PKGBUILD
testing/net-snmp/snmpd.rc
testing/perl-bit-vector/PKGBUILD
testing/perl-compress-bzip2/PKGBUILD
testing/perl-crypt-openssl-bignum/PKGBUILD
testing/perl-crypt-openssl-random/PKGBUILD
testing/perl-crypt-openssl-rsa/PKGBUILD
testing/perl-crypt-ssleay/PKGBUILD
testing/perl-dbd-mysql/PKGBUILD
testing/perl-dbi/PKGBUILD
testing/perl-fcgi/PKGBUILD
testing/perl-locale-gettext/PKGBUILD
testing/perl-locale-gettext/compatibility-with-POSIX-module.patch
testing/perl-net-ssleay/PKGBUILD
testing/perl-time-hires/PKGBUILD
testing/perl/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
testing/perl/ChangeLog
testing/perl/PKGBUILD
testing/perl/digest_eval_hole.diff
testing/perl/fix-h2ph-and-tests.patch
testing/perl/perl.install
testing/perl/perlbin.csh
testing/perl/perlbin.sh
testing/perl/provides.pl
testing/php/PKGBUILD
testing/php/logrotate.d.php-fpm
testing/php/rc.d.php-fpm
testing/pidgin/pidgin.install
testing/pinentry/pinentry.install
testing/postgresql/postgresql.pam
testing/slim/logrotate
testing/subversion/PKGBUILD
testing/vim/PKGBUILD
testing/vim/archlinux.vim
testing/vim/gvim.desktop
testing/vim/gvim.install
testing/vim/vimrc
testing/weechat/PKGBUILD
testing/xf86-video-ati/PKGBUILD
testing/xf86-video-intel/PKGBUILD
testing/xf86-video-nouveau/PKGBUILD
testing/xorg-server/PKGBUILD
Diffstat (limited to 'core/coreutils')
-rw-r--r-- | core/coreutils/coreutils-uname.patch | 173 |
1 files changed, 0 insertions, 173 deletions
diff --git a/core/coreutils/coreutils-uname.patch b/core/coreutils/coreutils-uname.patch deleted file mode 100644 index b458abeba..000000000 --- a/core/coreutils/coreutils-uname.patch +++ /dev/null @@ -1,173 +0,0 @@ -On linux platforms, grok /proc/cpuinfo for the CPU/vendor info. - -Prob not suitable for upstream seeing as how it's 100% linux-specific -http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html - -Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but -heavily reworked to suck less. - -To add support for additional platforms, check out the show_cpuinfo() -func in the linux/arch/<ARCH>/ source tree of the kernel. - ---- coreutils/src/uname.c -+++ coreutils/src/uname.c -@@ -50,6 +50,11 @@ - # include <mach-o/arch.h> - #endif - -+#if defined(__linux__) -+# define USE_PROCINFO -+# define UNAME_HARDWARE_PLATFORM -+#endif -+ - #include "system.h" - #include "error.h" - #include "quote.h" -@@ -138,6 +143,117 @@ - exit (status); - } - -+#if defined(USE_PROCINFO) -+ -+# if defined(__s390__) || defined(__s390x__) -+# define CPUINFO_FILE "/proc/sysinfo" -+# define CPUINFO_FORMAT "%64[^\t :]%*[ :]%256[^\n]%c" -+# else -+# define CPUINFO_FILE "/proc/cpuinfo" -+# define CPUINFO_FORMAT "%64[^\t:]\t:%256[^\n]%c" -+# endif -+ -+# define PROCINFO_PROCESSOR 0 -+# define PROCINFO_HARDWARE_PLATFORM 1 -+ -+static void __eat_cpuinfo_space(char *buf) -+{ -+ /* first eat trailing space */ -+ char *tmp = buf + strlen(buf) - 1; -+ while (tmp > buf && isspace(*tmp)) -+ *tmp-- = '\0'; -+ /* then eat leading space */ -+ tmp = buf; -+ while (*tmp && isspace(*tmp)) -+ tmp++; -+ if (tmp != buf) -+ memmove(buf, tmp, strlen(tmp)+1); -+ /* finally collapse whitespace */ -+ tmp = buf; -+ while (tmp[0] && tmp[1]) { -+ if (isspace(tmp[0]) && isspace(tmp[1])) { -+ memmove(tmp, tmp+1, strlen(tmp)); -+ continue; -+ } -+ ++tmp; -+ } -+} -+ -+static int __linux_procinfo(int x, char *fstr, size_t s) -+{ -+ FILE *fp; -+ -+ char *procinfo_keys[] = { -+ /* --processor --hardware-platform */ -+ #if defined(__alpha__) -+ "cpu model", "system type" -+ #elif defined(__arm__) -+ "Processor", "Hardware" -+ #elif defined(__avr32__) -+ "processor", "cpu family" -+ #elif defined(__bfin__) -+ "CPU", "BOARD Name" -+ #elif defined(__cris__) -+ "cpu", "cpu model" -+ #elif defined(__frv__) -+ "CPU-Core", "System" -+ #elif defined(__i386__) || defined(__x86_64__) -+ "model name", "vendor_id" -+ #elif defined(__ia64__) -+ "family", "vendor" -+ #elif defined(__hppa__) -+ "cpu", "model" -+ #elif defined(__m68k__) -+ "CPU", "MMU" -+ #elif defined(__mips__) -+ "cpu model", "system type" -+ #elif defined(__powerpc__) || defined(__powerpc64__) -+ "cpu", "machine" -+ #elif defined(__s390__) || defined(__s390x__) -+ "Type", "Manufacturer" -+ #elif defined(__sh__) -+ "cpu type", "machine" -+ #elif defined(sparc) || defined(__sparc__) -+ "type", "cpu" -+ #elif defined(__vax__) -+ "cpu type", "cpu" -+ #else -+ "unknown", "unknown" -+ #endif -+ }; -+ -+ if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) { -+ char key[65], value[257], eol, *ret = NULL; -+ -+ while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) { -+ __eat_cpuinfo_space(key); -+ if (!strcmp(key, procinfo_keys[x])) { -+ __eat_cpuinfo_space(value); -+ ret = value; -+ break; -+ } -+ if (eol != '\n') { -+ /* we need two fscanf's here in case the previous -+ * length limit caused us to read right up to the -+ * newline ... doing "%*[^\n]\n" wont eat the newline -+ */ -+ fscanf(fp, "%*[^\n]"); -+ fscanf(fp, "\n"); -+ } -+ } -+ fclose(fp); -+ -+ if (ret) { -+ strncpy(fstr, ret, s); -+ return 0; -+ } -+ } -+ -+ return -1; -+} -+ -+#endif -+ - /* Print ELEMENT, preceded by a space if something has already been - printed. */ - -@@ -250,10 +344,14 @@ main (int argc, char **argv) - if (toprint & PRINT_PROCESSOR) - { - char const *element = unknown; --#if HAVE_SYSINFO && defined SI_ARCHITECTURE -+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO) - { - static char processor[257]; -+#if defined(USE_PROCINFO) -+ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor)) -+#else - if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) -+#endif - element = processor; - } - #endif -@@ -306,9 +404,13 @@ main (int argc, char **argv) - if (element == unknown) - { - static char hardware_platform[257]; -+#if defined(USE_PROCINFO) -+ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform)) -+#else - size_t s = sizeof hardware_platform; - static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; - if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) -+#endif - element = hardware_platform; - } - #endif |