From: Abramo Bagnara Date: Tue, 12 Dec 2000 16:48:20 +0000 (+0000) Subject: Fixes for old gcc X-Git-Tag: v1.0.3~106 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b260f53775666420470356fbed3a8bba21fe6f55;p=alsa-oss.git Fixes for old gcc --- diff --git a/alsa-oss.c b/alsa-oss.c index fa5e711..5cb65b9 100644 --- a/alsa-oss.c +++ b/alsa-oss.c @@ -38,12 +38,24 @@ static int debug = 0; +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +#define NEW_MACRO_VARARGS +#endif + #if 1 #define DEBUG_POLL #define DEBUG_SELECT +#ifdef NEW_MACRO_VARARGS #define DEBUG(...) do { if (debug) fprintf(stderr, __VA_ARGS__); } while (0) +#else /* !NEW_MACRO_VARARGS */ +#define DEBUG(args...) do { if (debug) fprintf(stderr, ##args); } while (0) +#endif #else +#ifdef NEW_MACRO_VARARGS #define DEBUG(...) +#else /* !NEW_MACRO_VARARGS */ +#define DEBUG(args...) +#endif #endif int (*_select)(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);