dirent-private.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Private details of the DIR type.
  2. Copyright (C) 2011-2021 Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  13. #ifndef _DIRENT_PRIVATE_H
  14. #define _DIRENT_PRIVATE_H 1
  15. #define WIN32_LEAN_AND_MEAN
  16. #include <windows.h>
  17. /* Don't assume that UNICODE is not defined. */
  18. #undef WIN32_FIND_DATA
  19. #define WIN32_FIND_DATA WIN32_FIND_DATAA
  20. struct gl_directory
  21. {
  22. /* Status, or error code to produce in next readdir() call.
  23. -2 means the end of the directory is already reached,
  24. -1 means the entry was already filled by FindFirstFile,
  25. 0 means the entry needs to be filled using FindNextFile.
  26. A positive value is an error code. */
  27. int status;
  28. /* Handle, reading the directory, at current position. */
  29. HANDLE current;
  30. /* Found directory entry. */
  31. WIN32_FIND_DATA entry;
  32. /* Argument to pass to FindFirstFile. It consists of the absolutized
  33. directory name, followed by a directory separator and the wildcards. */
  34. char dir_name_mask[1];
  35. };
  36. #endif /* _DIRENT_PRIVATE_H */