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@fsij.org>
This commit is contained in:
NIIBE Yutaka 2017-04-11 11:23:05 +09:00
parent 1b6adab41d
commit a1446163d5
1 changed files with 2 additions and 1 deletions

View File

@ -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