httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: [PATCH] fix for PR#76 (setlocale() not called)
Date Wed, 12 Feb 1997 00:44:41 GMT
I am mildly concerned about doing this.  This can hurt a _lot_ of things
that need to be in the C locale.    For example, say your log files began
being logged in a different format.  (haven't looked at the code, so that
may not happen... just an example)  This can result in things breaking.

I would suggest perhaps a 'default SSI date' directive could work, or
calling setlocale right before doing the SSI stuff and getting rid of it
after.

(Note: I don't have a clue about locale stuff, so if someone who does
wants to correct me please do.)

On Tue, 11 Feb 1997, Rodent of Unusual Size wrote:

>     The following patch should fix the problem described in PR#76
>     (setlocale() not called, so SSI date strings not formatted according
>     to the local environment).
> 
>     I've tested it (and it works :-) on "OSF1 V3.2 47 alpha", but I'm
>     not sure about the portability.
> 
>     #ken    :-)}
> 
> Index: http_main.c
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/http_main.c,v
> retrieving revision 1.118
> diff -c -r1.118 http_main.c
> *** 1.118	1997/02/10 21:22:20
> --- http_main.c	1997/02/11 12:52:24
> ***************
> *** 88,93 ****
> --- 88,94 ----
>   #include <setjmp.h>
>   #include <assert.h>
>   #include <sys/stat.h>
> + #include <locale.h>
>   #ifdef HAVE_SHMGET
>   #include <sys/types.h>
>   #include <sys/ipc.h>
> ***************
> *** 2083,2088 ****
> --- 2084,2090 ----
>   #endif
>   
>       init_alloc();
> +     setlocale (LC_ALL, "");
>       pconf = permanent_pool;
>       ptrans = make_sub_pool(pconf);
>   
> 


Mime
View raw message