diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-13 10:03:59 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:52:44 +0100 |
commit | f1519f70705b2eee563b9ac4056d4eb39d383ea1 (patch) | |
tree | 99be297bc99adf835bdb6832add4fbf24992a766 /perl.h | |
parent | 03f3961765f87fb8bccb4e3fa5b9e2e533d7dc30 (diff) | |
download | perl-f1519f70705b2eee563b9ac4056d4eb39d383ea1.tar.gz |
Rely on C89 sprintf() return value semantics
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1455,15 +1455,13 @@ EXTERN_C char *crypt(const char *, const char *); #undef UV #endif -/* For the times when you want the return value of sprintf, and you want it - to be the length. Can't have a thread variable passed in, because C89 has - no varargs macros. -*/ -#ifdef SPRINTF_RETURNS_STRLEN -# define my_sprintf sprintf -#else -# define my_sprintf Perl_my_sprintf -#endif +/* This used to be conditionally defined based on whether we had a sprintf() + * that correctly returns the string length (as required by C89), but we no + * longer need that. XS modules can (and do) use this name, so it must remain + * a part of the API that's visible to modules. But we no longer document it + * either (because using sprintf() rather than snprintf() is almost always + * a bad idea). */ +#define my_sprintf sprintf /* * If we have v?snprintf() and the C99 variadic macros, we can just |