From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12446: port better to POSIX hosts lacking _setjmp Date: Fri, 14 Sep 2012 23:30:59 +0300 Message-ID: <83txv0tkho.fsf@gnu.org> References: <50538925.3010608@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1347654739 2089 80.91.229.3 (14 Sep 2012 20:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2012 20:32:19 +0000 (UTC) Cc: lekktu@gmail.com, 12446@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 14 22:32:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TCcYm-0005rf-KA for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 22:32:20 +0200 Original-Received: from localhost ([::1]:37290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcYi-0001lQ-MQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 16:32:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcYc-0001kn-TT for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:32:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCcYV-0001eR-PC for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:32:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcYV-0001eN-MH for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TCcZS-0003IB-Ep for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Sep 2012 20:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: lekktu@gmail.com, bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134765473512578 (code B ref -1); Fri, 14 Sep 2012 20:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2012 20:32:15 +0000 Original-Received: from localhost ([127.0.0.1]:34277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcYg-0003Go-LD for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:32:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60433) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcYd-0003Gf-W2 for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:32:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCcXc-00019Y-OM for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:31:12 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:46783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcXc-00019U-La for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:31:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcXX-0001da-14 for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCcXV-00018J-SH for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:31:02 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:41701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcXV-000183-K2 for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 16:31:01 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MAC00C00WY24G00@a-mtaout23.012.net.il> for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 23:30:59 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAC00CD0WZN0O30@a-mtaout23.012.net.il>; Fri, 14 Sep 2012 23:30:59 +0300 (IDT) In-reply-to: <50538925.3010608@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64317 Archived-At: > Date: Fri, 14 Sep 2012 12:44:37 -0700 > From: Paul Eggert > CC: Eli Zaretskii , Juanma Barranquero > > + Port better to POSIX hosts lacking _setjmp. > + * lisp.h: Include here, since we use its symbols here. > + All instances of '#include ' 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?