This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
PATCH: Build under GLIBC 2.8
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: archer at sourceware dot org
- Date: Fri, 12 Dec 2008 18:10:14 -0800
- Subject: PATCH: Build under GLIBC 2.8
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=ZhQcPE839GvJBTnTz/k0eZ6OGaa2NaWIPJERiauNJrE=; b=KEx2r5ZAjI+I9Hbeu1QmUlcBLgTmQ+Orugz67VjRKtmkM//xRWomIGSDraXzKxwrLh ztF4k9SxxPJqOT+sDSfukbRyxz9Omsz4Errb9V+Gjeiadm8hRjvdBaV+MuyJ/3x3KGWF KEq6S4jeMJ+gnvvBQmVkVAnJv2vB/kysk4QEU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=kQOdv+ErnP8uCXjHX+AiZDha7KIuSGfB5tqqugcwfBycBVbLifRIAl33AYcAUF5hvB ov6O1bT2iyxz6JhzRfy55oSodyDFjYDtiNAdiAJEr1eB24qhEYqneSiAp/lPR/tEm1hQ GR6cWnOnx4BPOmn1mWPEMCThBT9tlKFS9jGA4=
As I said recently on gdb-patches, Ubuntu Intrepid Ibex adds the
warn_unused_result attribute to many functions. This patch, along
with those I posted there, allows archer to build on such systems.
From 528ea76f14ff154f0d869c5d6bd4a60085d747a8 Mon Sep 17 00:00:00 2001
From: Jim Blandy <jimb@red-bean.com>
Date: Fri, 12 Dec 2008 18:06:59 -0800
Subject: [PATCH] gdb
Check return values of functions declared with warn_unused_result
attribute in GLIBC 2.8.
* python/python.c (gdbpy_post_event): Check return value from write.
---
gdb/ChangeLog | 4 ++++
gdb/python/python.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 93ec67b..0975415 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,10 @@
Check return values of functions declared with warn_unused_result
attribute in GLIBC 2.8.
+ * python/python.c (gdbpy_post_event): Check return value from write.
+
+ Check return values of functions declared with warn_unused_result
+ attribute in GLIBC 2.8.
* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
* inflow.c (check_syscall): New function.
(new_tty): Use check_syscall to check return values from open and dup.
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 1432e5e..fd5cded 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -505,7 +505,8 @@ gdbpy_post_event (PyObject *self, PyObject *args)
if (wakeup)
{
char c = 'q'; /* Anything. */
- write (gdbpy_event_fds[1], &c, 1);
+ if (write (gdbpy_event_fds[1], &c, 1) != 1)
+ return PyErr_SetFromErrno (PyExc_IOError);
}
Py_RETURN_NONE;
--
1.5.6.3