summary refs log tree commit diff
path: root/setjmp/setjmp.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-28 08:01:11 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-28 08:01:11 +0000
commit7a5affebe810c786bfc9ef17cdc4d0bc20a1302e (patch)
treed461b7135c42ab5555bddfe4a5fa4b46a1c4ca94 /setjmp/setjmp.h
parenta3f9038c879c11344430169d6daa8fad30d4f379 (diff)
downloadglibc-7a5affebe810c786bfc9ef17cdc4d0bc20a1302e.tar.gz
glibc-7a5affebe810c786bfc9ef17cdc4d0bc20a1302e.tar.xz
glibc-7a5affebe810c786bfc9ef17cdc4d0bc20a1302e.zip
Prepare headers for use in ISO C++ compliant implementations.
Diffstat (limited to 'setjmp/setjmp.h')
-rw-r--r--setjmp/setjmp.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h
index 99e3dc8cd0..f0babc047b 100644
--- a/setjmp/setjmp.h
+++ b/setjmp/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2001, 2002 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,6 +30,8 @@ __BEGIN_DECLS
 #include <bits/setjmp.h>		/* Get `__jmp_buf'.  */
 #include <bits/sigset.h>		/* Get `__sigset_t'.  */
 
+__BEGIN_NAMESPACE_STD
+
 /* Calling environment, plus possibly a saved signal mask.  */
 typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */
   {
@@ -47,16 +49,19 @@ typedef struct __jmp_buf_tag	/* C++ doesn't like tagless structs.  */
    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
+__USING_NAMESPACE_STD(__jmp_buf_tag)
 
 /* 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 +73,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 +95,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.  */