1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Check for a recent gcc version before using the statement-as-expression

extension.
This commit is contained in:
hniksic 2005-05-30 11:44:20 -07:00
parent f79e976e7c
commit 71911ea593
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
* url.c (strpbrk_or_eos): Check for a recent GCC version before
using the statement-as-expression extension.
2005-05-30 Hrvoje Niksic <hniksic@xemacs.org> 2005-05-30 Hrvoje Niksic <hniksic@xemacs.org>
* http.c (gethttp): Don't attempt to "skip short body" if we're * http.c (gethttp): Don't attempt to "skip short body" if we're

View File

@ -584,7 +584,7 @@ static void split_path PARAMS ((const char *, char **, char **));
help because the check for literal accept is in the help because the check for literal accept is in the
preprocessor.) */ preprocessor.) */
#ifdef __GNUC__ #if defined(__GNUC__) && __GNUC__ >= 3
#define strpbrk_or_eos(s, accept) ({ \ #define strpbrk_or_eos(s, accept) ({ \
char *SOE_p = strpbrk (s, accept); \ char *SOE_p = strpbrk (s, accept); \
@ -593,7 +593,7 @@ static void split_path PARAMS ((const char *, char **, char **));
SOE_p; \ SOE_p; \
}) })
#else /* not __GNUC__ */ #else /* not __GNUC__ or old gcc */
static inline char * static inline char *
strpbrk_or_eos (const char *s, const char *accept) strpbrk_or_eos (const char *s, const char *accept)
@ -603,7 +603,7 @@ strpbrk_or_eos (const char *s, const char *accept)
p = strchr (s, '\0'); p = strchr (s, '\0');
return p; return p;
} }
#endif /* not __GNUC__ */ #endif /* not __GNUC__ or old gcc */
/* Turn STR into lowercase; return non-zero if a character was /* Turn STR into lowercase; return non-zero if a character was
actually changed. */ actually changed. */