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

Re: AT&T UNIX 3.2 netCDF



> Organization: USDA
> Keywords: 199502142027.AA05051

Hi John,

> The following are changes made to compile netCDF on
> an AT&T UNIX 3.2 platform:
> 
> 1)  added #include <ctype.h> to ncgen/load.c

Yes, it looks like this should have been there for every platform, since
`isdigit' is invoked in load.c.  Thanks for pointing this out.  I wonder
where the definition of `isdigit' was found on all the other platforms.
Maybe there's a non-macro version in libc ...

> 2)  added u_char, u_int, u_short, and u_long to sys/types.h.

I guess it would improve portability if we used the POSIX uchar_t, uint_t, ...

> 3)  added the LD_NETCDF line (below) to nctest, ncgen, and ncdump Makefiles.
>     LD_NETCDF = ../libsrc/lib$(LIBNAME).a -lm -lnet -lrpc -lrpcsvc -lnsl_s

Our new `configure' script generated by autoconf 2 may define this
correctly.

> 4)  the third and fourth patches had carriage-returns (control-Ms)
>     shown as ^M at the end of the lines.  These must be removed first
>     before the patch will work.

I think this is an artifact of something that happened in your transferring
or converting the patch files.  There are no carriage returns in the patch
files on our FTP server.

> 5)  remember to compile version 2.1 of patch.

I'd prefer it if the patches did not depend on new features of `patch', but
I'm not sure what new feature was used.  The patches were generated with a
`diff -c1 -r'.  I don't know how else to make patch files.

> 6)  if you do not have a /usr/include/netinet/in.h file then remember to
>     change xdr/xdrstdio.c to include #include <sys/in.h>.
> 
> 7)  Commented out sys/types.h from the libsrc/xdrposix.c
> 
> 8)  Define __STDC__ for gnu compiler but not att compiler.
> 
> 9)  Define NO_STDLIB before #include stdlib.h for att compiler.
> 
> 10) Define NO_STDC_REMOVE for libsrc/file.c.
> 
> 11) Add #ifdef STDC_INCLUDES before #include stdlib.h for libsrc/local_nc.h.

Thanks for pointing these out.  I'll pass these on to Steve Emmerson, our
`configure' wizard.  He may be able to improve the new configure script to
handle some of these.

> 
> Here are some of the environmental assignments/commands: 
> OS=unix 
> FC="f77" 
> CC="gcc -Wall -D__STDC__ -DNO_STDC_REMOVE -Dunix" 
> CPP=/lib/cpp 
> LD_NETCDF="../libsrc/libnetcdf.a -lm -lnet -lrpc -lrpcsvc -lnsl_s" 
> export FC OS CC CPP LD_NETCDF 
> ./configure --prefix=/usr/local 

______________________________________________________________________________

Russ Rew                                                UCAR Unidata Program
address@hidden                                          P.O. Box 3000
http://www.unidata.ucar.edu/                          Boulder, CO 80307-3000
______________________________________________________________________________