diff options
Diffstat (limited to 'nuttx/examples/thttpd/main.c')
-rw-r--r-- | nuttx/examples/thttpd/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/examples/thttpd/main.c b/nuttx/examples/thttpd/main.c index cb267b8d0..7c0c555c7 100644 --- a/nuttx/examples/thttpd/main.c +++ b/nuttx/examples/thttpd/main.c @@ -99,14 +99,18 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG # define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() # else # define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) # endif #else # ifdef CONFIG_DEBUG -# define message lib_lowprintf +# define message lib_lowprintf +# define msgflush() # else -# define message (void) +# define message printf +# define msgflush() fflush(stdout) # endif #endif @@ -230,7 +234,9 @@ int user_start(int argc, char *argv[]) g_thttpdnsymbols = NEXPORTS; message("Starting THTTPD\n"); + msgflush(); thttpd_main(1, &thttpd_argv); message("THTTPD terminated\n"); + msgflush(); return 0; } |