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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
82d2797d
Commit
82d2797d
authored
Jun 06, 2009
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't mix declarations and code (not widely portable).
parent
b311cb83
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
client/mysqltest.c
client/mysqltest.c
+18
-13
No files found.
client/mysqltest.c
View file @
82d2797d
...
@@ -1329,6 +1329,7 @@ static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...)
...
@@ -1329,6 +1329,7 @@ static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...)
DBUG_RETURN
(
ret
);
DBUG_RETURN
(
ret
);
}
}
/*
/*
Test if diff is present. This is needed on Windows systems
Test if diff is present. This is needed on Windows systems
as the OS returns 1 whether diff is successful or if it is
as the OS returns 1 whether diff is successful or if it is
...
@@ -1340,27 +1341,31 @@ static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...)
...
@@ -1340,27 +1341,31 @@ static int run_tool(const char *tool_path, DYNAMIC_STRING *ds_res, ...)
not present.
not present.
*/
*/
int
diff_check
(
const
char
*
diff_name
)
#ifdef __WIN__
static
int
diff_check
(
const
char
*
diff_name
)
{
{
char
buf
[
512
]
=
{
0
};
FILE
*
res_file
;
FILE
*
res_file
;
char
cmd
[
128
];
char
buf
[
128
];
my_snprintf
(
cmd
,
sizeof
(
cmd
),
"%s -v"
,
diff_name
);
int
have_diff
=
0
;
int
have_diff
=
0
;
if
(
!
(
res_file
=
popen
(
cmd
,
"r"
)))
my_snprintf
(
buf
,
sizeof
(
buf
),
"%s -v"
,
diff_name
);
die
(
"popen(
\"
%s
\"
,
\"
r
\"
) failed"
,
cmd
);
if
(
!
(
res_file
=
popen
(
buf
,
"r"
)))
die
(
"popen(
\"
%s
\"
,
\"
r
\"
) failed"
,
buf
);
/* if diff is not present, nothing will be in
/* if diff is not present, nothing will be in stdout to increment have_diff */
* stdout to increment have_diff */
if
(
fgets
(
buf
,
sizeof
(
buf
),
res_file
))
if
(
fgets
(
buf
,
sizeof
(
buf
),
res_file
))
{
have_diff
=
1
;
have_diff
+=
1
;
}
pclose
(
res_file
);
pclose
(
res_file
);
return
have_diff
;
return
have_diff
;
}
}
#endif
/*
/*
Show the diff of two files using the systems builtin diff
Show the diff of two files using the systems builtin diff
command. If no such diff command exist, just dump the content
command. If no such diff command exist, just dump the content
...
...
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