www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - setErrno

reply "Matthew" <admin.hat stlsoft.dot.org> writes:
I have need to use this (thanks Martin, Nick, Regan and Walter!) to set ENOENT.
My problem is that ENOENT is not
defined.

Any ideas on how we can do this? The obvious thing is declare it for both
Windows and Linux. Naturally it'd need to be
version'd, but other than that, can anyone see any problems?
Aug 20 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Matthew" <admin.hat stlsoft.dot.org> wrote in message
news:cg64hq$vls$1 digitaldaemon.com...
 I have need to use this (thanks Martin, Nick, Regan and Walter!) to set
ENOENT. My problem is that ENOENT is not
 defined.

 Any ideas on how we can do this? The obvious thing is declare it for both
Windows and Linux. Naturally it'd need to be
 version'd, but other than that, can anyone see any problems?
Since setErrno is in std.c.stdlib, that's probably where it should go.
Aug 21 2004
parent reply "Matthew" <admin.hat stlsoft.dot.org> writes:
"Walter" <newshound digitalmars.com> wrote in message
news:cg6vko$1hil$1 digitaldaemon.com...
 "Matthew" <admin.hat stlsoft.dot.org> wrote in message
 news:cg64hq$vls$1 digitaldaemon.com...
 I have need to use this (thanks Martin, Nick, Regan and Walter!) to set
ENOENT. My problem is that ENOENT is not
 defined.

 Any ideas on how we can do this? The obvious thing is declare it for both
Windows and Linux. Naturally it'd need to be
 version'd, but other than that, can anyone see any problems?
Since setErrno is in std.c.stdlib, that's probably where it should go.
Indeed. You don't see any other issues?
Aug 21 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Matthew" <admin.hat stlsoft.dot.org> wrote in message
news:cg7022$1hre$2 digitaldaemon.com...
 "Walter" <newshound digitalmars.com> wrote in message
news:cg6vko$1hil$1 digitaldaemon.com...
 "Matthew" <admin.hat stlsoft.dot.org> wrote in message
 news:cg64hq$vls$1 digitaldaemon.com...
 I have need to use this (thanks Martin, Nick, Regan and Walter!) to
set
 ENOENT. My problem is that ENOENT is not
 defined.

 Any ideas on how we can do this? The obvious thing is declare it for
both
 Windows and Linux. Naturally it'd need to be
 version'd, but other than that, can anyone see any problems?
Since setErrno is in std.c.stdlib, that's probably where it should go.
Indeed. You don't see any other issues?
My main issue is why do you need to set errno under Win32?
Aug 21 2004
parent "Matthew" <admin.hat stlsoft.dot.org> writes:
"Walter" <newshound digitalmars.com> wrote in message
news:cg72j5$1m8p$1 digitaldaemon.com...
 "Matthew" <admin.hat stlsoft.dot.org> wrote in message
 news:cg7022$1hre$2 digitaldaemon.com...
 "Walter" <newshound digitalmars.com> wrote in message
news:cg6vko$1hil$1 digitaldaemon.com...
 "Matthew" <admin.hat stlsoft.dot.org> wrote in message
 news:cg64hq$vls$1 digitaldaemon.com...
 I have need to use this (thanks Martin, Nick, Regan and Walter!) to
set
 ENOENT. My problem is that ENOENT is not
 defined.

 Any ideas on how we can do this? The obvious thing is declare it for
both
 Windows and Linux. Naturally it'd need to be
 version'd, but other than that, can anyone see any problems?
Since setErrno is in std.c.stdlib, that's probably where it should go.
Indeed. You don't see any other issues?
My main issue is why do you need to set errno under Win32?
As it turns out, I don't any more. But I'm quite sure I will at some point.
Aug 21 2004