[git commit] setjmp.h: sync with glibc

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 15 12:00:22 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=12bfecef4c3340935ca2c107bdef06fc7da8bd95
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 include/setjmp.h |   32 ++++++++++++++++++++++----------
 1 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/include/setjmp.h b/include/setjmp.h
index 99e3dc8..fb9c078 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999,2001,2002,2007,2009 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
@@ -30,8 +30,9 @@ __BEGIN_DECLS
 #include <bits/setjmp.h>		/* Get `__jmp_buf'.  */
 #include <bits/sigset.h>		/* Get `__sigset_t'.  */
 
+
 /* Calling environment, plus possibly a saved signal mask.  */
-typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */
+struct __jmp_buf_tag
   {
     /* NOTE: The machine-dependent definitions of `__sigsetjmp'
        assume that a `jmp_buf' begins with a `__jmp_buf' and that
@@ -40,23 +41,29 @@ typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */
     __jmp_buf __jmpbuf;		/* Calling environment.  */
     int __mask_was_saved;	/* Saved the signal mask?  */
     __sigset_t __saved_mask;	/* Saved signal mask.  */
-  } jmp_buf[1];
+  };
+
+
+__BEGIN_NAMESPACE_STD
 
+typedef struct __jmp_buf_tag jmp_buf[1];
 
 /* Store the calling environment in ENV, also saving the signal mask.
    Return 0.  */
 extern int setjmp (jmp_buf __env) __THROW;
 
-/* Store the calling environment in ENV, not saving the signal mask.
-   Return 0.  */
-extern int _setjmp (jmp_buf __env) __THROW;
+__END_NAMESPACE_STD
 
 /* Store the calling environment in ENV, also saving the
    signal mask if SAVEMASK is nonzero.  Return 0.
    This is the internal name for `sigsetjmp'.  */
-extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW;
 
 #ifndef	__FAVOR_BSD
+/* Store the calling environment in ENV, not saving the signal mask.
+   Return 0.  */
+extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROW;
+
 /* Do not save the signal mask.  This is equivalent to the `_setjmp'
    BSD function.  */
 # define setjmp(env)	_setjmp (env)
@@ -68,15 +75,20 @@ extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW;
 #endif /* Favor BSD.  */
 
 
+__BEGIN_NAMESPACE_STD
+
 /* Jump to the environment saved in ENV, making the
    `setjmp' call there return VAL, or 1 if VAL is 0.  */
-extern void longjmp (jmp_buf __env, int __val)
+extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
      __THROW __attribute__ ((__noreturn__));
+
+__END_NAMESPACE_STD
+
 #if defined __USE_BSD || defined __USE_XOPEN
 /* Same.  Usually `_longjmp' is used with `_setjmp', which does not save
    the signal mask.  But it is how ENV was saved that determines whether
    `longjmp' restores the mask; `_longjmp' is just an alias.  */
-extern void _longjmp (jmp_buf __env, int __val)
+extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
      __THROW __attribute__ ((__noreturn__));
 #endif
 
@@ -85,7 +97,7 @@ extern void _longjmp (jmp_buf __env, int __val)
 /* Use the same type for `jmp_buf' and `sigjmp_buf'.
    The `__mask_was_saved' flag determines whether
    or not `longjmp' will restore the signal mask.  */
-typedef jmp_buf sigjmp_buf;
+typedef struct __jmp_buf_tag sigjmp_buf[1];
 
 /* Store the calling environment in ENV, also saving the
    signal mask if SAVEMASK is nonzero.  Return 0.  */


More information about the uClibc-cvs mailing list