Message140723
> So I'd suggest forgetting about this part.
If someone really wants this feature (relative seek of more than 2^63), he/she should open a new issue.
This issue remembers me a mktime() issue: mktime() may return -1 even if it is not an error. time_mktime() uses now a sentinel to detect an error:
buf.tm_wday = -1; /* sentinel; original value ignored */
tt = mktime(&buf);
/* Return value of -1 does not necessarily mean an error, but tm_wday
* cannot remain set to -1 if mktime succeeded. */
if (tt == (time_t)(-1) && buf.tm_wday == -1) /* OverflowError */
For lseek, we can rely on errno. Try something like that:
errno = 0;
offset = lseek(...);
if (offset == (off_t)-1 && errno) /* error */
We can write a test using a sparse file... Or maybe a mmap object? |
|
Date |
User |
Action |
Args |
2011-07-20 08:18:46 | vstinner | set | recipients:
+ vstinner, jcea, pitrou, neologix, Kuberan.Naganathan |
2011-07-20 08:18:46 | vstinner | set | messageid: <1311149926.15.0.754151765935.issue12545@psf.upfronthosting.co.za> |
2011-07-20 08:18:45 | vstinner | link | issue12545 messages |
2011-07-20 08:18:45 | vstinner | create | |
|