libtool-patches
[Top][All Lists]
Advanced

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

Re: tests/tagdemo: ISO C++


From: Bob Friesenhahn
Subject: Re: tests/tagdemo: ISO C++
Date: Sun, 3 Oct 2004 16:16:22 -0500 (CDT)

On Sun, 3 Oct 2004, Ralf Wildenhues wrote:

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 ;)

I believe that I have encountered a SGI C++ compiler for Irix which properly supports namespaces but is missing the standard C++ headers.

Regardless, use of standard C++ syntax should be preferred at this time.

Bob


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 *[])



======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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