+ Not each and every possibility is covered by the code below, and
+ while it is trivial to complete the tests, it might be better to
+ just test for the 'sane' possibilities. When one of the tests
+ below fails, chances are good that some silent assumption somewhere
+ else will also fail.
+*/
+
+#if SCM_SIZEOF_CHAR == 1
+#define scm_to_schar scm_to_int8
+#define scm_from_schar scm_from_int8
+#define scm_to_uchar scm_to_uint8
+#define scm_from_uchar scm_from_uint8
+#if CHAR_MIN == 0
+#define scm_to_char scm_to_uint8
+#define scm_from_char scm_from_uint8
+#else
+#define scm_to_char scm_to_int8
+#define scm_from_char scm_from_int8
+#endif
+#else
+#error sizeof(char) is not 1.
+#endif
+
+#if SCM_SIZEOF_SHORT == 1
+#define scm_to_short scm_to_int8
+#define scm_from_short scm_from_int8
+#define scm_to_ushort scm_to_uint8
+#define scm_from_ushort scm_from_uint8
+#else
+#if SCM_SIZEOF_SHORT == 2
+#define scm_to_short scm_to_int16
+#define scm_from_short scm_from_int16
+#define scm_to_ushort scm_to_uint16
+#define scm_from_ushort scm_from_uint16
+#else
+#if SCM_SIZEOF_SHORT == 4
+#define scm_to_short scm_to_int32
+#define scm_from_short scm_from_int32
+#define scm_to_ushort scm_to_uint32
+#define scm_from_ushort scm_from_uint32
+#else
+#error sizeof(short) is not 1, 2, or 4.
+#endif
+#endif
+#endif
+
+#if SCM_SIZEOF_INT == 4
+#define scm_to_int scm_to_int32
+#define scm_from_int scm_from_int32
+#define scm_to_uint scm_to_uint32
+#define scm_from_uint scm_from_uint32
+#else
+#if SCM_SIZEOF_INT == 8
+#define scm_to_int scm_to_int64
+#define scm_from_int scm_from_int64
+#define scm_to_uint scm_to_uint64
+#define scm_from_uint scm_from_uint64
+#else
+#error sizeof(int) is not 4 or 8.
+#endif