[m-users.] Yet another piece for the posix library: strerror(3)

Volker Wysk post at volker-wysk.de
Mon Oct 28 22:06:14 AEDT 2019


Am Montag, den 28.10.2019, 19:02 +1100 schrieb Julien Fischer:
> > > > > Also, you should consider using MR_strerror() from the 
> > > > > runtime directory
> > > > > instead of strerror_r() directly.
> > > > 
> > > > What is the "runtime directory"?
> > > 
> > > The runtime directory in the Mercury source tree.
> > 
> > You mean, copy the code of MR_strerror and insert it in the posix
> > library?
> 
> I suspect what Peter mant is, include this in posix.sterror.m.
> 
>      :- pragma foreign_decl("C", "#include
> \"mercury_runtime_util.h\").
> 
> and then call MR_strerror() in your foreign_proc body instead of
> strerror_r.

I've done that. The new version of posix.strerror is attached. I've
also made it an IO action.

Bye
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: posix.strerror.m
Type: text/x-matlab
Size: 1377 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20191028/cbb27f7b/attachment.bin>


More information about the users mailing list