Try to catch better errno from libxml2
Try to catch better errno from libxml2

Set errno to 0 before calling I/O functions in libxml2
If an error is returned without errno, set it to EINVAL.

It's not perfect, but it's certainly better than returning
EINVAL all the times, especially when it's a basic file
access problem or so.

This commit was SVN r3690.

shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc