Hello Junio, On Tue, 20 Nov 2007, Junio C Hamano wrote:sorry for the whitespace-issues. I have attached the patch again with improved log message and will turn off format-flawed for this email. Please let me know if this one is ok and feel free to fix it. Log message starts here: Fix "identifier redeclared" compilation error with SUN cc. The problem is caused by incomplete arrays like struct foo { ... char last_member_that_is_flexible[]; } which cannot be handled by certain compilers. The solution is to change the last member to either char last_member_that_is_flexible[0] or char last_member_that_is_flexible[1] as required. Currently GNU CC can handle [] format for version 3 and later. Earlier versions need [0]. Non-GNU compiler use the safe form [1]. Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm> --- git-compat-util.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 276a437..97759fd 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -4,11 +4,20 @@ #define _FILE_OFFSET_BITS 64 #ifndef FLEX_ARRAY -#if defined(__GNUC__) && (__GNUC__ < 3) +#if defined(__GNUC__) +#if (__GNUC__ < 3) #define FLEX_ARRAY 0 #else #define FLEX_ARRAY /* empty */ #endif +#else +/* more cases we know we can use 0 or empty can come here */ +#endif +#endif + +/* if still undefined, default to the safe, old fashioned way */ +#ifndef FLEX_ARRAY +#define FLEX_ARRAY 1 #endif #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) -- 1.5.3.6.728.gea559 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc5 |
| Jared Hulbert | [PATCH 00/10] AXFS: Advanced XIP filesystem |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Linus Torvalds | Linux 2.6.27-rc8 |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Mark McLoughlin | [PATCH] bridge: make bridge-nf-call-*tables default configurable |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
