changeset 6221:ee77add4f839

* gai_strerror.c: Include config.h when available. Include getaddrinfo.h before other headers to test interface. Reported by Larry Jones <lawrence.jones@ugs.com>.
author Derek R. Price <derek@ximbiot.com>
date Mon, 12 Sep 2005 14:25:04 +0000
parents 43c8e8a95c2d
children 3bdede13630a
files lib/ChangeLog lib/gai_strerror.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-12  Derek Price  <derek@ximbiot.com>
+
+	* gai_strerror.c: Include config.h when available.  Include
+	getaddrinfo.h before other headers to test interface.
+	Reported by Larry Jones <lawrence.jones@ugs.com>.
+
 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* glob.c (glob, globfree, __glob_pattern_p): Use old-style function
--- a/lib/gai_strerror.c
+++ b/lib/gai_strerror.c
@@ -16,13 +16,20 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef _LIBC
+# include "getaddrinfo.h"
+#endif
+
 #include <stdio.h>
 #include <netdb.h>
 
 #ifdef _LIBC
 # include <libintl.h>
 #else
-# include "getaddrinfo.h"
 # include "gettext.h"
 # define _(String) gettext (String)
 # define N_(String) String