Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.JUNET (Norman Diamond) Newsgroups: comp.std.c Subject: Re: portability Summary: library function names Message-ID: <10019@diamond.csl.sony.JUNET> Date: 27 Jan 89 02:10:10 GMT References: <16573@iuvax.cs.indiana.edu> <9419@smoke.BRL.MIL> <86097@sun.uucp> <23254@watmath.waterloo.edu> Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 33 In article <877@auspex.UUCP>, guy@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@watmath.waterloo.edu>, rbutterworth@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@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?