summaryrefslogtreecommitdiff
path: root/libguile/gen-scmconfig.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-07-29 15:48:54 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-07-29 15:48:54 +0000
commit4627df5a6bd4e9ab40135f4a491192f8ba5a8c21 (patch)
tree0f60da91c9620acd422c885661eeb0a27c621811 /libguile/gen-scmconfig.c
parentd1b5b4001ee658d978182eb67a43dc648f0a9e2f (diff)
downloadguile-4627df5a6bd4e9ab40135f4a491192f8ba5a8c21.tar.gz
* gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
Diffstat (limited to 'libguile/gen-scmconfig.c')
-rw-r--r--libguile/gen-scmconfig.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 3fd2df569..e4465c05f 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -270,6 +270,7 @@ main (int argc, char *argv[])
pf ("#define SCM_SIZEOF_UNSIGNED_LONG %d\n", SIZEOF_UNSIGNED_LONG);
pf ("#define SCM_SIZEOF_INT %d\n", SIZEOF_INT);
pf ("#define SCM_SIZEOF_UNSIGNED_INT %d\n", SIZEOF_UNSIGNED_INT);
+ pf ("#define SCM_SIZEOF_SIZE_T %d\n", SIZEOF_SIZE_T);
pf ("\n");
pf ("/* Size of (unsigned) long long or 0 if not available (scm_t_*64 may\n"
@@ -303,6 +304,15 @@ main (int argc, char *argv[])
pf ("typedef %s scm_t_intmax;\n", SCM_I_GSC_T_INTMAX);
pf ("typedef %s scm_t_uintmax;\n", SCM_I_GSC_T_UINTMAX);
+ if (0 == strcmp ("intmax_t", SCM_I_GSC_T_INTMAX))
+ pf ("#define SCM_SIZEOF_INTMAX %d\n", SIZEOF_INTMAX_T);
+ else if (0 == strcmp ("long long", SCM_I_GSC_T_INTMAX))
+ pf ("#define SCM_SIZEOF_INTMAX %d\n", SIZEOF_LONG_LONG);
+ else if (0 == strcmp ("__int64", SCM_I_GSC_T_INTMAX))
+ pf ("#define SCM_SIZEOF_INTMAX %d\n", SIZEOF___INT64);
+ else
+ return 1;
+
pf ("\n");
pf ("/* 64-bit integer -- if available SCM_HAVE_T_INT64 will be 1 and\n"
" scm_t_int64 will be a suitable type, otherwise SCM_HAVE_T_INT64\n"