]> git.sur5r.net Git - openldap/blobdiff - include/ac/socket.h
Import headers with updated notices
[openldap] / include / ac / socket.h
index c7a1629490d0c62567bb5eb1943165772e42057e..000fc3b88ae4dd5004c8e3b3d29937444783d5cf 100644 (file)
@@ -1,13 +1,14 @@
 /* Generic socket.h */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
+ * Copyright 1998-2001 The OpenLDAP Foundation, Redwood City, California, USA
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License.  A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.  A copy of this license is available at
+ * http://www.OpenLDAP.org/license.html or in file LICENSE in the
+ * top-level directory of the distribution.
  */
 
 #ifndef _AC_SOCKET_H_
@@ -186,4 +187,20 @@ LDAP_F (int) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * ));
 #  endif
 #endif
 
+#ifndef INET_ADDRSTRLEN
+#      define INET_ADDRSTRLEN 16
+#endif
+#ifndef INET6_ADDRSTRLEN
+#      define INET6_ADDRSTRLEN 46
+#endif
+
+#ifdef HAVE_GETADDRINFO
+#      ifdef HAVE_GAI_STRERROR
+#              define AC_GAI_STRERROR(x)       (gai_strerror((x)))
+#      else
+#              define AC_GAI_STRERROR(x)       (ldap_pvt_gai_strerror((x)))
+               char * ldap_pvt_gai_strerror( int );
+#      endif
+#endif
+
 #endif /* _AC_SOCKET_H_ */