#2125 Dirent functions don't work with _USE_32BIT_TIME_T

WSL
closed
nobody
None
Bug
duplicate
Unknown
False
2013-11-01
2013-11-01
No

In fossil, the following bug was reported: http://fossil-scm.org/index.html/tktview?name=18cff45a4e

Here is a minimal example which shows this is a bug in MinGW. Compiling the
example program and running it should give a list of files in the current
directory. In stead it only returns empty lines, one for each file present
in the current directory. When commenting the first line it works as expected.

1 Attachments

Discussion

  • Jan Nijtmans

    Jan Nijtmans - 2013-11-01

    Here is the proposed fix. With this change in dirent.h, the example program works fine. And fossil compiles and runs fine after this change as well.

    The problem is that the various structures in dirent.h have time_t fields, but this field could be either 32-bit or 64-bit depending on _USE_32BIT_TIME_T. Making it 64-bit always helps here.

     
  • Keith Marshall

    Keith Marshall - 2013-11-01
    • status: unread --> closed
    • Resolution: none --> duplicate
     
  • Keith Marshall

    Keith Marshall - 2013-11-01

    This is a duplicate of [#2106], for which I've already posted a solution.

     

    Related

    Issues: #2106

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks