diff options
author | Yann Ylavic <ylavic@apache.org> | 2019-03-28 17:24:30 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2019-03-28 17:24:30 +0100 |
commit | 5528a9b36f127a11cd442aeac91de9f92ce87e4b (patch) | |
tree | b22f38fa7817d46198b3c09588fbc807ef83b4a5 /server/gen_test_char.c | |
parent | add loadmodule line to sochache_redis to httpd.conf in Windows (diff) | |
download | apache2-5528a9b36f127a11cd442aeac91de9f92ce87e4b.tar.xz apache2-5528a9b36f127a11cd442aeac91de9f92ce87e4b.zip |
Provide TEST_CHAR marco in test_char.h
For (internal) usage outside server/util.c, mod_log_forensic for now
and mod_cache (T_HTTP_TOKEN_STOP) in a few...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/gen_test_char.c')
-rw-r--r-- | server/gen_test_char.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/gen_test_char.c b/server/gen_test_char.c index 48ae6f47d0..cd20577e6a 100644 --- a/server/gen_test_char.c +++ b/server/gen_test_char.c @@ -167,7 +167,16 @@ int main(int argc, char *argv[]) printf("0x%03x%c", flags, (c < 255) ? ',' : ' '); } - printf("\n};\n"); + printf("\n};\n\n"); + + printf( + "/* we assume the folks using this ensure 0 <= c < 256... which means\n" + " * you need a cast to (unsigned char) first, you can't just plug a\n" + " * char in here and get it to work, because if char is signed then it\n" + " * will first be sign extended.\n" + " */\n" + "#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))\n" + ); return 0; } |