From: Peter Kümmel Date: Mon, 18 Sep 2006 18:57:42 +0000 (+0000) Subject: sync with kdewin32 X-Git-Tag: 1.6.10~12547 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7d2b6c4d208ac8b34e77865ea639a66c4b06cdbd;p=features.git sync with kdewin32 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15049 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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; +}