2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Stop using AC_C_FLEXIBLE_ARRAY_MEMBER, support for it is part of C99

This commit is contained in:
Ondřej Surý
2020-05-28 09:26:55 +02:00
parent fe04426778
commit bf60e445ed
4 changed files with 2 additions and 14 deletions

View File

@@ -375,17 +375,6 @@ typedef __int64 off_t;
@HAVE_KRB5_H@
@HAVE_KRB5_KRB5_H@
/*
* Define to nothing if C supports flexible array members, and to 1 if it does
* not. That way, with a declaration like `struct s { int n; double
* d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
* compilers. When computing the size of such an object, don't use 'sizeof
* (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
* instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
* MSVC and with C++ compilers.
*/
#define FLEXIBLE_ARRAY_MEMBER /**/
/* Avoid warnings with strlen() */
#ifdef _WIN64
#define strlen(x) (unsigned int) strlen(x)

View File

@@ -328,7 +328,6 @@ AX_TLS([AS_IF([test "$ac_cv_tls" != "thread_local"],
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_C_FLEXIBLE_ARRAY_MEMBER
#
# Check for yield support on ARM processors

View File

@@ -3061,7 +3061,7 @@ typedef struct {
dns_rdata_t rdata;
size_t size;
isc_mem_t *mctx;
unsigned char data[FLEXIBLE_ARRAY_MEMBER];
unsigned char data[];
} dns_client_updaterec_t;
isc_result_t

View File

@@ -29,7 +29,7 @@ struct isc_ht_node {
void *value;
isc_ht_node_t *next;
size_t keysize;
unsigned char key[FLEXIBLE_ARRAY_MEMBER];
unsigned char key[];
};
struct isc_ht {