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 c17ad1ce9431415180b8932a8b0f31036281a986..dd4604546b9cac1e90f17f4a44d980a93efadfb9 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 9cf38921a86a4060a5804faa21e97ac7c895144d..99f867162698946bfa680019fa1da58abfaad639 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