In regard to: Re: LPRng: Compiling on AIX, Russell Adams said (at 9:26am on...:
>gcc -I.. -I. -I./include -I./common -g -W -Wall -Wno-unused -g -O2 -g -W -Wall
>-Wno-unused -DHAVE_CONFIG_H -c ./common/getqueue.c -o getqueue.o
>./common/getqueue.c: In function `Get_hold_file':
>./common/getqueue.c:727: parse error before `int'
>./common/getqueue.c:735: `i' undeclared (first use in this function)
>./common/getqueue.c:735: (Each undeclared identifier is reported only once
>./common/getqueue.c:735: for each function it appears in.)
>gmake[1]: *** [getqueue.lo] Error 1
>gmake[1]: Leaving directory `/IDX/home/sysadm/rladams/software/LPRng-3.8.25/src'
>gmake: *** [src] Error 2
>
>I've found the line in getqueue.c, which I've listed a portion of below.
>
> Get_file_image_and_split( hf_name, 0, 0,
> &job->info, Line_ends, 1, Option_value_sep,1,1,1,0);
> if( &job->info.count ) {
> struct line_list cf_line_list, *datafile;
> Init_line_list(&cf_line_list);
> int i;
> char *s;
That's not valid C89 (though it is I think valid for C9X). In C89
you can only have variables at the start of a block, before any other
code. In this case, there's a function call before the variables are
declared (or is that defined, I can't remember).
My guess is your gcc can't grok that. You could upgrade your gcc, or
you could modify the source so that the int and char * come before the
function call.
Tim
--
Tim Mooney [EMAIL PROTECTED]
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------