ruby-changes:14559
From: naruse <ko1@a...>
Date: Mon, 25 Jan 2010 12:09:17 +0900 (JST)
Subject: [ruby-changes:14559] Ruby:r26398 (trunk): * dln.c, file.c, io.c, signal.c: add __HAIKU__.
naruse 2010-01-25 12:06:06 +0900 (Mon, 25 Jan 2010) New Revision: 26398 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26398 Log: * dln.c, file.c, io.c, signal.c: add __HAIKU__. patched by Alexander von Gluck [ruby-core:27767] Modified files: trunk/ChangeLog trunk/dln.c trunk/file.c trunk/io.c trunk/signal.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26397) +++ ChangeLog (revision 26398) @@ -1,3 +1,8 @@ +Mon Jan 25 12:02:34 2010 NARUSE, Yui <naruse@r...> + + * 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@r...> * math.c (domain_check): ignore errno if y is inf. Index: io.c =================================================================== --- io.c (revision 26397) +++ io.c (revision 26398) @@ -30,7 +30,7 @@ # 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 @@ -83,7 +83,7 @@ extern void Init_File(void); -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) # ifndef NOFILE # define NOFILE (OPEN_MAX) # endif @@ -162,7 +162,7 @@ # 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)) @@ -1525,7 +1525,7 @@ 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 ) Index: dln.c =================================================================== --- dln.c (revision 26397) +++ dln.c (revision 26398) @@ -84,7 +84,7 @@ # endif #endif -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) # include <image.h> #endif @@ -1433,7 +1433,7 @@ #endif /* rld or dyld */ #endif -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) # define DLN_DEFINED { status_t err_stat; /* BeOS error status code */ @@ -1479,7 +1479,7 @@ (*init_fct)(); return (void*)img_id; } -#endif /* __BEOS__*/ +#endif /* __BEOS__ || __HAIKU__ */ #ifndef DLN_DEFINED dln_notimplement(); Index: signal.c =================================================================== --- signal.c (revision 26397) +++ signal.c (revision 26398) @@ -34,7 +34,7 @@ # define ATOMIC_DEC(var) (--(var)) #endif -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) #undef SIGBUS #endif Index: file.c =================================================================== --- file.c (revision 26397) +++ file.c (revision 26398) @@ -70,7 +70,7 @@ #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) { @@ -95,7 +95,7 @@ return fchown(fd, owner, group); } #define fchown be_fchown -#endif /* __BEOS__ */ +#endif /* __BEOS__ || __HAIKU__ */ VALUE rb_cFile; VALUE rb_mFileTest; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/