[nemiver: 4/70] * Patch from SVN to reflect a libgtop API change



commit 3c571226a8ad4b26d7db58496b4abbc4a784a2b2
Author: Luca Bruno <luca br uno it>
Date:   Sun Nov 18 18:01:23 2007 +0100

     * Patch from SVN to reflect a libgtop API change

 debian/changelog                 |    1 +
 debian/copyright                 |   10 +++---
 debian/patches/new_gtop_api.diff |   55 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |    1 +
 4 files changed, 62 insertions(+), 5 deletions(-)
---
diff --git a/debian/changelog b/debian/changelog
index afdcf2d..24b06ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 nemiver (0.4.0-1) unstable; urgency=low
 
+  * Patch from SVN to reflect a libgtop API change
   * debian/copyright rewritten in a machine-interpretable format
   * Initial release (Closes: #392988)  
 
diff --git a/debian/copyright b/debian/copyright
index 2cf159a..f0467f4 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,10 +5,10 @@ It was downloaded from http://home.gna.org/nemiver/
 
 Files: *
 Copyright: © 2005-2007 Dodji Seketeli <dodji gnome org>
-		   © 2005-2007 Jonathon Jongsma <jjongsma gnome org>
+	   © 2005-2007 Jonathon Jongsma <jjongsma gnome org>
 License: GPL-2+
 	Nemiver is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
+        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.
 
@@ -34,9 +34,9 @@ License: MIT
 
 Files: help/*
 Copyright: © 2007 Jonathon Jongsma <jjongsma gnome org>
-		   © 2007 Daniel Nylander <po danielnylander se>
+	   © 2007 Daniel Nylander <po danielnylander se>
 License: LGPL-1.1+
-	Permission is granted to copy, distribute and/or modify this
+    Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation
     License (GFDL), Version 1.1 or any later version published
     by the Free Software Foundation with no Invariant Sections,
@@ -52,7 +52,7 @@ License: GPL-2+
 
 Files: debian/*
 Copyright: © 2007 Luca Bruno <luca br uno it>
-		   © 2007 Andrea Corradi <lash semailer com>
+	   © 2007 Andrea Corradi <lash semailer com>
 License: GPL-2+
     The Debian packaging is licensed under the GPL.
 
diff --git a/debian/patches/new_gtop_api.diff b/debian/patches/new_gtop_api.diff
new file mode 100644
index 0000000..b28bd92
--- /dev/null
+++ b/debian/patches/new_gtop_api.diff
@@ -0,0 +1,55 @@
+Index: nemiver-0.4.0/src/common/nmv-proc-mgr.cc
+===================================================================
+--- nemiver-0.4.0.orig/src/common/nmv-proc-mgr.cc	2007-09-29 22:17:30.000000000 +0200
++++ nemiver-0.4.0/src/common/nmv-proc-mgr.cc	2007-09-29 22:17:47.000000000 +0200
+@@ -51,7 +51,7 @@
+ public:
+     virtual ~ProcMgr () ;
+     const list<Process>& get_all_process_list () const  ;
+-    bool get_process_from_pid (unsigned int a_pid,
++    bool get_process_from_pid (pid_t a_pid,
+                                Process &a_process) const;
+     bool get_process_from_name (const UString &a_pname,
+                                 Process &a_process,
+@@ -85,13 +85,17 @@
+ {
+     glibtop_proclist buf_desc ;
+     memset (&buf_desc, 0, sizeof (buf_desc)) ;
+-    unsigned int *pids=NULL;
++    pid_t *pids=NULL;
+ 
+     m_process_list.clear () ;
+ 
+     try {
+         //get the list of pids
+-        pids = glibtop_get_proclist (&buf_desc, GLIBTOP_KERN_PROC_ALL, 0)  ;
++        //this is an ugly cast, but I am quite obliged
++        //since I have to support one version of glibtop_get_proclist()
++        //that returns an int* and one that returns pid_t*
++        pids = (pid_t*) glibtop_get_proclist (&buf_desc,
++                                               GLIBTOP_KERN_PROC_ALL, 0)  ;
+ 
+         //get a couple of info about each pocess
+         for (unsigned i=0 ; i < buf_desc.number ; ++i) {
+@@ -118,7 +122,7 @@
+ }
+ 
+ bool
+-ProcMgr::get_process_from_pid (unsigned int a_pid,
++ProcMgr::get_process_from_pid (pid_t a_pid,
+                                IProcMgr::Process &a_process) const
+ {
+     LOG_FUNCTION_SCOPE_NORMAL_DD ;
+Index: nemiver-0.4.0/src/common/nmv-proc-mgr.h
+===================================================================
+--- nemiver-0.4.0.orig/src/common/nmv-proc-mgr.h	2007-09-29 22:17:30.000000000 +0200
++++ nemiver-0.4.0/src/common/nmv-proc-mgr.h	2007-09-29 22:17:47.000000000 +0200
+@@ -122,7 +122,7 @@
+     virtual ~IProcMgr () {}
+     static IProcMgrSafePtr create () ;
+     virtual const list<Process>& get_all_process_list () const = 0;
+-    virtual bool get_process_from_pid (unsigned int a_pid,
++    virtual bool get_process_from_pid (pid_t a_pid,
+                                        Process &a_process) const = 0;
+     virtual bool get_process_from_name
+                                     (const UString &a_pname,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c78df57
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+new_gtop_api.diff 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]