Hi,
Attached a reproducer program. Because WinCE doesn't has a current directory
it seems to does a readdir from the root directory, but I just get "Network"
back (the first directory given by dir) but then the program ends.
Johnny
> I'm not sure whether it's been tested much. This is part of
> src/mingw/mingwex .
>
> Danny
>
> On Tue, 2009-05-19 at 13:42 +0200, Johnny Willemsen wrote:
> > We see a problem with readdir, we only get 1 file back instead of the
> full
> > directory when iterating. Are there known issues with readdir?
>
> --
> Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
int main( int argc, char *argv[] ) {
DIR *pDIR;
struct dirent *pDirEnt;
/* Open the current directory */
pDIR = opendir(".");
if ( pDIR == NULL ) {
printf ("open dir failed\n");
exit( -1 );
}
/* Get each directory entry from pDIR and print its name */
pDirEnt = readdir( pDIR );
while ( pDirEnt != NULL ) {
printf( "%s\n", pDirEnt->d_name );
pDirEnt = readdir( pDIR );
}
/* Release the open directory */
closedir( pDIR );
return 0;
}
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel