Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.sources.d Subject: Re: help with pathalias V9 Message-ID: <31893@sun.uucp> Date: Sat, 24-Oct-87 03:21:58 EST Article-I.D.: sun.31893 Posted: Sat Oct 24 03:21:58 1987 Date-Received: Sun, 25-Oct-87 23:43:59 EST References: <116@magic4.UUCP> Sender: news@sun.uucp Lines: 17 Keywords: ld error I'm not a C programmer > I am getting an error in the linking stage when 'make'ing pathalias. It > comes back with a symbol undefined 'index' in addlink.o. Is 'index' a > BSD system call. If so, what is the SysV equivalent? It's not a "system call" in the sense that it calls the kernel, but it is a routine in the C library. It actually predates BSD; AT&T changed the name of this routine from "index" to "strchr" at one point, so "strchr" is the (exact) equivalent. (Similarly, "rindex" was renamed to "strrchr".) I'm somewhat surprised that this occurred; programs as widely distributed and used "pathalias" often have #ifdefs or some trick such as that to ensure that "index" and "rindex" get aliased to "strchr" and "strrchr", or vice versa, when building on systems with the name not used in the code. You might want to make sure you're building it correctly.... Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com