guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with <setjmp.h> and libguile/__scm.h on HP-UX/IA64


From: Albert Chin
Subject: Problems with <setjmp.h> and libguile/__scm.h on HP-UX/IA64
Date: Wed, 25 Mar 2009 17:10:30 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

libguile/__scm.h has:
#  if defined (__ia64__)
/* For IA64, emulate the setjmp API using getcontext. */
#   include <signal.h>
#   include <ucontext.h>
    typedef struct {
      ucontext_t ctx;
      int fresh;
    } jmp_buf;
#   define setjmp(JB)                                   \
      ( (JB).fresh = 1,                                 \
        getcontext (&((JB).ctx)),                       \
        ((JB).fresh ? ((JB).fresh = 0, 0) : 1) )
#   define longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
    void scm_ia64_longjmp (jmp_buf *, int);

But, on HP-UX/IA64, <setjmp.h> has a conflicting declaration of jmp_buf.
So, on this platform, how do you use <setjmp.h> and libguile/__scm.h?
Autogen-5.9.7 fails to compile on this platform because of this:
  cc -AC99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../autoopts
  -I/opt/TWWfsw/libxml26/include/libxml2 -I/opt/TWWfsw/guile18/include
  -I/opt/TWWfsw/libgmp42/include  -D_REENTRANT -D_REENTRANT -mt -z +O1
  +Ofltacc +Olit=all +Oentrysched +Odataprefetch -c -o autogen-ag.o `test
  -f 'ag.c' || echo './'`ag.c
  "/opt/TWWfsw/guile18/include/libguile/__scm.h", line 412: error #2256: invalid
          redeclaration of type name "jmp_buf" (declared at line 22 of
          "/usr/include/setjmp.h")
      } jmp_buf;
        ^

  1 error detected in the compilation of "ag.c".
  gmake[3]: *** [autogen-ag.o] Error 2
  gmake[3]: Leaving directory `/opt/build/autogen-5.9.7/agen5'

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]