summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-10-16 09:06:19 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-10-16 09:06:19 +0000
commit2161407c6ed96f2bea892b89b2b86c9cf7a465ae (patch)
tree661757e4899545d407eeff037699338904475c22
parent7c9230c64f5b4b3aba0baf4fb9ae6d38fd8ae6c2 (diff)
downloadrockbox-2161407c6ed96f2bea892b89b2b86c9cf7a465ae.tar.gz
rockbox-2161407c6ed96f2bea892b89b2b86c9cf7a465ae.zip
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
-rw-r--r--firmware/common/sprintf.c7
1 files 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(
156 return ok; /* true means good */ 156 return ok; /* true means good */
157} 157}
158 158
159#ifndef SIMULATOR 159#if !defined(SIMULATOR) || !defined(linux)
160/* ALSA library requires a more advanced snprintf, so let's not 160/* ALSA library requires a more advanced snprintf, so let's not
161 override it in simulator */ 161 override it in simulator for Linux. Note that Cygwin requires
162 our snprintf or it produces garbled output after a while. */
162 163
163struct for_snprintf { 164struct for_snprintf {
164 unsigned char *ptr; /* where to store it */ 165 unsigned char *ptr; /* where to store it */
@@ -216,7 +217,7 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
216 return pr.bytes; 217 return pr.bytes;
217} 218}
218 219
219#endif /* SIMULATOR */ 220#endif /* Linux SIMULATOR */
220 221
221struct for_fprintf { 222struct for_fprintf {
222 int fd; /* where to store it */ 223 int fd; /* where to store it */