[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NetCDF installation problem



Vladimir,

>Date: Thu, 9 Sep 2004 08:06:51 +0200
>From: "Vladimir Meerson" <address@hidden>
>Organization: Israel Meteorological Service
>To: "Steve Emmerson" <address@hidden>
>Subject: NetCDF installation problem
> Keywords: 200408111149.i7BBnPaW019090 netCDF IRIX

The above message contained the following:

> 1. I've created a file test01.c in src directory. The file contains:
> 
> #include "confdefs.h"
> #include <sys/types.h>
> #include <stdlib.h>
> #include <stddef.h>
> int ssize_t;
> 
> 2. Compilation results:
> 
> vladimir@smt-db[ttyq9]-~/netcdf-3.5.1/src-393%   /bin/cc -64 -DNDEBUG -O -c
> test01.c
> 
> cc-1349 cc: WARNING File = /usr/include/sys/types.h, Line = 222
>   The indicated declaration requires a typedef name.
> 
>   typedef long    ssize_t;
>                          ^
> 
> cc-1084 cc: ERROR File = test01.c, Line = 5
>   The indicated declaration has an invalid combination of type specifiers.
> 
>   int ssize_t;
>       ^
> 
> 1 error detected in the compilation of "test01.c".

Interesting.  The above indicates that the symbol "ssize_t" is defined,
and yet the following code:

    #include "confdefs.h"
    #include <sys/types.h>
    #include <stdlib.h>
    #include <stddef.h>

doesn't appear to contain the word "ssize_t" after preprocessing.
Superficially, this appears to be a paradox.

Let's look at the preprocessor output in detail.  Execute the command

    /bin/cc -64 -DNDEBUG -E test01.c | grep '^int' | tail

and send me it's output.  This will tell us how the preprocessor deals
with the last line ("int ssize_t;").  If and only if the last line is
"int ssize_t;", then send me the entire output.

> Regards,
> 
> Vladimir Meerson
> Israel Meteorological Service
> P.O.Box 25, Bet-Dagan ISRAEL

Regards,
Steve Emmerson