X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/b93ef4a183fdcb182925f17cacf1803a200a1130..970d32b553a44051cedd2caf34267b7b1cdbab78:/csrc/pf_main.c diff --git a/csrc/pf_main.c b/csrc/pf_main.c index a779560..6b07f33 100644 --- a/csrc/pf_main.c +++ b/csrc/pf_main.c @@ -43,13 +43,21 @@ #define TRUE (1) #define FALSE (0) #endif + +static const char *gErrorMsg32Bit = "ERROR - A long is not 4 bytes. Are we running on a 64-bit machine?!\n"; #ifdef PF_EMBEDDED int main( void ) { char IfInit = 0; const char *DicName = NULL; - const char *SourceName = NULL; + const char *SourceName = NULL; + // Check to make sure we are running in 32-bit mode. + if( sizeof(long) != 4 ) + { + pfMessage(gErrorMsg32Bit); + return 1; + } pfMessage("\npForth Embedded\n"); return pfDoForth( DicName, SourceName, IfInit); } @@ -68,7 +76,14 @@ int main( int argc, char **argv ) char *s; int32 i; int Result; - + + // Check to make sure we are running in 32-bit mode. + if( sizeof(long) != 4 ) + { + ERR((gErrorMsg32Bit)); + return 1; + } + /* For Metroworks on Mac */ #ifdef __MWERKS__ argc = ccommand(&argv);