ANSI name space requirements/limitations

Roland McGrath rk9005 at cca.ucsf.edu
Thu Feb 25 16:03:15 AEST 1988


I know about most of ANSI's requirements and limitations on
the name space that can be consumed by an implementation's library.
In the GNU C library, I'm using _open, _read, etc., which will actually
exist in the GNU system to avoid linking in the nonstandard names
that would be called by standard functions (fopen, fread, etc.).

There is, however, one point I am not clear on.
With the following user program
	int main(void) { extern char *open(int); char *s = open(1); }
where the user never defines the `open' function, what should happen?
	a) The program uses the system call:
		int open(const char *name, int flags, int mode)
	b) The linker must generate an "undefined symbol" (or similar)
	error, i.e., there must be a library containing only standard
	function and underscore-prefixed ones.
	c) What else?

Whatever the answer to this, I think it should be clearly
stated in the standard.
-- 
Dick Karpinski  Manager of Unix Services, UCSF Computer Center
UUCP:  ...!ucbvax!ucsfcgl!cca.ucsf!dick        (415) 476-4529 (11-7)
BITNET:  dick at ucsfcca or dick at ucsfvm           Compuserve: 70215,1277  
USPS:  U-76 UCSF, San Francisco, CA 94143-0704   Telemail: RKarpinski   



More information about the Comp.lang.c mailing list