- From: <Irene.Vatton@inrialpes.fr>
- Date: Tue, 04 Jan 2000 14:32:38 +0100
- To: Ovidiu Toader <ovi@physics.utoronto.ca>
- cc: www-amaya-dev@w3.org
Hi Ovidiu,
Thanks a lot for the bug fix. It's integrated now.
Irene.
In-reply-to: Your message of Sun, 02 Jan 2000 15:00:55 -0500."
<386FAE77.806B6A24@physics.utoronto.ca>
> Hi,
>
> I am running amaya (last cvs update was done yesterday) on a linux alpha
> machine. I found the following problem in tothlib/base/registry.c
> (around line 1500):
>
> #if 0
> if (lstat (execname, &stat_buf) == 0 && S_ISLNK (stat_buf.st_mode)) {
> len = readlink (execname, filename, sizeof (filename));
> if (len > 0) {
> filename[len] = 0;
> /*
> * Two cases : can be an absolute link to the binary
> * or a relative link.
> */
> if (filename[0] == DIR_SEP)
> ustrcpy (execname, filename);
> else
> ustrcpy (dir_end + 1, filename);
> }
> }
> #endif
> while (lstat (execname, &stat_buf) == 0 && S_ISLNK
> (stat_buf.st_mode)) {
> len = readlink (execname, filename, sizeof (filename));
> if (len > 0) {
> filename[len] = 0;
> /*
> * Two cases : can be an absolute link to the binary
> * or a relative link.
> */
> if (filename[0] == DIR_SEP){
> ustrcpy (execname, filename);
> dir_end = &execname[0];
> while (*dir_end++); /* go to the ending NUL */
> while (dir_end > execname && *dir_end != DIR_SEP){dir_end--;}
> }else{
> ustrcpy (dir_end + 1, filename);
> }
> }
> }
>
> The #if 0 ... endif region is the original code, what follows is the
> fix.
>
> The bug is triggered when more than 2 links are needed to get from amaya
> to the actual executable. In my case the path is like this:
> /usr/local/bin/amaya->/usr/local/Packages/www/Amaya/install/bin/amaya->/usr/local/Packages/www/Amaya/install/Amaya/applis/bin/amaya
>
> The original code follows no more than a single soft link and causes
> amaya to report something like:
> System wide unix-thot.rc not found at
> /usr/local/Packages/Amaya/Amaya/config/unix-thot.rc
> missing environment variable THOTDIR
> WARNING: cannot open file en-libdialogue
> cannot find messages table
>
> The small modifications made to the original code solve this problem and
> they appear not to interfere with the rest of the code.
>
> --
> Ovidiu
Received on Tuesday, 4 January 2000 08:32:45 UTC