Feature #2639 ยป ruby-haiku-macro-r26395.diff
| io.c (working copy) | ||
|---|---|---|
|
# include <sys/socket.h>
|
||
|
#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
|
||
|
#endif
|
||
| ... | ... | |
|
extern void Init_File(void);
|
||
|
#ifdef __BEOS__
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||
|
# ifndef NOFILE
|
||
|
# define NOFILE (OPEN_MAX)
|
||
|
# endif
|
||
| ... | ... | |
|
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
|
||
|
#elif defined(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)
|
||
|
#else
|
||
|
# define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
|
||
| ... | ... | |
|
off_t pos;
|
||
|
if (fstat(fptr->fd, &st) == 0 && S_ISREG(st.st_mode)
|
||
|
#ifdef __BEOS__
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||
|
&& (st.st_dev > 3)
|
||
|
#endif
|
||
|
)
|
||
| dln.c (working copy) | ||
|---|---|---|
|
# endif
|
||
|
#endif
|
||
|
#ifdef __BEOS__
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||
|
# include <image.h>
|
||
|
#endif
|
||
| ... | ... | |
|
#endif /* rld or dyld */
|
||
|
#endif
|
||
|
#ifdef __BEOS__
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||
|
# define DLN_DEFINED
|
||
|
{
|
||
|
status_t err_stat; /* BeOS error status code */
|
||
| ... | ... | |
|
(*init_fct)();
|
||
|
return (void*)img_id;
|
||
|
}
|
||
|
#endif /* __BEOS__*/
|
||
|
#endif /* __BEOS__ || __HAIKU__ */
|
||
|
#ifndef DLN_DEFINED
|
||
|
dln_notimplement();
|
||
| signal.c (working copy) | ||
|---|---|---|
|
# define ATOMIC_DEC(var) (--(var))
|
||
|
#endif
|
||
|
#ifdef __BEOS__
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||
|
#undef SIGBUS
|
||
|
#endif
|
||
| file.c (working copy) | ||
|---|---|---|
|
#define lstat stat
|
||
|
#endif
|
||
|
#ifdef __BEOS__ /* should not change ID if -1 */
|
||
|
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
|
||
|
static int
|
||
|
be_chown(const char *path, uid_t owner, gid_t group)
|
||
|
{
|
||
| ... | ... | |
|
return fchown(fd, owner, group);
|
||
|
}
|
||
|
#define fchown be_fchown
|
||
|
#endif /* __BEOS__ */
|
||
|
#endif /* __BEOS__ || __HAIKU__ */
|
||
|
VALUE rb_cFile;
|
||
|
VALUE rb_mFileTest;
|
||