Using old-style packed attribute specification for compatibility.
This commit is contained in:
@@ -153,9 +153,10 @@ nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_PACKED
|
|||||||
nxt_feature_run=
|
nxt_feature_run=
|
||||||
nxt_feature_path=
|
nxt_feature_path=
|
||||||
nxt_feature_libs=
|
nxt_feature_libs=
|
||||||
nxt_feature_test="struct __attribute__ ((__packed__)) s {
|
nxt_feature_test="struct s {
|
||||||
char c;
|
char c;
|
||||||
};
|
int i;
|
||||||
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ typedef struct nxt_conf_object_s nxt_conf_object_t;
|
|||||||
|
|
||||||
|
|
||||||
struct nxt_conf_value_s {
|
struct nxt_conf_value_s {
|
||||||
union nxt_packed {
|
union {
|
||||||
uint8_t boolean; /* 1 bit. */
|
uint8_t boolean; /* 1 bit. */
|
||||||
int64_t integer;
|
int64_t integer;
|
||||||
double number;
|
double number;
|
||||||
@@ -52,14 +52,14 @@ struct nxt_conf_value_s {
|
|||||||
u_char start[NXT_CONF_MAX_SHORT_STRING];
|
u_char start[NXT_CONF_MAX_SHORT_STRING];
|
||||||
} str;
|
} str;
|
||||||
|
|
||||||
struct nxt_packed {
|
struct {
|
||||||
u_char *start;
|
u_char *start;
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
} string;
|
} nxt_packed string;
|
||||||
|
|
||||||
nxt_conf_array_t *array;
|
nxt_conf_array_t *array;
|
||||||
nxt_conf_object_t *object;
|
nxt_conf_object_t *object;
|
||||||
} u;
|
} nxt_packed u;
|
||||||
|
|
||||||
uint8_t type; /* 3 bits. */
|
uint8_t type; /* 3 bits. */
|
||||||
} nxt_aligned(8);
|
} nxt_aligned(8);
|
||||||
|
|||||||
Reference in New Issue
Block a user