version 1.9.8.2, 2016/08/11 12:51:52
|
version 1.10, 2016/08/18 09:06:31
|
Line 70 cf_(struct tagBufIO *buf)
|
Line 70 cf_(struct tagBufIO *buf)
|
return 0; |
return 0; |
} |
} |
|
|
#if defined(__NetBSD__) || defined(__linux__) | #ifndef __linux__ |
| #ifdef __NetBSD__ |
static off_t |
static off_t |
sf_lim(struct tagBufIO *buf, off_t pos, int w) |
sf_lim(struct tagBufIO *buf, off_t pos, int w) |
#else |
#else |
static fpos_t |
static fpos_t |
sf_lim(struct tagBufIO *buf, fpos_t pos, int w) |
sf_lim(struct tagBufIO *buf, fpos_t pos, int w) |
#endif |
#endif |
|
#else |
|
static off_t |
|
sf_lim(struct tagBufIO *buf, off64_t *ppos, int w) |
|
#endif |
{ |
{ |
|
#ifdef __linux__ |
|
off_t pos = (off_t) *ppos; |
|
#endif |
|
|
if (!buf) |
if (!buf) |
goto err; |
goto err; |
|
|
Line 139 wf_lim(struct tagBufIO *buf, const char *dat, int siz)
|
Line 148 wf_lim(struct tagBufIO *buf, const char *dat, int siz)
|
return siz; |
return siz; |
} |
} |
|
|
#if defined(__NetBSD__) || defined(__linux__) | #ifndef __linux__ |
| #ifdef __NetBSD__ |
static off_t |
static off_t |
sf_inf(struct tagBufIO *buf, off_t pos, int w) |
sf_inf(struct tagBufIO *buf, off_t pos, int w) |
#else |
#else |
static fpos_t |
static fpos_t |
sf_inf(struct tagBufIO *buf, fpos_t pos, int w) |
sf_inf(struct tagBufIO *buf, fpos_t pos, int w) |
#endif |
#endif |
|
#else |
|
static off_t |
|
sf_inf(struct tagBufIO *buf, off64_t *ppos, int w) |
|
#endif |
{ |
{ |
void *b; |
void *b; |
|
#ifdef __linux__ |
|
off_t pos = (off_t) *ppos; |
|
#endif |
|
|
if (!buf) |
if (!buf) |
goto err; |
goto err; |
Line 389 io_fmapopen(const char *csFile, int mode, int perm, in
|
Line 406 io_fmapopen(const char *csFile, int mode, int perm, in
|
close(fd); |
close(fd); |
} else if (offset) { |
} else if (offset) { |
basesize = offset; |
basesize = offset; |
base = mmap(NULL, basesize, prot, MAP_ANON, -1, 0); | base = mmap(NULL, basesize, prot, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); |
if (base == MAP_FAILED) { |
if (base == MAP_FAILED) { |
LOGERR; |
LOGERR; |
return NULL; |
return NULL; |