Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
7be88b4c
Commit
7be88b4c
authored
Jan 31, 2014
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to latest clar
parent
f9500b45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
tests/clar/fs.h
+13
-5
No files found.
tests/clar/fs.h
View file @
7be88b4c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#endif
/* __MINGW32__ */
#endif
/* __MINGW32__ */
static
int
static
int
fs__dotordotdot
(
WCHAR
*
_tocheck
)
fs__dotordotdot
(
WCHAR
*
_tocheck
)
{
{
return
_tocheck
[
0
]
==
'.'
&&
return
_tocheck
[
0
]
==
'.'
&&
...
@@ -201,7 +201,7 @@ fs_copy(const char *_source, const char *_dest)
...
@@ -201,7 +201,7 @@ fs_copy(const char *_source, const char *_dest)
DWORD
source_attrs
,
dest_attrs
;
DWORD
source_attrs
,
dest_attrs
;
HANDLE
find_handle
;
HANDLE
find_handle
;
WIN32_FIND_DATAW
find_data
;
WIN32_FIND_DATAW
find_data
;
/* The input paths are UTF-8. Convert them to wide characters
/* The input paths are UTF-8. Convert them to wide characters
* for use with the Windows API. */
* for use with the Windows API. */
cl_assert
(
MultiByteToWideChar
(
CP_UTF8
,
cl_assert
(
MultiByteToWideChar
(
CP_UTF8
,
...
@@ -251,17 +251,22 @@ cl_fs_cleanup(void)
...
@@ -251,17 +251,22 @@ cl_fs_cleanup(void)
}
}
#else
#else
#include <errno.h>
#include <string.h>
static
int
static
int
shell_out
(
char
*
const
argv
[])
shell_out
(
char
*
const
argv
[])
{
{
int
status
;
int
status
,
piderr
;
pid_t
pid
;
pid_t
pid
;
pid
=
fork
();
pid
=
fork
();
if
(
pid
<
0
)
{
if
(
pid
<
0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"System error: `fork()` call failed.
\n
"
);
"System error: `fork()` call failed (%d) - %s
\n
"
,
errno
,
strerror
(
errno
));
exit
(
-
1
);
exit
(
-
1
);
}
}
...
@@ -269,7 +274,10 @@ shell_out(char * const argv[])
...
@@ -269,7 +274,10 @@ shell_out(char * const argv[])
execv
(
argv
[
0
],
argv
);
execv
(
argv
[
0
],
argv
);
}
}
waitpid
(
pid
,
&
status
,
0
);
do
{
piderr
=
waitpid
(
pid
,
&
status
,
WUNTRACED
);
}
while
(
piderr
<
0
&&
(
errno
==
EAGAIN
||
errno
==
EINTR
));
return
WEXITSTATUS
(
status
);
return
WEXITSTATUS
(
status
);
}
}
...
...
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