From 39a817d310964f8e9a63cfb096b3ad24fa03bd5e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 20 Feb 2008 04:33:43 +0100 Subject: Fix use of some modules (needed _PUBLIC_). (This used to be commit ce332130ea77159832da23bab760fa26921719e2) --- source4/lib/util/attr.h | 2 -- source4/lib/util/util.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/lib/util') diff --git a/source4/lib/util/attr.h b/source4/lib/util/attr.h index 8f6c4f5d8a..f64b272a67 100644 --- a/source4/lib/util/attr.h +++ b/source4/lib/util/attr.h @@ -29,13 +29,11 @@ /** Feel free to add definitions for other compilers here. */ #endif -#ifndef _PUBLIC_ #ifdef HAVE_VISIBILITY_ATTR # define _PUBLIC_ __attribute__((visibility("default"))) #else # define _PUBLIC_ #endif -#endif #ifndef _DEPRECATED_ #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) diff --git a/source4/lib/util/util.h b/source4/lib/util/util.h index 9e106052f2..550b60c625 100644 --- a/source4/lib/util/util.h +++ b/source4/lib/util/util.h @@ -21,6 +21,8 @@ #ifndef _SAMBA_UTIL_H_ #define _SAMBA_UTIL_H_ +#include "util/attr.h" + #include "charset/charset.h" /* for TALLOC_CTX */ @@ -36,7 +38,6 @@ struct smbsrv_tcon; extern const char *logfile; extern const char *panic_action; -#include "util/attr.h" #include "util/time.h" #include "util/data_blob.h" #include "util/xfile.h" -- cgit From ede79ae482b16c3cea65d3019bc1a68f07354e89 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 15:38:35 +0100 Subject: Remove more uses of global_loadparm. (This used to be commit 58a5b1de2b093fe642eb11d76d12db0edf60c25c) --- source4/lib/util/ms_fnmatch.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source4/lib/util') diff --git a/source4/lib/util/ms_fnmatch.c b/source4/lib/util/ms_fnmatch.c index 1fb57b07a4..5e04ec1f4b 100644 --- a/source4/lib/util/ms_fnmatch.c +++ b/source4/lib/util/ms_fnmatch.c @@ -64,8 +64,9 @@ static int ms_fnmatch_core(const char *p, const char *n, codepoint_t c, c2; int i; size_t size, size_n; + struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm); - while ((c = next_codepoint(lp_iconv_convenience(global_loadparm), p, &size))) { + while ((c = next_codepoint(iconv_convenience, p, &size))) { p += size; switch (c) { @@ -75,7 +76,7 @@ static int ms_fnmatch_core(const char *p, const char *n, return null_match(p); } for (i=0; n[i]; i += size_n) { - next_codepoint(lp_iconv_convenience(global_loadparm), n+i, &size_n); + next_codepoint(iconv_convenience, n+i, &size_n); if (ms_fnmatch_core(p, n+i, max_n+1, ldot) == 0) { return 0; } @@ -94,7 +95,7 @@ static int ms_fnmatch_core(const char *p, const char *n, return -1; } for (i=0; n[i]; i += size_n) { - next_codepoint(lp_iconv_convenience(global_loadparm), n+i, &size_n); + next_codepoint(iconv_convenience, n+i, &size_n); if (ms_fnmatch_core(p, n+i, max_n+1, ldot) == 0) return 0; if (n+i == ldot) { if (ms_fnmatch_core(p, n+i+size_n, max_n+1, ldot) == 0) return 0; @@ -110,7 +111,7 @@ static int ms_fnmatch_core(const char *p, const char *n, if (! *n) { return -1; } - next_codepoint(lp_iconv_convenience(global_loadparm), n, &size_n); + next_codepoint(iconv_convenience, n, &size_n); n += size_n; break; @@ -124,7 +125,7 @@ static int ms_fnmatch_core(const char *p, const char *n, break; } if (! *n) return null_match(p); - next_codepoint(lp_iconv_convenience(global_loadparm), n, &size_n); + next_codepoint(iconv_convenience, n, &size_n); n += size_n; break; @@ -134,12 +135,12 @@ static int ms_fnmatch_core(const char *p, const char *n, return 0; } if (*n != '.') return -1; - next_codepoint(lp_iconv_convenience(global_loadparm), n, &size_n); + next_codepoint(iconv_convenience, n, &size_n); n += size_n; break; default: - c2 = next_codepoint(lp_iconv_convenience(global_loadparm), n, &size_n); + c2 = next_codepoint(iconv_convenience, n, &size_n); if (c != c2 && codepoint_cmpi(c, c2) != 0) { return -1; } -- cgit