Ruby  2.5.0dev(2017-10-22revision60238)
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
60 #endif
61 
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
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
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
90 #endif
91  "";
92 
#define RUBY_SITEARCH
Definition: loadpath.c:23
#define RUBY_SITE_LIB2
Definition: loadpath.c:46
#define RUBY_LIB
Definition: verconf.h:8
const char ruby_exec_prefix[]
Definition: loadpath.c:59
#define RUBY_VENDOR_LIB2
Definition: loadpath.c:47
#define RUBY_SITE_LIB
Definition: verconf.h:10
#define RUBY_SITE_ARCH_LIB_FOR(arch)
Definition: verconf.h:11
char ruby_lib_version_string[(int) sizeof(RUBY_LIB_VERSION) - 2]
Definition: loadpath.c:41
#define RUBY_ARCH
Definition: loadpath.c:20
#define RUBY_ARCH_LIB_FOR(arch)
Definition: verconf.h:9
const char ruby_initial_load_paths[]
Definition: loadpath.c:62
#define RUBY_VENDOR_LIB
Definition: verconf.h:12
#define RUBY_VENDOR_ARCH_LIB_FOR(arch)
Definition: verconf.h:13
#define RUBY_EXEC_PREFIX
Definition: verconf.h:4