Menu

#502 Patch --without-unicode build failure

build problems
closed-fixed
clisp (524)
5
2008-10-19
2008-10-18
Adam Warner
No

./configure --ignore-absence-of-libsigsegv --without-unicode && cd src && make

...

gcc -Igllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O -falign-functions=4 -I. -c pathname.c
pathname.d: In function ‘direntry_to_string’:
pathname.d:7199: error: ‘struct object_tab_’ has no member named ‘pathname_encoding’
pathname.d:7215: error: ‘struct symbol_tab_’ has no member named ‘S_pathname_encoding’
pathname.d:7226: error: ‘struct object_tab_’ has no member named ‘pathname_encoding’
pathname.d:7227: error: ‘struct object_tab_’ has no member named ‘pathname_encoding’
make: *** [pathname.o] Error 1

The build error was caused by this patch (repository is git://sbcl.boinkor.net/clisp):

commit 11823423cf3220ecc52f429a9fb217ba339abd5b
Author: sds <sds>
Date: Wed Jul 16 14:56:09 2008 +0000

DIRECTORY signals correctable errors on bad pathnames [1st draft]

This is my proposed patch:

diff --git a/src/pathname.d b/src/pathname.d
index 6fd2162..daea3e6 100644
--- a/src/pathname.d
+++ b/src/pathname.d
@@ -7194,6 +7194,7 @@ local void handle_directory_encoding_error /* cf. enter_frame_at_STACK */
}
local maygc object direntry_to_string (char* string, int len) {
if (asciz_equal(string,".") || asciz_equal(string,"..")) return NIL;
+#ifdef UNICODE
var gcv_object_t *stack_save = STACK;
len = (len == -1 ? asciz_length(string) : len);
var object encoding = O(pathname_encoding);
@@ -7226,6 +7227,9 @@ local maygc object direntry_to_string (char* string, int len) {
encoding = check_encoding(value1,&O(pathname_encoding),false);
if (eq(T,value2)) O(pathname_encoding) = encoding; /* STORE-VALUE restart */
goto restart_direntry_to_string;
+#else
+ n_char_to_string(string,len,O(pathname_encoding));
+#endif
}

/* Scans an entire directory.

I assume that a directory encoding error cannot occur with CLISP built for 8-bit characters since such builds do not implement character encodings. Reference:
<http://permalink.gmane.org/gmane.lisp.clisp.devel/16305>

Discussion

  • Sam Steingold

    Sam Steingold - 2008-10-19

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2008-10-19
    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     

Log in to post a comment.