[Patch][BZ 14583] Fix prototype of sigsetjmp in pthread.h

Jeff Law law@redhat.com
Fri Sep 14 17:54:00 GMT 2012


On 09/14/2012 11:37 AM, Roland McGrath wrote:
> The declaration is necessary there because the pthread_cleanup_push macro
> uses the function.  <pthread.h> is not allowed to include <setjmp.h>, hence
> the duplication.
OK.


> You should make the prototype match exactly, i.e. [1] vs *.
> It might be nice to avoid the duplication by having a common bits/ header
> that holds that declaration.  But it seems like overkill for the single
> declaration (which is really all pthread.h needs).
Updated patch attached.  Only change was to make the prototypes match 
exactly per your request.

Thanks,
jeff
-------------- next part --------------
2012-09-14  Jeff Law  <law@redhat.com>

	[BZ #14583]
	* sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.

diff --git a/NEWS b/NEWS
index d27de18..c0ef036 100644
--- a/NEWS
+++ b/NEWS
@@ -13,7 +13,7 @@ Version 2.17
   13542, 13717, 13696, 13939, 13966, 14042, 14090, 14166, 14150, 14151,
   14154, 14157, 14166, 14173, 14195, 14237, 14252, 14283, 14298, 14303,
   14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459, 14476, 14505,
-  14510, 14516, 14518, 14519, 14532, 14538, 14544, 14545, 14576,
+  14510, 14516, 14518, 14519, 14532, 14538, 14544, 14545, 14576, 14583
 
 * Support for STT_GNU_IFUNC symbols added for s390 and s390x.
   Optimized versions of memcpy, memset, and memcmp added for System z10 and
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 246c1a0..1af7f3b 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -731,7 +731,7 @@ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
 
 /* Function used in the macros.  */
 struct __jmp_buf_tag;
-extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
 
 
 /* Mutex handling.  */


More information about the Libc-alpha mailing list