[arch-commits] Commit in procps-ng/repos (16 files)

Eric Bélanger eric at archlinux.org
Sat Apr 28 03:50:33 UTC 2012


    Date: Friday, April 27, 2012 @ 23:50:32
  Author: eric
Revision: 157364

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  procps-ng/repos/testing-i686/
  procps-ng/repos/testing-i686/PKGBUILD
    (from rev 157363, procps-ng/trunk/PKGBUILD)
  procps-ng/repos/testing-i686/complain_unmounted_proc.patch
    (from rev 157363, procps-ng/trunk/complain_unmounted_proc.patch)
  procps-ng/repos/testing-i686/gnu-kbsd-version.patch
    (from rev 157363, procps-ng/trunk/gnu-kbsd-version.patch)
  procps-ng/repos/testing-i686/includes_restrict.patch
    (from rev 157363, procps-ng/trunk/includes_restrict.patch)
  procps-ng/repos/testing-i686/makefile_watch_ncurses.patch
    (from rev 157363, procps-ng/trunk/makefile_watch_ncurses.patch)
  procps-ng/repos/testing-i686/sig_printf_literal.patch
    (from rev 157363, procps-ng/trunk/sig_printf_literal.patch)
  procps-ng/repos/testing-i686/sysctl_man.patch
    (from rev 157363, procps-ng/trunk/sysctl_man.patch)
  procps-ng/repos/testing-x86_64/
  procps-ng/repos/testing-x86_64/PKGBUILD
    (from rev 157363, procps-ng/trunk/PKGBUILD)
  procps-ng/repos/testing-x86_64/complain_unmounted_proc.patch
    (from rev 157363, procps-ng/trunk/complain_unmounted_proc.patch)
  procps-ng/repos/testing-x86_64/gnu-kbsd-version.patch
    (from rev 157363, procps-ng/trunk/gnu-kbsd-version.patch)
  procps-ng/repos/testing-x86_64/includes_restrict.patch
    (from rev 157363, procps-ng/trunk/includes_restrict.patch)
  procps-ng/repos/testing-x86_64/makefile_watch_ncurses.patch
    (from rev 157363, procps-ng/trunk/makefile_watch_ncurses.patch)
  procps-ng/repos/testing-x86_64/sig_printf_literal.patch
    (from rev 157363, procps-ng/trunk/sig_printf_literal.patch)
  procps-ng/repos/testing-x86_64/sysctl_man.patch
    (from rev 157363, procps-ng/trunk/sysctl_man.patch)

----------------------------------------------+
 testing-i686/PKGBUILD                        |   46 +++++++
 testing-i686/complain_unmounted_proc.patch   |   17 ++
 testing-i686/gnu-kbsd-version.patch          |   38 ++++++
 testing-i686/includes_restrict.patch         |  144 +++++++++++++++++++++++++
 testing-i686/makefile_watch_ncurses.patch    |   11 +
 testing-i686/sig_printf_literal.patch        |   11 +
 testing-i686/sysctl_man.patch                |   20 +++
 testing-x86_64/PKGBUILD                      |   46 +++++++
 testing-x86_64/complain_unmounted_proc.patch |   17 ++
 testing-x86_64/gnu-kbsd-version.patch        |   38 ++++++
 testing-x86_64/includes_restrict.patch       |  144 +++++++++++++++++++++++++
 testing-x86_64/makefile_watch_ncurses.patch  |   11 +
 testing-x86_64/sig_printf_literal.patch      |   11 +
 testing-x86_64/sysctl_man.patch              |   20 +++
 14 files changed, 574 insertions(+)

Copied: procps-ng/repos/testing-i686/PKGBUILD (from rev 157363, procps-ng/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=procps-ng
+pkgver=3.3.2
+pkgrel=1
+pkgdesc="Utilities for monitoring your system and processes on your system"
+arch=('i686' 'x86_64')
+url="http://gitorious.org/procps"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('ncurses')
+conflicts=('procps')
+provides=('procps')
+replaces=('procps')
+backup=('etc/sysctl.conf')
+options=('!libtool')
+source=(http://gitorious.org/procps/procps/archive-tarball/v${pkgver}
+        sysctl_man.patch includes_restrict.patch gnu-kbsd-version.patch
+	complain_unmounted_proc.patch sig_printf_literal.patch
+	makefile_watch_ncurses.patch)
+sha1sums=('889692f891e790ea035315ec321cce92d00a8db2'
+          '39d6562b83389ec4893de88ec88222f7169fa732'
+          'd588825497fef0b057491377421fd8f68730d181'
+          '9eb2bb32a13656b5d671f9cffed3094399a26048'
+          'bf57f5a1f54a0f4a6d9e99d66b8e447225c3371d'
+          '25be10b456d56b8bdf6260276c60738a7d76a34d'
+          '9fc24e48f902c19315e2557e4deea5592bbfad7e')
+
+build() {
+  cd "${srcdir}/procps-procps"
+  ./autogen.sh
+  patch -p1 < ../sysctl_man.patch
+  patch -p1 < ../includes_restrict.patch
+  patch -p1 < ../gnu-kbsd-version.patch
+  patch -p1 < ../complain_unmounted_proc.patch
+  patch -p1 < ../sig_printf_literal.patch
+  patch -p1 < ../makefile_watch_ncurses.patch
+  ./configure --exec-prefix=/ --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
+  make
+}
+
+package() {
+  cd "${srcdir}/procps-procps"
+  make DESTDIR="${pkgdir}" install
+}

Copied: procps-ng/repos/testing-i686/complain_unmounted_proc.patch (from rev 157363, procps-ng/trunk/complain_unmounted_proc.patch)
===================================================================
--- testing-i686/complain_unmounted_proc.patch	                        (rev 0)
+++ testing-i686/complain_unmounted_proc.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,17 @@
+Author: <hesso at hesso.pool.math.tu-berlin.de>
+Description: Complain when /proc/version cannot be found instead of
+exiting silently.
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -33,8 +33,10 @@
+     char buf[256];
+     int version_string_depth;
+     
+-    if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++    if ( (fp=fopen("/proc/version","r")) == NULL) {
++      fprintf(stderr, "Cannot find /proc/version - is /proc mounted?\n");
+       exit(1);
++    }
+     if (fgets(buf, 256, fp) == NULL) {
+       fprintf(stderr, "Cannot read kernel version from /proc/version\n");
+       fclose(fp);

Copied: procps-ng/repos/testing-i686/gnu-kbsd-version.patch (from rev 157363, procps-ng/trunk/gnu-kbsd-version.patch)
===================================================================
--- testing-i686/gnu-kbsd-version.patch	                        (rev 0)
+++ testing-i686/gnu-kbsd-version.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,38 @@
+Author: <csmall at debian.org>
+Description: Rework version parsing so its ok with other OSes
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -28,20 +28,26 @@
+ int linux_version_code;
+ 
+ void init_Linux_version(void) {
+-    static struct utsname uts;
+     int x = 0, y = 0, z = 0;	/* cleared in case sscanf() < 3 */
++    FILE *fp;
++    char buf[256];
+     int version_string_depth;
+     
+-    if (uname(&uts) == -1)	/* failure implies impending death */
+-	exit(1);
+-
+-    version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
++    if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++      exit(1);
++    if (fgets(buf, 256, fp) == NULL) {
++      fprintf(stderr, "Cannot read kernel version from /proc/version\n");
++      fclose(fp);
++      exit(1);
++    }
++    fclose(fp);
++    version_string_depth = sscanf(buf, "Linux version %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",
+-		uts.release, x, y, z, LINUX_VERSION(x,y,z));
++		"%s=%d.%d.%d gives version code %d\n",
++		buf, x, y, z, LINUX_VERSION(x,y,z));
+     linux_version_code = LINUX_VERSION(x, y, z);
+ }

Copied: procps-ng/repos/testing-i686/includes_restrict.patch (from rev 157363, procps-ng/trunk/includes_restrict.patch)
===================================================================
--- testing-i686/includes_restrict.patch	                        (rev 0)
+++ testing-i686/includes_restrict.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,144 @@
+Author: Craig Small <csmall at debian.org>
+Description: Change restrict to __restrict
+ procps automake defines restrict which means the binaries for procps
+ binaries compile. However external programs may not of defined
+ restrict. includes from libc6 use __restrict and if is good enough for
+ them, its good enough for us.
+
+--- a/proc/devname.h
++++ b/proc/devname.h
+@@ -10,9 +10,9 @@
+ #define ABBREV_TTY  2     /* remove tty           */
+ #define ABBREV_PTS  4     /* remove pts/          */
+ 
+-extern unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags);
++extern unsigned dev_to_tty(char *__restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags);
+ 
+-extern int tty_to_dev(const char *restrict const name);
++extern int tty_to_dev(const char *__restrict const name);
+ 
+ EXTERN_C_END
+ #endif
+--- a/proc/escape.h
++++ b/proc/escape.h
+@@ -14,10 +14,10 @@
+ #define ESC_BRACKETS 0x2  // if using cmd, put '[' and ']' around it
+ #define ESC_DEFUNCT  0x4  // mark zombies with " <defunct>"
+ 
+-extern int escape_strlist(char *restrict dst, char *restrict const *restrict src, size_t n, int *cells);
+-extern int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *maxcells);
+-extern int escape_command(char *restrict const outbuf, const proc_t *restrict const pp, int bytes, int *cells, unsigned flags);
+-extern int escaped_copy(char *restrict dst, const char *restrict src, int bufsize, int *maxroom);
++extern int escape_strlist(char *__restrict dst, char *__restrict const *__restrict src, size_t n, int *cells);
++extern int escape_str(char *__restrict dst, const char *__restrict src, int bufsize, int *maxcells);
++extern int escape_command(char *__restrict const outbuf, const proc_t *__restrict const pp, int bytes, int *cells, unsigned flags);
++extern int escaped_copy(char *__restrict dst, const char *__restrict src, int bufsize, int *maxroom);
+ 
+ EXTERN_C_END
+ #endif
+--- a/proc/procps.h
++++ b/proc/procps.h
+@@ -103,6 +103,6 @@
+ #endif
+ 
+ 
+-typedef void (*message_fn)(const char *restrict, ...) __attribute__((format(printf,1,2)));
++typedef void (*message_fn)(const char *__restrict, ...) __attribute__((format(printf,1,2)));
+ 
+ #endif
+--- a/proc/readproc.h
++++ b/proc/readproc.h
+@@ -173,10 +173,10 @@
+ //    char deBug1[64];
+     pid_t	taskdir_user;  // for threads
+     int         did_fake; // used when taskdir is missing
+-    int(*finder)(struct PROCTAB *restrict const, proc_t *restrict const);
+-    proc_t*(*reader)(struct PROCTAB *restrict const, proc_t *restrict const);
+-    int(*taskfinder)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);
+-    proc_t*(*taskreader)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);
++    int(*finder)(struct PROCTAB *__restrict const, proc_t *__restrict const);
++    proc_t*(*reader)(struct PROCTAB *__restrict const, proc_t *__restrict const);
++    int(*taskfinder)(struct PROCTAB *__restrict const, const proc_t *__restrict const, proc_t *__restrict const, char *__restrict const);
++    proc_t*(*taskreader)(struct PROCTAB *__restrict const, const proc_t *__restrict const, proc_t *__restrict const, char *__restrict const);
+     pid_t*	pids;	// pids of the procs
+     uid_t*	uids;	// uids of procs
+     int		nuid;	// cannot really sentinel-terminate unsigned short[]
+@@ -200,8 +200,8 @@
+     int ntask;                //  *  readproctab2
+ } proc_data_t;                //  *  when PROC_LOOSE_TASKS set
+ 
+-extern proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *restrict const PT);
+-extern proc_data_t *readproctab3(int(*want_task)(proc_t *buf), PROCTAB *restrict const PT);
++extern proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *__restrict const PT);
++extern proc_data_t *readproctab3(int(*want_task)(proc_t *buf), PROCTAB *__restrict const PT);
+ 
+ // Convenient wrapper around openproc and readproc to slurp in the whole process
+ // table subset satisfying the constraints of flags and the optional PID list.
+@@ -222,12 +222,12 @@
+ //       only before first use.  Thereafter, the library will manage such
+ //       a passed proc_t, freeing any additional acquired memory associated
+ //       with the previous process or thread.
+-extern proc_t* readproc(PROCTAB *restrict const PT, proc_t *restrict p);
+-extern proc_t* readtask(PROCTAB *restrict const PT, const proc_t *restrict const p, proc_t *restrict t);
+-extern proc_t* readeither(PROCTAB *restrict const PT, proc_t *restrict x);
++extern proc_t* readproc(PROCTAB *__restrict const PT, proc_t *__restrict p);
++extern proc_t* readtask(PROCTAB *__restrict const PT, const proc_t *__restrict const p, proc_t *__restrict t);
++extern proc_t* readeither(PROCTAB *__restrict const PT, proc_t *__restrict x);
+ 
+ // warning: interface may change
+-extern int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid);
++extern int read_cmdline(char *__restrict const dst, unsigned sz, unsigned pid);
+ 
+ extern void look_up_our_self(proc_t *p);
+ 
+--- a/proc/sig.h
++++ b/proc/sig.h
+@@ -16,13 +16,13 @@
+ EXTERN_C_BEGIN
+ 
+ /* return -1 on failure */
+-extern int signal_name_to_number(const char *restrict name);
++extern int signal_name_to_number(const char *__restrict name);
+ 
+ extern const char *signal_number_to_name(int signo);
+ 
+-extern int print_given_signals(int argc, const char *restrict const *restrict argv, int max_line);
++extern int print_given_signals(int argc, const char *__restrict const *__restrict argv, int max_line);
+ 
+-extern char *strtosig(const char *restrict s);
++extern char *strtosig(const char *__restrict s);
+ 
+ extern void pretty_print_signals(void);
+ 
+--- a/proc/sysinfo.h
++++ b/proc/sysinfo.h
+@@ -57,11 +57,11 @@
+ 
+ #define BUFFSIZE (64*1024)
+ typedef unsigned long long jiff;
+-extern void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy, jiff *restrict czzz,
+-	     unsigned long *restrict pin, unsigned long *restrict pout, unsigned long *restrict s_in, unsigned long *restrict sout,
+-	     unsigned *restrict intr, unsigned *restrict ctxt,
+-	     unsigned int *restrict running, unsigned int *restrict blocked,
+-	     unsigned int *restrict btime, unsigned int *restrict processes);
++extern void getstat(jiff *__restrict cuse, jiff *__restrict cice, jiff *__restrict csys, jiff *__restrict cide, jiff *__restrict ciow, jiff *__restrict cxxx, jiff *__restrict cyyy, jiff *__restrict czzz,
++	     unsigned long *__restrict pin, unsigned long *__restrict pout, unsigned long *__restrict s_in, unsigned long *__restrict sout,
++	     unsigned *__restrict intr, unsigned *__restrict ctxt,
++	     unsigned int *__restrict running, unsigned int *__restrict blocked,
++	     unsigned int *__restrict btime, unsigned int *__restrict processes);
+ 
+ extern void meminfo(void);
+ 
+--- a/proc/wchan.h
++++ b/proc/wchan.h
+@@ -6,8 +6,8 @@
+ EXTERN_C_BEGIN
+ 
+ extern const char * lookup_wchan(unsigned KLONG address, unsigned pid);
+-extern int   open_psdb(const char *restrict override);
+-extern int   open_psdb_message(const char *restrict override, message_fn message);
++extern int   open_psdb(const char *__restrict override);
++extern int   open_psdb_message(const char *__restrict override, message_fn message);
+ 
+ EXTERN_C_END
+ 

Copied: procps-ng/repos/testing-i686/makefile_watch_ncurses.patch (from rev 157363, procps-ng/trunk/makefile_watch_ncurses.patch)
===================================================================
--- testing-i686/makefile_watch_ncurses.patch	                        (rev 0)
+++ testing-i686/makefile_watch_ncurses.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -383,7 +383,7 @@
+ @WITH_NCURSES_TRUE at slabtop_SOURCES = slabtop.c $(top_srcdir)/lib/strutils.c
+ @WITH_NCURSES_TRUE at slabtop_LDADD = @NCURSES_LIBS@
+ @WITH_NCURSES_TRUE at watch_SOURCES = watch.c $(top_srcdir)/lib/strutils.c
+- at WITH_NCURSES_TRUE@watch_LDADD = @NCURSES_LIBS@
++ at WITH_NCURSES_TRUE@watch_LDADD = @WATCH_NCURSES_LIBS@
+ kill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c
+ skill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c
+ snice_SOURCES = skill.c $(top_srcdir)/lib/strutils.c

Copied: procps-ng/repos/testing-i686/sig_printf_literal.patch (from rev 157363, procps-ng/trunk/sig_printf_literal.patch)
===================================================================
--- testing-i686/sig_printf_literal.patch	                        (rev 0)
+++ testing-i686/sig_printf_literal.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,11 @@
+--- a/proc/sig.c
++++ b/proc/sig.c
+@@ -257,7 +257,7 @@
+   while(++i <= number_of_signals){
+     int n;
+     n = printf("%2d %s", i, signal_number_to_name(i));
+-    if(n>0 && i%7) printf("           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + n);
++    if(n>0 && i%7) printf("%s", "           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + n);
+     else printf("\n");
+   }
+   if((i-1)%7) printf("\n");

Copied: procps-ng/repos/testing-i686/sysctl_man.patch (from rev 157363, procps-ng/trunk/sysctl_man.patch)
===================================================================
--- testing-i686/sysctl_man.patch	                        (rev 0)
+++ testing-i686/sysctl_man.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,20 @@
+--- a/sysctl.8
++++ b/sysctl.8
+@@ -55,7 +55,7 @@
+ \fB\-w\fR, \fB\-\-write\fR
+ Use this option when you want to change a sysctl setting.
+ .TP
+-\fB\-p\fR, \fB\-\-load\fR[=\fIFILE\fR]
++\fB\-p\fR[\fIFILE\fR], \fB\-\-load\fR[=\fIFILE\fR]
+ Load in sysctl settings from the file specified or /etc/sysctl.conf if none
+ given.  Specifying \- as filename means reading data from standard input.
+ .TP
+@@ -117,7 +117,7 @@
+ .br
+ /sbin/sysctl \-w kernel.domainname="example.com"
+ .br
+-/sbin/sysctl \-p /etc/sysctl.conf
++/sbin/sysctl \-p/etc/sysctl.conf
+ .br
+ /sbin/sysctl \-a \-\-pattern forward
+ .br

Copied: procps-ng/repos/testing-x86_64/PKGBUILD (from rev 157363, procps-ng/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=procps-ng
+pkgver=3.3.2
+pkgrel=1
+pkgdesc="Utilities for monitoring your system and processes on your system"
+arch=('i686' 'x86_64')
+url="http://gitorious.org/procps"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=('ncurses')
+conflicts=('procps')
+provides=('procps')
+replaces=('procps')
+backup=('etc/sysctl.conf')
+options=('!libtool')
+source=(http://gitorious.org/procps/procps/archive-tarball/v${pkgver}
+        sysctl_man.patch includes_restrict.patch gnu-kbsd-version.patch
+	complain_unmounted_proc.patch sig_printf_literal.patch
+	makefile_watch_ncurses.patch)
+sha1sums=('889692f891e790ea035315ec321cce92d00a8db2'
+          '39d6562b83389ec4893de88ec88222f7169fa732'
+          'd588825497fef0b057491377421fd8f68730d181'
+          '9eb2bb32a13656b5d671f9cffed3094399a26048'
+          'bf57f5a1f54a0f4a6d9e99d66b8e447225c3371d'
+          '25be10b456d56b8bdf6260276c60738a7d76a34d'
+          '9fc24e48f902c19315e2557e4deea5592bbfad7e')
+
+build() {
+  cd "${srcdir}/procps-procps"
+  ./autogen.sh
+  patch -p1 < ../sysctl_man.patch
+  patch -p1 < ../includes_restrict.patch
+  patch -p1 < ../gnu-kbsd-version.patch
+  patch -p1 < ../complain_unmounted_proc.patch
+  patch -p1 < ../sig_printf_literal.patch
+  patch -p1 < ../makefile_watch_ncurses.patch
+  ./configure --exec-prefix=/ --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
+  make
+}
+
+package() {
+  cd "${srcdir}/procps-procps"
+  make DESTDIR="${pkgdir}" install
+}

Copied: procps-ng/repos/testing-x86_64/complain_unmounted_proc.patch (from rev 157363, procps-ng/trunk/complain_unmounted_proc.patch)
===================================================================
--- testing-x86_64/complain_unmounted_proc.patch	                        (rev 0)
+++ testing-x86_64/complain_unmounted_proc.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,17 @@
+Author: <hesso at hesso.pool.math.tu-berlin.de>
+Description: Complain when /proc/version cannot be found instead of
+exiting silently.
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -33,8 +33,10 @@
+     char buf[256];
+     int version_string_depth;
+     
+-    if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++    if ( (fp=fopen("/proc/version","r")) == NULL) {
++      fprintf(stderr, "Cannot find /proc/version - is /proc mounted?\n");
+       exit(1);
++    }
+     if (fgets(buf, 256, fp) == NULL) {
+       fprintf(stderr, "Cannot read kernel version from /proc/version\n");
+       fclose(fp);

Copied: procps-ng/repos/testing-x86_64/gnu-kbsd-version.patch (from rev 157363, procps-ng/trunk/gnu-kbsd-version.patch)
===================================================================
--- testing-x86_64/gnu-kbsd-version.patch	                        (rev 0)
+++ testing-x86_64/gnu-kbsd-version.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,38 @@
+Author: <csmall at debian.org>
+Description: Rework version parsing so its ok with other OSes
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -28,20 +28,26 @@
+ int linux_version_code;
+ 
+ void init_Linux_version(void) {
+-    static struct utsname uts;
+     int x = 0, y = 0, z = 0;	/* cleared in case sscanf() < 3 */
++    FILE *fp;
++    char buf[256];
+     int version_string_depth;
+     
+-    if (uname(&uts) == -1)	/* failure implies impending death */
+-	exit(1);
+-
+-    version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
++    if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++      exit(1);
++    if (fgets(buf, 256, fp) == NULL) {
++      fprintf(stderr, "Cannot read kernel version from /proc/version\n");
++      fclose(fp);
++      exit(1);
++    }
++    fclose(fp);
++    version_string_depth = sscanf(buf, "Linux version %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",
+-		uts.release, x, y, z, LINUX_VERSION(x,y,z));
++		"%s=%d.%d.%d gives version code %d\n",
++		buf, x, y, z, LINUX_VERSION(x,y,z));
+     linux_version_code = LINUX_VERSION(x, y, z);
+ }

Copied: procps-ng/repos/testing-x86_64/includes_restrict.patch (from rev 157363, procps-ng/trunk/includes_restrict.patch)
===================================================================
--- testing-x86_64/includes_restrict.patch	                        (rev 0)
+++ testing-x86_64/includes_restrict.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,144 @@
+Author: Craig Small <csmall at debian.org>
+Description: Change restrict to __restrict
+ procps automake defines restrict which means the binaries for procps
+ binaries compile. However external programs may not of defined
+ restrict. includes from libc6 use __restrict and if is good enough for
+ them, its good enough for us.
+
+--- a/proc/devname.h
++++ b/proc/devname.h
+@@ -10,9 +10,9 @@
+ #define ABBREV_TTY  2     /* remove tty           */
+ #define ABBREV_PTS  4     /* remove pts/          */
+ 
+-extern unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags);
++extern unsigned dev_to_tty(char *__restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags);
+ 
+-extern int tty_to_dev(const char *restrict const name);
++extern int tty_to_dev(const char *__restrict const name);
+ 
+ EXTERN_C_END
+ #endif
+--- a/proc/escape.h
++++ b/proc/escape.h
+@@ -14,10 +14,10 @@
+ #define ESC_BRACKETS 0x2  // if using cmd, put '[' and ']' around it
+ #define ESC_DEFUNCT  0x4  // mark zombies with " <defunct>"
+ 
+-extern int escape_strlist(char *restrict dst, char *restrict const *restrict src, size_t n, int *cells);
+-extern int escape_str(char *restrict dst, const char *restrict src, int bufsize, int *maxcells);
+-extern int escape_command(char *restrict const outbuf, const proc_t *restrict const pp, int bytes, int *cells, unsigned flags);
+-extern int escaped_copy(char *restrict dst, const char *restrict src, int bufsize, int *maxroom);
++extern int escape_strlist(char *__restrict dst, char *__restrict const *__restrict src, size_t n, int *cells);
++extern int escape_str(char *__restrict dst, const char *__restrict src, int bufsize, int *maxcells);
++extern int escape_command(char *__restrict const outbuf, const proc_t *__restrict const pp, int bytes, int *cells, unsigned flags);
++extern int escaped_copy(char *__restrict dst, const char *__restrict src, int bufsize, int *maxroom);
+ 
+ EXTERN_C_END
+ #endif
+--- a/proc/procps.h
++++ b/proc/procps.h
+@@ -103,6 +103,6 @@
+ #endif
+ 
+ 
+-typedef void (*message_fn)(const char *restrict, ...) __attribute__((format(printf,1,2)));
++typedef void (*message_fn)(const char *__restrict, ...) __attribute__((format(printf,1,2)));
+ 
+ #endif
+--- a/proc/readproc.h
++++ b/proc/readproc.h
+@@ -173,10 +173,10 @@
+ //    char deBug1[64];
+     pid_t	taskdir_user;  // for threads
+     int         did_fake; // used when taskdir is missing
+-    int(*finder)(struct PROCTAB *restrict const, proc_t *restrict const);
+-    proc_t*(*reader)(struct PROCTAB *restrict const, proc_t *restrict const);
+-    int(*taskfinder)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);
+-    proc_t*(*taskreader)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);
++    int(*finder)(struct PROCTAB *__restrict const, proc_t *__restrict const);
++    proc_t*(*reader)(struct PROCTAB *__restrict const, proc_t *__restrict const);
++    int(*taskfinder)(struct PROCTAB *__restrict const, const proc_t *__restrict const, proc_t *__restrict const, char *__restrict const);
++    proc_t*(*taskreader)(struct PROCTAB *__restrict const, const proc_t *__restrict const, proc_t *__restrict const, char *__restrict const);
+     pid_t*	pids;	// pids of the procs
+     uid_t*	uids;	// uids of procs
+     int		nuid;	// cannot really sentinel-terminate unsigned short[]
+@@ -200,8 +200,8 @@
+     int ntask;                //  *  readproctab2
+ } proc_data_t;                //  *  when PROC_LOOSE_TASKS set
+ 
+-extern proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *restrict const PT);
+-extern proc_data_t *readproctab3(int(*want_task)(proc_t *buf), PROCTAB *restrict const PT);
++extern proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *__restrict const PT);
++extern proc_data_t *readproctab3(int(*want_task)(proc_t *buf), PROCTAB *__restrict const PT);
+ 
+ // Convenient wrapper around openproc and readproc to slurp in the whole process
+ // table subset satisfying the constraints of flags and the optional PID list.
+@@ -222,12 +222,12 @@
+ //       only before first use.  Thereafter, the library will manage such
+ //       a passed proc_t, freeing any additional acquired memory associated
+ //       with the previous process or thread.
+-extern proc_t* readproc(PROCTAB *restrict const PT, proc_t *restrict p);
+-extern proc_t* readtask(PROCTAB *restrict const PT, const proc_t *restrict const p, proc_t *restrict t);
+-extern proc_t* readeither(PROCTAB *restrict const PT, proc_t *restrict x);
++extern proc_t* readproc(PROCTAB *__restrict const PT, proc_t *__restrict p);
++extern proc_t* readtask(PROCTAB *__restrict const PT, const proc_t *__restrict const p, proc_t *__restrict t);
++extern proc_t* readeither(PROCTAB *__restrict const PT, proc_t *__restrict x);
+ 
+ // warning: interface may change
+-extern int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid);
++extern int read_cmdline(char *__restrict const dst, unsigned sz, unsigned pid);
+ 
+ extern void look_up_our_self(proc_t *p);
+ 
+--- a/proc/sig.h
++++ b/proc/sig.h
+@@ -16,13 +16,13 @@
+ EXTERN_C_BEGIN
+ 
+ /* return -1 on failure */
+-extern int signal_name_to_number(const char *restrict name);
++extern int signal_name_to_number(const char *__restrict name);
+ 
+ extern const char *signal_number_to_name(int signo);
+ 
+-extern int print_given_signals(int argc, const char *restrict const *restrict argv, int max_line);
++extern int print_given_signals(int argc, const char *__restrict const *__restrict argv, int max_line);
+ 
+-extern char *strtosig(const char *restrict s);
++extern char *strtosig(const char *__restrict s);
+ 
+ extern void pretty_print_signals(void);
+ 
+--- a/proc/sysinfo.h
++++ b/proc/sysinfo.h
+@@ -57,11 +57,11 @@
+ 
+ #define BUFFSIZE (64*1024)
+ typedef unsigned long long jiff;
+-extern void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy, jiff *restrict czzz,
+-	     unsigned long *restrict pin, unsigned long *restrict pout, unsigned long *restrict s_in, unsigned long *restrict sout,
+-	     unsigned *restrict intr, unsigned *restrict ctxt,
+-	     unsigned int *restrict running, unsigned int *restrict blocked,
+-	     unsigned int *restrict btime, unsigned int *restrict processes);
++extern void getstat(jiff *__restrict cuse, jiff *__restrict cice, jiff *__restrict csys, jiff *__restrict cide, jiff *__restrict ciow, jiff *__restrict cxxx, jiff *__restrict cyyy, jiff *__restrict czzz,
++	     unsigned long *__restrict pin, unsigned long *__restrict pout, unsigned long *__restrict s_in, unsigned long *__restrict sout,
++	     unsigned *__restrict intr, unsigned *__restrict ctxt,
++	     unsigned int *__restrict running, unsigned int *__restrict blocked,
++	     unsigned int *__restrict btime, unsigned int *__restrict processes);
+ 
+ extern void meminfo(void);
+ 
+--- a/proc/wchan.h
++++ b/proc/wchan.h
+@@ -6,8 +6,8 @@
+ EXTERN_C_BEGIN
+ 
+ extern const char * lookup_wchan(unsigned KLONG address, unsigned pid);
+-extern int   open_psdb(const char *restrict override);
+-extern int   open_psdb_message(const char *restrict override, message_fn message);
++extern int   open_psdb(const char *__restrict override);
++extern int   open_psdb_message(const char *__restrict override, message_fn message);
+ 
+ EXTERN_C_END
+ 

Copied: procps-ng/repos/testing-x86_64/makefile_watch_ncurses.patch (from rev 157363, procps-ng/trunk/makefile_watch_ncurses.patch)
===================================================================
--- testing-x86_64/makefile_watch_ncurses.patch	                        (rev 0)
+++ testing-x86_64/makefile_watch_ncurses.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -383,7 +383,7 @@
+ @WITH_NCURSES_TRUE at slabtop_SOURCES = slabtop.c $(top_srcdir)/lib/strutils.c
+ @WITH_NCURSES_TRUE at slabtop_LDADD = @NCURSES_LIBS@
+ @WITH_NCURSES_TRUE at watch_SOURCES = watch.c $(top_srcdir)/lib/strutils.c
+- at WITH_NCURSES_TRUE@watch_LDADD = @NCURSES_LIBS@
++ at WITH_NCURSES_TRUE@watch_LDADD = @WATCH_NCURSES_LIBS@
+ kill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c
+ skill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c
+ snice_SOURCES = skill.c $(top_srcdir)/lib/strutils.c

Copied: procps-ng/repos/testing-x86_64/sig_printf_literal.patch (from rev 157363, procps-ng/trunk/sig_printf_literal.patch)
===================================================================
--- testing-x86_64/sig_printf_literal.patch	                        (rev 0)
+++ testing-x86_64/sig_printf_literal.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,11 @@
+--- a/proc/sig.c
++++ b/proc/sig.c
+@@ -257,7 +257,7 @@
+   while(++i <= number_of_signals){
+     int n;
+     n = printf("%2d %s", i, signal_number_to_name(i));
+-    if(n>0 && i%7) printf("           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + n);
++    if(n>0 && i%7) printf("%s", "           \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + n);
+     else printf("\n");
+   }
+   if((i-1)%7) printf("\n");

Copied: procps-ng/repos/testing-x86_64/sysctl_man.patch (from rev 157363, procps-ng/trunk/sysctl_man.patch)
===================================================================
--- testing-x86_64/sysctl_man.patch	                        (rev 0)
+++ testing-x86_64/sysctl_man.patch	2012-04-28 03:50:32 UTC (rev 157364)
@@ -0,0 +1,20 @@
+--- a/sysctl.8
++++ b/sysctl.8
+@@ -55,7 +55,7 @@
+ \fB\-w\fR, \fB\-\-write\fR
+ Use this option when you want to change a sysctl setting.
+ .TP
+-\fB\-p\fR, \fB\-\-load\fR[=\fIFILE\fR]
++\fB\-p\fR[\fIFILE\fR], \fB\-\-load\fR[=\fIFILE\fR]
+ Load in sysctl settings from the file specified or /etc/sysctl.conf if none
+ given.  Specifying \- as filename means reading data from standard input.
+ .TP
+@@ -117,7 +117,7 @@
+ .br
+ /sbin/sysctl \-w kernel.domainname="example.com"
+ .br
+-/sbin/sysctl \-p /etc/sysctl.conf
++/sbin/sysctl \-p/etc/sysctl.conf
+ .br
+ /sbin/sysctl \-a \-\-pattern forward
+ .br




More information about the arch-commits mailing list