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/client/smbmount.c | |
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/client/smbmount.c')
-rw-r--r-- | source3/client/smbmount.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 076be0ccb8..d0c18e6134 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -130,7 +130,7 @@ static struct cli_state *do_connection(char *service) } pstrcpy(server, service+2); - share = strchr(server,'\\'); + share = strchr_m(server,'\\'); if (!share) { usage(); exit(1); @@ -164,7 +164,7 @@ static struct cli_state *do_connection(char *service) getpid(), called.name, cli_errstr(c))); cli_shutdown(c); free(c); - if ((p=strchr(called.name, '.'))) { + if ((p=strchr_m(called.name, '.'))) { *p = 0; goto again; } @@ -715,7 +715,7 @@ static void parse_mount_smb(int argc, char **argv) */ for (opts = strtok(optarg, ","); opts; opts = strtok(NULL, ",")) { DEBUG(3, ("opts: %s\n", opts)); - if ((opteq = strchr(opts, '='))) { + if ((opteq = strchr_m(opts, '='))) { val = atoi(opteq + 1); *opteq = '\0'; @@ -723,13 +723,13 @@ static void parse_mount_smb(int argc, char **argv) !strcmp(opts, "logon")) { char *lp; pstrcpy(username,opteq+1); - if ((lp=strchr(username,'%'))) { + if ((lp=strchr_m(username,'%'))) { *lp = 0; pstrcpy(password,lp+1); got_pass = True; - memset(strchr(opteq+1,'%')+1,'X',strlen(password)); + memset(strchr_m(opteq+1,'%')+1,'X',strlen(password)); } - if ((lp=strchr(username,'/'))) { + if ((lp=strchr_m(username,'/'))) { *lp = 0; pstrcpy(workgroup,lp+1); } @@ -824,11 +824,11 @@ static void parse_mount_smb(int argc, char **argv) if (getenv("USER")) { pstrcpy(username,getenv("USER")); - if ((p=strchr(username,'%'))) { + if ((p=strchr_m(username,'%'))) { *p = 0; pstrcpy(password,p+1); got_pass = True; - memset(strchr(getenv("USER"),'%')+1,'X',strlen(password)); + memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password)); } strupper(username); } |