[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A bug in findutils?
From: |
Cao, Da-Shi (EB-Presales-ZTE/HW-GZ) |
Subject: |
A bug in findutils? |
Date: |
Thu, 24 Mar 2011 08:05:45 +0000 |
The compilation of findutils 4.4.2 failed when I did a cross compile on i386 to
x86_64. The error is that type "wint_t" didn't get defined so the compilation
of mbchar.c in gnulib/lib failed.
The type "wint_t" is defined in system wchar.h under some conditions. The
system wchar.h is included by gnulib/lib/wchar.h.
The cross compilation error can be demonstrated by:
#include <stdio.h>
#include <wchar.h>
It is supposed that "wint_t" should get defined after this sequence, but it is
not in this particular cross compilation.
stdio.h includes _G_config.h, which in turn include wchar.h.
But in the cross compilation there is a wchar.h in gunlib/lib. This header file
is guarded by _GL_WCHAR_H.
This gnulib/lib/wchar.h includes system wchar.h. But when included from
_G_config.h, type wint_t is not defined. This is the expected behavior.
But the "#include <wchar.h> in _G_config.h gets _GL_WCHAR_H defined, so the
"#include <wchar.h>" as in the demonstration is bypassed.
I cannot figure out how to make _GL_WCHAR_H not got defined when
gnulib/lib/wchar.h is included by "_G_config.h".
Thomas
- A bug in findutils?,
Cao, Da-Shi (EB-Presales-ZTE/HW-GZ) <=