aboutsummaryrefslogtreecommitdiff
path: root/multihome.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-08-31 20:22:55 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-08-31 20:22:55 -0400
commitc8819eaa2b97a312890ec1d910d28bad66994432 (patch)
treea6e8c7489829c3f2b1c4db21863a80598b7698b0 /multihome.h
parentb0acd4e5705fc4c28d4a42cde86dae7a433a2f95 (diff)
downloadmultihome-c8819eaa2b97a312890ec1d910d28bad66994432.tar.gz
Disable line buffering; Implement basic tests; Fix mkdirs bug: do not prepend "/" to path
Diffstat (limited to 'multihome.h')
-rw-r--r--multihome.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/multihome.h b/multihome.h
index c08401c..6d157de 100644
--- a/multihome.h
+++ b/multihome.h
@@ -5,6 +5,10 @@
#ifndef MULTIHOME_MULTIHOME_H
#define MULTIHOME_MULTIHOME_H
+#ifdef ENABLE_TESTING
+#include <assert.h>
+#endif
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -26,4 +30,8 @@
#define OS_SKEL_DIR "/etc/skel/" // NOTE: Trailing slash is required
#define RSYNC_ARGS "-aq"
+#define DISABLE_BUFFERING \
+ setvbuf(stdout, NULL, _IONBF, 0); \
+ setvbuf(stderr, NULL, _IONBF, 0);
+
#endif //MULTIHOME_MULTIHOME_H