]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/replace: Fix snprintf() override for systems with a broken snprintf()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 5 Jun 2012 13:27:58 +0000 (23:27 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Jun 2012 06:23:10 +0000 (08:23 +0200)
This ensures we provide the replacement functions that we need.

Andrew Bartlett

lib/replace/wscript

index a5a4486dc91b83e865dc1cb7c6cb5148e84a6a28..efde441c4182b2e55352d6745570dafdc6e190b9 100644 (file)
@@ -475,7 +475,6 @@ REPLACEMENT_FUNCTIONS = {
                   'dprintf', 'get_current_dir_name',
                   'strerror_r', 'clock_gettime'],
     'timegm.c': ['timegm'],
-    'snprintf.c': ['snprintf'],
     }
 
 
@@ -484,6 +483,7 @@ def build(bld):
 
     REPLACE_HOSTCC_SOURCE = ''
 
+    if not bld.CONFIG_SET('HAVE_C99_VSNPRINTF'): REPLACE_HOSTCC_SOURCE += ' snprintf.c'
     if bld.CONFIG_SET('REPLACE_STRPTIME'):       REPLACE_HOSTCC_SOURCE += ' strptime.c'
     for filename, functions in REPLACEMENT_FUNCTIONS.iteritems():
         for function in functions: