summaryrefslogtreecommitdiff
path: root/firmware/common/sprintf.c
diff options
context:
space:
mode:
authorTomasz Malesinski <tomal@rockbox.org>2006-10-12 20:09:18 +0000
committerTomasz Malesinski <tomal@rockbox.org>2006-10-12 20:09:18 +0000
commita60bb9a067ba36866eba176bcc654619dea66bb2 (patch)
tree1c1554b44e3726942ac70771268877614686d602 /firmware/common/sprintf.c
parent379b91f5052e216b7ced51073096a4ac8bf1c4c1 (diff)
downloadrockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.zip
rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.tar.gz
rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.tar.bz2
rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.tar.xz
Do not use our simple snprintf in simulator, because
ALSA library requires a more advanced one. Fixes the problem with ALSA on Linux. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/sprintf.c')
-rw-r--r--firmware/common/sprintf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/common/sprintf.c b/firmware/common/sprintf.c
index d1c55d5..533c74e 100644
--- a/firmware/common/sprintf.c
+++ b/firmware/common/sprintf.c
@@ -156,6 +156,10 @@ static int format(
return ok; /* true means good */
}
+#ifndef SIMULATOR
+/* ALSA library requires a more advanced snprintf, so let's not
+ override it in simulator */
+
struct for_snprintf {
unsigned char *ptr; /* where to store it */
int bytes; /* amount already stored */
@@ -212,6 +216,8 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
return pr.bytes;
}
+#endif /* SIMULATOR */
+
struct for_fprintf {
int fd; /* where to store it */
int bytes; /* amount stored */