From 7d2b6c4d208ac8b34e77865ea639a66c4b06cdbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Mon, 18 Sep 2006 18:57:42 +0000 Subject: [PATCH] sync with kdewin32 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15049 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/Win32/aspell/dirent.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/development/Win32/aspell/dirent.c b/development/Win32/aspell/dirent.c index 42be761476..c123c0e01d 100755 --- a/development/Win32/aspell/dirent.c +++ b/development/Win32/aspell/dirent.c @@ -56,7 +56,6 @@ * University of Illinois, Urbana-Champaign. */ -//#include #include #include @@ -78,6 +77,7 @@ * The DIR typedef is not compatible with Unix. **********************************************************************/ +#ifndef __MINGW32__ KDEWIN32_EXPORT DIR * opendir(const char *dir) { @@ -118,12 +118,17 @@ KDEWIN32_EXPORT struct dirent * readdir(DIR *dp) if (dp->offset != 0) { if (_findnext(dp->handle, &(dp->fileinfo)) < 0) { dp->finished = 1; + /* posix does not set errno in this case */ + errno = 0; return NULL; } } dp->offset++; strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME); +#ifdef KDEWIN32_HAVE_DIRENT_D_TYPE + dp->dent.d_type = DT_UNKNOWN; +#endif dp->dent.d_ino = 1; dp->dent.d_reclen = strlen(dp->dent.d_name); dp->dent.d_off = dp->offset; @@ -131,13 +136,6 @@ KDEWIN32_EXPORT struct dirent * readdir(DIR *dp) return &(dp->dent); } -KDEWIN32_EXPORT struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) -{ - //todo: remove this when readdir_r.c will be ported - result = 0; - return 0; -} - KDEWIN32_EXPORT int closedir(DIR *dp) { if (!dp) return 0; @@ -148,3 +146,12 @@ KDEWIN32_EXPORT int closedir(DIR *dp) return 0; } +#endif // #ifndef __MINGW32__ + + +KDEWIN32_EXPORT struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) +{ + //todo: remove this when readdir_r.c will be ported + result = 0; + return 0; +} -- 2.39.2