From 2899bb537c00f2e2666c8c87b3a72a0a9df40328 Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 26 Mar 2020 02:35:31 +0000 Subject: Deal with const issues. Do not put C headers into a namespace. --- emulators/vba/distinfo | 7 ++++-- emulators/vba/patches/patch-ag | 38 +++++++++++++++++++++++++++++- emulators/vba/patches/patch-src_GBA.cpp | 40 ++++++++++++++++++++++++++++++++ emulators/vba/patches/patch-src_expr.cpp | 17 ++++++++++++++ emulators/vba/patches/patch-src_expr.y | 15 ++++++++++++ 5 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 emulators/vba/patches/patch-src_GBA.cpp create mode 100644 emulators/vba/patches/patch-src_expr.cpp create mode 100644 emulators/vba/patches/patch-src_expr.y (limited to 'emulators/vba') diff --git a/emulators/vba/distinfo b/emulators/vba/distinfo index b5fee3bb4b4..fb35c3dc7e8 100644 --- a/emulators/vba/distinfo +++ b/emulators/vba/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2015/11/03 20:31:10 agc Exp $ +$NetBSD: distinfo,v 1.10 2020/03/26 02:35:31 joerg Exp $ SHA1 (VisualBoyAdvance-src-1.7.2.tar.gz) = 04d82406079563fd17cda07f72488185e9152f51 RMD160 (VisualBoyAdvance-src-1.7.2.tar.gz) = 44f94a4f270f2cda25879681c52892f6978caf99 @@ -10,6 +10,9 @@ SHA1 (patch-ac) = 33158335dc12f335471d10962b4552082b589d25 SHA1 (patch-ad) = b61c4053bbed582db5df2039c20b436e1d9e1ff1 SHA1 (patch-ae) = b7e08365abd77b5c0f3473b4ce091b747298dfc8 SHA1 (patch-af) = a3db22d606c34388f20ee29d9e8a1259346d105a -SHA1 (patch-ag) = 8ba72402bb66d78e1f141792375fc25dc1ee553e +SHA1 (patch-ag) = 851294d294c625badcdb6a0c9e7dcd6edd834620 +SHA1 (patch-src_GBA.cpp) = 8845f79e9b33469bc5eac0cc186038edb9bb8925 +SHA1 (patch-src_expr.cpp) = 7d43a3b77d7de9dc225f03e695891977c3dd50b8 +SHA1 (patch-src_expr.y) = 41ac1c39250c763157bdc3b64a83d4178f9ba0fa 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 dbbc13dee81..b15dc9e980a 100644 --- a/emulators/vba/patches/patch-ag +++ b/emulators/vba/patches/patch-ag @@ -1,4 +1,4 @@ -$NetBSD: patch-ag,v 1.3 2012/09/29 21:27:14 dholland Exp $ +$NetBSD: patch-ag,v 1.4 2020/03/26 02:35:31 joerg Exp $ - Fix build with png-1.5. - Do not use void * as a synonym for gzFile, as gzFile is no longer @@ -25,6 +25,42 @@ $NetBSD: patch-ag,v 1.3 2012/09/29 21:27:14 dholland Exp $ png_destroy_write_struct(&png_ptr,NULL); fclose(fp); return false; +@@ -478,7 +478,7 @@ bool utilIsGBAImage(const char * file) + { + cpuIsMultiBoot = false; + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".gba") == 0) +@@ -502,7 +502,7 @@ bool utilIsGBAImage(const char * file) + bool utilIsGBImage(const char * file) + { + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".gb") == 0) +@@ -522,7 +522,7 @@ bool utilIsGBImage(const char * file) + bool utilIsZipFile(const char *file) + { + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".zip") == 0) +@@ -552,7 +552,7 @@ bool utilIsRarFile(const char *file) + bool utilIsGzipFile(const char *file) + { + if(strlen(file) > 3) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".gz") == 0) @@ -984,7 +984,7 @@ void utilWriteData(gzFile gzFile, variab gzFile utilGzOpen(const char *file, const char *mode) diff --git a/emulators/vba/patches/patch-src_GBA.cpp b/emulators/vba/patches/patch-src_GBA.cpp new file mode 100644 index 00000000000..bb1f99f52f6 --- /dev/null +++ b/emulators/vba/patches/patch-src_GBA.cpp @@ -0,0 +1,40 @@ +$NetBSD: patch-src_GBA.cpp,v 1.1 2020/03/26 02:35:31 joerg Exp $ + +--- src/GBA.cpp.orig 2020-03-26 01:54:39.059748437 +0000 ++++ src/GBA.cpp +@@ -1130,7 +1130,7 @@ bool CPUWriteBMPFile(const char *fileNam + bool CPUIsZipFile(const char * file) + { + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".zip") == 0) +@@ -1145,7 +1145,7 @@ bool CPUIsGBAImage(const char * file) + { + cpuIsMultiBoot = false; + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".gba") == 0) +@@ -1169,7 +1169,7 @@ bool CPUIsGBAImage(const char * file) + bool CPUIsGBABios(const char * file) + { + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".gba") == 0) +@@ -1189,7 +1189,7 @@ bool CPUIsGBABios(const char * file) + bool CPUIsELF(const char *file) + { + if(strlen(file) > 4) { +- char * p = strrchr(file,'.'); ++ const char * p = strrchr(file,'.'); + + if(p != NULL) { + if(_stricmp(p, ".elf") == 0) diff --git a/emulators/vba/patches/patch-src_expr.cpp b/emulators/vba/patches/patch-src_expr.cpp new file mode 100644 index 00000000000..66bd5114a81 --- /dev/null +++ b/emulators/vba/patches/patch-src_expr.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-src_expr.cpp,v 1.1 2020/03/26 02:35:31 joerg Exp $ + +--- src/expr.cpp.orig 2020-03-26 02:01:18.613760749 +0000 ++++ src/expr.cpp +@@ -14,12 +14,10 @@ + + #line 1 "expr.y" + +-namespace std { + #include + #include + #include + #include +-} + + using namespace std; + diff --git a/emulators/vba/patches/patch-src_expr.y b/emulators/vba/patches/patch-src_expr.y new file mode 100644 index 00000000000..73ddda03603 --- /dev/null +++ b/emulators/vba/patches/patch-src_expr.y @@ -0,0 +1,15 @@ +$NetBSD: patch-src_expr.y,v 1.1 2020/03/26 02:35:31 joerg Exp $ + +--- src/expr.y.orig 2020-03-26 02:00:05.333831596 +0000 ++++ src/expr.y +@@ -1,10 +1,8 @@ + %{ +-namespace std { + #include + #include + #include + #include +-} + + using namespace std; + -- cgit v1.2.3