From: Jarkko Hietaniemi Date: Wed, 27 Aug 2003 05:17:44 +0000 (+0000) Subject: Sanity check for BYTEORDER. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=99ec81d37267036802558d0fe26c7a89fe8bf540;p=p5sagit%2Fp5-mst-13.2.git Sanity check for BYTEORDER. p4raw-id: //depot/perl@20914 --- diff --git a/perl.h b/perl.h index cd735af..1d740ec 100644 --- a/perl.h +++ b/perl.h @@ -247,8 +247,9 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); #define SOFT_CAST(type) (type) #endif -#ifndef BYTEORDER /* Should never happen -- byteorder is in config.h */ -# define BYTEORDER 0x1234 +/* Only these byteorders are really known and tested. */ +#if !(BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 || BYTEORDER == 0x4321 || BYTEORDER == 0x87654321) +# error "UNKNOWN BYTEORDER!" #endif /* Overall memory policy? */