Hello community,

here is the log from the commit of package physfs for openSUSE:Leap:15.2 
checked in at 2020-04-05 17:07:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/physfs (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.physfs.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "physfs"

Sun Apr  5 17:07:11 2020 rev:12 rq:789984 version:3.0.2

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/physfs/physfs.changes  2020-01-15 
15:43:56.559272109 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.physfs.new.3248/physfs.changes        
2020-04-05 17:07:18.294228344 +0200
@@ -1,0 +2,15 @@
+Sun Mar 29 16:39:40 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Update to 3.0.2:
+  * physfsrwops: Patched to compile for use with SDL 1.2
+  * 7zip: don't forget to destroy the PHYSFS_Io when closing the archive
+  * ignorecase: Don't crash if enumeration returned a NULL pointer.
+  * Fix up physfs.h for compilers that are sensitive about preprocessor
+    defines.
+  * PHYSFS_setWriteDir() shouldn't create an empty file if the dir
+    doesn't exist.
+  * PHYSFS_flush() no longer calls PHYSFS_Io::flush()
+- Spec cleanup.
+- Drop physfs-empty_dir_fix.patch. Merged upstream.
+
+-------------------------------------------------------------------

Old:
----
  physfs-3.0.1.tar.bz2
  physfs-empty_dir_fix.patch

New:
----
  physfs-3.0.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ physfs.spec ++++++
--- /var/tmp/diff_new_pack.KaW5yU/_old  2020-04-05 17:07:18.974229069 +0200
+++ /var/tmp/diff_new_pack.KaW5yU/_new  2020-04-05 17:07:18.978229074 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package physfs
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,46 +12,42 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define so_nr 1
-%define desc "PhysicsFS is a library to provide abstract access to various 
archives.\
-It is intended for use in video games, and the design was somewhat\
-inspired by Quake 3's file subsystem. The programmer defines a "write\
-directory" on the physical filesystem. No file writing done through the\
-PhysicsFS API can leave that write directory, for security. For\
-example, an embedded scripting language cannot write outside of this\
-path if it uses PhysFS for all of its I/O, which means that untrusted\
-scripts can run more safely. Symbolic links can be disabled as well,\
-for added safety. For file reading, the programmer lists directories\
-and archives that form a "search path". Once the search path is\
-defined, it becomes a single, transparent hierarchical filesystem. This\
-makes for easy access to ZIP files in the same way as you access a file\
-directly on the disk, and it makes it easy to ship a new archive that\
-will override a previous archive on a per-file basis. Finally,\
-PhysicsFS gives you platform-abstracted means to determine if CD-ROMs\
-are available, the user's home directory, where in the real filesystem\
-your program is running, etc."\
-
 Name:           physfs
-Version:        3.0.1
+Version:        3.0.2
 Release:        0
 Summary:        PhysicsFS file abstraction layer for games
 License:        (LGPL-2.1-or-later OR CPL-1.0) AND Zlib
 Group:          System/Libraries
-Url:            http://www.icculus.org/physfs/
+URL:            https://www.icculus.org/physfs/
 Source:         http://icculus.org/physfs/downloads/%{name}-%{version}.tar.bz2
-Patch0:         physfs-empty_dir_fix.patch
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
 BuildRequires:  zlib-devel
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
-%{desc}
+PhysicsFS is a library to provide abstract access to various archives.
+It is intended for use in video games, and the design was somewhat
+inspired by Quake 3's file subsystem. The programmer defines a "write
+directory" on the physical filesystem. No file writing done through the
+PhysicsFS API can leave that write directory, for security. For
+example, an embedded scripting language cannot write outside of this
+path if it uses PhysFS for all of its I/O, which means that untrusted
+scripts can run more safely. Symbolic links can be disabled as well,
+for added safety. For file reading, the programmer lists directories
+and archives that form a "search path". Once the search path is
+defined, it becomes a single, transparent hierarchical filesystem. This
+makes for easy access to ZIP files in the same way as you access a file
+directly on the disk, and it makes it easy to ship a new archive that
+will override a previous archive on a per-file basis. Finally,
+PhysicsFS gives you platform-abstracted means to determine if CD-ROMs
+are available, the user's home directory, where in the real filesystem
+your program is running, etc.
 
 %package -n lib%{name}%{so_nr}
 Summary:        PhysicsFS file abstraction layer for games
@@ -61,7 +57,23 @@
 Obsoletes:      physfs <= 1.0.1
 
 %description -n lib%{name}%{so_nr}
-%{desc}
+PhysicsFS is a library to provide abstract access to various archives.
+It is intended for use in video games, and the design was somewhat
+inspired by Quake 3's file subsystem. The programmer defines a "write
+directory" on the physical filesystem. No file writing done through the
+PhysicsFS API can leave that write directory, for security. For
+example, an embedded scripting language cannot write outside of this
+path if it uses PhysFS for all of its I/O, which means that untrusted
+scripts can run more safely. Symbolic links can be disabled as well,
+for added safety. For file reading, the programmer lists directories
+and archives that form a "search path". Once the search path is
+defined, it becomes a single, transparent hierarchical filesystem. This
+makes for easy access to ZIP files in the same way as you access a file
+directly on the disk, and it makes it easy to ship a new archive that
+will override a previous archive on a per-file basis. Finally,
+PhysicsFS gives you platform-abstracted means to determine if CD-ROMs
+are available, the user's home directory, where in the real filesystem
+your program is running, etc.
 
 %package -n lib%{name}-devel
 Summary:        Libraries, includes and more to develop PhysicsFS applications
@@ -72,20 +84,18 @@
 Obsoletes:      physfs-devel <= 1.0.1
 
 %description -n lib%{name}-devel
-%{desc}
+Development package for libphysfs, a library to provide abstract access to
+various archives.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
-# just to be sure...
-rm -rf zlib123
 %cmake \
   -DCMAKE_BUILD_TYPE=Release \
   -DPHYSFS_BUILD_STATIC=FALSE \
   -DPHYSFS_BUILD_TEST=FALSE
-make %{?_smp_mflags}
+%make_build
 
 %install
 %cmake_install
@@ -106,12 +116,12 @@
 EOF
 
 %post -n lib%{name}%{so_nr} -p /sbin/ldconfig
-
 %postun -n lib%{name}%{so_nr} -p /sbin/ldconfig
 
 %files -n lib%{name}%{so_nr}
 %defattr(0644,root,root,0755)
-%doc docs/CREDITS.txt docs/INSTALL.txt LICENSE.txt docs/TODO.txt
+%license LICENSE.txt
+%doc docs/CREDITS.txt docs/INSTALL.txt docs/TODO.txt
 %{_libdir}/libphysfs.so.%{so_nr}
 %{_libdir}/libphysfs.so.%{version}
 

++++++ physfs-3.0.1.tar.bz2 -> physfs-3.0.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/.hg_archival.txt 
new/physfs-3.0.2/.hg_archival.txt
--- old/physfs-3.0.1/.hg_archival.txt   2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/.hg_archival.txt   2019-03-18 19:37:22.000000000 +0100
@@ -1,4 +1,6 @@
 repo: 7672c9962ce627edaaa67ff54fe4ad8f9a46dc2b
-node: fa8e38bcc3545000a38704b65b604a2c1b764d10
+node: ae84e126219c52e7e4d35f22c3ccfe1413718961
 branch: stable-3.0
-tag: release-3.0.1
+latesttag: release-3.0.2
+latesttagdistance: 1
+changessincelatesttag: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/.hgtags new/physfs-3.0.2/.hgtags
--- old/physfs-3.0.1/.hgtags    2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/.hgtags    2019-03-18 19:37:22.000000000 +0100
@@ -13,3 +13,4 @@
 5d70fca3be361258edfb59c3edaba5abe75a1e88 release-2.0.0
 df04959950eb3830c39adfa983789f70f86062d7 release-1.1.0
 3396e6dd19fbb52a3fa7e171ffb38ed9acb285a4 release-2.1.1
+fcdfd7e3d4d77bed8a865f2bdc2901497340d841 release-3.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/CMakeLists.txt 
new/physfs-3.0.2/CMakeLists.txt
--- old/physfs-3.0.1/CMakeLists.txt     2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/CMakeLists.txt     2019-03-18 19:37:22.000000000 +0100
@@ -12,7 +12,7 @@
 cmake_minimum_required(VERSION 2.8.4)
 
 project(PhysicsFS)
-set(PHYSFS_VERSION 3.0.1)
+set(PHYSFS_VERSION 3.0.2)
 
 # Increment this if/when we break backwards compatibility.
 set(PHYSFS_SOVERSION 1)
@@ -232,8 +232,9 @@
     file(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "OUTPUT_DIRECTORY = 
\"${CMAKE_CURRENT_BINARY_DIR}/docs\"\n")
     file(APPEND "${PHYSFS_OUTPUT_DOXYFILE}" "\n# End auto-generated 
section.\n\n")
 
+    set(PHYSFS_TARGETNAME_DOCS "docs" CACHE STRING "Name of 'docs' build 
target")
     add_custom_target(
-        docs
+        ${PHYSFS_TARGETNAME_DOCS}
         ${DOXYGEN_EXECUTABLE} "${PHYSFS_OUTPUT_DOXYFILE}"
         WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         COMMENT "Building documentation in 'docs' directory..."
@@ -244,14 +245,18 @@
 
 if(UNIX)
     set(PHYSFS_TARBALL 
"${CMAKE_CURRENT_SOURCE_DIR}/../physfs-${PHYSFS_VERSION}.tar.bz2")
+
+    set(PHYSFS_TARGETNAME_DIST "dist" CACHE STRING "Name of 'dist' build 
target")
     add_custom_target(
-        dist
+        ${PHYSFS_TARGETNAME_DIST}
         hg archive -t tbz2 "${PHYSFS_TARBALL}"
         WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         COMMENT "Building source tarball '${PHYSFS_TARBALL}'..."
     )
+
+    set(PHYSFS_TARGETNAME_UNINSTALL "uninstall" CACHE STRING "Name of 
'uninstall' build target")
     add_custom_target(
-        uninstall
+        ${PHYSFS_TARGETNAME_UNINSTALL}
         "${CMAKE_CURRENT_SOURCE_DIR}/extras/uninstall.sh"
         WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
         COMMENT "Uninstall the project..."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/LICENSE.txt new/physfs-3.0.2/LICENSE.txt
--- old/physfs-3.0.1/LICENSE.txt        2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/LICENSE.txt        2019-03-18 19:37:22.000000000 +0100
@@ -1,5 +1,5 @@
 
-   Copyright (c) 2001-2017 Ryan C. Gordon and others.
+   Copyright (c) 2001-2019 Ryan C. Gordon and others.
 
    This software is provided 'as-is', without any express or implied warranty.
    In no event will the authors be held liable for any damages arising from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/docs/CREDITS.txt 
new/physfs-3.0.2/docs/CREDITS.txt
--- old/physfs-3.0.1/docs/CREDITS.txt   2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/docs/CREDITS.txt   2019-03-18 19:37:22.000000000 +0100
@@ -164,6 +164,9 @@
 Bug fixes,
     Rémi Verschelde
 
+Bug fixes:
+    Rob Loach
+
 Other stuff:
     Your name here! Patches go to [email protected] ...
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/extras/ignorecase.c 
new/physfs-3.0.2/extras/ignorecase.c
--- old/physfs-3.0.1/extras/ignorecase.c        2017-10-26 20:38:03.000000000 
+0200
+++ new/physfs-3.0.2/extras/ignorecase.c        2019-03-18 19:37:22.000000000 
+0100
@@ -50,18 +50,22 @@
         ptr++;  /* point past dirsep to entry itself. */
     } /* else */
 
-    for (i = rc; *i != NULL; i++)
+    if (rc != NULL)
     {
-        if (PHYSFS_utf8stricmp(*i, ptr) == 0)
+        for (i = rc; *i != NULL; i++)
         {
-            strcpy(ptr, *i); /* found a match. Overwrite with this case. */
-            PHYSFS_freeList(rc);
-            return 1;
-        } /* if */
-    } /* for */
+            if (PHYSFS_utf8stricmp(*i, ptr) == 0)
+            {
+                strcpy(ptr, *i); /* found a match. Overwrite with this case. */
+                PHYSFS_freeList(rc);
+                return 1;
+            } /* if */
+        } /* for */
+
+        PHYSFS_freeList(rc);
+    } /* if */
 
     /* no match at all... */
-    PHYSFS_freeList(rc);
     return 0;
 } /* locateOneElement */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/extras/physfsrwops.c 
new/physfs-3.0.2/extras/physfsrwops.c
--- old/physfs-3.0.1/extras/physfsrwops.c       2017-10-26 20:38:03.000000000 
+0200
+++ new/physfs-3.0.2/extras/physfsrwops.c       2019-03-18 19:37:22.000000000 
+0100
@@ -32,10 +32,16 @@
 #endif
 
 #if !TARGET_SDL2
+#ifndef RW_SEEK_SET
 #define RW_SEEK_SET SEEK_SET
+#endif
+#ifndef RW_SEEK_CUR
 #define RW_SEEK_CUR SEEK_CUR
+#endif
+#ifndef RW_SEEK_END
 #define RW_SEEK_END SEEK_END
 #endif
+#endif
 
 #if TARGET_SDL2
 static Sint64 SDLCALL physfsrwops_size(struct SDL_RWops *rw)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs.c 
new/physfs-3.0.2/src/physfs.c
--- old/physfs-3.0.1/src/physfs.c       2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/src/physfs.c       2019-03-18 19:37:22.000000000 +0100
@@ -879,13 +879,20 @@
 
     if (io == NULL)
     {
+        /* file doesn't exist, etc? Just fail out. */
+        PHYSFS_Stat statbuf;
+        BAIL_IF_ERRPASS(!__PHYSFS_platformStat(d, &statbuf, 1), NULL);
+
         /* DIR gets first shot (unlike the rest, it doesn't deal with files). 
*/
-        retval = tryOpenDir(io, &__PHYSFS_Archiver_DIR, d, forWriting, 
&claimed);
-        if (retval || claimed)
-            return retval;
+        if (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY)
+        {
+            retval = tryOpenDir(io, &__PHYSFS_Archiver_DIR, d, forWriting, 
&claimed);
+            if (retval || claimed)
+                return retval;
+        } /* if */
 
         io = __PHYSFS_createNativeIo(d, forWriting ? 'w' : 'r');
-        BAIL_IF_ERRPASS(!io, 0);
+        BAIL_IF_ERRPASS(!io, NULL);
         created_io = 1;
     } /* if */
 
@@ -2662,7 +2669,6 @@
 {
     FileHandle *prev = NULL;
     FileHandle *i;
-    int rc = 1;
 
     for (i = *list; i != NULL; i = i->next)
     {
@@ -2670,9 +2676,19 @@
         {
             PHYSFS_Io *io = handle->io;
             PHYSFS_uint8 *tmp = handle->buffer;
-            rc = PHYSFS_flush((PHYSFS_File *) handle);
-            if (!rc)
-                return -1;
+
+            /* send our buffer to io... */
+            if (!handle->forReading)
+            {
+                if (!PHYSFS_flush((PHYSFS_File *) handle))
+                    return -1;
+
+                /* ...then have io send it to the disk... */
+                else if (io->flush && !io->flush(io))
+                    return -1;
+            } /* if */
+
+            /* ...then close the underlying file. */
             io->destroy(io);
 
             if (tmp != NULL)  /* free any associated buffer. */
@@ -2970,7 +2986,7 @@
     rc = io->write(io, fh->buffer + fh->bufpos, fh->buffill - fh->bufpos);
     BAIL_IF_ERRPASS(rc <= 0, 0);
     fh->bufpos = fh->buffill = 0;
-    return io->flush ? io->flush(io) : 1;
+    return 1;
 } /* PHYSFS_flush */
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs.h 
new/physfs-3.0.2/src/physfs.h
--- old/physfs-3.0.1/src/physfs.h       2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/src/physfs.h       2019-03-18 19:37:22.000000000 +0100
@@ -225,11 +225,11 @@
 
 #if defined(PHYSFS_DECL)
 /* do nothing. */
-#elif (defined _MSC_VER)
+#elif defined(_MSC_VER)
 #define PHYSFS_DECL __declspec(dllexport)
-#elif (defined __SUNPRO_C)
+#elif defined(__SUNPRO_C)
 #define PHYSFS_DECL __global
-#elif ((__GNUC__ >= 3) && (!__EMX__) && (!sun))
+#elif ((__GNUC__ >= 3) && (!defined(__EMX__)) && (!defined(sun)))
 #define PHYSFS_DECL __attribute__((visibility("default")))
 #else
 #define PHYSFS_DECL
@@ -434,7 +434,7 @@
 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
 #define PHYSFS_VER_MAJOR 3
 #define PHYSFS_VER_MINOR 0
-#define PHYSFS_VER_PATCH 1
+#define PHYSFS_VER_PATCH 2
 #endif  /* DOXYGEN_SHOULD_IGNORE_THIS */
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs_archiver_7z.c 
new/physfs-3.0.2/src/physfs_archiver_7z.c
--- old/physfs-3.0.1/src/physfs_archiver_7z.c   2017-10-26 20:38:03.000000000 
+0200
+++ new/physfs-3.0.2/src/physfs_archiver_7z.c   2019-03-18 19:37:22.000000000 
+0100
@@ -203,6 +203,8 @@
     SZIPinfo *info = (SZIPinfo *) opaque;
     if (info)
     {
+        if (info->io)
+            info->io->destroy(info->io);
         SzArEx_Free(&info->db, &SZIP_SzAlloc);
         __PHYSFS_DirTreeDeinit(&info->tree);
         allocator.Free(info);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs_internal.h 
new/physfs-3.0.2/src/physfs_internal.h
--- old/physfs-3.0.1/src/physfs_internal.h      2017-10-26 20:38:03.000000000 
+0200
+++ new/physfs-3.0.2/src/physfs_internal.h      2019-03-18 19:37:22.000000000 
+0100
@@ -162,35 +162,44 @@
 #define free(x) Do not use free() directly.
 /* !!! FIXME: add alloca check here. */
 
+
+/* by default, enable things, so builds can opt out of a few things they
+   want to avoid. But you can build with this #defined to 0 if you would
+   like to turn off everything except a handful of things you opt into. */
+#ifndef PHYSFS_SUPPORTS_DEFAULT
+#define PHYSFS_SUPPORTS_DEFAULT 1
+#endif
+
+
 #ifndef PHYSFS_SUPPORTS_ZIP
-#define PHYSFS_SUPPORTS_ZIP 1
+#define PHYSFS_SUPPORTS_ZIP PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_7Z
-#define PHYSFS_SUPPORTS_7Z 1
+#define PHYSFS_SUPPORTS_7Z PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_GRP
-#define PHYSFS_SUPPORTS_GRP 1
+#define PHYSFS_SUPPORTS_GRP PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_HOG
-#define PHYSFS_SUPPORTS_HOG 1
+#define PHYSFS_SUPPORTS_HOG PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_MVL
-#define PHYSFS_SUPPORTS_MVL 1
+#define PHYSFS_SUPPORTS_MVL PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_WAD
-#define PHYSFS_SUPPORTS_WAD 1
+#define PHYSFS_SUPPORTS_WAD PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_QPAK
-#define PHYSFS_SUPPORTS_QPAK 1
+#define PHYSFS_SUPPORTS_QPAK PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_SLB
-#define PHYSFS_SUPPORTS_SLB 1
+#define PHYSFS_SUPPORTS_SLB PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_ISO9660
-#define PHYSFS_SUPPORTS_ISO9660 1
+#define PHYSFS_SUPPORTS_ISO9660 PHYSFS_SUPPORTS_DEFAULT
 #endif
 #ifndef PHYSFS_SUPPORTS_VDF
-#define PHYSFS_SUPPORTS_VDF 1
+#define PHYSFS_SUPPORTS_VDF PHYSFS_SUPPORTS_DEFAULT
 #endif
 
 #if PHYSFS_SUPPORTS_7Z
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs_platform_apple.m 
new/physfs-3.0.2/src/physfs_platform_apple.m
--- old/physfs-3.0.1/src/physfs_platform_apple.m        2017-10-26 
20:38:03.000000000 +0200
+++ new/physfs-3.0.2/src/physfs_platform_apple.m        2019-03-18 
19:37:22.000000000 +0100
@@ -50,7 +50,7 @@
     {
         NSArray *paths = 
NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, 
NSUserDomainMask, TRUE);
         BAIL_IF(!paths, PHYSFS_ERR_OS_ERROR, NULL);
-        NSString *path = (NSString *) paths[0];
+        NSString *path = (NSString *) [paths objectAtIndex:0];
         BAIL_IF(!path, PHYSFS_ERR_OS_ERROR, NULL);
         size_t len = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
         const size_t applen = strlen(app);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/src/physfs_platform_windows.c 
new/physfs-3.0.2/src/physfs_platform_windows.c
--- old/physfs-3.0.1/src/physfs_platform_windows.c      2017-10-26 
20:38:03.000000000 +0200
+++ new/physfs-3.0.2/src/physfs_platform_windows.c      2019-03-18 
19:37:22.000000000 +0100
@@ -566,18 +566,26 @@
     else
     {
         DWORD psize = 0;
-        WCHAR dummy = 0;
         LPWSTR wstr = NULL;
         BOOL rc = 0;
 
         /*
          * Should fail. Will write the size of the profile path in
          *  psize. Also note that the second parameter can't be
-         *  NULL or the function fails.
+         *  NULL or the function fails on Windows XP, but has to be NULL on
+         *  Windows 10 or it will fail.  :(
          */
-        rc = pGetDir(accessToken, &dummy, &psize);
+        rc = pGetDir(accessToken, NULL, &psize);
         GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done);  /* should have failed! */
 
+        if (psize == 0)  /* probably on Windows XP, try a different way. */
+        {
+            WCHAR x = 0;
+            rc = pGetDir(accessToken, &x, &psize);
+            GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done);  /* should have failed! */
+            GOTO_IF(!psize, PHYSFS_ERR_OS_ERROR, done);  /* Uhoh... */
+        } /* if */
+
         /* Allocate memory for the profile directory */
         wstr = (LPWSTR) __PHYSFS_smallAlloc((psize + 1) * sizeof (WCHAR));
         if (wstr != NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/physfs-3.0.1/test/test_physfs.c 
new/physfs-3.0.2/test/test_physfs.c
--- old/physfs-3.0.1/test/test_physfs.c 2017-10-26 20:38:03.000000000 +0200
+++ new/physfs-3.0.2/test/test_physfs.c 2019-03-18 19:37:22.000000000 +0100
@@ -32,7 +32,7 @@
 
 #define TEST_VERSION_MAJOR  3
 #define TEST_VERSION_MINOR  0
-#define TEST_VERSION_PATCH  1
+#define TEST_VERSION_PATCH  2
 
 static FILE *history_file = NULL;
 static PHYSFS_uint32 do_buffer_size = 0;


Reply via email to