devel/whowatch whowatch-debian-patches.patch, NONE, 1.1 whowatch-gcc4.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 whowatch.spec, 1.7, 1.8

Adrian Reber (adrian) fedora-extras-commits at redhat.com
Fri Apr 8 06:44:34 UTC 2005


Author: adrian

Update of /cvs/extras/devel/whowatch
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9366

Modified Files:
	.cvsignore sources whowatch.spec 
Added Files:
	whowatch-debian-patches.patch whowatch-gcc4.patch 
Log Message:
updated to 1.6 to fix gcc4 errors


whowatch-debian-patches.patch:

--- NEW FILE whowatch-debian-patches.patch ---
--- whowatch-1.6.0.orig/src/dialects/linux/proc_plugin.c
+++ whowatch-1.6.0/src/dialects/linux/proc_plugin.c
@@ -6,6 +6,7 @@
  * gives better performance)
  */
 #include <err.h>
+#include <time.h>
 #include "pluglib.h"
 #include "whowatch.h"
 
@@ -97,7 +98,7 @@
 
 static inline void add_to_hash(struct netconn_t *c, int inode)
 {
-//dolog(__FUNCTION__ ": inode %d, %s\n",inode, ip_addr(c));
+//dolog("%s: inode %d, %s\n", __func__, inode, ip_addr(c));
 	list_add(&c->n_hash, tcp_hashtable + hash(inode));
 }		
 
@@ -106,15 +107,15 @@
 	struct list_head *h, *tmp;
 	struct netconn_t *t;
 	tmp  = head + hash(inode);
-//dolog(__FUNCTION__": looking for %d (hash %d)\n", inode, hash(inode));
+//dolog("%s: looking for %d (hash %d)\n", __func__, inode, hash(inode));
 	list_for_each(h, tmp) {
 		t = list_entry(h, struct netconn_t, n_hash);
 		if(inode == t->inode) {
-//dolog(__FUNCTION__ ": found [%d]\n", t->inode);		
+//dolog("%s: found [%d]\n", __func__, t->inode);		
 			return t;
 }			
 	}
-//dolog(__FUNCTION__ ": [%d] not found\n", inode);	
+//dolog("%s: [%d] not found\n", __func__, inode);	
 	return 0;
 }
 
@@ -128,7 +129,7 @@
 	t->inode = inode;
 	add_to_hash(t, inode);
 	list_add(&t->n_list, &tcp_l);
-dolog(__FUNCTION__": new conn [%d]\n", inode);	
+dolog("%s: new conn [%d]\n", __func__, inode);	
 	return t;
 }
 
@@ -140,21 +141,21 @@
 	i = sscanf(s, "%x:%x %x:%x %x", &t.s_addr, &t.s_port, 
 			&t.d_addr, &t.d_port, &t.state);
 	if(i != 5) return 0;
-//dolog(__FUNCTION__": entering\n");	
+//dolog("%s: entering\n", __func__);	
 	tmp = tcp_find(inode, tcp_hashtable);
 	if(!tmp) {
-//dolog(__FUNCTION__ ": %d %d %d not found\n", inode, t.s_port, t.d_port);
+//dolog("%s: %d %d %d not found\n", __func__, inode, t.s_port, t.d_port);
 
 		tmp =  new_netconn(inode, &t);		
 		return tmp;
 	}	
 //	t.used = tmp->used = 0;
 	if(!memcmp((char*)&t + offset,(char*)tmp + offset, sizeof(t) - offset)) {
-dolog(__FUNCTION__ ": %d %d %d %s found, not changed\n", 
+dolog("%s: %d %d %d %s found, not changed\n", __func__, 
 inode, t.s_port, t.d_port, tcp_state[t.state-1]);	
 		return tmp; 
 	}
-dolog(__FUNCTION__ ":  %d %d->%d %d->%d found,changed\n", 
+dolog("%s:  %d %d->%d %d->%d found,changed\n", __func__,
   inode, t.s_port, t.d_port, tmp->s_port, tmp->d_port);	
 
 
@@ -184,7 +185,7 @@
 		hash_init(tcp_hashtable); 
 		flag = 1;
 	}	
-//dolog(__FUNCTION__ ": reading tcp connections\n");
+//dolog("%s: reading tcp connections\n", __func__);
 	if(!(f = fopen("/proc/net/tcp", "r"))) return;
 	/* skip titles */
 	fgets(buf, sizeof buf, f);
@@ -198,7 +199,7 @@
 		validate(inode, tmp);
 	}
 	fclose(f);
-//dolog(__FUNCTION__ ": done.\n");	
+//dolog("%s: done.\n", __func__);	
 	return;
 }
 
@@ -225,13 +226,13 @@
 	struct netconn_t *t;
 	unsigned int inode = 0;	
 	if(sscanf(s, "%d", &inode) != 1) return 1;
-//dolog(__FUNCTION__ ": looking for [%d]\n", inode);	
+//dolog("%s: looking for [%d]\n", __func__, inode);	
 	t = tcp_find(inode, tcp_hashtable);
 	if(!t) {
-//dolog(__FUNCTION__ ": %d not found\n", inode);	
+//dolog("%s: %d not found\n", __func__, inode);	
 		return 0;
 	}
-//dolog(__FUNCTION__ ": %d found, printing\n", inode);		
+//dolog("%s: %d found, printing\n", __func__, inode);		
 	print_net_conn(t);
 	return 1;
 }
@@ -241,7 +242,7 @@
 {
 	struct list_head *h;
 	struct netconn_t *t;
-//dolog(__FUNCTION__": looking for %d (hash %d)\n", inode, hash(inode));
+//dolog("%s: looking for %d (hash %d)\n", __func__, inode, hash(inode));
 	list_for_each(h, &tcp_l) {
 		t = list_entry(h, struct netconn_t, n_list);
 		if(t->valid	
@@ -269,7 +270,7 @@
 	}
 	if(!count || ticks - count >= 2) {
 //write(1, "\a", 1);	
-//dolog(__FUNCTION__ " reading tcp conn %d %d\n", ticks, ticks%2);	
+//dolog("%s reading tcp conn %d %d\n", __func__, ticks, ticks%2);	
 	read_tcp_conn();
 	count = ticks;
 
--- whowatch-1.6.0.orig/src/block.c
+++ whowatch-1.6.0/src/block.c
@@ -3,6 +3,7 @@
  * is used. Pre-allocated memory is managed by a bit map.
  */
 
+#include <time.h>
 #include "whowatch.h"
 
 #define USED 		1
@@ -42,10 +43,10 @@
 {
 	struct _block_tbl_t *tmp;
 	tmp = calloc(1, sizeof *tmp);
-	if(!tmp) prg_exit(__FUNCTION__ ": Cannot allocate memory.\n");
+	if(!tmp) prg_exit(": Cannot allocate memory.\n");
 	tmp->_block_t = calloc(1, size * TBL_SIZE);
-dolog(__FUNCTION__ ":new block(%d) - alloc size = %d\n", nr_blocks, size * TBL_SIZE);
-	if(!tmp->_block_t) prg_exit(__FUNCTION__ ": Cannot allocate memory.\n");
+dolog("%s:new block(%d) - alloc size = %d\n", __func__, nr_blocks, size * TBL_SIZE);
+	if(!tmp->_block_t) prg_exit("Cannot allocate memory.\n");
 	list_add(&tmp->head, h);
 	return tmp;
 }
@@ -68,11 +69,11 @@
 		}
 nr++;
 	}
-	dolog(__FUNCTION__": no empty space, getting new one.\n");
+	dolog("%s: no empty space, getting new one.\n", __func__);
 	tmp = new_block(size, h);
 	i = 0;
 FOUND:
-	dolog(__FUNCTION__": empty in %d block at %d pos\n", nr, i);
+	dolog("%s: empty in %d block at %d pos\n", __func__, nr, i);
 	tmp->map |= 1<<i;
 	return tmp->_block_t + (size * i);
 }
@@ -85,12 +86,12 @@
 	struct _block_tbl_t *tmp;
 	struct list_head *t, *p;
 	t = head->next;
-dolog(__FUNCTION__": entering\n");
+dolog("%s: entering\n", __func__);
 	while(t != head) {
 		tmp = list_entry(t, struct _block_tbl_t, head);
 		p = t->next;
 		if(!tmp->map) {
-			dolog(__FUNCTION__": empty block found %p\n", tmp);
+			dolog("%s: empty block found %p\n", __func__, tmp);
 			free(tmp->_block_t);
 			list_del(&tmp->head);
 			free(tmp);
@@ -113,12 +114,12 @@
 			goto FOUND;
 		i++;
 	}
-	dolog(__FUNCTION__ ":entry not found - error\n");
+	dolog("%s:entry not found - error\n", __func__);
 	return -1;
 FOUND:
-	dolog(__FUNCTION__": %p pointer found in %d\n", p, i);
+	dolog("%s: %p pointer found in %d\n", __func__, p, i);
 	tmp->map &= ~(1<<(p - tmp->_block_t)/size);
-	dolog(__FUNCTION__": setting map pos %d to zero, map = %x\n",
+	dolog("%s: setting map pos %d to zero, map = %x\n", __func__,
 		(p - tmp->_block_t)/size, tmp->map);
 	return 0;
 }		 	
--- whowatch-1.6.0.orig/src/help.c
+++ whowatch-1.6.0/src/help.c
@@ -51,7 +51,7 @@
 
 static void show_help(void *unused)
 {
-dolog(__FUNCTION__":printing help\n");
+dolog("%s:printing help\n", __func__);
 	general();
 	if(current == &users_list) userwin_help();
 	if(current == &proc_win) procwin_help();	
--- whowatch-1.6.0.orig/src/info_box.c
+++ whowatch-1.6.0/src/info_box.c
@@ -66,7 +66,7 @@
 	if(_box.wd) return;
 	set_size();
 	_box.wd = newpad(_box.rows, _box.cols);
-	if(!_box.wd) prg_exit(__FUNCTION__": cannot allocate memory.");
+	if(!_box.wd) prg_exit("box_create: cannot allocate memory.");
 	wbkgd(_box.wd, COLOR_PAIR(9));
 	werase(_box.wd);
 	box(_box.wd, ACS_VLINE, ACS_HLINE);
--- whowatch-1.6.0.orig/src/input_box.c
+++ whowatch-1.6.0/src/input_box.c
@@ -127,7 +127,7 @@
 
 void clb(char *s)
 {
-	dolog(__FUNCTION__": in: %s\n", s);
+	dolog("%s: in: %s\n", __func__, s);
 }
 
 /* 
--- whowatch-1.6.0.orig/src/menu.c
+++ whowatch-1.6.0/src/menu.c
@@ -74,7 +74,7 @@
 	static int pos = TITLE_START;
 	
 	t = calloc(1, sizeof *t);
-	if(!t) prg_exit(__FUNCTION__": cannot allocate memory.");
+	if(!t) prg_exit("add_submenu: cannot allocate memory.");
 	t->title = s;
 	INIT_LIST_HEAD(&t->items);
 	list_add(&t->l_menu, &menu.submenus);
@@ -101,11 +101,11 @@
 	static unsigned short longest;
 	int len = strlen(i->name);// + strlen(i->descr) + 1;
 	if(!(t = find_submenu(title))) {
-//dolog(__FUNCTION__ ": cannot find title %s\n", title);
+//dolog("%s: cannot find title %s\n", __func__, title);
 		return;
 	}
 	if(len > longest) longest = len;
-//dolog(__FUNCTION__": %d %d %d\n", longest, strlen(i->descr), t->cols);	
+//dolog("%s: %d %d %d\n", __func__, longest, strlen(i->descr), t->cols);	
 	if(longest + strlen(i->descr) + 3 > t->cols) 
 		t->cols = 3 + longest + strlen(i->descr);
 	if(!t->rows) t->rows = 3; /* make space for a border line */
@@ -193,7 +193,7 @@
 {
 	set_size();
 	menu.wd = newpad(1, menu.cols);
-	if(!menu.wd) prg_exit(__FUNCTION__ ": Cannot allocate memory.");
+	if(!menu.wd) prg_exit("menu_create: Cannot allocate memory.");
 	wbkgd(menu.wd, COLOR_PAIR(9));
 //	overwrite(info_win.wd, menu.wd);
 	werase(menu.wd);
@@ -276,7 +276,7 @@
 		return 1;
 	}
 	if(!menu.wd) return 0;
-dolog(__FUNCTION__"submenu_wd %p\n", submenu_wd);	
+dolog("%s submenu_wd %p\n", __func__, submenu_wd);	
 	switch(key) {
 	case KBD_ESC:
 		menu_destroy();
@@ -291,7 +291,7 @@
 		if(!submenu_show()) return 1; 
 		if(change_item(cur_item->l_submenu.prev))
 			highlight_item(cur_submenu, 1);
-		dolog(__FUNCTION__": cur item %s\n", cur_item->name);
+		dolog("%s: cur item %s\n", __func__, cur_item->name);
 		break;	
 	case KBD_UP:
 		if(!submenu_show()) return 1; 
@@ -308,10 +308,10 @@
 		menu_destroy();
 		break;
 	default: 
-dolog(__FUNCTION__": [%d] skipped\n", key);
+dolog("%s: [%d] skipped\n", __func__, key);
 		return KEY_HANDLED;
 	}
-dolog(__FUNCTION__":[%d] accepted\n", key);
+dolog("%s:[%d] accepted\n", __func__, key);
 	return KEY_HANDLED;
 }
 
--- whowatch-1.6.0.orig/src/menu_hooks.c
+++ whowatch-1.6.0/src/menu_hooks.c
@@ -9,7 +9,7 @@
 
 void  m_exit(void)
 {
-dolog(__FUNCTION__":entering\n");
+dolog("%s:entering\n", __func__);
 	prg_exit("");
 }	
 void m_details(void)
--- whowatch-1.6.0.orig/src/process.c
+++ whowatch-1.6.0/src/process.c
@@ -275,7 +275,7 @@
 
 	if(!(key&KBD_CTRL)) return KEY_SKIPPED;
 	key &= KBD_MASK;
-dolog(__FUNCTION__": %x %x\n", key, 'H');	
+dolog("%s: %x %x\n", __func__, key, 'H');	
 
 	switch(key) {
 	case 'K': signal = 9; break;
--- whowatch-1.6.0.orig/src/screen.c
+++ whowatch-1.6.0/src/screen.c
@@ -41,7 +41,7 @@
 void win_init(void)
 {
 	curs_buf = realloc(curs_buf, screen_cols * sizeof(chtype));
-	if(!curs_buf) errx(1, __FUNCTION__ ": Cannot allocate memory.");
+	if(!curs_buf) errx(1, "%s: Cannot allocate memory.", __func__);
 	bzero(curs_buf, sizeof(chtype) * screen_cols);
 	users_list.rows = screen_rows - RESERVED_LINES - 1;
 	users_list.cols = screen_cols - 2; 	
--- whowatch-1.6.0.orig/src/search.c
+++ whowatch-1.6.0/src/search.c
@@ -39,7 +39,7 @@
 	/* move the cursor to appropriate line */
 	to_line(p, current);
 	pad_draw();
-dolog(__FUNCTION__": %d\n", p);
+dolog("%s: %d\n", __func__, p);
 }
 
 
--- whowatch-1.6.0.orig/src/subwin.c
+++ whowatch-1.6.0/src/subwin.c
@@ -67,7 +67,7 @@
 			sub_current->offset--;
 		break;
 	case 'y':
-dolog(__FUNCTION__": sending %d signal to %d\n" ,signals[sub_current->arrow].sig, cur_pid);
+dolog("%s: sending %d signal to %d\n", __func__, signals[sub_current->arrow].sig, cur_pid);
 		do_signal(signals[sub_current->arrow].sig, cur_pid);
 		return KEY_HANDLED;
 	default: return KEY_SKIPPED;
@@ -116,7 +116,7 @@
 	int size = sizeof signals/sizeof (struct signal_t);
 	char buf[16];
 	int i, pid = *(int *) p;
-dolog(__FUNCTION__": pid %d\n", pid);
+dolog("%s: pid %d\n", __func__, pid);
 	if(pid <= 0) {
 		title("No valid pid selected");
 		return;
@@ -155,11 +155,11 @@
 {
 assert(sub_current);
 	main_pad->wd = newpad(SUBWIN_ROWS, SUBWIN_COLS);
-	if(!main_pad->wd) prg_exit(__FUNCTION__ ": cannot create details window.");
+	if(!main_pad->wd) prg_exit("pad_create: cannot create details window.");
 	set_size(main_pad);
 	w->offset = w->lines = w->xoffset = 0;
 	border_wd = newpad(BORDER_ROWS+1, BORDER_COLS+1);
-	if(!border_wd) prg_exit(__FUNCTION__ ": cannot create details window.");
+	if(!border_wd) prg_exit("pad_create: cannot create details window.");
 	wbkgd(border_wd, COLOR_PAIR(8));
 	werase(border_wd);
 	box(border_wd, ACS_VLINE, ACS_HLINE);
@@ -218,7 +218,7 @@
 {
 	void *p;
 assert(sub_current);
-dolog(__FUNCTION__":entering\n");	
+dolog("%s:entering\n", __func__);	
 	if(!main_pad->wd) return;
 	werase(main_pad->wd);
 	sub_current->lines = 0; 
@@ -226,7 +226,7 @@
 	if(sub_current == &sub_info) {
 		draw_plugin(0);
 //		pad_refresh();
-dolog(__FUNCTION__"; info only..skipping draw\n");
+dolog("%s; info only..skipping draw\n", __func__);
 		return;
 	}
 	p = on_cursor();
@@ -242,7 +242,7 @@
 		draw_plugin(p);
 	}		
 	else {
-dolog(__FUNCTION__"; only builtin draw\n");
+dolog("%s; only builtin draw\n", __func__);
 		sub_current->builtin_draw(p);
 	}	
 	/* number of data lines probably has changed - adjust offset */
@@ -316,7 +316,7 @@
 		snprintf(dlerr, sizeof dlerr, "%s", dlerror());
 		return dlerr;
 	}
-dolog(__FUNCTION__" dlopen returned %x\n", h);
+dolog("%s dlopen returned %x\n", __func__, h);
 	/* 
 	 * Check if the same plugin has been loaded. 
 	 * Plugin's name could be the same but code could be different.
@@ -325,10 +325,10 @@
 	 */
 	for(i = 0; i < sizeof sb/sizeof(struct subwin *); i++) {
 		if(sb[i]->handle == h) {
-dolog(__FUNCTION__": subwin %d has handle %x\n", i, sb[i]->handle); 		
+dolog("%s: subwin %d has handle %x\n", __func__, i, sb[i]->handle); 		
 			dlclose(h);
 			dlclose(sb[i]->handle);
-dolog(__FUNCTION__": plugin already loaded in subwin %d, count %d\n", i, i);
+dolog("%s: plugin already loaded in subwin %d, count %d\n", __func__, i, i);
 			sb[i]->handle = h = 0;
 			goto AGAIN;
 		break;
@@ -352,14 +352,14 @@
 	if(target->handle) {
 		int i;
 		i = dlclose(target->handle);
-dolog(__FUNCTION__": closing prev library: %d %s\n", i, dlerror());
+dolog("%s: closing prev library: %d %s\n", __func__, i, dlerror());
 }
-dolog(__FUNCTION__": plugin loaded\n");	
+dolog("%s: plugin loaded\n", __func__);	
 	target->handle = h;
 	target->flags = target->plugin_init(on_cursor());
 	return 0;
 ERROR:
-dolog(__FUNCTION__": plugin not loaded\n");
+dolog("%s: plugin not loaded\n", __func__);
 	snprintf(dlerr, sizeof dlerr, "%s", err);
 	dlclose(h);
 	return dlerr;
@@ -398,7 +398,7 @@
 	sub_main.plugin_clear = dummy;
 	sub_main.plugin_cleanup = dummy;
 	main_pad = calloc(1, sizeof(struct pad_t));
-	if(!main_pad) prg_exit(__FUNCTION__": cannot allocate memory.");
+	if(!main_pad) prg_exit("subwin_init: cannot allocate memory.");
 	sub_main.arrow = -1;
 	memcpy(&sub_proc, &sub_main, sizeof(sub_main));
 	memcpy(&sub_user, &sub_main, sizeof(sub_main));
@@ -412,7 +412,7 @@
 	sub_current = &sub_user;
 	/* set builtin plugins */
 	builtin_set();
-dolog(__FUNCTION__": %d %d\n", sub_main.arrow, sub_proc.arrow);
+dolog("%s: %d %d\n", __func__, sub_main.arrow, sub_proc.arrow);
 	
 }
 
@@ -442,11 +442,11 @@
 		}	
 	default: return KEY_SKIPPED;
 	}
-dolog(__FUNCTION__": key processed\n");	
-dolog(__FUNCTION__": cur %d, %d %d\n", sub_current->arrow, sub_main.arrow, sub_proc.arrow);
+dolog("%s: key processed\n", __func__);	
+dolog("%s: cur %d, %d %d\n", __func__, sub_current->arrow, sub_main.arrow, sub_proc.arrow);
 
 	sub_change(sub_current);
-dolog(__FUNCTION__": cur %d, %d %d\n", sub_current->arrow, sub_main.arrow, sub_proc.arrow);
+dolog("%s: cur %d, %d %d\n", __func__, sub_current->arrow, sub_main.arrow, sub_proc.arrow);
 
 	return KEY_HANDLED;
 }
@@ -455,10 +455,10 @@
 {
 	if(!main_pad->wd) return;
 	if(sub_current->flags & PERIODIC) {
-dolog(__FUNCTION__": doing plugin (and perhaps builtin) draw\n");
+dolog("%s: doing plugin (and perhaps builtin) draw\n", __func__);
 		pad_draw();
 	}
-dolog(__FUNCTION__": doing refresh\n");
+dolog("%s: doing refresh\n", __func__);
 	pad_refresh();
 }
 
--- whowatch-1.6.0.orig/src/user.c
+++ whowatch-1.6.0/src/user.c
@@ -57,7 +57,7 @@
 	int i;
 	struct prot_t *t;
 	users_list.d_lines += p;
-dolog(__FUNCTION__": dlines %d\n", users_list.d_lines);	
+dolog("%s: dlines %d\n", __func__, users_list.d_lines);	
 	for(i = 0; i < sizeof prot_tab/sizeof(struct prot_t); i++){
 		t = &prot_tab[i];
 		if(strncmp(t->s, name, strlen(t->s))) continue;
@@ -217,7 +217,7 @@
 	while((i = read(wtmp_fd, &entry, sizeof entry)) > 0){ 
 		if (i < sizeof entry){
 			curses_end();
-			errx(1, __FUNCTION__ ": error reading " WTMP_FILE );
+			errx(1, "%s: error reading " WTMP_FILE, __func__ );
 		}
 		/* user just logged in */
 #ifdef HAVE_USER_PROCESS
@@ -328,10 +328,10 @@
 void users_init(void)
 {
         if((wtmp_fd = open(WTMP_FILE ,O_RDONLY)) == -1)
-                errx(1, __FUNCTION__ ": cannot open " WTMP_FILE ": %s",
+                errx(1, "%s: cannot open " WTMP_FILE ": %s", __func__,
                         strerror(errno));
         if(lseek(wtmp_fd, 0, SEEK_END) == -1)
-                errx(1, __FUNCTION__  ": cannot seek in " WTMP_FILE ": %s",
+                errx(1, "%s: cannot seek in " WTMP_FILE ": %s", __func__,
 			strerror(errno));
 	users_list.giveme_line = users_list_giveline;
 	users_list.keys = ulist_key;
--- whowatch-1.6.0.orig/src/whowatch.c
+++ whowatch-1.6.0/src/whowatch.c
@@ -152,7 +152,7 @@
 	default: return;
 	}
 SKIP:
-dolog(__FUNCTION__": doing refresh\n");
+dolog("%s: doing refresh\n", __func__);
 	wnoutrefresh(main_win);
 	wnoutrefresh(info_win.wd);
 	pad_refresh();
@@ -170,7 +170,7 @@
 		*x = win.ws_col;
 		return;
 	}
-	prg_exit(__FUNCTION__ ": ioctl error: cannot read screen size.");
+	prg_exit(": ioctl error: cannot read screen size.");
 }								
 
 static void winch_handler()


whowatch-gcc4.patch:

--- NEW FILE whowatch-gcc4.patch ---
diff -urN ../tmp-orig/whowatch-1.6.0/src/process.c ./src/process.c
--- ../tmp-orig/whowatch-1.6.0/src/process.c	2005-03-03 15:58:43.561876676 +0100
+++ ./src/process.c	2005-03-03 15:58:23.855680335 +0100
@@ -75,7 +75,7 @@
 		memset(z, 0, sizeof *z);
 		check_line(l);
 		z->line = l++;
-		(struct process *) p->priv = z;
+		p->priv = z;
 		z->proc = p;
 		if (*current){
 			z->next = *current;
diff -urN ../tmp-orig/whowatch-1.6.0/src/subwin.c ./src/subwin.c
--- ../tmp-orig/whowatch-1.6.0/src/subwin.c	2005-03-03 15:58:43.562876483 +0100
+++ ./src/subwin.c	2005-03-03 15:58:37.076128545 +0100
@@ -201,7 +201,7 @@
 	static void *p = 0;
 	static int pid;
 	if(current == &users_list)
-		(char *)p = cursor_user()->name;
+		p = cursor_user()->name;
 	else {
 		pid = cursor_pid();
 		p = &pid;

--- whowatch-1.6.0/src/menu.c	2005-04-05 08:37:26.334311640 -0400
+++ whowatch-1.6.0.new/src/menu.c	2005-04-05 08:28:17.000000000 -0400
@@ -37,7 +37,7 @@
 static unsigned short item_cursor;
 
 #define DUMMY_HEAD	{0, 0}
-static char *submenus[] = { "File", "View", "Process", "Users",  "Help" };
+static char *submenus[] = { "File", "View", "Process", "Users",  "Help", NULL };
 struct item_bind_t  {
 	unsigned short submenu;		/* index in the submenus table */
 	struct item_t item;


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/devel/whowatch/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	8 Nov 2004 05:31:52 -0000	1.2
+++ .cvsignore	8 Apr 2005 06:44:32 -0000	1.3
@@ -1 +1 @@
-whowatch-1.4.tar.gz
+whowatch-1.6.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/devel/whowatch/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	8 Nov 2004 05:31:52 -0000	1.2
+++ sources	8 Apr 2005 06:44:32 -0000	1.3
@@ -1 +1 @@
-0870155e8b75b99f9954e76fb20f9528  whowatch-1.4.tar.gz
+3eb9934c87a5dcfc146f1d926da51a07  whowatch-1.6.0.tar.gz


Index: whowatch.spec
===================================================================
RCS file: /cvs/extras/devel/whowatch/whowatch.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- whowatch.spec	6 Apr 2005 22:13:52 -0000	1.7
+++ whowatch.spec	8 Apr 2005 06:44:32 -0000	1.8
@@ -1,13 +1,14 @@
 Name:           whowatch
-Version:        1.4
-Release:        3
-
+Version:        1.6.0
+Release:        1
 Summary:        Displays informations about the users currently logged in
 
 Group:          Applications/System
 License:        GPL
 URL:            http://wizard.ae.krakow.pl/~mike/
 Source0:        http://wizard.ae.krakow.pl/~mike/download/%{name}-%{version}.tar.gz
+Patch0:         whowatch-debian-patches.patch
+Patch1:         whowatch-gcc4.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  ncurses-devel
 
@@ -22,6 +23,8 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .debian
+%patch1 -p1 -b .gcc4
 
 
 %build
@@ -30,22 +33,26 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-#make install doesn't make the install directories.
-%{__mkdir} -p $RPM_BUILD_ROOT/%{_bindir}/
-%{__mkdir} -p $RPM_BUILD_ROOT/%{_mandir}/man1/
-%makeinstall
+#make install doesn't work anymore
+install -D -m0755 src/whowatch ${RPM_BUILD_ROOT}%{_bindir}/whowatch
+install -D -m0644 whowatch.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/whowatch.1
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING ChangeLog README TODO KEYS
+%doc AUTHORS COPYING ChangeLog README TODO PLUGINS.readme
 %{_bindir}/*
 %{_mandir}/man1/*
 
 %changelog
-* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+* Thu Apr 07 2005 Adrian Reber <adrian at lisas.de> - 1.6.0-1
+- Updated to 1.6.0 to fix gcc4 errors
+- Added many patches from debian
+- Added a patch to fix some gcc4 errors and a segmentation fault
+
+* Thu Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
 - rebuilt
 
 * Mon Aug 25 2003 Nils O. Selåsdal <NOS at Utel.no> - 0:1.4-0.fdr.1




More information about the fedora-extras-commits mailing list