changed to handle different sa_family_t sizes
This commit is contained in:
parent
a0bd10822a
commit
0ebd75fda8
5
hio/configure
vendored
5
hio/configure
vendored
@ -18741,6 +18741,11 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HIO_SIZEOF_SA_FAMILY_T ${ac_cv_sizeof_sa_family_t}
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
hio_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`"
|
||||
hio_package_version_minor="`echo ${PACKAGE_VERSION} | cut -d. -f2`"
|
||||
|
@ -739,6 +739,7 @@ AC_DEFINE_UNQUOTED(HIO_SIZEOF_STRUCT_SOCKADDR_UN, ${ac_cv_sizeof_struct_sockaddr
|
||||
AC_DEFINE_UNQUOTED(HIO_SIZEOF_STRUCT_SOCKADDR_LL, ${ac_cv_sizeof_struct_sockaddr_ll}, [sizeof(struct sockaddr_ll)])
|
||||
AC_DEFINE_UNQUOTED(HIO_SIZEOF_STRUCT_SOCKADDR_DL, ${ac_cv_sizeof_struct_sockaddr_dl}, [sizeof(struct sockaddr_dl)])
|
||||
AC_DEFINE_UNQUOTED(HIO_SIZEOF_SOCKLEN_T, ${ac_cv_sizeof_socklen_t}, [sizeof(socklen_t)])
|
||||
AC_DEFINE_UNQUOTED(HIO_SIZEOF_SA_FAMILY_T, ${ac_cv_sizeof_sa_family_t}, [sizeof(sa_family_t)])
|
||||
|
||||
|
||||
hio_package_version_major="`echo ${PACKAGE_VERSION} | cut -d. -f1`"
|
||||
|
@ -633,6 +633,9 @@
|
||||
/* sizeof(off_t) */
|
||||
#undef HIO_SIZEOF_OFF_T
|
||||
|
||||
/* sizeof(sa_family_t) */
|
||||
#undef HIO_SIZEOF_SA_FAMILY_T
|
||||
|
||||
/* sizeof(short) */
|
||||
#undef HIO_SIZEOF_SHORT
|
||||
|
||||
|
@ -52,12 +52,24 @@
|
||||
# define HIO_SIZEOF_SKAD_T HIO_SIZEOF_STRUCT_SOCKADDR_UN
|
||||
#endif
|
||||
|
||||
#if !defined(HIO_AF_UNIX)
|
||||
#if (HIO_SIZEOF_SA_FAMILY_T == 1) && !defined(HIO_SA_FAMILY_T_IS_SIGNED)
|
||||
# if !defined(HIO_AF_UNIX)
|
||||
# define HIO_AF_UNIX (254)
|
||||
# endif
|
||||
# define HIO_AF_QX (255)
|
||||
#elif (HIO_SIZEOF_SA_FAMILY_T == 1) && defined(HIO_SA_FAMILY_T_IS_SIGNED)
|
||||
# if !defined(HIO_AF_UNIX)
|
||||
# define HIO_AF_UNIX (-2)
|
||||
# endif
|
||||
# define HIO_AF_QX (-1)
|
||||
#else
|
||||
# if !defined(HIO_AF_UNIX)
|
||||
/* this is a fake value */
|
||||
# define HIO_AF_UNIX (65534)
|
||||
# endif
|
||||
/* this is HIO specific. No AF_XXXX definitions must overlap with this */
|
||||
# define HIO_AF_QX (65530)
|
||||
#endif
|
||||
/* this is HIO specific. No AF_XXXX definitions must overlap with this */
|
||||
#define HIO_AF_QX (65530)
|
||||
|
||||
struct hio_skad_t
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user