In article <[EMAIL PROTECTED]> you wrote:
> 
>> > /cw/bin/cc -o nsinstall.o -c -DOSTYPE=\"SunOS5\" -DOSARCH=\"SunOS\" -DOJI   
>-I../dist/include -I../dist/include 
>-I/usr/local/OpenPKG/RPM/TMP/mozilla/dist/include/nspr      -I/usr/include   -fPIC 
>-I/usr/include -Wno-long-long -O2 -pipe -I/cw/include -pthreads -pipe  -DNDEBUG 
>-DTRIMMED  -I/usr/include -include ../config-defs.h -DMOZILLA_CLIENT nsinstall.c
>> > nsinstall.c: In function `main':
>> > nsinstall.c:372: `optarg' undeclared (first use in this function)
> [snip]
>> Hmmmm... looks like Solaris 8 doesn't know (or at least Mozilla does not
>> know because it doesn't include the corresponding headers) about getopt
> 
> Odd. I see the "-I/usr/include" and..
> 
> # egrep -l optarg /usr/include/*.h
> /usr/include/stdio.h
> /usr/include/stdlib.h
> /usr/include/unistd.h
> 
> ..so it's got little excuse for not finding it, based on my pitifully
> naive understanding of how includes work in the coding build process.

You understand it correctly, but the point can be that all those declarations
in these headers are wrapped with lots of special #ifdef's and so it can be
that they are disabled if Mozilla compiles. You can check this if you run the
above compiler call manually and add an -E option to cc and attach a "| grep
optarg". I guess there is no output at all which means that all declarations
of optarg were skipped because none of the conditions for the surrounding
blocks are true.
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to