aboutsummaryrefslogtreecommitdiff
path: root/ares_nowarn.c
diff options
context:
space:
mode:
authorGilad Arnold <garnold@google.com>2015-07-17 12:05:01 -0700
committerGilad Arnold <garnold@google.com>2015-07-20 10:45:17 -0700
commit1d195eb92934324a2d111d7cef1a6a156716d42c (patch)
treec81e1d4e232df089c660235af0ff13c996e175ab /ares_nowarn.c
parent968bf19396ad404e89420f5d67900fce13f4186c (diff)
downloadc-ares-1d195eb92934324a2d111d7cef1a6a156716d42c.tar.gz
Build libcares.so on Android.
Adds ares_config.h (derived from ares_config.h.in) and Android.mk. Also, some small fixes to make the code build without errors: ares_build.h: CARES_SIZEOF_LONG defaults to sizeof(long) if no other case applies; while this seems to defeat the purpose of defining a macro, it works. ares_nowarn.c: If HAVE_LIMITS_H is defined, include limits.h and use INT_MAX and UINT_MAX as needed. Bug: 22545809 Change-Id: I628ce2659f6503a415d06db3e223d9ef00956ddb
Diffstat (limited to 'ares_nowarn.c')
-rw-r--r--ares_nowarn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ares_nowarn.c b/ares_nowarn.c
index 701add5..0ed015c 100644
--- a/ares_nowarn.c
+++ b/ares_nowarn.c
@@ -21,6 +21,10 @@
# include <assert.h>
#endif
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
#if defined(__INTEL_COMPILER) && defined(__unix__)
#ifdef HAVE_SYS_SOCKET_H
@@ -51,6 +55,9 @@
#elif (SIZEOF_INT == 16)
# define CARES_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
# define CARES_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+#elif defined(HAVE_LIMITS_H)
+# define CARES_MASK_SINT INT_MAX
+# define CARES_MASK_UINT UINT_MAX
#endif
/*