Hi Mel,

Thanks for your reply - very insightful - i have beendelving into the c library 
files - which is after all why i am readingthis book, though still at the 
beginning 8).

On the pracct.c source file I have found it sufficient just to change line 31

from 
          struct     acct        acdata;
to
         struct     acctv1    acdata;

this leaves me with only 1 error which I have side stepped but not fixed.


error: +++++++++++++++++++++++++++++++++++++

bsdexit2.c: In function 'thr_fn2';
bsdexit2.c:31: Warning format '%d' expects type 'int', but argument 2 has type 
'pthread_t'
+++++++++++++++++++++++++++++++++++++++++

line 31of threads/bsdexit2.c reads:

printf("thread 2: ID is %d\n", pthread_self

which I have commented this line and Make finishes building.

however which "%   ?" operater would I use to display pthread_self. 
In the c library pthread.h it says it is of "pthread_t" type.

I appreciate your help and I am grateful that you have inspired me.

Kindest regards,

Seamus

----- Original Message ----
From: Mel <[EMAIL PROTECTED]>
To: freebsd-questions@freebsd.org
Cc: Brother Seamus <[EMAIL PROTECTED]>
Sent: Monday, 14 April, 2008 7:51:05 PM
Subject: Re: advanced programming unix environment

On Monday 14 April 2008 18:48:58 Brother Seamus wrote:

> I am trying to build the neccesary files for the stevens/rago APUE.2e book
> on FreeBSD 7.0

<snip>

> I get the following error:
> +++++++++++++++++++++++++++++++++++++++++
> pracct.c  ../lib/libapue.a
> pracct.c: In function 'main':
> pracct.c:31: error: storage size of 'acdata' isn't known
> pracct.c:31: warning: unused variable 'acdata'

The legacy struct acct has been renamed to acctv1 and a new one is named 
acctv2.
If you add:
typedef struct acctv1 acct_t;
After the #include <sys/acct.h>

then change the type of acdata to 'acct_t', you'll probably have solved it. 
But depends a bit on the rest of the library.


-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.

----- Original Message ----
From: Mel <[EMAIL PROTECTED]>
To: freebsd-questions@freebsd.org
Cc: Brother Seamus <[EMAIL PROTECTED]>
Sent: Monday, 14 April, 2008 7:51:05 PM
Subject: Re: advanced programming unix environment

On Monday 14 April 2008 18:48:58 Brother Seamus wrote:

> I am trying to build the neccesary files for the stevens/rago APUE.2e book
> on FreeBSD 7.0

<snip>

> I get the following error:
> +++++++++++++++++++++++++++++++++++++++++
> pracct.c  ../lib/libapue.a
> pracct.c: In function 'main':
> pracct.c:31: error: storage size of 'acdata' isn't known
> pracct.c:31: warning: unused variable 'acdata'

The legacy struct acct has been renamed to acctv1 and a new one is named 
acctv2.
If you add:
typedef struct acctv1 acct_t;
After the #include <sys/acct.h>

then change the type of acdata to 'acct_t', you'll probably have solved it. 
But depends a bit on the rest of the library.


-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.




_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to