guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 05/11: Move some definitions out of _scm.h


From: Andy Wingo
Subject: [Guile-commits] 05/11: Move some definitions out of _scm.h
Date: Sun, 17 Jun 2018 07:46:22 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 791341bdd2d843b3e1124f549452ff5034e97e62
Author: Andy Wingo <address@hidden>
Date:   Sun Jun 17 09:24:22 2018 +0200

    Move some definitions out of _scm.h
    
    * libguile/_scm.h:
    * libguile/loader.h (SCM_OBJCODE_ENDIANNESS):
      (SCM_OBJCODE_WORD_SIZE, SCM_OBJCODE_MAJOR_VERSION):
      (SCM_OBJCODE_MINOR_VERSION, SCM_OBJCODE_MAJOR_VERSION_STRING):
      (SCM_OBJCODE_MINOR_VERSION_STRING):
      (SCM_OBJCODE_VERSION_STRING, SCM_OBJCODE_MACHINE_VERSION_STRING): Move
      definitions to loader.h.
---
 libguile/_scm.h   | 29 ++---------------------------
 libguile/loader.h | 30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/libguile/_scm.h b/libguile/_scm.h
index 2c505fa..70de31b 100644
--- a/libguile/_scm.h
+++ b/libguile/_scm.h
@@ -3,8 +3,8 @@
 #ifndef SCM__SCM_H
 #define SCM__SCM_H
 
-/* Copyright (C) 1995, 1996, 2000, 2001, 2002, 2006, 2008, 2009, 2010,
- *   2011, 2013, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1996,2000-2002,2006,2008-2011,2013-2014,2018
+ *   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
@@ -233,31 +233,6 @@ void scm_ia64_longjmp (scm_i_jmp_buf *, int);
 
 
 
-/* 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 4
-#define SCM_OBJCODE_MINIMUM_MINOR_VERSION 0
-#define SCM_OBJCODE_MINOR_VERSION 0
-#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_ENDIANNESS "-" SCM_OBJCODE_WORD_SIZE "-" 
SCM_OBJCODE_VERSION_STRING
 
 #endif  /* SCM__SCM_H */
 
diff --git a/libguile/loader.h b/libguile/loader.h
index 44cee56..530ecc2 100644
--- a/libguile/loader.h
+++ b/libguile/loader.h
@@ -21,6 +21,36 @@
 
 #include <libguile/__scm.h>
 
+#ifdef BUILDING_LIBGUILE
+
+/* 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 4
+#define SCM_OBJCODE_MINIMUM_MINOR_VERSION 0
+#define SCM_OBJCODE_MINOR_VERSION 0
+#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_ENDIANNESS "-" SCM_OBJCODE_WORD_SIZE "-" 
SCM_OBJCODE_VERSION_STRING
+
+#endif
+
 SCM_API SCM scm_load_thunk_from_file (SCM filename);
 SCM_API SCM scm_load_thunk_from_memory (SCM bv);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]