[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] [bug #42204] gettext-0.18.3.2: weird build anomaly with Mi
[bug-gettext] [bug #42204] gettext-0.18.3.2: weird build anomaly with MinGW
Sat, 6 Oct 2018 18:35:00 -0400 (EDT)
Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Follow-up Comment #4, bug #42204 (project gettext):
Replying to Bruno Haible's comment #3.
>> With my mingw32-gcc-4.8.1 cross-compiler, it compiles okay, but with
mingw32-gcc-4.8.2, it fails trying to compile gnulib's closedir.o
> This points to a problem in that particular version of mingw.
I respectfully disagree.
>> error: dereferencing pointer to incomplete type
> If 'DIR' is not defined as a complete type, there must be something wrong in
the mingw header files.
That's a naïvely invalid presumption. Publicly, DIR is defined as an opaque
type; that's as much as client code should ever require, (and indeed, POSIX.1
is explicit in stating that DIR may be declared, in <dirent.h>, as an
Privately, OTOH, the MinGW implementations of opendir(), readdir(),
closedir(), and associated functions do see the full definition of the
underlying aggregate data type, (as they obviously need to).
> With the build recipe documented in INSTALL.windows (earlier called
README.windows), I haven't seen issues with opendir/closedir on mingw in 4
Nor have I, in MinGW's own implementations of these functions — it's gnulib
which seems to have the problem.
> => Not a bug in gettext nor gnulib.
Another (likely) incorrect presumption! Gnulib's implementations of
opendir(), readdir(), closedir(), etc. obviously do need to see a full
definition of DIR, but you've no right to expect to find it in MinGW's public
headers — there is no relevant standard that offers you that guarantee, (and
POSIX.1 explicitly denies it to you) — so you need to furnish your own full
definition, of DIR, to complement your gnulib implementations.
You may choose to sweep it under the carpet, but this does seem to be your
bug; either gettext appears to be looking for gnulib's closedir()
implementation, where it should probably just use MinGW's native version, or
gnulib is using the incomplete declaration of DIR, from MinGW's dirent.h
header, where it should be providing its own complete type definition.
Reply to this item at:
Message sent via Savannah