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

950217: netcfd xdr mem_alloc mis-definition



Darrell,

>Date: Thu, 16 Feb 95 15:46:08 CST 
>From: address@hidden (Darrell Kachilla)
>Organization: M.D. Anderson Cancer Center
>Subject: netcfd xdr mem_alloc mis-definition 
>Keywords: 199502162146.AA16436 

In the above message you wrote:

> well, i got back to netcdf on the VAX/VMS 
> after waiting until C compiler was upgraded to the latest.
> 
> linking the XDR directory programs leads to following contradiction:
> 
> programs have a single argument call to mem_alloc
> eg-
>                                 *cpp = sp = (char *)mem_alloc(nodesize);
> 
> but the macro is defined as 4 argument.
> eg..
> UCX$RPCXDR.H
> #define mem_alloc(dummy, dummy, bsize, dummy)   malloc(bsize)
> #define mem_alloc(ptr, cast, bsize, type)       KM_ALLOC((ptr), cast, bsize, 
> type, KM_NOARG)
> #define kmem_alloc(ptr, cast, bsize, type)      KM_ALLOC((ptr), cast, bsize, 
> type, KM_CLEAR)
> #define mem_alloc(a, b, bsize, c)       malloc(bsize)
>  (depending on particular parameter definition)
> 
> which way should we jump here?
> another source for the macro defn?
> start changing code?  will this be an endless task?
> change the macros?  where will this screw us up ?

    I suggest trying to use the system-supplied XDR stuff rather than
ours.  The problems with XDR on VAXen that prompted us to supply our
own implementation might have been fixed.  To use the system supplied
XDR, edit the `make.com' file and comment-out additions to the netCDF
library from the XDR directory (i.e. have it do nothing except build the
`xdrtest' program).  You'll have to remove any of our XDR object files
from the netCDF library if they've already been added.

--------
Steve Emmerson   <address@hidden>