[Pkg-gnupg-commit] [gnupg2] 43/132: tools: Portability fix for gpgparsemail.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit a1446163d584cdc3003c7d5b5fc6d74737c1732d
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Apr 11 11:23:05 2017 +0900
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 <gniibe at fsij.org>
---
tools/rfc822parse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c
index ee81b5d..412599b 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list