diff options
| author | 2015-09-28 20:20:15 -0700 | |
|---|---|---|
| committer | 2015-09-28 20:20:15 -0700 | |
| commit | 804cd541ec0f84c39d09588a44fcdd738efc401e (patch) | |
| tree | 845ccea7597140b658aed3edf34ef13dcbe5bb6a | |
| parent | 4c15d28de4be992907eb1cb065cb6a5fde45581a (diff) | |
pstream: fix the compile for MSVC (nw)
| -rw-r--r-- | src/lib/netlist/plib/pstream.h | 8 | ||||
| -rw-r--r-- | src/lib/netlist/plib/pstring.c | 2 |
2 files changed, 5 insertions, 5 deletions
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<F>::salloc(int n) stk = palloc_array(pstack_t<pstr_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 |
