chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add uint16_t if missing.
[disorder]
/
lib
/
common.h
diff --git
a/lib/common.h
b/lib/common.h
index 9cf38921a86a4060a5804faa21e97ac7c895144d..99f867162698946bfa680019fa1da58abfaad639 100644
(file)
--- a/
lib/common.h
+++ b/
lib/common.h
@@
-117,6
+117,14
@@
typedef unsigned char uint32_t;
# endif
#endif
# 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
#if !HAVE_CLOSESOCKET
# define closesocket close
#endif