]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/hookmacros.h
Fix save/restore of errno for isatty().
[coloredstderr/coloredstderr.git] / src / hookmacros.h
index 0eb47cd67abd45451dc85b02e0573a7e04119ced..6b52293495eb166120294356637f674d7afda9cc 100644 (file)
@@ -38,7 +38,7 @@
  *         if (force_write_to_non_tty) {
  *             handle = 1;
  *         } else {
- *             handle = isatty(<fd>);
+ *             handle = isatty_noinline(<fd>);
  *         }
  *     } else {
  *         handle = 0;
@@ -72,7 +72,7 @@
             if (unlikely(force_write_to_non_tty)) { \
                 handle = 1; \
             } else { \
-                handle = isatty(fd); \
+                handle = isatty_noinline(fd); \
             } \
         } else { \
             handle = 0; \
@@ -87,7 +87,7 @@
             if (unlikely(force_write_to_non_tty)) { \
                 handle = 1; \
             } else { \
-                handle = isatty(fileno(file)); \
+                handle = isatty_noinline(fileno(file)); \
             } \
         } else { \
             handle = 0; \