diff -c psqlodbc.orig\misc.c psqlodbc\misc.c *** psqlodbc.orig\misc.c Wed Nov 30 13:44:24 2005 --- psqlodbc\misc.c Tue Jan 10 23:53:39 2006 *************** *** 139,145 **** filedes = open(filebuf, O_WRONLY | O_APPEND | O_CREAT, S_IWUSR | S_IRUSR); LOGFP = fdopen(filedes, PG_BINARY_A); #endif ! setbuf(LOGFP, NULL); } #ifdef WIN_MULTITHREAD_SUPPORT --- 139,148 ---- filedes = open(filebuf, O_WRONLY | O_APPEND | O_CREAT, S_IWUSR | S_IRUSR); LOGFP = fdopen(filedes, PG_BINARY_A); #endif ! if (LOGFP) ! setbuf(LOGFP, NULL); ! else ! mylog_on = 0; } #ifdef WIN_MULTITHREAD_SUPPORT *************** *** 188,199 **** { generate_filename(QLOGDIR, QLOGFILE, filebuf); #ifdef WIN32 ! LOGFP = fopen(filebuf, PG_BINARY_A); #else ! filedes = open(filebuf, O_WRONLY | O_APPEND | O_CREAT, S_IWUSR | S_IRUSR); ! LOGFP = fdopen(filedes, PG_BINARY_A); #endif ! setbuf(LOGFP, NULL); } if (LOGFP) --- 191,205 ---- { generate_filename(QLOGDIR, QLOGFILE, filebuf); #ifdef WIN32 ! LOGFP = fopen(filebuf, PG_BINARY_A); #else ! filedes = open(filebuf, O_WRONLY | O_APPEND | O_CREAT, S_IWUSR | S_IRUSR); ! LOGFP = fdopen(filedes, PG_BINARY_A); #endif ! if (LOGFP) ! setbuf(LOGFP, NULL); ! else ! qlog_on = 0; } if (LOGFP)