[m-rev.] diff: fix segmentation fault in runtime on Mac OS X
Peter Wang
novalazy at gmail.com
Thu Jun 26 15:55:21 AEST 2014
On Thu, 26 Jun 2014 14:43:58 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> Hi Peter,
>
> On Thu, 26 Jun 2014, Peter Wang wrote:
>
> > What a mess.
>
> Indeed. (Although not quite as bad as trying to get the Unicode version
> of the argument vector on Windows.)
>
> > Presumably all libraries other the glibc provide the standard
> > strerror_r, so the patch below should be less fragile.
>
> features.h is not a standard header, so the patch below is simply
> likely to break on systems that don't provide it (i.e. my laptop).
Ok, we shouldn't include features.h explicitly but __GNU_LIBRARY__
should be defined after including string.h where strerror_r lives.
We could also forgo strerror_r completely and just use strerror_l or
sys_errlist.
Peter
More information about the reviews
mailing list