Skip to content

Commit

Permalink
Bug 694325: Add files for DNS Multithreading on Android; avoid undefi…
Browse files Browse the repository at this point in the history
…ned, unexposed libc symbols r=mwu
  • Loading branch information
Steve Workman committed Dec 5, 2011
1 parent 630f338 commit 50e8ffc
Show file tree
Hide file tree
Showing 34 changed files with 12,834 additions and 11 deletions.
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -7279,7 +7279,7 @@ dnl our own linker.
if test "$OS_TARGET" = Android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -L$_objdir/dist/lib -lmozutils"
if test "$MOZ_WIDGET_TOOLKIT" = android; then
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr"
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror"
fi
fi

Expand Down
10 changes: 0 additions & 10 deletions netwerk/dns/nsHostResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,9 @@ class nsResolveHostCallback;
return n; \
}

#ifdef ANDROID
// See bug 687367 - pre gingerbread android has race conditions involving stdio.
// stdio is used as part of the getaddrinfo() implementation. In order to reduce
// that race window limit ourselves to 1 lookup at a time on android.

#define MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY 0
#define MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY 1
#define MAX_NON_PRIORITY_REQUESTS 0
#else
#define MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY 3
#define MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY 5
#define MAX_NON_PRIORITY_REQUESTS 150
#endif

#define MAX_RESOLVER_THREADS (MAX_RESOLVER_THREADS_FOR_ANY_PRIORITY + \
MAX_RESOLVER_THREADS_FOR_HIGH_PRIORITY)
Expand Down
16 changes: 16 additions & 0 deletions other-licenses/android/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,24 @@ CSRCS = \
ba.c \
debugger.c \
dlfcn.c \
ev_streams.c \
ev_timers.c \
getaddrinfo.c \
linker.c \
linker_format.c \
ns_name.c \
ns_netint.c \
ns_parse.c \
ns_print.c \
ns_samedomain.c \
ns_ttl.c \
res_comp.c \
res_data.c \
res_debug.c \
res_init.c \
res_mkquery.c \
res_send.c \
res_state.c \
rt.c \
$(NULL)

Expand Down
Loading

0 comments on commit 50e8ffc

Please sign in to comment.