This commit is contained in:
Fredrik Fornwall 2017-01-31 09:44:04 +00:00 committed by GitHub
commit 76f20cfbe2
4 changed files with 1 additions and 20 deletions

View file

@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_CFLAGS:= -O3 -DLIBOPENSSL -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE \ LOCAL_CFLAGS:= -O3 -DLIBOPENSSL -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE \
-DLIBNCP -DLIBPOSTGRES -DLIBSVN -DLIBSSH -DNO_RINDEX \ -DLIBNCP -DLIBPOSTGRES -DLIBSVN -DLIBSSH \
-DHAVE_MATH_H -DOPENSSL_NO_DEPRECATED -DNO_RSA_LEGACY \ -DHAVE_MATH_H -DOPENSSL_NO_DEPRECATED -DNO_RSA_LEGACY \
-fdata-sections -ffunction-sections -fdata-sections -ffunction-sections

11
configure vendored
View file

@ -966,14 +966,6 @@ fi
echo "Checking for Android specialities ..." echo "Checking for Android specialities ..."
TMPC=comptest$$ TMPC=comptest$$
RINDEX=" not"
echo '#include <stdio.h>' > $TMPC.c
echo '#include <strings.h>' >> $TMPC.c
echo "int main() { char *x = rindex(\"test\", 'e'); if (x == NULL) return 0; else return 1; }" >> $TMPC.c
gcc -o $TMPC $TMPC.c > /dev/null 2>&1
test -x $TMPC && RINDEX=""
rm -f $TMPC $TMPC.c
echo " ... rindex()$RINDEX found"
if [ -n "$CRYPTO_PATH" ]; then if [ -n "$CRYPTO_PATH" ]; then
RSA=" not" RSA=" not"
echo '#include <stdio.h>' > $TMPC.c echo '#include <stdio.h>' > $TMPC.c
@ -1060,9 +1052,6 @@ fi
if [ -n "$SSH_PATH" ]; then if [ -n "$SSH_PATH" ]; then
XDEFINES="$XDEFINES -DLIBSSH" XDEFINES="$XDEFINES -DLIBSSH"
fi fi
if [ -n "$RINDEX" ]; then
XDEFINES="$XDEFINES -DNO_RINDEX"
fi
if [ -n "$RSA" ]; then if [ -n "$RSA" ]; then
XDEFINES="$XDEFINES -DNO_RSA_LEGACY" XDEFINES="$XDEFINES -DNO_RSA_LEGACY"
fi fi

View file

@ -32,11 +32,7 @@ char *nntp_read_server_capacity(int sock) {
buf[strlen(buf) - 1] = 0; buf[strlen(buf) - 1] = 0;
if (buf[strlen(buf) - 1] == '\r') if (buf[strlen(buf) - 1] == '\r')
buf[strlen(buf) - 1] = 0; buf[strlen(buf) - 1] = 0;
#ifdef NO_RINDEX
if ((ptr = strrchr(buf, '\n')) != NULL) { if ((ptr = strrchr(buf, '\n')) != NULL) {
#else
if ((ptr = rindex(buf, '\n')) != NULL) {
#endif
ptr++; ptr++;
if (isdigit((int) *ptr) && *(ptr + 3) == ' ') if (isdigit((int) *ptr) && *(ptr + 3) == ' ')
resp = 1; resp = 1;

View file

@ -21,11 +21,7 @@ char *smtp_read_server_capacity(int sock) {
buf[strlen(buf) - 1] = 0; buf[strlen(buf) - 1] = 0;
if (buf[strlen(buf) - 1] == '\r') if (buf[strlen(buf) - 1] == '\r')
buf[strlen(buf) - 1] = 0; buf[strlen(buf) - 1] = 0;
#ifdef NO_RINDEX
if ((ptr = strrchr(buf, '\n')) != NULL) { if ((ptr = strrchr(buf, '\n')) != NULL) {
#else
if ((ptr = rindex(buf, '\n')) != NULL) {
#endif
ptr++; ptr++;
if (isdigit((int) *ptr) && *(ptr + 3) == ' ') if (isdigit((int) *ptr) && *(ptr + 3) == ' ')
resp = 1; resp = 1;