Remove old branches for ruby-1.8
Lars Kanis
4 years ago
24 | 24 |
***********************************************************************/
|
25 | 25 |
|
26 | 26 |
#include "FXRbCommon.h"
|
27 | |
|
28 | |
#if defined(RUBY_1_8)
|
29 | |
extern "C" {
|
30 | |
#include "rubysig.h" /* For CHECK_INTS */
|
31 | |
}
|
32 | |
#endif
|
33 | 27 |
|
34 | 28 |
#ifdef HAVE_SYS_TIME_H
|
35 | 29 |
#include <sys/time.h> /* For struct timeval */
|
|
148 | 142 |
wait.tv_sec=0;
|
149 | 143 |
wait.tv_usec=100*sleepTime;
|
150 | 144 |
|
151 | |
// Confirm that this thread can be interrupted, then go to sleep
|
152 | |
#if defined(RUBY_1_8)
|
153 | |
CHECK_INTS;
|
154 | |
if(!rb_thread_critical)
|
155 | |
rb_thread_wait_for(wait);
|
156 | |
#else
|
157 | |
// if(!rb_thread_critical) rb_thread_wait_for(wait);
|
158 | 145 |
rb_thread_wait_for(wait);
|
159 | |
#endif /* RUBY_1_8 */
|
160 | 146 |
|
161 | 147 |
// Re-register this chore for next time
|
162 | 148 |
addChore(this,ID_CHORE_THREADS);
|
42 | 42 |
#include <signal.h> // for definitions of SIGINT, etc.
|
43 | 43 |
#endif
|
44 | 44 |
|
45 | |
#if defined(RUBY_1_8)
|
46 | |
|
47 | |
extern "C" {
|
48 | |
#include "st.h"
|
49 | |
#include "rubyio.h" // for GetOpenFile(), etc.
|
50 | |
}
|
51 | |
|
52 | |
#else
|
53 | |
|
54 | 45 |
#include "ruby/io.h"
|
55 | 46 |
#include "ruby/st.h"
|
56 | |
|
57 | |
#endif /* RUBY_1_8 */
|
58 | 47 |
|
59 | 48 |
|
60 | 49 |
// Opaque type declaration from SWIG runtime
|
|
1661 | 1650 |
VALUE vwrite = rb_intern("@write");
|
1662 | 1651 |
if(rb_ivar_defined(obj, vwrite)) obj = rb_ivar_get(obj, vwrite);
|
1663 | 1652 |
fd = FIX2INT(rb_funcall(obj, rb_intern("fileno"), 0));
|
1664 | |
#elif defined(RUBY_1_8)
|
1665 | |
OpenFile *fptr;
|
1666 | |
GetOpenFile(obj, fptr);
|
1667 | |
FILE *fpw=GetWriteFile(fptr);
|
1668 | |
fd = fileno(fpw);
|
1669 | 1653 |
#else
|
1670 | 1654 |
rb_io_t *fptr;
|
1671 | 1655 |
GetOpenFile(obj, fptr);
|
308 | 308 |
# Platform-specific modifications
|
309 | 309 |
do_rake_compiler_setup
|
310 | 310 |
|
311 | |
$CFLAGS += " -DRUBY_1_8" if RUBY_VERSION =~ /1\.8\./
|
312 | |
$CFLAGS += " -DRUBY_1_9" if RUBY_VERSION =~ /1\.9\./
|
313 | |
$CFLAGS += " -DRUBY_2_0" if RUBY_VERSION =~ /2\.0\./
|
314 | |
|
315 | 311 |
if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
|
316 | 312 |
$CXXFLAGS += " -Wno-unused-function"
|
317 | 313 |
$CXXFLAGS += " -Wno-maybe-uninitialized"
|