Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5cbc2ec9
Commit
5cbc2ec9
authored
Jan 26, 2010
by
Marc Alff
Browse files
Options
Browse Files
Download
Plain Diff
local merge
parents
a1917ee6
6fc06c38
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
mysys/my_init.c
mysys/my_init.c
+18
-17
No files found.
mysys/my_init.c
View file @
5cbc2ec9
...
@@ -74,6 +74,8 @@ static MYSQL_FILE instrumented_stdin;
...
@@ -74,6 +74,8 @@ static MYSQL_FILE instrumented_stdin;
*/
*/
my_bool
my_basic_init
(
void
)
my_bool
my_basic_init
(
void
)
{
{
char
*
str
;
if
(
my_basic_init_done
)
if
(
my_basic_init_done
)
return
0
;
return
0
;
my_basic_init_done
=
1
;
my_basic_init_done
=
1
;
...
@@ -82,6 +84,19 @@ my_bool my_basic_init(void)
...
@@ -82,6 +84,19 @@ my_bool my_basic_init(void)
my_umask
=
0660
;
/* Default umask for new files */
my_umask
=
0660
;
/* Default umask for new files */
my_umask_dir
=
0700
;
/* Default umask for new directories */
my_umask_dir
=
0700
;
/* Default umask for new directories */
#ifndef VMS
/* Default creation of new files */
if
((
str
=
getenv
(
"UMASK"
))
!=
0
)
my_umask
=
(
int
)
(
atoi_octal
(
str
)
|
0600
);
/* Default creation of new dir's */
if
((
str
=
getenv
(
"UMASK_DIR"
))
!=
0
)
my_umask_dir
=
(
int
)
(
atoi_octal
(
str
)
|
0700
);
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if
((
home_dir
=
getenv
(
"HOME"
))
!=
0
)
home_dir
=
intern_filename
(
home_dir_buff
,
home_dir
);
init_glob_errs
();
init_glob_errs
();
instrumented_stdin
.
m_file
=
stdin
;
instrumented_stdin
.
m_file
=
stdin
;
...
@@ -124,7 +139,6 @@ my_bool my_basic_init(void)
...
@@ -124,7 +139,6 @@ my_bool my_basic_init(void)
my_bool
my_init
(
void
)
my_bool
my_init
(
void
)
{
{
char
*
str
;
if
(
my_init_done
)
if
(
my_init_done
)
return
0
;
return
0
;
my_init_done
=
1
;
my_init_done
=
1
;
...
@@ -142,24 +156,11 @@ my_bool my_init(void)
...
@@ -142,24 +156,11 @@ my_bool my_init(void)
{
{
DBUG_ENTER
(
"my_init"
);
DBUG_ENTER
(
"my_init"
);
DBUG_PROCESS
((
char
*
)
(
my_progname
?
my_progname
:
"unknown"
));
DBUG_PROCESS
((
char
*
)
(
my_progname
?
my_progname
:
"unknown"
));
if
(
!
home_dir
)
{
/* Don't initialize twice */
my_win_init
();
my_win_init
();
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
=
(
int
)
(
atoi_octal
(
str
)
|
0600
);
/* Default creation of new dir's */
if
((
str
=
getenv
(
"UMASK_DIR"
))
!=
0
)
my_umask_dir
=
(
int
)
(
atoi_octal
(
str
)
|
0700
);
#endif
#ifdef VMS
#ifdef VMS
init_ctype
();
/* Stupid linker don't link _ctype.c */
init_ctype
();
/* Stupid linker don't link _ctype.c */
#endif
#endif
DBUG_PRINT
(
"exit"
,(
"home: '%s'"
,
home_dir
));
DBUG_PRINT
(
"exit"
,
(
"home: '%s'"
,
home_dir
));
}
#ifdef __WIN__
#ifdef __WIN__
win32_init_tcp_ip
();
win32_init_tcp_ip
();
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment