chiark / gitweb /
Add uint16_t if missing.
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 17 Nov 2013 11:32:44 +0000 (11:32 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 17 Nov 2013 11:32:44 +0000 (11:32 +0000)
configure.ac
lib/common.h

index c17ad1c..dd46045 100644 (file)
@@ -575,7 +575,7 @@ fi
 
 old_CFLAGS="${CFLAGS}"
 CFLAGS="${CFLAGS} $gcc_werror"
-AC_CHECK_TYPES([long long,uint32_t,uint8_t,intmax_t,uintmax_t])
+AC_CHECK_TYPES([long long,uint32_t,uint16_t,uint8_t,intmax_t,uintmax_t])
 
 # Some GCC invocations warn for converting function pointers to void *.
 # This is fair enough, as it's technically forbidden, but we use dlsym()
index 9cf3892..99f8671 100644 (file)
@@ -117,6 +117,14 @@ typedef unsigned char uint32_t;
 # endif
 #endif
 
+#if ! HAVE_UINT16_T
+# if USHRT_MAX == 65535
+typedef unsigned short uint16_t;
+# else
+#  error cannot determine uint16_t
+# endif
+#endif
+
 #if !HAVE_CLOSESOCKET
 # define closesocket close
 #endif