mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c, file.c, io.c, signal.c: add __HAIKU__.
patched by Alexander von Gluck [ruby-core:27767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0fdbdfbbda
commit
d5b0c4b1f3
5 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Jan 25 12:02:34 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* dln.c, file.c, io.c, signal.c: add __HAIKU__.
|
||||||
|
patched by Alexander von Gluck [ruby-core:27767]
|
||||||
|
|
||||||
Mon Jan 25 11:45:47 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Jan 25 11:45:47 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* math.c (domain_check): ignore errno if y is inf.
|
* math.c (domain_check): ignore errno if y is inf.
|
||||||
|
|
6
dln.c
6
dln.c
|
@ -84,7 +84,7 @@ char *getenv();
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
# include <image.h>
|
# include <image.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1433,7 +1433,7 @@ dln_load(const char *file)
|
||||||
#endif /* rld or dyld */
|
#endif /* rld or dyld */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
# define DLN_DEFINED
|
# define DLN_DEFINED
|
||||||
{
|
{
|
||||||
status_t err_stat; /* BeOS error status code */
|
status_t err_stat; /* BeOS error status code */
|
||||||
|
@ -1479,7 +1479,7 @@ dln_load(const char *file)
|
||||||
(*init_fct)();
|
(*init_fct)();
|
||||||
return (void*)img_id;
|
return (void*)img_id;
|
||||||
}
|
}
|
||||||
#endif /* __BEOS__*/
|
#endif /* __BEOS__ || __HAIKU__ */
|
||||||
|
|
||||||
#ifndef DLN_DEFINED
|
#ifndef DLN_DEFINED
|
||||||
dln_notimplement();
|
dln_notimplement();
|
||||||
|
|
4
file.c
4
file.c
|
@ -70,7 +70,7 @@ int flock(int, int);
|
||||||
#define lstat stat
|
#define lstat stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__ /* should not change ID if -1 */
|
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
|
||||||
static int
|
static int
|
||||||
be_chown(const char *path, uid_t owner, gid_t group)
|
be_chown(const char *path, uid_t owner, gid_t group)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ be_fchown(int fd, uid_t owner, gid_t group)
|
||||||
return fchown(fd, owner, group);
|
return fchown(fd, owner, group);
|
||||||
}
|
}
|
||||||
#define fchown be_fchown
|
#define fchown be_fchown
|
||||||
#endif /* __BEOS__ */
|
#endif /* __BEOS__ || __HAIKU__ */
|
||||||
|
|
||||||
VALUE rb_cFile;
|
VALUE rb_cFile;
|
||||||
VALUE rb_mFileTest;
|
VALUE rb_mFileTest;
|
||||||
|
|
8
io.c
8
io.c
|
@ -30,7 +30,7 @@
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__)
|
#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__) || defined(__HAIKU__)
|
||||||
# define NO_SAFE_RENAME
|
# define NO_SAFE_RENAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
extern void Init_File(void);
|
extern void Init_File(void);
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
# ifndef NOFILE
|
# ifndef NOFILE
|
||||||
# define NOFILE (OPEN_MAX)
|
# define NOFILE (OPEN_MAX)
|
||||||
# endif
|
# endif
|
||||||
|
@ -162,7 +162,7 @@ static int max_file_descriptor = NOFILE;
|
||||||
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
|
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
|
||||||
#elif defined(FILE_READEND)
|
#elif defined(FILE_READEND)
|
||||||
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
|
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
|
||||||
#elif defined(__BEOS__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
# define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0)
|
# define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0)
|
||||||
#else
|
#else
|
||||||
# define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
|
# define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
|
||||||
|
@ -1525,7 +1525,7 @@ remain_size(rb_io_t *fptr)
|
||||||
off_t pos;
|
off_t pos;
|
||||||
|
|
||||||
if (fstat(fptr->fd, &st) == 0 && S_ISREG(st.st_mode)
|
if (fstat(fptr->fd, &st) == 0 && S_ISREG(st.st_mode)
|
||||||
#ifdef __BEOS__
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
&& (st.st_dev > 3)
|
&& (st.st_dev > 3)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
|
2
signal.c
2
signal.c
|
@ -34,7 +34,7 @@ typedef int rb_atomic_t;
|
||||||
# define ATOMIC_DEC(var) (--(var))
|
# define ATOMIC_DEC(var) (--(var))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
#undef SIGBUS
|
#undef SIGBUS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue