summaryrefslogtreecommitdiff
path: root/libguile/foreign.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-02-18 17:59:38 +0100
committerAndy Wingo <wingo@pobox.com>2013-02-18 17:59:38 +0100
commit9b977c836bf147d386944c401113aba32776fa68 (patch)
treed097e1a2376e26bc6b03447445ae239d5514a7a8 /libguile/foreign.c
parent180ac9d7b0bac97bdead2813a1b0b23d19002c3e (diff)
parent739941679c2c7dc36c29c30aff7d4c1b436ba773 (diff)
downloadguile-9b977c836bf147d386944c401113aba32776fa68.tar.gz
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/array-handle.c libguile/deprecated.h libguile/inline.c libguile/inline.h module/ice-9/deprecated.scm module/language/tree-il/peval.scm
Diffstat (limited to 'libguile/foreign.c')
-rw-r--r--libguile/foreign.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/libguile/foreign.c b/libguile/foreign.c
index 47077f7f8..c81c5f407 100644
--- a/libguile/foreign.c
+++ b/libguile/foreign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2011, 2012, 2013 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
@@ -53,6 +53,8 @@ SCM_SYMBOL (sym_unsigned_short, "unsigned-short");
SCM_SYMBOL (sym_unsigned_int, "unsigned-int");
SCM_SYMBOL (sym_unsigned_long, "unsigned-long");
SCM_SYMBOL (sym_size_t, "size_t");
+SCM_SYMBOL (sym_ssize_t, "ssize_t");
+SCM_SYMBOL (sym_ptrdiff_t, "ptrdiff_t");
/* that's for pointers, you know. */
SCM_SYMBOL (sym_asterisk, "*");
@@ -1282,6 +1284,26 @@ scm_init_foreign (void)
#endif
);
+ scm_define (sym_ssize_t,
+#if SIZEOF_SIZE_T == 8
+ scm_from_uint8 (SCM_FOREIGN_TYPE_INT64)
+#elif SIZEOF_SIZE_T == 4
+ scm_from_uint8 (SCM_FOREIGN_TYPE_INT32)
+#else
+# error unsupported sizeof (ssize_t)
+#endif
+ );
+
+ scm_define (sym_ptrdiff_t,
+#if SCM_SIZEOF_SCM_T_PTRDIFF == 8
+ scm_from_uint8 (SCM_FOREIGN_TYPE_INT64)
+#elif SCM_SIZEOF_SCM_T_PTRDIFF == 4
+ scm_from_uint8 (SCM_FOREIGN_TYPE_INT32)
+#else
+# error unsupported sizeof (scm_t_ptrdiff)
+#endif
+ );
+
null_pointer = scm_cell (scm_tc7_pointer, 0);
scm_define (sym_null, null_pointer);
}