[m-rev.] diff: fix mercury_wrapper.c snprintf bug

Peter Ross pro at missioncriticalit.com
Tue Sep 16 17:54:15 AEST 2008


runtime/mercury_wrapper.c:
	Use _snprintf if snprintf not defined.

? DIFF
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.192
diff -u -r1.192 mercury_wrapper.c
--- runtime/mercury_wrapper.c	10 Sep 2008 11:03:52 -0000	1.192
+++ runtime/mercury_wrapper.c	16 Sep 2008 07:50:48 -0000
@@ -62,6 +62,10 @@
 #include    "mercury_memory_handlers.h" /* for MR_default_handler */
 #include    "mercury_thread.h"          /* for MR_debug_threads */
 
+#if defined(MR_HAVE__SNPRINTF) && ! defined(MR_HAVE_SNPRINTF)
+  #define snprintf	_snprintf
+#endif
+
 /* global variables concerned with testing (i.e. not with the engine) */
 
 /* command-line options */
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list