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

index 737dd0ba7cad7bff159d71795c03ccde6f034246..4edf3dbc23705aed38756cae312fac9a9962c2ff 100644 (file)
@@ -366,7 +366,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 b985d4bf9f1c26816cbf1526e93138def0023e2e..16d9ec03eef00885f44a1a768403390d5a3ca515 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