blob: 25b0145933155353fb1719ab96ed760c1a886f39 [file] [log] [blame]
xf.libdd93d52023-05-12 07:10:14 -07001/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>.
17
18 Versioned copy of setjmp/longjmp.c modified for versioning
19 the reverted jmpbuf extension. */
20
21#include <shlib-compat.h>
22
23#if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
24/* We don't want the weak alias to longjmp, _longjmp, siglongjmp here,
25 because we create the default/versioned symbols later. */
26# define __libc_siglongjmp __libc_siglongjmp
27#endif /* SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
28
29#include <setjmp/longjmp.c>
30
31#if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
32/* In glibc release 2.19 new versions of longjmp-functions were introduced,
33 but were reverted before 2.20. Thus both versions are the same function. */
34
35strong_alias (__libc_siglongjmp, __libc_longjmp)
36libc_hidden_def (__libc_longjmp)
37
38weak_alias (__libc_siglongjmp, __v1_longjmp)
39weak_alias (__libc_siglongjmp, __v2_longjmp)
40versioned_symbol (libc, __v1_longjmp, _longjmp, GLIBC_2_0);
41compat_symbol (libc, __v2_longjmp, _longjmp, GLIBC_2_19);
42
43weak_alias (__libc_siglongjmp, __v1longjmp)
44weak_alias (__libc_siglongjmp, __v2longjmp)
45versioned_symbol (libc, __v1longjmp, longjmp, GLIBC_2_0);
46compat_symbol (libc, __v2longjmp, longjmp, GLIBC_2_19);
47
48weak_alias (__libc_siglongjmp, __v1siglongjmp)
49weak_alias (__libc_siglongjmp, __v2siglongjmp)
50versioned_symbol (libc, __v1siglongjmp, siglongjmp, GLIBC_2_0);
51compat_symbol (libc, __v2siglongjmp, siglongjmp, GLIBC_2_19);
52#endif /* SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */