diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-07-04 07:36:09 +0000 |
commit | 527e824293ee934ca5da0ef5424efe5ab7757248 (patch) | |
tree | dd86fab3b0ba9cdbd86661dfae562fa123a8f53c /source3/libsmb | |
parent | 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 (diff) | |
download | samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.gz samba-527e824293ee934ca5da0ef5424efe5ab7757248.tar.bz2 samba-527e824293ee934ca5da0ef5424efe5ab7757248.zip |
strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 2 | ||||
-rw-r--r-- | source3/libsmb/libsmbclient.c | 10 | ||||
-rw-r--r-- | source3/libsmb/namequery.c | 4 | ||||
-rw-r--r-- | source3/libsmb/nmblib.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 7ec0627682..9511a56e31 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -60,7 +60,7 @@ BOOL cli_session_setup(struct cli_state *cli, /* allow for workgroups as part of the username */ fstrcpy(user2, user); - if ((p=strchr(user2,'\\')) || (p=strchr(user2,'/'))) { + if ((p=strchr_m(user2,'\\')) || (p=strchr_m(user2,'/'))) { *p = 0; user = p+1; workgroup = user2; diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 10444a8ab9..b944174665 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -133,7 +133,7 @@ smbc_parse_path(const char *fname, char *server, char *share, char *path, * exists ... */ - if (strchr(p, '@')) { + if (strchr_m(p, '@')) { pstring username, passwd, domain; char *u = userinfo; @@ -141,13 +141,13 @@ smbc_parse_path(const char *fname, char *server, char *share, char *path, username[0] = passwd[0] = domain[0] = 0; - if (strchr(u, ';')) { + if (strchr_m(u, ';')) { next_token(&u, domain, ";", sizeof(fstring)); } - if (strchr(u, ':')) { + if (strchr_m(u, ':')) { next_token(&u, username, ":", sizeof(fstring)); @@ -276,11 +276,11 @@ struct smbc_server *smbc_server(char *server, char *share, DEBUG(4,("smbc_server: server_n=[%s] server=[%s]\n", server_n, server)); - if ((p=strchr(server_n,'#')) && + if ((p=strchr_m(server_n,'#')) && (strcmp(p+1,"1D")==0 || strcmp(p+1,"01")==0)) { fstrcpy(group, server_n); - p = strchr(group,'#'); + p = strchr_m(group,'#'); *p = 0; } diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 18bf6f4804..c5c4d92c09 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -503,7 +503,7 @@ BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipad DEBUG(4, ("getlmhostsent: lmhost entry: %s %s %s\n", ip, name, flags)); - if (strchr(flags,'G') || strchr(flags,'S')) + if (strchr_m(flags,'G') || strchr_m(flags,'S')) { DEBUG(0,("getlmhostsent: group flag in lmhosts ignored (obsolete)\n")); continue; @@ -513,7 +513,7 @@ BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipad /* Extra feature. If the name ends in '#XX', where XX is a hex number, then only add that name type. */ - if((ptr = strchr(name, '#')) != NULL) + if((ptr = strchr_m(name, '#')) != NULL) { char *endptr; diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index d3b0e68aef..9d7167f305 100644 --- a/source3/libsmb/nmblib.c +++ b/source3/libsmb/nmblib.c @@ -300,7 +300,7 @@ static int put_nmb_name(char *buf,int offset,struct nmb_name *name) pstrcpy(&buf[offset+1],name->scope); p = &buf[offset+1]; - while ((p = strchr(p,'.'))) { + while ((p = strchr_m(p,'.'))) { buf[offset] = PTR_DIFF(p,&buf[offset+1]); offset += (buf[offset] + 1); p = &buf[offset+1]; |