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