diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-10-26 13:24:14 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-10-26 13:24:14 +0200 |
commit | bebeb89735f4927d33233d2c49e91919187f1c91 (patch) | |
tree | dab33f24de6f672de42e41af4787ceb8494a283c /tools | |
parent | bbce1581029dddbdcdd76a0b969fd8a8fe5614bf (diff) | |
download | rpm-bebeb89735f4927d33233d2c49e91919187f1c91.tar.gz rpm-bebeb89735f4927d33233d2c49e91919187f1c91.tar.bz2 rpm-bebeb89735f4927d33233d2c49e91919187f1c91.zip |
Eliminate [u|]int_[8|16|32]. Use c99 stdint.h types instead.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/debugedit.c | 42 | ||||
-rw-r--r-- | tools/rpmcache.c | 8 | ||||
-rw-r--r-- | tools/rpmgraph.c | 2 | ||||
-rw-r--r-- | tools/rpminject.c | 18 | ||||
-rw-r--r-- | tools/rpmsort.c | 2 |
5 files changed, 36 insertions, 36 deletions
diff --git a/tools/debugedit.c b/tools/debugedit.c index 13ed1e132..c030bb501 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -48,8 +48,8 @@ char *list_file = NULL; int list_file_fd = -1; int do_build_id = 0; -typedef unsigned int uint_32; -typedef unsigned short uint_16; +typedef unsigned int uint32_t; +typedef unsigned short uint16_t; typedef struct { @@ -64,7 +64,7 @@ typedef struct typedef struct { unsigned char *ptr; - uint_32 addend; + uint32_t addend; } REL; #define read_uleb128(ptr) ({ \ @@ -83,31 +83,31 @@ typedef struct ret; \ }) -static uint_16 (*do_read_16) (unsigned char *ptr); -static uint_32 (*do_read_32) (unsigned char *ptr); +static uint16_t (*do_read_16) (unsigned char *ptr); +static uint32_t (*do_read_32) (unsigned char *ptr); static void (*write_32) (unsigned char *ptr, GElf_Addr val); static int ptr_size; -static inline uint_16 +static inline uint16_t buf_read_ule16 (unsigned char *data) { return data[0] | (data[1] << 8); } -static inline uint_16 +static inline uint16_t buf_read_ube16 (unsigned char *data) { return data[1] | (data[0] << 8); } -static inline uint_32 +static inline uint32_t buf_read_ule32 (unsigned char *data) { return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); } -static inline uint_32 +static inline uint32_t buf_read_ube32 (unsigned char *data) { return data[3] | (data[2] << 8) | (data[1] << 16) | (data[0] << 24); @@ -139,13 +139,13 @@ strptr (DSO *dso, int sec, off_t offset) #define read_1(ptr) *ptr++ #define read_16(ptr) ({ \ - uint_16 ret = do_read_16 (ptr); \ + uint16_t ret = do_read_16 (ptr); \ ptr += 2; \ ret; \ }) #define read_32(ptr) ({ \ - uint_32 ret = do_read_32 (ptr); \ + uint32_t ret = do_read_32 (ptr); \ ptr += 4; \ ret; \ }) @@ -154,7 +154,7 @@ REL *relptr, *relend; int reltype; #define do_read_32_relocated(ptr) ({ \ - uint_32 dret = do_read_32 (ptr); \ + uint32_t dret = do_read_32 (ptr); \ if (relptr) \ { \ while (relptr < relend && relptr->ptr < ptr) \ @@ -171,7 +171,7 @@ int reltype; }) #define read_32_relocated(ptr) ({ \ - uint_32 ret = do_read_32_relocated (ptr); \ + uint32_t ret = do_read_32_relocated (ptr); \ ptr += 4; \ ret; \ }) @@ -179,7 +179,7 @@ int reltype; static void dwarf2_write_le32 (unsigned char *p, GElf_Addr val) { - uint_32 v = (uint_32) val; + uint32_t v = (uint32_t) val; p[0] = v; p[1] = v >> 8; @@ -191,7 +191,7 @@ dwarf2_write_le32 (unsigned char *p, GElf_Addr val) static void dwarf2_write_be32 (unsigned char *p, GElf_Addr val) { - uint_32 v = (uint_32) val; + uint32_t v = (uint32_t) val; p[3] = v; p[2] = v >> 8; @@ -452,14 +452,14 @@ has_prefix (const char *str, } static int -edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase) +edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) { unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir; unsigned char **dirt; unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size; unsigned char *endcu, *endprol; unsigned char opcode_base; - uint_32 value, dirt_cnt; + uint32_t value, dirt_cnt; size_t comp_dir_len = strlen (comp_dir); size_t abs_file_cnt = 0, abs_dir_cnt = 0; @@ -708,7 +708,7 @@ static unsigned char * edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) { int i; - uint_32 list_offs; + uint32_t list_offs; int found_list_offs; char *comp_dir; @@ -717,8 +717,8 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) found_list_offs = 0; for (i = 0; i < t->nattr; ++i) { - uint_32 form = t->attr[i].form; - uint_32 len = 0; + uint32_t form = t->attr[i].form; + uint32_t len = 0; int base_len, dest_len; @@ -1005,7 +1005,7 @@ edit_dwarf2 (DSO *dso) if (debug_sections[DEBUG_INFO].data != NULL) { unsigned char *ptr, *endcu, *endsec; - uint_32 value; + uint32_t value; htab_t abbrev; struct abbrev_tag tag, *t; int phase; diff --git a/tools/rpmcache.c b/tools/rpmcache.c index a895262a4..c0d1f7633 100644 --- a/tools/rpmcache.c +++ b/tools/rpmcache.c @@ -41,8 +41,8 @@ static int indent = 2; typedef struct Item_s { const char * path; - int_32 size; - int_32 mtime; + int32_t size; + int32_t mtime; rpmds this; Header h; } * Item; @@ -103,7 +103,7 @@ static int ftsCachePrint(rpmts ts, FILE * fp) static int ftsCacheUpdate(rpmts ts) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; - int_32 tid = rpmtsGetTid(ts); + int32_t tid = rpmtsGetTid(ts); rpmdbMatchIterator mi; unsigned char * md5; int rc = 0; @@ -568,7 +568,7 @@ main(int argc, char *argv[]) vsflags |= RPMVSF_NOHDRCHK; (void) rpmtsSetVSFlags(ts, vsflags); - { int_32 tid = (int_32) time(NULL); + { int32_t tid = (int32_t) time(NULL); (void) rpmtsSetTid(ts, tid); } diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index 2717b46b4..7239d284f 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -20,7 +20,7 @@ static int noDeps = 1; static rpmVSFlags vsflags = 0; -static inline const char * identifyDepend(int_32 f) +static inline const char * identifyDepend(int32_t f) { if (isLegacyPreReq(f)) return "PreReq:"; diff --git a/tools/rpminject.c b/tools/rpminject.c index fe812c53f..538795e98 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -18,7 +18,7 @@ injmode_t injmode = INJ_UNKNOWN; typedef struct cmd_s { injmode_t injmode; char * tag; - int_32 tagval; + int32_t tagval; int done; int oldcnt; int nvals; @@ -42,8 +42,8 @@ static const char * pr_injmode(injmode_t injmode) enum cvtaction {CA_OLD, CA_NEW, CA_OMIT, CA_ERR}; -static enum cvtaction convertAMD(enum cvtaction ca, int_32 type, - void ** nvalsp, int_32 *ncountp, cmd_t *newc) +static enum cvtaction convertAMD(enum cvtaction ca, int32_t type, + void ** nvalsp, int32_t *ncountp, cmd_t *newc) { int i; @@ -64,7 +64,7 @@ static enum cvtaction convertAMD(enum cvtaction ca, int_32 type, case CA_NEW: switch (type) { case RPM_INT32_TYPE: - { int_32 *intp = xmalloc(newc->nvals * sizeof(*intp)); + { int32_t *intp = xmalloc(newc->nvals * sizeof(*intp)); for (i = 0; i < newc->nvals; i++) { long ival; char *end; @@ -119,8 +119,8 @@ static enum cvtaction convertAMD(enum cvtaction ca, int_32 type, return ca; } -static enum cvtaction convertExistingAMD(int_32 tag, int_32 type, - hPTR_t valsp, int_32 *countp, void ** nvalsp, int_32 *ncountp, +static enum cvtaction convertExistingAMD(int32_t tag, int32_t type, + hPTR_t valsp, int32_t *countp, void ** nvalsp, int32_t *ncountp, cmd_t *cmds[], int ncmds) { cmd_t *newc = NULL; @@ -193,7 +193,7 @@ static enum cvtaction convertExistingAMD(int_32 tag, int_32 type, static Header headerCopyWithConvert(Header h, cmd_t *cmds[], int ncmds) { - int_32 tag, type, count; + int32_t tag, type, count; hPTR_t vals; HeaderIterator headerIter; Header res = headerNew(); @@ -203,7 +203,7 @@ Header headerCopyWithConvert(Header h, cmd_t *cmds[], int ncmds) while (headerNextIterator(headerIter, &tag, &type, &vals, &count)) { enum cvtaction ca; void *nvals; - int_32 ncount; + int32_t ncount; nvals = NULL; ncount = 0; @@ -297,7 +297,7 @@ headerInject(Header *hdrp, cmd_t *cmds[], int ncmds) rc = headerIsEntry(h, c->tagval); if (!rc && !c->done && c->injmode != INJ_DELETE) { - int_32 type, ncount; + int32_t type, ncount; void *nvals; enum cvtaction ca; diff --git a/tools/rpmsort.c b/tools/rpmsort.c index b29986ecc..3ba713705 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -24,7 +24,7 @@ static const char * avdbpath = #endif static int noDeps = 0; -static inline const char * identifyDepend(int_32 f) +static inline const char * identifyDepend(int32_t f) { if (isLegacyPreReq(f)) return "PreReq:"; |