+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>
* http.c (gethttp): Don't attempt to "skip short body" if we're
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); \
SOE_p; \
})
-#else /* not __GNUC__ */
+#else /* not __GNUC__ or old gcc */
static inline char *
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. */