diff options
| author | Eli Zaretskii | 2024-02-25 08:20:44 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2024-02-25 08:20:44 +0200 |
| commit | 782ff2f826e2fde75f6491f3a6cf0d7fcd5510b2 (patch) | |
| tree | aa3e6203c3f91f4581887a7b53b45f4989359900 | |
| parent | 05116eac0c199b0c8409a32b349a42a21b5a0fb0 (diff) | |
| download | emacs-782ff2f826e2fde75f6491f3a6cf0d7fcd5510b2.tar.gz emacs-782ff2f826e2fde75f6491f3a6cf0d7fcd5510b2.zip | |
* nt/cmdproxy.c (_snprintf) [_UCRT]: Redirect to 'snprintf'.
| -rw-r--r-- | nt/cmdproxy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 0500b653bb2..c012151cf96 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c | |||
| @@ -38,6 +38,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 38 | #include <string.h> /* strlen */ | 38 | #include <string.h> /* strlen */ |
| 39 | #include <ctype.h> /* isspace, isalpha */ | 39 | #include <ctype.h> /* isspace, isalpha */ |
| 40 | 40 | ||
| 41 | /* UCRT has a C99-compatible snprintf, and _snprintf is defined inline | ||
| 42 | in stdio.h, which we don't want to include here. Since the | ||
| 43 | differences in behavior between snprintf and _snprintf don't matter | ||
| 44 | in this file, we take the easy way out. */ | ||
| 45 | #ifdef _UCRT | ||
| 46 | # define _snprintf snprintf | ||
| 47 | #endif | ||
| 48 | |||
| 41 | /* We don't want to include stdio.h because we are already duplicating | 49 | /* We don't want to include stdio.h because we are already duplicating |
| 42 | lots of it here */ | 50 | lots of it here */ |
| 43 | extern int _snprintf (char *buffer, size_t count, const char *format, ...); | 51 | extern int _snprintf (char *buffer, size_t count, const char *format, ...); |