summaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/luaconf.h b/luaconf.h
index 202655ba..d0c9f17d 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.157 2011/04/29 13:56:28 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.158 2011/05/26 16:09:40 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -465,11 +465,11 @@
465 465
466/* 466/*
467@@ LUA_IEEEENDIAN is the endianness of doubles in your machine 467@@ LUA_IEEEENDIAN is the endianness of doubles in your machine
468@@ (0 for little endian, 1 for big endian); if not defined, Lua will 468** (0 for little endian, 1 for big endian); if not defined, Lua will
469@@ check it dynamically. 469** check it dynamically.
470*/ 470*/
471/* check for known architectures */ 471/* check for known architectures */
472#if defined(__i386__) || defined(__i386) || defined(i386) || \ 472#if defined(__i386__) || defined(__i386) || defined(__X86__) || \
473 defined (__x86_64) 473 defined (__x86_64)
474#define LUA_IEEEENDIAN 0 474#define LUA_IEEEENDIAN 0
475#elif defined(__POWERPC__) || defined(__ppc__) 475#elif defined(__POWERPC__) || defined(__ppc__)
@@ -485,6 +485,30 @@
485/* }================================================================== */ 485/* }================================================================== */
486 486
487 487
488/*
489@@ LUA_NANTRICKLE/LUA_NANTRICKBE controls the use of a trick to pack all
490** types into a single double value, using NaN values to represent
491** non-number values. The trick only works on 32-bit machines (ints and
492** pointers are 32-bit values) with numbers represented as IEEE 754-2008
493** doubles with conventional endianess (12345678 or 87654321), in CPUs
494** that do not produce signaling NaN values (all NaNs are quiet).
495*/
496#if defined(LUA_CORE) /* { */
497
498#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */
499
500/* little-endian architectures that satisfy those conditions */
501#if defined(__i386__) || defined(__i386) || defined(__X86__)
502
503#define LUA_NANTRICKLE
504
505#endif
506
507#endif /* } */
508
509#endif /* } */
510
511
488 512
489 513
490/* =================================================================== */ 514/* =================================================================== */