rpms/nemiver/devel nemiver-pid_t-fix-build.patch, NONE, 1.1 nemiver.spec, 1.5, 1.6

Peter Gordon (pgordon) fedora-extras-commits at redhat.com
Fri Jan 11 03:39:59 UTC 2008


Author: pgordon

Update of /cvs/pkgs/rpms/nemiver/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15895

Modified Files:
	nemiver.spec 
Added Files:
	nemiver-pid_t-fix-build.patch 
Log Message:
Add upstream patch to fix compile errors with recent libgtop stuffs.

nemiver-pid_t-fix-build.patch:

--- NEW FILE nemiver-pid_t-fix-build.patch ---
diff -up ./src/common/nmv-proc-mgr.h.old ./src/common/nmv-proc-mgr.h
--- ./src/common/nmv-proc-mgr.h.old	2008-01-10 19:33:01.000000000 -0800
+++ ./src/common/nmv-proc-mgr.h	2008-01-10 19:33:25.000000000 -0800
@@ -122,7 +122,7 @@ public:
     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 -up ./src/common/nmv-proc-mgr.cc.old ./src/common/nmv-proc-mgr.cc
--- ./src/common/nmv-proc-mgr.cc.old	2008-01-10 19:30:38.000000000 -0800
+++ ./src/common/nmv-proc-mgr.cc	2008-01-10 19:32:10.000000000 -0800
@@ -51,7 +51,7 @@ protected:
 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,18 @@ ProcMgr::get_all_process_list () const
 {
     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 +123,7 @@ IProcMgr::create ()
 }
 
 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 ;
diff -U0 ./ChangeLog.old ./ChangeLog
--- ./ChangeLog.old	2008-01-10 19:32:25.000000000 -0800
+++ ./ChangeLog	2008-01-10 19:32:42.000000000 -0800
@@ -0,0 +1,7 @@
+2007-06-05 Dodji Seketeli <dodji at gnome.org>
+
+	* src/common/nmv-proc-mgr.cc,h:
+	  change ProcMgr::get_process_from_pid() to make it use the pid_t
+	  type instead of int. This is to reflect the API change
+	  in libgtop HEAD that would break the compilation otherwise.
+


Index: nemiver.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nemiver/devel/nemiver.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- nemiver.spec	4 Jan 2008 09:05:05 -0000	1.5
+++ nemiver.spec	11 Jan 2008 03:39:22 -0000	1.6
@@ -1,6 +1,6 @@
 Name:		nemiver
 Version:	0.4.0
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	A C/C++ Debugger for GNOME - point, click, debug!
 
 Group:		Development/Debuggers
@@ -9,6 +9,8 @@
 
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.4/%{name}-%{version}.tar.bz2
 
+Patch0: 	%{name}-pid_t-fix-build.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	libgtksourceviewmm-devel >= 0.3.0	
@@ -65,6 +67,7 @@
 
 %prep
 %setup -q
+%patch0 -b .fix-pid_t-build-errors
 
 
 %build
@@ -147,8 +150,11 @@
 
 
 %changelog
-* Fri Jan 04 2008 Peter Gordon <peter at thecodergeek.com>
+* Thu Jan 10 2008 Peter Gordon <peter at thecodergeek.com> - 0.4.0-3
 - Make GConf scriplets quieter (bug 426801: "unclean" rpm transaction).
+- Add upstream patch to fix compile errors with casting from unsigned int*
+  to pid_t* due to libgtop API change:
+  + pid_t-fix-build.patch
 
 * Tue Aug 21 2007 Peter Gordon <peter at thecodergeek.com> - 0.4.0-2
 - Rebuild with BuildID-enabled binutils.




More information about the fedora-extras-commits mailing list