pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/gliv/patches Added the patches for the last c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6f768796c640
branches:  trunk
changeset: 490521:6f768796c640
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Mar 14 14:55:24 2005 +0000

description:
Added the patches for the last change.

diffstat:

 graphics/gliv/patches/patch-aa |  93 ++++++++++++++++++++++++++++++++++++++++++
 graphics/gliv/patches/patch-ab |  44 +++++++++++++++++++
 2 files changed, 137 insertions(+), 0 deletions(-)

diffs (145 lines):

diff -r 844c1298891f -r 6f768796c640 graphics/gliv/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gliv/patches/patch-aa    Mon Mar 14 14:55:24 2005 +0000
@@ -0,0 +1,93 @@
+$NetBSD: patch-aa,v 1.3 2005/03/14 14:55:24 rillig Exp $
+
+gcc-2.95.3 does not like unnamed structs and unions.
+
+Needed for NetBSD-1.6.2.
+
+--- src/collection.c.orig      Tue Jan  4 20:40:06 2005
++++ src/collection.c   Sat Mar 12 11:43:37 2005
+@@ -714,8 +714,8 @@ struct coll_src {
+             guchar *base;
+             guchar *ptr;
+             guchar *end;
+-        };
+-    };
++        } s;
++    } u;
+ };
+ 
+ static void free_buffer(struct coll_src *source, guchar * buffer)
+@@ -731,16 +731,16 @@ static guchar *read_buffer(struct coll_s
+ 
+     if (source->is_file) {
+         data = g_new(guchar, length);
+-        if (fread(data, 1, length, source->file) != length) {
++        if (fread(data, 1, length, source->u.file) != length) {
+             g_free(data);
+             return NULL;
+         }
+     } else {
+-        if (source->ptr + length > source->end)
++        if (source->u.s.ptr + length > source->u.s.end)
+             return NULL;
+ 
+-        data = source->ptr;
+-        source->ptr += length;
++        data = source->u.s.ptr;
++        source->u.s.ptr += length;
+     }
+ 
+     if (is_string && data[length - 1] != '\0') {
+@@ -754,12 +754,12 @@ static guchar *read_buffer(struct coll_s
+ static gint read_char(struct coll_src *source)
+ {
+     if (source->is_file)
+-        return fgetc(source->file);
++        return fgetc(source->u.file);
+ 
+-    if (source->ptr >= source->end)
++    if (source->u.s.ptr >= source->u.s.end)
+         return EOF;
+ 
+-    return *(source->ptr++);
++    return *(source->u.s.ptr++);
+ }
+ 
+ static GdkPixbufDestroyNotify destroy_func(struct coll_src *source)
+@@ -931,22 +931,22 @@ static struct coll_src *build_source(FIL
+         goto no_mmap;
+     }
+ 
+-    source->base = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fileno(file), 0);
+-    if (source->base == MAP_FAILED) {
++    source->u.s.base = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fileno(file), 0);
++    if (source->u.s.base == MAP_FAILED) {
+         perror("mmap");
+         goto no_mmap;
+     }
+ 
+     source->is_file = FALSE;
+-    source->ptr = source->base;
+-    source->end = source->base + length;
++    source->u.s.ptr = source->u.s.base;
++    source->u.s.end = source->u.s.base + length;
+     goto ok;
+ 
+   no_mmap:
+     fseeko(file, 0, SEEK_SET);
+ 
+     source->is_file = TRUE;
+-    source->file = file;
++    source->u.file = file;
+ 
+   ok:
+     return source;
+@@ -955,7 +955,7 @@ static struct coll_src *build_source(FIL
+ static void destroy_source(struct coll_src *source, gboolean ok)
+ {
+     if (ok == FALSE && source->is_file == FALSE)
+-        if (munmap(source->base, source->end - source->base) < 0)
++        if (munmap(source->u.s.base, source->u.s.end - source->u.s.base) < 0)
+             perror("munmap");
+ }
+ 
diff -r 844c1298891f -r 6f768796c640 graphics/gliv/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/gliv/patches/patch-ab    Mon Mar 14 14:55:24 2005 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-ab,v 1.1 2005/03/14 14:55:25 rillig Exp $
+
+gcc-2.95.3 does not like declarations intermixed with code.
+
+Needed for NetBSD-1.6.2.
+
+--- src/options.c.orig Mon Dec 20 00:24:26 2004
++++ src/options.c      Sat Mar 12 11:50:17 2005
+@@ -204,7 +204,7 @@ static gboolean on_read_config_realize(G
+     if (filename == NULL)
+         filename = _("NONE");
+ 
+-    gchar *text =
++    {gchar *text =
+         g_strdup_printf(_("This configuration file has been read: %s"),
+                         filename);
+ 
+@@ -212,7 +212,7 @@ static gboolean on_read_config_realize(G
+     g_free(text);
+ 
+     return FALSE;
+-}
++}}
+ 
+ static gboolean on_write_config_realize(GtkLabel * widget)
+ {
+@@ -221,7 +221,7 @@ static gboolean on_write_config_realize(
+     if (filename == NULL)
+         filename = _("NONE");
+ 
+-    gchar *text =
++    {gchar *text =
+         g_strdup_printf(_("This configuration file will be written: %s"),
+                         filename);
+ 
+@@ -229,7 +229,7 @@ static gboolean on_write_config_realize(
+     g_free(text);
+ 
+     return FALSE;
+-}
++}}
+ 
+ /* Transitions */
+ 



Home | Main Index | Thread Index | Old Index