emacs-devel
[Top][All Lists]
Advanced

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

Re: Anyone building Emacs trunk with MinGW w64 (32 bits)


From: Eli Zaretskii
Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits)
Date: Tue, 26 Mar 2013 20:57:54 +0200

> From: address@hidden
> Date: Wed, 27 Mar 2013 03:13:02 +0900
> 
> eval.c: In function 'internal_catch':
> eval.c:963:3: error: too few arguments to function '_setjmp'
> c:\usr\local\strawberry-perl-5.16.3.1-32bit-portable\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/setjmp.h:164:63:
>  note: declared here
> eval.c: In function 'internal_lisp_condition_case':
> eval.c:1126:3: error: too few arguments to function '_setjmp'
> c:\usr\local\strawberry-perl-5.16.3.1-32bit-portable\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/setjmp.h:164:63:
>  note: declared here

Thanks.  I'm probably missing something here, please help me see what
is it.  lisp.h says this:

  #ifdef HAVE__SETJMP
  typedef jmp_buf sys_jmp_buf;
  # define sys_setjmp(j) _setjmp (j)
  # define sys_longjmp(j, v) _longjmp (j, v)
  #elif defined HAVE_SIGSETJMP
  typedef sigjmp_buf sys_jmp_buf;
  # define sys_setjmp(j) sigsetjmp (j, 0)
  # define sys_longjmp(j, v) siglongjmp (j, v)
  #else
  /* A platform that uses neither _longjmp nor siglongjmp; assume
     longjmp does not affect the sigmask.  */
  typedef jmp_buf sys_jmp_buf;
  # define sys_setjmp(j) setjmp (j)
  # define sys_longjmp(j, v) longjmp (j, v)
  #endif

The latest trunk avoids defining HAVE__SETJMP for MinGW64, in
nt/config.nt (did you remember to run configure.bat?):

  /* Define to 1 if _setjmp and _longjmp work.  MinGW64 uses a
     2-argument _setjmp, and setjmp is a macro defined to supply the 2nd
     arg correctly, so don't use _setjmp directly in that case.  */
  #ifndef _W64
  #define HAVE__SETJMP 1
  #endif

And HAVE_SIGSETJMP is not defined in the MinGW build.  So the above
snippet from lisp.h should have define sys_setjmp as a call to setjmp,
not to _setjmp.  And setjmp is defined as follows on MinGW64's
setjmp.h header file:

  #define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))

So why isn't this working? why eval.c somehow calls _setjmp with only
1 argument?

I also don't understand these 2 warnings:

  editfns.c: In function 'format_time_string':
  editfns.c:1793:32: warning: pointer/integer type mismatch in conditional 
expression [enabled by default]
  editfns.c: In function 'Fdecode_time':
  editfns.c:1844:16: warning: assignment makes pointer from integer without a 
cast [enabled by default]
  editfns.c: In function 'Fcurrent_time_string':
  editfns.c:2011:6: warning: assignment makes pointer from integer without a 
cast [enabled by default]

This sounds like the prototypes of gmtime and/or localtime are not
visible to the compiler at this point.  But how can that happen, when
ms-w32.h, included by config.h, includes time.h which declares these 2
functions?



reply via email to

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