summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2012-09-29 21:27:14 +0000
committerdholland <dholland@pkgsrc.org>2012-09-29 21:27:14 +0000
commit0bd7f00b9e4d5f0c35b0fd0e8c17120c78eaec54 (patch)
treef1dcabcffe76dddb3c2e509504e80909b7203f80 /emulators
parent82a8f753c2f4a8265f43d6d8e0e459b6903001aa (diff)
downloadpkgsrc-0bd7f00b9e4d5f0c35b0fd0e8c17120c78eaec54.tar.gz
Use const syntax correctly. const void * != void *const, and likewise,
given the libz typedef "voidp" for void *, "const voidp" does not magically inject const inside the typedef'd type. Use the libz typedef "voidpc" instead. May fix PR 46996.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/vba/distinfo6
-rw-r--r--emulators/vba/patches/patch-ag20
-rw-r--r--emulators/vba/patches/patch-src_memgzio.c15
-rw-r--r--emulators/vba/patches/patch-src_memgzio.h14
4 files changed, 48 insertions, 7 deletions
diff --git a/emulators/vba/distinfo b/emulators/vba/distinfo
index 5f394663c51..a5c384ee719 100644
--- a/emulators/vba/distinfo
+++ b/emulators/vba/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2012/07/18 21:55:40 marino Exp $
+$NetBSD: distinfo,v 1.8 2012/09/29 21:27:14 dholland Exp $
SHA1 (VisualBoyAdvance-src-1.7.2.tar.gz) = 04d82406079563fd17cda07f72488185e9152f51
RMD160 (VisualBoyAdvance-src-1.7.2.tar.gz) = 44f94a4f270f2cda25879681c52892f6978caf99
@@ -9,4 +9,6 @@ SHA1 (patch-ac) = 33158335dc12f335471d10962b4552082b589d25
SHA1 (patch-ad) = b61c4053bbed582db5df2039c20b436e1d9e1ff1
SHA1 (patch-ae) = b7e08365abd77b5c0f3473b4ce091b747298dfc8
SHA1 (patch-af) = a3db22d606c34388f20ee29d9e8a1259346d105a
-SHA1 (patch-ag) = 35913566125b1d1ed8ed3a514664cd7167ed2c22
+SHA1 (patch-ag) = 8ba72402bb66d78e1f141792375fc25dc1ee553e
+SHA1 (patch-src_memgzio.c) = bae20f8c724a489f36b48c62b81dc7d9a505fe0c
+SHA1 (patch-src_memgzio.h) = dae47bb6fb77f2d28b5317d140fb7c32a6db3573
diff --git a/emulators/vba/patches/patch-ag b/emulators/vba/patches/patch-ag
index f118f6c9345..dbbc13dee81 100644
--- a/emulators/vba/patches/patch-ag
+++ b/emulators/vba/patches/patch-ag
@@ -1,11 +1,21 @@
-$NetBSD: patch-ag,v 1.2 2012/07/18 21:55:41 marino Exp $
+$NetBSD: patch-ag,v 1.3 2012/09/29 21:27:14 dholland Exp $
-Fix build with png-1.5.
-GzFile change from void * in libz 1.2.6
-This change required to compile with libz >= 1.2.6
+- Fix build with png-1.5.
+- Do not use void * as a synonym for gzFile, as gzFile is no longer
+ void * in libz 1.2.6.
+- Use const syntax correctly: const void * != void *const.
--- src/Util.cpp.orig 2004-05-20 17:42:37.000000000 +0000
+++ src/Util.cpp
+@@ -47,7 +47,7 @@ extern "C" {
+ #define _stricmp strcasecmp
+ #endif // ! _MSC_VER
+
+-static int (*utilGzWriteFunc)(gzFile, const voidp, unsigned int) = NULL;
++static int (*utilGzWriteFunc)(gzFile, voidpc, unsigned int) = NULL;
+ static int (*utilGzReadFunc)(gzFile, voidp, unsigned int) = NULL;
+ static int (*utilGzCloseFunc)(gzFile) = NULL;
+
@@ -79,7 +79,7 @@ bool utilWritePNGFile(const char *fileNa
return false;
}
@@ -20,7 +30,7 @@ This change required to compile with libz >= 1.2.6
gzFile utilGzOpen(const char *file, const char *mode)
{
- utilGzWriteFunc = (int (*)(void *,void * const, unsigned int))gzwrite;
-+ utilGzWriteFunc = (int (*)(gzFile, void * const, unsigned int))gzwrite;
++ utilGzWriteFunc = (int (*)(gzFile, const void *, unsigned int))gzwrite;
utilGzReadFunc = gzread;
utilGzCloseFunc = gzclose;
diff --git a/emulators/vba/patches/patch-src_memgzio.c b/emulators/vba/patches/patch-src_memgzio.c
new file mode 100644
index 00000000000..aff26d496ec
--- /dev/null
+++ b/emulators/vba/patches/patch-src_memgzio.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_memgzio.c,v 1.1 2012/09/29 21:27:14 dholland Exp $
+
+- Use const types correctly: const void * != void *const.
+
+--- src/memgzio.c~ 2004-01-17 23:07:32.000000000 +0000
++++ src/memgzio.c
+@@ -540,7 +540,7 @@ int ZEXPORT memgzread (file, buf, len)
+ */
+ int ZEXPORT memgzwrite (file, buf, len)
+ gzFile file;
+- const voidp buf;
++ voidpc buf;
+ unsigned len;
+ {
+ mem_stream *s = (mem_stream*)file;
diff --git a/emulators/vba/patches/patch-src_memgzio.h b/emulators/vba/patches/patch-src_memgzio.h
new file mode 100644
index 00000000000..d494f9d1ea1
--- /dev/null
+++ b/emulators/vba/patches/patch-src_memgzio.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_memgzio.h,v 1.1 2012/09/29 21:27:14 dholland Exp $
+
+- Use const types correctly: const void * != void *const.
+
+--- src/memgzio.h~ 2003-07-24 13:21:52.000000000 +0000
++++ src/memgzio.h
+@@ -16,6 +16,6 @@
+
+ gzFile ZEXPORT memgzopen(char *memory, int, const char *);
+ int ZEXPORT memgzread(gzFile, voidp, unsigned);
+-int ZEXPORT memgzwrite(gzFile, const voidp, unsigned);
++int ZEXPORT memgzwrite(gzFile, voidpc, unsigned);
+ int ZEXPORT memgzclose(gzFile);
+ long ZEXPORT memtell(gzFile);