version 1.5, 2007/06/06 19:54:34
|
version 1.6, 2007/06/14 11:37:29
|
|
|
| |
if (_dirRep.dir) | if (_dirRep.dir) |
{ | { |
|
// ATTN: DOI NOT REMOVE THE ERRNO=0 assignment |
|
|
|
// Reason: On some platforms readdir_r is a wrapper around |
|
// readdir. Without errno set to 0, readdir reports a bad return |
|
// code even in the case that just the end of directory was reached. |
|
errno=0; |
// Need to use readdir_r since we are multithreaded | // Need to use readdir_r since we are multithreaded |
if (readdir_r(_dirRep.dir, &_dirRep.buffer, &_dirRep.entry) != 0) | if (readdir_r(_dirRep.dir, &_dirRep.buffer, &_dirRep.entry) != 0) |
{ | { |
|
|
{ | { |
if (_more) | if (_more) |
{ | { |
|
// ATTN: DOI NOT REMOVE THE ERRNO=0 assignment |
|
|
|
// Reason: On some platforms readdir_r is a wrapper around |
|
// readdir. Without errno set to 0, readdir reports a bad return |
|
// code even in the case that just the end of directory was reached. |
|
errno=0; |
// Need to use readdir_r since we are multithreaded | // Need to use readdir_r since we are multithreaded |
if (readdir_r(_dirRep.dir, &_dirRep.buffer, &_dirRep.entry) != 0) | if (readdir_r(_dirRep.dir, &_dirRep.buffer, &_dirRep.entry) != 0) |
{ | { |