revoke using PRIu32 macro and add fallback for UINT32_C macro,

because these do not exist on rather older systems.
XXX: I wonder someone will add them to tools/compat.
This commit is contained in:
tshiozak 2003-03-10 09:37:04 +00:00
parent 84cb70148f
commit 947243ba1e
1 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: yacc.y,v 1.13 2003/03/03 08:49:16 tshiozak Exp $ */
/* $NetBSD: yacc.y,v 1.14 2003/03/10 09:37:04 tshiozak Exp $ */
%{
/*-
@ -47,7 +47,7 @@
static char sccsid[] = "@(#)yacc.y 8.1 (Berkeley) 6/6/93";
static char rcsid[] = "$FreeBSD$";
#else
__RCSID("$NetBSD: yacc.y,v 1.13 2003/03/03 08:49:16 tshiozak Exp $");
__RCSID("$NetBSD: yacc.y,v 1.14 2003/03/10 09:37:04 tshiozak Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -63,6 +63,10 @@ __RCSID("$NetBSD: yacc.y,v 1.13 2003/03/03 08:49:16 tshiozak Exp $");
#if !defined(__FreeBSD__)
#define _BSD_RUNE_T_ int
#define _BSD_CT_RUNE_T_ rune_t
#ifndef UINT32_C
/* assumes sizeof(unsigned int)>=4 */
#define UINT32_C(c) ((uint32_t)(c##U))
#endif
#include "rune.h"
#else
#include <rune.h>
@ -866,7 +870,7 @@ dump_tables()
fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
fprintf(stderr, " %1" PRIu32, (r & _CTYPE_SWM)>>_CTYPE_SWS);
fprintf(stderr, " %1u", (unsigned)((r & _CTYPE_SWM)>>_CTYPE_SWS));
fprintf(stderr, "\n");
} else
for (x = list->min; x <= list->max; ++x) {
@ -889,7 +893,7 @@ dump_tables()
fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
fprintf(stderr, " %1" PRIu32, (r & _CTYPE_SWM)>>_CTYPE_SWS);
fprintf(stderr, " %1u", (unsigned)((r & _CTYPE_SWM)>>_CTYPE_SWS));
fprintf(stderr, "\n");
}
}