Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!mcnc!spl From: spl@mcnc.org (Steve Lamont) Newsgroups: comp.lang.c Subject: Re: problem with cc compiler Message-ID: <4935@alvin.mcnc.org> Date: 24 Jul 89 12:25:26 GMT References: <712@unsvax.NEVADA.EDU> <10589@smoke.BRL.MIL> <1185@fcs280s.ncifcrf.gov> <10594@smoke.BRL.MIL> Reply-To: spl@mcnc.org.UUCP (Steve Lamont) Organization: Microelectronics Center of NC; RTP, NC Lines: 28 In article <10594@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <1185@fcs280s.ncifcrf.gov> kml@ncifcrf.gov (Kevin Lahey) writes: >>I just don't quite see how to insure that a regular function declaration >>doesn't override a library function. Assuming that this magic system works >>(I don't doubt that it does), how can one override a library function when >>desired? > >A standard-conforming implementation is not allowed to call functions >other than those specified as being in the standard library and others >(primarily with names beginning with underscore) that are specifically >reserved for the implementation by the Standard. read() is an example >of a function that a conforming C implementation must permit applications >to use for their own purposes. Based upon this information, I have a couple of questions. Suppose that I wish to implement my own math library function, say sin() or cos(), for whatever reason, in a large pre-existing piece of code that I don't want to fiddle too much with. How would I do this, then? Also, what provision is there for overriding this stricture, if, for instance, I am assigned the task of rebuilding a standard library? Is the compiler going to refuse to let me write my own read() function then, too? -- spl Steve Lamont, sciViGuy EMail: spl@ncsc.org North Carolina Supercomputing Center Phone: (919) 248-1120 Box 12732/RTP, NC 27709