summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/charset/util_unistr.c19
-rw-r--r--source4/lib/ldb/config.mk2
-rw-r--r--source4/lib/registry/config.mk2
-rw-r--r--source4/lib/registry/registry.h1
-rw-r--r--source4/lib/socket/config.mk9
-rw-r--r--source4/lib/util/util_str.c12
6 files changed, 33 insertions, 12 deletions
diff --git a/source4/lib/charset/util_unistr.c b/source4/lib/charset/util_unistr.c
index faa1398eac..f55e390856 100644
--- a/source4/lib/charset/util_unistr.c
+++ b/source4/lib/charset/util_unistr.c
@@ -613,3 +613,22 @@ _PUBLIC_ void strupper_m(char *s)
*d = 0;
}
+
+/**
+ Find the number of 'c' chars in a string
+**/
+_PUBLIC_ size_t count_chars_w(const char *s, char c)
+{
+ size_t count = 0;
+
+ while (*s) {
+ size_t size;
+ codepoint_t c2 = next_codepoint(s, &size);
+ if (c2 == c) count++;
+ s += size;
+ }
+
+ return count;
+}
+
+
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 00344f68f6..224dd32142 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -177,7 +177,7 @@ OBJ_FILES = \
OBJ_FILES= \
tools/cmdline.o
PUBLIC_DEPENDENCIES = ldb LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS
-PRIVATE_DEPENDENCIES = gensec
+PRIVATE_DEPENDENCIES = gensec LIBCLI_RESOLVE
# End SUBSYSTEM LIBLDB_CMDLINE
################################################
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index 44437dfa69..89a77c231e 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -53,7 +53,7 @@ PUBLIC_DEPENDENCIES = LIBTALLOC
[MODULE::registry_rpc]
INIT_FUNCTION = registry_rpc_init
PRIVATE_PROTO_HEADER = reg_backend_rpc.h
-OUTPUT_TYPE = MERGEDOBJ
+OUTPUT_TYPE = INTEGRATED
SUBSYSTEM = registry
OBJ_FILES = \
reg_backend_rpc.o
diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h
index b556829880..385b0e7d6f 100644
--- a/source4/lib/registry/registry.h
+++ b/source4/lib/registry/registry.h
@@ -169,6 +169,7 @@ struct reg_diff
};
struct auth_session_info;
+struct event_context;
#include "lib/registry/registry_proto.h"
diff --git a/source4/lib/socket/config.mk b/source4/lib/socket/config.mk
index 25838c58cc..bbac1ff6d1 100644
--- a/source4/lib/socket/config.mk
+++ b/source4/lib/socket/config.mk
@@ -3,7 +3,7 @@
# Start MODULE socket_ipv4
[MODULE::socket_ipv4]
SUBSYSTEM = SOCKET
-OUTPUT_TYPE = MERGEDOBJ
+OUTPUT_TYPE = INTEGRATED
OBJ_FILES = \
socket_ipv4.o
PUBLIC_DEPENDENCIES = EXT_SOCKET
@@ -15,7 +15,7 @@ PRIVATE_DEPENDENCIES = LIBSAMBA-ERRORS
# Start MODULE socket_ipv6
[MODULE::socket_ipv6]
SUBSYSTEM = SOCKET
-OUTPUT_TYPE = MERGEDOBJ
+OUTPUT_TYPE = INTEGRATED
OBJ_FILES = \
socket_ipv6.o
PUBLIC_DEPENDENCIES = EXT_SOCKET
@@ -26,7 +26,7 @@ PUBLIC_DEPENDENCIES = EXT_SOCKET
# Start MODULE socket_unix
[MODULE::socket_unix]
SUBSYSTEM = SOCKET
-OUTPUT_TYPE = MERGEDOBJ
+OUTPUT_TYPE = INTEGRATED
OBJ_FILES = \
socket_unix.o
PUBLIC_DEPENDENCIES = EXT_SOCKET
@@ -42,6 +42,7 @@ OBJ_FILES = \
connect_multi.o \
connect.o
PUBLIC_DEPENDENCIES = LIBTALLOC
-PRIVATE_DEPENDENCIES = SOCKET_WRAPPER LIBCLI_COMPOSITE
+PRIVATE_DEPENDENCIES = SOCKET_WRAPPER LIBCLI_COMPOSITE
+#LIBCLI_RESOLVE
# End SUBSYSTEM SOCKET
################################################
diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c
index 9de27c0777..60419e0510 100644
--- a/source4/lib/util/util_str.c
+++ b/source4/lib/util/util_str.c
@@ -81,15 +81,15 @@ _PUBLIC_ size_t count_chars(const char *s, char c)
size_t count = 0;
while (*s) {
- size_t size;
- codepoint_t c2 = next_codepoint(s, &size);
- if (c2 == c) count++;
- s += size;
+ if (*s == c) count++;
+ s ++;
}
return count;
}
+
+
/**
Safe string copy into a known length string. maxlength does not
include the terminating zero.
@@ -433,12 +433,12 @@ _PUBLIC_ void rfc1738_unescape(char *buf)
{
char *p=buf;
- while ((p=strchr_m(p,'+')))
+ while ((p=strchr(p,'+')))
*p = ' ';
p = buf;
- while (p && *p && (p=strchr_m(p,'%'))) {
+ while (p && *p && (p=strchr(p,'%'))) {
int c1 = p[1];
int c2 = p[2];