json: Add stpcpy replacement.

* src/gpgme-json.c [!HAVE_STPCPY](_my_stpcpy): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2018-04-18 20:11:27 +02:00
parent 67b4dafb6d
commit 8e34a14fe6
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -114,6 +114,19 @@ static struct
#define spacep(p) (*(p) == ' ' || *(p) == '\t') #define spacep(p) (*(p) == ' ' || *(p) == '\t')
#ifndef HAVE_STPCPY
static GPGRT_INLINE char *
_my_stpcpy (char *a, const char *b)
{
while (*b)
*a++ = *b++;
*a = 0;
return a;
}
#define stpcpy(a,b) _my_stpcpy ((a), (b))
#endif /*!HAVE_STPCPY*/
static void static void
xoutofcore (const char *type) xoutofcore (const char *type)