Ruby  3.4.0dev (2024-11-22 revision 0989400a925cd201defdca9eb28eb87200b30785)
off_t.h
Go to the documentation of this file.
1 #ifndef RBIMPL_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_ARITHMETIC_OFF_T_H
23 #include "ruby/internal/config.h"
28 
30 #ifdef OFFT2NUM
31 # /* take that. */
32 #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
33 # define OFFT2NUM RB_LL2NUM
34 #elif SIZEOF_OFF_T == SIZEOF_LONG
35 # define OFFT2NUM RB_LONG2NUM
36 #else
37 # define OFFT2NUM RB_INT2NUM
38 #endif
39 
41 #ifdef NUM2OFFT
42 # /* take that. */
43 #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
44 # define NUM2OFFT RB_NUM2LL
45 #elif SIZEOF_OFF_T == SIZEOF_LONG
46 # define NUM2OFFT RB_NUM2LONG
47 #else
48 # define NUM2OFFT RB_NUM2INT
49 #endif
50 
52 #ifdef PRI_OFFT_PREFIX
53 # /* take that. */
54 #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
55 # define PRI_OFFT_PREFIX PRI_LL_PREFIX
56 #elif SIZEOF_OFF_T == SIZEOF_LONG
57 # define PRI_OFFT_PREFIX PRI_LONG_PREFIX
58 #else
59 # define PRI_OFFT_PREFIX PRI_INT_PREFIX
60 #endif
61 
62 #endif /* RBIMPL_ARITHMETIC_OFF_T_H */
Defines old LONG_LONG.
Arithmetic conversion between C's int and Ruby's.
Arithmetic conversion between C's long long and Ruby's.
Arithmetic conversion between C's long and Ruby's.