|
From: Jeff B. <ob...@fu...> - 2002-10-18 23:55:04
|
I've got GemRB pretty much building cleanly under Linux. Here's a list
of what I've changed:
- I had to change a number on #include statements in various ways.
- I fixed the header guards by moving the #endif's to the ends of the files.
- I commented out the includes to CREStructures.h and BMPStructures.h in
Types.h because these two files can't be found. I do get errors for
TBAMFile.h and TBAMFile.cpp because TCREAnimData is undefined.
- I got rid of a few __fastcall keywords scattered about.
- I fixed a couple comparison between signed and unsigned warnings by
changing ints to unsigned ints.
- I replaced a UInt32 in Graphics.cpp with a DWORD.
- I fixed a number of implicit ints in member functions.
- I found an error in TISStructures.h:
char Signature[8];
is used to store an eight-character long string, but there isn't room
for the NUL character at the end of the string. I changed the 8 to a 9.
- I found this non-portable statement in TStream.cpp:
sprintf(Filename, ".\\Temp\\%d.str", count);
I replaced it with a call to tmpnam(), which is portable but not thread
safe. I also have a version that is thread safe, using the POSIX
function mkstmp(). I don't know if that function needs to be thread
safe, or if we're planning to use POSIX, so I included both.
Now while I'm in TStream.cpp, I'll start working on some Endianness-safe
functions for loading data from files.
--
jeffbinder$ cat | tr -d '\n' | perl >q.c ; cc q.c
eval($a=q{$_='eval($a=q{'.$a.'})';$e='\\\'x2;s
/\\\/$e$e$e$e/g;s/"/$e\\\"/g;s/\\$/$e\\$/g;pri
nt'main(){system("perl -e\\"'.$_.'\\">o");}'})
|