Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: c99_snprintf.h,v 1.2 2024/08/18 20:46:50 christos Exp $	*/
      2 
      3 /*
      4  * ntp_c99_snprintf.h
      5  *
      6  * Included from config.h to deal with replacing [v]snprintf() on older
      7  * systems.  The #undef lines below cannot be directly in config.h as
      8  * config.status modifies each #undef in config.h.in to either be a
      9  * commented-out #undef or a functional #define.  Here they are used
     10  * to avoid redefinition warnings on systems such as macos ca. 2024
     11  * where system headers define [v]snprintf as preprocessor macros.
     12  *
     13  * Do not include this file directly, leave it to config.h.
     14  */
     15 
     16 #if !defined(_KERNEL) && !defined(PARSESTREAM)
     17 /*
     18  * stdio.h must be included in config.h after _GNU_SOURCE is defined
     19  * but before #define snprintf rpl_snprintf
     20  */
     21 # include <stdio.h>
     22 #endif
     23 
     24 #ifdef HW_WANT_RPL_SNPRINTF
     25 # undef snprintf
     26 #endif
     27 #ifdef HW_WANT_RPL_VSNPRINTF
     28 # undef vsnprintf
     29 #endif
     30 
     31