More accurate "packed" attribute declaration.
This commit is contained in:
15
auto/clang
15
auto/clang
@@ -146,3 +146,18 @@ nxt_feature_test="#include <stdlib.h>
|
||||
return 0;
|
||||
}"
|
||||
. auto/feature
|
||||
|
||||
|
||||
nxt_feature="GCC __attribute__ packed"
|
||||
nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_PACKED
|
||||
nxt_feature_run=
|
||||
nxt_feature_path=
|
||||
nxt_feature_libs=
|
||||
nxt_feature_test="struct __attribute__ ((__packed__)) s {
|
||||
char c;
|
||||
};
|
||||
|
||||
int main() {
|
||||
return 1;
|
||||
}"
|
||||
. auto/feature
|
||||
|
||||
@@ -121,6 +121,17 @@ nxt_prefetch(a)
|
||||
#endif
|
||||
|
||||
|
||||
#if (NXT_HAVE_GCC_ATTRIBUTE_PACKED)
|
||||
|
||||
#define nxt_packed __attribute__((__packed__))
|
||||
|
||||
#else
|
||||
|
||||
#define nxt_packed
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NXT_ALIGNMENT
|
||||
|
||||
#if (NXT_SOLARIS)
|
||||
@@ -230,6 +241,4 @@ nxt_trunc_ptr(p, a) \
|
||||
(u_char *) ((uintptr_t) (p) & ~((uintptr_t) (a) - 1))
|
||||
|
||||
|
||||
#define NXT_PACKED __attribute__((packed))
|
||||
|
||||
#endif /* _NXT_CLANG_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user