From: Ilia Alshanetsky Date: Wed, 24 Sep 2003 23:20:48 +0000 (+0000) Subject: Fixed bug #25293 (Output correct EOL to error_log) X-Git-Tag: RELEASE_1_3b2~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=102a5cadfd06b147c072493317a7c758794847f7;p=php Fixed bug #25293 (Output correct EOL to error_log) --- diff --git a/main/main.c b/main/main.c index 737dd0ba7c..4edf3dbc23 100644 --- a/main/main.c +++ b/main/main.c @@ -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; } diff --git a/main/php.h b/main/php.h index b985d4bf9f..16d9ec03ee 100644 --- a/main/php.h +++ b/main/php.h @@ -55,10 +55,16 @@ # 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