From 7873ab1c30c52cdcd7a162af850c593ebee54e9f Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 18 Dec 2009 22:21:20 +0000 Subject: Fixing LM3S httpd example (still broken) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2390 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/thttpd/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'nuttx/examples/thttpd') 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; } -- cgit v1.2.3