diff options
author | marcel <marcel@FreeBSD.org> | 2010-06-20 00:34:06 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2010-06-20 00:34:06 +0000 |
commit | 47a2bcbced59a8a40016d608682d3efb8faf5133 (patch) | |
tree | 24b5ae04f5b305ba5536953799320a980f971bae /cddl | |
parent | a8e27bd6d34b94a75724bb7ab81ab8eb0d34d5a6 (diff) | |
download | FreeBSD-src-47a2bcbced59a8a40016d608682d3efb8faf5133.zip FreeBSD-src-47a2bcbced59a8a40016d608682d3efb8faf5133.tar.gz |
Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't
satisfied with a simple cast to int in the check against EOF, so the fix
is a bit involved by actually having to go through a temporary variable.
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 5c17e92..0c0938f 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -67,8 +67,12 @@ * for all subsequent invocations, which is the effect desired. */ #undef unput -#define unput(c) \ - if (c != EOF) yyunput( c, yytext_ptr ) +#define unput(c) \ + do { \ + int _c = c; \ + if (_c != EOF) \ + yyunput(_c, yytext_ptr); \ + } while(0) #endif static int id_or_type(const char *); |