[PATCH] Undefine strlcpy if needed.

2014-08-23 Thread Benoit Sigoure
On OS X, strlcpy is already #define'd, which causes warnings in all the files that include `git-compat-util.h'. Note that this only occurs when building without running ./configure. --- git-compat-util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-compat-util.h b/git-compat-util.h

[PATCH] Undefine strlcpy if needed.

2014-08-23 Thread Benoit Sigoure
On OS X, strlcpy is already #define'd, which causes warnings in all the files that include `git-compat-util.h'. Note that this only occurs when building without running ./configure. Signed-off-by: Benoit Sigoure tsuna...@gmail.com --- Resending with the SOB line I forgot. git-compat-util.h

[PATCH] Cleanly redefine (v)snprintf when needed.

2014-01-31 Thread Benoit Sigoure
When we detect that vsnprintf / snprintf are broken, we #define them to an alternative implementation. On OS X, stdio.h already #define's them, which causes a warning to be issued at the point we re-define them in `git-compat-util.h'. Signed-off-by: Benoit Sigoure tsuna...@gmail.com --- git

[PATCH] Cleanly redefine (v)snprintf when needed.

2014-01-30 Thread Benoit Sigoure
When we detect that vsnprintf / snprintf are broken, we #define them to an alternative implementation. On OS X, stdio.h already #define's them, which causes a warning to be issued at the point we re-define them in `git-compat-util.h'. --- git-compat-util.h | 6 ++ 1 file changed, 6

[PATCH] Revert compat/unsetenv.c: Fix a sparse warning

2013-07-21 Thread Benoit Sigoure
This reverts commit ec535cc27e6c4f5e0b1d157e04f5511f166ecd9d. POSIX explicitly states the [environ] variable, which must be declared by the user if it is to be used directly. Not declaring it causes compilation to fail on OS X. Instead don't declare the variable on MinGW, as it causes a spurious

[PATCH] Revert compat/unsetenv.c: Fix a sparse warning

2013-07-21 Thread Benoit Sigoure
warning there. Signed-off-by: Benoit Sigoure tsuna...@gmail.com --- Resending as I forgot to Sign-off the previous patch. compat/unsetenv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compat/unsetenv.c b/compat/unsetenv.c index 4ea1856..bf5fd70 100644 --- a/compat/unsetenv.c +++ b

[PATCH] Fix compilation on OS X.

2013-07-20 Thread Benoit Sigoure
On OS X libc headers don't define `environ', and since ec535cc2 removed the redundant declaration this code no longer builds on OS X. --- compat/unsetenv.c | 5 + 1 file changed, 5 insertions(+) diff --git a/compat/unsetenv.c b/compat/unsetenv.c index 4ea1856..addf3dc 100644 ---

[PATCH] Fix compilation on OS X.

2013-07-20 Thread Benoit Sigoure
On OS X libc headers don't define `environ', and since ec535cc2 removed the redundant declaration this code no longer builds on OS X. --- Makefile | 5 + config.mak.uname | 1 + git-compat-util.h | 4 3 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index