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;
}
# 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