mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Changes to cross-compile with DJGPP
This commit is contained in:
@@ -166,7 +166,7 @@ mrb_dir_chdir(mrb_state *mrb, mrb_value klass)
|
||||
static mrb_value
|
||||
mrb_dir_chroot(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
#if defined(_WIN32) || defined(_WIN64) || defined(__ANDROID__)
|
||||
#if defined(_WIN32) || defined(_WIN64) || defined(__ANDROID__) || defined(__MSDOS__)
|
||||
mrb_raise(mrb, E_NOTIMP_ERROR, "chroot() unreliable on your system");
|
||||
return mrb_fixnum_value(0);
|
||||
#else
|
||||
|
||||
@@ -38,7 +38,9 @@
|
||||
#define GETCWD getcwd
|
||||
#define CHMOD(a, b) chmod(a,b)
|
||||
#include <sys/file.h>
|
||||
#ifndef __DJGPP__
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#include <sys/file.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/wait.h>
|
||||
#ifndef __DJGPP__
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
#include <unistd.h>
|
||||
typedef size_t fsize_t;
|
||||
typedef time_t ftime_t;
|
||||
#ifdef __DJGPP__
|
||||
typedef long fsuseconds_t;
|
||||
#else
|
||||
typedef suseconds_t fsuseconds_t;
|
||||
#endif
|
||||
typedef mode_t fmode_t;
|
||||
typedef ssize_t fssize_t;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user