]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* w32/*/dirent.*: [SV 49111] Remove unused telldir()
authorJaak Ristioja <jaak@ristioja.ee>
Sun, 18 Dec 2016 14:45:47 +0000 (09:45 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 25 Dec 2016 23:18:45 +0000 (18:18 -0500)
w32/compat/dirent.c
w32/include/dirent.h

index 17f7d5fddea1aa8f6ad97618388b6efe571dd626..8675b096db3f43b39dafdf85425af5010c141930 100644 (file)
@@ -128,7 +128,7 @@ readdir(DIR* pDir)
         } else if (!FindNextFile(pDir->dir_hDirHandle, &wfdFindData))
                         return NULL;
 
-        /* bump count for next call to readdir() or telldir() */
+        /* bump count for next call to readdir() */
         pDir->dir_nNumFiles++;
 
         /* fill in struct dirent values */
@@ -164,24 +164,6 @@ rewinddir(DIR* pDir)
         return;
 }
 
-int
-telldir(DIR* pDir)
-{
-        if (!pDir) {
-                errno = EINVAL;
-                return -1;
-        }
-
-        /* sanity check that this is a DIR pointer */
-        if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
-                errno = EINVAL;
-                return -1;
-        }
-
-        /* return number of times readdir() called */
-        return pDir->dir_nNumFiles;
-}
-
 void
 seekdir(DIR* pDir, long nPosition)
 {
index bae8449e5c7b95d0dc62f14c493a78e4c0c98764..a34fabfb42f487dde4be24fdfc695005dc630677 100644 (file)
@@ -52,7 +52,6 @@ DIR *opendir(const char *);
 struct dirent *readdir(DIR *);
 void rewinddir(DIR *);
 void closedir(DIR *);
-int telldir(DIR *);
 void seekdir(DIR *, long);
 
 #endif  /* !__MINGW32__ */