From owner-freebsd-questions@FreeBSD.ORG Mon Apr 14 20:02:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB14F106566C for ; Mon, 14 Apr 2008 20:02:24 +0000 (UTC) (envelope-from brother_seamus@btinternet.com) Received: from web86512.mail.ird.yahoo.com (web86512.mail.ird.yahoo.com [217.146.189.164]) by mx1.freebsd.org (Postfix) with SMTP id 31CAC8FC1B for ; Mon, 14 Apr 2008 20:02:23 +0000 (UTC) (envelope-from brother_seamus@btinternet.com) Received: (qmail 71524 invoked by uid 60001); 14 Apr 2008 20:02:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=btinternet.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=fqyd9xcNx3w36CIVm2P9c1ds4XtEAarOvVPrEK+3n0FHHQkmcquvVqQQ449n/HV+nZw6Q5ftYtzhKi59WByMMVhImuR+NnexalIxrd+h/7XIL7fW5Xb9fw43yi7fhD5bTG0mD1BAlVQkc7IT/iNbUBrobKnbIyQ9dyukc2c/4SM=; X-YMail-OSG: AoWHNfMVM1mhXvNp3PqFPEcJ1mzyUVe27_59F.EHJk1WvZnk Received: from [217.42.59.28] by web86512.mail.ird.yahoo.com via HTTP; Mon, 14 Apr 2008 20:02:22 GMT X-Mailer: YahooMailRC/902.40 YahooMailWebService/0.7.162 Date: Mon, 14 Apr 2008 20:02:22 +0000 (GMT) From: Brother Seamus To: freebsd-questions@freebsd.org MIME-Version: 1.0 Message-ID: <710052.69744.qm@web86512.mail.ird.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: advanced programming unix environment X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2008 20:02:24 -0000 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 =0ATo: freebsd-questions@freebsd.org=0ACc: B= rother Seamus =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=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 =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= =0ATo: freebsd-questions@freebsd.org= =0ACc: Brother Seamus =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=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 = =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