Ruby
2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
loadpath.c
Go to the documentation of this file.
1
/**********************************************************************
2
3
loadpath.c -
4
5
$Author$
6
created at: Wed May 15 14:19:50 JST 2013
7
8
Copyright (C) 2013 Yukihiro Matsumoto
9
10
**********************************************************************/
11
12
#include "
verconf.h
"
13
#include "
ruby/ruby.h
"
14
15
/* Define RUBY_REVISION to avoid revision.h inclusion via version.h. */
16
#define RUBY_REVISION 0
17
#include "
version.h
"
18
19
#ifndef RUBY_ARCH
20
#define RUBY_ARCH RUBY_PLATFORM
21
#endif
22
#ifndef RUBY_SITEARCH
23
#define RUBY_SITEARCH RUBY_ARCH
24
#endif
25
#ifdef RUBY_PLATFORM_CPU
26
#define RUBY_THINARCH RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
27
#endif
28
#ifndef RUBY_LIB_PREFIX
29
#ifndef RUBY_EXEC_PREFIX
30
#error RUBY_EXEC_PREFIX must be defined
31
#endif
32
#define RUBY_LIB_PREFIX RUBY_EXEC_PREFIX"/lib/ruby"
33
#endif
34
#ifndef RUBY_SITE_LIB
35
#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby"
36
#endif
37
#ifndef RUBY_VENDOR_LIB
38
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
39
#endif
40
41
typedef
char
ruby_lib_version_string
[(
int
)
sizeof
(RUBY_LIB_VERSION) - 2];
42
43
#ifndef RUBY_LIB
44
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
45
#endif
46
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
47
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
48
#ifndef RUBY_ARCH_LIB_FOR
49
#define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch
50
#endif
51
#ifndef RUBY_SITE_ARCH_LIB_FOR
52
#define RUBY_SITE_ARCH_LIB_FOR(arch) RUBY_SITE_LIB2 "/"arch
53
#endif
54
#ifndef RUBY_VENDOR_ARCH_LIB_FOR
55
#define RUBY_VENDOR_ARCH_LIB_FOR(arch) RUBY_VENDOR_LIB2 "/"arch
56
#endif
57
58
#if !defined(LOAD_RELATIVE) || !LOAD_RELATIVE
59
const
char
ruby_exec_prefix
[] =
RUBY_EXEC_PREFIX
;
60
#endif
61
62
const
char
ruby_initial_load_paths
[] =
63
#ifndef NO_INITIAL_LOAD_PATH
64
#ifdef RUBY_SEARCH_PATH
65
RUBY_SEARCH_PATH
"\0"
66
#endif
67
#ifndef NO_RUBY_SITE_LIB
68
RUBY_SITE_LIB2
"\0"
69
#ifdef RUBY_THINARCH
70
RUBY_SITE_ARCH_LIB_FOR
(RUBY_THINARCH)
"\0"
71
#endif
72
RUBY_SITE_ARCH_LIB_FOR
(
RUBY_SITEARCH
)
"\0"
73
RUBY_SITE_LIB
"\0"
74
#endif
75
76
#ifndef NO_RUBY_VENDOR_LIB
77
RUBY_VENDOR_LIB2
"\0"
78
#ifdef RUBY_THINARCH
79
RUBY_VENDOR_ARCH_LIB_FOR
(RUBY_THINARCH)
"\0"
80
#endif
81
RUBY_VENDOR_ARCH_LIB_FOR
(
RUBY_SITEARCH
)
"\0"
82
RUBY_VENDOR_LIB
"\0"
83
#endif
84
85
RUBY_LIB
"\0"
86
#ifdef RUBY_THINARCH
87
RUBY_ARCH_LIB_FOR
(RUBY_THINARCH)
"\0"
88
#endif
89
RUBY_ARCH_LIB_FOR
(
RUBY_ARCH
)
"\0"
90
#endif
91
""
;
RUBY_LIB
#define RUBY_LIB
Definition:
verconf.h:8
ruby_initial_load_paths
const char ruby_initial_load_paths[]
Definition:
loadpath.c:62
version.h
ruby.h
RUBY_SITE_ARCH_LIB_FOR
#define RUBY_SITE_ARCH_LIB_FOR(arch)
Definition:
verconf.h:11
RUBY_ARCH
#define RUBY_ARCH
Definition:
loadpath.c:20
RUBY_SITE_LIB
#define RUBY_SITE_LIB
Definition:
verconf.h:10
RUBY_VENDOR_LIB2
#define RUBY_VENDOR_LIB2
Definition:
loadpath.c:47
verconf.h
ruby_lib_version_string
char ruby_lib_version_string[(int) sizeof(RUBY_LIB_VERSION) - 2]
Definition:
loadpath.c:41
RUBY_SITE_LIB2
#define RUBY_SITE_LIB2
Definition:
loadpath.c:46
RUBY_SITEARCH
#define RUBY_SITEARCH
Definition:
loadpath.c:23
int
__inline__ int
Definition:
rb_mjit_min_header-2.7.1.h:2839
RUBY_VENDOR_LIB
#define RUBY_VENDOR_LIB
Definition:
verconf.h:12
ruby_exec_prefix
const char ruby_exec_prefix[]
Definition:
loadpath.c:59
RUBY_ARCH_LIB_FOR
#define RUBY_ARCH_LIB_FOR(arch)
Definition:
verconf.h:9
RUBY_EXEC_PREFIX
#define RUBY_EXEC_PREFIX
Definition:
verconf.h:4
RUBY_VENDOR_ARCH_LIB_FOR
#define RUBY_VENDOR_ARCH_LIB_FOR(arch)
Definition:
verconf.h:13
Generated by
1.8.17