]> Savannah Git Hosting - gnulib.git/commit
configmake: Avoid namespace pollution issue on mingw.
authorEric Blake <eblake@redhat.com>
Thu, 8 Aug 2019 03:03:31 +0000 (22:03 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 8 Aug 2019 13:47:18 +0000 (08:47 -0500)
commitb5e7a0deb7f9a3fc7f0206e39f6b032b1051d0cd
tree92b255c35954dad0228e64075f38965d37c2a545
parentc8e2eee548e6e81f3fccd31cf9f9a825db7fc8a8
configmake: Avoid namespace pollution issue on mingw.

Mingw includes a header that declares an enum typedef named DATADIR,
pulled in when including <winsock2.h>; compilation fails if DATADIR
has already been defined as a macro expanding to a string prior to
that inclusion.  Although the configmake module documents that it
should generally be included only after system headers, it is just as
easy to make configmake.h robust to this particular issue by including
the system header first if it exists.

* modules/configmake (Makefile.am): If the project uses
<winsock2.h>, include that header before defining DATADIR.
Reported by libvirt: https://lists.gnu.org/archive/html/bug-gnulib/2019-07/msg00089.html
ChangeLog
modules/configmake