[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] Fix compilation on non-glibc machines.
From: |
Arun Sharma |
Subject: |
Re: [Libunwind-devel] Fix compilation on non-glibc machines. |
Date: |
Sun, 27 Nov 2011 19:07:44 -0800 |
On Sat, Nov 26, 2011 at 9:30 AM, Konstantin Belousov
<address@hidden> wrote:
> Trying to hide __GLIBC_PREREQ under #ifdef __GLIBC would require
> either code duplication, or moving the longjmp implementation into
> the separate file, which is included twice. In fact, I am not sure
> in any use of the __GLIBC_PREREQ at the compile time, because the
> compiled code can be run on the later version of glibc.
[..]
> --- a/src/setjmp/longjmp.c
> +++ b/src/setjmp/longjmp.c
> @@ -35,7 +35,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE. */
> #include "jmpbuf.h"
> #include "setjmp_i.h"
>
> -#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 4)
> +#
> +#if __GLIBC_PREREQ(2, 4)
[..]
> --- a/src/setjmp/siglongjmp.c
> +++ b/src/setjmp/siglongjmp.c
> @@ -35,7 +35,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE. */
> # define _NSIG (_SIG_MAXSIG - 1)
> #endif
>
> -#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 4)
> +#if defined(__GLIBC_PREREQ)
> +#if __GLIBC_PREREQ(2, 4)
Why #if defined(__GLIBC_PREREQ) in siglongjmp.c, but #if
defined(__GLIBC__) in longjmp.c?
-Arun