Date: Mon, 14 Apr 2008 20:02:22 +0000 (GMT) From: Brother Seamus <brother_seamus@btinternet.com> To: freebsd-questions@freebsd.org Subject: Re: advanced programming unix environment Message-ID: <710052.69744.qm@web86512.mail.ird.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi Mel,=0A=0AThanks for your reply - very insightful - i have beendelving i= nto the c library files - which is after all why i am readingthis book, tho= ugh still at the beginning 8).=0A=0AOn the pracct.c source file I have foun= d it sufficient just to change line 31=0A=0Afrom =0A struct ac= ct acdata;=0Ato=0A struct acctv1 acdata;=0A=0Athis le= aves me with only 1 error which I have side stepped but not fixed.=0A=0A=0A= error: +++++++++++++++++++++++++++++++++++++=0A=0Absdexit2.c: In function '= thr_fn2';=0Absdexit2.c:31: Warning format '%d' expects type 'int', but argu= ment 2 has type 'pthread_t'=0A+++++++++++++++++++++++++++++++++++++++++=0A= =0Aline 31of threads/bsdexit2.c reads:=0A=0Aprintf("thread 2: ID is %d\n", = pthread_self=0A=0Awhich I have commented this line and Make finishes buildi= ng.=0A=0Ahowever which "% ?" operater would I use to display pthread_self= . =0AIn the c library pthread.h it says it is of "pthread_t" type.=0A=0AI a= ppreciate your help and I am grateful that you have inspired me.=0A=0AKinde= st regards,=0A=0ASeamus=0A=0A----- Original Message ----=0AFrom: Mel <fbsd.= questions@rachie.is-a-geek.net>=0ATo: freebsd-questions@freebsd.org=0ACc: B= rother Seamus <brother_seamus@btinternet.com>=0ASent: Monday, 14 April, 200= 8 7:51:05 PM=0ASubject: Re: advanced programming unix environment=0A=0AOn M= onday 14 April 2008 18:48:58 Brother Seamus wrote:=0A=0A> I am trying to bu= ild the neccesary files for the stevens/rago APUE.2e book=0A> on FreeBSD 7.= 0=0A=0A<snip>=0A=0A> I get the following error:=0A> +++++++++++++++++++++++= ++++++++++++++++++=0A> pracct.c ../lib/libapue.a=0A> pracct.c: In function= 'main':=0A> pracct.c:31: error: storage size of 'acdata' isn't known=0A> p= racct.c:31: warning: unused variable 'acdata'=0A=0AThe legacy struct acct h= as been renamed to acctv1 and a new one is named =0Aacctv2.=0AIf you add:= =0Atypedef struct acctv1 acct_t;=0AAfter the #include <sys/acct.h>=0A=0Athe= n change the type of acdata to 'acct_t', you'll probably have solved it. = =0ABut depends a bit on the rest of the library.=0A=0A=0A-- =0AMel=0A=0APro= blem with today's modular software: they start with the modules=0A and n= ever get to the software part.=0A=0A----- Original Message ----=0AFrom: Mel= <fbsd.questions@rachie.is-a-geek.net>=0ATo: freebsd-questions@freebsd.org= =0ACc: Brother Seamus <brother_seamus@btinternet.com>=0ASent: Monday, 14 Ap= ril, 2008 7:51:05 PM=0ASubject: Re: advanced programming unix environment= =0A=0AOn Monday 14 April 2008 18:48:58 Brother Seamus wrote:=0A=0A> I am tr= ying to build the neccesary files for the stevens/rago APUE.2e book=0A> on = FreeBSD 7.0=0A=0A<snip>=0A=0A> I get the following error:=0A> +++++++++++++= ++++++++++++++++++++++++++++=0A> pracct.c ../lib/libapue.a=0A> pracct.c: I= n function 'main':=0A> pracct.c:31: error: storage size of 'acdata' isn't k= nown=0A> pracct.c:31: warning: unused variable 'acdata'=0A=0AThe legacy str= uct acct has been renamed to acctv1 and a new one is named =0Aacctv2.=0AIf = you add:=0Atypedef struct acctv1 acct_t;=0AAfter the #include <sys/acct.h>= =0A=0Athen change the type of acdata to 'acct_t', you'll probably have solv= ed it. =0ABut depends a bit on the rest of the library.=0A=0A=0A-- =0AMel= =0A=0AProblem with today's modular software: they start with the modules=0A= and never get to the software part.=0A=0A=0A=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?710052.69744.qm>