mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 14:30:34 +02:00
make the fallback path look less like line noise
* libguile/_scm.h: * libguile/load.c: Rework to only include the relevant pieces in the fallback path.
This commit is contained in:
parent
86cfb42d56
commit
6e5c02b8a3
2 changed files with 16 additions and 3 deletions
|
@ -170,9 +170,21 @@
|
||||||
/* The word size marker in objcode. */
|
/* The word size marker in objcode. */
|
||||||
#define SCM_OBJCODE_WORD_SIZE SCM_CPP_STRINGIFY (SIZEOF_VOID_P)
|
#define SCM_OBJCODE_WORD_SIZE SCM_CPP_STRINGIFY (SIZEOF_VOID_P)
|
||||||
|
|
||||||
|
// major and minor versions must be single characters
|
||||||
|
#define SCM_OBJCODE_MAJOR_VERSION 0
|
||||||
|
#define SCM_OBJCODE_MINOR_VERSION A
|
||||||
|
#define SCM_OBJCODE_MAJOR_VERSION_STRING \
|
||||||
|
SCM_CPP_STRINGIFY(SCM_OBJCODE_MAJOR_VERSION)
|
||||||
|
#define SCM_OBJCODE_MINOR_VERSION_STRING \
|
||||||
|
SCM_CPP_STRINGIFY(SCM_OBJCODE_MINOR_VERSION)
|
||||||
|
#define SCM_OBJCODE_VERSION_STRING \
|
||||||
|
SCM_OBJCODE_MAJOR_VERSION_STRING "." SCM_OBJCODE_MINOR_VERSION_STRING
|
||||||
|
#define SCM_OBJCODE_MACHINE_VERSION_STRING \
|
||||||
|
SCM_OBJCODE_VERSION_STRING "-" SCM_OBJCODE_ENDIANNESS "-" SCM_OBJCODE_WORD_SIZE
|
||||||
|
|
||||||
/* The objcode magic header. */
|
/* The objcode magic header. */
|
||||||
#define SCM_OBJCODE_COOKIE \
|
#define SCM_OBJCODE_COOKIE \
|
||||||
"GOOF-0.9-" SCM_OBJCODE_ENDIANNESS "-" SCM_OBJCODE_WORD_SIZE "---"
|
"GOOF-" SCM_OBJCODE_MACHINE_VERSION_STRING "---"
|
||||||
|
|
||||||
|
|
||||||
#endif /* SCM__SCM_H */
|
#endif /* SCM__SCM_H */
|
||||||
|
|
|
@ -253,7 +253,8 @@ scm_init_load_path ()
|
||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FALLBACK_DIR "guile/ccache/"SCM_EFFECTIVE_VERSION"/"SCM_OBJCODE_COOKIE
|
#define FALLBACK_DIR \
|
||||||
|
"guile/ccache/" SCM_EFFECTIVE_VERSION "-" SCM_OBJCODE_MACHINE_VERSION_STRING
|
||||||
|
|
||||||
if ((e = getenv ("XDG_CACHE_HOME")))
|
if ((e = getenv ("XDG_CACHE_HOME")))
|
||||||
snprintf (cachedir, sizeof(cachedir), "%s" FALLBACK_DIR, e);
|
snprintf (cachedir, sizeof(cachedir), "%s" FALLBACK_DIR, e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue