libtool-patches
[Top][All Lists]
Advanced

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

tests/tagdemo: ISO C++


From: Ralf Wildenhues
Subject: tests/tagdemo: ISO C++
Date: Sun, 3 Oct 2004 23:02:38 +0200
User-agent: Mutt/1.5.6+20040722i

This patch brings the tagdemo up to ISO C++.  I do not know how
well compilers support this, but eventually something like this
should be applied.

So whoever has a compiler that does not understand this, speak
up ;)

Regards,
Ralf

2004-10-03  Ralf Wildenhues <address@hidden>

        * tests/tagdemo/foo.cpp, main.cpp: Use ANSI C++.


Index: tests/tagdemo/foo.cpp
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/tagdemo/foo.cpp,v
retrieving revision 1.1
diff -u -r1.1 foo.cpp
--- tests/tagdemo/foo.cpp       14 Oct 2003 21:46:13 -0000      1.1
+++ tests/tagdemo/foo.cpp       3 Oct 2004 20:41:40 -0000
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 //    foo.cpp -- trivial test library
-//    Copyright (C) 1998-2000 Free Software Foundation, Inc.
+//    Copyright (C) 1998-2000,2004 Free Software Foundation, Inc.
 //    Originally by Thomas Tanner <address@hidden>
 //    This file is part of GNU Libtool.
 
@@ -20,12 +20,14 @@
 // USA.
 
 #include "foo.h"
-#include <iostream.h>
+#include <iostream>
 
 #ifdef HAVE_MATH_H
-#include <math.h>
+#include <cmath>
 #endif
 
+using namespace std;
+
 // Our C functions.
 int
 foo(void)
Index: tests/tagdemo/main.cpp
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/tagdemo/main.cpp,v
retrieving revision 1.2
diff -u -r1.2 main.cpp
--- tests/tagdemo/main.cpp      24 Mar 2004 03:06:48 -0000      1.2
+++ tests/tagdemo/main.cpp      3 Oct 2004 20:41:40 -0000
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 //    main.cpp -- tagdemo test program
-//    Copyright (C) 1998-2000 Free Software Foundation, Inc.
+//    Copyright (C) 1998-2000,2004 Free Software Foundation, Inc.
 //    Originally by Thomas Tanner <address@hidden>
 //    This file is part of GNU Libtool.
 
@@ -23,8 +23,9 @@
 #include "foo.h"
 #include "baz.h"
 #include "conv.h"
-#include <iostream.h>
+#include <iostream>
 
+using namespace std;
 
 int
 main (int, char *[])




reply via email to

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