summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-10-16 10:12:25 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-10-16 10:12:26 -0700
commit1d35fba9bd37d4d6af224bbd25a034a680bca2eb (patch)
treea20389edcdf186ca6c5006938ed795c68dbacd48
parent9f17b1e1a40076470c9e521b298ba29e771419dc (diff)
parentdb5a5ada90e46cf844651601d9f21089ca6934f9 (diff)
downloaddevelopment-tools_r21.tar.gz
Merge "ndk: Remove LONG_LONG_MIN/MAX hack from pthread.h"tools_r21
-rw-r--r--ndk/platforms/android-3/include/limits.h16
-rw-r--r--ndk/platforms/android-3/include/pthread.h5
-rw-r--r--ndk/platforms/android-5/include/pthread.h5
-rw-r--r--ndk/platforms/android-8/include/pthread.h5
-rw-r--r--ndk/platforms/android-9/include/pthread.h5
5 files changed, 16 insertions, 20 deletions
diff --git a/ndk/platforms/android-3/include/limits.h b/ndk/platforms/android-3/include/limits.h
index 1de8ea611..0bde5a2d9 100644
--- a/ndk/platforms/android-3/include/limits.h
+++ b/ndk/platforms/android-3/include/limits.h
@@ -89,6 +89,22 @@
#include <sys/syslimits.h>
#endif
+/* GLibc compatibility definitions.
+ Note that these are defined by GCC's <limits.h>
+ only when __GNU_LIBRARY__ is defined, i.e. when
+ targetting GLibc. */
+#ifndef LONG_LONG_MIN
+#define LONG_LONG_MIN LLONG_MIN
+#endif
+
+#ifndef LONG_LONG_MAX
+#define LONG_LONG_MAX LLONG_MAX
+#endif
+
+#ifndef ULONG_LONG_MAX
+#define ULONG_LONG_MAX ULLONG_MAX
+#endif
+
#ifndef PAGESIZE
#define PAGESIZE PAGE_SIZE
#endif
diff --git a/ndk/platforms/android-3/include/pthread.h b/ndk/platforms/android-3/include/pthread.h
index 2a6029d64..ae55782f1 100644
--- a/ndk/platforms/android-3/include/pthread.h
+++ b/ndk/platforms/android-3/include/pthread.h
@@ -235,9 +235,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
} /* extern "C" */
#endif
-/************ TO FIX ************/
-
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
-
#endif /* _PTHREAD_H_ */
diff --git a/ndk/platforms/android-5/include/pthread.h b/ndk/platforms/android-5/include/pthread.h
index a20a52de1..ba40fa1af 100644
--- a/ndk/platforms/android-5/include/pthread.h
+++ b/ndk/platforms/android-5/include/pthread.h
@@ -262,9 +262,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
} /* extern "C" */
#endif
-/************ TO FIX ************/
-
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
-
#endif /* _PTHREAD_H_ */
diff --git a/ndk/platforms/android-8/include/pthread.h b/ndk/platforms/android-8/include/pthread.h
index f7a596acb..7741fcf23 100644
--- a/ndk/platforms/android-8/include/pthread.h
+++ b/ndk/platforms/android-8/include/pthread.h
@@ -267,9 +267,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
} /* extern "C" */
#endif
-/************ TO FIX ************/
-
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
-
#endif /* _PTHREAD_H_ */
diff --git a/ndk/platforms/android-9/include/pthread.h b/ndk/platforms/android-9/include/pthread.h
index 4baf82f75..4cfc9b01f 100644
--- a/ndk/platforms/android-9/include/pthread.h
+++ b/ndk/platforms/android-9/include/pthread.h
@@ -306,9 +306,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
} /* extern "C" */
#endif
-/************ TO FIX ************/
-
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
-
#endif /* _PTHREAD_H_ */