lenst
Members-
Posts
4 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
lenst's Achievements
Newbie (1/3)
0
Reputation
-
[7428] New .map file format and some fixes
lenst replied to Auntie Mangos's topic in ... acceptedOld
On 32bit linux fopen can't open large files (>2Gb i think). System.cpp uses fopen to test if a file exists. The code that reads the files uses open (not fopen) with flag O_LARGEFILE. Before the map patch these files where just read, not tested for existens. One solution could be to change the exitens test to use open. The following patch works for me: --- a/contrib/extractor/System.cpp +++ b/contrib/extractor/System.cpp @@ -1,6 +1,9 @@ #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include <deque> #include <set> #include <cstdlib> @@ -81,9 +84,10 @@ void CreateDir( const std::string& Path ) bool FileExists( const char* FileName ) { - if(FILE* fp = fopen( FileName, "rb" )) + int fd = open( FileName, O_RDONLY | O_LARGEFILE ); + if(fd >= 0) { - fclose(fp); + close(fd); return true; } -
[7428] New .map file format and some fixes
lenst replied to Auntie Mangos's topic in ... acceptedOld
These are large files. That might explain why the text editor can't open them. They are all larger than 2Gb. I think they are the only files that large. I put in some printfs and found that fopen fails with "Value too large for defined data type". But why now? What changed in the patch that could have an effect on this? Any change in libraries or compiler settings? -
[7428] New .map file format and some fixes
lenst replied to Auntie Mangos's topic in ... acceptedOld
I'm running mangos on Linux and I still have problem extracting the new map files. I have recompiled ad according to instructions. Running it generates 1206 maps files, but the lowest numbered file is 2692527.map. No 0004331.map gets generated. -
[Q] Local changes in specific file but I don't see any
lenst replied to a topic in OldSource code management
Perhaps the difference is in whitespace. Have you tried a diff with -b or -w ? Whitespace could also be LF vs. CRLF.
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®