summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoroi_wtf2017-02-12 23:40:50 +0100
committeroi_wtf2017-02-12 23:40:50 +0100
commit3116b71819f765218de54dcf188c387c312f8f11 (patch)
tree809c47a1cc40af59e493102417bc137a699e2136
parentfe10896c6892f41fc3dde6c3d3502d40e4c57e6c (diff)
downloadaur-3116b71819f765218de54dcf188c387c312f8f11.tar.gz
20150125-2
fix wrong value returned inside physfsDrive::opendir
-rw-r--r--.SRCINFO6
-rw-r--r--0007-fix-wrong-return-value.patch167
-rw-r--r--PKGBUILD5
3 files changed, 174 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6b250a35fdb1..7e762e772dd3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Fri May 13 20:38:42 UTC 2016
pkgbase = dosbox-daum
pkgdesc = Emulator with builtin DOS for running DOS Games (Daum version)
pkgver = 20150125
- pkgrel = 1
+ pkgrel = 2
url = http://ykhwong.x-y.net/
arch = i686
arch = x86_64
@@ -31,6 +29,7 @@ pkgbase = dosbox-daum
source = 0004-fix-64bit-pointersize.patch
source = 0005-fix-MIN.patch
source = 0006-fix-std-pow.patch
+ source = 0007-fix-wrong-return-value.patch
source = dosbox.png
sha256sums = 061336cd3971e37fa0d342c6644e19776a2ddfc20d8f197abca1f8ee27dabea6
sha256sums = cbe78dab758c5ece5616b2456178fe3ebe1429e9796b4088902c6c0856475bf6
@@ -39,6 +38,7 @@ pkgbase = dosbox-daum
sha256sums = 8125c7fb2f1428e25f4d50a48df16bb5b692286216bfe5a8ef463d15cef25831
sha256sums = 224bb0b5b45941baae9ad02cb4da7eef5186d4a05ead4e4b70d4e6b371f73c85
sha256sums = b9165a8f814977ba26938214927c42073d5fcc5d226c1005d525c0eed43d7d32
+ sha256sums = 30144bd197a8e78d68b591ef77cf712e9d96de12e186a06c9e454db9e91c3687
sha256sums = 491c42d16fc5ef7ee2eca1b736f7801249d4ca8c0b236a001aec0d3e24504f3b
pkgname = dosbox-daum
diff --git a/0007-fix-wrong-return-value.patch b/0007-fix-wrong-return-value.patch
new file mode 100644
index 000000000000..8f4bd4fcfcf9
--- /dev/null
+++ b/0007-fix-wrong-return-value.patch
@@ -0,0 +1,167 @@
+--- ./src/dos/drive_physfs.cpp.orig 2015-01-25 08:51:05.573082100 +0100
++++ ./src/dos/drive_physfs.cpp 2017-02-12 23:33:04.972086247 +0100
+@@ -57,7 +57,7 @@
+ bool prepareWrite();
+ bool Close();
+ Bit16u GetInformation(void);
+- bool UpdateDateTimeFromHost(void);
++ bool UpdateDateTimeFromHost(void);
+ private:
+ PHYSFS_file * fhandle;
+ enum { READ,WRITE } last_action;
+@@ -94,7 +94,7 @@
+
+ /* Test if file exists, don't add to dirCache then */
+ bool existing_file=PHYSFS_exists(newname);
+-
++
+ char *slash = strrchr(newname,'/');
+ if (slash && slash != newname) {
+ char file[CROSS_LEN];
+@@ -131,7 +131,7 @@
+ normalize(newname,basedir);
+
+ PHYSFS_file * hand;
+-
++
+ if (!PHYSFS_exists(newname)) return false;
+ if ((flags&0xf) == OPEN_READ) {
+ hand = PHYSFS_openRead(newname);
+@@ -141,7 +141,7 @@
+ hand = PHYSFS_openRead(newname);
+ }
+
+- if (!hand) {
++ if (!hand) {
+ if((flags&0xf) != OPEN_READ) {
+ PHYSFS_file *hmm = PHYSFS_openRead(newname);
+ if (hmm) {
+@@ -151,7 +151,7 @@
+ }
+ return false;
+ }
+-
++
+ *file=new physfsFile(name,hand,0x202,newname,false);
+ (*file)->flags=flags; //for the inheritance flag and maybe check for others.
+ return true;
+@@ -182,7 +182,7 @@
+
+ char end[2]={CROSS_FILESPLIT,0};
+ if (tempDir[strlen(tempDir)-1]!=CROSS_FILESPLIT) strcat(tempDir,end);
+-
++
+ Bit16u id;
+ if (!dirCache.FindFirst(tempDir,id))
+ {
+@@ -191,7 +191,7 @@
+ }
+ strcpy(srchInfo[id].srch_dir,tempDir);
+ dta.SetDirID(id);
+-
++
+ Bit8u sAttr;
+ dta.GetSearchParams(sAttr,tempDir);
+
+@@ -203,7 +203,7 @@
+ }
+ dta.SetResult(dirCache.GetLabel(),0,0,0,DOS_ATTR_VOLUME);
+ return true;
+- } else if ((sAttr & DOS_ATTR_VOLUME) && (*_dir == 0) && !fcb_findfirst) {
++ } else if ((sAttr & DOS_ATTR_VOLUME) && (*_dir == 0) && !fcb_findfirst) {
+ //should check for a valid leading directory instead of 0
+ //exists==true if the volume label matches the searchmask and the path is valid
+ if ( strcmp(dirCache.GetLabel(), "") == 0 ) {
+@@ -228,7 +228,7 @@
+ Bit8u find_attr;
+
+ dta.GetSearchParams(srch_attr,srch_pattern);
+-
++
+ Bitu id = dta.GetDirID();
+
+ again:
+@@ -242,17 +242,17 @@
+ if(strlen(dir_ent)<DOS_NAMELENGTH_ASCII){
+ strcpy(find_name,dir_ent);
+ upcase(find_name);
+- }
++ }
+
+ strcpy(full_name,srchInfo[id].srch_dir);
+ strcat(full_name,dir_ent);
+ dirCache.ExpandName(full_name);
+ normalize(full_name,basedir);
+-
++
+ if (PHYSFS_isDirectory(full_name)) find_attr=DOS_ATTR_DIRECTORY|DOS_ATTR_ARCHIVE;
+ else find_attr=DOS_ATTR_ARCHIVE;
+ if (~srch_attr & find_attr & (DOS_ATTR_DIRECTORY | DOS_ATTR_HIDDEN | DOS_ATTR_SYSTEM)) goto again;
+-
++
+ /*file is okay, setup everything to be copied in DTA Block */
+ find_size=(Bit32u)PHYSFS_fileLength(full_name);
+ time_t mytime = PHYSFS_getLastModTime(full_name);
+@@ -261,7 +261,7 @@
+ find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday);
+ find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec);
+ } else {
+- find_time=6;
++ find_time=6;
+ find_date=4;
+ }
+ dta.SetResult(find_name,find_size,find_date,find_time,find_attr);
+@@ -332,7 +332,7 @@
+ CROSS_FILENAME(newold);
+ dirCache.ExpandName(newold);
+ normalize(newold,basedir);
+-
++
+ char newnew[CROSS_LEN];
+ strcpy(newnew,basedir);
+ strcat(newnew,newname);
+@@ -415,7 +415,7 @@
+ char myname[CROSS_LEN];
+ strcpy(myname,name);
+ normalize(myname,basedir);
+- if (!PHYSFS_isDirectory(myname)) return false;
++ if (!PHYSFS_isDirectory(myname)) return NULL;
+
+ struct opendirinfo *oinfo = (struct opendirinfo *)malloc(sizeof(struct opendirinfo));
+ oinfo->files = PHYSFS_enumerateFiles(myname);
+@@ -476,7 +476,7 @@
+ strcpy(newname,startdir);
+ }
+
+- CROSS_FILENAME(newname);
++ CROSS_FILENAME(newname);
+ if (!physfs_used) {
+ PHYSFS_init("");
+ PHYSFS_permitSymbolicLinks(1);
+@@ -510,7 +510,7 @@
+ PHYSFS_setWriteDir(oldwrite);
+ }
+ if (oldwrite) free((char *)oldwrite);
+-
++
+ strcpy(basedir,lastdir);
+
+ allocation.bytes_sector=_bytes_sector;
+@@ -599,7 +599,7 @@
+ }
+
+ if (!PHYSFS_seek(fhandle,mypos)) {
+- // Out of file range, pretend everythings ok
++ // Out of file range, pretend everythings ok
+ // and move file pointer top end of file... ?! (Black Thorne)
+ PHYSFS_seek(fhandle,PHYSFS_fileLength(fhandle));
+ };
+@@ -682,7 +682,7 @@
+ Bit16u physfsFile::GetInformation(void) {
+ return info;
+ }
+-
++
+
+ physfsFile::physfsFile(const char* _name, PHYSFS_file * handle,Bit16u devinfo, const char* physname, bool write) {
+ fhandle=handle;
diff --git a/PKGBUILD b/PKGBUILD
index 196c76be4806..d58ded33e74c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=dosbox-daum
pkgver=20150125
-pkgrel=1
+pkgrel=2
pkgdesc="Emulator with builtin DOS for running DOS Games (Daum version)"
arch=('i686' 'x86_64')
url="http://ykhwong.x-y.net/"
@@ -21,6 +21,7 @@ source=("source-${pkgver}.7z::http://ykhwong.x-y.net/downloads/dosbox/patch/sour
'0004-fix-64bit-pointersize.patch'
'0005-fix-MIN.patch'
'0006-fix-std-pow.patch'
+ '0007-fix-wrong-return-value.patch'
'dosbox.png')
sha256sums=('061336cd3971e37fa0d342c6644e19776a2ddfc20d8f197abca1f8ee27dabea6'
'cbe78dab758c5ece5616b2456178fe3ebe1429e9796b4088902c6c0856475bf6'
@@ -29,6 +30,7 @@ sha256sums=('061336cd3971e37fa0d342c6644e19776a2ddfc20d8f197abca1f8ee27dabea6'
'8125c7fb2f1428e25f4d50a48df16bb5b692286216bfe5a8ef463d15cef25831'
'224bb0b5b45941baae9ad02cb4da7eef5186d4a05ead4e4b70d4e6b371f73c85'
'b9165a8f814977ba26938214927c42073d5fcc5d226c1005d525c0eed43d7d32'
+ '30144bd197a8e78d68b591ef77cf712e9d96de12e186a06c9e454db9e91c3687'
'491c42d16fc5ef7ee2eca1b736f7801249d4ca8c0b236a001aec0d3e24504f3b')
prepare(){
@@ -49,6 +51,7 @@ prepare(){
patch -p0 -i "$srcdir"/0005-fix-MIN.patch
patch -p1 -i "$srcdir"/0006-fix-std-pow.patch
+ patch -p1 -i "$srcdir"/0007-fix-wrong-return-value.patch
gendesk -f --pkgname "dosbox" --pkgdesc "$pkgdesc"