kdesupport/kdewin32
Paulo Jorge Guedes
Paulo.Guedes at artelecom.pt
Thu Jun 29 20:53:20 CEST 2006
MinGw's dirent struct doesn't have d_type.
Should we replace it with our version like with msvc?
Paulo
> -----Original Message-----
> From: Dirk Mueller [mailto:mueller at kde.org]
> Sent: quinta-feira, 29 de Junho de 2006 11:14
> To: kde-commits at kde.org
> Subject: kdesupport/kdewin32
>
> SVN commit 556127 by mueller:
>
> yeah, so I'm now also a kde-dashboard reader
>
>
> M +14 -0 include/msvc/dirent.h
> M +1 -0 src/readdir.c
>
>
> --- trunk/kdesupport/kdewin32/include/msvc/dirent.h #556126:556127
> @@ -42,11 +42,25 @@
>
> #define __dirfd(dir) (dir)->dd_fd
>
> +enum
> + {
> + DT_UNKNOWN = 0,
> + DT_FIFO = 1,
> + DT_CHR = 2,
> + DT_DIR = 4,
> + DT_BLK = 6,
> + DT_REG = 8,
> + DT_LNK = 10,
> + DT_SOCK = 12,
> + DT_WHT = 14
> + };
> +
> /* struct dirent - same as Unix */
> struct dirent {
> long d_ino; /* inode (always 1 in WIN32) */
> off_t d_off; /* offset to this dirent */
> unsigned short d_reclen; /* length of d_name */
> + unsigned char d_type;
> char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
> };
>
> --- trunk/kdesupport/kdewin32/src/readdir.c #556126:556127
> @@ -123,6 +123,7 @@
> dp->offset++;
>
> strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME);
> + dp->dent.d_type = DT_UNKNOWN;
> dp->dent.d_ino = 1;
> dp->dent.d_reclen = strlen(dp->dent.d_name);
> dp->dent.d_off = dp->offset;
More information about the Kde-windows
mailing list