On 20/12/06, Till Wimmer <[EMAIL PROTECTED]> wrote:
i'd like to compile the latest parted version for a old linux wiht glibc 2.2.5 and gcc 2.95.3, but i get a parse error: arch/linux.c: In function `init_dasd': arch/linux.c:972: parse error before `*' arch/linux.c:984: `arch_specific' undeclared (first use in this function) arch/linux.c:984: (Each undeclared identifier is reported only once arch/linux.c:984: for each function it appears in.)
It's a very strange bahaviour. The code in question is here: if (!_device_stat (dev, &dev_stat)) goto error; if (!ped_device_open (dev)) goto error; LinuxSpecific *arch_specific = LINUX_SPECIFIC (dev);
Actually I think I see what the problem is. The line with "LinuxSpecific *arch_specific ..." is a variable declaration. Traditionally C have required these to be placed only at the beginning of the function, but the 1999 version of the C standard allowed to place them anywhere in the code like in C++. The old version of gcc you are using are not accepting this. Try changing the code to the following: LinuxSpecific *arch_specific; if (!_device_stat (dev, &dev_stat)) goto error; if (!ped_device_open (dev)) goto error; arch_specific = LINUX_SPECIFIC (dev);
Is there a way to compile a static version of parted? Or maybe someone could send me a binary linekd aganist glibc 2.2?
You could try with the statifier tool, http://statifier.sourceforge.net/. BR Håkon Løvdal
_______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted