summaryrefslogtreecommitdiffstats
path: root/include/arch
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-19 14:07:26 -0700
committerJeff Brown <jeffbrown@google.com>2012-03-19 14:07:26 -0700
commit4a6b384f607feed3755cfcbcdfded55fc2ccce82 (patch)
treec7324a4820f80d979181610bb63c20c45523eb79 /include/arch
parent14d0c6c7c0e9abd39e4b4d0a384d12de5ecbdbfc (diff)
downloadsystem_core-4a6b384f607feed3755cfcbcdfded55fc2ccce82.zip
system_core-4a6b384f607feed3755cfcbcdfded55fc2ccce82.tar.gz
system_core-4a6b384f607feed3755cfcbcdfded55fc2ccce82.tar.bz2
Provide portable wrapper for qsort_r.
qsort_r() is declared differently on BSD and GNU libc and may be absent on other platforms. Provide qsort_r_compat() which should work everywhere. Change-Id: I17a9026573b1ed971ff7d79895e7eb41ba108807
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/darwin-x86/AndroidConfig.h10
-rw-r--r--include/arch/freebsd-x86/AndroidConfig.h10
-rw-r--r--include/arch/linux-arm/AndroidConfig.h10
-rw-r--r--include/arch/linux-ppc/AndroidConfig.h10
-rw-r--r--include/arch/linux-sh/AndroidConfig.h10
-rw-r--r--include/arch/linux-x86/AndroidConfig.h10
-rw-r--r--include/arch/target_linux-x86/AndroidConfig.h10
-rw-r--r--include/arch/windows/AndroidConfig.h10
8 files changed, 80 insertions, 0 deletions
diff --git a/include/arch/darwin-x86/AndroidConfig.h b/include/arch/darwin-x86/AndroidConfig.h
index f79f364..48f8d9a 100644
--- a/include/arch/darwin-x86/AndroidConfig.h
+++ b/include/arch/darwin-x86/AndroidConfig.h
@@ -305,4 +305,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 1
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/freebsd-x86/AndroidConfig.h b/include/arch/freebsd-x86/AndroidConfig.h
index a8176f4..4bc5559 100644
--- a/include/arch/freebsd-x86/AndroidConfig.h
+++ b/include/arch/freebsd-x86/AndroidConfig.h
@@ -363,4 +363,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 1
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/linux-arm/AndroidConfig.h b/include/arch/linux-arm/AndroidConfig.h
index b8e8713..233752b 100644
--- a/include/arch/linux-arm/AndroidConfig.h
+++ b/include/arch/linux-arm/AndroidConfig.h
@@ -361,4 +361,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/linux-ppc/AndroidConfig.h b/include/arch/linux-ppc/AndroidConfig.h
index 774c458..ae2569b 100644
--- a/include/arch/linux-ppc/AndroidConfig.h
+++ b/include/arch/linux-ppc/AndroidConfig.h
@@ -323,4 +323,14 @@
*/
#define HAVE_PREAD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 1
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/linux-sh/AndroidConfig.h b/include/arch/linux-sh/AndroidConfig.h
index cdfa2ac..818b628 100644
--- a/include/arch/linux-sh/AndroidConfig.h
+++ b/include/arch/linux-sh/AndroidConfig.h
@@ -366,4 +366,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/linux-x86/AndroidConfig.h b/include/arch/linux-x86/AndroidConfig.h
index 6521699..e1ba3ed 100644
--- a/include/arch/linux-x86/AndroidConfig.h
+++ b/include/arch/linux-x86/AndroidConfig.h
@@ -333,4 +333,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 1
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/target_linux-x86/AndroidConfig.h b/include/arch/target_linux-x86/AndroidConfig.h
index 9efb81a..ab53892 100644
--- a/include/arch/target_linux-x86/AndroidConfig.h
+++ b/include/arch/target_linux-x86/AndroidConfig.h
@@ -350,4 +350,14 @@
*/
#define HAVE_PRINTF_ZD 1
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/windows/AndroidConfig.h b/include/arch/windows/AndroidConfig.h
index 445e754..0274da5 100644
--- a/include/arch/windows/AndroidConfig.h
+++ b/include/arch/windows/AndroidConfig.h
@@ -338,4 +338,14 @@
*/
/* #define HAVE_PRINTF_ZD 1 */
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
+ */
+#define HAVE_BSD_QSORT_R 0
+
+/*
+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
+ */
+#define HAVE_GNU_QSORT_R 0
+
#endif /*_ANDROID_CONFIG_H*/