Update.
[bpt/guile.git] / srfi / srfi-14.h
index fbf935e..d6155fa 100644 (file)
@@ -50,9 +50,9 @@
    which should be exported or imported in the resulting dynamic link
    library in the Win32 port. */
 
-#if defined (__SCM_SRFI1314_IMPORT__)
+#if defined (SCM_SRFI1314_IMPORT)
 # define SCM_SRFI1314_API __declspec (dllimport) extern
-#elif defined (__SCM_SRFI1314_EXPORT__) || defined (DLL_EXPORT)
+#elif defined (SCM_SRFI1314_EXPORT) || defined (DLL_EXPORT)
 # define SCM_SRFI1314_API __declspec (dllexport) extern
 #else
 # define SCM_SRFI1314_API extern
 
 #define SCM_CHARSET_SIZE 256
 
-/* We expect 8-bit bytes here.  Shoule be no problem in the year
+/* We expect 8-bit bytes here.  Should be no problem in the year
    2001.  */
 #ifndef SCM_BITS_PER_LONG
 # define SCM_BITS_PER_LONG (sizeof (long) * 8)
 #endif
 
 #define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\
-                                  [(idx) / SCM_BITS_PER_LONG] &\
-                                  (1L << ((idx) % SCM_BITS_PER_LONG)))
+                                  [((unsigned char) (idx)) / SCM_BITS_PER_LONG] &\
+                                  (1L << (((unsigned char) (idx)) % SCM_BITS_PER_LONG)))
 
 #define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset))