aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-04-20 04:31:12 +0000
committerUlrich Drepper <drepper@redhat.com>2004-04-20 04:31:12 +0000
commitbfa2612286e765dc52b510fdb753a238f0a1126d (patch)
treedf808248e992d939d520271421a71f4f974eb95f
parentd3b520289178bbe9c252c0a2784a529b89951945 (diff)
downloadglibc-bfa2612286e765dc52b510fdb753a238f0a1126d.tar
glibc-bfa2612286e765dc52b510fdb753a238f0a1126d.tar.gz
glibc-bfa2612286e765dc52b510fdb753a238f0a1126d.tar.bz2
glibc-bfa2612286e765dc52b510fdb753a238f0a1126d.zip
Update.
2004-04-19 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more compact code.
-rw-r--r--ChangeLog5
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--nptl/ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/mq_unlink.c13
4 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 504cbbe5f3..1f2744df7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-19 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more
+ compact code.
+
2004-04-20 Jakub Jelinek <jakub@redhat.com>
* stdio-common/vfscanf.c (_IO_vfscanf): When skipping whitespace,
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 1b0f473a1d..998af79630 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
+ for librt. Save the return value to a safe register.
+ (CDISABLE): Define for librt. Set the function argument correctly.
+
2004-04-18 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 501791c661..3dc83fcf43 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-19 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more
+ compact code.
+
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
diff --git a/sysdeps/unix/sysv/linux/mq_unlink.c b/sysdeps/unix/sysv/linux/mq_unlink.c
index 4344c5d0ef..8d87ffadf4 100644
--- a/sysdeps/unix/sysv/linux/mq_unlink.c
+++ b/sysdeps/unix/sysv/linux/mq_unlink.c
@@ -32,12 +32,19 @@ mq_unlink (const char *name)
return -1;
}
- int ret = INLINE_SYSCALL (mq_unlink, 1, name + 1);
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (mq_unlink, err, 1, name + 1);
/* While unlink can return either EPERM or EACCES, mq_unlink should
return just EACCES. */
- if (ret < 0 && errno == EPERM)
- __set_errno (EACCES);
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
+ {
+ ret = INTERNAL_SYSCALL_ERRNO (ret, err);
+ if (ret == EPERM)
+ ret = EACCES;
+ __set_errno (ret);
+ ret = -1;
+ }
return ret;
}