aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2025-05-13 15:09:13 +0000
committerdrh <>2025-05-13 15:09:13 +0000
commit0df6c5b9a70c6c1b87430c7f69f6849c145803b9 (patch)
treecd2a6f3a25a3c96bb981b0a0a1c0a9d160a036da /src
parent0a0777d8458f2c73fd7512cb2c31e628944eb3c6 (diff)
downloadsqlite-0df6c5b9a70c6c1b87430c7f69f6849c145803b9.tar.gz
sqlite-0df6c5b9a70c6c1b87430c7f69f6849c145803b9.zip
Omit the unused readdir_r() routine from test_windirent.c
FossilOrigin-Name: f9a216e3ad1b3bc9be350aad5ef3dc8b3534d3ee67d160bfedda81a61295320c
Diffstat (limited to 'src')
-rw-r--r--src/test_windirent.c45
-rw-r--r--src/test_windirent.h6
2 files changed, 2 insertions, 49 deletions
diff --git a/src/test_windirent.c b/src/test_windirent.c
index 62165c4be..1458e2b1c 100644
--- a/src/test_windirent.c
+++ b/src/test_windirent.c
@@ -126,51 +126,6 @@ next:
}
/*
-** Implementation of the POSIX readdir_r() function using the MSVCRT.
-*/
-INT readdir_r(
- LPDIR dirp,
- LPDIRENT entry,
- LPDIRENT *result
-){
- struct _finddata_t data;
-
- if( dirp==NULL ) return EBADF;
-
- if( dirp->d_first.d_ino==0 ){
- dirp->d_first.d_ino++;
- dirp->d_next.d_ino++;
-
- entry->d_ino = dirp->d_first.d_ino;
- entry->d_attributes = dirp->d_first.d_attributes;
- strncpy(entry->d_name, dirp->d_first.d_name, NAME_MAX);
- entry->d_name[NAME_MAX] = '\0';
-
- *result = entry;
- return 0;
- }
-
-next:
-
- memset(&data, 0, sizeof(struct _finddata_t));
- if( _findnext(dirp->d_handle, &data)==-1 ){
- *result = NULL;
- return ENOENT;
- }
-
- /* TODO: Remove this block to allow hidden and/or system files. */
- if( is_filtered(data) ) goto next;
-
- entry->d_ino = (ino_t)-1; /* not available */
- entry->d_attributes = data.attrib;
- strncpy(entry->d_name, data.name, NAME_MAX);
- entry->d_name[NAME_MAX] = '\0';
-
- *result = entry;
- return 0;
-}
-
-/*
** Implementation of the POSIX closedir() function using the MSVCRT.
*/
INT closedir(
diff --git a/src/test_windirent.h b/src/test_windirent.h
index 28ce66778..24a888eed 100644
--- a/src/test_windirent.h
+++ b/src/test_windirent.h
@@ -131,8 +131,7 @@ struct DIR {
/*
** Provide a macro, for use by the implementation, to determine if a
** particular directory entry should be skipped over when searching for
-** the next directory entry that should be returned by the readdir() or
-** readdir_r() functions.
+** the next directory entry that should be returned by the readdir().
*/
#ifndef is_filtered
@@ -148,12 +147,11 @@ extern const char *windirent_getenv(const char *name);
/*
** Finally, we can provide the function prototypes for the opendir(),
-** readdir(), readdir_r(), and closedir() POSIX functions.
+** readdir(), and closedir() POSIX functions.
*/
extern LPDIR opendir(const char *dirname);
extern LPDIRENT readdir(LPDIR dirp);
-extern INT readdir_r(LPDIR dirp, LPDIRENT entry, LPDIRENT *result);
extern INT closedir(LPDIR dirp);
#endif /* defined(WIN32) && defined(_MSC_VER) */