Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!brl-adm!seismo!mcvax!ukc!reading!onion!minster!martin From: martin@minster.UUCP Newsgroups: comp.os.minix Subject: Bug in [f]scanf (&cc/asld) - important Message-ID: <543630868.5278@minster.UUCP> Date: Tue, 24-Mar-87 19:34:28 EST Article-I.D.: minster.543630868.5278 Posted: Tue Mar 24 19:34:28 1987 Date-Received: Sat, 28-Mar-87 17:18:22 EST Organization: Department of Computer Science, University of York, England Lines: 25 I've just spent all evening trying to work out why my program broke, I eventually found that scanf.c contains a static function called 'index', which is incompatible with index(3). This normally wouldn't matter, but unfortunately cc/asld don't implement statics, but instead make them extern (this is at the top of my wished-fixed list!). This means that any program which uses both scanf(3), and index(3) will have a broken index, or will fail at link time with multiple definitions for index. A temporary fix is to recompile scanf.c, changing index to scnindex, or some other string that isn't likely to match a user function. Hope this saves you all the anguish I went through! Martin usenet: mcvax!ukc!minster!martin surface: Martin C. Atkins Department of Computer Science University of York Heslington York Y01 5DD ENGLAND