[Top][All Lists]

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

Re: patch on AIX 5.1

From: Paul Eggert
Subject: Re: patch on AIX 5.1
Date: 09 Feb 2004 13:48:50 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden writes:

> Using patch-2.5.4
> on
> hartree_a $uname -a
> AIX hartree_a 1 5 000509724C00
> with the "C compiler for AIX version 6".
> The configure script fails to give the correct result.
> Firstly, it does the wrong thing for the C compiler. It picks
> up the C compiler as "cc" correctly, but then doesn't realise
> that it must add the flag "-qlanglvl=stdc99" or similar to 
> ensure ANSI compliance. This causes compilation to fail quite
> spectacularly.

Can you give more details about the spectacular failures?

"configure" compiles the following test program (used in patch 2.5.4's
configure script) with plain "cc", and apparently this works.  What
ANSI features does the rest of 'patch' use, that aren't in this
test program?

   #include <stdarg.h>
   #include <stdio.h>
   #include <sys/types.h>
   #include <sys/stat.h>
   /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
   struct buf { int x; };
   FILE * (*rcsopen) (struct buf *, struct stat *, int);
   static char *e (p, i)
           char **p;
           int i;
     return p[i];
   static char *f (char * (*g) (char **, int), char **p, ...)
     char *s;
     va_list v;
     va_start (v,p);
     s = g (p, va_arg (v,int));
     va_end (v);
     return s;
   int test (int i, double x);
   struct s1 {int (*f) (int a);};
   struct s2 {int (*f) (double a);};
   int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), 
int, int);
   int argc;
   char **argv;

   int main() {

   return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];

   ; return 0; }

> Secondly, and more subtly, it fails to set HAVE_STDLIB_H in 
> config.h.

Thanks; this should get fixed in the next 'patch' release, since it'll
use the new Autoconf which does this automatically.

reply via email to

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