X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config.h;h=22e6b1b92060e09611311e1d8f4fb428b539d6e7;hb=389213bc0d9e6b16780f413b883e8b442b83b041;hp=9bae024ed635253f62dc3820fef582d99ba43c1a;hpb=ef65b7aa8aa9801818dfe1de1f4a434719cc62e1;p=debian%2Fyforth
diff --git a/config.h b/config.h
index 9bae024..22e6b1b 100644
--- a/config.h
+++ b/config.h
@@ -1,8 +1,18 @@
-/* yForth? - Written by Luca Padovani (C) 1996/97
- * ------------------------------------------------------------------------
- * This software is FreeWare as long as it comes with this header in each
- * source file, anyway you can use it or any part of it whatever
- * you want. It comes without any warranty, so use it at your own risk.
+/* yForth? - A Forth interpreter written in ANSI C
+ * Copyright (C) 2012 Luca Padovani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
* ------------------------------------------------------------------------
* Module name: config.h
* Abstract: configuration file. Before any compilation please check
@@ -15,6 +25,8 @@
* excluded word lists may be linked to final code if used by other words.
*/
+#include
+
#define COREE_DEF 1L
#define DOUBLE_DEF 1L
#define DOUBLEE_DEF 1L
@@ -62,7 +74,11 @@
* Note that some compilers have LITTLE_ENDIAN yet defined.
*/
#ifndef LITTLE_ENDIAN
+# if __BYTE_ORDER == __LITTLE_ENDIAN
# define LITTLE_ENDIAN
+# else
+# undef LITTLE_ENDIAN
+# endif
#endif
/* When DCELL_MEM is defined, double cell transfer is realized by memory
@@ -77,9 +93,15 @@
* Under Linux, Cell may be "int" and DCell "long long".
*/
-#define Cell int
+/* this might work for other 64 bit architectures, too? */
+#if defined(__alpha__)
+# define Cell long
+#else
+# define Cell int
+#endif /* __alpha__ */
+
#define Char char
-#define Real long double
+#define Real float
#define UCell unsigned Cell
#define DCell long long
@@ -102,8 +124,13 @@
#define MAX_F 0.0
/* Some compilers doesn't provide some functions in the standard library.
- * If you don't have, undefine them
- */
-#define HAVE_ACOSH
-#define HAVE_ASINH
-#define HAVE_ATANH
+ * If you don't have, turn 1s into 0s
+ */
+#define HAVE_ACOSH 1
+#define HAVE_ASINH 1
+#define HAVE_ATANH 1
+
+/* Set following define to 1 if you're compiling under Turbo C, Borland C,
+ * or GCC for DOS.
+ */
+#define HAVE_CONIO 0