Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 571d121

Browse files
author
Thomas G. Lockhart
committed
Fix macro declarations to allow disabling mylog() and qlog() on Unix boxes.
Fix spelling of "DIRSEPARATOR".
1 parent f4ccb5e commit 571d121

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

src/interfaces/odbc/misc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ generate_filename(char* dirname,char* prefix,char* filename)
4444
return;
4545

4646
strcpy(filename,dirname);
47-
strcat(filename,DIRSEPERATOR);
47+
strcat(filename,DIRSEPARATOR);
4848
if(prefix != 0)
4949
strcat(filename,prefix);
5050
#ifndef WIN32

src/interfaces/odbc/misc.h

+26-18
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,41 @@
3939

4040

4141
#ifdef MY_LOG
42-
#define MYLOGFILE "mylog_"
43-
#ifndef WIN32
44-
#define MYLOGDIR "/tmp"
45-
#else
46-
#define MYLOGDIR "c:"
47-
#endif
48-
void mylog(); /* prototype */
42+
#define MYLOGFILE "mylog_"
43+
#ifndef WIN32
44+
#define MYLOGDIR "/tmp"
45+
#else
46+
#define MYLOGDIR "c:"
47+
#endif
48+
void mylog(); /* prototype */
4949
#else
50-
#define mylog // mylog
50+
#ifndef WIN32
51+
#define mylog(args...) /* GNU convention for variable arguments */
52+
#else
53+
#define mylog // mylog
54+
#endif
5155
#endif
5256

5357
#ifdef Q_LOG
54-
#define QLOGFILE "psqlodbc_"
55-
#ifndef WIN32
56-
#define QLOGDIR "/tmp"
57-
#else
58-
#define QLOGDIR "c:"
59-
#endif
60-
void qlog(); /* prototype */
58+
#define QLOGFILE "psqlodbc_"
59+
#ifndef WIN32
60+
#define QLOGDIR "/tmp"
61+
#else
62+
#define QLOGDIR "c:"
63+
#endif
64+
void qlog(); /* prototype */
6165
#else
62-
#define qlog // qlog
66+
#ifndef WIN32
67+
#define qlog(args...) /* GNU convention for variable arguments */
68+
#else
69+
#define qlog // qlog
70+
#endif
6371
#endif
6472

6573
#ifndef WIN32
66-
#define DIRSEPERATOR "/"
74+
#define DIRSEPARATOR "/"
6775
#else
68-
#define DIRSEPERATOR "\\"
76+
#define DIRSEPARATOR "\\"
6977
#endif
7078

7179
void remove_newlines(char *string);

0 commit comments

Comments
 (0)