[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unistd.h -vs- winnt.h
From: |
Tom Tromey |
Subject: |
unistd.h -vs- winnt.h |
Date: |
Tue, 19 Nov 2013 15:02:11 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
I tried to use gnulib more in gdb, but ran into issues with the mingw
port.
In particular one part of gdb uses gethostname. So, I had to include
the gethostname module.
But, if I include that module, then the gnulib unistd.h can wind up
including <winnt.h>, which pulls in a lot of definitions that conflict
with symbols already defined elsewhere in gdb. (And as you can imagine
from a tool that manipulates file formats, things like COFF details
defined in winnt.h conflict with similar definitions in BFD.)
So I get stuff like:
cp-name-parser.c:420:0: error: "VOID" redefined [-Werror]
In file included from
/usr/i686-w64-mingw32/sys-root/mingw/include/windef.h:139:0,
from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:69,
from
/usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
from build-gnulib/import/unistd.h:34,
from ../../binutils-gdb/gdb/defs.h:53,
from ../../binutils-gdb/gdb/cp-name-parser.y:32:
/usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:192:0: note: this is the
location of the previous definition
I can tell you how to grab the relevant gdb and build it if you want to
mess around. It's straightforward.
Tom
- unistd.h -vs- winnt.h,
Tom Tromey <=