aboutsummaryrefslogtreecommitdiffstats
path: root/src/fripost-partman-udeb/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/fripost-partman-udeb/lib')
-rw-r--r--src/fripost-partman-udeb/lib/stdbuf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fripost-partman-udeb/lib/stdbuf.c b/src/fripost-partman-udeb/lib/stdbuf.c
new file mode 100644
index 0000000..13e6c06
--- /dev/null
+++ b/src/fripost-partman-udeb/lib/stdbuf.c
@@ -0,0 +1,11 @@
+/* All credits to https://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00138.html
+ * Cf. also http://www.pixelbeat.org/programming/stdio_buffering/
+ * http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/stdbuf.c;h=2500c300147f30aa5d2d99fd29b5865637a11290;hb=HEAD
+ */
+
+#include <stdio.h>
+
+__attribute__ ((constructor)) void
+cah9mion4ocim6ip () {
+ setvbuf (stdout, NULL, _IOLBF, 0);
+}