X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2276c2959446be677a52f639d8f92e5a0e216c32..49a91764b57168d9f441578001b3206a7330ee70:/src/mac/morefile/Director.cpp?ds=sidebyside diff --git a/src/mac/morefile/Director.cpp b/src/mac/morefile/Director.cpp index f8b0d0a891..635877693f 100644 --- a/src/mac/morefile/Director.cpp +++ b/src/mac/morefile/Director.cpp @@ -27,11 +27,11 @@ #define __COMPILINGMOREFILES -#include "MoreFile.h" -#include "MoreExtr.h" -#include "MoreDesk.h" -#include "FileCopy.h" -#include "Director.h" +#include "morefile.h" +#include "moreextr.h" +#include "moredesk.h" +#include "filecopy.h" +#include "director.h" /*****************************************************************************/ @@ -52,9 +52,14 @@ enum ** stack space used when recursively calling CopyLevel and to hold ** global information that might be needed at any time. */ -#if PRAGMA_ALIGN_SUPPORTED -#pragma options align=mac68k +#if PRAGMA_STRUCT_ALIGN + #pragma options align=mac68k +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(push, 2) +#elif PRAGMA_STRUCT_PACK + #pragma pack(2) #endif + struct EnumerateGlobals { Ptr copyBuffer; /* pointer to buffer used for file copy operations */ @@ -67,8 +72,12 @@ struct EnumerateGlobals Str63 itemName; /* the name of the current item */ CInfoPBRec myCPB; /* the parameter block used for PBGetCatInfo calls */ }; -#if PRAGMA_ALIGN_SUPPORTED -#pragma options align=reset +#if PRAGMA_STRUCT_ALIGN + #pragma options align=reset +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(pop) +#elif PRAGMA_STRUCT_PACK + #pragma pack() #endif typedef struct EnumerateGlobals EnumerateGlobals; @@ -79,9 +88,14 @@ typedef EnumerateGlobals *EnumerateGlobalsPtr; ** stack space used when recursively calling GetLevelSize and to hold ** global information that might be needed at any time. */ -#if PRAGMA_ALIGN_SUPPORTED -#pragma options align=mac68k +#if PRAGMA_STRUCT_ALIGN + #pragma options align=mac68k +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(push, 2) +#elif PRAGMA_STRUCT_PACK + #pragma pack(2) #endif + struct PreflightGlobals { OSErr result; /* temporary holder of results - saves 2 bytes of stack each level */ @@ -95,8 +109,12 @@ struct PreflightGlobals unsigned long tempBlocks; /* temporary storage for calculations (save some stack space) */ CopyFilterProcPtr copyFilterProc; /* pointer to filter function */ }; -#if PRAGMA_ALIGN_SUPPORTED -#pragma options align=reset +#if PRAGMA_STRUCT_ALIGN + #pragma options align=reset +#elif PRAGMA_STRUCT_PACKPUSH + #pragma pack(pop) +#elif PRAGMA_STRUCT_PACK + #pragma pack() #endif typedef struct PreflightGlobals PreflightGlobals; @@ -196,6 +214,9 @@ static void GetLevelSize(long currentDirID, } while ( theGlobals->result == noErr ); } + +#if !TARGET_CARBON + /*****************************************************************************/ static OSErr PreflightDirectoryCopySpace(short srcVRefNum, @@ -213,7 +234,8 @@ static OSErr PreflightDirectoryCopySpace(short srcVRefNum, if ( error == noErr ) { /* Convert freeBytes to free disk blocks (512-byte blocks) */ - dstFreeBlocks = (pb.ioVFreeBytes.hi << 23) + (pb.ioVFreeBytes.lo >> 9); + // dstFreeBlocks = (pb.ioVFreeBytes.hi << 23) + (pb.ioVFreeBytes.lo >> 9); + dstFreeBlocks = pb.ioVFreeBytes >> 9 ; /* get allocation block size (always multiple of 512) and divide by 512 to get number of 512-byte blocks per allocation block */ @@ -237,7 +259,7 @@ static OSErr PreflightDirectoryCopySpace(short srcVRefNum, return ( error ); } - +#endif /*****************************************************************************/ static void CopyLevel(long sourceDirID,