bug-findutils
[Top][All Lists]
Advanced

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

Re: findutils-4.2.0: small compiling problem under AIX 4.3


From: Jens Schleusener
Subject: Re: findutils-4.2.0: small compiling problem under AIX 4.3
Date: Mon, 18 Oct 2004 12:15:11 +0200 (DFT)

Hi James,

Sorry, bad news - it didn't help (I used a freshly extracted
findutils-4.2.1.tar.gz with the new "configure" script), same error:

 source='parser.c' object='parser.o' libtool=no \
 depfile='.deps/parser.Po' tmpdepfile='.deps/parser.TPo' \
 depmode=gcc /bin/sh ../depcomp \
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../lib -I../gnulib/lib
 -I../intl -DLOCALEDIR=\"/usr/local/contrib/share/locale\"  -g -O2 -c
 `test -f 'parser.c' || echo './'`parser.c
 parser.c: In function `insert_time':
 parser.c:1682: parse error before `val'
 parser.c:1684: `val' undeclared (first use in this function)

Here are the diffs of the configure runs (< new, > old):

 < checking for stdint.h... (cached) no
 130,131c129
 < ./configure[8595]: gl_FUNC_ALLOCA:  not found
 < checking for long long... yes
 ---
> ./configure[8583]: gl_XALLOC:  not found
 140a139
> checking for long long... yes

Drat.  Here is a less horrid workaround.  Start with the original
4.2.1 distribution.  Run "configure" as normal.  Then edit
"findutils-4.2.1/config.h" and use a text editor add the line

#define intmax_t long long

(or alternatively "typedef long long intmax_t")

It  doesn't matter  where in  the  file you  put it,  but I'd  suggest
putting it at the bottom.  You may also need to perform a similar edit
in findutils-4.2.1/gnulib/config.h.

To make a better job of fixing this (i.e. making it work out of the
box) I would need access to an AIX 4.3 system, which I currently don't
have.

Sorry, I am now very short in time. A first attempt with your first suggestion (in findutils-4.2.1/config.h and findutils-4.2.1/gnulib/config.h) wasn't successful. I will try tommorow also your second suggestion.

I "played" a little bit with different variations and had success with the following change (using original findutils-4.2.1.tar.gz):

--- parser.c.orig       2004-10-17 16:10:16 +0200
+++ parser.c    2004-10-18 11:31:32 +0200
@@ -1669,6 +1669,7 @@
   uintmax_t num_days;
   enum comparison_type c_type;
   time_t t;
+  intmax_t val;

   if ((argv == NULL) || (argv[*arg_ptr] == NULL))
     return (false);
@@ -1679,7 +1680,7 @@
   t = ( cur_day_start - num_days * DAYSECS
                   + ((c_type == COMP_GT) ? DAYSECS - 1 : 0));
 #if 1
-  intmax_t val = ( (intmax_t)cur_day_start - num_days * DAYSECS
+  val = ( (intmax_t)cur_day_start - num_days * DAYSECS
                   + ((c_type == COMP_GT) ? DAYSECS - 1 : 0));
   t = val;


But as I mentioned before I am NOT a C expert and don't really know what I have done!

Greetings

Jens

--
Dr. Jens Schleusener            T-Systems Solutions for Research GmbH
Tel: +49 551 709-2493           Bunsenstr.10
Fax: +49 551 709-2169           D-37073 Goettingen
address@hidden  http://www.t-systems.com/




reply via email to

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