diff options
author | Werner Koch <[email protected]> | 2018-04-18 18:11:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-04-18 18:11:50 +0000 |
commit | 8e34a14fe694a8c765973aaa3a8b2a2d2c3ba8b9 (patch) | |
tree | bf6045a331d8a31ae5300e39e621e6c150c2f397 | |
parent | doc: Update copyright years and change two URLs. (diff) | |
download | gpgme-8e34a14fe694a8c765973aaa3a8b2a2d2c3ba8b9.tar.gz gpgme-8e34a14fe694a8c765973aaa3a8b2a2d2c3ba8b9.zip |
json: Add stpcpy replacement.
* src/gpgme-json.c [!HAVE_STPCPY](_my_stpcpy): New.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | src/gpgme-json.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpgme-json.c b/src/gpgme-json.c index 0beb78f4..f1e9f256 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -114,6 +114,19 @@ static struct #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 xoutofcore (const char *type) |