On 2010 Dec 2, at 7:34 PM, blstuart at
bellsouth.net wrote:
You're not
stumped, that was exactly the problem. The linker decided
to
prioritise the Unix system call over the user's routine, without
complaint or advisory. In the larger context of all the surrounding
code, all us experts who just as a matter of unconscious habit avoided
naming routines like that, didn't see the problem.
I thought that was broken behavior. Isn't it defined behavior that
the standard libraries are linked after any objects specified in the
ld command? And code isn't used from a library if the symbol already
has a definition from an earlier object file. In fact, I've used that
property more than once to override a function in a library.
I'd agree that's the common expectation, defined behaviour is another
matter.
To my recollection, such linking and naming issues are not specified in
the C language, or at least were not back then.