portability

Scott Wilson swilson%thetone at Sun.COM
Fri Jan 20 05:28:35 AEST 1989


In article <9419 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>One hopes that MicroSoft will provide alternative names within the
>name space reserved for implementations (e.g. "__pascal") for these
>extensions, in which case those names would not need to be disabled

Excuse my ignorance but the radio's turned up too loud.  What happens
to the names of routines used to implement standard library functions?
Don't these pollute the name space?  Are implementations required to
work around this?  For example can a pANS program with a routine
called write() reliably be compiled and run on a UNIX system without
causing printf (really _flsbuf) to call the user's routine and botching
everything?  Does _flsbuf need to be rewritten to call __write() or
something similar where __write is implemented as:

	__write(d, buf, nbytes)
		int d;
		char *buf;
		int nbytes;
	{
		syscall(SYS_write, d, buf, nbytes);
	}

to avoid getting the symbol "write".  Of course, we're left with
syscall polluting the name space.


--
Scott Wilson		arpa: swilson at sun.com
Sun Microsystems	uucp: ...!sun!swilson
Mt. View, CA



More information about the Comp.lang.c mailing list