From 804cd541ec0f84c39d09588a44fcdd738efc401e Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 28 Sep 2015 20:20:15 -0700 Subject: pstream: fix the compile for MSVC (nw) --- src/lib/netlist/plib/pstream.h | 8 ++++---- src/lib/netlist/plib/pstring.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 32e7558fabe..61f0959cadd 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -288,8 +288,8 @@ protected: pifilestream(void *file, const bool do_close); /* read up to n bytes from stream */ - virtual unsigned vread(void *buf, unsigned n); - virtual void vseek(pos_type n); + virtual unsigned vread(void *buf, const unsigned n); + virtual void vseek(const pos_type n); virtual pos_type vtell(); private: @@ -327,8 +327,8 @@ public: protected: /* read up to n bytes from stream */ - virtual unsigned vread(void *buf, unsigned n); - virtual void vseek(pos_type n); + virtual unsigned vread(void *buf, const unsigned n); + virtual void vseek(const pos_type n); virtual pos_type vtell(); private: diff --git a/src/lib/netlist/plib/pstring.c b/src/lib/netlist/plib/pstring.c index 682f819269b..8ad86f41f3d 100644 --- a/src/lib/netlist/plib/pstring.c +++ b/src/lib/netlist/plib/pstring.c @@ -376,7 +376,7 @@ pstr_t *pstring_t::salloc(int n) stk = palloc_array(pstack_t, 17); pstr_t *p; unsigned sn= ((32 - countleadbits(n)) + 1) / 2; - unsigned size = sizeof(pstr_t) + (1<<(sn * 2)) + 1; + unsigned size = sizeof(pstr_t) + ((UINT64) 1<<(sn * 2)) + 1; if (stk[sn].empty()) p = (pstr_t *) palloc_array(char, size); else -- cgit v1.2.3