Skip to content
Snippets Groups Projects

vlc_fs: rework the VLC readdir API so it doesn't use dirent on Windows

Merged Steve Lhomme requested to merge robUx4/vlc:vlc-readdir into master

dirent is not a standard header on Windows. In mingw-w64 it also depends if the CRT is compiled with UNICODE or not.

We can use the native API that is available even in UWP/UAP builds.

A vlc_DIR type is introduced so DIR is not used without dirent API and we can have our own internal representation. This also avoids some dirty casts between DIR and the old win32 structure.


v4:

  • exported vlc_closedir() and vlc_rewinddir() for consistency
  • make the win32 vlc_DIR private
  • fixes from previous patch orders
Edited by Steve Lhomme

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Thomas Guillem approved this merge request

    approved this merge request

  • Steve Lhomme
  • Steve Lhomme added 12 commits

    added 12 commits

    • c37e2be4 - modules: use vlc_closedir instead of direct closedir
    • deb13856 - core: use vlc_closedir instead of direct closedir
    • 0235ded8 - dcp: use the portable opendir API
    • 6765a166 - skins2: use the portable opendir API
    • e79ea274 - core: use vlc_rewinddir to match vlc_opendir
    • a8bca89c - vlc_fs: move up vlc_DIR declaration
    • 68dace21 - vlc_fs: always use a custom type for our opendir API's
    • e3e57e58 - win32: filesystem: allow GetLogicalDrives() in Win10 RS3 UAP builds
    • 2fb9d475 - win32: filesystem: only convert to wide when necessary
    • ee7598e4 - win32: filesystem: initialize entry once
    • 6ea08931 - win32: filesystem: check the drive letter bitmask is valid
    • 57a0c9a9 - win32: filesystem: use the native Win32 API to list folder contents

    Compare with previous version

  • Steve Lhomme resolved all threads

    resolved all threads

  • Denis Charmet
  • Denis Charmet
  • Denis Charmet
  • Denis Charmet
  • Steve Lhomme added 15 commits

    added 15 commits

    • 7de608ef - vlc_fs: add vlc_closedir/vlc_rewinddir for all platforms
    • 52b573ef - dcp: use the portable opendir API
    • 9ec5f7c6 - skins2: use the portable opendir API
    • c15c1ce1 - modules: use vlc_closedir instead of direct closedir
    • 065e139d - core: use vlc_closedir instead of direct closedir
    • e323e976 - core: use vlc_rewinddir to match vlc_opendir
    • d0d89d05 - vlc_fs: move up vlc_DIR declaration
    • a4033247 - vlc_fs: always use a custom type for our opendir API's
    • c22f9f11 - win32: filesystem: allow GetLogicalDrives() in Win10 RS3 UAP builds
    • e5c25cba - win32: filesystem: only convert to wide when necessary
    • 5c0409f9 - win32: filesystem: initialize entry once
    • 58a20f46 - win32: filesystem: check the drive letter bitmask is valid
    • a3ffb8ef - win32: filesystem: use the native Win32 API to list folder contents
    • 38ba4188 - vlc_fs: export vlc_closedir/vlc_rewinddir
    • e527eb97 - vlc_fs: make the internal vlc_DIR type private on Windows

    Compare with previous version

  • Steve Lhomme changed the description

    changed the description

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading