summaryrefslogtreecommitdiff
path: root/libguile/deprecated.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-06-17 20:34:05 +0200
committerAndy Wingo <wingo@pobox.com>2018-06-17 20:34:05 +0200
commit63e5eafd83bf281e9bf64973b8725fe75954374c (patch)
tree3b2cdc5b37224d914024f23ea54d9bdfdc553f84 /libguile/deprecated.h
parente48567fa6c32c0181bc5bc17df4eda51030a9d93 (diff)
downloadguile-63e5eafd83bf281e9bf64973b8725fe75954374c.tar.gz
Assume that if we have GCC, we have GCC >= 3.0.
* libguile/__scm.h (SCM_GNUC_PREREQ): Remove this definition. Assume that if we have GCC, that we have GCC >= 3.0 (from 2002). Adapt uses to use simply "#ifdef __GNUC__". * libguile/deprecated.h (SCM_GNUC_PREREQ): Add deprecated definition.
Diffstat (limited to 'libguile/deprecated.h')
-rw-r--r--libguile/deprecated.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 88b86df44..d1836192b 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -25,6 +25,15 @@
/* Deprecated declarations go here. */
+/* Return true (non-zero) if GCC version MAJ.MIN or later is being used
+ * (macro taken from glibc.) */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define SCM_GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#else
+# define SCM_GNUC_PREREQ(maj, min) 0
+#endif
+
#define scm_i_jmp_buf scm_i_jmp_buf_GONE__USE_JMP_BUF_INSTEAD
void scm_i_init_deprecated (void);