]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Drop K&R support from testsuite in favor of C89.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 1 Sep 2006 16:19:56 +0000 (16:19 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 1 Sep 2006 16:19:56 +0000 (16:19 +0000)
* 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.

19 files changed:
ChangeLog
tests/cdemo/main.c
tests/demo/dlmain.c
tests/demo/main.c
tests/depdemo/l1/l1.c
tests/depdemo/l2/l2.c
tests/depdemo/l3/l3.c
tests/depdemo/l4/l4.c
tests/depdemo/main.c
tests/duplicate_members.at
tests/f77demo/cprogram.c
tests/fcdemo/cprogram.c
tests/fcdemo/fooc.c
tests/mdemo/mlib.c
tests/mdemo/sub.c
tests/mdemo2/main.c
tests/pdemo/longer_file_name_dlmain.c
tests/pdemo/longer_file_name_main.c
tests/testsuite.at

index 420f59c4337b6bda113185449e4b60b75a4a09d8..8f34d161356eff1cdd549a9f4a6137e481366e51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2006-09-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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.
+
 2006-08-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/mdemo/main.c: Fix bogus line in last patch.
index fb85e94ebfe8134c851a380061bfa9429ba8eafa..aa4bddc2df448fe30270d30a2b6c61a0817e9693 100644 (file)
@@ -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 <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -23,9 +23,7 @@ USA. */
 
 
 int
-main (argc,argv)
-  int argc;
-  char **argv;
+main ()
 {
   int value;
 
index ff4fed8c6cc68393a58ffd640f4a09312443ed3a..abc931fc1400a86960d59399805d7025dcc21490 100644 (file)
@@ -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 @@ struct lt_symlist
 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 fe1d2ee60d2e3d15900ca34bb13108c146089120..a00b1238d1461156d95005ea523b6432ad0afcab 100644 (file)
@@ -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 @@ USA. */
 #include <stdio.h>
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main ()
 {
   printf ("Welcome to GNU Hell!\n");
 
index 1edc6260212dd4f6c2e4bb6071f825a369244683..b855929249122a874574d2f32bf4390713011f3a 100644 (file)
@@ -1,5 +1,6 @@
 /* l1.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   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 @@ USA. */
 int    var_l1 = 0;
 
 int
-func_l1(indent)
-    int indent;
+func_l1 (int indent)
 {
   int i;
 
index 01a87981e3026c74700d76b53642b83dee56b8a8..69e0d83d4650f7e3d58ef8cbd866a304bb4a5fa4 100644 (file)
@@ -1,5 +1,6 @@
 /* l2.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   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 @@ USA. */
 int    var_l2 = 0;
 
 int
-func_l2(indent)
-    int indent;
+func_l2 (int indent)
 {
   int i;
 
index f6b712c0f65c5a6b0bcea5393b52fee22b292bfd..cc1efec965611e2c4850febbdcc9115e1f29df6b 100644 (file)
@@ -1,5 +1,6 @@
 /* l3.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   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 @@ USA. */
 int    var_l3 = 0;
 
 int
-func_l3(indent)
-    int indent;
+func_l3 (int indent)
 {
   int i;
 
index 92197de25321ae2d8b3eab59281098a07137bdb3..392c40912b58b92bb49b03b3f90bc1c281c3d708 100644 (file)
@@ -1,5 +1,6 @@
 /* l4.c -- trivial test library
    Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   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 @@ USA. */
 int    var_l4 = 0;
 
 int
-func_l4(indent)
-    int indent;
+func_l4 (int indent)
 {
   int i;
 
index 3d68a71aac03266f7820c2a72dae24eda75e33aa..895aaf44ae2e0089208a7495f1189bc98831fb1f 100644 (file)
@@ -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 <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -25,9 +25,7 @@ USA. */
 #include <string.h>
 
 int
-main (argc,argv)
-    int argc;
-    char **argv;
+main (int argc, char **argv)
 {
   printf("dependencies:\n");
   func_l1(0);
index 3d201e35a11f59d3c5507c62761d0084def07321..8c6841d1bc4a7bd1406536ec454a9888391ddfb5 100755 (executable)
@@ -27,8 +27,9 @@ chmod +x ./libtool
 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 da043e7b76a2f1dc19d2b9063fcf0b2601d5f226..0952b433cee918708ca78194dafeb69bf3f5085c 100644 (file)
@@ -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 @@ USA. */
 #include <stdio.h>
 
 int
-main(int argc, char **argv)
+main ()
 {
   int arg,cres,fres;
   
index 65e60ccd98d6b8411096289014eb208e0843e934..e91db0b7c01d9d761093f689afbcbfb29676993c 100644 (file)
@@ -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 @@ USA. */
 #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 8f11409125790f98b5cfed89e68501abc916853b..9d40594f12351afe475ead0276186f0216b946cc 100644 (file)
@@ -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 d14b469e5d926b86b3e72e6e0321a9a453bcb105..0edffbd8df68a89200bc2f23e75e1aa51e660dc9 100644 (file)
@@ -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 @@ USA. */
 #include <stdio.h>
 
 int
-test_dl (filename)
-  char *filename;
+test_dl (char *filename)
 {
   lt_dlhandle handle;  
   const lt_dlinfo *info;
@@ -109,10 +108,9 @@ test_dl (filename)
   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 13da3f617c44e3c46cca9e2b9da1ce38df657400..6fa84eba2621312e6692f36fcf351af108ba1250 100644 (file)
@@ -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 <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -21,7 +21,7 @@ USA. */
 #include <stdio.h>
 
 void
-sub()
+sub ()
 {
   printf ("sub() called\n");
 }
index aba875551e893592dc799fa0710141990951a713..4f6da8a36da0b5ce3ac85ca44d28b7dbfd2a0e9f 100644 (file)
@@ -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 @@ USA. */
 #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 ff4fed8c6cc68393a58ffd640f4a09312443ed3a..6c31e6d79dae7972412951c9939f4f23af88fb5b 100644 (file)
@@ -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 @@ struct lt_symlist
 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 9e0d84f177235496e8b29901bfa2a8eca1a6678b..9aa32d1af264d2ecbeaac301344b1cf1c0b70569 100644 (file)
@@ -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 @@ USA. */
 #include <stdio.h>
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main ()
 {
   printf ("Welcome to GNU Hell!\n");
 
index 486d111feccd73ebd936c70d790207376b78aba2..ad97009d3bf21257a30756ccfc9546498632499d 100644 (file)
@@ -179,7 +179,7 @@ AT_DATA([main.c],
 #include "ltdl.h"
 
 int
-main (int argc, char **argv)
+main ()
 {
   lt_dlhandle module;
   const char *(*func) (void) = 0;