[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12316: Simplify redefinition of 'abort'.
From: |
Paul Eggert |
Subject: |
bug#12316: Simplify redefinition of 'abort'. |
Date: |
Fri, 31 Aug 2012 05:53:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 |
On 08/31/2012 04:39 AM, Eli Zaretskii wrote:
> I don't understand what you want to happen after this change on
> MS-Windows. Please explain more.
Currently, MS-Windows defines a function w32_abort that implements the
equivalent of 'abort' for MS-Windows. So .gdbinit calls w32_abort on
MS-Windows, 'abort' on POSIX platforms, and nt/inc/ms-w32.h #defines
abort to w32_abort and declares w32_abort.
Due to the change, POSIX platforms define a function
emacs_abort rather than replacing the system 'abort'.
To keep in sync with that, the MS-Windows part of the patch
renames w32_abort to emacs_abort. Hence .gdbinit
can now call emacs_abort on all platforms, without a special
case for MS-Windows, and nt/inc/ms-w32.h can remove its
special declarations of w32_abort and of 'abort'.
Also, this redefinition of 'abort' provides another
reason why conf_post.h must include <stdlib.h>, which makes
its comment about 'environ' confusing. To help remove this
confusion I modified nt/inc/unistd.h to include <stdlib.h>;
this documents the fact that on POSIX platforms unistd.h
declares 'environ', moving that documentation to the
platform-specific area which is a better location for it.