diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-01 12:20:13 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-01 12:20:13 +0000 |
commit | 4dd476d49b5d9edeb46c8ba15b0969ed032bf1da (patch) | |
tree | e13e472e0d12ea9e74a04ad8e5b1e7fae8f7dbb4 /libio | |
parent | dfb371d8933466dd10c020a7ba9cd670366c78d6 (diff) | |
download | gcc-4dd476d49b5d9edeb46c8ba15b0969ed032bf1da.tar.gz |
* dbz/dbz.c (putconf): Handle systems which use "long long" as type
for "off_t".
* dbz/dbzmain.c (mkfiles): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17579 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libio')
-rw-r--r-- | libio/ChangeLog | 6 | ||||
-rw-r--r-- | libio/dbz/dbz.c | 13 | ||||
-rw-r--r-- | libio/dbz/dbzmain.c | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog index 9c0c641af9d..107c09a753f 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,9 @@ +Sun Feb 1 13:08:18 1998 Krister Walfridsson (cato@df.lth.se) + + * dbz/dbz.c (putconf): Handle systems which use "long long" as type + for "off_t". + * dbz/dbzmain.c (mkfiles): Likewise. + Wed Jan 28 10:27:11 1998 Manfred Hollstein <manfred@s-direktnet.de> * config.shared (FLAGS_TO_PASS): Add gxx_include_dir. diff --git a/libio/dbz/dbz.c b/libio/dbz/dbz.c index c7e8444952b..7489a09d15a 100644 --- a/libio/dbz/dbz.c +++ b/libio/dbz/dbz.c @@ -1198,14 +1198,19 @@ register struct dbzconfig *cp; DEBUG(("fseek failure in putconf\n")); ret = -1; } - fprintf(f, "dbz %d %ld %d %c %ld %ld %d %d", dbzversion, cp->tsize, - cp->fieldsep, cp->casemap, cp->tagenb, - cp->tagmask, cp->tagshift, cp->valuesize); + fprintf(f, "dbz %d %ld %d %c %ld %ld %d %d", dbzversion, + (long)cp->tsize, + cp->fieldsep, cp->casemap, (long)cp->tagenb, + (long)cp->tagmask, cp->tagshift, + cp->valuesize); + for (i = 0; i < cp->valuesize; i++) fprintf(f, " %d", cp->bytemap[i]); fprintf(f, "\n"); for (i = 0; i < NUSEDS; i++) - fprintf(f, "%ld%c", cp->used[i], (i < NUSEDS-1) ? ' ' : '\n'); + fprintf(f, "%ld%c", + (long)cp->used[i], (i < NUSEDS-1) ? ' ' : '\n'); + (void) fflush(f); if (ferror(f)) diff --git a/libio/dbz/dbzmain.c b/libio/dbz/dbzmain.c index 4317a0d0831..a393d6432bd 100644 --- a/libio/dbz/dbzmain.c +++ b/libio/dbz/dbzmain.c @@ -19,7 +19,7 @@ #define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0) #ifndef lint -static char RCSid[] = "$Header: /egcs/carton/cvsfiles/egcs/./libio/dbz/dbzmain.c,v 1.1 1997/08/21 22:58:23 jason Exp $"; +static char RCSid[] = "$Header: /egcs/carton/cvsfiles/egcs/./libio/dbz/dbzmain.c,v 1.1.1.1 1997/08/21 22:58:23 jason Exp $"; #endif char *progname; @@ -278,7 +278,7 @@ mkfiles() } else if (op == 'b' && dbzint) { if (!exact) siz = dbzsize(siz); - if (dbzfresh(my_basename, siz, (int)fs, map, tag) < 0) + if (dbzfresh(my_basename, siz, (int)fs, map, (off_t)tag) < 0) fail("dbzfresh(`%s'...) failed", my_basename); } else if (dbminit(my_basename) < 0) fail("dbminit(`%s') failed", my_basename); |