Skip to content

Commit a3e71a4

Browse files
author
grothoff
committed
Ship its own version of tsearch and friends if not provided by platform.
On GNU based systems the tree related functions (tsearch, tfind, tdestroy) are provided by the libc (with the interface specification in search.h). On non-GNU systems this functionality may or may not be available. That's the case for Android which ships its own, simplified, version of libc called Bionic. Bionic does not contains neither search.h nor an implementation of the above mentioned functions. This patch adds detection for the presence of search.h and if the header file is not found, it uses an internal version of search.h and functions tsearch, tfind, and tdestroy. The internal version is based on the source code from FreeBSD and is compiled if and only if the configure script did not find the search.h header file. -- Jan Janak git-svn-id: https://gnunet.org/svn/libmicrohttpd@24855 140774ce-b5e7-0310-ab8b-a85725594a96
1 parent 3202be6 commit a3e71a4

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ LRN <[email protected]>
3838
Sven Geggus <[email protected]>
3939
Steve Wolf <[email protected]>
4040
Brecht Sanders <[email protected]>
41+
Jan Janak <[email protected]>
4142

4243
Documentation contributions also came from:
4344
Marco Maggi <[email protected]>

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Thu Nov 8 22:32:59 CET 2012
2+
Ship our own version of tsearch and friends if not provided by platform,
3+
so that MHD works nicely on Android. -JJ
4+
15
Mon Oct 22 13:05:01 CEST 2012
26
Immediately do a second read if we get a full buffer from
37
TLS as there might be more data in the TLS buffers even if

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sy
184184
# Check for optional headers
185185
AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h winsock2.h ws2tcpip.h])
186186

187+
AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false))
188+
187189
# Check for plibc.h from system, if not found, use our own
188190
AC_CHECK_HEADERS([plibc.h],our_private_plibc_h=0,our_private_plibc_h=1)
189191
AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1)

0 commit comments

Comments
 (0)