Explain why snprintf has to be overridden in this way.
authorMartin Pool <mbp@samba.org>
Mon, 10 Dec 2001 04:35:01 +0000 (04:35 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 10 Dec 2001 04:35:01 +0000 (04:35 +0000)
source/lib/snprintf.c

index 6e7613a276f45001428c819cf5ca201c74991134..7d6da95f8eac89ee6f2a824888c6952ef77a9760 100644 (file)
@@ -757,7 +757,14 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
 }
 #endif
 
-/* yes this really must be a ||. Don't muck with this (tridge) */
+/* yes this really must be a ||. Don't muck wiith this (tridge)
+ *
+ * The logic for these two is that we need our own definition if the
+ * OS *either* has no definition of *sprintf, or if it does have one
+ * that doesn't work properly according to the autoconf test.  Perhaps
+ * these should really be smb_snprintf to avoid conflicts with buggy
+ * linkers? -- mbp
+ */
 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_SNPRINTF)
  int snprintf(char *str,size_t count,const char *fmt,...)
 {