From abcb5c9321f31df3f84f0b07bfe61bbd1d594042 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 3 Apr 2004 23:00:48 +0000 Subject: Fixes for windows. --- src/drive.h | 2 +- src/ntfsx.c | 2 +- src/scrounge.c | 2 +- src/usuals.h | 10 ++++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/drive.h b/src/drive.h index fdfc0eb..9d8e58c 100644 --- a/src/drive.h +++ b/src/drive.h @@ -23,7 +23,7 @@ #include "usuals.h" #define kSectorSize 0x200 -#define kInvalidSector 0xFFFFFFFFFFFFFFFFLL +#define kInvalidSector UL(0xFFFFFFFFFFFFFFFF) struct _ntfsx_mftmap; struct _drivelocks; diff --git a/src/ntfsx.c b/src/ntfsx.c index 35f1c23..4d6546b 100644 --- a/src/ntfsx.c +++ b/src/ntfsx.c @@ -316,7 +316,7 @@ ntfsx_attribute* ntfsx_record_findattribute(ntfsx_record* record, uint32 attrTyp if(atlr->type == attrType) { /* Read in appropriate cluster */ - mftRecord = ntfsx_mftmap_sectorforindex(record->info->mftmap, atlr->refAttrib & 0xFFFFFFFFFFFFLL); + mftRecord = ntfsx_mftmap_sectorforindex(record->info->mftmap, atlr->refAttrib & UL(0xFFFFFFFFFFFF)); r2 = ntfsx_record_alloc(record->info); if(!r2) diff --git a/src/scrounge.c b/src/scrounge.c index 4b4851c..075f329 100644 --- a/src/scrounge.c +++ b/src/scrounge.c @@ -109,7 +109,7 @@ void processRecordFileBasics(partitioninfo* pi, ntfsx_record* record, filebasics /* Parent Directory */ - basics->parent = filename->refParent & 0xFFFFFFFFFFFFLL; + basics->parent = filename->refParent & UL(0xFFFFFFFFFFFF); /* Namespace */ diff --git a/src/usuals.h b/src/usuals.h index 038e8f9..f429d5b 100644 --- a/src/usuals.h +++ b/src/usuals.h @@ -23,9 +23,9 @@ #include #ifdef _WIN32 - #include <../config.win32.h> + #include "config.win32.h" #else - #include <../config.h> + #include "config.h" #endif #ifdef HAVE_IO_H @@ -72,4 +72,10 @@ #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif +#ifdef _WIN32 + #define UL(x) x +#else + #define UL(x) x#LL +#endif + #endif /* __USUALS_H__ */ -- cgit v1.2.3