]> Zhao Yanbai Git Server - minix.git/commit
buildsystem: fix build errors for x86 on OSX 64/2864/1
authorThomas Veerman <tveerman@gmail.com>
Wed, 15 Oct 2014 08:59:38 +0000 (10:59 +0200)
committerLionel Sambuc <lionel@minix3.org>
Tue, 4 Nov 2014 10:00:29 +0000 (11:00 +0100)
commit10b559663e245233e674cd68352fe439d1b7f6c7
tree87c36f8a60f0cea67ae72666b05cbd2b191f9ef8
parentcb3a6387c805d68ac954124bb214195abac21583
buildsystem: fix build errors for x86 on OSX

Define _NLS_PRIVATE in tools/llvm-tblgen/Makefile so that
<tools/compat/nl_types.h> will pull in <include/nl_types.h>. This is
necessary as Clang's c++/v1/locale implementation contains references
to catopen and other catalog symbols that aren't defined anywhere.
Moreover, the compiler will complain about NL_CAT_LOCALE not being
declared. The compat nl_types.h fixes these discrepancies.

However, <nl_types.h> uses __format_arg to add function attributes to
declarations. On NetBSD __format_arg(fmtarg) is defined by
<sys/cdefs.h> to be __attribute__((__format_arg__ (fmtarg))) for
briefness, but other platforms don't do that. Consequently, the build
will fail on catopen and friends function declarations because the
compiler doesn't know how to handle __format_arg(fmtarg). A fixup to
<tools/compat/nl_types.h> takes care of this, but it won't win any
beauty contest.

Change-Id: Ic4426eca8385aeef858e60304d6e8c06cd497d95
Signed-off-by: Thomas Veerman <tveerman@gmail.com>
tools/compat/nl_types.h
tools/llvm-tblgen/Makefile