summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2009-01-15 18:04:34 +0000
committerJuanma Barranquero <lekktu@gmail.com>2009-01-15 18:04:34 +0000
commit8db52afe7b198fac91b7d12c7a6adf4c5be46382 (patch)
treec5133865f40c75072d7bb69882753352826449d8
parent6a6baf114eeaf98192cf25cc0ebc0eccf2649f0d (diff)
downloademacs-8db52afe7b198fac91b7d12c7a6adf4c5be46382.tar.gz
emacs-8db52afe7b198fac91b7d12c7a6adf4c5be46382.tar.bz2
emacs-8db52afe7b198fac91b7d12c7a6adf4c5be46382.zip
* sound.c (SOUND_WARNING): Use _snprintf, for MSVC compatibility.
Reported by David Robinow <drobinow@gmail.com>.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/sound.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 93aa087f2b9..6ec71d10cc2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-15 Juanma Barranquero <lekktu@gmail.com>
+
+ * sound.c (SOUND_WARNING): Use _snprintf, for MSVC compatibility.
+ Reported by David Robinow <drobinow@gmail.com>.
+
2009-01-15 Kenichi Handa <handa@m17n.org>
* coding.c (detect_coding_system): Fix handling of
diff --git a/src/sound.c b/src/sound.c
index 8f54a7a5e98..2c723a4f99a 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1301,14 +1301,14 @@ alsa_init (sd)
/* BEGIN: Windows specific functions */
-#define SOUND_WARNING(fun, error, text) \
- { \
- char buf[1024]; \
- char err_string[MAXERRORLENGTH]; \
+#define SOUND_WARNING(fun, error, text) \
+ { \
+ char buf[1024]; \
+ char err_string[MAXERRORLENGTH]; \
fun (error, err_string, sizeof (err_string)); \
- snprintf (buf, sizeof (buf), "%s\nError: %s", \
- text, err_string); \
- sound_warning (buf); \
+ _snprintf (buf, sizeof (buf), "%s\nError: %s", \
+ text, err_string); \
+ sound_warning (buf); \
}
static int