[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sys_socket: sockaddr_storage, new module alignof
From: |
Bruno Haible |
Subject: |
Re: sys_socket: sockaddr_storage, new module alignof |
Date: |
Sat, 9 May 2009 00:01:55 +0200 |
User-agent: |
KMail/1.9.9 |
Simon Josefsson wrote:
> +#define _SS_PADSIZE (_SS_SIZE - (max (sizeof (sa_family_t), \
> + alignof (__ss_aligntype)) \
'max' is not a predefined macro. I'm applying this fix:
2009-05-08 Bruno Haible <address@hidden>
* lib/sys_socket.in.h (_SS_PADSIZE): Use a conditional expression
instead of 'max'.
*** lib/sys_socket.in.h.orig 2009-05-08 23:58:45.000000000 +0200
--- lib/sys_socket.in.h 2009-05-08 23:58:11.000000000 +0200
***************
*** 44,57 ****
#define _GL_SYS_SOCKET_H
#if address@hidden@
! #include <alignof.h>
/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
! #define __ss_aligntype unsigned long int
! #define _SS_SIZE 256
! #define _SS_PADSIZE (_SS_SIZE - (max (sizeof (sa_family_t), \
! alignof (__ss_aligntype)) \
! + sizeof (__ss_aligntype)))
struct sockaddr_storage
{
--- 44,59 ----
#define _GL_SYS_SOCKET_H
#if address@hidden@
! # include <alignof.h>
/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
! # define __ss_aligntype unsigned long int
! # define _SS_SIZE 256
! # define _SS_PADSIZE \
! (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \
! ? sizeof (sa_family_t) \
! : alignof (__ss_aligntype)) \
! + sizeof (__ss_aligntype)))
struct sockaddr_storage
{
- Re: sys_socket: sockaddr_storage, (continued)
- Re: sys_socket: sockaddr_storage, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, Tom G. Christensen, 2009/05/13
- Re: sys_socket: sockaddr_storage, Bruno Haible, 2009/05/07
- Re: sys_socket: sockaddr_storage, Tom G. Christensen, 2009/05/08
- Re: sys_socket: sockaddr_storage, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Bruno Haible, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Bruno Haible, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof,
Bruno Haible <=
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/10
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Simon Josefsson, 2009/05/08
- Re: sys_socket: sockaddr_storage, new module alignof, Bruno Haible, 2009/05/12
- Re: sys_socket: sockaddr_storage, new module alignof, Eric Blake, 2009/05/12
- Re: new module alignof, Bruno Haible, 2009/05/31
- Re: sys_socket: sockaddr_storage, new module alignof, Eric Blake, 2009/05/12
- Re: new module alignof, Bruno Haible, 2009/05/31