httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apache/src http_config.c
Date Sun, 27 Jul 1997 01:56:04 GMT
dgaudet     97/07/26 18:56:04

  Modified:    src       http_config.c
  Log:
  Properly cast the ->func parm of command_rec before calling it.  This is to
  improve portability.
  
  Revision  Changes    Path
  1.66      +30 -12    apache/src/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- http_config.c	1997/07/24 04:38:08	1.65
  +++ http_config.c	1997/07/27 01:56:03	1.66
  @@ -569,14 +569,16 @@
       
       switch (cmd->args_how) {
       case RAW_ARGS:
  -        return (*cmd->func) (parms, mconfig, args);
  +        return ((const char * (*)(cmd_parms *, void *, const char *))
  +		(*cmd->func)) (parms, mconfig, args);
   
       case NO_ARGS:
   	if (*args != 0)
   	    return pstrcat (parms->pool, cmd->name, " takes no arguments",
   			    NULL);
   
  -	return (*cmd->func) (parms, mconfig);
  +	return ((const char * (*)(cmd_parms *, void *))
  +		(*cmd->func)) (parms, mconfig);
   	
       case TAKE1:
   	w = getword_conf (parms->pool, &args);
  @@ -585,7 +587,8 @@
   	    return pstrcat (parms->pool, cmd->name, " takes one argument",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w);
  +	return ((const char * (*)(cmd_parms *, void *, const char *))
  +		(*cmd->func)) (parms, mconfig, w);
   	
       case TAKE2:
   
  @@ -596,7 +599,8 @@
   	    return pstrcat (parms->pool, cmd->name, " takes two arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, w2);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *))(*cmd->func)) (parms, mconfig, w, w2);
   	
       case TAKE12:
   
  @@ -607,7 +611,9 @@
   	    return pstrcat (parms->pool, cmd->name, " takes 1-2 arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, *w2 ? w2 : NULL);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *))(*cmd->func)) (parms, mconfig, w,
  +		*w2 ? w2 : NULL);
   	
       case TAKE3:
   
  @@ -619,7 +625,9 @@
   	    return pstrcat (parms->pool, cmd->name, " takes three arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, w2, w3);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *, const char *))(*cmd->func)) (parms,
  +		mconfig, w, w2, w3);
   	
       case TAKE23:
   
  @@ -631,7 +639,9 @@
   	    return pstrcat (parms->pool, cmd->name, " takes two or three arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, w2, w3);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *, const char *))(*cmd->func)) (parms,
  +		mconfig, w, w2, w3);
   	
       case TAKE123:
   
  @@ -643,7 +653,9 @@
   	    return pstrcat (parms->pool, cmd->name, " takes one, two or three arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, w2, w3);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *, const char *))(*cmd->func)) (parms,
  +		mconfig, w, w2, w3);
   	
       case TAKE13:
   
  @@ -655,12 +667,15 @@
   	    return pstrcat (parms->pool, cmd->name, " takes one or three arguments",
   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
   
  -	return (*cmd->func) (parms, mconfig, w, w2, w3);
  +	return ((const char * (*)(cmd_parms *, void *, const char *,
  +		const char *, const char *))(*cmd->func)) (parms,
  +		mconfig, w, w2, w3);
   	
       case ITERATE:
   
   	while (*(w = getword_conf (parms->pool, &args)) != '\0')
  -	    if ((errmsg = (*cmd->func) (parms, mconfig, w)))
  +	    if ((errmsg = ((const char * (*)(cmd_parms *, void *,
  +			    const char *))(*cmd->func)) (parms, mconfig, w)))
   	        return errmsg;
   
   	return NULL;
  @@ -676,7 +691,9 @@
   	  
   
   	while (*(w2 = getword_conf (parms->pool, &args)) != '\0')
  -	    if ((errmsg = (*cmd->func) (parms, mconfig, w, w2)))
  +	    if ((errmsg = ((const char * (*)(cmd_parms *, void *,
  +			    const char *, const char *))(*cmd->func)) (parms,
  +			    mconfig, w, w2)))
   	        return errmsg;
   
   	return NULL;
  @@ -689,7 +706,8 @@
   	    return pstrcat (parms->pool, cmd->name, " must be On or Off",
   			    NULL);
   
  -	return (*cmd->func) (parms, mconfig, strcasecmp (w, "off") != 0);
  +	return ((const char * (*)(cmd_parms *, void *, int))
  +		(*cmd->func)) (parms, mconfig, strcasecmp (w, "off") != 0);
   
       default:
   
  
  
  

Mime
View raw message