Fix documented parameters to execle.
[glibc.git] / sysdeps / powerpc / novmx-longjmp.c
blob61e2b2b5c5f19d49d42fc3a62bc37582b70a5be0
1 /* Copyright (C) 1991,92,94,95,97,98,2000,2002,2003,2004
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 /* Copy of sysdeps/generic/longjmp.c modified for backward compatibility
20 with old non AltiVec/VMX longjmp. */
22 #include <bits/wordsize.h>
23 #include <shlib-compat.h>
24 #if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
25 # include <stddef.h>
26 # include <novmxsetjmp.h>
27 # include <signal.h>
30 /* Set the signal mask to the one specified in ENV, and jump
31 to the position specified in ENV, causing the setjmp
32 call there to return VAL, or 1 if VAL is 0. */
33 void
34 __novmx__libc_siglongjmp (__novmx__sigjmp_buf env, int val)
36 /* Perform any cleanups needed by the frames being unwound. */
37 _longjmp_unwind (env, val);
39 if (env[0].__mask_was_saved)
40 /* Restore the saved signal mask. */
41 (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask,
42 (sigset_t *) NULL);
44 /* Call the machine-dependent function to restore machine state. */
45 __novmx__longjmp (env[0].__jmpbuf, val ?: 1);
48 strong_alias (__novmx__libc_siglongjmp, __novmx__libc_longjmp)
49 libc_hidden_def (__novmx__libc_longjmp)
50 weak_alias (__novmx__libc_siglongjmp, __novmx_longjmp)
51 weak_alias (__novmx__libc_siglongjmp, __novmxlongjmp)
52 weak_alias (__novmx__libc_siglongjmp, __novmxsiglongjmp)
54 # if __WORDSIZE == 64
55 symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.3);
56 symbol_version (__novmxlongjmp,longjmp,GLIBC_2.3);
57 symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.3);
58 # else
59 symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.0);
60 symbol_version (__novmxlongjmp,longjmp,GLIBC_2.0);
61 symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.0);
62 # endif
63 #endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)) */