return (ret != (DWORD)-1) && !(ret & FILE_ATTRIBUTE_DIRECTORY);
#else // !__WIN32__
+ #ifndef S_ISREG
+ #define S_ISREG(mode) ((mode) & S_IFREG)
+ #endif
wxStructStat st;
#ifndef wxNEED_WX_UNISTD_H
- return (wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG))
+ return (wxStat( filename.fn_str() , &st) == 0 && S_ISREG(st.st_mode))
#ifdef __OS2__
|| (errno == EACCES) // if access is denied something with that name
// exists and is opened in exclusive mode.
#endif
;
#else
- return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG);
+ return wxStat( filename , &st) == 0 && S_ISREG(st.st_mode);
#endif
#endif // __WIN32__/!__WIN32__
}