Apache 2.2
Michael Sullivan <[email protected]> Sun, 8 Jan 2006 12:52:18 +0900
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm working on a patch, or perhaps a new release, depending on what
Shugo-san decides, for Apache 2.2.
What I've done is actually go into the code and change the calls to
use the new Apache module interface rather than using macros to
translate. It's all complete, but when compiling mod_ruby.c I get
the following compile warning, and it seems to be affecting the
module loading:
mod_ruby.c:152: warning: missing braces around initializer
mod_ruby.c:152: warning: (near initialization for `ruby_cmds[0].func')
mod_ruby.c:152: warning: initialization from incompatible pointer type
mod_ruby.c:154: warning: initialization from incompatible pointer type
mod_ruby.c:156: warning: initialization from incompatible pointer type
mod_ruby.c:158: warning: initialization from incompatible pointer type
mod_ruby.c:160: warning: initialization from incompatible pointer type
mod_ruby.c:162: warning: initialization from incompatible pointer type
mod_ruby.c:164: warning: initialization from incompatible pointer type
mod_ruby.c:166: warning: initialization from incompatible pointer type
mod_ruby.c:168: warning: initialization from incompatible pointer type
mod_ruby.c:171: warning: initialization from incompatible pointer type
mod_ruby.c:173: warning: initialization from incompatible pointer type
mod_ruby.c:175: warning: initialization from incompatible pointer type
mod_ruby.c:177: warning: initialization from incompatible pointer type
mod_ruby.c:179: warning: initialization from incompatible pointer type
mod_ruby.c:181: warning: initialization from incompatible pointer type
mod_ruby.c:183: warning: initialization from incompatible pointer type
mod_ruby.c:185: warning: initialization from incompatible pointer type
mod_ruby.c:187: warning: initialization from incompatible pointer type
mod_ruby.c:189: warning: initialization from incompatible pointer type
mod_ruby.c:192: warning: initialization from incompatible pointer type
mod_ruby.c:195: warning: initialization from incompatible pointer type
mod_ruby.c:198: warning: initialization from incompatible pointer type
mod_ruby.c:201: warning: initialization from incompatible pointer type
Here's the code it's complaining about:
static const command_rec ruby_cmds[] = {
{"RubyKanjiCode", ruby_cmd_kanji_code, NULL, OR_ALL, TAKE1,
"set $KCODE" },
{"RubyAddPath", ruby_cmd_add_path, NULL, OR_ALL, ITERATE,
"add path to $:"},
{"RubyRequire", ruby_cmd_require, NULL, OR_ALL, ITERATE,
"ruby script name, pulled in via require"},
{"RubyPassEnv", ruby_cmd_pass_env, NULL, RSRC_CONF, ITERATE,
"pass environment variables to ENV"},
{"RubySetEnv", ruby_cmd_set_env, NULL, OR_ALL, TAKE2,
"Ruby ENV key and value" },
{"RubyTimeOut", ruby_cmd_timeout, NULL, RSRC_CONF, TAKE1,
"time to wait execution of ruby script"},
{"RubySafeLevel", ruby_cmd_safe_level, NULL, OR_ALL, TAKE1,
"set default $SAFE"},
{"RubyOutputMode", ruby_cmd_output_mode, NULL, OR_ALL, TAKE1,
"set output mode (nosync|sync|syncheader)"},
{"RubyRestrictDirectives", ruby_cmd_restrict_directives, NULL,
RSRC_CONF, FLAG,
"whether Ruby* directives are restricted from .htaccess"},
{"RubyOption", ruby_cmd_option, NULL, OR_ALL, TAKE2,
"set option for application"},
{"RubyHandler", ruby_cmd_handler, NULL, OR_ALL, TAKE1,
"set ruby handler object"},
{"RubyTransHandler", ruby_cmd_trans_handler, NULL, OR_ALL, TAKE1,
"set translation handler object"},
{"RubyAuthenHandler", ruby_cmd_authen_handler, NULL, OR_ALL, TAKE1,
"set authentication handler object"},
{"RubyAuthzHandler", ruby_cmd_authz_handler, NULL, OR_ALL, TAKE1,
"set authorization handler object"},
{"RubyAccessHandler", ruby_cmd_access_handler, NULL, OR_ALL, TAKE1,
"set access checker object"},
{"RubyTypeHandler", ruby_cmd_type_handler, NULL, OR_ALL, TAKE1,
"set type checker object"},
{"RubyFixupHandler", ruby_cmd_fixup_handler, NULL, OR_ALL, TAKE1,
"set fixup handler object"},
{"RubyLogHandler", ruby_cmd_log_handler, NULL, OR_ALL, TAKE1,
"set log handler object"},
{"RubyHeaderParserHandler", ruby_cmd_header_parser_handler,
NULL, OR_ALL, TAKE1,
"set header parser object"},
{"RubyPostReadRequestHandler", ruby_cmd_post_read_request_handler,
NULL, RSRC_CONF, TAKE1,
"set post-read-request handler object"},
{"RubyInitHandler", ruby_cmd_init_handler,
NULL, OR_ALL, TAKE1,
"set init handler object"},
{"RubyCleanupHandler", ruby_cmd_cleanup_handler,
NULL, OR_ALL, TAKE1,
"set cleanup handler object"},
{"RubyChildInitHandler", ruby_cmd_child_init_handler,
NULL, RSRC_CONF, TAKE1,
"set child init handler object"},
{NULL}
};
I can't seem to see any problem here with the initializer. Is there
something I'm missing?
Anyone who could help shed some light on this would be appreciated.
Thanks,
Mike
--
Mobile: +81-80-3202-2599
Office: +81-3-3395-6055
"You can figure out how to get it off. It's on the Internet. I
looked it up."
Martha Stewart - re: her proximity restraint.