From 49cae0a0eb58e506073b59e5c7a1cce7458376cd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Jan 2009 21:23:53 +0000 Subject: [PATCH] Redirect swprintf() calls to _snwprintf() for Windows as they implemented a different function from ISO C (theirs does not take a count). git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1426 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 3 +++ jtag/sysdep.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index f7d4c768..f9c0fc37 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -10,6 +10,9 @@ * src/part/part.c (part_print): Use const markings with const strings. * src/cmd/include.c (cmd_include_or_script_run): Likewise. + * sysdep.h: Redirect swprintf() calls to _snwprintf() for Windows as they + implemented a different function from ISO C (theirs does not take a count). + 2009-01-19 Kolja Waschk * doc/UrJTAG.txt, diff --git a/jtag/sysdep.h b/jtag/sysdep.h index f6c6db6d..094f30e2 100644 --- a/jtag/sysdep.h +++ b/jtag/sysdep.h @@ -48,6 +48,9 @@ #include #define geteuid() 0 #define getuid() 0 +/* Microsoft uses a different swprintf() than ISO C requires */ +#include +#define swprintf _snwprintf #endif #endif /* SYSDEP_H */