This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: Fix mmixware isatty support


Missed at the _isatty cleanup.  Manifests as thousands of
regressions running the gcc testsuites, all the same:
x/obj/mmix-knuth-mmixware/./newlib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
x/combined/newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty'

For some reason the generic(?) isatty is picked up instead of
the one in libc/sys/mmixware/isatty.c, and for some reason the
libgloss _isatty isn't picked up (to cause execution failures
instead).  I just barely dodged the urge to investigate and
instead manage to say "whatever".  Either way, this is a correct
fix.  Though I couldn't help thinking that *maybe* there could
be some kind of safety net in the build framework, checking that
all global symbols in newlib are unique.  (But if I'm to do it,
it will happen some other year.)  No regressions in the gcc
testuite, compared to before an update (of both gcc and newlib).
Committed.

newlib:
	* libc/sys/mmixware/isatty.c (_isatty): Renamed from isatty.
	Make ISO C.

Index: libc/sys/mmixware/isatty.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/mmixware/isatty.c,v
retrieving revision 1.3
diff -p -u -r1.3 isatty.c
--- libc/sys/mmixware/isatty.c	18 Nov 2001 23:47:59 -0000	1.3
+++ libc/sys/mmixware/isatty.c	25 Jan 2008 04:16:51 -0000
@@ -1,6 +1,6 @@
 /* isatty for MMIXware.

-   Copyright (C) 2001 Hans-Peter Nilsson
+   Copyright (C) 2001, 2008 Hans-Peter Nilsson

    Permission to use, copy, modify, and distribute this software is
    freely granted, provided that the above copyright notice, this notice
@@ -16,8 +16,8 @@
 #include <sys/stat.h>
 #include "sys/syscall.h"

-isatty (fd)
-     int fd;
+int
+_isatty (int fd)
 {
   return fd == 0 || fd == 1 || fd == 2;
 }

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]