public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Add "." to %load-path for guile 1.8.
@ 2009-06-07 22:37 Doug Evans
  0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2009-06-07 22:37 UTC (permalink / raw)
  To: cgen

Hi.

Guile 1.8 removed "." from %load-path so "guile -s ../relative/path/foo.scm"
no longer works, and this breaks cgen.

Tested with guile 1.4.1 and 1.8.5 on m32r binutils.

If someone has a strong opinion on solving this differently,
please speak up.

[For completeness' sake,
While I myself trip over the "info" command's distinction between
"info -f foo" and "info -f ./foo" from time to time, I wonder if
Guile shouldn't treat relative paths separately as well.  But we still
have to cope with 1.8.x of course.]

2009-06-05  Doug Evans  <dje@sebabeach.org>

	* guile.scm: Add "." to %load-path if >= guile version 1.8.

Index: guile.scm
===================================================================
RCS file: /cvs/src/src/cgen/guile.scm,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 guile.scm
--- guile.scm	15 Feb 2005 09:03:59 -0000	1.3
+++ guile.scm	7 Jun 2009 22:25:35 -0000
@@ -64,6 +64,13 @@
        objs)
   (newline (current-error-port)))
 
+;; Guile 1.8 no longer has "." in %load-path so relative path loads
+;; no longer work.
+
+(if (or (> *guile-major-version* 1)
+	(>= *guile-minor-version* 8))
+    (set! %load-path (append %load-path (list ".")))
+)
 
 \f
 ;;; Enabling and disabling debugging features of the host Scheme.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-07 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-07 22:37 [RFA] Add "." to %load-path for guile 1.8 Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).