From 9e8071ee3aa512301c19cd2c07a117e9fa3987c1 Mon Sep 17 00:00:00 2001 From: borutr Date: Sat, 7 Feb 2009 13:26:25 +0000 Subject: [PATCH] * asranlib/asranlib.c: fixed BSD header length calculation * .version, doc/sdccman.lyx: bumped sdcc version to 2.8.8 due sdcc asxxxx license change to GPLv3 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5357 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- .version | 2 +- ChangeLog | 6 ++++++ as/asranlib/asranlib.c | 13 +++++++------ doc/sdccman.lyx | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.version b/.version index 80803faf..d578041c 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.8.8 +2.8.9 diff --git a/ChangeLog b/ChangeLog index f3286f40..1a3b6043 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-07 Borut Razem + + * asranlib/asranlib.c: fixed BSD header length calculation + * .version, doc/sdccman.lyx: bumped sdcc version to 2.8.8 + due sdcc asxxxx license change to GPLv3 + 2009-02-05 Borut Razem * asranlib/asranlib.c, link/lkar.h, link/lkar.c: diff --git a/as/asranlib/asranlib.c b/as/asranlib/asranlib.c index ab13c678..42ee8eaa 100644 --- a/as/asranlib/asranlib.c +++ b/as/asranlib/asranlib.c @@ -231,7 +231,7 @@ get_member_name_by_offset (FILE * fp, long offset) struct symbol_s { const char *name; - off_t offset; + size_t offset; struct symbol_s *next; }; @@ -481,9 +481,10 @@ int get_symbols (FILE * fp, const char *archive) { struct ar_hdr hdr; + size_t hdr_len; char *name; - if (!is_ar (fp) || !ar_get_header (&hdr, fp, &name)) + if (!is_ar (fp) || !(hdr_len = ar_get_header (&hdr, fp, &name))) { fprintf (stderr, "asranlib: %s: File format not recognized\n", archive); exit (1); @@ -494,7 +495,7 @@ get_symbols (FILE * fp, const char *archive) free (name); process_symbol_table (&hdr, fp); - if (!ar_get_header (&hdr, fp, (verbose || list) ? &name : NULL)) + if (!(hdr_len = ar_get_header (&hdr, fp, (verbose || list) ? &name : NULL))) return 1; } else if (AR_IS_BSD_SYMBOL_TABLE (name)) @@ -502,11 +503,11 @@ get_symbols (FILE * fp, const char *archive) free (name); process_bsd_symbol_table (&hdr, fp); - if (!ar_get_header (&hdr, fp, (verbose || list) ? &name : NULL)) + if (!(hdr_len = ar_get_header (&hdr, fp, (verbose || list) ? &name : NULL))) return 1; } - first_member_offset = ftell (fp) - ARHDR_LEN; + first_member_offset = ftell (fp) - hdr_len; /* walk trough all archive members */ do @@ -523,7 +524,7 @@ get_symbols (FILE * fp, const char *archive) { long mdule_offset = ftell (fp); - offset = mdule_offset - ARHDR_LEN; + offset = mdule_offset - hdr_len; enum_symbols (fp, hdr.ar_size, add_symbol, NULL); diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 6a2cc81e..801cffb5 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -114,7 +114,7 @@ SDCC Compiler User Guide \begin_layout Date \size normal -SDCC 2.8.8 +SDCC 2.8.9 \size footnotesize \newline -- 2.30.2