summaryrefslogtreecommitdiff
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
parent379b91f5052e216b7ced51073096a4ac8bf1c4c1 (diff)
downloadrockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.tar.gz
rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.zip
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
-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 d1c55d563c..533c74ed3c 100644
--- a/firmware/common/sprintf.c
+++ b/firmware/common/sprintf.c
@@ -156,6 +156,10 @@ static int format(
156 return ok; /* true means good */ 156 return ok; /* true means good */
157} 157}
158 158
159#ifndef SIMULATOR
160/* ALSA library requires a more advanced snprintf, so let's not
161 override it in simulator */
162
159struct for_snprintf { 163struct for_snprintf {
160 unsigned char *ptr; /* where to store it */ 164 unsigned char *ptr; /* where to store it */
161 int bytes; /* amount already stored */ 165 int bytes; /* amount already stored */
@@ -212,6 +216,8 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
212 return pr.bytes; 216 return pr.bytes;
213} 217}
214 218
219#endif /* SIMULATOR */
220
215struct for_fprintf { 221struct for_fprintf {
216 int fd; /* where to store it */ 222 int fd; /* where to store it */
217 int bytes; /* amount stored */ 223 int bytes; /* amount stored */