ruby_posix_mq.git  about / heads / tags
POSIX message queues for Ruby
blob d433d1d04e768cceae1464dc7002a63b88285e40 587 bytes (raw)
$ git show HEAD:ext/posix_mq/extconf.rb	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
require "mkmf"

have_header("sys/select.h")
have_header("signal.h")
have_header("mqueue.h") or abort "mqueue.h header missing"
have_header("pthread.h")
have_func("rb_str_set_len")
have_func('rb_thread_blocking_region')
have_func('rb_thread_call_without_gvl')
have_library("m")
have_library("rt")
have_library("pthread")

have_func("__mq_oshandle")
have_func("mq_timedsend")
have_func("mq_timedreceive")

r, w = IO.pipe
r.close
w.close
begin
  r.close
  $CPPFLAGS += ' -DIDEMPOTENT_IO_CLOSE=1'
rescue IOError
  $CPPFLAGS += ' -DIDEMPOTENT_IO_CLOSE=0'
end

create_makefile("posix_mq_ext")

git clone https://yhbt.net/ruby_posix_mq.git