cvs commit: src/sys/sys cdefs.h src/include nl_types.h stdio.h
M. Warner Losh
imp at bsdimp.com
Tue Jan 31 12:59:59 PST 2006
In message: <20060131.121247.100359574.imp at bsdimp.com>
"M. Warner Losh" <imp at bsdimp.com> writes:
: In message: <200601311757.k0VHvHuF060699 at repoman.freebsd.org>
: Stefan Farfeleder <stefanf at freebsd.org> writes:
: : stefanf 2006-01-31 17:57:17 UTC
: :
: : FreeBSD src repository
: :
: : Modified files: (Branch: RELENG_6)
: : sys/sys cdefs.h
: : include nl_types.h stdio.h
: : Log:
: : MFC: Add the macro __format_arg which expands to the format_arg attribute if
: : supported.
:
: This change in -current broke the build for me on my 5.3 box because
: nl_types.h is used in the bootstrap process there.
Confirmed. RELENG_5 -> RELENG_6 upgrades are now broken.
===> usr.bin/gencat (obj,depend,all,install)
/u2/imp/obj/u2/imp/FreeBSD/6x/src/tmp/u2/imp/FreeBSD/6x/src/usr.bin/gencat created for /u2/imp/FreeBSD/6x/src/usr.bin/gencat
rm -f .depend
mkdep -f .depend -a -I/u2/imp/obj/u2/imp/FreeBSD/6x/src/tmp/legacy/usr/include /u2/imp/FreeBSD/6x/src/usr.bin/gencat/gencat.c
echo gencat: /usr/lib/libc.a /u2/imp/obj/u2/imp/FreeBSD/6x/src/tmp/legacy/usr/lib/libegacy.a >> .depend
cc -O2 -fno-strict-aliasing -pipe -I/u2/imp/obj/u2/imp/FreeBSD/6x/src/tmp/legacy/usr/include -c /u2/imp/FreeBSD/6x/src/usr.bin/gencat/gencat.c
In file included from /u2/imp/FreeBSD/6x/src/usr.bin/gencat/gencat.c:88:
/u2/imp/obj/u2/imp/FreeBSD/6x/src/tmp/legacy/usr/include/nl_types.h:100: error: syntax error before "__format_arg"
*** Error code 1
The fix I have applied locally is:
Index: nl_types.h
===================================================================
RCS file: /u/home/ncvs/src/include/nl_types.h,v
retrieving revision 1.12
diff -u -r1.12 nl_types.h
--- nl_types.h 26 Jan 2006 20:53:40 -0000 1.12
+++ nl_types.h 31 Jan 2006 20:06:37 -0000
@@ -97,6 +97,9 @@
__BEGIN_DECLS
nl_catd catopen(const char *, int);
+#ifndef __format_arg
+#define __format_arg(a) __attribute__((__format_arg__(a)))
+#endif
char *catgets(nl_catd, int, int, const char *) __format_arg(4);
int catclose(nl_catd);
__END_DECLS
although I'm sure that there's many ways to skin this cat...
Warner
More information about the cvs-src
mailing list