From: Nick Alcock Date: Mon, 3 Jun 2019 10:38:08 +0000 (+0100) Subject: libctf: fix the type of ctf_enum.cte_value X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a610aa4f9cf61d38b8e0fe60dfaac078d636089f;p=binutils-gdb.git libctf: fix the type of ctf_enum.cte_value This stops the file format from depending on the size of the host int. (It does mean that we cannot encode enums with a value > 2^32 on platforms with an int > 2^32: this will be fixed in the next format revision.) include/ * ctf.h (ctf_enum.cte_value): Fix type to int32_t. --- diff --git a/include/ChangeLog b/include/ChangeLog index 1f216b38218..f84498b590b 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2019-06-03 Nick Alcock + + * ctf.h (ctf_enum.cte_value): Fix type to int32_t. + 2019-05-29 Nick Alcock * ctf-api.h (ctf_sect_t): Drop cts_type, cts_flags, and cts_offset. diff --git a/include/ctf.h b/include/ctf.h index 2c3384fe84a..e99a673109c 100644 --- a/include/ctf.h +++ b/include/ctf.h @@ -507,7 +507,7 @@ typedef struct ctf_lmember_v2 typedef struct ctf_enum { uint32_t cte_name; /* Reference to name in string table. */ - int cte_value; /* Value associated with this name. */ + int32_t cte_value; /* Value associated with this name. */ } ctf_enum_t; /* The ctf_archive is a collection of ctf_file_t's stored together. The format