summaryrefslogtreecommitdiff
path: root/databases/msql/files/patch-bc
diff options
context:
space:
mode:
Diffstat (limited to 'databases/msql/files/patch-bc')
-rw-r--r--databases/msql/files/patch-bc59
1 files changed, 59 insertions, 0 deletions
diff --git a/databases/msql/files/patch-bc b/databases/msql/files/patch-bc
new file mode 100644
index 000000000000..f5a964025c22
--- /dev/null
+++ b/databases/msql/files/patch-bc
@@ -0,0 +1,59 @@
+--- src/msql/libmsql.c.bak Wed Aug 22 04:17:08 2001
++++ src/msql/libmsql.c Thu Sep 11 11:02:19 2003
+@@ -88,11 +88,11 @@
+ RETSIGTYPE pipeHandler(int);
+ #endif
+
+-#if defined(_OS_OS2) || defined (_OS_WIN32)
+-static void msqlDebug( int module, ... );
++#if defined(_OS_OS2) || defined (_OS_WIN32) || defined(ANSI_ARGS)
++static void msqlDebug( int module, char *fmt, ... );
+ #endif
+
+-#if defined(_OS_UNIX)
++#if defined(_OS_UNIX) && !defined(ANSI_ARGS)
+ static void msqlDebug();
+ #endif
+
+@@ -216,23 +216,24 @@
+ */
+
+ #ifdef ANSI_ARGS
+-static void msqlDebug(int module, ...)
++static void msqlDebug(int module, char *fmt, ...)
+ #else
+ static void msqlDebug(va_alist)
+ va_dcl
+ #endif
+ {
+ va_list args;
+- char msg[1024],
+- *fmt;
++ char msg[1024];
+
+ #ifdef ANSI_ARGS
+- va_start(args, module);
++ va_start(args, fmt);
+ #else
+ int module;
++ char *fmt;
+
+ va_start(args);
+ module = (int) va_arg(args, int );
++ fmt = (char *)va_arg(args, char *);
+ #endif
+
+ if (! (module & debugLevel))
+@@ -241,9 +242,10 @@
+ return;
+ }
+
+- fmt = (char *)va_arg(args, char *);
+- if (!fmt)
++ if (!fmt) {
++ va_end(args);
+ return;
++ }
+ (void)vsprintf(msg,fmt,args);
+ va_end(args);
+ fprintf(stderr,"[libmsql] %s",msg);