nicb@ctr@italy.eu.net (Nicola Bernardini) (01/08/91)
In article <53567@eerie.acsu.Buffalo.EDU> pjg@acsu.buffalo.edu (Paul Graham) writes: >sef@kithrup.COM (Sean Eric Fagan) writes: >[about remove(S) and having your own function with a libc name] >|This is an example of "Name Space Pollution." Both ANSI and POSIX have >|addressed this, and have come up with a list of functions and variables that >|are not to be touched by application programmers. remove() is in both of >|them. > >my os is supposed to posix compliant and i don't have remove(S). in >fact i've never seen remove(S). what section is 'S' and what >version(s) of unix have remove(S)? Well, at least SCO System V 3.2.2 has remove(S). (S is the program development kit, I think). You can find the macro defined in /usr/include/stdio.h. ------------------------------------------ Nicola Bernardini - nicb%ctr@italy.eu.net Centro Tempo Reale Villa Strozzi Via Pisana, 77 50143 Firenze I T A L I A Tel. ++3955/702444 Fax. ++3955/717712 -- ------------------------------------------ Nicola Bernardini - nicb%ctr@italy.eu.net Centro Tempo Reale Villa Strozzi
gordon@prls.UUCP (Gordon Vickers) (01/11/91)
>In article <53567@eerie.acsu.Buffalo.EDU> pjg@acsu.buffalo.edu (Paul Graham) writes: > >my os is supposed to posix compliant and i don't have remove(S). in >fact i've never seen remove(S). what section is 'S' and what >version(s) of unix have remove(S)? > From a recent article in this group that addressed this problem [the recently posted program 'mbase' (AKA dox) calls remove() ], it seems that the remove() call can be replaced by unlink() . -Gordon
timo@cwi.nl (Timo Krijnen) (01/14/91)
In article <50078@prls.UUCP> gordon@prls.UUCP (Gordon Vickers) writes: > > From a recent article in this group that addressed this problem > [the recently posted program 'mbase' (AKA dox) calls remove() ], > it seems that the remove() call can be replaced by unlink() . > > -Gordon Except in ABC, because this implements the removal of an entry from a list (a datastructure in ABC), e.g. to implement REMOVE x FROM list.of.x's We have come accross many other examples of names we used for our own internal routines, which later showed up in standard libraries. Just look at the list of redefines at the start of bhdrs/bobj.h. The most notorious example is "compound()" used in the parser to parse an ABC compound (like a structure in Pascal), which is in the libraries on our Sparc+'s to implement compound interest, sic. It seems you should not use any common name, since eventually you will run into some system where it is an internal:-). Groetjes, timo. -- Groetjes, Timo Krijnen CWI (Center for Math. & Comp. Science), Amsterdam timo@cwi.nl