r887 - trunk/platform
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Mar 31 23:04:20 EDT 2007
Author: icculus
Date: 2007-03-31 23:04:20 -0400 (Sat, 31 Mar 2007)
New Revision: 887
Modified:
trunk/platform/windows.c
Log:
Patched to compile, and work with pre-Vista versions of the Platform SDK.
Modified: trunk/platform/windows.c
===================================================================
--- trunk/platform/windows.c 2007-03-31 23:44:42 UTC (rev 886)
+++ trunk/platform/windows.c 2007-04-01 03:04:20 UTC (rev 887)
@@ -41,6 +41,10 @@
/* just in case... */
#define PHYSFS_INVALID_FILE_ATTRIBUTES 0xFFFFFFFF
+/* Not defined before the Vista SDK. */
+#define PHYSFS_IO_REPARSE_TAG_SYMLINK 0xA000000C
+
+
#define UTF8_TO_UNICODE_STACK_MACRO(w_assignto, str) { \
if (str == NULL) \
w_assignto = NULL; \
@@ -578,10 +582,10 @@
} /* __PHYSFS_platformExists */
-static int isSymlinkAttrs(DWORD attr, DWORD tag)
+static int isSymlinkAttrs(const DWORD attr, const DWORD tag)
{
- return ( (attr & FILE_ATTRIBUTE_REPARSE_POINT) &&
- ((tag & IO_REPARSE_TAG_SYMLINK) == IO_REPARSE_TAG_SYMLINK) );
+ return ( (attr & FILE_ATTRIBUTE_REPARSE_POINT) &&
+ (tag == PHYSFS_IO_REPARSE_TAG_SYMLINK) );
} /* isSymlinkAttrs */
@@ -719,7 +723,7 @@
{
do
{
- const DWORD attrs = entw.dwFileAttributes;
+ const DWORD attr = entw.dwFileAttributes;
const DWORD tag = entw.dwReserved0;
const WCHAR *fn = entw.cFileName;
if ((fn[0] == '.') && (fn[1] == '\0'))
@@ -742,7 +746,7 @@
{
do
{
- const DWORD attrs = ent.dwFileAttributes;
+ const DWORD attr = ent.dwFileAttributes;
const DWORD tag = ent.dwReserved0;
const char *fn = ent.cFileName;
if ((fn[0] == '.') && (fn[1] == '\0'))
More information about the physfs-commits
mailing list