httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: [PATCH] NT cleanup
Date Mon, 16 Jun 1997 14:39:44 GMT
Randy Terbush wrote:
> Index: mod_rewrite.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
> retrieving revision 1.29
> diff -c -r1.29 mod_rewrite.c
> *** mod_rewrite.c	1997/06/15 19:22:31	1.29
> --- mod_rewrite.c	1997/06/16 14:37:37
> ***************
> *** 2282,2292 ****
>   /* Child process code for 'RewriteLog "|..."' */
>   static int rewritelog_child(void *cmd)
>   {
> -     int child_pid = 0;
> - 
>       cleanup_for_exec();
>       signal(SIGHUP, SIG_IGN);
>   #if defined(WIN32)
>       child_pid = spawnl(SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
>       return(child_pid);
>   #elif defined(__EMX__)
> --- 2282,2291 ----
>   /* Child process code for 'RewriteLog "|..."' */
>   static int rewritelog_child(void *cmd)
>   {
>       cleanup_for_exec();
>       signal(SIGHUP, SIG_IGN);
>   #if defined(WIN32)
> +     int child_pid = 0;

Bleep! Syntax error - you can't declare a variable here in C (you can in C++,
though ;-).

>       child_pid = spawnl(SHELL_PATH, SHELL_PATH, "/c", (char *)cmd, NULL);
>       return(child_pid);
>   #elif defined(__EMX__)
> ***************
> *** 2296,2302 ****
>       execl(SHELL_PATH, SHELL_PATH, "-c", (char *)cmd, NULL);
>   #endif
>       exit(1);
> -     return(child_pid);
>   }

Unless you also change the type of the function to void, this will cause
warnings on many compilers (function doesn't return a value).

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message