From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Terbeck Newsgroups: gmane.lisp.guile.devel Subject: EXIT_SUCCESS and EXIT_FAILURE in scheme land Date: Sat, 06 Sep 2014 18:16:15 +0200 Message-ID: <87a96c67xs.fsf@ft.bewatermyfriend.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1410020397 643 80.91.229.3 (6 Sep 2014 16:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 16:19:57 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Sep 06 18:19:48 2014 Return-path: Envelope-to: guile-devel@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 1XQIiH-0002iF-Qr for guile-devel@m.gmane.org; Sat, 06 Sep 2014 18:19:45 +0200 Original-Received: from localhost ([::1]:35708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQIiH-0005a4-DF for guile-devel@m.gmane.org; Sat, 06 Sep 2014 12:19:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQIi8-0005Yn-9P for guile-devel@gnu.org; Sat, 06 Sep 2014 12:19:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQIi2-0000WT-1F for guile-devel@gnu.org; Sat, 06 Sep 2014 12:19:36 -0400 Original-Received: from smtprelay05.ispgateway.de ([80.67.31.99]:58292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQIi1-0000WE-Qo for guile-devel@gnu.org; Sat, 06 Sep 2014 12:19:29 -0400 Original-Received: from [46.183.96.49] (helo=jim.voodoo.lan) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1XQIi0-00010y-5D for guile-devel@gnu.org; Sat, 06 Sep 2014 18:19:28 +0200 Original-Received: by jim.voodoo.lan (Postfix, from userid 1000) id 58DFF97692; Sat, 6 Sep 2014 18:16:15 +0200 (CEST) User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.93 (gnu/linux) X-Df-Sender: NDMwNDQ0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.67.31.99 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17420 Archived-At: Hello guile developers, I personally don't know any OS that doesn't use EXIT_SUCCESS :=3D 1, but nevertheless I think it's useful to have EXIT_SUCCESS and _FAILURE available in scheme land. They are from stdlib.h, so I suppose adding them to =E2=80=98libguile/posix.c=E2=80=99 makes sense. The patch below see= ms to do the trick for me. Would something like this be welcome? Regards, Frank >From 9d9a4f0f4e5789950b7007c08b15c06b79dd332c Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Fri, 5 Sep 2014 00:31:04 +0200 Subject: [PATCH] Make EXIT_SUCCESS and _FAILURE available in scheme land Signed-off-by: Frank Terbeck --- libguile/posix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libguile/posix.c b/libguile/posix.c index 7fc6903..2654716 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -2247,6 +2247,12 @@ void scm_init_posix () { scm_add_feature ("posix"); +#ifdef EXIT_SUCCESS + scm_c_define ("EXIT_SUCCESS", scm_from_int (EXIT_SUCCESS)); +#endif +#ifdef EXIT_FAILURE + scm_c_define ("EXIT_FAILURE", scm_from_int (EXIT_FAILURE)); +#endif #ifdef HAVE_GETEUID scm_add_feature ("EIDs"); #endif --=20 2.1.0.60.g85f0837