Re: FreeBSD 3.3 and libgtop-1.0.5



zapata@gmx.at writes:

> I am running FreeBSD 3.3 and today I wanted to compile the latest gnome
> packages ! I don't get very far, because I stuck with the libgtop-1.0.5
> package ! :(
> Here is the error message:
> 
> procstate.c: In function `glibtop_get_proc_state_p':
> procstate.c:99: `GLIBTOP_PROCESS_RUNNING' undeclared (first use in this
> function

Hello,

looks like I made some little mistake when merging bug fixes from LibGTop 1.1.x
into 1.0.x; the GLIBTOP_PROCESS_* macros have been added in the development
version of LibGTop.

I just fixed this in CVS.

The correct code looks like this:

=====
#if LIBGTOP_VERSION_CODE >= 1001000
	switch (pinfo [0].kp_proc.p_stat) {
	case SIDL:
		buf->state = 0;
		break;
	case SRUN:
		buf->state = GLIBTOP_PROCESS_RUNNING;
		break;
	case SSLEEP:
		buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
		break;
	case SSTOP:
		buf->state = GLIBTOP_PROCESS_STOPPED;
		break;
	case SZOMB:
		buf->state = GLIBTOP_PROCESS_ZOMBIE;
		break;
	default:
		return;
	}
#else
	switch (pinfo [0].kp_proc.p_stat) {
	case SIDL:
		buf->state = 'S';
		break;
	case SRUN:
		buf->state = 'R';
		break;
	case SSLEEP:
		buf->state = 'S';
		break;
	case SSTOP:
		buf->state = 'T';
		break;
	case SZOMB:
		buf->state = 'Z';
		break;
	default:
		return;
	}
#endif
=====

-- 
Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org



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