This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] Remove an 'extern int errno'
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 12 Mar 2004 15:55:17 -0500
- Subject: [patch] Remove an 'extern int errno'
This is harmless, since <errno.h> was included by server.h anyway; but the
'extern int errno' declaration is incorrect and should always be removed in
favor of <errno.h>. Committed to HEAD and 6.1.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-03-12 Daniel Jacobowitz <drow@mvista.com>
* linux-low.c: Include <errno.h>. Remove extern declaration of
errno.
Index: linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.30
diff -u -p -r1.30 linux-low.c
--- linux-low.c 5 Mar 2004 03:43:19 -0000 1.30
+++ linux-low.c 12 Mar 2004 20:49:24 -0000
@@ -34,6 +34,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <errno.h>
/* ``all_threads'' is keyed by the LWP ID - it should be the thread ID instead,
however. This requires changing the ID in place when we go from !using_threads
@@ -68,8 +69,6 @@ struct pending_signals
#ifdef HAVE_LINUX_REGSETS
static int use_regsets_p = 1;
#endif
-
-extern int errno;
int debug_threads = 0;