[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch for we_wind.c



Ok guys,

I've found the problem and attached is a patch you need to apply to
we_wind.c

strlen is a macro in glibc2, and therefore should NEVER be used as a
variable. I don't know why I wasted so much time until someone pointed out
that strlen was being used!

Patch as follows:
--- we_wind.c	Mon Sep 14 19:41:31 1998
+++ we_wind.c.orig	Mon Sep 14 19:40:55 1998
@@ -1268,7 +1268,7 @@
    return(ret);
 }
 
-int e_schr_lst_wsv(char *str, int xa, int ya, int n, int len, int ft,
+int e_schr_lst_wsv(char *str, int xa, int ya, int n, int strlen, int ft,
   int fz, struct dirfile **df, FENSTER *f)
 {
 #if MOUSE
@@ -1278,9 +1278,9 @@
    do
    {  *df = e_add_df(str, *df);
 #ifndef NEWSTYLE
-      ret = e_schreib_leiste(str, xa, ya, n-4, len, ft, fz);
+      ret = e_schreib_leiste(str, xa, ya, n-4, strlen, ft, fz);
 #else
-      ret = e_schreib_leiste(str, xa, ya, n-3, len, ft, fz);
+      ret = e_schreib_leiste(str, xa, ya, n-3, strlen, ft, fz);
 #endif
 #if MOUSE
       if(ret < 0 && e_mouse.y == ya && e_mouse.x >= xa+n-3

There you go.

Cheers,
Alex
--
 /\_/\  Legalise cannabis now! 
( o.o ) Grow some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk - *new* - rewritten for text browser users!

Linux tahallah 2.1.121 #40 Thu Sep 10 07:26:39 EDT 1998 i486 unknown

---------- Forwarded message ----------
Date: Mon, 14 Sep 1998 10:33:10 -0400 (EDT)
From: Alex Buell <alex.buell@tahallah.demon.co.uk>
Subject: Re: The glibc problem

On Mon, 14 Sep 1998, Dennis Payne wrote:

> I've gotten a few bounced messages from egcs people who have tried to
> copy the xwpe list on the problems Alex Buell has been having.  I haven't
> posted any because Alex has posted the highlight on solving the problem.
> This one, however, I thought should be posted.  (I've always thought using
> local variables with the same name as functions was a bad idea.)

The bug also occurs in glibc-2.0.95 (so we can eliminate the compiler as
the problem) - spent 6 hours building glibc last night on my sluggard
i486!  :o)

The temporary solution is to remove the -O2 option in the makefile for
we_wind.c and re-build. All should be well. 

I'll be reporting this to the glibc maintainers along with a well-aimed
kick in the butt with a suggestion that they stop using stupid hacks like
this.

I know I have had this problem with another piece of software (Lynx) and
complained about it last year but noone bothered to follow up (that is
pretty evident by the fact that the bug is still in 2.0.95!)

Cheers,
Alex.

---
 /\_/\  Legalise cannabis now! 
( o.o ) Grow some cannabis today! 
 > ^ <  Peace, Love, Unity and Respect to all.

Check out http://www.tahallah.demon.co.uk