aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-18 21:54:08 -0500
committerRob Landley <rob@landley.net>2007-01-18 21:54:08 -0500
commit901637760b4206e968e73dd5ff7430c107c27b57 (patch)
tree61923e296b7728cb32261bd64eb1ad2261f5ad75 /lib/portability.h
parent813840c9d199bf9e26d23291cf23e22a68e8ad82 (diff)
downloadtoybox-901637760b4206e968e73dd5ff7430c107c27b57.tar.gz
Add fdprintf(). Remove reread() and rewrite() which handle -EINTR, which
shouldn't be a problem if we register signal handlers with sigaction(SA_RESTART) Straighten out count and len (I generally consistently use "count" for the current progress and "len" for the total, but this time I got them backwards for some reason and don't want to confuse myself in future.)
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index dca0ddea..5aa4a0bf 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -1,3 +1,9 @@
+
+// Humor glibc to get dprintf, then #define it to something more portable.
+#define _GNU_SOURCE
+#include <stdio.h>
+#define fdprintf(...) dprintf(__VA_ARGS__)
+
#include <endian.h>
#if __BYTE_ORDER == __BIG_ENDIAN