Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!ucsfcgl!cca.ucsf.edu!rk9005 From: rk9005@cca.ucsf.edu (Roland McGrath) Newsgroups: comp.lang.c Subject: ANSI name space requirements/limitations Message-ID: <1156@ucsfcca.ucsf.edu> Date: 25 Feb 88 06:03:15 GMT Reply-To: roland@rtsg.lbl.gov (Roland McGrath) Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 24 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@ucsfcca or dick@ucsfvm Compuserve: 70215,1277 USPS: U-76 UCSF, San Francisco, CA 94143-0704 Telemail: RKarpinski