diff options
author | Tony Theodore <tonyt@logyst.com> | 2013-03-03 14:13:36 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2013-03-03 14:13:36 (GMT) |
commit | c2b04c01758ab3e838cf0e16df192f7f377bc971 (patch) | |
tree | 24ac10b1a27b8c4bfd734f68178e75cee1a8dd73 /src | |
parent | 8de57b0d6d66a0db8144bd9dbeca103e695dbbc8 (diff) | |
download | mxe-c2b04c01758ab3e838cf0e16df192f7f377bc971.zip mxe-c2b04c01758ab3e838cf0e16df192f7f377bc971.tar.gz mxe-c2b04c01758ab3e838cf0e16df192f7f377bc971.tar.bz2 |
package guile: fix test program
Diffstat (limited to 'src')
-rw-r--r-- | src/guile-test.c | 13 | ||||
-rw-r--r-- | src/guile.mk | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/guile-test.c b/src/guile-test.c index fbfc577..77e95ae 100644 --- a/src/guile-test.c +++ b/src/guile-test.c @@ -3,8 +3,17 @@ * See index.html for further information. */ +#include <stdlib.h> +#include <stdio.h> #include <libguile.h> +# ifdef __STRICT_ANSI__ +int putenv (char *); +# endif + +#define xstr(s) str(s) +#define str(s) #s + static void inner_main(void *data, int argc, char *argv[]) { (void)data; @@ -15,6 +24,10 @@ static void inner_main(void *data, int argc, char *argv[]) int main(int argc, char *argv[]) { + char guile_load_path[40]; + snprintf(guile_load_path, sizeof guile_load_path, \ + "GUILE_LOAD_PATH=..\\share\\guile\\%s", xstr(GUILE_MAJOR_MINOR)); + putenv(guile_load_path); scm_boot_guile(argc, argv, inner_main, NULL); return 0; } diff --git a/src/guile.mk b/src/guile.mk index c9addbb..3a39c31 100644 --- a/src/guile.mk +++ b/src/guile.mk @@ -35,5 +35,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \ - `'$(TARGET)-pkg-config' guile-1.8 --cflags --libs` + `'$(TARGET)-pkg-config' guile-1.8 --cflags --libs` \ + -DGUILE_MAJOR_MINOR=$(call SHORT_PKG_VERSION,$(PKG)) endef |