From 1384d0adb9739e38032bfae4ca4dfa28ca696e8e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 May 2011 20:57:12 +1000 Subject: [PATCH] lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch() gen_fnmatch was a duplicate symbol in the top level build. gen_fnmatch() used for simple non-CIFS pattern matching, so selecting the lib/util implementation should not be a concern. Andrew Bartlett --- lib/util/wscript_build | 4 ++-- source3/Makefile.in | 2 +- source3/include/proto.h | 1 - source3/lib/ms_fnmatch.c | 7 ------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/util/wscript_build b/lib/util/wscript_build index 59a2782b609..fc5f4b5455c 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -5,11 +5,11 @@ common_util_sources = '''talloc_stack.c smb_threads.c xfile.c data_blob.c genrand.c fsusage.c blocking.c become_daemon.c signal.c system.c params.c util.c util_id.c util_net.c util_strlist.c idtree.c debug.c fault.c base64.c - util_str.c util_str_common.c substitute.c''' + util_str.c util_str_common.c substitute.c ms_fnmatch.c''' common_util_headers = 'debug.h' common_util_public_deps = 'talloc pthread LIBCRYPTO' -s4_util_sources = '''dprintf.c ms_fnmatch.c parmlist.c''' +s4_util_sources = '''dprintf.c parmlist.c''' s4_util_deps = 'DYNCONFIG' s4_util_public_deps = 'talloc CHARSET execinfo uid_wrapper' s4_util_public_headers = 'attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h string_wrappers.h' diff --git a/source3/Makefile.in b/source3/Makefile.in index 67cb58a4ebe..c01906ec421 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -465,7 +465,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \ lib/util.o lib/util_cmdline.o lib/util_names.o \ lib/util_sock.o lib/sock_exec.o lib/util_sec.o \ lib/substitute.o ../lib/util/substitute.o lib/dbwrap_util.o \ - lib/ms_fnmatch.o lib/errmap_unix.o \ + lib/ms_fnmatch.o ../lib/util/ms_fnmatch.o lib/errmap_unix.o \ lib/tallocmsg.o lib/dmallocmsg.o \ libsmb/clisigning.o libsmb/smb_signing.o \ ../lib/util/charset/iconv.o intl/lang_tdb.o \ diff --git a/source3/include/proto.h b/source3/include/proto.h index f5f5f8cf935..8a022609b86 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -217,7 +217,6 @@ void init_modules(void); int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern, bool is_case_sensitive); -int gen_fnmatch(const char *pattern, const char *string); /* The following definitions come from lib/pidfile.c */ diff --git a/source3/lib/ms_fnmatch.c b/source3/lib/ms_fnmatch.c index 31c66953a96..272355b7d20 100644 --- a/source3/lib/ms_fnmatch.c +++ b/source3/lib/ms_fnmatch.c @@ -229,10 +229,3 @@ int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern, TALLOC_FREE(s); return ret; } - - -/* a generic fnmatch function - uses for non-CIFS pattern matching */ -int gen_fnmatch(const char *pattern, const char *string) -{ - return ms_fnmatch(pattern, string, true, False); -} -- 2.34.1