Codebase list ruby-fxruby / c22ef1f
Remove old branches for ruby-1.8 Lars Kanis 4 years ago
3 changed file(s) with 0 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
2424 ***********************************************************************/
2525
2626 #include "FXRbCommon.h"
27
28 #if defined(RUBY_1_8)
29 extern "C" {
30 #include "rubysig.h" /* For CHECK_INTS */
31 }
32 #endif
3327
3428 #ifdef HAVE_SYS_TIME_H
3529 #include <sys/time.h> /* For struct timeval */
148142 wait.tv_sec=0;
149143 wait.tv_usec=100*sleepTime;
150144
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);
158145 rb_thread_wait_for(wait);
159 #endif /* RUBY_1_8 */
160146
161147 // Re-register this chore for next time
162148 addChore(this,ID_CHORE_THREADS);
4242 #include <signal.h> // for definitions of SIGINT, etc.
4343 #endif
4444
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
5445 #include "ruby/io.h"
5546 #include "ruby/st.h"
56
57 #endif /* RUBY_1_8 */
5847
5948
6049 // Opaque type declaration from SWIG runtime
16611650 VALUE vwrite = rb_intern("@write");
16621651 if(rb_ivar_defined(obj, vwrite)) obj = rb_ivar_get(obj, vwrite);
16631652 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);
16691653 #else
16701654 rb_io_t *fptr;
16711655 GetOpenFile(obj, fptr);
308308 # Platform-specific modifications
309309 do_rake_compiler_setup
310310
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
315311 if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
316312 $CXXFLAGS += " -Wno-unused-function"
317313 $CXXFLAGS += " -Wno-maybe-uninitialized"