From 4e5360f74973e4d77b3a766a0ab4ac4e378421c4 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Dec 2003 15:27:46 +0000 Subject: #ifdef'd out errno declarations; incompatible with recent glibc. [Bug 852369] --- ChangeLog | 6 ++++++ tools/man2tcl.c | 9 ++++++++- unix/tclUnixPort.h | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7afbb8b..de699a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-09 Donal K. Fellows + + * unix/tclUnixPort.h: #ifdef'd out declarations of errno which + * tools/man2tcl.c: are known to cause problems with recent + glibc. [Bug 852369] + 2003-12-09 Vince Darley * win/tclWinFile.c: fix to NT file permissions code [Bug 855923] diff --git a/tools/man2tcl.c b/tools/man2tcl.c index f7e5356..a5c71cb 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.7 2002/05/08 23:48:13 davygrvy Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.8 2003/12/09 15:27:47 dkf Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -32,7 +32,14 @@ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; * Imported things that aren't defined in header files: */ +/* + * Some define errno to be something complex and + * thread-aware; in that case we definitely do not want to declare + * errno ourselves! + */ +#ifndef errno extern int errno; +#endif /* * Current line number, used for error messages. diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index bfeb161..3dfd708 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.31 2003/11/14 23:21:02 dkf Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.32 2003/12/09 15:27:48 dkf Exp $ */ #ifndef _TCLUNIXPORT @@ -464,7 +464,9 @@ EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp, * isn't generally declared in a header file anywhere. */ +#ifdef NO_ERRNO extern int errno; +#endif /* NO_ERRNO */ /* * Not all systems declare all the errors that Tcl uses! Provide some -- cgit v0.12