]> code.delx.au - spectrwm/blobdiff - linux/util.h
Pacify -Wconditional-uninitialized warnings.
[spectrwm] / linux / util.h
index 73b0b8097d3245bf406eb49e7c299965a3f19231..634b112d2b1a1d8817cd9641f46d6ca82f4f4a46 100644 (file)
@@ -1,5 +1,3 @@
-/* $scrotwm$ */
-
 #define FPARSELN_UNESCESC      0x01
 #define FPARSELN_UNESCCONT     0x02
 #define FPARSELN_UNESCCOMM     0x04
@@ -14,7 +12,19 @@ char   *fparseln(FILE *, size_t *, size_t *, const char [3], int);
 
 long long strtonum(const char *, long long, long long, const char **);
 
+#ifndef WAIT_ANY
+#define WAIT_ANY               (-1)
+#endif
+
 /* there is no limit to ulrich drepper's crap */
 #ifndef TAILQ_END
 #define        TAILQ_END(head)                 NULL
 #endif
+
+#ifndef TAILQ_FOREACH_SAFE
+#define        TAILQ_FOREACH_SAFE(var, head, field, tvar)                      \
+       for ((var) = TAILQ_FIRST(head);                                 \
+           (var) != TAILQ_END(head) &&                                 \
+           ((tvar) = TAILQ_NEXT(var, field), 1);                       \
+           (var) = (tvar))
+#endif