diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-05-29 14:24:02 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-05-29 14:24:02 -0700 |
| commit | 7e2d574c37c6d53f09ceeb650f7af001aa50e987 (patch) | |
| tree | a68235d36ae82d5401b93ccc2a84c92acaf29cf3 /compat/mingw.h | |
| parent | 2f1ef15070a8664d3194d164f20283d78571e51c (diff) | |
| parent | 84d32bf7678259c08406571cd6ce4b7a6724dcba (diff) | |
| download | git-7e2d574c37c6d53f09ceeb650f7af001aa50e987.tar.gz | |
Merge branch 'rj/sparse'
* rj/sparse:
sparse: Fix mingw_main() argument number/type errors
compat/mingw.c: Fix some sparse warnings
compat/win32mmap.c: Fix some sparse warnings
compat/poll/poll.c: Fix a sparse warning
compat/win32/pthread.c: Fix a sparse warning
compat/unsetenv.c: Fix a sparse warning
compat/nedmalloc: Fix compiler warnings on linux
compat/nedmalloc: Fix some sparse warnings
compat/fnmatch/fnmatch.c: Fix a sparse error
compat/regex/regexec.c: Fix some sparse warnings
Diffstat (limited to 'compat/mingw.h')
| -rw-r--r-- | compat/mingw.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 685cd2c3d4..bd0a88bc1d 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -334,13 +334,20 @@ char **make_augmented_environ(const char *const *vars); void free_environ(char **env); /* + * A critical section used in the implementation of the spawn + * functions (mingw_spawnv[p]e()) and waitpid(). Intialised in + * the replacement main() macro below. + */ +extern CRITICAL_SECTION pinfo_cs; + +/* * A replacement of main() that ensures that argv[0] has a path * and that default fmode and std(in|out|err) are in binary mode */ #define main(c,v) dummy_decl_mingw_main(); \ -static int mingw_main(); \ -int main(int argc, const char **argv) \ +static int mingw_main(c,v); \ +int main(int argc, char **argv) \ { \ extern CRITICAL_SECTION pinfo_cs; \ _fmode = _O_BINARY; \ |
