This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi: Here is a patch fixing the winsock include problem which appeared after the recent winsock header work in mingw-w64-headers. Problem is this: GDB does windows.h and winsock2.h includes in its own headers and then it includes them in its sources in an arbitrary order. If winsock2.h or a header including winsock2.h (such as gdb_select.h) is included after windows.h or a header including windows.h (such as serial.h), then conflicting definitions occur and they result in error, because windows.h already includes winsock.h and including winsock2.h after that is an error. The patch fixes that in a quick and dirty way mostly by tweaking the include order. Tested by compiling gdb for x86_64-w64-mingw32, i686-w64-mingw32 and x86_64-pc-linux-gnu. Please consider for applying. -- Ozkan PS: A possibly better solution is defining WIN32_LEAN_AND_MEAN before including windows.h and then manually including the necessary additional headers in the sources, but that may require some more work.
Attachment:
winsock_includes.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |