From c8819eaa2b97a312890ec1d910d28bad66994432 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 31 Aug 2020 20:22:55 -0400 Subject: Disable line buffering; Implement basic tests; Fix mkdirs bug: do not prepend "/" to path --- multihome.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'multihome.h') 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 +#endif + #include #include #include @@ -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 -- cgit