Build of ptop keeps failing

2012-06-03 Thread Bas van den Dikkenberg
Hi all,


The build of ptop keeps failing on hurd can some help me?
See also bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675757


With kind regads,

Bas van den Dikkenberg



Re: Build of ptop keeps failing

2012-06-03 Thread Samuel Thibault
Bas van den Dikkenberg, le Sun 03 Jun 2012 07:58:56 +, a écrit :
 The build of ptop keeps failing on hurd can some help me?
 
 See also bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675757

whose important line is:

configure: error: System type gnu unrecognized

you need to fix configure.ac to define the gnu system, and then create
a machine/m_gnu.c file, most probably by copying the existing
machine/m_linux.c and dropping what doesn't work.

Samuel


-- 
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120603094842.gk4...@type.famille.thibault.fr



RE: Build of ptop keeps failing

2012-06-03 Thread Bas van den Dikkenberg
Can you help me with that don´t know how to do that

-Oorspronkelijk bericht-
Van: Samuel Thibault [mailto:sthiba...@debian.org] 
Verzonden: zondag 3 juni 2012 11:49
Aan: Bas van den Dikkenberg
CC: debian-hurd@lists.debian.org
Onderwerp: Re: Build of ptop keeps failing

Bas van den Dikkenberg, le Sun 03 Jun 2012 07:58:56 +, a écrit :
 The build of ptop keeps failing on hurd can some help me?
 
 See also bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675757

whose important line is:

configure: error: System type gnu unrecognized

you need to fix configure.ac to define the gnu system, and then create a 
machine/m_gnu.c file, most probably by copying the existing machine/m_linux.c 
and dropping what doesn't work.

Samuel


--
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/B1AA70CF260D6446B5DBB7B8C7E4CED501C2D379@srv03.dikkenberg.local



Re: Build of ptop keeps failing

2012-06-03 Thread Barry deFreese
Bas,

Here is an untested patch but should at least give you an idea of what you need 
to do...

Barry deFreese



On 6/3/2012 6:19 AM, Bas van den Dikkenberg wrote:
 Can you help me with that don´t know how to do that
 
 -Oorspronkelijk bericht-
 Van: Samuel Thibault [mailto:sthiba...@debian.org] 
 Verzonden: zondag 3 juni 2012 11:49
 Aan: Bas van den Dikkenberg
 CC: debian-hurd@lists.debian.org
 Onderwerp: Re: Build of ptop keeps failing
 
 Bas van den Dikkenberg, le Sun 03 Jun 2012 07:58:56 +, a écrit :
 The build of ptop keeps failing on hurd can some help me?

 See also bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675757
 
 whose important line is:
 
 configure: error: System type gnu unrecognized
 
 you need to fix configure.ac to define the gnu system, and then create a 
 machine/m_gnu.c file, most probably by copying the existing machine/m_linux.c 
 and dropping what doesn't work.
 
 Samuel
 
 

Index: ptop-3.6.2/configure
===
--- ptop-3.6.2.orig/configure   2012-06-03 08:55:31.0 +
+++ ptop-3.6.2/configure2012-06-03 08:55:54.0 +
@@ -6633,6 +6633,7 @@
sysv4*) MODULE=svr4;;
sysv5*) MODULE=svr5;;
darwin*)MODULE=macosx;;
+   gnu*)   MODULE=gnu;;
*)  echo none
echo Configure doesn't recognize this system and doesn't know
echo what module to assign to it.  Help the cause and run the
Index: ptop-3.6.2/machine/m_gnu.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ ptop-3.6.2/machine/m_gnu.c  2012-06-03 08:55:55.0 +
@@ -0,0 +1,1132 @@
+/*
+ * pg_top - a top PostgreSQL users display for Unix
+ *
+ * SYNOPSIS:  Linux 1.2.x, 1.3.x, 2.x, using the /proc filesystem
+ *
+ * DESCRIPTION:
+ * This is the machine-dependent module for Linux 1.2.x, 1.3.x or 2.x.
+ *
+ * LIBS:
+ *
+ * CFLAGS: -DHAVE_GETOPT -DHAVE_STRERROR -DORDER
+ *
+ * TERMCAP: -lcurses
+ *
+ * AUTHOR: Richard Henderson r...@tamu.edu
+ * Order support added by Alexey Klimkin k...@klon.tme.mcst.ru
+ * Ported to 2.4 by William LeFebvre
+ */
+
+#include config.h
+
+#include sys/types.h
+#include time.h
+#include stdio.h
+#include fcntl.h
+#include unistd.h
+#include stdlib.h
+#include errno.h
+#include dirent.h
+#include string.h
+#include math.h
+#include ctype.h
+#include sys/time.h
+#include sys/stat.h
+#include sys/vfs.h
+
+#include sys/param.h /* for HZ */
+
+#if 0
+#include linux/proc_fs.h /* for PROC_SUPER_MAGIC */
+#else
+#define PROC_SUPER_MAGIC 0x9fa0
+#endif
+
+#include machine.h
+#include utils.h
+
+#define PROCFS /proc
+extern char *myname;
+
+/*=PROCESS INFORMATION==*/
+
+struct top_proc
+{
+   pid_t   pid;
+   uid_t   uid;
+   char   *name;
+   int pri,
+   nice;
+   unsigned long size,
+   rss;/* in k */
+   int state;
+   unsigned long time;
+   unsigned long start_time;
+   double  pcpu,
+   wcpu;
+   struct top_proc *next;
+};
+
+
+/*=STATE IDENT STRINGS==*/
+
+#define NPROCSTATES 7
+static char *state_abbrev[NPROCSTATES + 1] =
+{
+   , run, sleep, disk, zomb, stop, swap,
+   NULL
+};
+
+static char *procstatenames[NPROCSTATES + 1] =
+{
+   ,  running, ,  sleeping, ,  uninterruptable, ,
+zombie, ,  stopped, ,  swapping, ,
+   NULL
+};
+
+#define NCPUSTATES 5
+static char *cpustatenames[NCPUSTATES + 1] =
+{
+   user, nice, system, idle, iowait,
+   NULL
+};
+static int show_iowait = 0;
+
+#define MEMUSED0
+#define MEMFREE1
+#define MEMSHARED  2
+#define MEMBUFFERS 3
+#define MEMCACHED  4
+#define NMEMSTATS  5
+static char *memorynames[NMEMSTATS + 1] =
+{
+   K used, , K free, , K shared, , K buffers, , K cached,
+   NULL
+};
+
+#define SWAPUSED   0
+#define SWAPFREE   1
+#define SWAPCACHED 2
+#define NSWAPSTATS 3
+static char *swapnames[NSWAPSTATS + 1] =
+{
+   K used, , K free, , K cached,
+   NULL
+};
+
+static char fmt_header[] =
+  PID XPRI NICE  SIZE   RES STATE   TIME   WCPUCPU COMMAND;
+
+/* these are names given to allowed sorting orders -- first is default */
+static char *ordernames[] = {cpu, size, res, time, command, NULL};
+
+/* forward definitions for comparison functions */
+intcompare_cpu();
+intcompare_size();
+intcompare_res();
+intcompare_time();
+intcompare_cmd();
+
+int(*proc_compares[]) () =
+{
+   compare_cpu,
+   compare_size,
+   compare_res,
+   compare_time,
+   compare_cmd