summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2012-05-28 20:14:47 +0000
committerParabola <dev@list.parabolagnulinux.org>2012-05-28 20:14:47 +0000
commitedec45419def1b81bd663a2859684ef55ba56269 (patch)
treecaa3c2d5f4e55b38e7740a39d80a21507679c586 /core
parent483f7de4ab6a706517279a24d2efc969f4a1996d (diff)
Mon May 28 20:14:39 UTC 2012
Diffstat (limited to 'core')
-rw-r--r--core/coreutils/coreutils-uname.patch173
-rw-r--r--core/ldns/Makefile.patch20
-rw-r--r--core/mdadm/mdadm.install10
-rw-r--r--core/mpfr/mpfr-3.1.0.p7.patch1236
-rw-r--r--core/procps/PKGBUILD87
-rw-r--r--core/procps/groff-top-manpage.patch39
-rw-r--r--core/procps/procps-3.2.7-free-hlmem.patch23
-rw-r--r--core/procps/procps-3.2.7-longcmd.patch22
-rw-r--r--core/procps/procps-3.2.7-ps-man-fmt.patch12
-rw-r--r--core/procps/procps-3.2.7-psman.patch22
-rw-r--r--core/procps/procps-3.2.7-slabtop-once.patch113
-rw-r--r--core/procps/procps-3.2.7-top-clrscr.patch19
-rw-r--r--core/procps/procps-3.2.7-top-cpu0.patch20
-rw-r--r--core/procps/procps-3.2.7-top-env-cpuloop.patch84
-rw-r--r--core/procps/procps-3.2.7-top-manpage.patch32
-rw-r--r--core/procps/procps-3.2.7-top-remcpu.patch98
-rw-r--r--core/procps/procps-3.2.7-top-sorthigh.patch37
-rw-r--r--core/procps/procps-3.2.7-w-best.patch16
-rw-r--r--core/procps/procps-3.2.7-watch-unicode.patch139
-rw-r--r--core/procps/procps-3.2.8-gmake-3.82.patch14
-rw-r--r--core/procps/procps-3.2.8-kernel3-uts.patch20
-rw-r--r--core/procps/procps-3.2.8-linux-ver-init.patch23
-rw-r--r--core/procps/procps-3.2.8-setlocale.patch66
-rw-r--r--core/procps/procps-3.2.8-threads.patch49
-rw-r--r--core/procps/sysctl.conf13
-rw-r--r--core/syslinux/PKGBUILD51
-rw-r--r--core/syslinux/syslinux-dont-build-dos-windows-targets.patch12
-rw-r--r--core/syslinux/syslinux-install_update463
-rw-r--r--core/syslinux/syslinux.cfg79
-rw-r--r--core/syslinux/syslinux.install13
30 files changed, 0 insertions, 3005 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
diff --git a/core/ldns/Makefile.patch b/core/ldns/Makefile.patch
deleted file mode 100644
index d98291ac9..000000000
--- a/core/ldns/Makefile.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- old/Makefile.in 2012-01-12 00:11:36.000000000 +1100
-+++ new/Makefile.in 2012-01-27 11:36:16.110154453 +1100
-@@ -130,7 +130,7 @@
- exit -1 ; \
- fi
- drill/drill: $(DRILL_LOBJS) $(LIB)
-- $(LINK_EXE) $(DRILL_LOBJS) $(LIBS) -lldns -o drill/drill
-+ $(LINK_EXE) $(DRILL_LOBJS) $(LIBS) $(LIBSSL_LIBS) -lldns -o drill/drill
-
- install-drill: drill/drill
- $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
-@@ -157,7 +157,7 @@
- exit -1 ; \
- fi
- $(EXAMPLE_PROGS): $(EXAMPLE_LOBJS) $(LIB)
-- $(LINK_EXE) $@.lo $(LIBS) -lldns -o $@
-+ $(LINK_EXE) $@.lo $(LIBS) $(LIBSSL_LIBS) -lldns -o $@
-
- $(TESTNS): $(TESTNS_LOBJS) $(LIB)
- $(LINK_EXE) $(TESTNS_LOBJS) $(LIBS) -lldns -o $(TESTNS)
diff --git a/core/mdadm/mdadm.install b/core/mdadm/mdadm.install
deleted file mode 100644
index e8404c260..000000000
--- a/core/mdadm/mdadm.install
+++ /dev/null
@@ -1,10 +0,0 @@
-# arg 1: the new package version
-# arg 2: the old package version
-
-post_upgrade() {
- if [ "$(vercmp $2 2.6.8-2)" -lt 0 -a "$(grep raid_partitions /etc/mkinitcpio.conf)" ]; then
- echo "Attention mdadm update:"
- echo "raid_partitions hook has been replaced by the more powerfull mdadm hook."
- echo "Please update your /etc/mkinitcpio.conf accordingly."
- fi
-}
diff --git a/core/mpfr/mpfr-3.1.0.p7.patch b/core/mpfr/mpfr-3.1.0.p7.patch
deleted file mode 100644
index f3de639bc..000000000
--- a/core/mpfr/mpfr-3.1.0.p7.patch
+++ /dev/null
@@ -1,1236 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-10-05 21:39:57.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_unlikely
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-03 08:17:15.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-10-05 21:39:57.000000000 +0000
-@@ -1 +1 @@
--3.1.0
-+3.1.0-p1
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
-@@ -988,10 +988,11 @@
- ******************************************************/
-
- /* Theses macros help the compiler to determine if a test is
-- * likely or unlikely. */
-+ likely or unlikely. The !! is necessary in case x is larger
-+ than a long. */
- #if __MPFR_GNUC(3,0) || __MPFR_ICC(8,1,0)
- # define MPFR_LIKELY(x) (__builtin_expect(!!(x),1))
--# define MPFR_UNLIKELY(x) (__builtin_expect((x),0))
-+# define MPFR_UNLIKELY(x) (__builtin_expect(!!(x),0))
- #else
- # define MPFR_LIKELY(x) (x)
- # define MPFR_UNLIKELY(x) (x)
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0"
-+#define MPFR_VERSION_STRING "3.1.0-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-10-05 21:39:57.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0";
-+ return "3.1.0-p1";
- }
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-10-14 10:43:32.000000000 +0000
-@@ -0,0 +1 @@
-+lib-search-path
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-10-14 10:43:32.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p1
-+3.1.0-p2
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p1"
-+#define MPFR_VERSION_STRING "3.1.0-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-10-14 10:43:32.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p1";
-+ return "3.1.0-p2";
- }
-diff -Naurd mpfr-3.1.0-a/tests/Makefile.am mpfr-3.1.0-b/tests/Makefile.am
---- mpfr-3.1.0-a/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
-@@ -65,8 +65,24 @@
- TESTS = $(check_PROGRAMS)
- TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-
--# Option to prevent libtool from generating wrapper scripts for the tests.
-+# The -no-install option prevents libtool from generating wrapper scripts
-+# for the tests.
- # This is useful to easily run the test scripts under valgrind or gdb.
- # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
- # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
--AM_LDFLAGS = -no-install
-+#
-+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
-+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
-+# library is already installed in the corresponding lib directory: its
-+# purpose is to make sure that the local .libs comes first in the library
-+# search path (otherwise the tests are linked against the old MPFR library
-+# by the LINK command -- see the generated Makefile). See:
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
-+# and
-+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
-+#
-+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
-diff -Naurd mpfr-3.1.0-a/tests/Makefile.in mpfr-3.1.0-b/tests/Makefile.in
---- mpfr-3.1.0-a/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
-+++ mpfr-3.1.0-b/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
-@@ -1124,11 +1124,27 @@
- TESTS = $(check_PROGRAMS)
- TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-
--# Option to prevent libtool from generating wrapper scripts for the tests.
-+# The -no-install option prevents libtool from generating wrapper scripts
-+# for the tests.
- # This is useful to easily run the test scripts under valgrind or gdb.
- # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
- # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
--AM_LDFLAGS = -no-install
-+#
-+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
-+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
-+# library is already installed in the corresponding lib directory: its
-+# purpose is to make sure that the local .libs comes first in the library
-+# search path (otherwise the tests are linked against the old MPFR library
-+# by the LINK command -- see the generated Makefile). See:
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
-+# and
-+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
-+#
-+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
- all: all-am
-
- .SUFFIXES:
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-11-03 15:15:11.000000000 +0000
-@@ -0,0 +1 @@
-+vasprintf
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-11-03 15:15:11.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p2
-+3.1.0-p3
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p2"
-+#define MPFR_VERSION_STRING "3.1.0-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/vasprintf.c mpfr-3.1.0-b/src/vasprintf.c
---- mpfr-3.1.0-a/src/vasprintf.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/vasprintf.c 2011-11-03 15:15:11.000000000 +0000
-@@ -1178,7 +1178,7 @@
- mpfr_exp_t exp;
- char * str;
- const int spec_g = (spec.spec == 'g' || spec.spec == 'G');
-- const int keep_trailing_zeros = spec_g && spec.alt;
-+ const int keep_trailing_zeros = !spec_g || spec.alt;
-
- /* WARNING: an empty precision field is forbidden (it means precision = 6
- and it should have been changed to 6 before the function call) */
-@@ -1356,7 +1356,7 @@
- else
- /* 1 <= |p| */
- {
-- size_t nsd; /* Number of significant digits */
-+ size_t str_len;
-
- /* Determine the position of the most significant decimal digit. */
- exp = floor_log10 (p);
-@@ -1365,12 +1365,10 @@
- /* P is too large to print all its integral part digits */
- return -1;
-
-- np->ip_size = exp + 1;
--
-- nsd = spec.prec + np->ip_size;
- if (dec_info == NULL)
-- {
-- str = mpfr_get_str (NULL, &exp, 10, nsd, p, spec.rnd_mode);
-+ { /* this case occurs with mpfr_printf ("%.0RUf", x) with x=9.5 */
-+ str =
-+ mpfr_get_str (NULL, &exp, 10, spec.prec+exp+1, p, spec.rnd_mode);
- register_string (np->sl, str);
- }
- else
-@@ -1379,81 +1377,60 @@
- str = dec_info->str;
- }
- np->ip_ptr = MPFR_IS_NEG (p) ? ++str : str; /* skip sign */
-+ str_len = strlen (str);
-+
-+ /* integral part */
-+ if (exp > str_len)
-+ /* mpfr_get_str gives no trailing zero when p is rounded up to the next
-+ power of 10 (p integer, so no fractional part) */
-+ {
-+ np->ip_trailing_zeros = exp - str_len;
-+ np->ip_size = str_len;
-+ }
-+ else
-+ np->ip_size = exp;
-
- if (spec.group)
- /* thousands separator in integral part */
- np->thousands_sep = MPFR_THOUSANDS_SEPARATOR;
-
-- if (nsd == 0 || (spec_g && !spec.alt))
-- /* compute how much non-zero digits in integral and fractional
-- parts */
-+ /* fractional part */
-+ str += np->ip_size;
-+ str_len -= np->ip_size;
-+ if (!keep_trailing_zeros)
-+ /* remove trailing zeros, if any */
- {
-- size_t str_len;
-- str_len = strlen (str); /* note: the sign has been skipped */
--
-- if (exp > str_len)
-- /* mpfr_get_str doesn't give the trailing zeros when p is a
-- multiple of 10 (p integer, so no fractional part) */
-- {
-- np->ip_trailing_zeros = exp - str_len;
-- np->ip_size = str_len;
-- if (spec.alt)
-- np->point = MPFR_DECIMAL_POINT;
-- }
-- else
-- /* str may contain some digits which are in fractional part */
-+ char *ptr = str + str_len - 1; /* pointer to the last digit of
-+ str */
-+ while ((*ptr == '0') && (str_len != 0))
- {
-- char *ptr;
--
-- ptr = str + str_len - 1; /* points to the end of str */
-- str_len -= np->ip_size; /* number of digits in fractional
-- part */
--
-- if (!keep_trailing_zeros)
-- /* remove trailing zeros, if any */
-- {
-- while ((*ptr == '0') && (str_len != 0))
-- {
-- --ptr;
-- --str_len;
-- }
-- }
--
-- if (str_len > INT_MAX)
-- /* too many digits in fractional part */
-- return -1;
--
-- if (str_len != 0)
-- /* some digits in fractional part */
-- {
-- np->point = MPFR_DECIMAL_POINT;
-- np->fp_ptr = str + np->ip_size;
-- np->fp_size = str_len;
-- }
-+ --ptr;
-+ --str_len;
- }
- }
-- else
-- /* spec.prec digits in fractional part */
-+
-+ if (str_len > 0)
-+ /* some nonzero digits in fractional part */
- {
-- if (np->ip_size == exp - 1)
-- /* the absolute value of the number has been rounded up to a power
-- of ten.
-- Insert an additional zero in integral part and put the rest of
-- them in fractional part. */
-- np->ip_trailing_zeros = 1;
-+ if (str_len > INT_MAX)
-+ /* too many digits in fractional part */
-+ return -1;
-
-- if (spec.prec != 0)
-- {
-- MPFR_ASSERTD (np->ip_size + np->ip_trailing_zeros == exp);
-- MPFR_ASSERTD (np->ip_size + spec.prec == nsd);
-+ np->point = MPFR_DECIMAL_POINT;
-+ np->fp_ptr = str;
-+ np->fp_size = str_len;
-+ }
-
-- np->point = MPFR_DECIMAL_POINT;
-- np->fp_ptr = str + np->ip_size;
-- np->fp_size = spec.prec;
-- }
-- else if (spec.alt)
-- np->point = MPFR_DECIMAL_POINT;
-+ if (keep_trailing_zeros && str_len < spec.prec)
-+ /* add missing trailing zeros */
-+ {
-+ np->point = MPFR_DECIMAL_POINT;
-+ np->fp_trailing_zeros = spec.prec - np->fp_size;
- }
-+
-+ if (spec.alt)
-+ /* add decimal point even if no digits follow it */
-+ np->point = MPFR_DECIMAL_POINT;
- }
-
- return 0;
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-11-03 15:15:11.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p2";
-+ return "3.1.0-p3";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tsprintf.c mpfr-3.1.0-b/tests/tsprintf.c
---- mpfr-3.1.0-a/tests/tsprintf.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tsprintf.c 2011-11-03 15:15:11.000000000 +0000
-@@ -475,6 +475,18 @@
- check_sprintf ("-1.", "%- #0.1RG", x);
-
- /* precision zero */
-+ mpfr_set_d (x, 9.5, MPFR_RNDN);
-+ check_sprintf ("9", "%.0RDf", x);
-+ check_sprintf ("10", "%.0RUf", x);
-+
-+ mpfr_set_d (x, 19.5, MPFR_RNDN);
-+ check_sprintf ("19", "%.0RDf", x);
-+ check_sprintf ("20", "%.0RUf", x);
-+
-+ mpfr_set_d (x, 99.5, MPFR_RNDN);
-+ check_sprintf ("99", "%.0RDf", x);
-+ check_sprintf ("100", "%.0RUf", x);
-+
- mpfr_set_d (x, -9.5, MPFR_RNDN);
- check_sprintf ("-10", "%.0RDf", x);
- check_sprintf ("-10", "%.0RYf", x);
-@@ -1078,6 +1090,23 @@
- mpfr_clear (x);
- }
-
-+static void
-+bug20111102 (void)
-+{
-+ mpfr_t t;
-+ char s[100];
-+
-+ mpfr_init2 (t, 84);
-+ mpfr_set_str (t, "999.99999999999999999999", 10, MPFR_RNDN);
-+ mpfr_sprintf (s, "%.20RNg", t);
-+ if (strcmp (s, "1000") != 0)
-+ {
-+ printf ("Error in bug20111102, expected 1000, got %s\n", s);
-+ exit (1);
-+ }
-+ mpfr_clear (t);
-+}
-+
- /* In particular, the following test makes sure that the rounding
- * for %Ra and %Rb is not done on the MPFR number itself (as it
- * would overflow). Note: it has been reported on comp.std.c that
-@@ -1161,6 +1190,7 @@
- locale = setlocale (LC_ALL, "C");
- #endif
-
-+ bug20111102 ();
- native_types ();
- hexadecimal ();
- binary ();
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-11-28 12:22:52.000000000 +0000
-@@ -0,0 +1 @@
-+gmp41compat
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-11-28 12:22:52.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p3
-+3.1.0-p4
-diff -Naurd mpfr-3.1.0-a/doc/mpfr.info mpfr-3.1.0-b/doc/mpfr.info
---- mpfr-3.1.0-a/doc/mpfr.info 2011-10-03 09:43:04.000000000 +0000
-+++ mpfr-3.1.0-b/doc/mpfr.info 2011-11-28 12:22:52.000000000 +0000
-@@ -2994,11 +2994,12 @@
-
- * `mpfr_urandom' and `mpfr_urandomb' changed in MPFR 3.1. Their
- behavior no longer depends on the platform (assuming this is also
-- true for GMP's random generator). As a consequence, the returned
-- values can be different between MPFR 3.1 and previous MPFR
-- versions. Note: as the reproducibility of these functions was not
-- specified before MPFR 3.1, the MPFR 3.1 behavior is _not_ regarded
-- as backward incompatible with previous versions.
-+ true for GMP's random generator, which is not the case between GMP
-+ 4.1 and 4.2 if `gmp_randinit_default' is used). As a consequence,
-+ the returned values can be different between MPFR 3.1 and previous
-+ MPFR versions. Note: as the reproducibility of these functions
-+ was not specified before MPFR 3.1, the MPFR 3.1 behavior is _not_
-+ regarded as backward incompatible with previous versions.
-
-
- 
-@@ -4239,13 +4240,13 @@
- Node: Type and Macro Changes129308
- Node: Added Functions132029
- Node: Changed Functions134972
--Node: Removed Functions139167
--Node: Other Changes139579
--Node: Contributors141108
--Node: References143574
--Node: GNU Free Documentation License145315
--Node: Concept Index167758
--Node: Function and Type Index173677
-+Node: Removed Functions139253
-+Node: Other Changes139665
-+Node: Contributors141194
-+Node: References143660
-+Node: GNU Free Documentation License145401
-+Node: Concept Index167844
-+Node: Function and Type Index173763
- 
- End Tag Table
-
-diff -Naurd mpfr-3.1.0-a/doc/mpfr.texi mpfr-3.1.0-b/doc/mpfr.texi
---- mpfr-3.1.0-a/doc/mpfr.texi 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/doc/mpfr.texi 2011-11-28 12:22:52.000000000 +0000
-@@ -3466,8 +3466,9 @@
- a lack of specification.
-
- @item @code{mpfr_urandom} and @code{mpfr_urandomb} changed in MPFR 3.1.
--Their behavior no longer depends on the platform (assuming this is also
--true for GMP's random generator). As a consequence, the returned values
-+Their behavior no longer depends on the platform (assuming this is also true
-+for GMP's random generator, which is not the case between GMP 4.1 and 4.2 if
-+@code{gmp_randinit_default} is used). As a consequence, the returned values
- can be different between MPFR 3.1 and previous MPFR versions.
- Note: as the reproducibility of these functions was not specified
- before MPFR 3.1, the MPFR 3.1 behavior is @emph{not} regarded as
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p3"
-+#define MPFR_VERSION_STRING "3.1.0-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-11-28 12:22:52.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p3";
-+ return "3.1.0-p4";
- }
-diff -Naurd mpfr-3.1.0-a/tests/trandom.c mpfr-3.1.0-b/tests/trandom.c
---- mpfr-3.1.0-a/tests/trandom.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/trandom.c 2011-11-28 12:22:52.000000000 +0000
-@@ -114,21 +114,29 @@
- mpfr_t x;
- gmp_randstate_t s;
-
-+#if __MPFR_GMP(4,2,0)
-+# define C1 "0.895943"
-+# define C2 "0.848824"
-+#else
-+# define C1 "0.479652"
-+# define C2 "0.648529"
-+#endif
-+
- gmp_randinit_default (s);
- gmp_randseed_ui (s, 42);
- mpfr_init2 (x, 17);
- mpfr_urandomb (x, s);
-- if (mpfr_cmp_str1 (x, "0.895943") != 0)
-+ if (mpfr_cmp_str1 (x, C1) != 0)
- {
-- printf ("Error in bug20100914, expected 0.895943, got ");
-+ printf ("Error in bug20100914, expected " C1 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
- }
- mpfr_urandomb (x, s);
-- if (mpfr_cmp_str1 (x, "0.848824") != 0)
-+ if (mpfr_cmp_str1 (x, C2) != 0)
- {
-- printf ("Error in bug20100914, expected 0.848824, got ");
-+ printf ("Error in bug20100914, expected " C2 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
-diff -Naurd mpfr-3.1.0-a/tests/turandom.c mpfr-3.1.0-b/tests/turandom.c
---- mpfr-3.1.0-a/tests/turandom.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/turandom.c 2011-11-28 12:22:52.000000000 +0000
-@@ -160,23 +160,29 @@
- mpfr_t x;
- gmp_randstate_t s;
-
-+#if __MPFR_GMP(4,2,0)
-+# define C1 "0.8488312"
-+# define C2 "0.8156509"
-+#else
-+# define C1 "0.6485367"
-+# define C2 "0.9362717"
-+#endif
-+
- gmp_randinit_default (s);
- gmp_randseed_ui (s, 42);
- mpfr_init2 (x, 17);
- mpfr_urandom (x, s, MPFR_RNDN);
-- /* the following values are obtained on a 32-bit computer, we should get
-- the same values on a 64-bit computer */
-- if (mpfr_cmp_str1 (x, "0.8488312") != 0)
-+ if (mpfr_cmp_str1 (x, C1) != 0)
- {
-- printf ("Error in bug20100914, expected 0.8488312, got ");
-+ printf ("Error in bug20100914, expected " C1 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
- }
- mpfr_urandom (x, s, MPFR_RNDN);
-- if (mpfr_cmp_str1 (x, "0.8156509") != 0)
-+ if (mpfr_cmp_str1 (x, C2) != 0)
- {
-- printf ("Error in bug20100914, expected 0.8156509, got ");
-+ printf ("Error in bug20100914, expected " C2 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-02-24 12:44:49.000000000 +0000
-@@ -0,0 +1 @@
-+logging-freeze
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-02-24 12:44:49.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p4
-+3.1.0-p5
-diff -Naurd mpfr-3.1.0-a/src/add_d.c mpfr-3.1.0-b/src/add_d.c
---- mpfr-3.1.0-a/src/add_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add_d.c 2012-02-24 12:44:49.000000000 +0000
-@@ -34,7 +34,7 @@
- (("b[%Pu]=%.*Rg c=%.20g rnd=%d",
- mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
- ("a[%Pu]=%.*Rg inexact=%d",
-- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
-+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
-
- MPFR_SAVE_EXPO_MARK (expo);
-
-diff -Naurd mpfr-3.1.0-a/src/add_ui.c mpfr-3.1.0-b/src/add_ui.c
---- mpfr-3.1.0-a/src/add_ui.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add_ui.c 2012-02-24 12:44:49.000000000 +0000
-@@ -29,7 +29,7 @@
- MPFR_LOG_FUNC
- (("x[%Pu]=%.*Rg u=%d rnd=%d",
- mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
-- ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_get_prec, y));
-+ ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_log_prec, y));
-
- if (MPFR_LIKELY(u != 0) ) /* if u=0, do nothing */
- {
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p4"
-+#define MPFR_VERSION_STRING "3.1.0-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/mul_d.c mpfr-3.1.0-b/src/mul_d.c
---- mpfr-3.1.0-a/src/mul_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mul_d.c 2012-02-24 12:44:49.000000000 +0000
-@@ -34,7 +34,7 @@
- (("b[%Pu]=%.*Rg c=%.20g rnd=%d",
- mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
- ("a[%Pu]=%.*Rg inexact=%d",
-- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
-+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
-
- MPFR_SAVE_EXPO_MARK (expo);
-
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-02-24 12:44:49.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p4";
-+ return "3.1.0-p5";
- }
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-02-24 13:50:05.000000000 +0000
-@@ -0,0 +1 @@
-+logging-varfmt
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-02-24 13:50:05.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p5
-+3.1.0-p6
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
-@@ -1592,7 +1592,7 @@
- do \
- if ((MPFR_LOG_INTERNAL_F & mpfr_log_type) && \
- (mpfr_log_current <= mpfr_log_level)) \
-- LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rf\n", __func__, __LINE__, \
-+ LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rg\n", __func__, __LINE__, \
- #x, mpfr_get_prec (x), mpfr_log_prec, x); \
- while (0)
-
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p5"
-+#define MPFR_VERSION_STRING "3.1.0-p6"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-02-24 13:50:05.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p5";
-+ return "3.1.0-p6";
- }
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-03-08 15:17:03.000000000 +0000
-@@ -0,0 +1 @@
-+large-prec
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-03-08 15:17:03.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p6
-+3.1.0-p7
-diff -Naurd mpfr-3.1.0-a/src/add1.c mpfr-3.1.0-b/src/add1.c
---- mpfr-3.1.0-a/src/add1.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add1.c 2012-03-08 15:17:03.000000000 +0000
-@@ -44,12 +44,12 @@
- bq = MPFR_PREC(b);
- cq = MPFR_PREC(c);
-
-- an = (aq-1)/GMP_NUMB_BITS+1; /* number of limbs of a */
-+ an = MPFR_PREC2LIMBS (aq); /* number of limbs of a */
- aq2 = (mpfr_prec_t) an * GMP_NUMB_BITS;
- sh = aq2 - aq; /* non-significant bits in low limb */
-
-- bn = (bq-1)/GMP_NUMB_BITS+1; /* number of limbs of b */
-- cn = (cq-1)/GMP_NUMB_BITS+1; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
-
- ap = MPFR_MANT(a);
- bp = MPFR_MANT(b);
-@@ -124,7 +124,7 @@
- dif = aq2 - diff_exp;
- /* dif is the number of bits of c which overlap with a' */
-
-- difn = (dif-1)/GMP_NUMB_BITS + 1;
-+ difn = MPFR_PREC2LIMBS (dif);
- /* only the highest difn limbs from c have to be considered */
- if (MPFR_UNLIKELY(difn > cn))
- {
-diff -Naurd mpfr-3.1.0-a/src/add1sp.c mpfr-3.1.0-b/src/add1sp.c
---- mpfr-3.1.0-a/src/add1sp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add1sp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -107,7 +107,7 @@
-
- /* Read prec and num of limbs */
- p = MPFR_PREC(b);
-- n = (p+GMP_NUMB_BITS-1)/GMP_NUMB_BITS;
-+ n = MPFR_PREC2LIMBS (p);
- MPFR_UNSIGNED_MINUS_MODULO(sh, p);
- bx = MPFR_GET_EXP(b);
- d = (mpfr_uexp_t) (bx - MPFR_GET_EXP(c));
-diff -Naurd mpfr-3.1.0-a/src/agm.c mpfr-3.1.0-b/src/agm.c
---- mpfr-3.1.0-a/src/agm.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/agm.c 2012-03-08 15:17:03.000000000 +0000
-@@ -91,7 +91,7 @@
- q = MPFR_PREC(r);
- p = q + MPFR_INT_CEIL_LOG2(q) + 15;
- MPFR_ASSERTD (p >= 7); /* see algorithms.tex */
-- s = (p - 1) / GMP_NUMB_BITS + 1;
-+ s = MPFR_PREC2LIMBS (p);
-
- /* b (op2) and a (op1) are the 2 operands but we want b >= a */
- compare = mpfr_cmp (op1, op2);
-@@ -285,7 +285,7 @@
-
- /* Next iteration */
- MPFR_ZIV_NEXT (loop, p);
-- s = (p - 1) / GMP_NUMB_BITS + 1;
-+ s = MPFR_PREC2LIMBS (p);
- }
- MPFR_ZIV_FREE (loop);
-
-diff -Naurd mpfr-3.1.0-a/src/eq.c mpfr-3.1.0-b/src/eq.c
---- mpfr-3.1.0-a/src/eq.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/eq.c 2012-03-08 15:17:03.000000000 +0000
-@@ -56,8 +56,8 @@
- if (uexp != vexp)
- return 0; /* no bit agree */
-
-- usize = (MPFR_PREC(u) - 1) / GMP_NUMB_BITS + 1;
-- vsize = (MPFR_PREC(v) - 1) / GMP_NUMB_BITS + 1;
-+ usize = MPFR_LIMB_SIZE (u);
-+ vsize = MPFR_LIMB_SIZE (v);
-
- if (vsize > usize) /* exchange u and v */
- {
-diff -Naurd mpfr-3.1.0-a/src/exp.c mpfr-3.1.0-b/src/exp.c
---- mpfr-3.1.0-a/src/exp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/exp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -133,7 +133,7 @@
- mp_size_t yn;
- int sh;
-
-- yn = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
-+ yn = MPFR_LIMB_SIZE (y);
- sh = (mpfr_prec_t) yn * GMP_NUMB_BITS - MPFR_PREC(y);
- MPFR_MANT(y)[0] += MPFR_LIMB_ONE << sh;
- inexact = 1;
-diff -Naurd mpfr-3.1.0-a/src/get_d.c mpfr-3.1.0-b/src/get_d.c
---- mpfr-3.1.0-a/src/get_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_d.c 2012-03-08 15:17:03.000000000 +0000
-@@ -100,7 +100,7 @@
- nbits += (1021 + e);
- MPFR_ASSERTD (nbits >= 1);
- }
-- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ np = MPFR_PREC2LIMBS (nbits);
- MPFR_ASSERTD ( np <= MPFR_LIMBS_PER_DOUBLE );
- carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
- nbits, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/get_flt.c mpfr-3.1.0-b/src/get_flt.c
---- mpfr-3.1.0-a/src/get_flt.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_flt.c 2012-03-08 15:17:03.000000000 +0000
-@@ -92,7 +92,7 @@
- nbits += (125 + e);
- MPFR_ASSERTD (nbits >= 1);
- }
-- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ np = MPFR_PREC2LIMBS (nbits);
- MPFR_ASSERTD(np <= MPFR_LIMBS_PER_FLT);
- carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
- nbits, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/get_str.c mpfr-3.1.0-b/src/get_str.c
---- mpfr-3.1.0-a/src/get_str.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_str.c 2012-03-08 15:17:03.000000000 +0000
-@@ -2351,7 +2351,7 @@
-
- /* the first digit will contain only r bits */
- prec = (m - 1) * pow2 + r; /* total number of bits */
-- n = (prec - 1) / GMP_NUMB_BITS + 1;
-+ n = MPFR_PREC2LIMBS (prec);
-
- MPFR_TMP_MARK (marker);
- x1 = MPFR_TMP_LIMBS_ALLOC (n + 1);
-@@ -2417,12 +2417,12 @@
- exact = 1;
-
- /* number of limbs */
-- n = 1 + (prec - 1) / GMP_NUMB_BITS;
-+ n = MPFR_PREC2LIMBS (prec);
-
- /* a will contain the approximation of the mantissa */
- a = MPFR_TMP_LIMBS_ALLOC (n);
-
-- nx = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
-+ nx = MPFR_LIMB_SIZE (x);
-
- if ((mpfr_exp_t) m == g) /* final exponent is 0, no multiplication or
- division to perform */
-diff -Naurd mpfr-3.1.0-a/src/init2.c mpfr-3.1.0-b/src/init2.c
---- mpfr-3.1.0-a/src/init2.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/init2.c 2012-03-08 15:17:03.000000000 +0000
-@@ -51,7 +51,7 @@
- which both have an odd mantissa */
- MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
-
-- xsize = (mp_size_t) ((p - 1) / GMP_NUMB_BITS) + 1;
-+ xsize = MPFR_PREC2LIMBS (p);
- tmp = (mpfr_limb_ptr) (*__gmp_allocate_func)(MPFR_MALLOC_SIZE(xsize));
-
- MPFR_PREC(x) = p; /* Set prec */
-diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c
---- mpfr-3.1.0-a/src/lngamma.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000
-@@ -67,7 +67,7 @@
-
- /* Now, the unit bit is represented. */
-
-- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
-+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
- /* number of represented fractional bits (including the trailing 0's) */
-
- x0 = *(MPFR_MANT (x) + prec / GMP_NUMB_BITS);
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-03-08 15:17:03.000000000 +0000
-@@ -646,10 +646,15 @@
- **************** mpfr_t properties *******************
- ******************************************************/
-
-+/* In the following macro, p is usually a mpfr_prec_t, but this macro
-+ works with other integer types (without integer overflow). */
-+#define MPFR_PREC2LIMBS(p) \
-+ (MPFR_ASSERTD (p >= 1), ((p) - 1) / GMP_NUMB_BITS + 1)
-+
- #define MPFR_PREC(x) ((x)->_mpfr_prec)
- #define MPFR_EXP(x) ((x)->_mpfr_exp)
- #define MPFR_MANT(x) ((x)->_mpfr_d)
--#define MPFR_LIMB_SIZE(x) ((MPFR_PREC((x))-1)/GMP_NUMB_BITS+1)
-+#define MPFR_LIMB_SIZE(x) (MPFR_PREC2LIMBS (MPFR_PREC ((x))))
-
-
- /******************************************************
-@@ -1213,8 +1218,8 @@
- _destp = MPFR_MANT (dest); \
- if (MPFR_UNLIKELY (_destprec >= _srcprec)) \
- { \
-- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS - _srcs; \
-+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
-+ _dests = MPFR_PREC2LIMBS (_destprec) - _srcs; \
- MPN_COPY (_destp + _dests, srcp, _srcs); \
- MPN_ZERO (_destp, _dests); \
- inexact = 0; \
-@@ -1227,8 +1232,8 @@
- mp_limb_t _rb, _sb, _ulp; \
- \
- /* Compute Position and shift */ \
-- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
-+ _dests = MPFR_PREC2LIMBS (_destprec); \
- MPFR_UNSIGNED_MINUS_MODULO (_sh, _destprec); \
- _sp = (srcp) + _srcs - _dests; \
- \
-@@ -1372,7 +1377,7 @@
- if (MPFR_LIKELY (MPFR_PREC (dest) == MPFR_PREC (src))) \
- { \
- MPN_COPY (MPFR_MANT (dest), MPFR_MANT (src), \
-- (MPFR_PREC (src) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS); \
-+ MPFR_LIMB_SIZE (src)); \
- inexact = 0; \
- } \
- else \
-@@ -1682,7 +1687,7 @@
- MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
- if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
- mpfr_abort_prec_max (); \
-- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
-+ _size = MPFR_PREC2LIMBS (_prec); \
- if (MPFR_UNLIKELY (_size * (num) > MPFR_GROUP_STATIC_SIZE)) \
- { \
- (g).alloc = (num) * _size * sizeof (mp_limb_t); \
-@@ -1733,7 +1738,7 @@
- MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
- if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
- mpfr_abort_prec_max (); \
-- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
-+ _size = MPFR_PREC2LIMBS (_prec); \
- (g).alloc = (num) * _size * sizeof (mp_limb_t); \
- if (MPFR_LIKELY (_oalloc == 0)) \
- (g).mant = (mp_limb_t *) (*__gmp_allocate_func) ((g).alloc); \
-@@ -1886,7 +1891,7 @@
- MPFR_NORETURN_ATTR;
-
- __MPFR_DECLSPEC void mpfr_rand_raw _MPFR_PROTO((mpfr_limb_ptr, gmp_randstate_t,
-- unsigned long));
-+ mpfr_prec_t));
-
- __MPFR_DECLSPEC mpz_t* mpfr_bernoulli_internal _MPFR_PROTO((mpz_t*,
- unsigned long));
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p6"
-+#define MPFR_VERSION_STRING "3.1.0-p7"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/mul.c mpfr-3.1.0-b/src/mul.c
---- mpfr-3.1.0-a/src/mul.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mul.c 2012-03-08 15:17:03.000000000 +0000
-@@ -93,15 +93,15 @@
-
- ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c);
-
-- bq = MPFR_PREC(b);
-- cq = MPFR_PREC(c);
-+ bq = MPFR_PREC (b);
-+ cq = MPFR_PREC (c);
-
-- MPFR_ASSERTD(bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
-
-- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
-- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
- k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
-- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ tn = MPFR_PREC2LIMBS (bq + cq);
- /* <= k, thus no int overflow */
- MPFR_ASSERTD(tn <= k);
-
-@@ -292,12 +292,12 @@
- bq = MPFR_PREC (b);
- cq = MPFR_PREC (c);
-
-- MPFR_ASSERTD (bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
-
-- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
-- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
- k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
-- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ tn = MPFR_PREC2LIMBS (bq + cq);
- MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */
-
- /* Check for no size_t overflow*/
-diff -Naurd mpfr-3.1.0-a/src/pow.c mpfr-3.1.0-b/src/pow.c
---- mpfr-3.1.0-a/src/pow.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/pow.c 2012-03-08 15:17:03.000000000 +0000
-@@ -136,7 +136,7 @@
- (b) all the 'z' bits are zero
- */
-
-- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
-+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
- /* number of z+0 bits */
-
- yn = prec / GMP_NUMB_BITS;
-diff -Naurd mpfr-3.1.0-a/src/print_raw.c mpfr-3.1.0-b/src/print_raw.c
---- mpfr-3.1.0-a/src/print_raw.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/print_raw.c 2012-03-08 15:17:03.000000000 +0000
-@@ -84,7 +84,7 @@
- int i;
- mpfr_prec_t count = 0;
- char c;
-- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
-+ mp_size_t n = MPFR_PREC2LIMBS (r);
-
- printf("%s ", str);
- for(n-- ; n>=0 ; n--)
-@@ -109,7 +109,7 @@
- int i;
- mpfr_prec_t count = 0;
- char c;
-- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
-+ mp_size_t n = MPFR_PREC2LIMBS (r);
-
- for(n-- ; n>=0 ; n--)
- {
-diff -Naurd mpfr-3.1.0-a/src/round_prec.c mpfr-3.1.0-b/src/round_prec.c
---- mpfr-3.1.0-a/src/round_prec.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/round_prec.c 2012-03-08 15:17:03.000000000 +0000
-@@ -55,12 +55,12 @@
-
- MPFR_ASSERTN(prec >= MPFR_PREC_MIN && prec <= MPFR_PREC_MAX);
-
-- nw = 1 + (prec - 1) / GMP_NUMB_BITS; /* needed allocated limbs */
-+ nw = MPFR_PREC2LIMBS (prec); /* needed allocated limbs */
-
- /* check if x has enough allocated space for the significand */
- /* Get the number of limbs from the precision.
- (Compatible with all allocation methods) */
-- ow = (MPFR_PREC (x) + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ ow = MPFR_LIMB_SIZE (x);
- if (nw > ow)
- {
- /* FIXME: Variable can't be created using custom allocation,
-diff -Naurd mpfr-3.1.0-a/src/round_raw_generic.c mpfr-3.1.0-b/src/round_raw_generic.c
---- mpfr-3.1.0-a/src/round_raw_generic.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/round_raw_generic.c 2012-03-08 15:17:03.000000000 +0000
-@@ -80,7 +80,7 @@
- (xprec <= yprec || MPFR_IS_LIKE_RNDZ (rnd_mode, neg)))
- return 0;
-
-- xsize = (xprec-1)/GMP_NUMB_BITS + 1;
-+ xsize = MPFR_PREC2LIMBS (xprec);
- nw = yprec / GMP_NUMB_BITS;
- rw = yprec & (GMP_NUMB_BITS - 1);
-
-diff -Naurd mpfr-3.1.0-a/src/set.c mpfr-3.1.0-b/src/set.c
---- mpfr-3.1.0-a/src/set.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set.c 2012-03-08 15:17:03.000000000 +0000
-@@ -48,8 +48,7 @@
- /* Same precision and b is not singular:
- * just copy the mantissa, and set the exponent and the sign
- * The result is exact. */
-- MPN_COPY (MPFR_MANT (a), MPFR_MANT (b),
-- (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
-+ MPN_COPY (MPFR_MANT (a), MPFR_MANT (b), MPFR_LIMB_SIZE (b));
- MPFR_RET (0);
- }
- else
-diff -Naurd mpfr-3.1.0-a/src/set_f.c mpfr-3.1.0-b/src/set_f.c
---- mpfr-3.1.0-a/src/set_f.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set_f.c 2012-03-08 15:17:03.000000000 +0000
-@@ -43,7 +43,7 @@
- if (SIZ(x) * MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0)
- MPFR_CHANGE_SIGN (y);
-
-- sy = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
-+ sy = MPFR_LIMB_SIZE (y);
- my = MPFR_MANT(y);
- mx = PTR(x);
-
-diff -Naurd mpfr-3.1.0-a/src/set_prec.c mpfr-3.1.0-b/src/set_prec.c
---- mpfr-3.1.0-a/src/set_prec.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set_prec.c 2012-03-08 15:17:03.000000000 +0000
-@@ -32,7 +32,7 @@
- MPFR_ASSERTN (p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
-
- /* Calculate the new number of limbs */
-- xsize = (p - 1) / GMP_NUMB_BITS + 1;
-+ xsize = MPFR_PREC2LIMBS (p);
-
- /* Realloc only if the new size is greater than the old */
- xoldsize = MPFR_GET_ALLOC_SIZE (x);
-diff -Naurd mpfr-3.1.0-a/src/setmax.c mpfr-3.1.0-b/src/setmax.c
---- mpfr-3.1.0-a/src/setmax.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/setmax.c 2012-03-08 15:17:03.000000000 +0000
-@@ -32,7 +32,7 @@
- mp_limb_t *xp;
-
- MPFR_SET_EXP (x, e);
-- xn = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
-+ xn = MPFR_LIMB_SIZE (x);
- sh = (mpfr_prec_t) xn * GMP_NUMB_BITS - MPFR_PREC(x);
- xp = MPFR_MANT(x);
- xp[0] = MP_LIMB_T_MAX << sh;
-diff -Naurd mpfr-3.1.0-a/src/sqr.c mpfr-3.1.0-b/src/sqr.c
---- mpfr-3.1.0-a/src/sqr.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/sqr.c 2012-03-08 15:17:03.000000000 +0000
-@@ -56,11 +56,11 @@
- ax = 2 * MPFR_GET_EXP (b);
- bq = MPFR_PREC(b);
-
-- MPFR_ASSERTD (2 * bq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN (2 * (mpfr_uprec_t) bq <= MPFR_PREC_MAX);
-
-- bn = MPFR_LIMB_SIZE(b); /* number of limbs of b */
-- tn = 1 + (2 * bq - 1) / GMP_NUMB_BITS; /* number of limbs of square,
-- 2*bn or 2*bn-1 */
-+ bn = MPFR_LIMB_SIZE (b); /* number of limbs of b */
-+ tn = MPFR_PREC2LIMBS (2 * bq); /* number of limbs of square,
-+ 2*bn or 2*bn-1 */
-
- if (MPFR_UNLIKELY(bn > MPFR_SQR_THRESHOLD))
- return mpfr_mul (a, b, b, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/stack_interface.c mpfr-3.1.0-b/src/stack_interface.c
---- mpfr-3.1.0-a/src/stack_interface.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/stack_interface.c 2012-03-08 15:17:03.000000000 +0000
-@@ -26,7 +26,7 @@
- size_t
- mpfr_custom_get_size (mpfr_prec_t prec)
- {
-- return (prec + GMP_NUMB_BITS -1) / GMP_NUMB_BITS * BYTES_PER_MP_LIMB;
-+ return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB;
- }
-
- #undef mpfr_custom_init
-diff -Naurd mpfr-3.1.0-a/src/strtofr.c mpfr-3.1.0-b/src/strtofr.c
---- mpfr-3.1.0-a/src/strtofr.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/strtofr.c 2012-03-08 15:17:03.000000000 +0000
-@@ -467,7 +467,7 @@
- /* Set y to the value of the ~prec most significant bits of pstr->mant
- (as long as we guarantee correct rounding, we don't need to get
- exactly prec bits). */
-- ysize = (prec - 1) / GMP_NUMB_BITS + 1;
-+ ysize = MPFR_PREC2LIMBS (prec);
- /* prec bits corresponds to ysize limbs */
- ysize_bits = ysize * GMP_NUMB_BITS;
- /* and to ysize_bits >= prec > MPFR_PREC (x) bits */
-diff -Naurd mpfr-3.1.0-a/src/sub1sp.c mpfr-3.1.0-b/src/sub1sp.c
---- mpfr-3.1.0-a/src/sub1sp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/sub1sp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -155,8 +155,8 @@
- MPFR_ASSERTD(MPFR_IS_PURE_FP(c));
-
- /* Read prec and num of limbs */
-- p = MPFR_PREC(b);
-- n = (p-1)/GMP_NUMB_BITS+1;
-+ p = MPFR_PREC (b);
-+ n = MPFR_PREC2LIMBS (p);
-
- /* Fast cmp of |b| and |c|*/
- bx = MPFR_GET_EXP (b);
-diff -Naurd mpfr-3.1.0-a/src/urandomb.c mpfr-3.1.0-b/src/urandomb.c
---- mpfr-3.1.0-a/src/urandomb.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/urandomb.c 2012-03-08 15:17:03.000000000 +0000
-@@ -31,13 +31,20 @@
- a sufficient number of limbs */
- void
- mpfr_rand_raw (mpfr_limb_ptr mp, gmp_randstate_t rstate,
-- unsigned long int nbits)
-+ mpfr_prec_t nbits)
- {
- mpz_t z;
-
-+ MPFR_ASSERTN (nbits >= 1);
- /* To be sure to avoid the potential allocation of mpz_urandomb */
-- ALLOC(z) = SIZ(z) = ((nbits - 1) / GMP_NUMB_BITS) + 1;
-+ ALLOC(z) = SIZ(z) = MPFR_PREC2LIMBS (nbits);
- PTR(z) = mp;
-+#if __MPFR_GMP(5,0,0)
-+ /* Check for integer overflow (unless mp_bitcnt_t is signed,
-+ but according to the GMP manual, this shouldn't happen).
-+ Note: mp_bitcnt_t has been introduced in GMP 5.0.0. */
-+ MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1);
-+#endif
- mpz_urandomb (z, rstate, nbits);
- }
-
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-03-08 15:17:03.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p6";
-+ return "3.1.0-p7";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tinits.c mpfr-3.1.0-b/tests/tinits.c
---- mpfr-3.1.0-a/tests/tinits.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tinits.c 2012-03-08 15:17:03.000000000 +0000
-@@ -1,4 +1,4 @@
--/* Test file for mpfr_inits, mpfr_inits2 and mpfr_clears.
-+/* Test file for mpfr_init2, mpfr_inits, mpfr_inits2 and mpfr_clears.
-
- Copyright 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
- Contributed by the Arenaire and Caramel projects, INRIA.
-@@ -20,18 +20,43 @@
- http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-+#include <stdlib.h>
-+
- #include "mpfr-test.h"
-
- int
- main (void)
- {
- mpfr_t a, b, c;
-+ long large_prec;
-
- tests_start_mpfr ();
-+
- mpfr_inits (a, b, c, (mpfr_ptr) 0);
- mpfr_clears (a, b, c, (mpfr_ptr) 0);
- mpfr_inits2 (200, a, b, c, (mpfr_ptr) 0);
- mpfr_clears (a, b, c, (mpfr_ptr) 0);
-+
-+ /* test for precision 2^31-1, see
-+ https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */
-+ large_prec = 2147483647;
-+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL)
-+ {
-+ /* We assume that the precision won't be increased internally. */
-+ if (large_prec > MPFR_PREC_MAX)
-+ large_prec = MPFR_PREC_MAX;
-+ mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0);
-+ mpfr_set_ui (a, 17, MPFR_RNDN);
-+ mpfr_set (b, a, MPFR_RNDN);
-+ if (mpfr_get_ui (a, MPFR_RNDN) != 17)
-+ {
-+ printf ("Error in mpfr_init2 with precision 2^31-1\n");
-+ exit (1);
-+ }
-+ mpfr_clears (a, b, (mpfr_ptr) 0);
-+ }
-+
- tests_end_mpfr ();
-+
- return 0;
- }
diff --git a/core/procps/PKGBUILD b/core/procps/PKGBUILD
deleted file mode 100644
index a43dedf7a..000000000
--- a/core/procps/PKGBUILD
+++ /dev/null
@@ -1,87 +0,0 @@
-# $Id: PKGBUILD 156669 2012-04-22 20:29:46Z eric $
-# Maintainer: Eric Bélanger <eric@archlinux.org>
-
-pkgname=procps
-pkgver=3.2.8
-pkgrel=5
-pkgdesc="Utilities for monitoring your system and processes on your system"
-arch=('i686' 'x86_64')
-url="http://procps.sourceforge.net/"
-license=('GPL' 'LGPL')
-groups=('base')
-depends=('ncurses')
-backup=('etc/sysctl.conf')
-source=(http://procps.sourceforge.net/procps-${pkgver}.tar.gz sysctl.conf
- groff-top-manpage.patch
- procps-3.2.7-top-manpage.patch
- procps-3.2.7-free-hlmem.patch
- procps-3.2.7-ps-man-fmt.patch
- procps-3.2.7-longcmd.patch
- procps-3.2.7-psman.patch
- procps-3.2.7-slabtop-once.patch
- procps-3.2.7-top-clrscr.patch
- procps-3.2.7-top-cpu0.patch
- procps-3.2.7-top-env-cpuloop.patch
- procps-3.2.7-top-remcpu.patch
- procps-3.2.7-top-sorthigh.patch
- procps-3.2.7-watch-unicode.patch
- procps-3.2.7-w-best.patch
- procps-3.2.8-gmake-3.82.patch
- procps-3.2.8-setlocale.patch
- procps-3.2.8-threads.patch
- procps-3.2.8-linux-ver-init.patch
- procps-3.2.8-kernel3-uts.patch)
-sha1sums=('a0c86790569dec26b5d9037e8868ca907acc9829'
- '9b9a314010d042b5aa487893c06f361531525e6a'
- 'bdd627f602ed2e38994d49309de0edbd90b41aff'
- '16737700b22eec8f4e8d16bce099f4b1662501e2'
- 'da1b9e61f8df4a8e23a7032b245dd99e32e2c01c'
- 'ba9ad9f0bde3e84484b5a0238e53534438e924be'
- '1a656d8094be41e019b2a9598b07c8a3d47f9de3'
- '9944224ed2f5bd7d7fb505127bd71d6f01d88373'
- '954026785a9e6c90d796e93563fcea2a693691e8'
- '8582cd15346fa939f3fd01081620de0ffc617335'
- '80e31310da53baf095e905d94485324932e433df'
- '15fe886a2b4bed5885e6d457954e1145d1dcd2a2'
- 'bce21809ee0cb917ddf5b0c0bf2a91ea50feb0c6'
- '1be00d71e8e16ff2d656e5dd1f9988f2f3c0d5a0'
- '52068a433535ec3d5d974141be3d6d3b6a41725a'
- '3a8f1ba912112d7520becb28746e97b11d9b0c86'
- '3a4908ed8dbc936e39cb9094af8098ef9e656581'
- '09b1f6a3f9691b9f1432549a7a74a90ee5cfbdde'
- '926b92913201f21c45d48436c0902cffc059ce27'
- '171d5352940200c209e0c2d43c17f01c02173a66'
- 'e2b2917e5462bd0aa3cb1b62942dbe8e8e81c16b')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 < ../groff-top-manpage.patch
- patch -p1 < ../procps-3.2.7-top-manpage.patch
- patch -p1 < ../procps-3.2.7-free-hlmem.patch
- patch -p1 < ../procps-3.2.7-ps-man-fmt.patch
- patch -p1 < ../procps-3.2.7-psman.patch
- patch -p1 < ../procps-3.2.7-longcmd.patch
- patch -p1 < ../procps-3.2.7-slabtop-once.patch
- patch -p1 < ../procps-3.2.7-top-clrscr.patch
- patch -p1 < ../procps-3.2.7-top-cpu0.patch
- patch -p1 < ../procps-3.2.7-top-env-cpuloop.patch
- patch -p1 < ../procps-3.2.7-top-remcpu.patch
- patch -p1 < ../procps-3.2.7-top-sorthigh.patch
- patch -p1 < ../procps-3.2.7-watch-unicode.patch
- patch -p1 < ../procps-3.2.7-w-best.patch
- patch -p1 < ../procps-3.2.8-gmake-3.82.patch
- patch -p1 < ../procps-3.2.8-setlocale.patch
- patch -p1 < ../procps-3.2.8-threads.patch
- patch -p0 < ../procps-3.2.8-linux-ver-init.patch
- patch -p1 < ../procps-3.2.8-kernel3-uts.patch
- sed -i "s:\$(lib64):lib:" Makefile
- make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" lib="${pkgdir}/usr/lib/" ldconfig=/bin/true install
- install -D -m644 "${srcdir}/sysctl.conf" "${pkgdir}/etc/sysctl.conf"
- install -d "${pkgdir}/usr/include/proc"
- install -m644 proc/*.h "${pkgdir}/usr/include/proc"
-}
diff --git a/core/procps/groff-top-manpage.patch b/core/procps/groff-top-manpage.patch
deleted file mode 100644
index 625053c72..000000000
--- a/core/procps/groff-top-manpage.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Naur procps-3.2.8-orig//top.1 procps-3.2.8/top.1
---- procps-3.2.8-orig//top.1 2010-11-19 00:43:13.000000000 -0500
-+++ procps-3.2.8/top.1 2010-11-19 00:44:06.000000000 -0500
-@@ -42,7 +42,7 @@
- .ds EM \ \fB\-\-\ \fR
- \# - these two are for chuckles, makes great grammar
- .ds Me top
--.ds ME \fBtop\fR
-+.ds MM \fBtop\fR
- \# - other misc strings for consistent usage/emphasis
- .ds F \fIOff\fR
- .ds O \fIOn\fR
-@@ -85,7 +85,7 @@
- .\" ----------------------------------------------------------------------
- .SH SYNOPSIS
- .\" ----------------------------------------------------------------------
--\*(ME \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI
-+\*(MM \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI
- iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...]
-
- The traditional switches '-' and whitespace are optional.
-@@ -94,7 +94,7 @@
- .\" ----------------------------------------------------------------------
- .SH DESCRIPTION
- .\" ----------------------------------------------------------------------
--The \*(ME program provides a dynamic real-time view of a running system.
-+The \*(MM program provides a dynamic real-time view of a running system.
- It can display\fB system\fR summary information as well as a list of\fB
- tasks\fR currently being managed by the Linux kernel.
- The types of system summary information shown and the types, order and
-@@ -104,7 +104,7 @@
- The program provides a limited interactive interface for process
- manipulation as well as a much more extensive interface for personal
- configuration \*(EM encompassing every aspect of its operation.
--And while \*(ME is referred to throughout this document, you are free
-+And while \*(MM is referred to throughout this document, you are free
- to name the program anything you wish.
- That new name, possibly an alias, will then be reflected on \*(Me's display
- and used when reading and writing a \*(CF.
diff --git a/core/procps/procps-3.2.7-free-hlmem.patch b/core/procps/procps-3.2.7-free-hlmem.patch
deleted file mode 100644
index c5ef9cc4c..000000000
--- a/core/procps/procps-3.2.7-free-hlmem.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -up procps-3.2.7/free.1.hlmem procps-3.2.7/free.1
---- procps-3.2.7/free.1.hlmem 2009-02-24 10:54:35.000000000 +0100
-+++ procps-3.2.7/free.1 2009-02-24 11:00:26.000000000 +0100
-@@ -7,7 +7,7 @@ free \- Display amount of free and used
- .SH SYNOPSIS
- .BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s"
- .I delay
--.RB "] [" "\-t" "] [" "\-V" ]
-+.RB "] [" "\-t" "] [" "\-l" "] [" "\-V" "]
- .SH DESCRIPTION
- \fBfree\fP displays the total amount of free and used physical and swap
- memory in the system, as well as the buffers used by the kernel.
-@@ -28,7 +28,9 @@ may actually specify any floating point
- .BR usleep (3)
- is used for microsecond resolution delay times.
- .PP
--The \fB\-V\fP displays version information.
-+The \fB-l\fP switch shows detailed low and high memory statistics.
-+.PP
-+The \fB\-V\fP switch displays version information.
- .SH FILES
- .ta
- .IR /proc/meminfo "\-\- memory information"
diff --git a/core/procps/procps-3.2.7-longcmd.patch b/core/procps/procps-3.2.7-longcmd.patch
deleted file mode 100644
index 7c4fdca36..000000000
--- a/core/procps/procps-3.2.7-longcmd.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- procps-3.2.7/proc/readproc.c.kzak 2006-06-16 10:18:13.000000000 +0200
-+++ procps-3.2.7/proc/readproc.c 2006-09-27 11:25:13.000000000 +0200
-@@ -432,14 +432,17 @@
- if(fd==-1) return NULL;
-
- /* read whole file into a memory buffer, allocating as we go */
-- while ((n = read(fd, buf, sizeof buf - 1)) > 0) {
-+ while ((n = read(fd, buf, sizeof buf - 1)) >= 0) {
- if (n < (int)(sizeof buf - 1))
- end_of_file = 1;
-- if (n == 0 && rbuf == 0)
-+ if (n == 0 && rbuf == 0) {
-+ close(fd);
- return NULL; /* process died between our open and read */
-+ }
- if (n < 0) {
- if (rbuf)
- free(rbuf);
-+ close(fd);
- return NULL; /* read error */
- }
- if (end_of_file && buf[n-1]) /* last read char not null */
diff --git a/core/procps/procps-3.2.7-ps-man-fmt.patch b/core/procps/procps-3.2.7-ps-man-fmt.patch
deleted file mode 100644
index f3a80dca7..000000000
--- a/core/procps/procps-3.2.7-ps-man-fmt.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up procps-3.2.7/ps/ps.1.ps-man-fmt procps-3.2.7/ps/ps.1
---- procps-3.2.7/ps/ps.1.ps-man-fmt 2008-09-01 11:43:18.000000000 +0200
-+++ procps-3.2.7/ps/ps.1 2008-09-01 11:43:41.000000000 +0200
-@@ -30,7 +30,7 @@
- .\" the space needed for the 1st two columns.
- .\" Making it messy: inches, ens, points, scaled points...
- .\"
--.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n)
-+.nr ColSize ((\n[.l] - \n[.i]) / 1n - 20)
- .\"
- .\" This is for command options
- .nr OptSize (16u)
diff --git a/core/procps/procps-3.2.7-psman.patch b/core/procps/procps-3.2.7-psman.patch
deleted file mode 100644
index 7ba6cff34..000000000
--- a/core/procps/procps-3.2.7-psman.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- procps-3.2.7/ps/ps.1.psman 2007-06-20 08:30:47.000000000 +0200
-+++ procps-3.2.7/ps/ps.1 2007-06-20 08:50:10.000000000 +0200
-@@ -21,8 +21,8 @@
- .\" See /usr/share/groff/current/tmac/an-old.tmac for what these do.
- .\" Setting them to zero provides extra space, but only do that for
- .\" plain text output. PostScript and such will remain indented.
--.if n .nr IN 0n
--.if n .nr an-prevailing-indent 0n
-+.\" .if n .nr IN 0n
-+.\" .if n .nr an-prevailing-indent 0n
- .\"
- .\"
- .\" ColSize is used for the format spec table.
-@@ -838,6 +838,8 @@
- .\" lB1 lB1 lBw(5.5i)
- .\" lB1 l1 l.
- .\"
-+.RE
-+
- .TS
- expand;
- lB1 lB1 lBw(\n[ColSize]n)
diff --git a/core/procps/procps-3.2.7-slabtop-once.patch b/core/procps/procps-3.2.7-slabtop-once.patch
deleted file mode 100644
index d3319cfe7..000000000
--- a/core/procps/procps-3.2.7-slabtop-once.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-diff -up procps-3.2.7/slabtop.c.once procps-3.2.7/slabtop.c
---- procps-3.2.7/slabtop.c.once 2008-12-11 13:24:52.000000000 +0100
-+++ procps-3.2.7/slabtop.c 2008-12-11 13:33:12.000000000 +0100
-@@ -268,9 +268,24 @@ static void parse_input(char c)
- }
- }
-
-+/*printw or printf depending on the context*/
-+static void printwf(int once, const char *s,...)
-+{
-+va_list va;
-+
-+va_start(va,s);
-+if(once)
-+ vprintf(s,va);
-+else
-+ vwprintw(stdscr, s, va);
-+va_end(va);
-+}
-+
-+
- int main(int argc, char *argv[])
- {
- int o;
-+ int once = 0;
- unsigned short old_rows;
- struct slab_info *slab_list = NULL;
-
-@@ -307,6 +322,7 @@ int main(int argc, char *argv[])
- break;
- case 'o':
- delay = 0;
-+ once = 1;
- break;
- case 'V':
- display_version();
-@@ -322,12 +338,18 @@ int main(int argc, char *argv[])
- if (tcgetattr(0, &saved_tty) == -1)
- perror("tcgetattr");
-
-- initscr();
-- term_size(0);
-- old_rows = rows;
-- resizeterm(rows, cols);
-- signal(SIGWINCH, term_size);
-- signal(SIGINT, sigint_handler);
-+ if(!once) {
-+ initscr();
-+ term_size(0);
-+ old_rows = rows;
-+ resizeterm(rows, cols);
-+ signal(SIGWINCH, term_size);
-+ signal(SIGINT, sigint_handler);
-+ } else {
-+ old_rows = rows;
-+ rows = 80;
-+ cols = 24;
-+ }
-
- do {
- struct slab_info *curr;
-@@ -341,12 +363,12 @@ int main(int argc, char *argv[])
- break;
-
- if (old_rows != rows) {
-- resizeterm(rows, cols);
-+ if(!once) resizeterm(rows, cols);
- old_rows = rows;
- }
-
- move(0,0);
-- printw( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n"
-+ printwf(once, " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n"
- " Active / Total Slabs (%% used) : %d / %d (%.1f%%)\n"
- " Active / Total Caches (%% used) : %d / %d (%.1f%%)\n"
- " Active / Total Size (%% used) : %.2fK / %.2fK (%.1f%%)\n"
-@@ -360,15 +382,15 @@ int main(int argc, char *argv[])
-
- slab_list = slabsort(slab_list);
-
-- attron(A_REVERSE);
-- printw( "%6s %6s %4s %8s %6s %8s %10s %-23s\n",
-+ if(!once) attron(A_REVERSE);
-+ printwf(once, "%6s %6s %4s %8s %6s %8s %10s %-23s\n",
- "OBJS", "ACTIVE", "USE", "OBJ SIZE", "SLABS",
- "OBJ/SLAB", "CACHE SIZE", "NAME");
-- attroff(A_REVERSE);
-+ if(!once) attroff(A_REVERSE);
-
- curr = slab_list;
- for (i = 0; i < rows - 8 && curr->next; i++) {
-- printw("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n",
-+ printwf(once, "%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n",
- curr->nr_objs, curr->nr_active_objs, curr->use,
- curr->obj_size / 1024.0, curr->nr_slabs,
- curr->objs_per_slab, (unsigned)(curr->cache_size / 1024),
-@@ -376,7 +398,7 @@ int main(int argc, char *argv[])
- curr = curr->next;
- }
-
-- refresh();
-+ if(!once) refresh();
- put_slabinfo(slab_list);
-
- FD_ZERO(&readfds);
-@@ -392,6 +414,6 @@ int main(int argc, char *argv[])
-
- tcsetattr(0, TCSAFLUSH, &saved_tty);
- free_slabinfo(slab_list);
-- endwin();
-+ if(!once) endwin();
- return 0;
- }
diff --git a/core/procps/procps-3.2.7-top-clrscr.patch b/core/procps/procps-3.2.7-top-clrscr.patch
deleted file mode 100644
index 8a0256846..000000000
--- a/core/procps/procps-3.2.7-top-clrscr.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up procps-3.2.7/top.c.clrscr procps-3.2.7/top.c
---- procps-3.2.7/top.c.clrscr 2008-04-08 08:49:48.000000000 +0200
-+++ procps-3.2.7/top.c 2008-04-08 08:50:07.000000000 +0200
-@@ -2109,6 +2109,7 @@ static void fields_sort (void)
- *p = x + 'A';
- Curwin->rc.sortindx = x;
- putp(Cap_curs_norm);
-+ putp(Cap_clr_scr);
- }
-
-
-@@ -2134,6 +2135,7 @@ static void fields_toggle (void)
- *p = i + 'A';
- }
- putp(Cap_curs_norm);
-+ putp(Cap_clr_scr);
- }
-
- /*###### Windows/Field Groups support #################################*/
diff --git a/core/procps/procps-3.2.7-top-cpu0.patch b/core/procps/procps-3.2.7-top-cpu0.patch
deleted file mode 100644
index eb81121c5..000000000
--- a/core/procps/procps-3.2.7-top-cpu0.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- procps-3.2.7/top.c.orig 2007-09-07 21:28:41.000000000 +0100
-+++ procps-3.2.7/top.c 2007-09-07 21:29:15.000000000 +0100
-@@ -959,8 +959,15 @@
-
- // and just in case we're 2.2.xx compiled without SMP support...
- if (Cpu_tot == 1) {
-- cpus[1].id = 0;
-- memcpy(cpus, &cpus[1], sizeof(CPU_t));
-+ cpus[0].id = cpus[1].id = 0;
-+ cpus[0].u = cpus[1].u;
-+ cpus[0].n = cpus[1].n;
-+ cpus[0].s = cpus[1].s;
-+ cpus[0].i = cpus[1].i;
-+ cpus[0].w = cpus[1].w;
-+ cpus[0].x = cpus[1].x;
-+ cpus[0].y = cpus[1].y;
-+ cpus[0].z = cpus[1].z;
- }
-
- // now value each separate cpu's tics
diff --git a/core/procps/procps-3.2.7-top-env-cpuloop.patch b/core/procps/procps-3.2.7-top-env-cpuloop.patch
deleted file mode 100644
index 0034dcafb..000000000
--- a/core/procps/procps-3.2.7-top-env-cpuloop.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -up procps-3.2.7/top.c.p15 procps-3.2.7/top.c
---- procps-3.2.7/top.c.p15 2008-09-01 11:37:51.000000000 +0200
-+++ procps-3.2.7/top.c 2008-09-01 11:37:51.000000000 +0200
-@@ -121,6 +121,7 @@ static int No_ksyms = -1, // set t
- Batch = 0, // batch mode, collect no input, dumb output
- Loops = -1, // number of iterations, -1 loops forever
- Secure_mode = 0; // set if some functionality restricted
-+static int CPU_loop = 0; // wait for reliable CPU data
-
- /* Some cap's stuff to reduce runtime calls --
- to accomodate 'Batch' mode, they begin life as empty strings */
-@@ -1679,6 +1680,9 @@ static void before (char *me)
- Fieldstab[P_PPD].fmts = pid_fmt;
- Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits;
- }
-+
-+ if (( getenv("CPULOOP")) && ( atoi(getenv("CPULOOP")) == 1 ))
-+ CPU_loop = 1;
- }
-
-
-@@ -2978,6 +2981,7 @@ static proc_t **summary_show (void)
- {
- static proc_t **p_table = NULL;
- static CPU_t *smpcpu = NULL;
-+ static int first = 0;
-
- // whoa first time, gotta' prime the pump...
- if (!p_table) {
-@@ -3025,6 +3029,28 @@ static proc_t **summary_show (void)
-
- smpcpu = cpus_refresh(smpcpu);
-
-+ if (first==0 && CPU_loop)
-+ {
-+ int i;
-+ CPU_t *cpu;
-+ for (i = 0; i < Cpu_tot; i++) {
-+ cpu = &smpcpu[i];
-+ cpu->u_sav = cpu->u;
-+ cpu->s_sav = cpu->s;
-+ cpu->n_sav = cpu->n;
-+ cpu->i_sav = cpu->i;
-+ cpu->w_sav = cpu->w;
-+ cpu->x_sav = cpu->x;
-+ cpu->y_sav = cpu->y;
-+ cpu->z_sav = cpu->z;
-+ }
-+ tv.tv_sec = Rc.delay_time;
-+ tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000;
-+ select(0, NULL, NULL, NULL, &tv);
-+
-+ smpcpu = cpus_refresh(smpcpu);
-+ }
-+
- if (CHKw(Curwin, View_CPUSUM)) {
- // display just the 1st /proc/stat line
- summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
-@@ -3050,6 +3076,8 @@ static proc_t **summary_show (void)
- }
-
- SETw(Curwin, NEWFRAM_cwo);
-+
-+ first = 1;
- return p_table;
- }
-
-diff -up procps-3.2.7/top.1.p15 procps-3.2.7/top.1
---- procps-3.2.7/top.1.p15 2008-09-01 11:37:51.000000000 +0200
-+++ procps-3.2.7/top.1 2008-09-01 11:37:51.000000000 +0200
-@@ -1183,6 +1183,13 @@ Then ponder this:
- Send bug reports to:
- Albert D\. Cahalan, <albert@users.sf.net>
-
-+The top command calculates Cpu(s) by looking at the change in CPU time values
-+between samples. When you first run it, it has no previous sample to compare
-+to, so these initial values are the percentages since boot. It means you need
-+at least two loops or you have to ignore summary output from the first loop.
-+This is problem for example for batch mode. There is a possible workaround if
-+you define the CPULOOP=1 environment variable. The top command will be run one
-+extra hidden loop for CPU data before standard output.
-
- .\" ----------------------------------------------------------------------
- .SH 8. HISTORY Former top
diff --git a/core/procps/procps-3.2.7-top-manpage.patch b/core/procps/procps-3.2.7-top-manpage.patch
deleted file mode 100644
index 4ce077946..000000000
--- a/core/procps/procps-3.2.7-top-manpage.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -up procps-3.2.7/top.1.cpudesc procps-3.2.7/top.1
---- procps-3.2.7/top.1.cpudesc 2008-01-18 08:04:19.000000000 +0100
-+++ procps-3.2.7/top.1 2008-01-18 08:15:49.000000000 +0100
-@@ -121,6 +121,7 @@
- 2. FIELDS / Columns
- a. DESCRIPTIONS of Fields
- b. SELECTING and ORDERING Columns
-+ c. SUMMARY Area Fields
- 3. INTERACTIVE Commands
- a. GLOBAL Commands
- b. SUMMARY Area Commands
-@@ -540,6 +540,20 @@ You\fI move\fR a field to the\fB left\fR
- upper case\fR letter and to the\fB right\fR with the\fB lower case\fR
- letter.
-
-+.\" ......................................................................
-+.SS 2c. SUMMARY Area Fields
-+.\" ----------------------------------------------------------------------
-+The summary area fields describing CPU statistics are abbreviated. They provide
-+information about times spent in:
-+ \fR us = user mode
-+ \fR sy = system mode
-+ \fR ni = low priority user mode (nice)
-+ \fR id = idle task
-+ \fR wa = I/O waiting
-+ \fR hi = servicing IRQs
-+ \fR si = servicing soft IRQs
-+ \fR st = steal (time given to other DomU instances)
-+
-
- .\" ----------------------------------------------------------------------
- .SH 3. INTERACTIVE Commands
diff --git a/core/procps/procps-3.2.7-top-remcpu.patch b/core/procps/procps-3.2.7-top-remcpu.patch
deleted file mode 100644
index 88d14ef0a..000000000
--- a/core/procps/procps-3.2.7-top-remcpu.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
-+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
-@@ -912,6 +912,7 @@
- static CPU_t *cpus_refresh (CPU_t *cpus)
- {
- static FILE *fp = NULL;
-+ static int cpu_max;
- int i;
- int num;
- // enough for a /proc/stat CPU line (not the intr line)
-@@ -926,24 +927,29 @@
- can hold tics representing the /proc/stat cpu summary (the first
- line read) -- that slot supports our View_CPUSUM toggle */
- cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
-+ cpu_max = Cpu_tot;
- }
-+ else if (cpu_max > Cpu_tot)
-+ /* move saved CUPs summary to cpu_max possition */
-+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
-+
- rewind(fp);
- fflush(fp);
-
- // first value the last slot with the cpu summary line
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
-- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
-- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
-+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
- num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
-- &cpus[Cpu_tot].u,
-- &cpus[Cpu_tot].n,
-- &cpus[Cpu_tot].s,
-- &cpus[Cpu_tot].i,
-- &cpus[Cpu_tot].w,
-- &cpus[Cpu_tot].x,
-- &cpus[Cpu_tot].y,
-- &cpus[Cpu_tot].z
-+ &cpus[cpu_max].u,
-+ &cpus[cpu_max].n,
-+ &cpus[cpu_max].s,
-+ &cpus[cpu_max].i,
-+ &cpus[cpu_max].w,
-+ &cpus[cpu_max].x,
-+ &cpus[cpu_max].y,
-+ &cpus[cpu_max].z
- );
- if (num < 4)
- std_err("failed /proc/stat read");
-@@ -955,7 +961,7 @@
- }
-
- // now value each separate cpu's tics
-- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
-+ for (i = 0; ; i++) {
- if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
- cpus[i].x = 0; // FIXME: can't tell by kernel version number
- cpus[i].y = 0; // FIXME: can't tell by kernel version number
-@@ -964,9 +970,35 @@
- &cpus[i].id,
- &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
- );
-- if (num < 4)
-- std_err("failed /proc/stat read");
-+ if (num < 4) {
-+ Cpu_tot = i;
-+ break;
-+ }
-+ if (i == cpu_max - 1) {
-+ // Bump cpu_max and extend cpus
-+ cpu_max++;
-+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
-+ if (!cpus) std_err("realloc failed");
-+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
-+ }
-+ }
-+
-+ if (cpu_max > Cpu_tot)
-+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
-+
-+ // and just in case we're 2.2.xx compiled without SMP support...
-+ if (Cpu_tot == 1) {
-+ cpus[0].id = cpus[1].id = 0;
-+ cpus[0].u = cpus[1].u;
-+ cpus[0].n = cpus[1].n;
-+ cpus[0].s = cpus[1].s;
-+ cpus[0].i = cpus[1].i;
-+ cpus[0].w = cpus[1].w;
-+ cpus[0].x = cpus[1].x;
-+ cpus[0].y = cpus[1].y;
-+ cpus[0].z = cpus[1].z;
- }
-+
- return cpus;
- }
-
diff --git a/core/procps/procps-3.2.7-top-sorthigh.patch b/core/procps/procps-3.2.7-top-sorthigh.patch
deleted file mode 100644
index e17df1e22..000000000
--- a/core/procps/procps-3.2.7-top-sorthigh.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- procps-3.2.7/top.c.sorthigh 2007-02-05 09:06:34.000000000 +0100
-+++ procps-3.2.7/top.c 2007-02-05 09:09:35.000000000 +0100
-@@ -3121,6 +3121,7 @@
- unsigned w = Fieldstab[i].width;
-
- int advance = (x==0) && !Rc.mode_altscr;
-+ f += advance;
-
- switch (i) {
- case P_CMD:
-@@ -3179,7 +3180,7 @@
- break;
- case P_PRI:
- if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) {
-- f = " RT";
-+ f = advance ? " RT" : " RT";
- MKCOL("");
- } else
- MKCOL((int)p->priority);
-@@ -3227,7 +3228,7 @@
- break;
- case P_WCH:
- if (No_ksyms) {
-- f = " %08lx ";
-+ f = advance ? "%08lx " : " %08lx ";
- MKCOL((long)p->wchan);
- } else {
- MKCOL(lookup_wchan(p->wchan, p->XXXID));
-@@ -3236,7 +3237,7 @@
-
- } /* end: switch 'procflag' */
-
-- rp = scat(rp, cbuf+advance);
-+ rp = scat(rp, cbuf);
- } /* end: for 'maxpflgs' */
-
- PUFF(
diff --git a/core/procps/procps-3.2.7-w-best.patch b/core/procps/procps-3.2.7-w-best.patch
deleted file mode 100644
index 86b3e9328..000000000
--- a/core/procps/procps-3.2.7-w-best.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- procps-3.2.7/w.c.kzak 2007-04-02 23:58:30.000000000 +0200
-+++ procps-3.2.7/w.c 2007-04-03 00:09:15.000000000 +0200
-@@ -149,11 +149,11 @@
- const proc_t *restrict const tmp = *pptr;
- if(unlikely(tmp->tgid == u->ut_pid)) {
- *found_utpid = 1;
-- best = tmp;
-+ if (!best)
-+ best = tmp;
- }
- if(tmp->tty != line) continue;
- (*jcpu) += tmp->utime + tmp->stime;
-- secondbest = tmp;
- /* same time-logic here as for "best" below */
- if(! (secondbest && tmp->start_time <= secondbest->start_time) ){
- secondbest = tmp;
diff --git a/core/procps/procps-3.2.7-watch-unicode.patch b/core/procps/procps-3.2.7-watch-unicode.patch
deleted file mode 100644
index 1b3d97488..000000000
--- a/core/procps/procps-3.2.7-watch-unicode.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-diff -u procps-3.2.7/Makefile procps/Makefile
---- procps-3.2.7/Makefile 2007-01-16 17:24:49.000000000 +0100
-+++ procps/Makefile 2007-01-16 17:29:27.000000000 +0100
-@@ -67,7 +67,7 @@
- # plus the top-level Makefile to make it work stand-alone.
- _TARFILES := Makefile
-
--CURSES := -lncurses
-+CURSES := -lncursesw
-
- # This seems about right for the dynamic library stuff.
- # Something like this is probably needed to make the SE Linux
-diff -u procps-3.2.7/watch.c procps/watch.c
---- procps-3.2.7/watch.c 2007-01-16 17:24:49.000000000 +0100
-+++ procps/watch.c 2007-01-16 18:06:57.000000000 +0100
-@@ -28,6 +28,8 @@
- #include <termios.h>
- #include <locale.h>
- #include "proc/procps.h"
-+#include <wchar.h>
-+#include <wctype.h>
-
- #ifdef FORCE_8BIT
- #undef isprint
-@@ -137,6 +139,27 @@
- }
- }
-
-+static wint_t
-+readwc(FILE *stream, mbstate_t *mbs)
-+{
-+ for (;;) {
-+ int chr;
-+ char c;
-+ wchar_t wc;
-+ size_t len;
-+
-+ chr = getc(stream);
-+ if (chr == EOF)
-+ return WEOF;
-+ c = chr;
-+ len = mbrtowc(&wc, &c, 1, mbs);
-+ if (len == (size_t)-1)
-+ memset(mbs, 0, sizeof(*mbs));
-+ else if (len != (size_t)-2)
-+ return wc;
-+ }
-+}
-+
- int
- main(int argc, char *argv[])
- {
-@@ -243,6 +266,7 @@
- FILE *p;
- int x, y;
- int oldeolseen = 1;
-+ mbstate_t mbs;
-
- if (screen_size_changed) {
- get_terminal_size();
-@@ -276,49 +300,63 @@
- do_exit(2);
- }
-
-+ memset(&mbs, 0, sizeof(mbs));
- for (y = show_title; y < height; y++) {
- int eolseen = 0, tabpending = 0;
- for (x = 0; x < width; x++) {
-- int c = ' ';
-- int attr = 0;
-+ wint_t c = L' ';
-+ int attr = 0, c_width;
-+ cchar_t cc;
-+ wchar_t wstr[2];
-
- if (!eolseen) {
- /* if there is a tab pending, just spit spaces until the
- next stop instead of reading characters */
- if (!tabpending)
- do
-- c = getc(p);
-- while (c != EOF && !isprint(c)
-- && c != '\n'
-- && c != '\t');
-- if (c == '\n')
-+ c = readwc(p, &mbs);
-+ while (c != WEOF && !iswprint(c)
-+ && c != L'\n'
-+ && c != L'\t');
-+ if (c == L'\n')
- if (!oldeolseen && x == 0) {
- x = -1;
- continue;
- } else
- eolseen = 1;
-- else if (c == '\t')
-+ else if (c == L'\t')
- tabpending = 1;
-- if (c == EOF || c == '\n' || c == '\t')
-- c = ' ';
-+ if (c == WEOF || c == L'\n' || c == L'\t')
-+ c = L' ';
- if (tabpending && (((x + 1) % 8) == 0))
- tabpending = 0;
- }
-+ wstr[0] = c;
-+ wstr[1] = 0;
-+ setcchar (&cc, wstr, 0, 0, NULL);
- move(y, x);
- if (option_differences) {
-- chtype oldch = inch();
-- char oldc = oldch & A_CHARTEXT;
-+ cchar_t oldc;
-+ wchar_t oldwstr[2];
-+ attr_t attrs;
-+ short colors;
-+
-+ in_wch(&oldc);
-+ getcchar(&oldc, oldwstr, &attrs, &colors, NULL);
- attr = !first_screen
-- && ((char)c != oldc
-+ && (wstr[0] != oldwstr[0]
- ||
- (option_differences_cumulative
-- && (oldch & A_ATTRIBUTES)));
-+ && attrs));
- }
- if (attr)
- standout();
-- addch(c);
-+ add_wch(&cc);
- if (attr)
- standend();
-+ c_width = wcwidth(c);
-+ if (c_width > 1)
-+ x += c_width - 1;
- }
- oldeolseen = eolseen;
- }
diff --git a/core/procps/procps-3.2.8-gmake-3.82.patch b/core/procps/procps-3.2.8-gmake-3.82.patch
deleted file mode 100644
index 87ab13ea4..000000000
--- a/core/procps/procps-3.2.8-gmake-3.82.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile
-+++ procps-3.2.8/Makefile
-@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
- # want this rule first, use := on ALL, and ALL not filled in yet
- all: do_all
-
---include */module.mk
-+-include proc/module.mk
-+-include ps/module.mk
-
- do_all: $(ALL)
-
diff --git a/core/procps/procps-3.2.8-kernel3-uts.patch b/core/procps/procps-3.2.8-kernel3-uts.patch
deleted file mode 100644
index a72ae59e3..000000000
--- a/core/procps/procps-3.2.8-kernel3-uts.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Naur procps-3.2.8-20110302git.orig/proc/version.c procps-3.2.8-20110302git/proc/version.c
---- procps-3.2.8-20110302git.orig/proc/version.c 2011-06-10 17:00:33.000000000 +0200
-+++ procps-3.2.8-20110302git/proc/version.c 2011-06-10 17:20:17.000000000 +0200
-@@ -38,10 +38,15 @@
- void init_Linux_version(void) {
- static struct utsname uts;
- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
-+ int version_string_depth;
-
- if (uname(&uts) == -1) /* failure implies impending death */
- exit(1);
-- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
-+
-+ version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
-+
-+ if ((version_string_depth < 2) || /* Non-standard for all known kernels */
-+ ((version_string_depth < 3) && (x < 3))) /* Non-standard for 2.x.x kernels */
- fprintf(stderr, /* *very* unlikely to happen by accident */
- "Non-standard uts for running kernel:\n"
- "release %s=%d.%d.%d gives version code %d\n",
diff --git a/core/procps/procps-3.2.8-linux-ver-init.patch b/core/procps/procps-3.2.8-linux-ver-init.patch
deleted file mode 100644
index 6d4039c91..000000000
--- a/core/procps/procps-3.2.8-linux-ver-init.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://bugs.gentoo.org/303120
-
-make sure the linux version constructor runs before the libproc constructor
-since the latter uses variables setup by the former
-
-fix by Chris Coleman
-
-Index: proc/version.c
-===================================================================
-RCS file: /cvsroot/procps/procps/proc/version.c,v
-retrieving revision 1.7
-diff -u -p -r1.7 version.c
---- proc/version.c 9 Feb 2003 07:27:16 -0000 1.7
-+++ proc/version.c 14 Nov 2010 00:22:44 -0000
-@@ -33,7 +33,7 @@ void display_version(void) {
-
- int linux_version_code;
-
--static void init_Linux_version(void) __attribute__((constructor));
-+static void init_Linux_version(void) __attribute__((constructor(100)));
- static void init_Linux_version(void) {
- static struct utsname uts;
- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
diff --git a/core/procps/procps-3.2.8-setlocale.patch b/core/procps/procps-3.2.8-setlocale.patch
deleted file mode 100644
index c197fd38a..000000000
--- a/core/procps/procps-3.2.8-setlocale.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c
---- procps-3.2.8-orig/proc/sysinfo.c 2008-03-24 05:33:43.000000000 +0100
-+++ procps-3.2.8/proc/sysinfo.c 2009-12-18 22:50:52.000000000 +0100
-@@ -74,17 +74,19 @@
- /***********************************************************************/
- int uptime(double *restrict uptime_secs, double *restrict idle_secs) {
- double up=0, idle=0;
-- char *restrict savelocale;
-+ char *savelocale;
-
- FILE_TO_BUF(UPTIME_FILE,uptime_fd);
-- savelocale = setlocale(LC_NUMERIC, NULL);
-+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
- setlocale(LC_NUMERIC,"C");
- if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
- setlocale(LC_NUMERIC,savelocale);
-+ free(savelocale);
- fputs("bad data in " UPTIME_FILE "\n", stderr);
- return 0;
- }
- setlocale(LC_NUMERIC,savelocale);
-+ free(savelocale);
- SET_IF_DESIRED(uptime_secs, up);
- SET_IF_DESIRED(idle_secs, idle);
- return up; /* assume never be zero seconds in practice */
-@@ -128,9 +130,9 @@
- double up_1, up_2, seconds;
- unsigned long long jiffies;
- unsigned h;
-- char *restrict savelocale;
-+ char *savelocale;
-
-- savelocale = setlocale(LC_NUMERIC, NULL);
-+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
- setlocale(LC_NUMERIC, "C");
- do{
- FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1);
-@@ -141,6 +143,7 @@
- /* uptime(&up_2, NULL); */
- } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */
- setlocale(LC_NUMERIC, savelocale);
-+ free(savelocale);
- jiffies = user_j + nice_j + sys_j + other_j;
- seconds = (up_1 + up_2) / 2;
- h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
-@@ -303,16 +306,18 @@
- /***********************************************************************/
- void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) {
- double avg_1=0, avg_5=0, avg_15=0;
-- char *restrict savelocale;
-+ char *savelocale;
-
- FILE_TO_BUF(LOADAVG_FILE,loadavg_fd);
-- savelocale = setlocale(LC_NUMERIC, NULL);
-+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
- setlocale(LC_NUMERIC, "C");
- if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
- fputs("bad data in " LOADAVG_FILE "\n", stderr);
-+ free(savelocale);
- exit(1);
- }
- setlocale(LC_NUMERIC, savelocale);
-+ free(savelocale);
- SET_IF_DESIRED(av1, avg_1);
- SET_IF_DESIRED(av5, avg_5);
- SET_IF_DESIRED(av15, avg_15);
diff --git a/core/procps/procps-3.2.8-threads.patch b/core/procps/procps-3.2.8-threads.patch
deleted file mode 100644
index 2491aa4c0..000000000
--- a/core/procps/procps-3.2.8-threads.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c
---- procps-3.2.8/top.c.threads 2009-10-01 07:14:43.000000000 -0400
-+++ procps-3.2.8/top.c 2009-10-05 14:05:00.000000000 -0400
-@@ -1138,6 +1138,7 @@ static proc_t **procs_refresh (proc_t **
- #define ENTsz sizeof(proc_t)
- static unsigned savmax = 0; // first time, Bypass: (i)
- proc_t *ptsk = (proc_t *)-1; // first time, Force: (ii)
-+ proc_t *saved_ptsk;
- unsigned curmax = 0; // every time (jeeze)
- PROCTAB* PT;
- static int show_threads_was_enabled = 0; // optimization
-@@ -1172,6 +1173,10 @@ static proc_t **procs_refresh (proc_t **
- while (curmax < savmax) {
- proc_t *ttsk;
- if (unlikely(!(ptsk = readproc(PT, NULL)))) break;
-+ if(!show_threads_was_enabled)
-+ saved_ptsk = ptsk;
-+ else
-+ saved_ptsk = NULL;
- show_threads_was_enabled = 1;
- while (curmax < savmax) {
- unsigned idx;
-@@ -1189,7 +1194,7 @@ static proc_t **procs_refresh (proc_t **
- prochlp(ttsk);
- ++curmax;
- }
-- free(ptsk); // readproc() proc_t not used
-+ if(!saved_ptsk) free(ptsk); // readproc() proc_t not used
- }
- }
-
-@@ -1208,7 +1213,8 @@ static proc_t **procs_refresh (proc_t **
- else { // show each thread in a process separately
- while (ptsk) {
- proc_t *ttsk;
-- if (likely(ptsk = readproc(PT, NULL))) {
-+ if (likely(ptsk = readproc(PT, NULL)) ||
-+ unlikely(saved_ptsk && (ptsk = saved_ptsk)) ) {
- show_threads_was_enabled = 1;
- while (1) {
- table = alloc_r(table, (curmax + 1) * PTRsz);
-@@ -1216,6 +1222,7 @@ static proc_t **procs_refresh (proc_t **
- prochlp(ttsk);
- table[curmax++] = ttsk;
- }
-+ saved_ptsk = NULL;
- free(ptsk); // readproc() proc_t not used
- }
- }
diff --git a/core/procps/sysctl.conf b/core/procps/sysctl.conf
deleted file mode 100644
index e3ebc7bad..000000000
--- a/core/procps/sysctl.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Kernel sysctl configuration
-#
-
-# Disable packet forwarding
-net.ipv4.ip_forward=0
-
-# Disable the magic-sysrq key (console security issues)
-kernel.sysrq = 0
-
-# Enable TCP SYN Cookie Protection
-net.ipv4.tcp_syncookies = 1
-
diff --git a/core/syslinux/PKGBUILD b/core/syslinux/PKGBUILD
deleted file mode 100644
index f8bcb9274..000000000
--- a/core/syslinux/PKGBUILD
+++ /dev/null
@@ -1,51 +0,0 @@
-# $Id: PKGBUILD 155387 2012-04-03 08:18:06Z thomas $
-# Maintainer: Thomas Bächler <thomas@archlinux.org>
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
-
-pkgname=syslinux
-pkgver=4.05
-pkgrel=4
-arch=('i686' 'x86_64')
-pkgdesc="Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE"
-url="http://syslinux.zytor.com/"
-license=('GPL2')
-depends=('perl' 'glibc')
-optdepends=('perl-passwd-md5: For md5pass'
- 'perl-digest-sha1: For sha1pass'
- 'mtools: For mkdiskimage and syslinux support'
- )
-makedepends=('nasm')
-backup=('boot/syslinux/syslinux.cfg')
-install=syslinux.install
-source=(http://www.kernel.org/pub/linux/utils/boot/syslinux/$pkgname-${pkgver}.tar.bz2
- syslinux-dont-build-dos-windows-targets.patch
- syslinux.cfg
- syslinux-install_update)
-md5sums=('82299242418385da1274c9479a778cb2'
- '1528c376e43f0eaccaa80d8ad1bc13b4'
- '832595501944fbcabcdc1207f4724fe7'
- '680750f73dc2e587ac567d057d485813')
-
-build() {
- # Do not try to build syslinux with our default LDFLAGS, it will fail
- unset LDFLAGS
- cd "$srcdir"/$pkgname-${pkgver}
- # Do not try to build the Windows or DOS installers
- patch -p1 -i "$srcdir"/syslinux-dont-build-dos-windows-targets.patch
- # Fix FHS manpage path
- sed 's|/usr/man|/usr/share/man|g' -i mk/syslinux.mk
- make
-}
-
-package() {
- cd "$srcdir"/$pkgname-${pkgver}
- make INSTALLROOT="$pkgdir" AUXDIR=/usr/lib/syslinux install
-
- # Install the default configuration
- install -D -m644 "$srcdir"/syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg
- # Install the installation and update script
- # This script is maintained at git://gist.github.com/772138.git
- install -D -m755 "$srcdir"/syslinux-install_update "$pkgdir"/usr/sbin/syslinux-install_update
- # move extlinux binary to /usr/sbin
- mv "$pkgdir"/sbin/extlinux "$pkgdir"/usr/sbin/extlinux
-}
diff --git a/core/syslinux/syslinux-dont-build-dos-windows-targets.patch b/core/syslinux/syslinux-dont-build-dos-windows-targets.patch
deleted file mode 100644
index 2b86ab828..000000000
--- a/core/syslinux/syslinux-dont-build-dos-windows-targets.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur syslinux-4.02.orig//Makefile syslinux-4.02//Makefile
---- syslinux-4.02.orig//Makefile 2010-07-21 21:33:13.000000000 +0200
-+++ syslinux-4.02//Makefile 2010-07-22 11:14:03.325522937 +0200
-@@ -54,7 +54,7 @@
- # files that depend only on the B phase, but may have to be regenerated
- # for "make installer".
- BSUBDIRS = codepage com32 lzo core memdisk modules mbr memdump gpxe sample \
-- diag libinstaller dos win32 win64 dosutil
-+ libinstaller
- ITARGET =
- IOBJECTS = $(ITARGET) \
- utils/gethostip utils/isohybrid utils/mkdiskimage \
diff --git a/core/syslinux/syslinux-install_update b/core/syslinux/syslinux-install_update
deleted file mode 100644
index cd1baa572..000000000
--- a/core/syslinux/syslinux-install_update
+++ /dev/null
@@ -1,463 +0,0 @@
-#!/bin/bash
-#
-# Sylinux Installer / Updater Scripts
-# Copyright (C) 2011 Matthew Gyurgyik <pyther@pyther.net>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-#-----------------
-# Exit Codes:
-# 1 - get_boot_device or other function failed
-# 2 - install/update failed
-# 3 - set_active failed
-# 4 - install_mbr failed
-#
-shopt -s nullglob
-
-libpath="/usr/lib/syslinux"
-bootpath="/boot/syslinux"
-extlinux="/usr/sbin/extlinux"
-
-autoupdate_file=/boot/syslinux/SYSLINUX_AUTOUPDATE
-com32_files=(menu.c32 vesamenu.c32 chain.c32 hdt.c32 reboot.c32 poweroff.com)
-pciids_file=/usr/share/hwdata/pci.ids
-
-## Helper functions ##
-# Taken from libui-sh
-# $1 needle
-# $2 set (array) haystack
-check_is_in() {
- local needle="$1" element
- shift
- for element; do
- [[ $element = $needle ]] && return 0
- done
- return 1
-}
-
-# return true when blockdevice is an md raid, otherwise return a unset value
-# get all devices that are part of raid device $1
-device_is_raid() {
- [[ $1 && -f /proc/mdstat ]] || return 1
- local devmajor=$(stat -c %t "$1")
- (( devmajor == 9 ))
-}
-
-mdraid_all_slaves() {
- local slave slaves
- for slave in /sys/class/block/${1##*/}/slaves/*; do
- source "$slave/uevent"
- slaves="$slaves/dev/$DEVNAME "
- unset DEVNAME
- done
- echo $slaves
-}
-
-# Check /sys/block to see if device is partitioned
-# If we have a partitioned block device (sda1) /sys/block/sda1/dev will not exist
-# However, if we have an unpartitioned block device (sda) /sys/block/sda/dev will exist
-dev_is_part() {
- # $1 - blockdevice
- local dev=$1
-
- # If block device uevent file should be found
- # If a partition is passed in path shouldn't exist
- if [[ $dev = *cciss* ]]; then
- [[ -f /sys/block/cciss\!${dev##*/}/dev ]] && return 1
- elif [[ $dev = *ida* ]]; then
- [[ -f /sys/block/ida\!${dev##*/}/dev ]] && return 1
- else
- [[ -f /sys/block/${dev##*/}/dev ]] && return 1
- fi
-
- return 0
-}
-
-# If EFI PART is present in the first 8 bytes then it must be a GPT disk
-device_is_gpt() {
- local partsig=$(dd if="$1" skip=64 bs=8 count=1 2>/dev/null)
- [[ $partsig = "EFI PART" ]]
-}
-
-clear_gpt_attr2() {
- # $1 - Block Device, no partitions
- local disk=$1
-
- # Special Exception for cciss controllers
- if [[ $disk = *cciss* ]]; then
- for part in /dev/cciss/${disk##*/}*p*; do
- local partnum="${part##*[[:alpha:]]}"
- sgdisk "$disk" --attributes="$partnum":clear:2 &>/dev/null
- done
- # Smart 2 Controllers
- elif [[ $disk = *ida* ]]; then
- for part in /dev/ida/${disk##*/}*p*; do
- local partnum="${part##*[[:alpha:]]}"
- sgdisk "$disk" --attributes="$partnum":clear:2 &>/dev/null
- done
- else
- for part in /sys/block/${disk##*/}/${disk##*/}*; do
- local partnum="${part##*[[:alpha:]]}"
- sgdisk "$disk" --attributes="$partnum":clear:2 &>/dev/null
- done
- fi
- return 0
-}
-
-usage() {
-cat << EOF
-usage: $0 options
-
-This script will install or upgrade Syslinux
-
-OPTIONS:
- -h Show this message
- -i Install Syslinux
- -u Update Syslinux
- -a Set Boot flag on boot partiton
- -m Install Syslinux MBR
- -s Updates Syslinux if /boot/syslinux/SYSLINUX_AUTOUPDATE exists
-
- Arguments Required:
- -c Chroot install (ex: -c /mnt)
-
-Example Usage: syslinux-install_update.sh -i -a -m (install, set boot flag, install mbr)
- syslinux-install_update.sh -u (update)
-EOF
-}
-
-# Trys to find the partition that /boot resides on
-# This will either be on /boot or / (root)
-getBoot() {
- if [[ ! -d "$bootpath" ]]; then
- echo "Could not find $bootpath"
- echo "Is boot mounted? Is Syslinux installed?"
- exit 1
- fi
-
- syslinux_fs=(ext2 ext3 ext4 btrfs vfat)
-
- # Use DATA from findmnt see rc.sysint for more info
- if [[ -f /proc/self/mountinfo ]]; then
- read rootdev rootfs < <(findmnt -run -t noautofs -o SOURCE,FSTYPE "$CHROOT/")
- read bootdev bootfs < <(findmnt -run -t noautofs -o SOURCE,FSTYPE "$CHROOT/boot")
- else
- echo "Could not find /proc/self/mountinfo"
- echo "Are you running a kernel greater than 2.6.24?"
- exit 1
- fi
-
- if [[ $bootfs ]]; then
- if ! check_is_in "$bootfs" "${syslinux_fs[@]}"; then
- echo "/boot file system is not supported by Syslinux"
- exit 1
- fi
- boot="boot"
- bootpart="$bootdev"
- elif [[ $rootfs ]]; then
- if ! check_is_in "$rootfs" "${syslinux_fs[@]}"; then
- echo "/ (root) file system is not supported by Syslinux"
- exit 1
- fi
- boot="root"
- bootpart="$rootdev"
- else
- echo "Could not find filesystem on / (root) or /boot."
- exit 1
- fi
-}
-
-# We store the partition table type either gpt or mbr in var ptb
-# In rare cases a user could have one raid disk using mbr and another using gpt
-# In such cases we accept that the output may be incomplete
-
-# Calls get_ptb() for $bootpart or for all device in RAID
-declare -A bootdevs
-get_boot_devices() {
- if device_is_raid "$bootpart"; then
- slaves=$(mdraid_all_slaves "$bootpart")
-
- for slave in ${slaves[@]}; do
- local disk="${slave%%[[:digit:]]*}"
- device_is_gpt "$disk" && local ptb="GPT" || local ptb="MBR"
- bootdevs[$slave]="$ptb"
- done
- else
- local disk="${bootpart%%[[:digit:]]*}"
- device_is_gpt "$disk" && local ptb="GPT" || local ptb="MBR"
- bootdevs[$bootpart]="$ptb"
- fi
-}
-
-# Function Assumes the boot partition should be marked as active
-# All other partitions should not have the boot flag set
-set_active() {
- # If any bootdev is a block device without partitions bail
- # we want to set the boot flag on partitioned disk
- for dev in "${!bootdevs[@]}"; do
- dev_is_part $dev || { echo "$dev - is a block device. Aborting set_active!"; return 1; }
- done
-
- # Clear BIOS Bootable Legacy Attribute for GPT drives
- # In rare cases where a RAID device has slaves on the same block device
- # Attribute 2 will be cleared for each partition multiple times
- for dev in "${!bootdevs[@]}"; do
- local ptb="${bootdevs[$dev]}"
- if [[ "$ptb" = GPT ]]; then
- local disk="${dev%%[[:digit:]]*}" #ex: /dev/sda
- clear_gpt_attr2 "$disk"
- fi
- done
-
- # Set the boot flag on bootdevs (generated from get_boot_devices)
- for part in "${!bootdevs[@]}"; do
- local ptb="${bootdevs[$part]}"
- local partnum="${part##*[[:alpha:]]}"
- case "$part" in
- *[[:digit:]]p[[:digit:]]*)
- local disk="${part%%p$partnum}" # get everything before p1
- ;;
- *)
- local disk="${part%%[[:digit:]]*}"
- ;;
- esac
-
- if [[ "$ptb" = MBR ]]; then
- if sfdisk "$disk" -A "$partnum" &>/dev/null; then
- echo "Boot Flag Set - $part"
- else
- echo "FAILED to Set the boot flag on $part"
- exit 3
- fi
- elif [[ "$ptb" = GPT ]]; then
- if sgdisk "$disk" --attributes="$partnum":set:2 &>/dev/null; then
- echo "Attribute Legacy Bios Bootable Set - $part"
- else
- echo "FAILED to set attribute Legacy BIOS Bootable on $part"
- exit 3
- fi
- fi
- done
- return 0
-}
-
-install_mbr() {
- # If any bootdev is a block device without partitions bail
- # we want to install the mbr to a partitioned disk
- for dev in "${!bootdevs[@]}"; do
- dev_is_part "$dev" || { echo "$dev - is a block device. Aborting MBR install"; return 1; }
- done
-
- for part in "${!bootdevs[@]}"; do
- local partnum="${part##*[[:alpha:]]}"
- case "$part" in
- *[[:digit:]]p[[:digit:]]*)
- local disk="${part%%p$partnum}" # get everything before p1
- ;;
- *)
- local disk="${part%%[[:digit:]]*}"
- ;;
- esac
- local ptb="${bootdevs[$part]}"
-
- # We want to install to the root of the block device
- # If the device is a partition - ABORT!
- dev_is_part "$disk" && \
- { echo "ABORT! MBR installation to partition ($disk)!"; exit 4;}
-
- if [[ "$ptb" = MBR ]]; then
- mbrfile="$libpath/mbr.bin"
- elif [[ "$ptb" = GPT ]]; then
- mbrfile="$libpath/gptmbr.bin"
- fi
-
- if dd bs=440 count=1 conv=notrunc if="$mbrfile" of="$disk" &> /dev/null; then
- echo "Installed MBR ($mbrfile) to $disk"
- else
- echo "Error Installing MBR ($mbrfile) to $disk"
- exit 4
- fi
- done
- return 0
-}
-
-_install() {
- # Copy files to /boot
- for file in "${com32_files[@]}"; do
- # Symlink files even if links exist
- if [[ "$boot" = root ]]; then
- ln -s "${libpath#$CHROOT}/$file" "$bootpath/$file" &> /dev/null
- elif [[ "$boot" = boot ]]; then
- cp "$libpath/$file" "$bootpath/$file"
- fi
- done
-
- # Copy / Symlink pci.ids if we copy the com32 module and if pci.ids exists in the FS
- if check_is_in "hdt.c32" "${com32_files[@]}" && [[ -f $pciids_file ]]; then
- if [[ "$boot" = root ]]; then
- ln -s "$pciids_file" "$bootpath/pci.ids" &> /dev/null
- elif [[ "$boot" = boot ]]; then
- cp "$pciids_file" "$bootpath/pci.ids" &> /dev/null
- fi
- fi
-
- if device_is_raid "$bootpart"; then
- echo "Detected RAID on /boot - installing Syslinux with --raid"
- "$extlinux" --install "$bootpath" -r > /dev/null 2>&1
- else
- "$extlinux" --install "$bootpath" > /dev/null 2>&1
- fi
-
- if (( $? )); then
- echo "Syslinux install failed"
- exit 2
- else
- echo "Syslinux install successful"
- fi
-
- touch "$CHROOT/$autoupdate_file"
-}
-
-update() {
- # Update any com and c32 files in /boot
- if [[ "$boot" = boot ]]; then
- for file in "$bootpath"/*.{c32,com}; do
- file=$(basename "$file")
- cp "$libpath/$file" "$bootpath/$file" &> /dev/null
- done
- if [[ -f "$bootpath/pci.ids" ]]; then
- cp "$pciids_file" "$bootpath/pci.ids" &> /dev/null
- fi
- fi
-
- if device_is_raid $bootpart; then
- echo "Detected RAID on /boot - installing Syslinux with --raid"
- "$extlinux" --update "$bootpath" -r &> /dev/null
- else
- "$extlinux" --update "$bootpath" &> /dev/null
- fi
-
- if (($?)); then
- echo "Syslinux update failed"
- exit 2
- else
- echo "Syslinux update successful"
- fi
-}
-
-if (( $# == 0 )); then
- usage
- exit 1
-fi
-
-while getopts "c:uihmas" opt; do
- case $opt in
- c)
- CHROOT=$(readlink -e "$OPTARG")
- if [[ -z $CHROOT ]]; then
- echo "error: chroot path ``$OPTARG does not exist";
- exit 1
- fi
- ;;
- h)
- USAGE="True"
- ;;
- i)
- INSTALL="True"
- ;;
- u)
- UPDATE="True"
- ;;
- m)
- MBR="True"
- ;;
- a)
- SET_ACTIVE="True"
- ;;
- s)
- # If AUTOUPDATE_FILE does not exist exit the script
- if [[ -f $autoupdate_file ]]; then
- UPDATE="True"
- else
- exit 0
- fi
- ;;
- *)
- usage
- exit 1
- ;;
- esac
-done
-
-if [[ $USAGE ]]; then
- usage
- exit 0
-fi
-
-# Make sure only root can run our script
-if (( $(id -u) != 0 )); then
- echo "This script must be run as root" 1>&2
- exit 1
-fi
-
-# Display Usage Information if both Install and Update are passed
-if [[ $INSTALL && $UPDATE ]]; then
- usage
- exit 1
-fi
-
-# If a chroot dir is path set variables to reflect chroot
-if [[ "$CHROOT" ]]; then
- libpath="$CHROOT$libpath"
- bootpath="$CHROOT$bootpath"
- extlinux="$CHROOT$extlinux"
-fi
-
-# Exit if no /boot path exists
-if ( f=("$bootpath"/*); (( ! ${#f[@]} )) ); then
- echo "Error: $bootpath is empty!"
- echo "Is /boot mounted?"
- exit 1
-fi
-
-# Get the boot device if any of these options are passed
-if [[ $INSTALL || $UPDATE || $SET_ACTIVE || $MBR ]]; then
- getBoot
-fi
-
-# Install or Update
-if [[ $INSTALL ]]; then
- _install || exit
-elif [[ $UPDATE ]]; then
- update || exit
-fi
-
-
-# SET_ACTIVE and MBR
-if [[ $SET_ACTIVE ]] || [[ $MBR ]]; then
- get_boot_devices
-
- if [[ $SET_ACTIVE ]]; then
- set_active || exit
- fi
-
- if [[ $MBR ]]; then
- install_mbr || exit
- fi
-fi
-
-exit 0
-
-# vim: set et sw=4:
diff --git a/core/syslinux/syslinux.cfg b/core/syslinux/syslinux.cfg
deleted file mode 100644
index 5a588f58c..000000000
--- a/core/syslinux/syslinux.cfg
+++ /dev/null
@@ -1,79 +0,0 @@
-# Config file for Syslinux -
-# /boot/syslinux/syslinux.cfg
-#
-# Comboot modules:
-# * menu.c32 - provides a text menu
-# * vesamenu.c32 - provides a graphical menu
-# * chain.c32 - chainload MBRs, partition boot sectors, Windows bootloaders
-# * hdt.c32 - hardware detection tool
-# * reboot.c32 - reboots the system
-# * poweroff.com - shutdown the system
-#
-# To Use: Copy the respective files from /usr/lib/syslinux to /boot/syslinux.
-# If /usr and /boot are on the same file system, symlink the files instead
-# of copying them.
-#
-# If you do not use a menu, a 'boot:' prompt will be shown and the system
-# will boot automatically after 5 seconds.
-#
-# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
-# The wiki provides further configuration examples
-
-DEFAULT arch
-PROMPT 0 # Set to 1 if you always want to display the boot: prompt
-TIMEOUT 50
-# You can create syslinux keymaps with the keytab-lilo tool
-#KBDMAP de.ktl
-
-# Menu Configuration
-# Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
-UI menu.c32
-#UI vesamenu.c32
-
-# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
-MENU TITLE Arch Linux
-#MENU BACKGROUND splash.png
-MENU COLOR border 30;44 #40ffffff #a0000000 std
-MENU COLOR title 1;36;44 #9033ccff #a0000000 std
-MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
-MENU COLOR unsel 37;44 #50ffffff #a0000000 std
-MENU COLOR help 37;40 #c0ffffff #a0000000 std
-MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
-MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
-MENU COLOR msg07 37;40 #90ffffff #a0000000 std
-MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
-
-# boot sections follow
-#
-# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
-#
-#-*
-
-LABEL arch
- MENU LABEL Arch Linux
- LINUX ../vmlinuz-linux
- APPEND root=/dev/sda3 ro
- INITRD ../initramfs-linux.img
-
-LABEL archfallback
- MENU LABEL Arch Linux Fallback
- LINUX ../vmlinuz-linux
- APPEND root=/dev/sda3 ro
- INITRD ../initramfs-linux-fallback.img
-
-#LABEL windows
-# MENU LABEL Windows
-# COM32 chain.c32
-# APPEND hd0 1
-
-LABEL hdt
- MENU LABEL HDT (Hardware Detection Tool)
- COM32 hdt.c32
-
-LABEL reboot
- MENU LABEL Reboot
- COM32 reboot.c32
-
-LABEL off
- MENU LABEL Power Off
- COMBOOT poweroff.com
diff --git a/core/syslinux/syslinux.install b/core/syslinux/syslinux.install
deleted file mode 100644
index 0dc0ece36..000000000
--- a/core/syslinux/syslinux.install
+++ /dev/null
@@ -1,13 +0,0 @@
-post_install() {
- echo "==> If you want to use syslinux as your bootloader"
- echo "==> edit /boot/syslinux/syslinux.cfg and run"
- echo "==> # /usr/sbin/syslinux-install_update -i -a -m"
- echo "==> to install it."
-}
-
-post_upgrade() {
- # auto-update syslinux if /boot/syslinux/SYSLINUX_AUTOUPDATE exists
- /usr/sbin/syslinux-install_update -s
-}
-
-# vim:set ts=2 sw=2 et: