diff options
author | NIIBE Yutaka <[email protected]> | 2017-04-11 02:23:05 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2017-04-11 02:23:05 +0000 |
commit | a1446163d584cdc3003c7d5b5fc6d74737c1732d (patch) | |
tree | 6810439b74fbbf7b78872b1d60b8d4f6058aa206 /tools/rfc822parse.c | |
parent | gpgscm: Fix opcode dispatch. (diff) | |
download | gnupg-a1446163d584cdc3003c7d5b5fc6d74737c1732d.tar.gz gnupg-a1446163d584cdc3003c7d5b5fc6d74737c1732d.zip |
tools: Portability fix for gpgparsemail.
* tools/rfc822parse.c (my_stpcpy): Rename from stpcpy.
--
When HAVE_STPCPY is not defined (no definition in libc), still,
compiler may have definition as a built-in function (for some specific
case like second argument is constant). In that case, having stpcpy
implementation with the same name but different signature ("static"
qualifier) is not good.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'tools/rfc822parse.c')
-rw-r--r-- | tools/rfc822parse.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c index ee81b5d90..412599b63 100644 --- a/tools/rfc822parse.c +++ b/tools/rfc822parse.c @@ -155,7 +155,7 @@ capitalize_header_name (unsigned char *name) #ifndef HAVE_STPCPY static char * -stpcpy (char *a,const char *b) +my_stpcpy (char *a,const char *b) { while (*b) *a++ = *b++; @@ -163,6 +163,7 @@ stpcpy (char *a,const char *b) return (char*)a; } +#define stpcpy my_stpcpy #endif |