diff options
author | rillig <rillig> | 2005-03-14 14:55:24 +0000 |
---|---|---|
committer | rillig <rillig> | 2005-03-14 14:55:24 +0000 |
commit | 48725b9b5e1d886324a8c3636b0c07b296226650 (patch) | |
tree | 949b53bcd2e0274ee79e64528676c8fc8b579aa3 /graphics/gliv/patches | |
parent | 47f3e60c379a8a59ace5d60aa7ec23a1b23438bc (diff) | |
download | pkgsrc-48725b9b5e1d886324a8c3636b0c07b296226650.tar.gz |
Added the patches for the last change.
Diffstat (limited to 'graphics/gliv/patches')
-rw-r--r-- | graphics/gliv/patches/patch-aa | 93 | ||||
-rw-r--r-- | graphics/gliv/patches/patch-ab | 44 |
2 files changed, 137 insertions, 0 deletions
diff --git a/graphics/gliv/patches/patch-aa b/graphics/gliv/patches/patch-aa new file mode 100644 index 00000000000..c4f0cd1ce81 --- /dev/null +++ b/graphics/gliv/patches/patch-aa @@ -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 --git a/graphics/gliv/patches/patch-ab b/graphics/gliv/patches/patch-ab new file mode 100644 index 00000000000..287c7345236 --- /dev/null +++ b/graphics/gliv/patches/patch-ab @@ -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 */ + |