On Wed, Sep 09, 2020 at 03:48:07AM +0800, Yonggang Luo wrote: > The mingw pkg-config are showing following absolute path and contains : as > the separator, > so we must handling : properly. > > -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L > -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw: > -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -pipe > -lncursesw -lgnurx -ltre -lintl -liconv > -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC > -lncursesw > -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lcursesw > -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -pipe -lncursesw > -lgnurx -ltre -lintl -liconv > -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lncursesw > -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lcursesw > -DNCURSES_WIDECHAR -I/usr/include/ncursesw -pipe -lncursesw -lgnurx -ltre > -lintl -liconv > -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lncursesw > -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lcursesw > > msys2/mingw lacks the POSIX-required langinfo.h. > > gcc test.c -DNCURSES_WIDECHAR -I/mingw64/include/ncursesw -pipe -lncursesw > -lgnurx -ltre -lintl -liconv > test.c:4:10: fatal error: langinfo.h: No such file or directory > 4 | #include <langinfo.h> > | ^~~~~~~~~~~~ > compilation terminated. > > So we using g_get_codeset instead of nl_langinfo(CODESET) > > Signed-off-by: Yonggang Luo <luoyongg...@gmail.com>
Reviewed-by: Gerd Hoffmann <kra...@redhat.com>