This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.16-ports-merge-542-g94ce799
- From: pino at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 29 Oct 2012 18:36:51 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.16-ports-merge-542-g94ce799
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 94ce799f82a1d3b7453b1942016f91334c838b85 (commit)
via 8bece75210704b1c667087f9c2b71af64a68cb53 (commit)
from d11260f86a64a634f5a3ad9939f6e8ce30442460 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94ce799f82a1d3b7453b1942016f91334c838b85
commit 94ce799f82a1d3b7453b1942016f91334c838b85
Author: Pino Toscano <toscano.pino@tiscali.it>
Date: Mon Oct 29 19:35:56 2012 +0100
Hurd: fix fdatasync/fsync if the fd does not support file_sync
Handle the case of the fd port implementing a stub (EOPNOTSUPP),
properly returning EINVAL.
diff --git a/ChangeLog b/ChangeLog
index 0cfa229..d2c7cc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-10-29 Pino Toscano <toscano.pino@tiscali.it>
+ * sysdeps/mach/hurd/fdatasync.c: Turn ERR into EINVAL if it is
+ EOPNOTSUPP.
+ * sysdeps/mach/hurd/fsync.c: Likewise.
+
* sysdeps/pthread/aio_notify.c (__aio_notify_only)
[_POSIX_REALTIME_SIGNALS]: Change condition to
[_POSIX_REALTIME_SIGNALS > 0].
diff --git a/sysdeps/mach/hurd/fdatasync.c b/sysdeps/mach/hurd/fdatasync.c
index 19d7a4a..22c1d10 100644
--- a/sysdeps/mach/hurd/fdatasync.c
+++ b/sysdeps/mach/hurd/fdatasync.c
@@ -26,6 +26,12 @@ fdatasync (int fd)
{
error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 1));
if (err)
- return __hurd_dfail (fd, err);
+ {
+ if (err == EOPNOTSUPP)
+ /* If the file descriptor does not support sync, return EINVAL
+ as POSIX specifies. */
+ err = EINVAL;
+ return __hurd_dfail (fd, err);
+ }
return 0;
}
diff --git a/sysdeps/mach/hurd/fsync.c b/sysdeps/mach/hurd/fsync.c
index a474c8a..fe3e044 100644
--- a/sysdeps/mach/hurd/fsync.c
+++ b/sysdeps/mach/hurd/fsync.c
@@ -27,6 +27,12 @@ fsync (fd)
{
error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 0));
if (err)
- return __hurd_dfail (fd, err);
+ {
+ if (err == EOPNOTSUPP)
+ /* If the file descriptor does not support sync, return EINVAL
+ as POSIX specifies. */
+ err = EINVAL;
+ return __hurd_dfail (fd, err);
+ }
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8bece75210704b1c667087f9c2b71af64a68cb53
commit 8bece75210704b1c667087f9c2b71af64a68cb53
Author: Pino Toscano <toscano.pino@tiscali.it>
Date: Mon Oct 29 19:35:09 2012 +0100
aio_notify: fix _POSIX_REALTIME_SIGNALS check
Check that _POSIX_REALTIME_SIGNALS is greater than zero to assume realtime
signals are supported, instead of any non-zero value (including -1).
diff --git a/ChangeLog b/ChangeLog
index a70fadc..0cfa229 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-29 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/pthread/aio_notify.c (__aio_notify_only)
+ [_POSIX_REALTIME_SIGNALS]: Change condition to
+ [_POSIX_REALTIME_SIGNALS > 0].
+
2012-10-27 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/x86/bits/fcntl.h (__O_LARGEFILE)
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c
index f8c4ccc..a9f0648 100644
--- a/sysdeps/pthread/aio_notify.c
+++ b/sysdeps/pthread/aio_notify.c
@@ -95,7 +95,7 @@ __aio_notify_only (struct sigevent *sigev)
else if (sigev->sigev_notify == SIGEV_SIGNAL)
{
/* We have to send a signal. */
-#if _POSIX_REALTIME_SIGNALS
+#if _POSIX_REALTIME_SIGNALS > 0
/* Note that the standard gives us the option of using a plain
non-queuing signal here when SA_SIGINFO is not set for the signal. */
# ifdef BROKEN_THREAD_SIGNALS
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
sysdeps/mach/hurd/fdatasync.c | 8 +++++++-
sysdeps/mach/hurd/fsync.c | 8 +++++++-
sysdeps/pthread/aio_notify.c | 2 +-
4 files changed, 25 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources