aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@mips.com>2012-10-29 11:41:36 -0700
committerSteve Ellcey <sellcey@mips.com>2012-10-29 11:41:36 -0700
commit4172907b3db346812189e81330d05b93e4b78fc6 (patch)
tree92e97a01e56204c4149fcb4a9ad00c041a02ef07
parent55e64efadf820d2b8c70e04b2396bbb925af1110 (diff)
parent94ce799f82a1d3b7453b1942016f91334c838b85 (diff)
downloadglibc-4172907b3db346812189e81330d05b93e4b78fc6.zip
glibc-4172907b3db346812189e81330d05b93e4b78fc6.tar.gz
glibc-4172907b3db346812189e81330d05b93e4b78fc6.tar.bz2
Merge branch 'master' of ssh://sourceware.org/git/glibc
-rw-r--r--ChangeLog10
-rw-r--r--sysdeps/mach/hurd/fdatasync.c8
-rw-r--r--sysdeps/mach/hurd/fsync.c8
-rw-r--r--sysdeps/pthread/aio_notify.c2
4 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a70fadc..d2c7cc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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].
+
2012-10-27 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/x86/bits/fcntl.h (__O_LARGEFILE)
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;
}
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