jd9014@cca.ucsf.edu (Joe DeBattista) (04/01/91)
Greetings, I'm in the process of trying to bring up CNEWS (patched to 24-Mar-1991) on an rs/6000 model 320, running AIX version 3003. I had pretty good sucess by telling CNEWS to compile with bsdcc and to use the standard stdio rather than the enhanced stdio. My main problem is in libc/datetok.c. At first, I got errors saying that the variables were being redefined illegally. That seemed to be related to variables being defined as external in one spot and as static in another (Thanks, Henry for the fix). However, I'm still having a problem. Here's a script of what happens. Script started on Sat Mar 30 19:14:20 1991 # make bsd cc -O -I../include -c datetok.c 16 | static datetkn datetktbl[]; 1506-131: (S) Explicit extent specification or initializer required for an auto or static array. 107 | static datetkn datetktbl[] = { ...............a.............. a - 1506-030: (S) Illegal redeclaration of identifier. 1254-004 The error code from the last failed command is 1. Make Quitting. # script done on Sat Mar 30 19:14:42 1991 Has anyone come across this problem, and have a fix to this? Everything else, so far, seems to compile ok. Any help will be greatly appreciated. Joe DeBattista ITS, UCSF Computer Center BITNET: joed@ucsfcca INTERNET: joed@cca.ucsf.edu -- Joe DeBattista ITS, UCSF Computer Center BITNET: joed@ucsfcca INTERNET: joed@cca.ucsf.edu
henry@zoo.toronto.edu (Henry Spencer) (04/02/91)
In article <3394@ucsfcca.ucsf.edu> jd9014@cca.ucsf.edu (Joe DeBattista) writes: > 16 | static datetkn datetktbl[]; > 1506-131: (S) Explicit extent specification or initializer required for an auto or static array. > 107 | static datetkn datetktbl[] = { > ...............a.............. >a - 1506-030: (S) Illegal redeclaration of identifier. Sigh. The problem here is that the code is trying to do a forward declaration of a static array of indeterminate size, and it turns out that for obscure reasons, you just Can't Do That in ANSI C, although older compilers let you get away with it. The only quick fix that has any likelihood of working is to move the definition of the array (line 107 et al) up where the declaration (line 16) is now. -- "The stories one hears about putting up | Henry Spencer @ U of Toronto Zoology SunOS 4.1.1 are all true." -D. Harrison| henry@zoo.toronto.edu utzoo!henry