freebsd-ports/emulators/vba/files/patch-src-Util.cpp

66 lines
1.9 KiB
C++
Raw Normal View History

2012-06-01 07:26:28 +02:00
--- src/Util.cpp.orig 2004-05-20 19:42:37.000000000 +0200
+++ src/Util.cpp 2012-05-02 20:49:07.000000000 +0200
@@ -79,7 +79,7 @@ bool utilWritePNGFile(const char *fileNa
2012-06-01 07:26:28 +02:00
return false;
}
- if(setjmp(png_ptr->jmpbuf)) {
+ if(setjmp(png_jmpbuf(png_ptr))) {
png_destroy_write_struct(&png_ptr,NULL);
fclose(fp);
return false;
emulators/vba: unbreak with libc++ 3.9 ../GBA.cpp:1133:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../GBA.cpp:1148:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../GBA.cpp:1172:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../GBA.cpp:1192:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../Util.cpp:481:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../Util.cpp:505:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../Util.cpp:525:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ ../Util.cpp:555:12: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char * p = strrchr(file,'.'); ^ ~~~~~~~~~~~~~~~~~ In file included from expr.y:12: In file included from ../../src/System.h:24: In file included from ../../src/unzip.h:68: In file included from /usr/include/zlib.h:34: In file included from /usr/include/zconf.h:247: /usr/include/c++/v1/stddef.h:52:7: error: reference to 'std' is ambiguous using std::nullptr_t; ^ /usr/include/c++/v1/__nullptr:22:1: note: candidate found by name lookup is 'std' _LIBCPP_BEGIN_NAMESPACE_STD ^ /usr/include/c++/v1/__config:388:47: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD' #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { ^ /usr/include/c++/v1/__config:392:11: note: candidate found by name lookup is 'std::std' namespace std { ^ Reported by: pkg-fallout
2017-02-01 21:22:05 +01:00
@@ -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)
@@ -537,7 +537,7 @@ bool utilIsZipFile(const char *file)
bool utilIsRarFile(const char *file)
{
if(strlen(file) > 4) {
- char * p = strrchr(file,'.');
+ const char * p = strrchr(file,'.');
if(p != NULL) {
if(_stricmp(p, ".rar") == 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)
{
- utilGzWriteFunc = (int (*)(void *,void * const, unsigned int))gzwrite;
+ utilGzWriteFunc = (int (*)(gzFile, voidp const, unsigned int))gzwrite;
utilGzReadFunc = gzread;
utilGzCloseFunc = gzclose;