/*
- * $Id: squid.h,v 1.211 2001/01/14 14:18:18 hno Exp $
+ * $Id: squid.h,v 1.212 2001/02/22 21:05:56 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#endif
/*
- * Hey dummy, don't be tempted to move this to lib/config.h.in again. O_NONBLOCK
- * will not be defined there because you didn't #include <fcntl.h> yet.
+ * Hey dummy, don't be tempted to move this to lib/config.h.in
+ * again. O_NONBLOCK will not be defined there because you didn't
+ * #include <fcntl.h> yet.
*/
-#if defined(O_NONBLOCK) && !defined(_SQUID_SUNOS_) && !defined(_SQUID_SOLARIS_)
+#if defined(_SQUID_SUNOS_)
+/*
+ * We assume O_NONBLOCK is broken, or does not exist, on SunOS.
+ */
+#define SQUID_NONBLOCK O_NDELAY
+#elif defined(O_NONBLOCK)
+/*
+ * We used to assume O_NONBLOCK was broken on Solaris, but evidence
+ * now indicates that its fine on Solaris 8, and in fact required for
+ * properly detecting EOF on FIFOs. So now we assume that if
+ * its defined, it works correctly on all operating systems.
+ */
+#if defined(O_NONBLOCK)
#define SQUID_NONBLOCK O_NONBLOCK
+/*
+ * O_NDELAY is our fallback.
+ */
#else
#define SQUID_NONBLOCK O_NDELAY
#endif