diff options
-rw-r--r-- | lib/util/charset/charset.h | 2 | ||||
-rw-r--r-- | lib/util/charset/config.mk | 2 | ||||
-rw-r--r-- | lib/util/charset/tests/charset.c | 14 | ||||
-rw-r--r-- | lib/util/charset/util_unistr.c | 2 | ||||
-rw-r--r-- | source4/static_deps.mk | 4 |
5 files changed, 10 insertions, 14 deletions
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index 041eaeace7..a4028270f1 100644 --- a/lib/util/charset/charset.h +++ b/lib/util/charset/charset.h @@ -87,7 +87,7 @@ char *strchr_m(const char *s, char c); size_t strlen_m_term(const char *s); size_t strlen_m(const char *s); char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); -void string_replace_w(char *s, char oldc, char newc); +void string_replace_m(char *s, char oldc, char newc); bool strcsequal_w(const char *s1,const char *s2); bool strequal_w(const char *s1, const char *s2); int strncasecmp_m(const char *s1, const char *s2, size_t n); diff --git a/lib/util/charset/config.mk b/lib/util/charset/config.mk index 12c2f5f321..56e0e7b36c 100644 --- a/lib/util/charset/config.mk +++ b/lib/util/charset/config.mk @@ -9,5 +9,3 @@ PRIVATE_DEPENDENCIES = DYNCONFIG CHARSET_OBJ_FILES = $(addprefix $(libcharsetsrcdir)/, iconv.o charcnv.o util_unistr.o) PUBLIC_HEADERS += $(libcharsetsrcdir)/charset.h - -$(eval $(call proto_header_template,$(libcharsetsrcdir)/charset_proto.h,$(CHARSET_OBJ_FILES:.o=.c))) diff --git a/lib/util/charset/tests/charset.c b/lib/util/charset/tests/charset.c index 5e42ca2932..e7e4dd7cc8 100644 --- a/lib/util/charset/tests/charset.c +++ b/lib/util/charset/tests/charset.c @@ -80,21 +80,21 @@ static bool test_strcsequal_w(struct torture_context *tctx) return true; } -static bool test_string_replace_w(struct torture_context *tctx) +static bool test_string_replace_m(struct torture_context *tctx) { char data[6] = "bla"; - string_replace_w(data, 'b', 'c'); + string_replace_m(data, 'b', 'c'); torture_assert_str_equal(tctx, data, "cla", "first char replaced"); memcpy(data, "bab", 4); - string_replace_w(data, 'b', 'c'); + string_replace_m(data, 'b', 'c'); torture_assert_str_equal(tctx, data, "cac", "other chars replaced"); memcpy(data, "bba", 4); - string_replace_w(data, 'b', 'c'); + string_replace_m(data, 'b', 'c'); torture_assert_str_equal(tctx, data, "cca", "other chars replaced"); memcpy(data, "blala", 6); - string_replace_w(data, 'o', 'c'); + string_replace_m(data, 'o', 'c'); torture_assert_str_equal(tctx, data, "blala", "no chars replaced"); - string_replace_w(NULL, 'b', 'c'); + string_replace_m(NULL, 'b', 'c'); return true; } @@ -254,7 +254,7 @@ struct torture_suite *torture_local_charset(TALLOC_CTX *mem_ctx) torture_suite_add_simple_test(suite, "strcasecmp_m", test_strcasecmp_m); torture_suite_add_simple_test(suite, "strequal_w", test_strequal_w); torture_suite_add_simple_test(suite, "strcsequal_w", test_strcsequal_w); - torture_suite_add_simple_test(suite, "string_replace_w", test_string_replace_w); + torture_suite_add_simple_test(suite, "string_replace_m", test_string_replace_m); torture_suite_add_simple_test(suite, "strncasecmp_m", test_strncasecmp_m); torture_suite_add_simple_test(suite, "next_token", test_next_token); torture_suite_add_simple_test(suite, "next_token_null", test_next_token_null); diff --git a/lib/util/charset/util_unistr.c b/lib/util/charset/util_unistr.c index e4f4bb551a..7fee71cc8d 100644 --- a/lib/util/charset/util_unistr.c +++ b/lib/util/charset/util_unistr.c @@ -274,7 +274,7 @@ _PUBLIC_ bool strcsequal_w(const char *s1,const char *s2) String replace. NOTE: oldc and newc must be 7 bit characters **/ -_PUBLIC_ void string_replace_w(char *s, char oldc, char newc) +_PUBLIC_ void string_replace_m(char *s, char oldc, char newc) { while (s && *s) { size_t size; diff --git a/source4/static_deps.mk b/source4/static_deps.mk index 2768ea8ab5..e366abf681 100644 --- a/source4/static_deps.mk +++ b/source4/static_deps.mk @@ -2,15 +2,13 @@ # perhaps by some perl scripts run from config.status ? # $(gen_ndrsrcdir)/misc.h: idl -$(ndrsrcdir)/libndr.h: $(ndrsrcdir)/libndr_proto.h $(gen_ndrsrcdir)/misc.h +$(ndrsrcdir)/libndr.h: $(gen_ndrsrcdir)/misc.h $(dcerpcsrcdir)/dcerpc.h: $(dcerpcsrcdir)/dcerpc_proto.h $(authsrcdir)/credentials/credentials.h: $(authsrcdir)/credentials/credentials_proto.h $(libclisrcdir)/nbt/libnbt.h: $(libclisrcdir)/nbt/nbt_proto.h -$(libcharsetsrcdir)/charset.h: $(libcharsetsrcdir)/charset_proto.h include/includes.h: \ include/config.h \ - $(libcharsetsrcdir)/charset.h \ $(gen_ndrsrcdir)/misc.h proto:: |