Commit Graph

1514 Commits

Author SHA1 Message Date
Ryan C. Gordon fdf308fa88
Renamed .hgignore -> .gitignore 2021-06-30 23:32:32 -04:00
Matthew Albrecht d24ce15922 Include alloca.h on Solaris and Linux platforms. 2021-06-30 08:52:57 -04:00
Ryan C. Gordon 69a7428787
Initial CI setup... 2021-06-29 13:22:39 -04:00
Ryan C. Gordon ebe02ceb02
Create FUNDING.yml 2021-06-29 13:20:53 -04:00
Ryan C. Gordon 9b83066716
Reformat LICENSE.txt so GitHub sees it as zlib. 2021-06-29 13:19:59 -04:00
Ryan C. Gordon 13f00546a9
Bumped copyright for 2021. 2021-06-29 13:18:47 -04:00
Ryan C. Gordon 5ea6ba7557 msvc: Move stdarg.h include ahead of __PHYSFS_msvc_vsnprintf declaration. 2021-04-29 15:00:16 -04:00
Ryan C. Gordon 009be5ab20 Enable arm64 for non-Windows targets (thanks, pastdue!).
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
2021-01-18 18:33:00 -05:00
Ryan C. Gordon 55c3d9f9d8 android: PhysicsFS now has actual Android support.
This compiled and worked on Android before, if you didn't care about
PHYSFS_getBaseDir() and PHYSFS_getPrefDir() being useful. Now you can pass
PHYSFS_init() some necessary Android objects to solve this. Passing NULL
to PHYSFS_init is acceptable and will simply report "/" for the base dir and
prefdir, under the assumption that the app queried the OS for these directly
instead.
2020-06-12 03:37:58 -04:00
Ryan C. Gordon 22297e7ea2 7z: Make error handling a little more robust. 2020-05-17 01:41:52 -04:00
Ryan C. Gordon 00599b7dac 7z: copy/paste error in error checking, found by static analysis.
This was clearly copied from a previous line but wasn't updated with the
correct condition to check, so if malloc() failed, it would dereference NULL
instead of reporting an error.
2020-05-17 01:26:31 -04:00
Ryan C. Gordon 3169a5e9d3 buildbot-emscripten.sh: Look for the SDK at /emsdk by default. 2020-05-16 23:30:16 -04:00
Ryan C. Gordon 101ec3c831 buildbot-checker.sh: Just require scan-build to be in the $PATH. 2020-05-16 23:29:44 -04:00
Ryan C. Gordon e3231d1cb0 Modern buildbot vocabulary is "worker," not "slave." 2020-05-16 23:29:03 -04:00
Ryan C. Gordon 9d61fadd3e Have static analysis script use Ninja. 2020-05-12 15:49:53 -04:00
Ryan C. Gordon 235e31c420 Fixed mishandling of an allocation failure in PHYSFS_openRead().
(Static analysis caught this one! Thanks clang!)
2020-05-12 15:19:01 -04:00
Ryan C. Gordon 291cad07b7 Testing a fix for emscripten buildbot script. 2020-05-12 13:49:46 -04:00
Ryan C. Gordon 0d1df744ba Minor style fix in docs/INSTALL.txt 2020-05-12 01:04:09 -04:00
Ryan C. Gordon 08dc47a72b Update copyright for 2020. 2020-05-12 00:52:56 -04:00
Ryan C. Gordon 1daf787fb2 extras: Cleaning up some scripts to work with the newly-recreated buildbot. 2020-05-12 00:32:00 -04:00
Ryan C. Gordon 56aaae4949 Corrected example code for PHYSFS_enumerate in physfs.h 2019-08-24 21:06:54 -04:00
Ryan C. Gordon 19ea59109d Fixed comment typo. 2019-06-07 23:46:55 -04:00
Ryan C. Gordon a8180f0e4c hog: Added support for HOG2 (Descent 3) archives. 2019-06-07 22:27:48 -04:00
Ryan C. Gordon 9cb45dc6cb cmake: Minimum CMake version is now 2.8.12.
(transplanted from de1ea3b2cfc45ce921b5571a637b3b747173184f)
2019-05-20 23:38:12 -04:00
Kevin d'Orange 8791811909 CMake: made install step export the targets 2019-04-19 12:33:08 +02:00
Ryan C. Gordon f94ce0613d Fixed compiler warning. 2019-03-18 14:28:46 -04:00
Ryan C. Gordon 6b0839051f windows: Workaround for WinXP systems.
(transplanted from c8f3bbd689d6b71b84c11db74275ea3d56fef961)
2019-03-18 13:36:16 -04:00
Ryan C. Gordon 5cbb460bcd Only flush file handles on close if they were opened for writing. 2019-03-18 11:27:26 -04:00
Ryan C. Gordon e549fe0e0f Added some whitespace to test a fix to revision control. 2019-02-10 16:00:39 -05:00
Ryan C. Gordon 736d0b371a Updated copyright year for 2019. 2019-02-10 15:56:21 -05:00
Ryan C. Gordon 28ac5794b1 cmake: Special build target names ("dist" "docs" "uninstall") can be renamed. 2019-02-10 15:45:01 -05:00
Ryan C. Gordon 500033f37d Allow builds to opt-out or opt-in to specific archivers, whichever's easier. 2019-01-26 03:00:29 -05:00
Ryan C. Gordon b57d8960e8 Fixed some compiler warnings. 2018-11-28 00:23:08 -05:00
Ryan C. Gordon 5786a58628 PHYSFS_flush() shouldn't call PHYSFS_Io::flush().
The former is meant to send PhysicsFS-buffered data to the PHYSFS_Io's
implementation, the latter is meant to tell the OS to definitely make sure the
data is safely written to disk (or at least, that's what it does in practice).

This was making PHYSFS_setBuffer()'d handles _slower_, since they would end
up blocking whenever the buffer was full until the data made the full trip to
physical media, instead of just letting the OS do its own buffering.

Now we still PHYSFS_Io::flush() on PHYSFS_close(), like this has always
worked. That might also be overkill, but that remains a historical artifact
of trying to keep the underlying file handle usable if pending writes fail
for possibly-recoverable reasons (which isn't guaranteed if you just close()
it, at least as far as I remember).
2018-11-27 23:53:33 -05:00
Ryan C. Gordon 73d66441e3 Added PHYSFS_setRoot(). 2018-10-17 23:44:02 -04:00
Ryan C. Gordon 7d194a8a62 windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809.
(transplanted from ece6769c0676c2d4e8a5893a1acebd0f65456817)
2018-10-03 22:40:57 -04:00
Ryan C. Gordon 8ce294a458 PHYSFS_setWriteDir() shouldn't create an empty file if the dir doesn't exist. 2018-05-16 19:54:51 -04:00
Ryan C. Gordon 15dd00659a Fix up physfs.h for compilers that are sensitive about preprocessor defines.
(transplanted from db8f944df5c56f0244229813203fb5b24e8d9968)
2018-04-19 10:06:38 -04:00
Ryan C. Gordon 7394c07d6b apple: Patched to compile with older (mac 10.7) SDKs (thanks, Ken and Ryan!). 2018-03-24 00:19:59 -04:00
Ryan C. Gordon 0bad12d401 ignorecase: Don't crash if enumeration returned a NULL pointer.
(transplanted from f83d05e87212a5c7e377f3b205e6d70fc42772d4)
2018-03-09 14:50:37 -05:00
Ryan C. Gordon 89d4809f28 Updated copyright date. 2018-03-08 12:21:45 -05:00
Ryan C. Gordon ea90a92016 7zip: don't forget to destroy the PHYSFS_Io when closing the archive! 2018-03-08 11:47:42 -05:00
Ryan C. Gordon 3597a7b69a Call the default branch "3.1.0" to avoid confusion.
This way, if someone builds the default branch instead of stable-3.0, we'll
be able to distinguish.

No immediate plans for a format 3.1 effort at the moment, though.
2018-03-08 11:51:46 -05:00
Ryan C. Gordon c86895264b Remove deprecated PHYSFS_getLastError() from all the extras (thanks, Rob!). 2018-02-20 10:26:33 -05:00
Ryan C. Gordon 47b0e834dc Patched physfsrwops to compile against SDL 1.2 (thanks, Rob!).
(transplanted from 540be489d50f9fe29f1f517202b6a9d199f36a2a)
2017-11-11 08:53:23 -05:00
Ryan C. Gordon 90dfc49f6d Added tag release-3.0.1 for changeset fa8e38bcc354 2017-10-26 14:38:35 -04:00
Ryan C. Gordon a45afc5d50 Catch access to paths that are just "." or ".." without any path separator. 2017-10-26 14:37:16 -04:00
Ryan C. Gordon 62d24e228f Fixed mounting a symlink to a real directory. 2017-10-26 14:21:36 -04:00
Ryan C. Gordon 26db9376da Fixed some infinite loops that a maliciously-crafted .iso can trigger.
These bugs exposed by American Fuzzy Lop (AFL), a powerful fuzzer.

http://lcamtuf.coredump.cx/afl/
2017-10-23 14:58:54 -04:00
Ryan C. Gordon 1c7945461d Don't allow NULL filenames to be mounted.
Regardless of what the 3.0.0 documentation says, PhysicsFS never handled this
correctly, so now we check for it so you can't get into crashy situations.

Corrected documentation to reflect reality.
2017-10-23 12:40:59 -04:00