[m-rev.] diff: fix segmentation fault in runtime on Mac OS X
Julien Fischer
jfischer at opturion.com
Thu Jun 26 16:41:16 AEST 2014
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.
Cheers,
Julien.
More information about the reviews
mailing list