Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed symlink-p operation on ACL 10.1
ACL 10.1 is built with Visual Studio 2015. (ACL 10.0 was built with MSVC 6.0). There are some changes in behavior in the VS 2015 runtime libraries (as compared to MSVC 6) which adversely affect the behavior of Allegro NFS. This commit works around those changes. The notable change in behavior is that the stat64 function now returns -1 and ENOENT for pagefile.sys where it didn't before. This problem is manifested by any operation which uses excl::filestat, such as 'file-length' and 'open'. symlink-p calls file-length on a file to see if it has an even length (meaning it might be a symlink file). symlink-p is used by unix-mode-from-file-attributes which is used by unicode-stat and stat-via-find-first-file (which is called by unicode-stat). To work around the problem symlink-p now takes the file-length as a required argument. This information is already available in the caller anyway. symlink-p also now uses with-unicode-open instead of with-open-file Additional code cleanup: * Factored out a common pattern into dword-pair-to-integer. * Remove unused old-unicode-stat function. Removed unused stat64 struct, wstat64 foreign call, and related foreign type defs. * Remove unused unix-mode-from-file-information function. Change-Id: If3a66ba666c44763cde6e1d4f5ba038c1fe4cf9a Reviewed-on: https://gerrit.franz.com:9080/8059 Reviewed-by: Ahmon Dancy <dancy@franz.com> Reviewed-by: Kevin Layer <layer@franz.com> Tested-by: Kevin Layer <layer@franz.com>
- Loading branch information
1 parent
1fd42a6
commit e252fb7
Showing
2 changed files
with
69 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters