SQLite

Check-in [7a0a26ed38]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:We learn that readdir_r() is deprecated in favor of plain old readdir(), which is now suppose to be threadsafe using thread-local storage. So remove the use of readdir_r() from the test code. (SQLite itself never calls readdir() or readdir_r()).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7a0a26ed380dd0bdda50b0204b30b53bbbbc70f278eba02f91541ac6c691aef2
User & Date: drh 2019-03-22 13:53:25.635
Context
2019-03-25
14:24
For the ".archive --update" command in the CLI, only update files if their mtime or mode has changed. To force an update, use the new --insert instead. (check-in: 191a023ae7 user: drh tags: trunk)
2019-03-22
13:53
We learn that readdir_r() is deprecated in favor of plain old readdir(), which is now suppose to be threadsafe using thread-local storage. So remove the use of readdir_r() from the test code. (SQLite itself never calls readdir() or readdir_r()). (check-in: 7a0a26ed38 user: drh tags: trunk)
11:38
Add the --limit N option to dbfuzz2. Set the default callback limit to 250K. (check-in: b99f8512c0 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/test_fs.c.
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
** Skip the cursor to the next entry.
*/
static int fsdirNext(sqlite3_vtab_cursor *cur){
  FsdirCsr *pCsr = (FsdirCsr*)cur;

  if( pCsr->pDir ){
    struct DIRENT *pRes = 0;
#if defined(__MINGW_H)
    pRes = readdir(pCsr->pDir);
    if( pRes!=0 ){
      memcpy(&pCsr->entry, pRes, sizeof(struct DIRENT));
    }
#else
    readdir_r(pCsr->pDir, &pCsr->entry, &pRes);
#endif
    if( pRes==0 ){
      closedir(pCsr->pDir);
      pCsr->pDir = 0;
    }
    pCsr->iRowid++;
  }








<




<
<
<







233
234
235
236
237
238
239

240
241
242
243



244
245
246
247
248
249
250
** Skip the cursor to the next entry.
*/
static int fsdirNext(sqlite3_vtab_cursor *cur){
  FsdirCsr *pCsr = (FsdirCsr*)cur;

  if( pCsr->pDir ){
    struct DIRENT *pRes = 0;

    pRes = readdir(pCsr->pDir);
    if( pRes!=0 ){
      memcpy(&pCsr->entry, pRes, sizeof(struct DIRENT));
    }



    if( pRes==0 ){
      closedir(pCsr->pDir);
      pCsr->pDir = 0;
    }
    pCsr->iRowid++;
  }