]> sjero.net Git - wget/blobdiff - src/url.c
[svn] Check for a recent gcc version before using the statement-as-expression
[wget] / src / url.c
index 8cbb8923e2fed5898ca42967eefe0f479dcf671e..3db7c2fb20e584ba16fbd6cfff88aa5ea57ec3d5 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -584,7 +584,7 @@ static void split_path PARAMS ((const char *, char **, char **));
    help because the check for literal accept is in the
    preprocessor.)  */
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && __GNUC__ >= 3
 
 #define strpbrk_or_eos(s, accept) ({           \
   char *SOE_p = strpbrk (s, accept);           \
@@ -593,7 +593,7 @@ static void split_path PARAMS ((const char *, char **, char **));
   SOE_p;                                       \
 })
 
-#else  /* not __GNUC__ */
+#else  /* not __GNUC__ or old gcc */
 
 static inline char *
 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');
   return p;
 }
-#endif /* not __GNUC__ */
+#endif /* not __GNUC__ or old gcc */
 
 /* Turn STR into lowercase; return non-zero if a character was
    actually changed. */