+2001-01-30 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/generic/bits/sockaddr.h: Remove SA_LEN macro.
+ * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Likewise.
+ * include/sys/socket.h: Add SA_LEN here for internal use.
+
2001-01-29 Ulrich Drepper <drepper@redhat.com>
* malloc/Makefile: Don't build memusagestat if cross-compiling.
/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
-/* Return the length of a `sockaddr' structure. */
-#define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
-extern int __libc_sa_len (sa_family_t __af) __THROW;
-
#endif /* bits/sockaddr.h */
Return 0 on success, -1 for errors. */
extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
+/* Return the length of a `sockaddr' structure. */
+#ifdef _HAVE_SA_LEN
+# define SA_LEN(_x) (_x)->sa_len
+#else
+# define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
+extern int __libc_sa_len (sa_family_t __af) __THROW;
+#endif
+
#endif
/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
-/* Return the length of a `sockaddr' structure. */
-#define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
-extern int __libc_sa_len (sa_family_t __af) __THROW;
-
#endif /* bits/sockaddr.h */
/* Definition of `struct sockaddr_*' common members. 4.4 BSD version.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#define __SOCKADDR_COMMON_SIZE (2 * sizeof (unsigned char))
-/* Return the length of a `sockaddr' structure. */
-#define SA_LEN(_x) ((_x)->sa_len)
-
#endif /* bits/sockaddr.h */