Author: aurel32 Date: 2007-10-26 18:54:40 +0000 (Fri, 26 Oct 2007) New Revision: 2598
Added: glibc-package/branches/glibc-2.7/debian/patches/any/local-linuxthreads-unwind.diff glibc-package/branches/glibc-2.7/debian/patches/any/local-o_cloexec.diff glibc-package/branches/glibc-2.7/debian/patches/any/local-stdio-lock.diff Modified: glibc-package/branches/glibc-2.7/debian/changelog glibc-package/branches/glibc-2.7/debian/patches/series Log: [ Petr Salinger] * any/local-linuxthreads-unwind.diff: provide unwind-resume routine for linuxthreads. * any/local-stdio-lock.diff: make _IO_*_lock linuxthreads compliant. * any/local-o_cloexec.diff: don't assume O_CLOEXEC is always defined. Modified: glibc-package/branches/glibc-2.7/debian/changelog =================================================================== --- glibc-package/branches/glibc-2.7/debian/changelog 2007-10-26 03:45:45 UTC (rev 2597) +++ glibc-package/branches/glibc-2.7/debian/changelog 2007-10-26 18:54:40 UTC (rev 2598) @@ -59,6 +59,12 @@ [ Aurelien Jarno ] * kfreebsd/local-sysdeps.diff: update to revision 2006 (from glibc-bsd). + [ Petr Salinger] + * any/local-linuxthreads-unwind.diff: provide unwind-resume routine for + linuxthreads. + * any/local-stdio-lock.diff: make _IO_*_lock linuxthreads compliant. + * any/local-o_cloexec.diff: don't assume O_CLOEXEC is always defined. + -- Aurelien Jarno <[EMAIL PROTECTED]> Fri, 26 Oct 2007 05:44:36 +0200 glibc (2.6.1-6) unstable; urgency=low Added: glibc-package/branches/glibc-2.7/debian/patches/any/local-linuxthreads-unwind.diff =================================================================== --- glibc-package/branches/glibc-2.7/debian/patches/any/local-linuxthreads-unwind.diff (rev 0) +++ glibc-package/branches/glibc-2.7/debian/patches/any/local-linuxthreads-unwind.diff 2007-10-26 18:54:40 UTC (rev 2598) @@ -0,0 +1,93 @@ +diff -uNr linuxthreads/sysdeps/pthread/Makefile linuxthreads/sysdeps/pthread/Makefile +--- linuxthreads/sysdeps/pthread/Makefile 2003-08-14 02:14:22.000000000 +0200 ++++ linuxthreads/sysdeps/pthread/Makefile 2007-10-24 22:44:32.000000000 +0200 +@@ -12,3 +12,16 @@ + ifeq ($(subdir),posix) + CFLAGS-confstr.c += -DLIBPTHREAD_VERSION="\"$(shell sed 's/\(.*\) by .*/\1/' ../linuxthreads/Banner)\"" + endif ++ ++ifeq ($(subdir),csu) ++routines += unwind-resume ++shared-only-routines += unwind-resume ++CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables ++endif ++ ++ifeq ($(subdir),rt) ++librt-sysdep_routines += rt-unwind-resume ++librt-shared-only-routines += rt-unwind-resume ++CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables ++endif ++ +diff -uNr linuxthreads/sysdeps/pthread/rt-unwind-resume.c linuxthreads/sysdeps/pthread/rt-unwind-resume.c +--- linuxthreads/sysdeps/pthread/rt-unwind-resume.c 1970-01-01 01:00:00.000000000 +0100 ++++ linuxthreads/sysdeps/pthread/rt-unwind-resume.c 2007-10-24 23:13:08.000000000 +0200 +@@ -0,0 +1 @@ ++#include <unwind-resume.c> +diff -uNr linuxthreads/sysdeps/pthread/unwind-resume.c linuxthreads/sysdeps/pthread/unwind-resume.c +--- linuxthreads/sysdeps/pthread/unwind-resume.c 1970-01-01 01:00:00.000000000 +0100 ++++ linuxthreads/sysdeps/pthread/unwind-resume.c 2007-10-24 22:42:17.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* Copyright (C) 2003 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Jakub Jelinek <[EMAIL PROTECTED]>. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++#include <dlfcn.h> ++#include <stdio.h> ++#include <unwind.h> ++ ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static _Unwind_Reason_Code (*libgcc_s_personality) ++ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, ++ struct _Unwind_Context *); ++ ++static void ++init (void) ++{ ++ void *resume, *personality; ++ void *handle; ++ ++ handle = __libc_dlopen ("libgcc_s.so.1"); ++ ++ if (handle == NULL ++ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL ++ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) ++ __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); ++ ++ libgcc_s_resume = resume; ++ libgcc_s_personality = personality; ++} ++ ++void ++_Unwind_Resume (struct _Unwind_Exception *exc) ++{ ++ if (__builtin_expect (libgcc_s_resume == NULL, 0)) ++ init (); ++ libgcc_s_resume (exc); ++} ++ ++_Unwind_Reason_Code ++__gcc_personality_v0 (int version, _Unwind_Action actions, ++ _Unwind_Exception_Class exception_class, ++ struct _Unwind_Exception *ue_header, ++ struct _Unwind_Context *context) ++{ ++ if (__builtin_expect (libgcc_s_personality == NULL, 0)) ++ init (); ++ return libgcc_s_personality (version, actions, exception_class, ++ ue_header, context); ++} Added: glibc-package/branches/glibc-2.7/debian/patches/any/local-o_cloexec.diff =================================================================== --- glibc-package/branches/glibc-2.7/debian/patches/any/local-o_cloexec.diff (rev 0) +++ glibc-package/branches/glibc-2.7/debian/patches/any/local-o_cloexec.diff 2007-10-26 18:54:40 UTC (rev 2598) @@ -0,0 +1,18 @@ +--- sysdeps/unix/opendir.c 2007-08-04 19:21:10.000000000 +0200 ++++ sysdeps/unix/opendir.c 2007-10-25 21:22:11.000000000 +0200 +@@ -146,6 +146,7 @@ + #ifdef __ASSUME_O_CLOEXEC + # define check_have_o_cloexec(fd) 1 + #else ++#ifdef O_CLOEXEC + static int + check_have_o_cloexec (int fd) + { +@@ -154,6 +155,7 @@ + return __have_o_cloexec > 0; + } + #endif ++#endif + + + DIR * Added: glibc-package/branches/glibc-2.7/debian/patches/any/local-stdio-lock.diff =================================================================== --- glibc-package/branches/glibc-2.7/debian/patches/any/local-stdio-lock.diff (rev 0) +++ glibc-package/branches/glibc-2.7/debian/patches/any/local-stdio-lock.diff 2007-10-26 18:54:40 UTC (rev 2598) @@ -0,0 +1,28 @@ +--- bits/stdio-lock.h 2007-10-26 10:02:04.000000000 +0200 ++++ bits/stdio-lock.h 2007-10-26 12:17:36.000000000 +0200 +@@ -47,12 +47,21 @@ + + #if defined _LIBC && !defined NOT_IN_libc + # define _IO_acquire_lock(_fp) \ +- _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp)); \ +- _IO_flockfile (_fp) ++ { \ ++ _IO_FILE *_IO_acquire_lock_file = _fp; \ ++ __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_fct, &_IO_acquire_lock_file); \ ++ _IO_flockfile (_IO_acquire_lock_file) ++ ++# define _IO_acquire_lock_clear_flags2(_fp) \ ++ { \ ++ _IO_FILE *_IO_acquire_lock_file = _fp; \ ++ __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_clear_flags2_fct, &_IO_acquire_lock_file); \ ++ _IO_flockfile (_IO_acquire_lock_file) + + # define _IO_release_lock(_fp) \ +- _IO_funlockfile (_fp); \ +- _IO_cleanup_region_end (0) ++ __libc_cleanup_region_end (1); \ ++ } ++ + #endif + + #endif /* bits/stdio-lock.h */ Modified: glibc-package/branches/glibc-2.7/debian/patches/series =================================================================== --- glibc-package/branches/glibc-2.7/debian/patches/series 2007-10-26 03:45:45 UTC (rev 2597) +++ glibc-package/branches/glibc-2.7/debian/patches/series 2007-10-26 18:54:40 UTC (rev 2598) @@ -132,14 +132,17 @@ any/local-linuxthreads-fatalprepare.diff -p0 any/local-linuxthreads-semaphore_h.diff any/local-linuxthreads-tst-sighandler.diff +any/local-linuxthreads-unwind.diff -p0 any/local-localedef-fix-trampoline.diff -p0 any/local-makeconfig.diff -p0 any/local-mktemp.diff -p0 any/local-no-pagesize.diff any/local-nss-upgrade.diff -p0 +any/local-o_cloexec.diff -p0 any/local-rtld.diff -p0 #any/local-sysctl.diff -p0 any/local-stubs_h.diff +any/local-stdio-lock.diff -p0 any/local-tcsetaddr.diff -p0 any/local-tst-mktime2.diff -p0 any/local-dynamic-resolvconf.diff -p0 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]