summaryrefslogtreecommitdiff
path: root/libguile/_scm.h
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/_scm.h')
-rw-r--r--libguile/_scm.h60
1 files changed, 39 insertions, 21 deletions
diff --git a/libguile/_scm.h b/libguile/_scm.h
index e40f29bb0..627c51e03 100644
--- a/libguile/_scm.h
+++ b/libguile/_scm.h
@@ -3,21 +3,22 @@
#ifndef SCM__SCM_H
#define SCM__SCM_H
-/* Copyright (C) 1995,1996,2000,2001, 2002, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,2000,2001, 2002, 2006, 2008, 2009 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
@@ -58,6 +59,7 @@
#endif
#include <errno.h>
+#include <verify.h>
#include "libguile/__scm.h"
/* Include headers for those files central to the implementation. The
@@ -78,20 +80,6 @@
#include "libguile/modules.h"
#include "libguile/inline.h"
-/* SCM_SYSCALL retries system calls that have been interrupted (EINTR).
- However this can be avoided if the operating system can restart
- system calls automatically. We assume this is the case if
- sigaction is available and SA_RESTART is defined; they will be used
- when installing signal handlers.
- */
-
-#ifdef HAVE_RESTARTABLE_SYSCALLS
-#if ! SCM_USE_PTHREAD_THREADS /* However, don't assume SA_RESTART
- works with pthreads... */
-#define SCM_SYSCALL(line) line
-#endif
-#endif
-
#ifndef SCM_SYSCALL
#ifdef vms
# ifndef __GNUC__
@@ -169,6 +157,36 @@
#define scm_from_off64_t scm_from_int64
+/* The endianness marker in objcode. */
+#ifdef WORDS_BIGENDIAN
+# define SCM_OBJCODE_ENDIANNESS "BE"
+#else
+# define SCM_OBJCODE_ENDIANNESS "LE"
+#endif
+
+#define _SCM_CPP_STRINGIFY(x) # x
+#define SCM_CPP_STRINGIFY(x) _SCM_CPP_STRINGIFY (x)
+
+/* The word size marker in objcode. */
+#define SCM_OBJCODE_WORD_SIZE SCM_CPP_STRINGIFY (SIZEOF_VOID_P)
+
+/* Major and minor versions must be single characters. */
+#define SCM_OBJCODE_MAJOR_VERSION 0
+#define SCM_OBJCODE_MINOR_VERSION B
+#define SCM_OBJCODE_MAJOR_VERSION_STRING \
+ SCM_CPP_STRINGIFY(SCM_OBJCODE_MAJOR_VERSION)
+#define SCM_OBJCODE_MINOR_VERSION_STRING \
+ SCM_CPP_STRINGIFY(SCM_OBJCODE_MINOR_VERSION)
+#define SCM_OBJCODE_VERSION_STRING \
+ SCM_OBJCODE_MAJOR_VERSION_STRING "." SCM_OBJCODE_MINOR_VERSION_STRING
+#define SCM_OBJCODE_MACHINE_VERSION_STRING \
+ SCM_OBJCODE_VERSION_STRING "-" SCM_OBJCODE_ENDIANNESS "-" SCM_OBJCODE_WORD_SIZE
+
+/* The objcode magic header. */
+#define SCM_OBJCODE_COOKIE \
+ "GOOF-" SCM_OBJCODE_MACHINE_VERSION_STRING "---"
+
+
#endif /* SCM__SCM_H */
/*