Re: cvs commit: httpd-2.0/include http_config.h
Greg Stein wrote: On Fri, Oct 31, 2003 at 10:12:56PM +0100, Sander Striker wrote: From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:53 PM So what is the best way to resolve this? Currently NetWare won't build. It throws a compiler error in Metrowerks. I can #ifdef it based on the compiler or is there a better way? Revert. I'll live with the warning. Hm. That isn't ideal either. The problem is that we jam a bunch of different types of functions into that one slot. The ideal is probably a union of function pointer types. That doesn't really work either, except with gcc. See the command stuff for Apache modules for that one made as good as we can. Cheers, Ben. -- http://www.apache-ssl.org/ben.html http://www.thebunker.net/ There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit. - Robert Woodruff
Re: cvs commit: httpd-2.0/include http_config.h
What type of warning does this eliminate because for the Metrowerks compiler on NetWare, adding the void causes a type mis-match error. ### mwccnlm Compiler: #File: mod_auth_basic.c # - # 154: { AuthBasicProvider, add_authn_provider, 0, 8, ITERATE, specify the auth providers for a directory or location } # Error: ^ # illegal implicit conversion from 'char * (struct cmd_parms_struct *, void # *, const char *)' to # 'char * (*)()' ### mwccnlm Compiler: # 159: { AuthBasicAuthoritative, ap_set_flag_slot, (void *) (size_t) ((( auth_basic_config_rec *) 0)-authoritative), 8, FLAG, S # Error: ^ # illegal implicit conversion from 'char * (struct cmd_parms_struct *, void # *, int)' to # 'char * (*)()' Can we wrap it with some kind of AP_HAVE_??? #define or is there a better way? Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com [EMAIL PROTECTED] Friday, October 31, 2003 2:01:49 AM striker 2003/10/31 01:01:49 Modified:include http_config.h Log: * include/http_config.h (cmd_func): Fix prototype, eliminate warning. Revision ChangesPath 1.102 +1 -1 httpd-2.0/include/http_config.h Index: http_config.h === RCS file: /home/cvs/httpd-2.0/include/http_config.h,v retrieving revision 1.101 retrieving revision 1.102 diff -u -r1.101 -r1.102 --- http_config.h 7 Mar 2003 14:37:36 - 1.101 +++ http_config.h 31 Oct 2003 09:01:49 - 1.102 @@ -184,7 +184,7 @@ #else /* AP_HAVE_DESIGNATED_INITIALIZER */ -typedef const char *(*cmd_func) (); +typedef const char *(*cmd_func) (void); # define AP_NO_ARGS func # define AP_RAW_ARGS func
RE: cvs commit: httpd-2.0/include http_config.h
From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:02 PM What type of warning does this eliminate because for the Metrowerks compiler on NetWare, adding the void causes a type mis-match error. .../include/http_config.h:187: warning: function declaration isn't a prototype Sander
RE: cvs commit: httpd-2.0/include http_config.h
So what is the best way to resolve this? Currently NetWare won't build. It throws a compiler error in Metrowerks. I can #ifdef it based on the compiler or is there a better way? Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com Sander Striker [EMAIL PROTECTED] Friday, October 31, 2003 1:35:30 PM From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:02 PM What type of warning does this eliminate because for the Metrowerks compiler on NetWare, adding the void causes a type mis-match error. .../include/http_config.h:187: warning: function declaration isn't a prototype Sander
RE: cvs commit: httpd-2.0/include http_config.h
From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:53 PM So what is the best way to resolve this? Currently NetWare won't build. It throws a compiler error in Metrowerks. I can #ifdef it based on the compiler or is there a better way? Revert. I'll live with the warning. Sander
Re: cvs commit: httpd-2.0/include http_config.h
On Fri, Oct 31, 2003 at 10:12:56PM +0100, Sander Striker wrote: From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:53 PM So what is the best way to resolve this? Currently NetWare won't build. It throws a compiler error in Metrowerks. I can #ifdef it based on the compiler or is there a better way? Revert. I'll live with the warning. Hm. That isn't ideal either. The problem is that we jam a bunch of different types of functions into that one slot. The ideal is probably a union of function pointer types. Cheers, -g -- Greg Stein, http://www.lyra.org/
Re: cvs commit: httpd-2.0/include http_config.h
There is already a typedef for cmd_func which is defined as a union of function pointer types within the AP_HAVE_DESIGNATED_INITIALIZER #ifdef. I tried pulling it out of the #ifdef and replacing the the offending cmd_func with the union, but that didn't seem to work either. Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com [EMAIL PROTECTED] Friday, October 31, 2003 4:19:45 PM On Fri, Oct 31, 2003 at 10:12:56PM +0100, Sander Striker wrote: From: Brad Nicholes [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2003 9:53 PM So what is the best way to resolve this? Currently NetWare won't build. It throws a compiler error in Metrowerks. I can #ifdef it based on the compiler or is there a better way? Revert. I'll live with the warning. Hm. That isn't ideal either. The problem is that we jam a bunch of different types of functions into that one slot. The ideal is probably a union of function pointer types. Cheers, -g -- Greg Stein, http://www.lyra.org/