diff options
author | Werner Koch <[email protected]> | 2023-06-12 13:44:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-06-12 13:44:03 +0000 |
commit | 3faf11925549260c3822660a2b83785a68326664 (patch) | |
tree | 6ff2e1e5809a898cd1e92ea41fbaf52254134591 /doc | |
parent | w32: Map ERROR_FILE_INVALID to EIO. (diff) | |
download | libgpg-error-3faf11925549260c3822660a2b83785a68326664.tar.gz libgpg-error-3faf11925549260c3822660a2b83785a68326664.zip |
yat2m: Fix Windows build
* doc/yat2m.c (mystpcpy): New. Use instead of stpcpy.
--
Fixes-commit: 43dcdbff50fa33728ab4717cacdf8ff600aea3b9
Diffstat (limited to 'doc')
-rw-r--r-- | doc/yat2m.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/yat2m.c b/doc/yat2m.c index 0e368fc..15f7f76 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -396,6 +396,17 @@ xstrdup (const char *string) return p; } +static char * +mystpcpy (char *a,const char *b) +{ + while( *b ) + *a++ = *b++; + *a = 0; + + return (char*)a; +} + + /* Helper for xstrconcat and strconcat. */ static char * do_strconcat (int xmode, const char *s1, va_list arg_ptr) @@ -418,7 +429,7 @@ do_strconcat (int xmode, const char *s1, va_list arg_ptr) needed++; buffer = xmode? xmalloc (needed) : malloc (needed); for (p = buffer, argc=0; argv[argc]; argc++) - p = stpcpy (p, argv[argc]); + p = mystpcpy (p, argv[argc]); return buffer; } |