From 5a54b1ba9b6c377f29b0e50214b869d59039f4d6 Mon Sep 17 00:00:00 2001 From: "munkyu.im" Date: Fri, 23 Mar 2012 02:04:00 +0900 Subject: [PATCH] [Title]apply log file sharing (for windows) [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution]can write log while log file is using [TestCase] --- tizen/src/debug_ch.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tizen/src/debug_ch.c b/tizen/src/debug_ch.c index 2c24b06..9c72d24 100644 --- a/tizen/src/debug_ch.c +++ b/tizen/src/debug_ch.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef _win32 +#include +#endif #include "debug_ch.h" // #include "fileio.h" @@ -425,18 +428,18 @@ int dbg_log( enum _debug_class cls, struct _debug_channel *channel, va_start(valist, format); ret += vsnprintf(buf + ret, sizeof(buf) - ret, format, valist ); va_end(valist); - +#ifdef _WIN32 + if ((fp = _fsopen(logpath, "a+", _SH_DENYNO)) == NULL) { +#else if ((fp = fopen(logpath, "a+")) == NULL) { +#endif fprintf(stdout, "Emulator can't open.\n" "Please check if " "this binary file is running on the right path.\n"); exit(1); } fprintf(fp,"%s", buf); -// fputs(buf, fp); fclose(fp); -// ret = fprintf(logfile, "%s\n", buf); -// fflush(stderr); return ret; } -- 2.7.4