#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.60 2009/02/04 18:24:32 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.61 2009/02/20 15:19:20 christos Exp $")
#endif /* lint */
#include "magic.h"
errno = 0;
if ((fd = open(inname, flags)) < 0) {
-#ifdef __CYGWIN__
- /* FIXME: Do this with EXEEXT from autotools */
- size_t len = strlen(inname) + 5;
- char *tmp = alloca(len);
- (void)strlcat(strlcpy(tmp, inname, len), ".exe", len);
- if ((fd = open(tmp, flags)) < 0) {
-#endif
- if (unreadable_info(ms, sb.st_mode,
-#ifdef __CYGWIN
- tmp
-#else
- inname
-#endif
- ) == -1)
- goto done;
- rv = 0;
+ if (unreadable_info(ms, sb.st_mode, inname) == -1)
goto done;
-#ifdef __CYGWIN__
- }
-#endif
+ rv = 0;
+ goto done;
}
#ifdef O_NONBLOCK
if ((flags = fcntl(fd, F_GETFL)) != -1) {