diff options
author | unknown <monty@donna.mysql.com> | 2000-09-26 02:57:29 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-09-26 02:57:29 +0300 |
commit | 48e80bd5ec3e633b30640e54ae4315915c21559a (patch) | |
tree | bb421f15c229afe4917e309ee23edd41a9f50bff /mysys/my_init.c | |
parent | 7fe58c4f5bea627bb38bfbcb0cc5885e3f6129c6 (diff) | |
download | mariadb-git-48e80bd5ec3e633b30640e54ae4315915c21559a.tar.gz |
Small fixes
Docs/manual.texi:
Changelog and small fixes
mysys/my_init.c:
Changed UMASK and UMASK_DIR to work also with octal
scripts/mysqlhotcopy.sh:
Fixed some small bugs
sql/share/swedish/errmsg.OLD:
Fixed wrong entry
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index 912e80d9ebd..4e7d1b6b2db 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -47,6 +47,19 @@ static my_bool win32_init_tcp_ip(); #endif static my_bool my_init_done=0; + +ulong atoi_octal(const char *str) +{ + long int tmp; + while (*str && isspace(*str)) + str++; + str2int(str, + (*str == '0' ? 8 : 10), /* Octalt or decimalt */ + 0, INT_MAX, &tmp); + return (ulong) tmp; +} + + /* Init my_sys functions and my_sys variabels */ void my_init(void) @@ -73,10 +86,12 @@ void my_init(void) if ((home_dir=getenv("HOME")) != 0) home_dir=intern_filename(home_dir_buff,home_dir); #ifndef VMS + /* Default creation of new files */ if ((str=getenv("UMASK")) != 0) - my_umask=atoi(str) | 0600; /* Default creation of new files */ + my_umask=(int) (atoi_octal(str) | 0600); + /* Default creation of new dir's */ if ((str=getenv("UMASK_DIR")) != 0) - my_umask_dir=atoi(str) | 0700; /* Default creation of new dir's */ + my_umask_dir=(int) (atoi_octal(str) | 0700); #endif #ifdef VMS init_ctype(); /* Stupid linker don't link _ctype.c */ |