From 2161407c6ed96f2bea892b89b2b86c9cf7a465ae Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Mon, 16 Oct 2006 09:06:19 +0000 Subject: Cygwin-built simulator can produce garbled debugging output without our snprintf git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11235 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/sprintf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/common/sprintf.c b/firmware/common/sprintf.c index 533c74ed3c..79db758a4b 100644 --- a/firmware/common/sprintf.c +++ b/firmware/common/sprintf.c @@ -156,9 +156,10 @@ static int format( return ok; /* true means good */ } -#ifndef SIMULATOR +#if !defined(SIMULATOR) || !defined(linux) /* ALSA library requires a more advanced snprintf, so let's not - override it in simulator */ + override it in simulator for Linux. Note that Cygwin requires + our snprintf or it produces garbled output after a while. */ struct for_snprintf { unsigned char *ptr; /* where to store it */ @@ -216,7 +217,7 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap) return pr.bytes; } -#endif /* SIMULATOR */ +#endif /* Linux SIMULATOR */ struct for_fprintf { int fd; /* where to store it */ -- cgit v1.2.3