First snapshot of FIO for Windows
[fio.git] / fifo.h
diff --git a/fifo.h b/fifo.h
index 8e34fb61f3675fa250696e5bf92348dfe531b2bc..749136530a2c5410867f10caf672c155949daa2f 100644 (file)
--- a/fifo.h
+++ b/fifo.h
@@ -40,15 +40,19 @@ static inline unsigned int fifo_room(struct fifo *fifo)
        return fifo->size - fifo->in + fifo->out;
 }
 
        return fifo->size - fifo->in + fifo->out;
 }
 
+#ifndef min
 #define min(x,y) ({ \
        typeof(x) _x = (x);     \
        typeof(y) _y = (y);     \
        (void) (&_x == &_y);            \
        _x < _y ? _x : _y; })
 #define min(x,y) ({ \
        typeof(x) _x = (x);     \
        typeof(y) _y = (y);     \
        (void) (&_x == &_y);            \
        _x < _y ? _x : _y; })
+#endif
 
 
+#ifndef max
 #define max(x,y) ({ \
        typeof(x) _x = (x);     \
        typeof(y) _y = (y);     \
        (void) (&_x == &_y);            \
        _x > _y ? _x : _y; })
 
 #define max(x,y) ({ \
        typeof(x) _x = (x);     \
        typeof(y) _y = (y);     \
        (void) (&_x == &_y);            \
        _x > _y ? _x : _y; })
 
+#endif