diff options
Diffstat (limited to 'include/ctf-api.h')
-rw-r--r-- | include/ctf-api.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/ctf-api.h b/include/ctf-api.h index 822b3bf..3acbc91 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -43,7 +43,7 @@ extern "C" typedef struct ctf_file ctf_file_t; typedef struct ctf_archive_internal ctf_archive_t; -typedef long ctf_id_t; +typedef unsigned long ctf_id_t; /* This opaque definition allows libctf to accept BFD data structures without importing all the BFD noise into users' namespaces. */ @@ -60,12 +60,9 @@ struct bfd; typedef struct ctf_sect { const char *cts_name; /* Section name (if any). */ - unsigned long cts_type; /* Section type (ELF SHT_... value). */ - unsigned long cts_flags; /* Section flags (ELF SHF_... value). */ const void *cts_data; /* Pointer to section data. */ size_t cts_size; /* Size of data in bytes. */ size_t cts_entsize; /* Size of each section entry (symtab only). */ - off64_t cts_offset; /* File offset of this section (if any). */ } ctf_sect_t; /* Symbolic names for CTF sections. */ @@ -125,9 +122,10 @@ typedef struct ctf_snapshot_id #define CTF_FUNC_VARARG 0x1 /* Function arguments end with varargs. */ -/* Functions that return integer status or a ctf_id_t use the following value - to indicate failure. ctf_errno() can be used to obtain an error code. */ -#define CTF_ERR (-1L) +/* Functions that return a ctf_id_t use the following value to indicate failure. + ctf_errno() can be used to obtain an error code. Functions that return + a straight integral -1 also use ctf_errno(). */ +#define CTF_ERR ((ctf_id_t) -1L) #define ECTF_BASE 1000 /* Base value for libctf errnos. */ |