libtool-patches
[Top][All Lists]
Advanced

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

HEAD: Assume C89 in test suite


From: Ralf Wildenhues
Subject: HEAD: Assume C89 in test suite
Date: Fri, 1 Sep 2006 07:26:29 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Autoconf made the move, I think it's now time that Libtool assume C89 in
its test suite.  OK?

Cheers,
Ralf
        Drop K&R support from testsuite in favor of C89.

        * tests/duplicate_members.at: provide declarations of used
        functions.
        * tests/testsuite.at: Drop unneeded arguments.
        * tests/cdemo/main.c: Assume C89.
        * tests/demo/dlmain.c: Likewise.
        * tests/demo/main.c: Likewise.
        * tests/depdemo/main.c: Likewise.
        * tests/depdemo/l1/l1.c: Likewise.
        * tests/depdemo/l2/l2.c: Likewise.
        * tests/depdemo/l3/l3.c: Likewise.
        * tests/depdemo/l4/l4.c: Likewise.
        * tests/f77demo/cprogram.c: Likewise.
        * tests/fcdemo/cprogram.c: Likewise.
        * tests/mdemo/mlib.c: Likewise.
        * tests/mdemo2/main.c: Likewise.
        * tests/pdemo/longer_file_name_dlmain.c: Likewise.
        * tests/pdemo/longer_file_name_main.c: Likewise.
        * tests/fcdemo/fooc.c: Reformat.
        * tests/mdemo/sub.c: Likewise.

Index: tests/duplicate_members.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/duplicate_members.at,v
retrieving revision 1.5
diff -u -r1.5 duplicate_members.at
--- tests/duplicate_members.at  5 Feb 2006 09:56:44 -0000       1.5
+++ tests/duplicate_members.at  1 Sep 2006 05:25:51 -0000
@@ -27,8 +27,9 @@
 LIBTOOL=./libtool
 
 AT_DATA(bar.c,
-[[int bar() {
-    int result=foo1() +foo2() +foo3() +foo4() +foo5() +foo6();
+[[extern int foo1 (), foo2 (), foo3 (), foo4 (), foo5 (), foo6 ();
+int bar() {
+    int result = foo1 () + foo2 () + foo3 () + foo4 () + foo5 () + foo6 ();
     return result;
 }
 ]])
Index: tests/testsuite.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/testsuite.at,v
retrieving revision 1.42
diff -u -r1.42 testsuite.at
--- tests/testsuite.at  12 Jun 2006 17:54:15 -0000      1.42
+++ tests/testsuite.at  1 Sep 2006 05:25:51 -0000
@@ -179,7 +179,7 @@
 #include "ltdl.h"
 
 int
-main (int argc, char **argv)
+main ()
 {
   lt_dlhandle module;
   const char *(*func) (void) = 0;
Index: tests/cdemo/main.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/cdemo/main.c,v
retrieving revision 1.2
diff -u -r1.2 main.c
--- tests/cdemo/main.c  22 Apr 2005 10:10:30 -0000      1.2
+++ tests/cdemo/main.c  1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* main.c -- cdemo test program
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2006 Free Software Foundation, Inc.
    Originally by Thomas Tanner <address@hidden>
    This file is part of GNU Libtool.
 
@@ -23,9 +23,7 @@
 
 
 int
-main (argc,argv)
-  int argc;
-  char **argv;
+main ()
 {
   int value;
 
Index: tests/demo/dlmain.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo/dlmain.c,v
retrieving revision 1.3
diff -u -r1.3 dlmain.c
--- tests/demo/dlmain.c 22 Apr 2005 10:10:31 -0000      1.3
+++ tests/demo/dlmain.c 1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* dlmain.c -- hello test program that uses simulated dynamic linking
-   Copyright (C) 1996-1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999, 2004, 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -35,9 +35,7 @@
 extern const struct lt_symlist lt_preloaded_symbols[];
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main ()
 {
   const struct lt_symlist *s;
   int (*pfoo)() = 0;
Index: tests/demo/main.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo/main.c,v
retrieving revision 1.2
diff -u -r1.2 main.c
--- tests/demo/main.c   22 Apr 2005 10:10:31 -0000      1.2
+++ tests/demo/main.c   1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* main.c -- trivial hello test program
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999, 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -22,9 +22,7 @@
 #include <stdio.h>
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main ()
 {
   printf ("Welcome to GNU Hell!\n");
 
Index: tests/depdemo/main.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/main.c,v
retrieving revision 1.2
diff -u -r1.2 main.c
--- tests/depdemo/main.c        22 Apr 2005 10:10:31 -0000      1.2
+++ tests/depdemo/main.c        1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* main.c -- inter-library dependency test program
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation
+   Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation
    by Thomas Tanner <address@hidden>
    This file is part of GNU Libtool.
 
@@ -25,9 +25,7 @@
 #include <string.h>
 
 int
-main (argc,argv)
-    int argc;
-    char **argv;
+main (int argc, char **argv)
 {
   printf("dependencies:\n");
   func_l1(0);
Index: tests/depdemo/l1/l1.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/l1/l1.c,v
retrieving revision 1.2
diff -u -r1.2 l1.c
--- tests/depdemo/l1/l1.c       22 Apr 2005 10:10:31 -0000      1.2
+++ tests/depdemo/l1/l1.c       1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,6 @@
 /* l1.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <address@hidden>
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -23,8 +24,7 @@
 int    var_l1 = 0;
 
 int
-func_l1(indent)
-    int indent;
+func_l1 (int indent)
 {
   int i;
 
Index: tests/depdemo/l2/l2.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/l2/l2.c,v
retrieving revision 1.2
diff -u -r1.2 l2.c
--- tests/depdemo/l2/l2.c       22 Apr 2005 10:10:31 -0000      1.2
+++ tests/depdemo/l2/l2.c       1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,6 @@
 /* l2.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <address@hidden>
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -25,8 +26,7 @@
 int    var_l2 = 0;
 
 int
-func_l2(indent)
-    int indent;
+func_l2 (int indent)
 {
   int i;
 
Index: tests/depdemo/l3/l3.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/l3/l3.c,v
retrieving revision 1.2
diff -u -r1.2 l3.c
--- tests/depdemo/l3/l3.c       22 Apr 2005 10:10:31 -0000      1.2
+++ tests/depdemo/l3/l3.c       1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,6 @@
 /* l3.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <address@hidden>
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -26,8 +27,7 @@
 int    var_l3 = 0;
 
 int
-func_l3(indent)
-    int indent;
+func_l3 (int indent)
 {
   int i;
 
Index: tests/depdemo/l4/l4.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/l4/l4.c,v
retrieving revision 1.2
diff -u -r1.2 l4.c
--- tests/depdemo/l4/l4.c       22 Apr 2005 10:10:31 -0000      1.2
+++ tests/depdemo/l4/l4.c       1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,6 @@
 /* l4.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <address@hidden>
+   Copyright (C) 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -29,8 +30,7 @@
 int    var_l4 = 0;
 
 int
-func_l4(indent)
-    int indent;
+func_l4 (int indent)
 {
   int i;
 
Index: tests/f77demo/cprogram.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/cprogram.c,v
retrieving revision 1.3
diff -u -r1.3 cprogram.c
--- tests/f77demo/cprogram.c    27 Apr 2005 14:15:29 -0000      1.3
+++ tests/f77demo/cprogram.c    1 Sep 2006 05:25:51 -0000
@@ -1,4 +1,7 @@
-/*
+/* cprogram.c
+   Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+   This file is part of GNU Libtool.
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
@@ -18,7 +21,7 @@
 #include <stdio.h>
 
 int
-main(int argc, char **argv)
+main ()
 {
   int arg,cres,fres;
   
Index: tests/fcdemo/cprogram.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/fcdemo/cprogram.c,v
retrieving revision 1.1
diff -u -r1.1 cprogram.c
--- tests/fcdemo/cprogram.c     8 Aug 2005 09:23:57 -0000       1.1
+++ tests/fcdemo/cprogram.c     1 Sep 2006 05:25:51 -0000
@@ -1,4 +1,7 @@
-/*
+/* cprogram.c
+   Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+   This file is part of GNU Libtool.
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
@@ -18,28 +21,28 @@
 #include <stdio.h>
 
 int
-main(int argc, char **argv)
+main ()
 {
   int arg,cres,fres;
   
   printf ("Welcome to GNU libtool mixed C/Fortran demo!\n");
   
-  arg=2;
+  arg = 2;
   
-  cres=csub(arg);
+  cres = csub (arg);
   
   printf ("The C subroutine returned, claiming that 2*%d = %d\n",arg,cres);
   
-  if(cres==2*arg)
+  if (cres == 2*arg)
     printf ("The C subroutine is ok!\n");
   
-  printf("\nCalling the C wrapper routine...\n");
-  fres=fwrapper(arg);
+  printf ("\nCalling the C wrapper routine...\n");
+  fres = fwrapper (arg);
   
   printf ("The C wrapper to the fortran subroutine returned,\n"
          "claiming that 2*%d = %d\n",arg,fres);
   
-  if(fres==2*arg)
+  if (fres == 2*arg)
     printf ("The Fortran subroutine is ok!\n");
   
   return 0;
Index: tests/fcdemo/fooc.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/fcdemo/fooc.c,v
retrieving revision 1.1
diff -u -r1.1 fooc.c
--- tests/fcdemo/fooc.c 8 Aug 2005 09:23:57 -0000       1.1
+++ tests/fcdemo/fooc.c 1 Sep 2006 05:25:51 -0000
@@ -1,13 +1,13 @@
 #include "foo.h"
 #include <stdio.h>
 
-int csub(int arg)
+int csub (int arg)
 {
-  return (2*arg);
+  return 2*arg;
 }
 
 
-int fwrapper(int arg)
+int fwrapper (int arg)
 {
   int res;
   printf("Calling the Fortran subroutine from the C wrapper...\n");
Index: tests/mdemo/mlib.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo/mlib.c,v
retrieving revision 1.2
diff -u -r1.2 mlib.c
--- tests/mdemo/mlib.c  22 Apr 2005 10:10:31 -0000      1.2
+++ tests/mdemo/mlib.c  1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
-/* main.c -- mlib library
-   Copyright (C) 2002 Free Software Foundation, Inc.
+/* mlib.c -- mlib library
+   Copyright (C) 2002, 2006 Free Software Foundation, Inc.
    Originally by greg Eisenhauer <eisen at cc.gatech.edu>
    Extracted from mdemo.c
    This file is part of GNU Libtool.
@@ -24,8 +24,7 @@
 #include <stdio.h>
 
 int
-test_dl (filename)
-  char *filename;
+test_dl (char *filename)
 {
   lt_dlhandle handle;  
   const lt_dlinfo *info;
@@ -109,10 +108,9 @@
   lt_dlclose(handle);
   return ret;
 }
+
 int 
-mlib_func(argc, argv)
-int argc;
-char **argv;
+mlib_func (int argc, char **argv)
 {
   int ret = 0;
   int i;
Index: tests/mdemo/sub.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo/sub.c,v
retrieving revision 1.2
diff -u -r1.2 sub.c
--- tests/mdemo/sub.c   22 Apr 2005 10:10:31 -0000      1.2
+++ tests/mdemo/sub.c   1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* sub.c -- trivial test library
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2006 Free Software Foundation, Inc.
    Originally by Thomas Tanner <address@hidden>
    This file is part of GNU Libtool.
 
@@ -21,7 +21,7 @@
 #include <stdio.h>
 
 void
-sub()
+sub ()
 {
   printf ("sub() called\n");
 }
Index: tests/mdemo2/main.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo2/main.c,v
retrieving revision 1.5
diff -u -r1.5 main.c
--- tests/mdemo2/main.c 27 Apr 2005 14:15:29 -0000      1.5
+++ tests/mdemo2/main.c 1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* main.c -- mdemo2 test program
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    Originally by Greg Eisenhauer < eisen at cc.gatech.edu >
    This file is part of GNU Libtool.
 
@@ -21,12 +21,10 @@
 #include <stdio.h>
 #include "ltdl.h"
 
-extern int mlib_func();
+extern int mlib_func (int, char **);
 
 int
-main (argc, argv)
-  int argc;
-  char **argv;
+main (int argc, char **argv)
 {
   int ret = 0;
 
Index: tests/pdemo/longer_file_name_dlmain.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/pdemo/longer_file_name_dlmain.c,v
retrieving revision 1.3
diff -u -r1.3 longer_file_name_dlmain.c
--- tests/pdemo/longer_file_name_dlmain.c       22 Apr 2005 10:10:31 -0000      
1.3
+++ tests/pdemo/longer_file_name_dlmain.c       1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* dlmain.c -- hello test program that uses simulated dynamic linking
-   Copyright (C) 1996-1999, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999, 2004, 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -35,9 +35,7 @@
 extern const struct lt_symlist lt_preloaded_symbols[];
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   const struct lt_symlist *s;
   int (*pfoo)() = 0;
Index: tests/pdemo/longer_file_name_main.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/pdemo/longer_file_name_main.c,v
retrieving revision 1.2
diff -u -r1.2 longer_file_name_main.c
--- tests/pdemo/longer_file_name_main.c 22 Apr 2005 10:10:31 -0000      1.2
+++ tests/pdemo/longer_file_name_main.c 1 Sep 2006 05:25:51 -0000
@@ -1,5 +1,5 @@
 /* main.c -- trivial hello test program
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999, 2006 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
@@ -22,9 +22,7 @@
 #include <stdio.h>
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main ()
 {
   printf ("Welcome to GNU Hell!\n");
 




reply via email to

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