From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: lekktu@gmail.com, 12446@debbugs.gnu.org
Subject: bug#12446: port better to POSIX hosts lacking _setjmp
Date: Fri, 14 Sep 2012 23:30:59 +0300 [thread overview]
Message-ID: <83txv0tkho.fsf@gnu.org> (raw)
In-Reply-To: <50538925.3010608@cs.ucla.edu>
> Date: Fri, 14 Sep 2012 12:44:37 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: Eli Zaretskii <eliz@gnu.org>, Juanma Barranquero <lekktu@gmail.com>
>
> + Port better to POSIX hosts lacking _setjmp.
> + * lisp.h: Include <setjmp.h> here, since we use its symbols here.
> + All instances of '#include <setjmp.h>' removed, if the
> + only reason for the instance was because "lisp.h" was included.
> + (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
> + Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
> + and _longjmp with the new symbols. This ports better to POSIX hosts
> + that have sigsetjmp but not _setjmp, such as some versions of
> + Solaris and Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
> + * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
> + (png_load_body) [HAVE_PNG]:
> + (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
> + (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
> + Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
> + since PNG requires jmp_buf. This is the only exception to the
> + general rule that we now use sys_setjmp and sys_longjmp.
> + This exception is OK since this code does not change the signal
> + mask or longjmp out of a signal handler.
I don't understand the rationale. Why not simply switch to using
ANSI- and Posix-standard setjmp/longjmp? You are not using the
signal-mask preserving feature of sigsetjmp, so what's the point of
using it in preference to setjmp?
next prev parent reply other threads:[~2012-09-14 20:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 19:44 bug#12446: port better to POSIX hosts lacking _setjmp Paul Eggert
2012-09-14 20:30 ` Eli Zaretskii [this message]
2012-09-14 21:28 ` Paul Eggert
2012-09-15 7:10 ` Paul Eggert
2012-09-15 8:08 ` Eli Zaretskii
2012-09-15 8:46 ` Paul Eggert
2012-09-15 9:41 ` Eli Zaretskii
2012-09-15 10:06 ` Paul Eggert
2012-09-15 7:12 ` Eli Zaretskii
2012-09-15 7:50 ` Paul Eggert
2012-09-15 8:28 ` Eli Zaretskii
2012-09-15 8:55 ` Paul Eggert
2012-09-15 9:44 ` Eli Zaretskii
2012-09-15 10:00 ` Paul Eggert
2012-09-15 10:27 ` Eli Zaretskii
2012-09-15 20:26 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83txv0tkho.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=12446@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.