Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Machine specific predefined names Message-ID: <3297@haddock.ISC.COM> Date: 2 Apr 88 02:26:08 GMT References: <1988Feb17.115402.12739@light.uucp> <17033@watmath.waterloo.edu> <242@sdrc.UUCP> <378@wsccs.UUCP> <3225@haddock.ISC.COM> <598@tuvie> <3264@haddock.ISC.COM> <5202@sdcrdcf.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 19 In article <5202@sdcrdcf.UUCP> markb@sdcrdcf.UUCP (Mark Biggar) writes: >In article <3264@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >>That isn't portable. After you've redefined something, you have no way of >>knowing whether other library routines (e.g. puts) will be using your >>putchar or the standard one. > >I thought the standard included a guarantee that if you did the above that >the libraries would still continue to use the original definition. >In fact the whole reason for the necessity of using the #undef etc. was to >allow for that guarantee. No, it's guaranteed that the libraries will not depend on NON-standard functions (e.g. you can safely use "open" without worrying that "fopen" calls a function of that name), but the names of the standard routines are reserved. (Note: "putchar" is a bad example, because it happens to work in the usual implementation. But "malloc" does not, and neither does "putc".) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint