DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38409>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38409 Summary: AP_HAVE_DESIGNATED_INITIALIZER causing g++ (3.4.5) compile problem for module developed in C++ Product: Apache httpd-2 Version: 2.2.0 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Core AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] The sample code below can be compiled alright with gcc (3.4.5) while cannot be compiled with g++ (3.4.5). The structure initializer is causing problem for g++. Notice on the same machine with the same toolchain where I develop my apache module, apache 2.0 was built *WITHOUT* AP_HAVE_DESIGNATED_INITIALIZER whereas apache 2.2 was built *WITH* AP_HAVE_DESIGNATED_INITIALIZER. Both cases were auto detected by configure I suppose. That's why I didn't notice the problem with apache 2.0. Sample code: --------------------------------------------------------------------- #ifndef __cplusplus #define _LARGEFILE64_SOURCE #include <sys/types.h> #endif #include "httpd.h" #include "http_config.h" #if defined(AP_HAVE_DESIGNATED_INITIALIZER) #define CAST_CMD_FUNC(f) f #else #define CAST_CMD_FUNC(f) (cmd_func)f #endif static const char* test_cmd ( cmd_parms* cmd, void* dummy, const char* w ) { return NULL; } static const command_rec cmds[] = { AP_INIT_TAKE1( "Test", CAST_CMD_FUNC(test_cmd), NULL, RSRC_CONF, "Test"), }; --------------------------------------------------------------------- -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
