X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgai_strerror.c;h=f758f8e90913c94598bc4e42ae30b84c42a62d34;hb=fac94349f25305566277d15b965fa8f4efe66613;hp=60042e837c56355f27efcfa3521e3eb700896a76;hpb=dbf8ca54bfdeaef894c8d0912df6e05b4c1a7302;p=gnulib.git diff --git a/lib/gai_strerror.c b/lib/gai_strerror.c index 60042e837..f758f8e90 100644 --- a/lib/gai_strerror.c +++ b/lib/gai_strerror.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2011 Free Software + Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1997. @@ -31,6 +32,22 @@ # define N_(String) String #endif +#if HAVE_DECL_GAI_STRERROR + +# include +# undef gai_strerror +# if HAVE_DECL_GAI_STRERRORA +# define gai_strerror gai_strerrorA +# endif + +const char * +rpl_gai_strerror (int code) +{ + return gai_strerror (code); +} + +#else /* !HAVE_DECL_GAI_STRERROR */ + static struct { int code; @@ -50,7 +67,7 @@ values[] = { EAI_SOCKTYPE, N_("ai_socktype not supported") }, { EAI_SYSTEM, N_("System error") }, { EAI_OVERFLOW, N_("Argument buffer too small") }, -#ifdef __USE_GNU +#ifdef EAI_INPROGRESS { EAI_INPROGRESS, N_("Processing request in progress") }, { EAI_CANCELED, N_("Request canceled") }, { EAI_NOTCANCELED, N_("Request not canceled") }, @@ -70,6 +87,7 @@ gai_strerror (int code) return _("Unknown error"); } -#ifdef _LIBC +# ifdef _LIBC libc_hidden_def (gai_strerror) -#endif +# endif +#endif /* !HAVE_DECL_GAI_STRERROR */