gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: make memrchr detection more


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: make memrchr detection more general as some linux libcs such as musl or diet do not have memrchr either
Date: Tue, 05 Feb 2019 09:11:02 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 48ae3fd97 make memrchr detection more general as some linux libcs such 
as musl or diet do not have memrchr either
48ae3fd97 is described below

commit 48ae3fd97331bea275128d7ac2bdeb1d20b2f760
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue Feb 5 09:10:56 2019 +0100

    make memrchr detection more general as some linux libcs such as musl or 
diet do not have memrchr either
---
 configure.ac           | 2 ++
 src/include/compat.h   | 3 ++-
 src/include/platform.h | 2 --
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4295ce0ba..3355812f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,8 @@ AC_UNALIGNED_64_ACCESS
 
 # some other checks for standard libs
 AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
+AC_SEARCH_LIBS([memrchr], [], [],
+               AC_DEFINE(HAVE_MEMRCHR,1,[memrchr supported]))
 AC_CHECK_LIB(socket, socket)
 AC_CHECK_LIB(m, log)
 AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg 
supported]))
diff --git a/src/include/compat.h b/src/include/compat.h
index 31a9760c5..b24d09653 100644
--- a/src/include/compat.h
+++ b/src/include/compat.h
@@ -44,8 +44,9 @@ void*
 GN_memrchr_ (const void *s,
              int c,
              size_t n);
-
+#ifndef HAVE_MEMRCHR
 #define memrchr(s,c,n) GN_memrchr_(s,c,n)
+#endif
 
 #ifdef __cplusplus
 }
diff --git a/src/include/platform.h b/src/include/platform.h
index b0a7c0a47..6ea70dc6c 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -70,9 +70,7 @@
 
 #define VERBOSE_STATS 0
 
-#if (defined WINDOWS) || (defined DARWIN)
 #include "compat.h"
-#endif
 
 #ifdef CYGWIN
 #include <sys/reent.h>

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]