Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Machine specific predefined names Message-ID: <7313@brl-smoke.ARPA> Date: 22 Feb 88 11:19:38 GMT References: <1988Feb17.115402.12739@light.uucp> <1988Feb21.015424.20436@utzoo.uucp> <17033@watmath.waterloo.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 In article <17033@watmath.waterloo.edu> rbutterworth@watmath.waterloo.edu (Ray Butterworth) writes: > #include > #include > int putchar(int n) { abort(n); } > main() { perror("xx"); } >Now if perror() needs putchar() to write the message, will it use >my version of putchar or an internal version, say _putchar()? This wasn't a good example; putchar is a macro. Even if you #undef it, perror will not call a putchar function since it used the macro. Assuming you change this to an example using strcmp(), for example, then the answer is that your application does not conform to the standard because it defines an external name that is reserved for the implementation. DISCLAIMER: The above is my own personal interpretation of things.