From c41fc06376d1a2b83690612304e85010b5e5f3cf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jul 2001 07:36:09 +0000 Subject: strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. --- source/lib/substitute.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/lib/substitute.c') diff --git a/source/lib/substitute.c b/source/lib/substitute.c index 25be4b030f7..7f597d37f20 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -56,7 +56,7 @@ static size_t expand_env_var(char *p, int len) * Look for the terminating ')'. */ - if ((q = strchr(p,')')) == NULL) { + if ((q = strchr_m(p,')')) == NULL) { DEBUG(0,("expand_env_var: Unterminated environment variable [%s]\n", p)); return 2; } @@ -107,7 +107,7 @@ static char *automount_path(char *user_name) char *automount_value = automount_lookup(user_name); if(strlen(automount_value) > 0) { - home_path_start = strchr(automount_value,':'); + home_path_start = strchr_m(automount_value,':'); if (home_path_start != NULL) { DEBUG(5, ("NIS lookup succeeded. Home path is: %s\n", home_path_start?(home_path_start+1):"")); @@ -171,7 +171,7 @@ void standard_sub_basic(char *str) char *p, *s; fstring pidstr; - for (s=str; (p=strchr(s, '%'));s=p) { + for (s=str; (p=strchr_m(s, '%'));s=p) { fstring tmp_str; int l = sizeof(pstring) - (int)(p-str); @@ -220,7 +220,7 @@ void standard_sub_advanced(int snum, char *user, char *connectpath, gid_t gid, c char *p, *s, *home; struct passwd *pass; - for (s=str; (p=strchr(s, '%'));s=p) { + for (s=str; (p=strchr_m(s, '%'));s=p) { int l = sizeof(pstring) - (int)(p-str); switch (*(p+1)) { -- cgit