Commit a82e0db for zlib
commit a82e0db392178a3e05fb27bf551a6ce757a47898
Author: Mark Adler <git@madler.net>
Date: Sun Sep 20 18:59:44 2026 -0700
Move BLOCKED definition after errno.h include.
diff --git a/gzguts.h b/gzguts.h
index 5a57b94..f6ea6da 100644
--- a/gzguts.h
+++ b/gzguts.h
@@ -103,20 +103,6 @@
# endif
#endif
-#ifdef EAGAIN
-# ifdef EWOULDBLOCK
-# define BLOCKED(e) ((e) == EAGAIN || (e) == EWOULDBLOCK)
-# else
-# define BLOCKED(e) ((e) == EAGAIN)
-# endif
-#else
-# ifdef EWOULDBLOCK
-# define BLOCKED(e) ((e) == EWOULDBLOCK)
-# else
-# define BLOCKED(e) (0)
-# endif
-#endif
-
/* unlike snprintf (which is required in C99), _snprintf does not guarantee
null termination of the result -- however this is only used in gzlib.c where
the result is assured to fit in the space provided */
@@ -150,6 +136,20 @@
# endif
#endif
+#ifdef EAGAIN
+# ifdef EWOULDBLOCK
+# define BLOCKED(e) ((e) == EAGAIN || (e) == EWOULDBLOCK)
+# else
+# define BLOCKED(e) ((e) == EAGAIN)
+# endif
+#else
+# ifdef EWOULDBLOCK
+# define BLOCKED(e) ((e) == EWOULDBLOCK)
+# else
+# define BLOCKED(e) (0)
+# endif
+#endif
+
/* provide prototypes for these when building zlib without LFS */
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);