From 208bc8367015221e38ffaef9fccbafd68e3fff48 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Oct 2008 21:45:13 +0000 Subject: [PATCH] * misc/syslog.c (openlog_internal): Fix __have_sock_cloexec initialization. --- ChangeLog | 5 +++++ misc/syslog.c | 7 ++++--- nptl/ChangeLog | 5 +++++ nptl/sysdeps/s390/tls.h | 7 ++++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 178c921..b850b08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-22 Dmitry V. Levin + + * misc/syslog.c (openlog_internal): Fix __have_sock_cloexec + initialization. + 2008-10-17 Jakub Jelinek * elf/Makefile: Add rules to build and run tst-tls17. diff --git a/misc/syslog.c b/misc/syslog.c index 8f84faf..90cd3bf 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -358,10 +358,11 @@ openlog_internal(const char *ident, int logstat, int logfac) # ifndef __ASSUME_SOCK_CLOEXEC if (__have_sock_cloexec == 0) __have_sock_cloexec - = (LogFile != -1 - || errno != EINVAL); + = ((LogFile != -1 + || errno != EINVAL) + ? 1 : -1); } -#endif +# endif #endif #ifndef __ASSUME_SOCK_CLOEXEC # ifdef SOCK_CLOEXEC diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 24926cf..733ff03 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2008-10-06 Martin Schwidefsky + + * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline + assembly with a clobber list for access registers a0 and a1. + 2008-09-11 Martin Schwidefsky * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier diff --git a/nptl/sysdeps/s390/tls.h b/nptl/sysdeps/s390/tls.h index 3be459e..2b38ed4 100644 --- a/nptl/sysdeps/s390/tls.h +++ b/nptl/sysdeps/s390/tls.h @@ -161,7 +161,12 @@ typedef struct /* Set the stack guard field in TCB head. */ #define THREAD_SET_STACK_GUARD(value) \ - THREAD_SETMEM (THREAD_SELF, header.stack_guard, value) + do \ + { \ + __asm __volatile ("" : : : "a0", "a1"); \ + THREAD_SETMEM (THREAD_SELF, header.stack_guard, value); \ + } \ + while (0) #define THREAD_COPY_STACK_GUARD(descr) \ ((descr)->header.stack_guard \ = THREAD_GETMEM (THREAD_SELF, header.stack_guard)) -- 2.7.4