]> git.alsa-project.org Git - alsa-oss.git/commitdiff
Fixes for old gcc
authorAbramo Bagnara <abramo@alsa-project.org>
Tue, 12 Dec 2000 16:48:20 +0000 (16:48 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Tue, 12 Dec 2000 16:48:20 +0000 (16:48 +0000)
alsa-oss.c

index fa5e711f12baefb28ab6fefa6cedca0e5822f2f2..5cb65b9605fcef843e5635596a763312b3a8fab4 100644 (file)
 
 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);