OS X patch for run_erl.c

Sean Hinde sean.hinde@REDACTED
Sat Sep 20 00:46:54 CEST 2003


On Monday, September 15, 2003, at 09:07  am, Bengt Kleberg wrote:

> Sean Hinde wrote:
>> Hi,
>> The following patch to run_erl.c is required for Erlang to run in 
>> embedded mode under OS X. Without this patch run_erl fails to create 
>> the
>
> ...deleted
>> +#ifdef HAVE_MACH_O_DYLD_H
>> +  if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
>> +#else
>> +    if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
>> +#endif
>
> perhaps mkfifo() is deprecated (or something even worse :-), but would 
> it not have been better to test like this:
>
> #ifdef HAVE_MKFIFO
> 	if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
> #else
> 	if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
> #endif
>

No doubt. I leave it to the real maintainers of Erlang to take care of 
elegance in the build process. All this difficult cross platform C 
stuff is light years from anything I claim competence in, beyond the 
annoying necessity to occasionally waste many hours making Erlang work 
on my favourite laptop :)

Sean




More information about the erlang-questions mailing list