portability

Norman Diamond diamond at csl.sony.JUNET
Fri Jan 27 12:10:10 AEST 1989


In article <877 at auspex.UUCP>, guy at auspex.UUCP (Guy Harris) writes:
> > What I think AT&T plans to do for S5R4, for example, is to *rename*
> > the "write" routine "_write", and have a mechanism by which the
> > linker will let "_write" satisfy unresolved references for "write"
> > (or something like that);

In article <23254 at watmath.waterloo.edu>, rbutterworth at watmath.waterloo.edu (Ray Butterworth) writes:
> It seems to me that every implementor of a library other than
> the Standard C library is going to need a means of having
> alternate names for its functions (unless none of them call
> each other).  If not, it means that for anyone using part of
> a large library all the identifiers in the library become
> reserved words that he must be aware of.
> 
> Thus, unless one wants to have library source that look like:
>     write(args) { return __write(args); }
>     __write(args) { implementation of normal write function }

#if defined (mylib_requested) || defined (__mylib_requested)
#define mylib_reserved_name __mylib_reserved_name
#endif
__mylib_reserved_name(args) { ... }

      [ #ifdef inews_sucks ]
      [ filler line        ]
      [ filler line        ]
      [ filler line        ]
      [ filler line        ]
-- 
Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp at relay.cs.net)
  The above opinions are my own.   |  Why are programmers criticized for
  If they're also your opinions,   |  re-inventing the wheel, when car
  you're infringing my copyright.  |  manufacturers are praised for it?



More information about the Comp.std.c mailing list