]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
stdc fix from paul eggert
authorTom Tromey <tromey@redhat.com>
Thu, 25 Sep 1997 05:44:17 +0000 (05:44 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 25 Sep 1997 05:44:17 +0000 (05:44 +0000)
ChangeLog
THANKS
automake.texi
m4/ccstdc.m4

index 6d6b516fd75b662b6ea1c72d485ed2ee7c188ad0..e3bd8f0530e608a1d182667f400e49018e37d00e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 12 00:04:19 1997  Paul Eggert  <eggert@twinsun.com>
+
+       * m4/ccstdc.m4 (AM_PROG_CC_STDC): Don't look at __STDC__;
+       look only at whether function prototypes are supported.
+
 Wed Sep 24 16:10:37 1997  Tom Tromey  <tromey@cygnus.com>
 
        * Various: Put "-" before each `rm' line.  This avoids a bug in
diff --git a/THANKS b/THANKS
index 5c52081357a4c14b315d291656540589751489bd..7fdaec80b107c5766caf01f5e4b0f4a1665f782d 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -42,6 +42,7 @@ Markku Rossi <mtr@ngs.fi>
 Michael Brantley <Michael-Brantley@deshaw.com>
 Noah Friedman <friedman@gnu.ai.mit.edu>
 Nyul Laszlo <nyul@sol.cc.u-szeged.hu>
+Paul Eggert  <eggert@twinsun.com>
 Per Bothner <bothner@cygnus.com>
 Peter Mattis <petm@scam.XCF.Berkeley.EDU>
 Phil Nelson <phil@cs.wwu.edu>
index 0b5f256d49e5763f52cbfda839f2b703da6baf00..ce6dbbbd034a9664d93568657a140eb4a2bf329c 100644 (file)
@@ -1074,8 +1074,7 @@ variable @code{lispdir} to the full path to Emacs' site-lisp directory.
 If the C compiler in not in ANSI C mode by default, try to add an option
 to output variable @code{CC} to make it so.  This macro tries various
 options that select ANSI C on some system or another.  It considers the
-compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
-handles function prototypes correctly.
+compiler to be in ANSI C mode if it handles function prototypes correctly.
 
 If you use this macro, you should check after calling it whether the C
 compiler has been set to accept ANSI C; if not, the shell variable
index 0ff3a1373cb081846ee67dbbf92ca312e5fd6333..74e8c5e751003f53b0eb5592ff2ed7f35507233e 100644 (file)
@@ -11,8 +11,7 @@
 # If the C compiler in not in ANSI C mode by default, try to add an option
 # to output variable @code{CC} to make it so.  This macro tries various
 # options that select ANSI C on some system or another.  It considers the
-# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
-# handles function prototypes correctly.
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
 #
 # If you use this macro, you should check after calling it whether the C
 # compiler has been set to accept ANSI C; if not, the shell variable
@@ -39,18 +38,37 @@ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__
 do
   CC="$ac_save_CC $ac_arg"
   AC_TRY_COMPILE(
-[#if !defined(__STDC__) || __STDC__ != 1
-choke me
-#endif
-/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif
-], [
+[#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);};],
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+],
 [am_cv_prog_cc_stdc="$ac_arg"; break])
 done
 CC="$ac_save_CC"