[9521] Let build map extractor at Mac OSX

Also restore build at Windows (Win32 not have unistd.h)

Win32 ad.exe binary updated but not expected any functional differences.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
imbecile 2010-03-05 06:45:59 +03:00 committed by VladimirMangos
parent eaf5934c99
commit 24540e4b03
5 changed files with 28 additions and 37 deletions

View file

@ -76,12 +76,10 @@ int libmpq_archive_open(mpq_archive *mpq_a, unsigned char *mpq_filename) {
while (!ncnt) {
mpq_a->header->id = 0;
#ifdef WIN32
_lseeki64(mpq_a->fd, mpq_a->mpqpos, SEEK_SET);
#else
lseek64(mpq_a->fd, mpq_a->mpqpos, SEEK_SET);
#endif
rb = _read(mpq_a->fd, mpq_a->header, sizeof(mpq_header));
libmpq_lseek(mpq_a, mpq_a->mpqpos);
rb = _read(mpq_a->fd, mpq_a->header, sizeof(mpq_header));
/* if different number of bytes read, break the loop */
if (rb != sizeof(mpq_header)) {