From e572bbb94cb8a23d366647bcf584cc75029e8def Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 29 Apr 2006 12:39:19 +0000 Subject: r15321: Reduce the size of rewrite.m4 a bit more (This used to be commit c83e4b166534278c335254aa8890a50635bbf1b7) --- source4/lib/appweb/config.m4 | 1 + source4/lib/charset/util_unistr.c | 2 +- source4/lib/netif/config.m4 | 2 +- source4/lib/replace/config.m4 | 3 ++- source4/lib/replace/replace.c | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 source4/lib/appweb/config.m4 (limited to 'source4/lib') diff --git a/source4/lib/appweb/config.m4 b/source4/lib/appweb/config.m4 new file mode 100644 index 0000000000..69b4048c4a --- /dev/null +++ b/source4/lib/appweb/config.m4 @@ -0,0 +1 @@ +AC_CHECK_HEADERS(math.h) diff --git a/source4/lib/charset/util_unistr.c b/source4/lib/charset/util_unistr.c index f55e390856..1eb198d6f9 100644 --- a/source4/lib/charset/util_unistr.c +++ b/source4/lib/charset/util_unistr.c @@ -268,7 +268,7 @@ _PUBLIC_ BOOL strcsequal_w(const char *s1,const char *s2) **/ _PUBLIC_ void string_replace_w(char *s, char oldc, char newc) { - while (*s) { + for (; s && *s; s++) { size_t size; codepoint_t c = next_codepoint(s, &size); if (c == oldc) { diff --git a/source4/lib/netif/config.m4 b/source4/lib/netif/config.m4 index 76d1bfa9d5..9880440f21 100644 --- a/source4/lib/netif/config.m4 +++ b/source4/lib/netif/config.m4 @@ -1,4 +1,4 @@ -AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h) +AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h) AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) ################## diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4 index bf46bdcc58..12e3607bb4 100644 --- a/source4/lib/replace/config.m4 +++ b/source4/lib/replace/config.m4 @@ -81,6 +81,7 @@ AC_HAVE_DECL(vasprintf, [#include ]) AC_HAVE_DECL(vsnprintf, [#include ]) AC_HAVE_DECL(snprintf, [#include ]) AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf) +AC_CHECK_HEADERS(strings.h) AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ @@ -177,4 +178,4 @@ else fi fi -AC_CHECK_HEADERS([sys/param.h]) +AC_CHECK_HEADERS([sys/param.h limits.h]) diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c index 5d3ef52987..90f05d6c90 100644 --- a/source4/lib/replace/replace.c +++ b/source4/lib/replace/replace.c @@ -22,6 +22,7 @@ #include "system/wait.h" #include "system/time.h" #include "system/network.h" +#include "system/filesys.h" #include "system/iconv.h" void replace_dummy(void); -- cgit