diff --git a/mrbgem.rake b/mrbgem.rake index 740671132..10864c81c 100644 --- a/mrbgem.rake +++ b/mrbgem.rake @@ -1,15 +1,6 @@ MRuby::Gem::Specification.new('mruby-dir') do |spec| - spec.license = 'MIT' - spec.authors = [ 'Internet Initiative Japan Inc.' ] + spec.license = 'MIT and MIT-like license' + spec.authors = [ 'Internet Initiative Japan Inc.', 'Kevlin Henney'] spec.cc.include_paths << "#{build.root}/src" - - case RUBY_PLATFORM - when /mingw|mswin/ - spec.license = 'MIT and MIT-like license' - spec.authors += [ 'Kevlin Henney' ] - spec.objs += Dir.glob("#{dir}/src/Win/*.{c,cpp,m,asm,S}").map { |f| - objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) - } - end end diff --git a/src/Win/dirent.h b/src/Win/dirent.h deleted file mode 100644 index a02a0d828..000000000 --- a/src/Win/dirent.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef DIRENT_INCLUDED -#define DIRENT_INCLUDED - -/* - - Declaration of POSIX directory browsing functions and types for Win32. - - Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) - History: Created March 1997. Updated June 2003. - Rights: See end of file. - -*/ - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef struct DIR DIR; - -struct dirent -{ - char *d_name; -}; - -DIR *opendir(const char *); -int closedir(DIR *); -struct dirent *readdir(DIR *); -void rewinddir(DIR *); - -/* - - Copyright Kevlin Henney, 1997, 2003. All rights reserved. - - Permission to use, copy, modify, and distribute this software and its - documentation for any purpose is hereby granted without fee, provided - that this copyright and permissions notice appear in all copies and - derivatives. - - This software is supplied "as is" without express or implied warranty. - - But that said, if there are any problems please get in touch. - -*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/dir.c b/src/dir.c index 70a6e01a8..00658debd 100644 --- a/src/dir.c +++ b/src/dir.c @@ -16,7 +16,7 @@ #define PATH_MAX MAX_PATH #endif #define S_ISDIR(B) ((B)&_S_IFDIR) - #include "Win/dirent.h" + #include "Win/dirent.c" #include #define rmdir _rmdir #define getcwd _getcwd