pan-users
[Top][All Lists]
Advanced

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

[Pan-users] [patch] building with gcc34


From: Jens Petersen
Subject: [Pan-users] [patch] building with gcc34
Date: Thu, 11 Mar 2004 11:33:46 +0900
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.4 (Hosorogi) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-redhat-linux)

Here's a patch from Jeff Law to help build pan with gcc 3.4
and later.

Cheers, Jens


--- Begin Message --- Subject: Minor bugs in pan Date: Wed, 10 Mar 2004 12:56:27 -0700
pan is relying upon the long deprecated and recently removed
cast-as-lvalue GCC extension.  Thus it will not build with modern
versions of GCC (3.4 will give a warning, 3.5 will give an error).

This patch (or something similar) ought to take care of the problem.

*** pan-0.14.2/pan/base/msort.c.ORIG    2004-03-10 12:45:16.830099560 -0700
--- pan-0.14.2/pan/base/msort.c 2004-03-10 12:46:47.125372592 -0700
*************** msort_with_tmp (
*** 65,78 ****
                        if ((*cmp) (b1, b2) <= 0)
                        {
                                --n1;
!                               *((unsigned long int *) tmp)++ =
!                                       *((unsigned long int *) b1)++;
                        }
                        else
                        {
                                --n2;
!                               *((unsigned long int *) tmp)++ =
!                                       *((unsigned long int *) b2)++;
                        }
                }
        else
--- 65,82 ----
                        if ((*cmp) (b1, b2) <= 0)
                        {
                                --n1;
!                               *((unsigned long int *) tmp) =
!                                       *((unsigned long int *) b1);
!                               tmp = ((unsigned long int *)tmp) + 1;
!                               b1 = ((unsigned long int *)b1) + 1;
                        }
                        else
                        {
                                --n2;
!                               *((unsigned long int *) tmp) =
!                                       *((unsigned long int *) b2);
!                               tmp = ((unsigned long int *)tmp) + 1;
!                               b1 = ((unsigned long int *)b1) + 1;
                        }
                }
        else



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]