From 0781937e2f57dec5475bf968ee54716ed00d6f92 Mon Sep 17 00:00:00 2001 From: borutr Date: Sat, 24 Jan 2009 08:18:53 +0000 Subject: [PATCH] * as/asranlib/asranlib.h: changed type of offset to unsigned int to make it work on ppc Mac OS X (off_t is 64 bit and is not converted to 32 bit unsigned int when calling sputl() since it is a macro * as/link/lkar.c: changed the initialization of This->loaded git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5348 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 7 +++++++ as/asranlib/asranlib.c | 2 +- as/link/lkar.c | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82d96ade..22884ac8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-24 Borut Razem + + * as/asranlib/asranlib.h: changed type of offset to unsigned int to + make it work on ppc Mac OS X (off_t is 64 bit and is not converted + to 32 bit unsigned int when calling sputl() since it is a macro + * as/link/lkar.c: changed the initialization of This->loaded + 2009-01-23 Borut Razem * as/link/lkar.h: changed type of ar_size to size_t to make it work on diff --git a/as/asranlib/asranlib.c b/as/asranlib/asranlib.c index 01977beb..e5449cfd 100644 --- a/as/asranlib/asranlib.c +++ b/as/asranlib/asranlib.c @@ -93,7 +93,7 @@ struct symbol_s }; struct symbol_s *symlist, *lastsym; -off_t offset, first_member_offset; +unsigned int offset, first_member_offset; int add_symbol (const char *sym, void *param) diff --git a/as/link/lkar.c b/as/link/lkar.c index 6a9cc374..b137ffde 100644 --- a/as/link/lkar.c +++ b/as/link/lkar.c @@ -290,7 +290,7 @@ buildlibraryindex_ar (struct lbname *lbnh, FILE * libfp, pmlibraryfile This, int This = This->next; } This->next = NULL; - This->loaded = -1; + This->loaded = 0; This->libspc = lbnh->libspc; This->offset = offset; This->relfil = get_member_name_by_offset (libfp, offset); /* member name */ @@ -308,7 +308,6 @@ buildlibraryindex_ar (struct lbname *lbnh, FILE * libfp, pmlibraryfile This, int ThisSym->next = (pmlibrarysymbol) new (sizeof (mlibrarysymbol)); ThisSym = ThisSym->next; } - This->loaded = 0; ThisSym->next = NULL; ThisSym->name = sym; } -- 2.30.2