Commit
fed58d83 was a hack to fix a mingw build failure due to header
inclusion order resulting in a clash over the use of DATADIR,
repeating a trick made several other times in the past. Better is to
revert that, and instead use pragmas to avoid the clash in the first
place, regardless of header ordering, solving it for everyone.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
#include <config.h>
-#include <unistd.h>
-
#include "configmake.h"
#include "internal.h"
#include "virbitmap.h"
# ifdef VIR_ATOMIC_OPS_WIN32
+# pragma push_macro("DATADIR") /* If "configmake.h" was included first */
+# undef DATADIR
# include <winsock2.h>
+# pragma pop_macro("DATADIR")
# include <windows.h>
# include <intrin.h>
# if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64)