Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 30, 2005 SysError.msg() | ||||
---|---|---|---|---|
| ||||
Hell, brave D world, why is SysError.msg() (from std.syserror) not implemented like this? #extern (C) char* strerror(int errnum); # #... # static char[] msg(uint errcode = getErrno()) # { # char* msg = strerror(errcode); # return msg[0 .. strlen(msg)].dup; # } As far as I know, strerror() is supposed to be portable enough. -ben |
January 30, 2005 Re: SysError.msg() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Herr | Benjamin Herr wrote:
> Hell, brave D world,
Needs more o. Sorry.
|
January 30, 2005 Re: SysError.msg() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Herr | In article <ctjgvp$196f$4@digitaldaemon.com>, Benjamin Herr says... > >Benjamin Herr wrote: >> Hell, brave D world, > >Needs more o. Sorry. Actually, its more accurate the way it was. We're still Beta. - EricAnderton at yahoo |
January 31, 2005 Re: SysError.msg() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Herr Attachments: | On Sun, 30 Jan 2005 21:36:44 +0100, Benjamin Herr <ben@0x539.de> wrote:
> Hell, brave D world,
>
> why is SysError.msg() (from std.syserror) not implemented like this?
>
> #extern (C) char* strerror(int errnum);
> #
> #...
> # static char[] msg(uint errcode = getErrno())
> # {
> # char* msg = strerror(errcode);
> # return msg[0 .. strlen(msg)].dup;
> # }
>
> As far as I know, strerror() is supposed to be portable enough.
Try this one.
Regan
|
Copyright © 1999-2021 by the D Language Foundation