Re: linux plaform programming question

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
jimcbrown said...
jacques_desch said...

sorry for the bad formatting, here again

constant errno=define_c_var(libc,"errno")
? errno
3086640776
This seem a valid value but safe.e report an error each time I use peek4s(errno)
How should I access errno ?

Jacques

Does it work if you use machine.e instead of safe.e? If so, you probably can just do a register_block(errno, 4).

I do feel that it is important to point out that some versions of glibc do not define errno at all, instead to be thread-safe errno is a C preprocessor macro that ends up calling an internal function that gets a per-thread address that is used to store the errno value.

However, if the define_c_var() call gives you a valid address for the "errno" variable, then you probably do not have to worry about this.

Yes register_blok(errno,4) solved the issue.
Thanks Jim

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu