build problems with 0.1.9 on cygwin -- FIXED

Robby Dermody robbyd at p9i.com
Sun Dec 7 12:36:32 EST 2003


Hey guys,

Ran into two little snags with building the newest on cygwin:

First one involved the BAIL_IF_MACRO on line 375 of win32.c ....apparently
gcc (2.95.4) doesn't like that INVALID_FILE_ATTRIBUTES define. (I get an
issue with an unrecognized '-' token, weird). Changing that macro to just
the literal 0xFFFFFFFF (which is what it is in the first place) fixes the
problem.

The second is with your LOW/HIGHORDER_UINT64 macros in
__PHYSFS_platformSeek() (declared on line 32 and 33 in win32.c, and is used
around line 818 in win32.c), with the HIGHORDER one in this function, gcc
will generate a warning that the value returned from it is too big to fit
into that DWORD. So, I changed the macros and it seemed to like them:

//#define LOWORDER_UINT64(pos)       (PHYSFS_uint32)(pos &
0x00000000FFFFFFFF)
//#define HIGHORDER_UINT64(pos)      (PHYSFS_uint32)(pos &
0xFFFFFFFF00000000)
#define LOWORDER_UINT64(pos)       ((PHYSFS_uint32*)&pos)[1]
#define HIGHORDER_UINT64(pos)       ((PHYSFS_uint32*)&pos)[0]

It's kind of a hack, I know, and I haven't tested the seek function, so if
you make these changes to the source, I'd definitely make sure the win32
seek works.

Thanks, seems to compile and link fine besides that! I'll be doing some
basic cygwin testing of my software project with it in a few days and I'll
let you know if I run into any more problems.

Robby

---
Robby Dermody (robbyd at p8i.com)
phase8 industries, inc. - http://www.p8i.com/

We confide in our strength, without boasting of it; we respect that of
others, without fearing it.
    -Thomas Jefferson





More information about the physfs mailing list