brian 98/05/21 11:04:16
Modified: src/main util_script.c Log: Submitted by: "Brian Havard" <[EMAIL PROTECTED]> "Brian Havard" <[EMAIL PROTECTED]> writes: For reasons I've yet to determine the OS/2 exe is compiled with a switch that makes fopen() default to binary mode (-Zbin-files). This makes the !# parser in ap_call_exec() fail on scripts that use CR/LF line terminators. The following patch fixes that. Note that the code affected is inside an #ifdef __EMX__ so there's no chance of breaking other platforms. Revision Changes Path 1.111 +1 -1 apache-1.3/src/main/util_script.c Index: util_script.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -r1.110 -r1.111 --- util_script.c 1998/05/16 16:34:48 1.110 +++ util_script.c 1998/05/21 18:04:15 1.111 @@ -641,7 +641,7 @@ int is_script; char interpreter[2048]; /* hope this is large enough for the interpreter path */ FILE *program; - program = fopen(r->filename, "r"); + program = fopen(r->filename, "rt"); if (!program) { ap_log_error(APLOG_MARK, APLOG_ERR, r->server, "fopen(%s) failed", r->filename);