diff options
author | fvdl <fvdl@pkgsrc.org> | 2003-11-11 13:39:09 +0000 |
---|---|---|
committer | fvdl <fvdl@pkgsrc.org> | 2003-11-11 13:39:09 +0000 |
commit | 6541bd67d72dea6707619e6e2ebcbc834662cbcf (patch) | |
tree | b9c3696b03c577c8a14a180f64ce4fab4d828f8f /devel | |
parent | 225d4df044d84b58b04b73f5be27dd5186767235 (diff) | |
download | pkgsrc-6541bd67d72dea6707619e6e2ebcbc834662cbcf.tar.gz |
For the 'trio' varargs functions, don't pass a reference to a va_list
argument to the level below; it's not portable. Use va_copy to
create a new copy, and pass a reference to that instead.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glib2/distinfo | 11 | ||||
-rw-r--r-- | devel/glib2/patches/patch-aa | 24 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ab | 269 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ac | 33 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ad | 30 |
5 files changed, 305 insertions, 62 deletions
diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index a6e9046c60f..b047bbbcbda 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.19 2003/09/27 20:18:37 danw Exp $ +$NetBSD: distinfo,v 1.20 2003/11/11 13:39:09 fvdl Exp $ SHA1 (glib-2.2.3.tar.bz2) = 05580cbe110b94dd5020a07cf6d380190a2a13af Size (glib-2.2.3.tar.bz2) = 1636987 bytes -SHA1 (patch-aa) = 6f1a12477763df0edcffd58819e2319f2bfbef4a -SHA1 (patch-ab) = cf7fd8b57974a01a718ccacb622f874993034de2 -SHA1 (patch-ac) = 6e97c0b3360609f0a4f0f74cd5060f4068364933 -SHA1 (patch-ad) = 13c4bdafc931b8db5d9f83a0035db2244c5be1d1 +SHA1 (patch-aa) = 29ff7360a007d3d02cc3c28dce20e42ccf24bd5a +SHA1 (patch-ab) = 6713466fc35ee8aed6cb9e7ab52519c632891e56 +SHA1 (patch-ac) = 1b94c567ac0086abfc927f5af1e657f14b091218 +SHA1 (patch-ad) = 58739c123a640a66206c9afa8c28d81e3eb02986 +SHA1 (patch-ae) = fcbd0e4e3bab6805c829c10ae5f3be405b1e9bb5 diff --git a/devel/glib2/patches/patch-aa b/devel/glib2/patches/patch-aa index d777bea05b2..69e82555444 100644 --- a/devel/glib2/patches/patch-aa +++ b/devel/glib2/patches/patch-aa @@ -1,13 +1,13 @@ -$NetBSD: patch-aa,v 1.8 2003/01/29 10:18:35 tron Exp $ +$NetBSD: patch-aa,v 1.9 2003/11/11 13:39:09 fvdl Exp $ ---- gthread/gthread-posix.c.orig 2002-11-04 21:04:55.000000000 +0100 -+++ gthread/gthread-posix.c 2003-01-28 11:05:52.000000000 +0100 -@@ -97,7 +97,7 @@ - # error This should not happen. Contact the GLib team. - #endif - --#if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY) -+#if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) - # define HAVE_PRIORITIES 1 - static gint priority_normal_value; - # ifdef __FreeBSD__ +--- configure.orig 2003-08-26 18:42:14.000000000 +0200 ++++ configure +@@ -31199,7 +31199,7 @@ fi + # b) libtool doesn't recognize -pthread as a library dependency. + # + case $host in +- *-*-linux*) ++ *-*-linux* | *-*-netbsd*) + G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" + ;; + *) diff --git a/devel/glib2/patches/patch-ab b/devel/glib2/patches/patch-ab index b0add5a45d3..562f6762086 100644 --- a/devel/glib2/patches/patch-ab +++ b/devel/glib2/patches/patch-ab @@ -1,13 +1,258 @@ -$NetBSD: patch-ab,v 1.6 2003/02/09 00:57:14 chris Exp $ +$NetBSD: patch-ab,v 1.7 2003/11/11 13:39:09 fvdl Exp $ ---- configure.orig 2003-02-09 00:44:10.000000000 +0000 -+++ configure 2003-02-09 00:46:14.000000000 +0000 -@@ -19025,7 +19025,7 @@ - # b) libtool doesn't recognize -pthread as a library dependency. - # - case $host in -- *-*-linux*) -+ *-*-linux* | *-*-netbsd*) - G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" - ;; - *) +--- glib/trio/trio.c.orig 2003-08-26 02:17:43.000000000 +0200 ++++ glib/trio/trio.c +@@ -3575,9 +3575,12 @@ TRIO_ARGS2((format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; ++ + assert(VALID(format)); + +- return TrioFormat(stdout, 0, TrioOutStreamFile, format, &args, NULL); ++ va_copy(args2, args); ++ return TrioFormat(stdout, 0, TrioOutStreamFile, format, &args2, NULL); + } + + /** +@@ -3644,10 +3647,13 @@ TRIO_ARGS3((file, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; ++ + assert(VALID(file)); + assert(VALID(format)); +- +- return TrioFormat(file, 0, TrioOutStreamFile, format, &args, NULL); ++ ++ va_copy(args2, args); ++ return TrioFormat(file, 0, TrioOutStreamFile, format, &args2, NULL); + } + + /** +@@ -3716,9 +3722,12 @@ TRIO_ARGS3((fd, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; ++ + assert(VALID(format)); +- +- return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, &args, NULL); ++ ++ va_copy(args2, args); ++ return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, &args2, NULL); + } + + /** +@@ -3775,6 +3784,7 @@ TRIO_ARGS4((stream, closure, format, arg + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + trio_custom_t data; + + assert(VALID(stream)); +@@ -3782,7 +3792,8 @@ TRIO_ARGS4((stream, closure, format, arg + + data.stream.out = stream; + data.closure = closure; +- return TrioFormat(&data, 0, TrioOutStreamCustom, format, &args, NULL); ++ va_copy(args2, args); ++ return TrioFormat(&data, 0, TrioOutStreamCustom, format, &args2, NULL); + } + + TRIO_PUBLIC int +@@ -3850,12 +3861,14 @@ TRIO_ARGS3((buffer, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + int status; + + assert(VALID(buffer)); + assert(VALID(format)); + +- status = TrioFormat(&buffer, 0, TrioOutStreamString, format, &args, NULL); ++ va_copy(args2, args); ++ status = TrioFormat(&buffer, 0, TrioOutStreamString, format, &args2, NULL); + *buffer = NIL; + return status; + } +@@ -3938,13 +3951,15 @@ TRIO_ARGS4((buffer, max, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + int status; + + assert(max == 0 || VALID(buffer)); + assert(VALID(format)); + ++ va_copy(args2, args); + status = TrioFormat(&buffer, max > 0 ? max - 1 : 0, +- TrioOutStreamStringMax, format, &args, NULL); ++ TrioOutStreamStringMax, format, &args2, NULL); + if (max > 0) + *buffer = NIL; + return status; +@@ -4019,6 +4034,7 @@ TRIO_ARGS4((buffer, max, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + int status; + size_t buf_len; + +@@ -4027,8 +4043,9 @@ TRIO_ARGS4((buffer, max, format, args), + + buf_len = trio_length(buffer); + buffer = &buffer[buf_len]; ++ va_copy(args2, args); + status = TrioFormat(&buffer, max - 1 - buf_len, +- TrioOutStreamStringMax, format, &args, NULL); ++ TrioOutStreamStringMax, format, &args2, NULL); + *buffer = NIL; + return status; + } +@@ -4072,6 +4089,7 @@ TRIO_ARGS2((format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + trio_string_t *info; + char *result = NULL; + +@@ -4080,8 +4098,9 @@ TRIO_ARGS2((format, args), + info = trio_xstring_duplicate(""); + if (info) + { ++ va_copy(args2, args); + (void)TrioFormat(info, 0, TrioOutStreamStringDynamic, +- format, &args, NULL); ++ format, &args2, NULL); + trio_string_terminate(info); + result = trio_string_extract(info); + trio_string_destroy(info); +@@ -4132,6 +4151,7 @@ TRIO_ARGS3((result, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + int status; + trio_string_t *info; + +@@ -4146,8 +4166,9 @@ TRIO_ARGS3((result, format, args), + } + else + { ++ va_copy(args2, args); + status = TrioFormat(info, 0, TrioOutStreamStringDynamic, +- format, &args, NULL); ++ format, &args2, NULL); + if (status >= 0) + { + trio_string_terminate(info); +@@ -4834,9 +4855,11 @@ TRIO_ARGS3((ref, format, arglist), + TRIO_CONST char *format, + va_list arglist) + { ++ va_list args2; + assert(VALID(format)); +- +- return TrioFormatRef((trio_reference_t *)ref, format, &arglist, NULL); ++ ++ va_copy(args2, arglist); ++ return TrioFormatRef((trio_reference_t *)ref, format, &args2, NULL); + } + + /************************************************************************* +@@ -6487,11 +6510,13 @@ TRIO_ARGS2((format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + assert(VALID(format)); +- ++ ++ va_copy(args2, args); + return TrioScan((trio_pointer_t)stdin, 0, + TrioInStreamFile, +- format, &args, NULL); ++ format, &args2, NULL); + } + + TRIO_PUBLIC int +@@ -6538,12 +6563,15 @@ TRIO_ARGS3((file, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; ++ + assert(VALID(file)); + assert(VALID(format)); +- ++ ++ va_copy(args2, args); + return TrioScan((trio_pointer_t)file, 0, + TrioInStreamFile, +- format, &args, NULL); ++ format, &args2, NULL); + } + + TRIO_PUBLIC int +@@ -6591,11 +6619,13 @@ TRIO_ARGS3((fd, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + assert(VALID(format)); +- ++ ++ va_copy(args2, args); + return TrioScan((trio_pointer_t)&fd, 0, + TrioInStreamFileDescriptor, +- format, &args, NULL); ++ format, &args2, NULL); + } + + TRIO_PUBLIC int +@@ -6646,6 +6676,7 @@ TRIO_ARGS4((stream, closure, format, arg + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; + trio_custom_t data; + + assert(VALID(stream)); +@@ -6653,7 +6684,9 @@ TRIO_ARGS4((stream, closure, format, arg + + data.stream.in = stream; + data.closure = closure; +- return TrioScan(&data, 0, TrioInStreamCustom, format, &args, NULL); ++ ++ va_copy(args2, args); ++ return TrioScan(&data, 0, TrioInStreamCustom, format, &args2, NULL); + } + + TRIO_PUBLIC int +@@ -6705,12 +6738,15 @@ TRIO_ARGS3((buffer, format, args), + TRIO_CONST char *format, + va_list args) + { ++ va_list args2; ++ + assert(VALID(buffer)); + assert(VALID(format)); +- ++ ++ va_copy(args2, args); + return TrioScan((trio_pointer_t)&buffer, 0, + TrioInStreamString, +- format, &args, NULL); ++ format, &args2, NULL); + } + + TRIO_PUBLIC int diff --git a/devel/glib2/patches/patch-ac b/devel/glib2/patches/patch-ac index 80c4e93afce..6efb25039e9 100644 --- a/devel/glib2/patches/patch-ac +++ b/devel/glib2/patches/patch-ac @@ -1,16 +1,19 @@ -$NetBSD: patch-ac,v 1.6 2003/08/27 09:06:13 wiz Exp $ +$NetBSD: patch-ac,v 1.7 2003/11/11 13:39:09 fvdl Exp $ ---- tests/patterntest.c.orig Tue Aug 19 15:43:56 2003 -+++ tests/patterntest.c -@@ -31,8 +31,10 @@ static void - verbose (const gchar *format, ...) - { - va_list args; -+ gchar *msg; -+ - va_start (args, format); -- gchar *msg = g_strdup_vprintf (format, args); -+ msg = g_strdup_vprintf (format, args); - va_end (args); - if (noisy) - g_print (msg); +--- gmodule/gmodule-dyld.c.orig 2002-03-02 21:30:33.000000000 +0100 ++++ gmodule/gmodule-dyld.c +@@ -116,7 +116,13 @@ _g_module_symbol (gpointer handle, + if (NSIsSymbolNameDefined (symbol_name)) + sym = NSLookupAndBindSymbol (symbol_name); + else +- sym = NULL; ++ { ++ GModule *mod; ++ for (mod = modules, sym = NULL; mod && !sym; mod = mod->next) ++ { ++ sym = NSLookupSymbolInModule (mod->handle, symbol_name); ++ } ++ } + } + else + sym = NSLookupSymbolInModule (handle, symbol_name); diff --git a/devel/glib2/patches/patch-ad b/devel/glib2/patches/patch-ad index 2dbd4d923b3..f0fc9dc3ed8 100644 --- a/devel/glib2/patches/patch-ad +++ b/devel/glib2/patches/patch-ad @@ -1,19 +1,13 @@ -$NetBSD: patch-ad,v 1.6 2003/09/27 20:18:37 danw Exp $ +$NetBSD: patch-ad,v 1.7 2003/11/11 13:39:09 fvdl Exp $ ---- gmodule/gmodule-dyld.c.orig Sat Sep 6 13:23:40 2003 -+++ gmodule/gmodule-dyld.c Sat Sep 6 13:24:35 2003 -@@ -116,7 +116,13 @@ - if (NSIsSymbolNameDefined (symbol_name)) - sym = NSLookupAndBindSymbol (symbol_name); - else -- sym = NULL; -+ { -+ GModule *mod; -+ for (mod = modules, sym = NULL; mod && !sym; mod = mod->next) -+ { -+ sym = NSLookupSymbolInModule (mod->handle, symbol_name); -+ } -+ } - } - else - sym = NSLookupSymbolInModule (handle, symbol_name); +--- gthread/gthread-posix.c.orig 2002-11-04 21:09:47.000000000 +0100 ++++ gthread/gthread-posix.c +@@ -97,7 +97,7 @@ static gboolean posix_check_cmd_prio_war + # error This should not happen. Contact the GLib team. + #endif + +-#if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY) ++#if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) + # define HAVE_PRIORITIES 1 + static gint priority_normal_value; + # ifdef __FreeBSD__ |