You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <co...@decus.org> on 1997/01/15 12:36:31 UTC
[PATCH] Re: [COMPILE] Possible compilation problem (fwd)
>From the fingers of Rob Hartill flowed the following:
>
>---------- Forwarded message ----------
>Date: Tue, 14 Jan 1997 21:13:20 -0500 (EST)
>From: ITW Network Operations Center <no...@itw.net>
>To: apache-bugs@apache.org
>Subject: Possible compilation problem
>
>I received the following message when compiling the fastcgi module into
>Apache 1.2b4:
>
>mod_fastcgi.c: 3762: warning: initialization from incompatible pointer type
>mod_fastcgi.c: 3764: warning: initialization from incompatible pointer type
This was part of the first 1.2b4 bug report, but the solution was
only given, not described. mod_fastcgi.c is declaring its
command_rec routines as "static char *" rather than "const char *"
like other modules. Here's a patch to fix it.
#ken :-)}
Index: mod_fastcgi.c
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/mod_fastcgi.c,v
retrieving revision 1.4
diff -c -r1.4 mod_fastcgi.c
*** 1.4 1996/12/28 00:04:52
--- mod_fastcgi.c 1997/01/15 11:33:49
***************
*** 1799,1805 ****
*
*----------------------------------------------------------------------
*/
! static char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
gid_t gid;
--- 1799,1805 ----
*
*----------------------------------------------------------------------
*/
! const char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
gid_t gid;
***************
*** 2137,2143 ****
*
*----------------------------------------------------------------------
*/
! static char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
{
int argc;
char **argv = NULL;
--- 2137,2143 ----
*
*----------------------------------------------------------------------
*/
! const char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
{
int argc;
char **argv = NULL;
Re: [PATCH] Re: [COMPILE] Possible compilation problem (fwd)
Posted by Dean Gaudet <dg...@arctic.org>.
I think this patch would be preferable. Actually I'm tempted to submit a
static-izing patch for all the modules. I get annoyed by cluttered global
namespace and the ensuing code maintenance problems.
Dean
diff -c -r1.4 mod_fastcgi.c
*** 1.4 1996/12/28 00:04:52
--- mod_fastcgi.c 1997/01/15 11:33:49
***************
*** 1799,1805 ****
*
*----------------------------------------------------------------------
*/
! static char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
gid_t gid;
--- 1799,1805 ----
*
*----------------------------------------------------------------------
*/
! static const char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
{
uid_t uid;
gid_t gid;
***************
*** 2137,2143 ****
*
*----------------------------------------------------------------------
*/
! static char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
{
int argc;
char **argv = NULL;
--- 2137,2143 ----
*
*----------------------------------------------------------------------
*/
! static const char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
{
int argc;
char **argv = NULL;
On Wed, 15 Jan 1997, Rodent of Unusual Size wrote:
> >From the fingers of Rob Hartill flowed the following:
> >
> >---------- Forwarded message ----------
> >Date: Tue, 14 Jan 1997 21:13:20 -0500 (EST)
> >From: ITW Network Operations Center <no...@itw.net>
> >To: apache-bugs@apache.org
> >Subject: Possible compilation problem
> >
> >I received the following message when compiling the fastcgi module into
> >Apache 1.2b4:
> >
> >mod_fastcgi.c: 3762: warning: initialization from incompatible pointer type
> >mod_fastcgi.c: 3764: warning: initialization from incompatible pointer type
>
> This was part of the first 1.2b4 bug report, but the solution was
> only given, not described. mod_fastcgi.c is declaring its
> command_rec routines as "static char *" rather than "const char *"
> like other modules. Here's a patch to fix it.
>
> #ken :-)}
>
> Index: mod_fastcgi.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/mod_fastcgi.c,v
> retrieving revision 1.4
> diff -c -r1.4 mod_fastcgi.c
> *** 1.4 1996/12/28 00:04:52
> --- mod_fastcgi.c 1997/01/15 11:33:49
> ***************
> *** 1799,1805 ****
> *
> *----------------------------------------------------------------------
> */
> ! static char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
> {
> uid_t uid;
> gid_t gid;
> --- 1799,1805 ----
> *
> *----------------------------------------------------------------------
> */
> ! const char *FastCgiIpcDirCmd(cmd_parms *cmd, void *dummy, char *arg)
> {
> uid_t uid;
> gid_t gid;
> ***************
> *** 2137,2143 ****
> *
> *----------------------------------------------------------------------
> */
> ! static char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
> {
> int argc;
> char **argv = NULL;
> --- 2137,2143 ----
> *
> *----------------------------------------------------------------------
> */
> ! const char *AppClassCmd(cmd_parms *cmd, void *dummy, char *arg)
> {
> int argc;
> char **argv = NULL;
>