[m-rev.] diff: fix segmentation fault in runtime on Mac OS X
Peter Wang
novalazy at gmail.com
Thu Jun 26 17:25:19 AEST 2014
On Thu, 26 Jun 2014 16:41:16 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
>
>
> On Thu, 26 Jun 2014, Peter Wang wrote:
>
> > On Thu, 26 Jun 2014 16:01:12 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> >>
> >> On Thu, 26 Jun 2014, Peter Wang wrote:
> >>
> >>> 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.
> >>
> >> I'm don't understand, do you mean mercury_runtime_util should define
> >> __GNU_LIBRARY__, what would that achieve?
> >
> > I mean that we can just #include <string.h> then test for
> > __GNU_LIBRARY__ afterwards.
>
> Yes.
Can you test this patch?
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Assume-standard-strerror_r-unless-using-glibc.patch
Type: text/x-diff
Size: 2246 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20140626/a48d78a7/attachment.patch>
More information about the reviews
mailing list