]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #25293 (Output correct EOL to error_log)
authorIlia Alshanetsky <iliaa@php.net>
Wed, 24 Sep 2003 23:22:32 +0000 (23:22 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 24 Sep 2003 23:22:32 +0000 (23:22 +0000)
NEWS
main/main.c
main/php.h

diff --git a/NEWS b/NEWS
index 60c4c0160fdd8d2029bb8944238650ddc4c64657..71e2c16d6dda89d992a502984bffcd9f084ab488 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,7 @@ PHP 4                                                                      NEWS
 - Fixed bug #25307 (Crash with WDDX serializer). (Sascha, Jani)
 - Fixed bug #25295 (QNX6: php_ini.c:414: 'alphasort' undeclared). (Jani)
 - Fixed bug #25294 (ext/ftp: NLST failure leads to crash on exit). (Sara, Rob)
+- Fixed bug #25293 (Output correct EOL to error_log). (Ilia)
 - Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara)
 - Fixed bug #25211 (image.c compile failure with AIX). (Marcus)
 - Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani)
index aebcd01acf1092052086c9201117f667f3c0a1de..92170395ea26b8f3f9114c5401d3269f4ff69277 100644 (file)
@@ -394,7 +394,7 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC)
                        strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); 
                        fprintf(log_file, "[%s] ", error_time_str);
                        fprintf(log_file, "%s", log_message);
-                       fprintf(log_file, "\n");
+                       fprintf(log_file, "%s", PHP_EOL);
                        fclose(log_file);
                        return;
                }
index 787f125095283b0f3e31d62726a76781ad6fb382..caa59712af50ebc67d7b14c5004d79f24a9f6903 100644 (file)
 #      define PHPAPI __declspec(dllimport)
 #      endif
 #define PHP_DIR_SEPARATOR '\\'
+#define PHP_EOL "\r\n"
 #else
 #define PHPAPI
 #define THREAD_LS
 #define PHP_DIR_SEPARATOR '/'
+#if defined(__MacOSX__)
+#define PHP_EOL "\r"
+#else 
+#define PHP_EOL "\n"
+#endif
 #endif
 
 #ifdef NETWARE