Re: [AD] allegro_errno

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2008-08-24, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> allegro_errno is used quite a bit for the file functions but it isn't
> being set on OS X. (it's a pointer to int, initial value NULL) Where
> should it be set now?

Firstly, it needs to be thread local.

The only reason Allegro 4 didn't use `errno' is probably because of
funny Windows issues:

    The `errno_ptr' and `atexit_ptr' parameters should point to the
    errno variable and atexit function from your libc:  these  are
    required because  when Allegro is linked as a DLL, it doesn't have
    direct access to your local libc data.

I suggest we add an errno field to the thread_local_state and functions
to get/set it.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/