diff options
-rw-r--r-- | databases/msql/Makefile | 3 | ||||
-rw-r--r-- | databases/msql/files/patch-az | 52 | ||||
-rw-r--r-- | databases/msql/files/patch-ba | 11 | ||||
-rw-r--r-- | databases/msql/files/patch-bb | 63 | ||||
-rw-r--r-- | databases/msql/files/patch-bc | 59 | ||||
-rw-r--r-- | databases/msql3/Makefile | 3 | ||||
-rw-r--r-- | databases/msql3/files/patch-az | 52 | ||||
-rw-r--r-- | databases/msql3/files/patch-ba | 11 | ||||
-rw-r--r-- | databases/msql3/files/patch-bb | 63 | ||||
-rw-r--r-- | databases/msql3/files/patch-bc | 59 |
10 files changed, 374 insertions, 2 deletions
diff --git a/databases/msql/Makefile b/databases/msql/Makefile index 4ece71bf2146..cc5324ad1388 100644 --- a/databases/msql/Makefile +++ b/databases/msql/Makefile @@ -7,7 +7,7 @@ PORTNAME= msql PORTVERSION= 2.0.12 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= databases MAINTAINER= ports@FreeBSD.org @@ -19,6 +19,7 @@ USE_PERL5= YES # Not free for commercial use. RESTRICTED= "restrictive copyright (no commercial use)" +CFLAGS+= -DANSI_ARGS MAKE_ENV+= WRKSRC=${WRKSRC} # Uncomment this if you're upgrading from <= b4 to >= b5 and have already diff --git a/databases/msql/files/patch-az b/databases/msql/files/patch-az new file mode 100644 index 000000000000..bf2ebbbec755 --- /dev/null +++ b/databases/msql/files/patch-az @@ -0,0 +1,52 @@ +--- src/common/debug.c.bak Mon Aug 20 05:19:27 2001 ++++ src/common/debug.c Thu Sep 11 10:38:57 2003 +@@ -18,7 +18,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <string.h> + #include "debug.h" + +@@ -136,26 +136,20 @@ + + + +-void _msqlTrace(va_alist) +- va_dcl ++void _msqlTrace(int dir, char *fmt, ...) + { + va_list args; +- char *fmt, +- *tag; +- int loop, +- dir; ++ char *tag; ++ int loop; + static int indent = 0; + static char inTag[] = "-->", + outTag[] = "<--"; + +- va_start(args); + if (! (debugLevel & MOD_TRACE)) + { +- va_end(args); + return; + } + +- dir = va_arg(args, int); + if (dir == TRACE_IN) + { + tag = inTag; +@@ -163,9 +157,9 @@ + } + else + tag = outTag; +- fmt = (char *)va_arg(args, char *); + if (!fmt) + return; ++ va_start(args, fmt); + (void)vsprintf(msqlDebugBuf,fmt,args); + va_end(args); + printf("[%s] ",PROGNAME); diff --git a/databases/msql/files/patch-ba b/databases/msql/files/patch-ba new file mode 100644 index 000000000000..edbfe3c187c0 --- /dev/null +++ b/databases/msql/files/patch-ba @@ -0,0 +1,11 @@ +--- src/common/debug.h.bak Mon Aug 20 05:19:27 2001 ++++ src/common/debug.h Thu Sep 11 10:44:11 2003 +@@ -31,7 +31,7 @@ + #define TRACE_OUT 2 + + void _msqlDebug(); +-void _msqlTrace(); ++void _msqlTrace(int, char *, ...); + void initDebug(); + int debugSet(); + diff --git a/databases/msql/files/patch-bb b/databases/msql/files/patch-bb new file mode 100644 index 000000000000..aec86b51037d --- /dev/null +++ b/databases/msql/files/patch-bb @@ -0,0 +1,63 @@ +--- src/common/strlib.c.bak Mon Aug 20 05:19:28 2001 ++++ src/common/strlib.c Thu Sep 11 10:49:42 2003 +@@ -19,7 +19,7 @@ + #include <stdlib.h> + #include <unistd.h> + #include <string.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <ctype.h> + #include <common/portability.h> + +@@ -92,18 +92,16 @@ + */ + + +-char *dsprintf(va_alist) +- va_dcl ++char *dsprintf(char *fmt, ...) + { + va_list args; + int len; +- char *fmt, +- *tmp; ++ char *tmp; + +- va_start(args); +- fmt = va_arg(args, char *); + (void) bzero(strBuf,STR_LEN); ++ va_start(args, fmt); + (void) vsprintf(strBuf,fmt,args); ++ va_end(args); + len = strlen(strBuf); + tmp = (char *)strdup(strBuf); + if (!tmp) +@@ -130,24 +128,20 @@ + ** Notes : old string is freed + */ + +-char *dcsprintf(va_alist) +- va_dcl ++char *dcsprintf(char *s1, char *fmt, ...) + { + va_list args; +- char *s1, +- *tmp, +- *fmt; ++ char *tmp; + +- va_start(args); +- s1 = va_arg(args, char *); +- fmt = va_arg(args, char *); + (void)bzero(strBuf,STR_LEN); + if (s1) + { + (void)strcpy(strBuf,s1); + (void)free(s1); + } ++ va_start(args, fmt); + (void) vsprintf(strBuf + strlen(strBuf),fmt,args); ++ va_end(args); + tmp = (char *) strdup(strBuf); + if (!tmp) + { 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); diff --git a/databases/msql3/Makefile b/databases/msql3/Makefile index 4ece71bf2146..cc5324ad1388 100644 --- a/databases/msql3/Makefile +++ b/databases/msql3/Makefile @@ -7,7 +7,7 @@ PORTNAME= msql PORTVERSION= 2.0.12 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= databases MAINTAINER= ports@FreeBSD.org @@ -19,6 +19,7 @@ USE_PERL5= YES # Not free for commercial use. RESTRICTED= "restrictive copyright (no commercial use)" +CFLAGS+= -DANSI_ARGS MAKE_ENV+= WRKSRC=${WRKSRC} # Uncomment this if you're upgrading from <= b4 to >= b5 and have already diff --git a/databases/msql3/files/patch-az b/databases/msql3/files/patch-az new file mode 100644 index 000000000000..bf2ebbbec755 --- /dev/null +++ b/databases/msql3/files/patch-az @@ -0,0 +1,52 @@ +--- src/common/debug.c.bak Mon Aug 20 05:19:27 2001 ++++ src/common/debug.c Thu Sep 11 10:38:57 2003 +@@ -18,7 +18,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <string.h> + #include "debug.h" + +@@ -136,26 +136,20 @@ + + + +-void _msqlTrace(va_alist) +- va_dcl ++void _msqlTrace(int dir, char *fmt, ...) + { + va_list args; +- char *fmt, +- *tag; +- int loop, +- dir; ++ char *tag; ++ int loop; + static int indent = 0; + static char inTag[] = "-->", + outTag[] = "<--"; + +- va_start(args); + if (! (debugLevel & MOD_TRACE)) + { +- va_end(args); + return; + } + +- dir = va_arg(args, int); + if (dir == TRACE_IN) + { + tag = inTag; +@@ -163,9 +157,9 @@ + } + else + tag = outTag; +- fmt = (char *)va_arg(args, char *); + if (!fmt) + return; ++ va_start(args, fmt); + (void)vsprintf(msqlDebugBuf,fmt,args); + va_end(args); + printf("[%s] ",PROGNAME); diff --git a/databases/msql3/files/patch-ba b/databases/msql3/files/patch-ba new file mode 100644 index 000000000000..edbfe3c187c0 --- /dev/null +++ b/databases/msql3/files/patch-ba @@ -0,0 +1,11 @@ +--- src/common/debug.h.bak Mon Aug 20 05:19:27 2001 ++++ src/common/debug.h Thu Sep 11 10:44:11 2003 +@@ -31,7 +31,7 @@ + #define TRACE_OUT 2 + + void _msqlDebug(); +-void _msqlTrace(); ++void _msqlTrace(int, char *, ...); + void initDebug(); + int debugSet(); + diff --git a/databases/msql3/files/patch-bb b/databases/msql3/files/patch-bb new file mode 100644 index 000000000000..aec86b51037d --- /dev/null +++ b/databases/msql3/files/patch-bb @@ -0,0 +1,63 @@ +--- src/common/strlib.c.bak Mon Aug 20 05:19:28 2001 ++++ src/common/strlib.c Thu Sep 11 10:49:42 2003 +@@ -19,7 +19,7 @@ + #include <stdlib.h> + #include <unistd.h> + #include <string.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <ctype.h> + #include <common/portability.h> + +@@ -92,18 +92,16 @@ + */ + + +-char *dsprintf(va_alist) +- va_dcl ++char *dsprintf(char *fmt, ...) + { + va_list args; + int len; +- char *fmt, +- *tmp; ++ char *tmp; + +- va_start(args); +- fmt = va_arg(args, char *); + (void) bzero(strBuf,STR_LEN); ++ va_start(args, fmt); + (void) vsprintf(strBuf,fmt,args); ++ va_end(args); + len = strlen(strBuf); + tmp = (char *)strdup(strBuf); + if (!tmp) +@@ -130,24 +128,20 @@ + ** Notes : old string is freed + */ + +-char *dcsprintf(va_alist) +- va_dcl ++char *dcsprintf(char *s1, char *fmt, ...) + { + va_list args; +- char *s1, +- *tmp, +- *fmt; ++ char *tmp; + +- va_start(args); +- s1 = va_arg(args, char *); +- fmt = va_arg(args, char *); + (void)bzero(strBuf,STR_LEN); + if (s1) + { + (void)strcpy(strBuf,s1); + (void)free(s1); + } ++ va_start(args, fmt); + (void) vsprintf(strBuf + strlen(strBuf),fmt,args); ++ va_end(args); + tmp = (char *) strdup(strBuf); + if (!tmp) + { diff --git a/databases/msql3/files/patch-bc b/databases/msql3/files/patch-bc new file mode 100644 index 000000000000..f5a964025c22 --- /dev/null +++ b/databases/msql3/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); |