From c7c81b3a51de2778535c8bb18d42a4bb7dfd57bc Mon Sep 17 00:00:00 2001 From: Jason Riedy Date: Tue, 23 Aug 2005 13:34:07 -0700 Subject: Fix ?: statements. Omitting the first branch in ?: is a GNU extension. Cute, but not supported by other compilers. Replaced mostly by explicit tests. Calls to getenv() simply are repeated on non-GNU compilers. Signed-off-by: Jason Riedy --- cache.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index e7f5a2e16f..e4f4664572 100644 --- a/cache.h +++ b/cache.h @@ -58,7 +58,11 @@ * We accept older names for now but warn. */ extern char *gitenv_bc(const char *); +#ifdef __GNUC__ #define gitenv(e) (getenv(e) ? : gitenv_bc(e)) +#else +#define gitenv(e) (getenv(e) ? getenv(e) : gitenv_bc(e)) +#endif /* * Basic data structures for the directory cache -- cgit v1.2.3