No subject
Tue Jun 11 15:59:36 CEST 2019
#define UNIX_PATH_MAX 108
struct sockaddr_un {
sa_family_t sun_family; /* AF_UNIX */
char sun_path[UNIX_PATH_MAX]; /* pathname */
};
With the current implementation the array sizes would be different, because
sizeof(array[0..108]) is 109 bytes while sizeof(char[108]) = 108.
Even if sa_family_t were "unsigned char", I 'd assume that the structure
members are automatically padded to begin at least at even addresses, so
a padding byte would be required.
Regards,
Thomas
More information about the fpc-devel
mailing list