From b316861e9db5b2719e65a6e603aeb481dd1cccd0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 28 Dec 2005 23:10:26 +0000 Subject: [PATCH] Autoconfigure whether char is unsigned. --- configure.ac | 2 ++ include/misc.h | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index e130c61a..f47fe7c7 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,8 @@ LIBS=$save_LIBS ### Checks for typedefs, structures, and compiler characteristics +AC_C_CHAR_UNSIGNED + ### Checks for library functions diff --git a/include/misc.h b/include/misc.h index 332087f9..da606ca6 100644 --- a/include/misc.h +++ b/include/misc.h @@ -99,11 +99,16 @@ struct mob_acc_globals { typedef u_char natid; /* NSC_NATID must match this */ -#if !defined(aix) && !defined(sgi) -typedef char s_char; /* change to signed char for aix */ -#else +/* + * TODO s_char has to go. Use plain char for characters and strings, + * signed char for small integers. + */ +#ifdef __CHAR_UNSIGNED__ typedef signed char s_char; -#endif /* !aix && !sgi */ +#else +typedef char s_char; +#endif + typedef short coord; #ifndef bit