Gottfried, > To: address@hidden > From: Gottfried Necker <address@hidden> > Subject: udunits library on a VPP 5000 (32 bit mode) > Organization: ? > Keywords: 200206120909.g5C99PJ17848 UDUNITS VPP 5000 The above message contained the following: > Hello, > > I tried to compile the udunits library on a VPP 5000 in 32 bit mode. I > got some very strange errors during the compilation. I must admit that > I don't really need the udunits library on this system, but I am > curious what caused the problems. > > $ uname -a > UNIX_System_V hikvpp-00 4.1 ES 3 5000 UXP/V > $ less VERSION > 1.11.7 > $ type cc > cc is /usr/lang/bin/cc ... > making `all' in directory > /tmp_mnt/hlrfs/home2/inr/necker/c/udunits-1.11.7/src/lib > > gmake: Entering directory > `/tmp_mnt/hlrfs/home2/inr/necker/c/udunits-1.11.7/src/lib' > ln -s ../port/misc/udalloc.c . > ln -s ../port/misc/udalloc.h . > cc -c -O -KA32 -I../port/misc -I../port/cfortran > -DUT_DEFAULT_PATH='"/hlrfs/home2/inr/necker/etc/udunits.dat"' -DNDEBUG > -DsunFortran utlib.c > "utlib.c", line 939: warning: assignment from `int' to `char *': operator `=' Line 939 in version 1.11.7 of file utlib.c is the following: if ((cp = strchr(linebuf, '#')) != NULL) Apparently, the compiler thinks that the strchr(...) function returns an integer. That function should be correctly declared to return a pointer to a char in either ../port/misc/string.h or in the compiler's <string.h>. See if it is so declared. > "utlib.c", line 958: error: invalid type combination of `int' and `int': > operator `' Line 958 is strncpy(name, cp, n)[n] = 0; Again, the compiler apparently doesn't have a valid declaration for the strncpy(...) function. Check the same two header files. Regards, Steve Emmerson <http://www.unidata.ucar.edu>
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.