SCI: Got rid of HAVE_FNMATCH_H

svn-id: r38279
This commit is contained in:
Max Horn 2009-02-15 18:58:10 +00:00
parent 3ceb1482db
commit e28ed6b4c9
3 changed files with 4 additions and 15 deletions

View File

@ -25,6 +25,8 @@
***************************************************************************/ ***************************************************************************/
#include "common/str.h"
#include "sci/include/engine.h" #include "sci/include/engine.h"
@ -516,14 +518,8 @@ kDeviceInfo_Unix(state_t *s, int funct_nr, int argc, reg_t *argv)
char *path1_s = kernel_dereference_char_pointer(s, argv[1], 0); char *path1_s = kernel_dereference_char_pointer(s, argv[1], 0);
char *path2_s = kernel_dereference_char_pointer(s, argv[2], 0); char *path2_s = kernel_dereference_char_pointer(s, argv[2], 0);
#ifndef HAVE_FNMATCH_H //return make_reg(0, !strcmp(path1_s, path2_s));
#ifndef _DOS return make_reg(0, Common::matchString(path2_s, path1_s, true));
# warning "File matches will be unprecise!"
#endif
return make_reg(0, !strcmp(path1_s, path2_s));
#else
return make_reg(0, fnmatch(path1_s, path2_s, FNM_PATHNAME) /* POSIX.2 */);
#endif
} }
break; break;

View File

@ -35,10 +35,6 @@
#include "sci/include/vm.h" #include "sci/include/vm.h"
#include "sci/include/console.h" /* sciprintf() */ #include "sci/include/console.h" /* sciprintf() */
#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
#endif /* HAVE_FNMATCH_H */
#ifdef _MSC_VER #ifdef _MSC_VER
# include <direct.h> # include <direct.h>
# include <ctype.h> # include <ctype.h>

View File

@ -66,9 +66,6 @@
#define HAVE_UNLINK #define HAVE_UNLINK
#define HAVE_RMDIR #define HAVE_RMDIR
#define HAVE_MEMCHR #define HAVE_MEMCHR
#ifndef _WIN32
#define HAVE_FNMATCH_H
#endif
#define HAVE_SYS_TIME_H #define HAVE_SYS_TIME_H
#define HAVE_GETTIMEOFDAY #define HAVE_GETTIMEOFDAY
#endif #endif