[Issue 2842] std.file.listdir on OSX produces invalid UTF-8 sequence
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 15 15:23:53 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2842
Jakob Bornecrantz <wallbraker at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
Version|1.043 |D1
Severity|major |critical
--- Comment #6 from Jakob Bornecrantz <wallbraker at gmail.com> 2011-05-15 15:19:47 PDT ---
Looks like the cause of this is due to std.c.linux.linux is being used in
std.file where dirent is defined to this:
struct dirent
{
uint d_ino; // this is int on some linuxes
off_t d_off;
ushort d_reclen;
ubyte d_type; // this field isn't there on some linuxes
char[256] d_name;
}
While in /usr/include/sys/dirent.h it is defined to this:
struct dirent {
ino_t d_ino; /* file number of entry */
__uint16_t d_reclen; /* length of this record */
__uint8_t d_type; /* file type, see below */
__uint8_t d_namlen; /* length of string in d_name */
char d_name[__DARWIN_MAXNAMLEN + 1]; /* name must be no longer than
this */
};
Cheers Jakob.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list