1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-05 23:07:49 +02:00

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

View File

@ -155,7 +155,7 @@ capitalize_header_name (unsigned char *name)
#ifndef HAVE_STPCPY #ifndef HAVE_STPCPY
static char * static char *
stpcpy (char *a,const char *b) my_stpcpy (char *a,const char *b)
{ {
while (*b) while (*b)
*a++ = *b++; *a++ = *b++;
@ -163,6 +163,7 @@ stpcpy (char *a,const char *b)
return (char*)a; return (char*)a;
} }
#define stpcpy my_stpcpy
#endif #endif