Commit Graph

1519 Commits

Author SHA1 Message Date
Ryan C. Gordon 119f182c8b
Bumped version to 3.0.3! 2022-09-30 16:10:38 -04:00
Ryan C. Gordon aa4165c3c7 apple: macOS 12.0 deprecated things called "master" for "main".
Try to look for the new name in the process's namespace before falling back
to the old one (and giving up on CD-ROM detection if everything falls apart).

iOS has PHYSFS_NO_CDROM_SUPPORT defined, so this isn't used there.
2022-09-29 14:16:21 -04:00
Ozkan Sezer 8c02d53f69 fix version number in os/2 makefile. 2022-09-29 17:56:50 +03:00
Ryan C. Gordon c743450d86
atomic: __PHYSFS_ATOMIC_(DECR|INCR) should return final value.
Fixes #46.
2022-09-29 10:54:28 -04:00
Ryan C. Gordon ee956e0e5c
PHYSFS_mkdir() should allow symlinks in the mounted writeDir itself.
Fixes #47.
2022-09-29 10:28:41 -04:00
Ryan C. Gordon 2bb0d5c5f7
Bumped copyright for 2022. 2022-05-20 23:37:01 -04:00
Ryan C. Gordon 395cccbd24
cmake: Don't try to use readline if you don't also have curses.
Fixes #17.
2022-05-20 23:36:47 -04:00
Ryan C. Gordon ca34091863
zip: workaround Windows Explorer bug.
If you edit a zip file with Windows Explorer, it will rewrite the entire
central directory, setting all files version_needed field to 2.0/MS-DOS,
but it won't touch files that it doesn't plan to alter, so you might end
up with a local header that doesn't match the central directory details.

We aren't currently using the version_needed information, so now we just
favor the local header's copy of it in case we ever need it, and don't
complain if the central directory doesn't match.

Fixes #24.
2022-05-20 23:36:39 -04:00
Ozkan Sezer 9e2be90470
disable dllexport from static builds.
Closes https://github.com/icculus/physfs/pull/15 .
2022-05-20 23:36:26 -04:00
Ozkan Sezer d024ca24de
cmake: set os2 dll name to 'physfs'
not libphysfs, because of os2 limitation.
2022-05-20 23:35:57 -04:00
Ozkan Sezer 3bc65f1613
physfs_platform_os2.c: eliminated signedness warnings. 2022-05-20 23:35:39 -04:00
Ozkan Sezer 40ff5dba86
added __PHYSFS_ATOMIC_INCR and __PHYSFS_ATOMIC_DECR for watcom compiler 2022-05-20 23:35:29 -04:00
Ozkan Sezer 268d9e6266
added a watcom makefile targeting os2 2022-05-20 23:35:01 -04:00
Ozkan Sezer 4e91208cc3
fixed os2 symbol exports 2022-05-20 23:34:39 -04:00
Ozkan Sezer c27c67123c
fixed windows symbol exports 2022-05-20 23:34:17 -04:00
alfadur 7f4dbec16e
add 0x10000 properly 2022-05-20 23:33:27 -04:00
alfadur 4d66ea5946
add missing bit to UTF-16 surrogate pair conversion 2022-05-20 23:33:13 -04:00
pastdue 543a1ae037
physfs_platform_posix.c: Use O_CLOEXEC / FD_CLOEXEC 2022-05-20 23:31:33 -04:00
pastdue 3c32cd5600
physfs_platform_posix.c: Retry on EINTR 2022-05-20 23:31:24 -04:00
James Le Cuirot 52c3f19e17
Use the GNUInstallDirs CMake module to respect installation locations
Apparently use of LIB_SUFFIX is now discouraged. GNUInstallDirs does a
better job of setting a default.

The libdir of ${prefix}/lib in the pkg-config file caused warnings,
and possibly even failures, when linking on multilib systems where
/usr/lib is for 32-bit libraries rather than 64-bit libraries.
2022-05-20 23:31:16 -04:00
Ryan C. Gordon 21b4ccfc53
cmake: fixed "dist" target to use git instead of Mercurial. 2022-05-20 23:31:07 -04:00
Ryan C. Gordon 751be263bf
Updated a URL to point to github.com 2022-05-20 23:31:01 -04:00
Ryan C. Gordon a4dc0a7129
Renamed .hgignore -> .gitignore 2022-05-20 23:30:27 -04:00
Matthew Albrecht 99d0fef19e
Include alloca.h on Solaris and Linux platforms. 2022-05-20 23:30:15 -04:00
Ryan C. Gordon f3eb059e57
Reformat LICENSE.txt so GitHub sees it as zlib. 2022-05-20 23:29:37 -04:00
Ryan C. Gordon 911e253e00 msvc: Move stdarg.h include ahead of __PHYSFS_msvc_vsnprintf declaration.
(transplanted from e0346f4349265b4e483b987a0694740474942bb0)
2021-04-29 15:00:16 -04:00
Ryan C. Gordon 48ffe8ddf5 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.
(transplanted from 1dc6e265fefcc1fec8d68f096a73e1dca4bf0691)
2020-05-17 01:26:31 -04:00
Ryan C. Gordon db2a4a5807 Move buildbot script changes to stable-3.0 branch. 2020-05-17 00:58:55 -04:00
Ryan C. Gordon 6421738346 Minor style fix in docs/INSTALL.txt
(transplanted from 9cf9cdc05779f08c6342d620977c1f1273313881)
2020-05-12 01:04:09 -04:00
Ryan C. Gordon 557d1c58d5 Updated copyright for 2020. 2020-05-12 00:54:52 -04:00
Ryan C. Gordon fcfc99941f extras: Cleaning up some scripts to work with the newly-recreated buildbot.
(transplanted from 8ca9a80a216ca06ea2f3c86dcbd242908e9f96db)
2020-05-12 00:32:00 -04:00
Ryan C. Gordon 0e38afca9b Corrected example code for PHYSFS_enumerate in physfs.h
(transplanted from d3929e6603725b968df778618204ca6c3869b446)
2019-08-24 21:06:54 -04:00
Ryan C. Gordon f5458fbc6c cmake: Minimum CMake version is now 2.8.12. 2019-05-20 23:38:12 -04:00
Kevin d'Orange 95fd951c57 CMake: made install step export the targets
(transplanted from b2abaf7d4e4b2af671763b9ef2887dd30b42d6da)
2019-04-19 12:33:08 +02:00
Ryan C. Gordon 2ae6fe8833 Tagging 3.0.2 release 2019-03-18 14:37:22 -04:00
Ryan C. Gordon f8f89035c4 Bumped version to 3.0.2! 2019-03-18 14:35:44 -04:00
Ryan C. Gordon 2dc2dd1b04 Fixed compiler warning.
(transplanted from b76a47b006f65ad81b54256080d485919abdce29)
2019-03-18 14:28:46 -04:00
Ryan C. Gordon 81bb11ddbc windows: Workaround for WinXP systems. 2019-03-18 13:36:16 -04:00
Ryan C. Gordon fa34bb479d Only flush file handles on close if they were opened for writing.
(transplanted from 89e1b79e10c6e9faf9e4c06dc357dee5ef2c7d4f)
2019-03-18 11:27:26 -04:00
Ryan C. Gordon 9a825fcd77 Updated copyright year for 2019.
(transplanted from 63df6e1d7f90fee339e7a2033df2f4885df89d16)
2019-02-10 15:56:21 -05:00
Ryan C. Gordon 3ba1e363d1 cmake: Special build target names ("dist" "docs" "uninstall") can be renamed.
(transplanted from ac7b9452fdd8ef87eb4cfa36a80999b9cfc66235)
2019-02-10 15:45:01 -05:00
Ryan C. Gordon 0d3d0afc9a Allow builds to opt-out or opt-in to specific archivers, whichever's easier.
(transplanted from ff8f4c2a60d8bea12e34c1ed5cb4f506efb39020)
2019-01-26 03:00:29 -05:00
Ryan C. Gordon 20da8fab65 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).
(transplanted from 8b3cc36531c6ac09dbac98d3774921bdf14b240d)
2018-11-27 23:53:33 -05:00
Ryan C. Gordon 9ef9a06db3 windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809. 2018-10-03 22:40:57 -04:00
Ryan C. Gordon 4a56820f1d PHYSFS_setWriteDir() shouldn't create an empty file if the dir doesn't exist.
(transplanted from 2653b3bc19c9ba7d1e6bf53566719e4e30935382)
2018-05-16 19:54:51 -04:00
Ryan C. Gordon b1c6c7f4a8 Fix up physfs.h for compilers that are sensitive about preprocessor defines. 2018-04-19 10:06:38 -04:00
Ryan C. Gordon a828a91feb apple: Patched to compile with older (mac 10.7) SDKs (thanks, Ken and Ryan!).
(transplanted from 46561a3098955aa3534c10e2dcd9e969e140bb3d)
2018-03-24 00:19:59 -04:00
Ryan C. Gordon be0afe31e3 ignorecase: Don't crash if enumeration returned a NULL pointer. 2018-03-09 14:50:37 -05:00
Ryan C. Gordon d08188c1e0 Updated copyright date.
(transplanted from f50073f637203bd545443b5a53326cc8e8dd0cd8)
2018-03-08 12:21:45 -05:00
Ryan C. Gordon e216897cb9 7zip: don't forget to destroy the PHYSFS_Io when closing the archive!
(transplanted from bc6cd61b76288298feb2d997b99f19deb75fd90c)
2018-03-08 11:47:42 -05:00