diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-06-19 15:30:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-06-19 15:30:23 -0400 |
commit | c2e546aa23fd0de4bb75b909a5693fdd3bcbbb8d (patch) | |
tree | 1bafdd5b1f6d166bd888d2b07c119a4ef66d7936 /configure.ac | |
parent | e01e4e0146a4618678b5ec8003e0f8a798b592e7 (diff) | |
parent | 027614c263b4a1ae6f74e3470723f97331af8baa (diff) | |
download | tor-c2e546aa23fd0de4bb75b909a5693fdd3bcbbb8d.tar.gz tor-c2e546aa23fd0de4bb75b909a5693fdd3bcbbb8d.zip |
Merge remote-tracking branch 'argonblue/bug22410'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index aa43c15391..4092d10af6 100644 --- a/configure.ac +++ b/configure.ac @@ -1552,6 +1552,24 @@ if test "$tor_cv_sign_extend" != "no"; then [Define to 1 iff right-shifting a negative value performs sign-extension]) fi +# Is uint8_t the same type as unsigned char? +AC_CACHE_CHECK([whether uint8_t is the same type as unsigned char], tor_cv_uint8_uchar, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#include <stdint.h> +extern uint8_t c; +unsigned char c;]])], + [tor_cv_uint8_uchar=yes], + [tor_cv_uint8_uchar=no], + [tor_cv_uint8_uchar=cross])]) + +if test "$tor_cv_uint8_uchar" = "cross"; then + AC_MSG_NOTICE([Cross-compiling: we'll assume that uint8_t is the same type as unsigned char]) +fi + +if test "$tor_cv_uint8_uchar" = "no"; then + AC_MSG_ERROR([We assume that uint8_t is the same type as unsigned char, but your compiler disagrees.]) +fi + # Whether we should use the dmalloc memory allocation debugging library. AC_MSG_CHECKING(whether to use dmalloc (debug memory allocation library)) AC_ARG_WITH(dmalloc, |