pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feed[patch] fix buffer overrun in logging, and code cleanup
3+ messages / 2 participants
[nested] [flat]
* [patch] fix buffer overrun in logging, and code cleanup
@ 2016-05-26 02:40 Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tsunakawa, Takayuki @ 2016-05-26 02:40 UTC (permalink / raw)
To: pgsql-odbc
Hello,
While I was troubleshooting some user problem and trying to figure out why mylog_xxx.log is not created, I found a tiny bug. The buffers for holding the full path for MyLog and CommLog are small -- only 80 bytes. If you specify a long path for Logdir, the buffer overrun occurs. Please find the attached patch mylog_buffer_overrun.patch.
The other patch mylog_cleanup.patch removes code which are unused or unnecessary anymore. I'd like to make the code as lean as possible, so that it makes code reading and searching easier and faster. This patch removes about 120 lines.
Regards
Takayuki Tsunakawa
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments: download all (2 files, .tar.gz)
mylog_buffer_overrun.patch (application/octet-stream, 631B) download
diff -Nacr a/mylog.c b/mylog.c
*** a/mylog.c 2016-04-15 22:11:34.000000000 +0900
--- b/mylog.c 2016-05-26 11:29:02.000000000 +0900
***************
*** 225,231 ****
static void MLOG_open()
{
! char filebuf[80];
if (MLOGFP) return;
--- 225,231 ----
static void MLOG_open()
{
! char filebuf[PATH_MAX];
if (MLOGFP) return;
***************
*** 363,369 ****
qlog(char *fmt,...)
{
va_list args;
! char filebuf[80];
int gerrno;
if (!qlog_on) return;
--- 363,369 ----
qlog(char *fmt,...)
{
va_list args;
! char filebuf[PATH_MAX];
int gerrno;
if (!qlog_on) return;
mylog_cleanup.patch (application/octet-stream, 6.0K) download
diff -Nacr a/mylog.c b/mylog.c
*** a/mylog.c Fri Apr 15 22:11:34 2016
--- b/mylog.c Wed May 25 17:34:14 2016
***************
*** 108,114 ****
#elif defined(POSIX_MULTITHREAD_SUPPORT)
static pthread_mutex_t qlog_cs, mylog_cs;
#endif /* WIN_MULTITHREAD_SUPPORT */
- static int force_log = 0;
static int mylog_on = 0, qlog_on = 0;
#if defined(WIN_MULTITHREAD_SUPPORT)
--- 108,113 ----
***************
*** 140,162 ****
#define DELETE_MYLOG_CS
#endif /* WIN_MULTITHREAD_SUPPORT */
- #ifdef MY_LOG
#define MYLOGFILE "mylog_"
#ifndef WIN32
#define MYLOGDIR "/tmp"
#else
#define MYLOGDIR "c:"
#endif /* WIN32 */
- #endif /* MY_LOG */
- #ifdef Q_LOG
#define QLOGFILE "psqlodbc_"
#ifndef WIN32
#define QLOGDIR "/tmp"
#else
#define QLOGDIR "c:"
#endif /* WIN32 */
- #endif /* QLOG */
int get_mylog(void)
--- 139,157 ----
***************
*** 193,200 ****
mylog_on = 0;
else if (globals.debug > 0)
mylog_on = globals.debug;
- else
- mylog_on = force_log;
if (qlog_onoff)
qlog_on_count += cnopen;
else
--- 188,193 ----
***************
*** 205,212 ****
qlog_on = 0;
else if (globals.commlog > 0)
qlog_on = globals.commlog;
- else
- qlog_on = force_log;
LEAVE_QLOG_CS;
LEAVE_MYLOG_CS;
}
--- 198,203 ----
***************
*** 214,226 ****
#ifdef WIN32
#define LOGGING_PROCESS_TIME
#include <direct.h>
- #define PODBCLOGDIR "C:\\podbclog"
#endif /* WIN32 */
#ifdef LOGGING_PROCESS_TIME
#include <mmsystem.h>
static DWORD start_time = 0;
#endif /* LOGGING_PROCESS_TIME */
- #ifdef MY_LOG
static FILE *MLOGFP = NULL;
static void MLOG_open()
--- 205,215 ----
***************
*** 235,252 ****
{
generate_homefile(MYLOGFILE, filebuf);
MLOGFP = fopen(filebuf, PG_BINARY_A);
- if (!MLOGFP)
- {
- generate_filename("C:\\podbclog", MYLOGFILE, filebuf);
- MLOGFP = fopen(filebuf, PG_BINARY_A);
- #ifdef WIN32
- if (!MLOGFP)
- {
- if (0 == _mkdir(PODBCLOGDIR))
- MLOGFP = fopen(filebuf, PG_BINARY_A);
- }
- #endif /* WIN32 */
- }
}
if (MLOGFP)
setbuf(MLOGFP, NULL);
--- 224,229 ----
***************
*** 295,345 ****
LEAVE_MYLOG_CS;
GENERAL_ERRNO_SET(gerrno);
}
- DLL_DECLARE void
- forcelog(const char *fmt,...)
- {
- static BOOL force_on = TRUE;
- va_list args;
- int gerrno = GENERAL_ERRNO;
-
- if (!force_on)
- return;
-
- ENTER_MYLOG_CS;
- va_start(args, fmt);
-
- if (!MLOGFP)
- {
- MLOG_open();
- if (!MLOGFP)
- force_on = FALSE;
- }
- if (MLOGFP)
- {
- #ifdef WIN_MULTITHREAD_SUPPORT
- #ifdef WIN32
- time_t ntime;
- char ctim[128];
-
- time(&ntime);
- strcpy(ctim, ctime(&ntime));
- ctim[strlen(ctim) - 1] = '\0';
- fprintf(MLOGFP, "[%d.%d(%s)]", GetCurrentProcessId(), GetCurrentThreadId(), ctim);
- #endif /* WIN32 */
- #endif /* WIN_MULTITHREAD_SUPPORT */
- #if defined(POSIX_MULTITHREAD_SUPPORT)
- fprintf(MLOGFP, "[%lu]", pthread_self());
- #endif /* POSIX_MULTITHREAD_SUPPORT */
- vfprintf(MLOGFP, fmt, args);
- }
- va_end(args);
- LEAVE_MYLOG_CS;
- GENERAL_ERRNO_SET(gerrno);
- }
static void mylog_initialize(void)
{
INIT_MYLOG_CS;
- mylog_on = force_log;
}
static void mylog_finalize(void)
{
--- 272,280 ----
***************
*** 351,363 ****
}
DELETE_MYLOG_CS;
}
- #else
- static void mylog_initialize(void) {}
- static void mylog_finalize(void) {}
- #endif /* MY_LOG */
- #ifdef Q_LOG
static FILE *QLOGFP = NULL;
void
qlog(char *fmt,...)
--- 286,293 ----
***************
*** 407,413 ****
static void qlog_initialize(void)
{
INIT_QLOG_CS;
- qlog_on = force_log;
}
static void qlog_finalize(void)
{
--- 337,342 ----
***************
*** 419,428 ****
}
DELETE_QLOG_CS;
}
- #else
- static void qlog_initialize(void) {}
- static void qlog_finalize(void) {}
- #endif /* Q_LOG */
void InitializeLogging(void)
{
--- 348,353 ----
diff -Nacr a/mylog.h b/mylog.h
*** a/mylog.h Fri Apr 15 22:11:34 2016
--- b/mylog.h Wed May 25 17:34:11 2016
***************
*** 32,88 ****
#ifdef __cplusplus
extern "C" {
#endif
- /* Uncomment MY_LOG define to compile in the mylog() statements.
- Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI
- portion of the registry. You may have to manually add this key.
- This logfile is intended for development use, not for an end user!
- */
- #define MY_LOG
-
- /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog).
- This logfile contains serious log statements that are intended for an
- end user to be able to read and understand. It is controlled by the
- 'CommLog' flag in the ODBCINST.INI portion of the registry (see above),
- which is manipulated on the setup/connection dialog boxes.
- */
- #define Q_LOG
-
- #ifdef MY_LOG
DLL_DECLARE void mylog(const char *fmt,...);
- DLL_DECLARE void forcelog(const char *fmt,...);
#define inolog if (get_mylog() > 1) mylog /* for really temporary debug */
- #else /* MY_LOG */
- #ifndef WIN32
- #define mylog(args...) /* GNU convention for variable arguments */
- #define forcelog(args...) /* GNU convention for variable arguments */
- #define inolog(args...) /* GNU convention for variable arguments */
- #else
- #define _DUMMY_LOG_IMPL_
- static void DumLog(const char *fmt,...) {}
- #define mylog if (0) DumLog /* mylog */
- #define forcelog if (0) DumLog /* forcelog */
- #define inolog if (0) DumLog /* inolog */
- #endif /* WIN32 */
- #endif /* MY_LOG */
-
- #ifdef Q_LOG
extern void qlog(char *fmt,...);
#define inoqlog if (get_qlog() > 1) qlog /* for really temporary debug */
- #else
- #ifndef WIN32
- #define qlog(args...) /* GNU convention for variable arguments */
- #define inoqlog(args...) /* GNU convention for variable arguments */
- #else
- #ifndef _DUMMY_LOG_IMPL_
- #define _DUMMY_LOG_IMPL_
- static void DumLog(const char *fmt,...) {}
- #endif /* _DUMMY_LOG_IMPL_ */
- #define qlog if (0) DumLog /* qlog */
- #define inoqlog if (0) DumLog /* inoqlog */
- #endif /* WIN32 */
- #endif /* QLOG */
int get_qlog(void);
int get_mylog(void);
--- 32,43 ----
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [patch] fix buffer overrun in logging, and code cleanup
@ 2016-05-27 07:54 Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
parent: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
0 siblings, 1 reply; 3+ messages in thread
From: Inoue, Hiroshi @ 2016-05-27 07:54 UTC (permalink / raw)
To: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>; +Cc: pgsql-odbc
Hi,
I would examine the patch.
However forcelog() exists in msdtc_enlist.cpp at first glance.
regards,
Hiroshi Inoue
On 2016/05/26 11:40, Tsunakawa, Takayuki wrote:
> Hello,
>
> While I was troubleshooting some user problem and trying to figure out why mylog_xxx.log is not created, I found a tiny bug. The buffers for holding the full path for MyLog and CommLog are small -- only 80 bytes. If you specify a long path for Logdir, the buffer overrun occurs. Please find the attached patch mylog_buffer_overrun.patch.
>
> The other patch mylog_cleanup.patch removes code which are unused or unnecessary anymore. I'd like to make the code as lean as possible, so that it makes code reading and searching easier and faster. This patch removes about 120 lines.
>
> Regards
> Takayuki Tsunakawa
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [patch] fix buffer overrun in logging, and code cleanup
@ 2016-05-30 01:13 Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
0 siblings, 0 replies; 3+ messages in thread
From: Tsunakawa, Takayuki @ 2016-05-30 01:13 UTC (permalink / raw)
To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-odbc
> From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
> However forcelog() exists in msdtc_enlist.cpp at first glance.
Oh, I overlooked it. I removed the use of forcelog() there by:
1) Remove #ifdef _LOCK_DEBUG ... #endif code fragments.
2) Replace remaining forcelog() call sites with mylog(). I think mylog() should be used to allow users of the log file accumulation.
Regards
Takayuki Tsunakawa
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
mylog_cleanup_v2.patch (application/octet-stream, 9.4K) download
diff -Nacr a/msdtc_enlist.cpp b/msdtc_enlist.cpp
*** a/msdtc_enlist.cpp 2016-04-15 22:11:34.000000000 +0900
--- b/msdtc_enlist.cpp 2016-05-30 10:05:00.000000000 +0900
***************
*** 103,115 ****
DeleteCriticalSection(&life_cs);
}
} init_crit;
- #ifdef _LOCK_DEBUG_
- #define LIFELOCK_ACQUIRE (forcelog("LIFELOCK_ACQUIRE\n"), EnterCriticalSection(&init_crit.life_cs), forcelog("LIFELOCK ACQUIRED\n"))
- #define LIFELOCK_RELEASE (forcelog("LIFELOCK_RELEASE\n"), LeaveCriticalSection(&init_crit.life_cs))
- #else
#define LIFELOCK_ACQUIRE EnterCriticalSection(&init_crit.life_cs)
#define LIFELOCK_RELEASE LeaveCriticalSection(&init_crit.life_cs)
- #endif
/*
* Some helper macros about connection handling.
--- 103,110 ----
***************
*** 236,252 ****
bool CloseThread(DWORD type);
private:
~IAsyncPG();
- #ifdef _LOCK_DEBUG_
- void SLOCK_ACQUIRE() {forcelog("SLOCK_ACQUIRE %d\n", spin_cnt); EnterCriticalSection(&as_spin); spin_cnt++;}
- void SLOCK_RELEASE() {forcelog("SLOCK_RELEASE=%d\n", spin_cnt); LeaveCriticalSection(&as_spin); spin_cnt--;}
- void ELOCK_ACQUIRE() {forcelog("%p->ELOCK_ACQUIRE\n", this); EnterCriticalSection(&as_exec); forcelog("ELOCK ACQUIRED\n");}
- void ELOCK_RELEASE() {forcelog("ELOCK_RELEASE\n"); LeaveCriticalSection(&as_exec);}
- #else
void SLOCK_ACQUIRE() {EnterCriticalSection(&as_spin);}
void SLOCK_RELEASE() {LeaveCriticalSection(&as_spin);}
void ELOCK_ACQUIRE() {EnterCriticalSection(&as_exec);}
void ELOCK_RELEASE() {LeaveCriticalSection(&as_exec);}
- #endif /* _LOCK_DEBUG_ */
void *getLockedXAConn(void);
void *generateXAConn(bool spinAcquired);
void *isolateXAConn(bool spinAcquired, bool continueConnection);
--- 231,240 ----
***************
*** 301,307 ****
}
HRESULT STDMETHODCALLTYPE IAsyncPG::QueryInterface(REFIID riid, void ** ppvObject)
{
! forcelog("%p QueryInterface called\n", this);
if (riid == IID_IUnknown || riid == IID_ITransactionResourceAsync)
{
*ppvObject = this;
--- 289,295 ----
}
HRESULT STDMETHODCALLTYPE IAsyncPG::QueryInterface(REFIID riid, void ** ppvObject)
{
! mylog("%p QueryInterface called\n", this);
if (riid == IID_IUnknown || riid == IID_ITransactionResourceAsync)
{
*ppvObject = this;
***************
*** 910,916 ****
}
HRESULT STDMETHODCALLTYPE IAsyncPG::TMDown(void)
{
! forcelog("%p TMDown called\n", this);
return S_OK;
}
--- 898,904 ----
}
HRESULT STDMETHODCALLTYPE IAsyncPG::TMDown(void)
{
! mylog("%p TMDown called\n", this);
return S_OK;
}
***************
*** 1082,1088 ****
res = pDtc->QueryInterface(IID_IDtcToXaHelperSinglePipe, (void **) &pHelper);
if (res != S_OK || !pHelper)
{
! forcelog("DtcToXaHelperSingelPipe get error %d\n", res);
pHelper = NULL;
return SQL_ERROR;
}
--- 1070,1076 ----
res = pDtc->QueryInterface(IID_IDtcToXaHelperSinglePipe, (void **) &pHelper);
if (res != S_OK || !pHelper)
{
! mylog("DtcToXaHelperSingelPipe get error %d\n", res);
pHelper = NULL;
return SQL_ERROR;
}
***************
*** 1252,1258 ****
grfOptions, NULL, (void **) &pDtc);
if (FAILED(res))
{
! forcelog("DtcGetTransactionManager error %x\n", res);
pDtc = NULL;
}
}
--- 1240,1246 ----
grfOptions, NULL, (void **) &pDtc);
if (FAILED(res))
{
! mylog("DtcGetTransactionManager error %x\n", res);
pDtc = NULL;
}
}
diff -Nacr a/mylog.c b/mylog.c
*** a/mylog.c 2016-04-15 22:11:34.000000000 +0900
--- b/mylog.c 2016-05-30 10:05:12.000000000 +0900
***************
*** 108,114 ****
#elif defined(POSIX_MULTITHREAD_SUPPORT)
static pthread_mutex_t qlog_cs, mylog_cs;
#endif /* WIN_MULTITHREAD_SUPPORT */
- static int force_log = 0;
static int mylog_on = 0, qlog_on = 0;
#if defined(WIN_MULTITHREAD_SUPPORT)
--- 108,113 ----
***************
*** 140,162 ****
#define DELETE_MYLOG_CS
#endif /* WIN_MULTITHREAD_SUPPORT */
- #ifdef MY_LOG
#define MYLOGFILE "mylog_"
#ifndef WIN32
#define MYLOGDIR "/tmp"
#else
#define MYLOGDIR "c:"
#endif /* WIN32 */
- #endif /* MY_LOG */
- #ifdef Q_LOG
#define QLOGFILE "psqlodbc_"
#ifndef WIN32
#define QLOGDIR "/tmp"
#else
#define QLOGDIR "c:"
#endif /* WIN32 */
- #endif /* QLOG */
int get_mylog(void)
--- 139,157 ----
***************
*** 193,200 ****
mylog_on = 0;
else if (globals.debug > 0)
mylog_on = globals.debug;
- else
- mylog_on = force_log;
if (qlog_onoff)
qlog_on_count += cnopen;
else
--- 188,193 ----
***************
*** 205,212 ****
qlog_on = 0;
else if (globals.commlog > 0)
qlog_on = globals.commlog;
- else
- qlog_on = force_log;
LEAVE_QLOG_CS;
LEAVE_MYLOG_CS;
}
--- 198,203 ----
***************
*** 214,226 ****
#ifdef WIN32
#define LOGGING_PROCESS_TIME
#include <direct.h>
- #define PODBCLOGDIR "C:\\podbclog"
#endif /* WIN32 */
#ifdef LOGGING_PROCESS_TIME
#include <mmsystem.h>
static DWORD start_time = 0;
#endif /* LOGGING_PROCESS_TIME */
- #ifdef MY_LOG
static FILE *MLOGFP = NULL;
static void MLOG_open()
--- 205,215 ----
***************
*** 235,252 ****
{
generate_homefile(MYLOGFILE, filebuf);
MLOGFP = fopen(filebuf, PG_BINARY_A);
- if (!MLOGFP)
- {
- generate_filename("C:\\podbclog", MYLOGFILE, filebuf);
- MLOGFP = fopen(filebuf, PG_BINARY_A);
- #ifdef WIN32
- if (!MLOGFP)
- {
- if (0 == _mkdir(PODBCLOGDIR))
- MLOGFP = fopen(filebuf, PG_BINARY_A);
- }
- #endif /* WIN32 */
- }
}
if (MLOGFP)
setbuf(MLOGFP, NULL);
--- 224,229 ----
***************
*** 295,345 ****
LEAVE_MYLOG_CS;
GENERAL_ERRNO_SET(gerrno);
}
- DLL_DECLARE void
- forcelog(const char *fmt,...)
- {
- static BOOL force_on = TRUE;
- va_list args;
- int gerrno = GENERAL_ERRNO;
-
- if (!force_on)
- return;
-
- ENTER_MYLOG_CS;
- va_start(args, fmt);
-
- if (!MLOGFP)
- {
- MLOG_open();
- if (!MLOGFP)
- force_on = FALSE;
- }
- if (MLOGFP)
- {
- #ifdef WIN_MULTITHREAD_SUPPORT
- #ifdef WIN32
- time_t ntime;
- char ctim[128];
-
- time(&ntime);
- strcpy(ctim, ctime(&ntime));
- ctim[strlen(ctim) - 1] = '\0';
- fprintf(MLOGFP, "[%d.%d(%s)]", GetCurrentProcessId(), GetCurrentThreadId(), ctim);
- #endif /* WIN32 */
- #endif /* WIN_MULTITHREAD_SUPPORT */
- #if defined(POSIX_MULTITHREAD_SUPPORT)
- fprintf(MLOGFP, "[%lu]", pthread_self());
- #endif /* POSIX_MULTITHREAD_SUPPORT */
- vfprintf(MLOGFP, fmt, args);
- }
- va_end(args);
- LEAVE_MYLOG_CS;
- GENERAL_ERRNO_SET(gerrno);
- }
static void mylog_initialize(void)
{
INIT_MYLOG_CS;
- mylog_on = force_log;
}
static void mylog_finalize(void)
{
--- 272,280 ----
***************
*** 351,363 ****
}
DELETE_MYLOG_CS;
}
- #else
- static void mylog_initialize(void) {}
- static void mylog_finalize(void) {}
- #endif /* MY_LOG */
- #ifdef Q_LOG
static FILE *QLOGFP = NULL;
void
qlog(char *fmt,...)
--- 286,293 ----
***************
*** 407,413 ****
static void qlog_initialize(void)
{
INIT_QLOG_CS;
- qlog_on = force_log;
}
static void qlog_finalize(void)
{
--- 337,342 ----
***************
*** 419,428 ****
}
DELETE_QLOG_CS;
}
- #else
- static void qlog_initialize(void) {}
- static void qlog_finalize(void) {}
- #endif /* Q_LOG */
void InitializeLogging(void)
{
--- 348,353 ----
diff -Nacr a/mylog.h b/mylog.h
*** a/mylog.h 2016-04-15 22:11:34.000000000 +0900
--- b/mylog.h 2016-05-30 10:05:12.000000000 +0900
***************
*** 32,88 ****
#ifdef __cplusplus
extern "C" {
#endif
- /* Uncomment MY_LOG define to compile in the mylog() statements.
- Then, debug logging will occur if 'Debug' is set to 1 in the ODBCINST.INI
- portion of the registry. You may have to manually add this key.
- This logfile is intended for development use, not for an end user!
- */
- #define MY_LOG
-
- /* Uncomment Q_LOG to compile in the qlog() statements (Communications log, i.e. CommLog).
- This logfile contains serious log statements that are intended for an
- end user to be able to read and understand. It is controlled by the
- 'CommLog' flag in the ODBCINST.INI portion of the registry (see above),
- which is manipulated on the setup/connection dialog boxes.
- */
- #define Q_LOG
-
- #ifdef MY_LOG
DLL_DECLARE void mylog(const char *fmt,...);
- DLL_DECLARE void forcelog(const char *fmt,...);
#define inolog if (get_mylog() > 1) mylog /* for really temporary debug */
- #else /* MY_LOG */
- #ifndef WIN32
- #define mylog(args...) /* GNU convention for variable arguments */
- #define forcelog(args...) /* GNU convention for variable arguments */
- #define inolog(args...) /* GNU convention for variable arguments */
- #else
- #define _DUMMY_LOG_IMPL_
- static void DumLog(const char *fmt,...) {}
- #define mylog if (0) DumLog /* mylog */
- #define forcelog if (0) DumLog /* forcelog */
- #define inolog if (0) DumLog /* inolog */
- #endif /* WIN32 */
- #endif /* MY_LOG */
-
- #ifdef Q_LOG
extern void qlog(char *fmt,...);
#define inoqlog if (get_qlog() > 1) qlog /* for really temporary debug */
- #else
- #ifndef WIN32
- #define qlog(args...) /* GNU convention for variable arguments */
- #define inoqlog(args...) /* GNU convention for variable arguments */
- #else
- #ifndef _DUMMY_LOG_IMPL_
- #define _DUMMY_LOG_IMPL_
- static void DumLog(const char *fmt,...) {}
- #endif /* _DUMMY_LOG_IMPL_ */
- #define qlog if (0) DumLog /* qlog */
- #define inoqlog if (0) DumLog /* inoqlog */
- #endif /* WIN32 */
- #endif /* QLOG */
int get_qlog(void);
int get_mylog(void);
--- 32,43 ----
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-05-30 01:13 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 02:40 [patch] fix buffer overrun in logging, and code cleanup Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
2016-05-27 07:54 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2016-05-30 01:13 ` Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox