www.digitalmars.com         C & C++   DMDScript  

D - errno

reply "Martin M. Pedersen" <mmp www.moeller-pedersen.dk> writes:
Hi,

Walter, how abort adding:

    void seterrno(int);
    int geterrno();

to c.stdlib in Phobos, or introduce c.errno.

It would introduce bad practices to access it using extern(C) in regular D
code.


Regards,
Martin M. Pedersen
Jun 14 2002
parent reply "Walter" <walter digitalmars.com> writes:
That's a good idea, since D won't support the ugly C errno macro.

"Martin M. Pedersen" <mmp www.moeller-pedersen.dk> wrote in message
news:aed9pj$c0v$1 digitaldaemon.com...
 Hi,

 Walter, how abort adding:

     void seterrno(int);
     int geterrno();

 to c.stdlib in Phobos, or introduce c.errno.

 It would introduce bad practices to access it using extern(C) in regular D
 code.


 Regards,
 Martin M. Pedersen

Jun 14 2002
parent reply "Matthew Wilson" <dmd synesis.com.au> writes:
Will the value be thread-local?

"Walter" <walter digitalmars.com> wrote in message
news:aedecc$gn8$2 digitaldaemon.com...
 That's a good idea, since D won't support the ugly C errno macro.

 "Martin M. Pedersen" <mmp www.moeller-pedersen.dk> wrote in message
 news:aed9pj$c0v$1 digitaldaemon.com...
 Hi,

 Walter, how abort adding:

     void seterrno(int);
     int geterrno();

 to c.stdlib in Phobos, or introduce c.errno.

 It would introduce bad practices to access it using extern(C) in regular


 code.


 Regards,
 Martin M. Pedersen


Jun 14 2002
parent reply "Walter" <walter digitalmars.com> writes:
It would just provide an interface to the thread local C errno.

"Matthew Wilson" <dmd synesis.com.au> wrote in message
news:aee3ho$15gg$1 digitaldaemon.com...
 Will the value be thread-local?

 "Walter" <walter digitalmars.com> wrote in message
 news:aedecc$gn8$2 digitaldaemon.com...
 That's a good idea, since D won't support the ugly C errno macro.

 "Martin M. Pedersen" <mmp www.moeller-pedersen.dk> wrote in message
 news:aed9pj$c0v$1 digitaldaemon.com...
 Hi,

 Walter, how abort adding:

     void seterrno(int);
     int geterrno();

 to c.stdlib in Phobos, or introduce c.errno.

 It would introduce bad practices to access it using extern(C) in



 D
 code.


 Regards,
 Martin M. Pedersen



Jun 15 2002
parent reply "Matthew Wilson" <dmd synesis.com.au> writes:
Cool.

btw, can I ask what the state of play with threads & D is?

"Walter" <walter digitalmars.com> wrote in message
news:aeg2in$df2$3 digitaldaemon.com...
 It would just provide an interface to the thread local C errno.

 "Matthew Wilson" <dmd synesis.com.au> wrote in message
 news:aee3ho$15gg$1 digitaldaemon.com...
 Will the value be thread-local?

 "Walter" <walter digitalmars.com> wrote in message
 news:aedecc$gn8$2 digitaldaemon.com...
 That's a good idea, since D won't support the ugly C errno macro.

 "Martin M. Pedersen" <mmp www.moeller-pedersen.dk> wrote in message
 news:aed9pj$c0v$1 digitaldaemon.com...
 Hi,

 Walter, how abort adding:

     void seterrno(int);
     int geterrno();

 to c.stdlib in Phobos, or introduce c.errno.

 It would introduce bad practices to access it using extern(C) in



 D
 code.


 Regards,
 Martin M. Pedersen




Jun 15 2002
parent Pavel Minayev <evilone omen.ru> writes:
On Sun, 16 Jun 2002 09:24:40 +1000 "Matthew Wilson" <dmd synesis.com.au> wrote:

 Cool.
 
 btw, can I ask what the state of play with threads & D is?

See class Thread in thread.d of Phobos. Also synchronized-blocks help a lot.
Jun 16 2002