On Fri, Jan 18, 2019 at 09:08:27AM -0600, Eric Blake wrote:
>> errno is often implemented as a dereference of a function
call in order
>> to get thread-safe semantics; for example, your patch produces
>> '&(*__errno_location())' on glibc. That should be okay (especially
>> since it silenced the warning).
Come to think of it, I got mixed up about your point. This isn't a
problem because __errno_location() returns a pointer to an integer
which is then dereferenced, so the fact there is a function is
irrelevant.
Thanks for the other analysis about available variables.
I'll stick to errno.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html