]> git.donarmstrong.com Git - lilypond.git/commitdiff
GCC-3.1.1 fixes
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 5 Jul 2002 13:29:38 +0000 (13:29 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 5 Jul 2002 13:29:38 +0000 (13:29 +0000)
* lily/include/stream.hh:
* lily/include/moment.hh:
* lily/include/midi-stream.hh:
* lily/streams.cc:
* lily/scm-option.cc:
* lily/parser.yy:
* lily/my-lily-lexer.cc:
* lily/moment.cc:
* lily/midi-stream.cc:
* lily/main.cc:
* lily/lexer.ll:
* lily/includable-lexer.cc:
* flower/include/source-file.hh:
* flower/include/parray.hh:
* flower/include/dictionary.hh:
* flower/include/array.icc:
* flower/string.cc:
* flower/source-file.cc:
* flower/getopt-long.cc: gcc-3.1 fixes.

* stepmake/stepmake/generic-targets.make: Add comment about warning.

* lexer-gcc-3.0.patch: Add comment, and a fix for installations
that have an unpatched flex and gcc-3.1.x.

* Documentation/topdocs/INSTALL.texi: Add comments and
instructions on gcc-3.1.x.

* lexer-gcc-3.1.sh: New file.

* aclocal.m4: regenerate.

* stepmake/aclocal.m4: Version compare fix.

26 files changed:
ChangeLog
Documentation/topdocs/INSTALL.texi
aclocal.m4
flower/getopt-long.cc
flower/include/array.icc
flower/include/dictionary.hh
flower/include/parray.hh
flower/include/source-file.hh
flower/source-file.cc
flower/string.cc
lexer-gcc-3.0.patch
lexer-gcc-3.1.sh [new file with mode: 0755]
lily/includable-lexer.cc
lily/include/midi-stream.hh
lily/include/moment.hh
lily/include/stream.hh
lily/lexer.ll
lily/main.cc
lily/midi-stream.cc
lily/moment.cc
lily/my-lily-lexer.cc
lily/parser.yy
lily/scm-option.cc
lily/streams.cc
stepmake/aclocal.m4
stepmake/stepmake/generic-targets.make

index d2b1dbad2f3a0ec14c5ef8a46c25fe0fc549f5e0..9826ebd839b91d21264702bb671301507e57df83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2002-07-05  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/include/stream.hh:
+       * lily/include/moment.hh:
+       * lily/include/midi-stream.hh:
+       * lily/streams.cc:
+       * lily/scm-option.cc:
+       * lily/parser.yy:
+       * lily/my-lily-lexer.cc:
+       * lily/moment.cc:
+       * lily/midi-stream.cc:
+       * lily/main.cc:
+       * lily/lexer.ll:
+       * lily/includable-lexer.cc:
+       * flower/include/source-file.hh:
+       * flower/include/parray.hh:
+       * flower/include/dictionary.hh:
+       * flower/include/array.icc:
+       * flower/string.cc: 
+       * flower/source-file.cc:
+       * flower/getopt-long.cc: gcc-3.1 fixes.
+
+       * stepmake/stepmake/generic-targets.make: Add comment about warning.
+
+       * lexer-gcc-3.0.patch: Add comment, and a fix for installations
+       that have an unpatched flex and gcc-3.1.x.
+
+       * Documentation/topdocs/INSTALL.texi: Add comments and
+       instructions on gcc-3.1.x.
+
+       * lexer-gcc-3.1.sh: New file.
+
+       * aclocal.m4: regenerate.
+       
+       * stepmake/aclocal.m4: Version compare fix.
+
 2002-07-05  Han-Wen  <hanwen@cs.uu.nl>
 
        * ly/engraver-init.ly (RhythmicStaffContext): stems up by default.
index 5577074df1739b767c0a4520c512214a27ed6741..a7ced0fd3c38e102faa24e2a29cf6f1bb18847e4 100644 (file)
@@ -137,7 +137,9 @@ EGCS 1.1 may work, but is no longer supported.
 Check out @uref{ftp://ftp.gnu.org/gnu/gcc/, the gcc site}.
 
 WARNING: if you choose to upgrade to GCC 3.x, enquire if your
-distribution supports g++ 3.x and flex.
+distribution supports g++ 3.x and flex.  At the time of writing (Fri
+Jul 5 2002), @strong{no} distribution that we know of ships a flex
+that generates gcc-3.1.x compliant C++ code.
 
 @item Python (version 1.5 or newer).
 Check out @uref{http://www.python.org, the python website}.
@@ -156,8 +158,8 @@ Check out @uref{http://www.gnu.org/software/flex/,the Flex webpage}.
 
 WARNING: plain Flex 2.5.4(a) generates invalid C++ code.  GCC 3.x
 chokes on this.  If you wish to use GCC 3.x, make sure that your
-distribution supports g++ 3.x and flex.  For a workaround, see
-lexer-gcc-3.0 below.
+distribution supports g++ 3.x and flex.  For workarounds, see
+lexer-gcc-3.0.patch and lexer-gcc-3.1.sh in the source directory.
 
 @item Bison (version 1.25 or newer).
 Check out @uref{http://www.gnu.org/software/bison/,the bison  webpage}
@@ -621,7 +623,7 @@ send bug reports to @email{bug-lilypond@@gnu.org}.
 
 Bugs that are not fault of LilyPond are documented here.
 
-@unnumberedsubsec FLex-2.5.4a and gcc-3.0
+@unnumberedsubsec Flex-2.5.4a and gcc-3.x
 
 Flex 2.5.4a does not produce g++-3.0 compliant C++ code.  To compile
 LilyPond with gcc-3.0 you may do:
@@ -635,6 +637,22 @@ LilyPond with gcc-3.0 you may do:
 
 Note that this is fixed in Debian/unstable for flex >= 2.5.4a-13.
 
+@unnumberedsubsec Flex-2.5.4a and gcc-3.1.x
+
+Flex 2.5.4a does not produce g++-3.1.1 compliant C++ code.  To compile
+LilyPond with gcc-3.1.1 you may do:
+
+@example
+        CONF=gcc-3.1 ./lexer-gcc-3.1.sh
+        CPPFLAGS=$(pwd)/lily/out-gcc-3.1 CC=gcc-3.1 CXX=g++-3.1 \
+            ./configure --enable-config=gcc-3.1
+        CONF=gcc-3.1 ./lexer-gcc-3.1.sh
+        make conf=gcc-3.1
+@end example
+
+Note that this is @strong{not} fixed in Debian/unstable for flex <=
+2.5.4a-26.
+
 @unnumberedsubsec Linux-2.4.0, Guile-1.4 --with-threads
 
 There's a bug in certain kernels around version 2.4.0, that is
index 686026ab0868ff84774a7c52e3647b981926b332..d5b5bdd22bd4021f7c1499549fe2695345b151da 100644 (file)
@@ -41,7 +41,7 @@ AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
       if ([$]3) {three = [$]3}
       else {three = 0}
     }
-    {printf "%s%s%s\n", [$]1*100, [$]2*10, three}'
+    {printf "%d\n", [$]1*1000000 + [$]2*1000 + three}'
 ])
 
 
index 7395555e79acdfe6c76dabff2e43baac95019724..c081f3028a518eea9d8540d9da262eef672b428e 100644 (file)
@@ -6,10 +6,11 @@
 
 #include <string.h>
 #include <stdio.h>
-#include <iostream.h>
 #include <assert.h>
 #include <stdlib.h>
 
+#include <iostream>
+
 #include "config.h"
 #include "getopt-long.hh"
 #include "international.hh"
index 46194f587f1f38202eef696df414e00754228c63..47636d335493a42fc522783127bbf6352e47162d 100644 (file)
@@ -49,8 +49,7 @@ Array<T>::insert (T k, int j)
 }
 
 template<class T> INLINE void
-Array<T>::sort (int (*compare) (T const&,T const&),
-          int lower = -1, int upper = -1) 
+Array<T>::sort (int (*compare) (T const&,T const&), int lower, int upper)
 {
   if (lower < 0) 
     {
index d77f3aec982b6fd87d452f2758c1bc68c127b058..3b39641e5a620a78a44fefb3a7375a9a2a2114e7 100644 (file)
@@ -47,7 +47,7 @@ public:
     }
   bool elem_b (String s)
   {
-    std::map<String,V>::const_iterator ki (find (s));
+    typename std::map<String,V>::const_iterator ki (find (s));
     return ki != end ();
   }
   
index c39ec2500bed1ce66591f55c6be51de86343ed24..eb259ede4b7e306bac75884ec50e49e89b0c1ace 100644 (file)
@@ -195,8 +195,7 @@ typecast_array (Link_array<V> const &a, T * /* dummy */ )
 
 
 template<class T> inline void
-Link_array<T>::sort (int (*compare) (T *const&,T *const&),
-               int lower = -1, int upper = -1) 
+Link_array<T>::sort (int (*compare)(T *const&,T *const&), int lower, int upper)
 {
   if (lower < 0) 
     {
index 45985174ab6e308b88835ed3a11d33ed303ed61a..777213267de0d6b88078f8b92fdfda7acaf78f49 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef SOURCE_FILE_HH
 #define SOURCE_FILE_HH
 
-#include <iostream.h>
+#include <iostream>
 
 #include "flower-proto.hh"
 #include "string.hh"
@@ -32,7 +32,7 @@ public:
 
   char const* ch_C () const;
   virtual String error_str (char const* pos_ch_C ) const;
-  istream * istream_l ();
+  std::istream * istream_l ();
   bool in_b (char const* pos_ch_C ) const;
   int length_i () const;
   virtual int line_i (char const* pos_ch_C ) const;
@@ -59,7 +59,7 @@ public:
 
 private:
   String name_str_;
-  istream* istream_p_;
+  std::istream* istream_p_;
   File_storage * storage_p_;
 };
 
index 9d2b902e55ebf5b92c852ebea7559de46755440a..6e607980fe612d1610ce4e0a855c8514ea435854 100644 (file)
@@ -9,7 +9,7 @@
 
 
 #include <assert.h>
-#include <strstream.h>
+#include <sstream>
 
 #include "string.hh"
 #include "flower-proto.hh"
@@ -34,7 +34,7 @@ Source_file::Source_file (String name_str, String data_str)
   pos_ch_C_ = ch_C ();
 }
 
-istream*
+std::istream*
 Source_file::istream_l ()
 {
   /*
@@ -45,11 +45,11 @@ Source_file::istream_l ()
   if (!istream_p_)
     {
       if (length_i ()) // can-t this be done without such a hack?
-       istream_p_ = new istrstream (ch_C (), length_i ());
+       istream_p_ = new std::stringstream (ch_C ());
       else
        {
-         istream_p_ = new istrstream ("", 0);
-         istream_p_->setstate (ios::eofbit);
+         istream_p_ = new std::istringstream ("");
+         istream_p_->setstate (std::ios::eofbit);
          //      istream_p_->set (ios::eofbit);
        }
     }
index e08e908efe7a87a028d8d140976923ba4bdb51b2..2550404c0ba8012acf72e13d644c907c5fc38c8c 100644 (file)
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <iostream.h>
 #include <assert.h>
 #include <string.h>
 #include <stdarg.h>
 
+#include <iostream>
+
 #include "string.hh"
 #include "libc-extension.hh"
 #include "string-convert.hh"
index fedefc258cfb81d4a7103bf4ca488a7541a9f0fa..00e1ccc46ebb2c2b8f160e286dcb3cdc87cd078c 100644 (file)
@@ -1,3 +1,7 @@
+# Patch file documenting fix for flex-2.5.4 and gcc-3.x
+#
+# For usage of this patch, see INSTALL.txt
+
 --- ./lily/out-gcc-3.0/lexer.cc~       Tue Jun 26 13:12:26 2001
 +++ ./lily/out-gcc-3.0/lexer.cc        Tue Jun 26 13:11:56 2001
 @@ -21,7 +21,7 @@
@@ -5,7 +9,7 @@
  
  #include <stdlib.h>
 -class istream;
-+#include <iostream.h>
++#include <iostream>
  #include <unistd.h>
  
  /* Use prototypes in function declarations. */
diff --git a/lexer-gcc-3.1.sh b/lexer-gcc-3.1.sh
new file mode 100755 (executable)
index 0000000..7d81630
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# script documenting fixes for flex-2.5.4 and gcc-3.1
+
+includes="$HOME/usr/include /usr/local/include /usr/include"
+
+for i in $includes; do
+    file=$i/FlexLexer.h
+    if [ -f "$file" ]; then
+       break
+    else
+       file=
+    fi
+done
+
+if [ -z "$file" ]; then
+    cat <<EOF
+FlexLexer.h not found in $includes
+
+Please install flex, or find and fix FlexLexer.h by hand.
+EOF
+    exit 1
+fi
+
+
+if [ -n "$CONF" ]; then
+    CONFIGSUFFIX=-$CONF
+    ENABLECONFIG="--enable-config=$CONF"
+fi    
+outdir=out$CONFIGSUFFIX
+
+echo -n "Copying and fixing $file... "
+mkdir -p lily/$outdir
+rm -f lily/$outdir/FlexLexer.h
+sed -e 's/iostream.h/iostream/' \
+    -e 's/\<istream\>/std::istream/' \
+    -e 's/\<ostream\>/std::ostream/' \
+    $file > lily/$outdir/FlexLexer.h
+echo "done"
+
+file=lily/$outdir/lexer.cc
+rm -f $file
+make conf=$CONF -C lily $outdir/lexer.cc || exit 0
+
+if [ -f "$file" ]; then
+    echo -n "Generating and fixing $file... "
+
+    mv $file $file.orig
+    sed -e 's/\<cin\>/std::cin/g' \
+       -e 's/\<cout\>/std::cout/g' \
+       -e 's/\<cerr\>/std::cerr/g' \
+       $file.orig > $file
+    echo "done"
+fi
+
+cat <<EOF
+
+Remove config.cache before rerunning ./configure
+
+Reconfigure doing something like:
+
+    CPPFLAGS=-I$(pwd)/lily/$outdir ./configure $ENABLECONFIG
+EOF
index 067057b5eb21eb4df3b35d41a64701309909e0e3..e38dbd363ece5611f35a7376c49de590a85477ae 100644 (file)
@@ -6,7 +6,7 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include <strstream.h>
+#include <sstream>
 
 
 #include "file-path.hh"
index fbe3973cd25638fdcd2c1f431366baa336c8e1ef..995c0483329ded0f1aaa2d8addc6351422a04059 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef MIDI_STREAM_HH
 #define MIDI_STREAM_HH
 
-#include <iostream.h>
+#include <iostream>
 #include "string.hh"
 
 /// Midi outputfile
@@ -21,7 +21,7 @@ struct Midi_stream {
 
   void open ();
 
-  ostream* os_p_;
+  std::ostream* os_p_;
   String filename_str_;
 };
 
index 30689a5d26bebff5f4e461a545ca34c7fe240557..96f2843cefcefb4bde00791099b80df8861ddb58 100644 (file)
@@ -63,7 +63,7 @@ INSTANTIATE_COMPARE (Moment const&, Moment::compare);
 
 
 #ifdef STREAM_SUPPORT
-ostream & operator << ( ostream &,Moment const &);
+std::ostream & operator << (std::ostream &, Moment const &);
 #endif
 
 #endif /* MOMENT_HH */
index ad747a0760f9c34b9141d37ceefbb1946dbe2ff2..fa34b86c309ca885fa8b58477a07726b1197024e 100644 (file)
@@ -9,19 +9,19 @@ source file of the GNU LilyPond music typesetter
 
 #ifndef STREAM_HH
 #define STREAM_HH
-#include "string.hh"
 
+#include <iostream>
+#include <sstream>
+
+#include "string.hh"
 
-#include <iostream.h> /* gcc 3.0 */
 #if __GNUC__ > 2
-ostream *open_file_stream (String filename,
-                          std::ios_base::openmode mode=std::ios::out);
+std::ostream *open_file_stream (String filename,
+                               std::ios_base::openmode mode=std::ios::out);
 #else
-ostream *open_file_stream (String filename, int mode=ios::out);
+std::ostream *open_file_stream (String filename, int mode=ios::out);
 #endif
-void close_file_stream (ostream *os);
-
-
+void close_file_stream (std::ostream *os);
 
 
 #endif /* STREAM_HH */
index 5d224403ca2251aaf3882810e13bd2e1bf72927f..c90632a355e28a8844590da513e9ae3e6b98cf40 100644 (file)
@@ -24,9 +24,9 @@
 
 #include <stdio.h>
 #include <ctype.h>
-#include <iostream.h> /* gcc 3.0 */
 #include <errno.h>
 
+#include <iostream>
 
 #include "score.hh"
 #include "lily-guile.hh"
index 0e789e75c9cf8fe1d7a82d95e75e407bb5da0e4f..6bfd9413e85c37d9a124cf1a2222e258ba89607f 100644 (file)
@@ -8,11 +8,12 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <iostream.h>
 #include <assert.h>
 #include <locale.h>
 #include <stdio.h>
 
+#include <iostream>
+
 #include "config.h"
 
 #if HAVE_GETTEXT
@@ -137,23 +138,23 @@ usage ()
   /*
     No version number or newline here. It confuses help2man
    */
-  cout << _f ("Usage: %s [OPTION]... FILE...", "lilypond").ch_C();
-  cout << "\n\n";
-  cout << _ ("Typeset music and or play MIDI from FILE").ch_C();
-  cout << "\n\n";
-  cout << 
+  std::cout << _f ("Usage: %s [OPTION]... FILE...", "lilypond").ch_C();
+  std::cout << "\n\n";
+  std::cout << _ ("Typeset music and or play MIDI from FILE").ch_C();
+  std::cout << "\n\n";
+  std::cout << 
 _ (
 "LilyPond is a music typesetter.  It produces beautiful sheet music\n"
 "using a high level description file as input.  LilyPond is part of \n"
 "the GNU Project.\n"
 ).ch_C();
 
-  cout << '\n';
-  cout << _ ("Options:").ch_C();
-  cout << '\n';
-  cout << Long_option_init::table_str (options_static).ch_C();
-  cout << '\n';
-  cout << _ ("This binary was compiled with the following options:") .ch_C()
+  std::cout << '\n';
+  std::cout << _ ("Options:").ch_C();
+  std::cout << '\n';
+  std::cout << Long_option_init::table_str (options_static).ch_C();
+  std::cout << '\n';
+  std::cout << _ ("This binary was compiled with the following options:") .ch_C()
     << " " <<
 #ifdef NDEBUG
     "NDEBUG "
@@ -164,41 +165,41 @@ _ (
     "\n";
 
 
-  cout << endl;
+  std::cout << std::endl;
 
-  cout << _f ("Report bugs to %s", "bug-lilypond@gnu.org").ch_C() << endl;
+  std::cout << _f ("Report bugs to %s", "bug-lilypond@gnu.org").ch_C() << std::endl;
 }
 
 void
 version ()
 {
   identify (stdout);
-  cout << '\n';
-  cout << _f (""
+  std::cout << '\n';
+  std::cout << _f (""
   "This is free software.  It is covered by the GNU General Public License,\n"
   "and you are welcome to change it and/or distribute copies of it under\n"
   "certain conditions.  Invoke as `%s --warranty' for more information.\n",
     "lilypond").ch_C();
-  cout << endl;
+  std::cout << std::endl;
 
-  cout << _f ("Copyright (c) %s by", "1996--2002").ch_C();
-  cout << '\n';
-  cout << "  Han-Wen Nienhuys <hanwen@cs.uu.nl>\n";
-  cout << "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
+  std::cout << _f ("Copyright (c) %s by", "1996--2002").ch_C();
+  std::cout << '\n';
+  std::cout << "  Han-Wen Nienhuys <hanwen@cs.uu.nl>\n";
+  std::cout << "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
 }
 
 void
 notice ()
 {
-  cout << '\n';
-  cout << _ ("GNU LilyPond -- The music typesetter").ch_C();
-  cout << '\n';
-  cout << _f ("Copyright (c) %s by", "1996--2002").ch_C();
-  cout << '\n';
-  cout << "  Han-Wen Nienhuys <hanwen@cs.uu.nl>\n";
-  cout << "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
-  cout << '\n';
-  cout << _ (
+  std::cout << '\n';
+  std::cout << _ ("GNU LilyPond -- The music typesetter").ch_C();
+  std::cout << '\n';
+  std::cout << _f ("Copyright (c) %s by", "1996--2002").ch_C();
+  std::cout << '\n';
+  std::cout << "  Han-Wen Nienhuys <hanwen@cs.uu.nl>\n";
+  std::cout << "  Jan Nieuwenhuizen <janneke@gnu.org>\n";
+  std::cout << '\n';
+  std::cout << _ (
             "    This program is free software; you can redistribute it and/or\n"
             "modify it under the terms of the GNU General Public License version 2\n"
             "as published by the Free Software Foundation.\n"
@@ -323,7 +324,7 @@ main_prog (void * , int, char**)
    */
 
   init_lily_guile (prefix_directory);
-  cout << endl;
+  std::cout << std::endl;
 
   call_constructors ();
   all_fonts_global_p = new All_font_metrics (global_path.str ());
index 3d5b366a1008b7801755686cfb8576eb9603a3b8..afce7e3b5402ff426b22efa3c4ce3eddacebe5ab 100644 (file)
 Midi_stream::Midi_stream (String filename)
 {
   filename_str_ = filename;
-#if __GCC__ > 2
-  os_p_ = open_file_stream (filename, ios::out|ios::bin);
-#else
-  os_p_ = open_file_stream (filename, ios::out|ios::binary);
-#endif
+  os_p_ = open_file_stream (filename, std::ios::out|std::ios::binary);
 }
 
 Midi_stream::~Midi_stream ()
index 3c504ecc04030bbd0433c14918dd122d7e7f243a..8de57af23b186c88d03aafb7d18245411f98f3a8 100644 (file)
@@ -204,8 +204,8 @@ Moment::operator - () const
 
 
 #ifdef STREAM_SUPPORT
-ostream &
-operator << (ostream &os, Moment const &m)
+std::ostream &
+operator << (std::ostream &os, Moment const &m)
 {
   os << m.str ();
   return os;
index 59e8d2f4a346347d6c481b58a4b81fd7a97f80b7..de7e68637d334825969ca1024f2679e0f620938c 100644 (file)
@@ -6,9 +6,10 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include <strstream.h>
 #include <ctype.h>
 
+#include <sstream>
+
 #include "lily-proto.hh"
 #include "scm-hash.hh"
 #include "interval.hh"
index 698398adcc6b63bd4ef9b9982d7639500469ebc6..3019fe3982d4e76bf037285bf66576959a5663a7 100644 (file)
@@ -24,7 +24,8 @@ this.
 */
 
 #include <ctype.h>
-#include <iostream.h>
+
+//#include <iostream>
 
 #include "translator-def.hh"
 #include "lily-guile.hh"
index e924020aa78624e2e7fa332c23fe054b45d05849..fca566f9bde50e8602b89f29d3b337b974973faa 100644 (file)
@@ -7,7 +7,7 @@
   
  */
 
-#include <iostream.h>
+#include <iostream>
 
 #include "string.hh"
 #include "lily-guile.hh"
@@ -72,7 +72,7 @@ This function is useful to call from the command line: @code{lilypond -e
    */
   if (var == ly_symbol2scm ("help"))
     {
-      cout << _("lilypond -e EXPR means
+      std::cout << _("lilypond -e EXPR means
 
 evalute EXPR as Scheme after init.scm has been read.  In particular,
 the function set-lily-option allows for access to some internal
@@ -81,12 +81,12 @@ variables. Usage:
   (set-lily-option SYMBOL VAL)
 
 possible options for SYMBOL are :
-").ch_C()<<endl;
+").ch_C()<< std::endl;
       
-      cout << "  help (any-symbol)"<<endl; 
-      cout << "  internal-type-checking (boolean)"<<endl; 
-      cout << "  midi-debug (boolean)"<<endl; 
-      cout << "  testing-level (int)"<<endl; 
+      std::cout << "  help (any-symbol)"<< std::endl; 
+      std::cout << "  internal-type-checking (boolean)"<< std::endl; 
+      std::cout << "  midi-debug (boolean)"<< std::endl; 
+      std::cout << "  testing-level (int)"<< std::endl; 
 
       exit (0);
     }
index 06a74a23cbf7885ff7ea5d26cec61c930554335b..3214cabcfa164f16c4bcfb05a104a9b6ac6494d1 100644 (file)
@@ -6,8 +6,9 @@
 #if HAVE_SYS_STAT_H 
 #include <sys/stat.h>
 #endif
-#include <iostream.h>
-#include <fstream.h>
+
+#include <iostream>
+#include <fstream>
 
 #include "stream.hh"
 #include "file-path.hh"
 #include "main.hh"
 
 #if __GNUC__ > 2
-ostream *
+std::ostream *
 open_file_stream (String filename, std::ios_base::openmode mode)
 #else
-ostream *
+std::ostream *
 open_file_stream (String filename, int mode)
 #endif
 {
-  ostream *os;
+  std::ostream *os;
   if ((filename == "-"))
-    os = &cout;
+    os = &std::cout;
   else
     {
       Path p = split_path (filename);
       if (!p.dir.empty_b ())
         if (mkdir (p.dir.ch_C (), 0777) == -1 && errno != EEXIST)
           error (_f ("can't create directory: `%s'", p.dir));
-      os = new ofstream (filename.ch_C (), mode);
+      os = new std::ofstream (filename.ch_C (), mode);
     }
   if (!*os)
     error (_f ("can't open file: `%s'", filename));
@@ -39,15 +40,15 @@ open_file_stream (String filename, int mode)
 }
 
 void
-close_file_stream (ostream *os)
+close_file_stream (std::ostream *os)
 {
-  *os << flush;
+  *os << std::flush;
   if (!*os)
     {
       warning (_ ("Error syncing file (disk full?)"));
       exit_status_global = 1;
     }
-  if (os != &cout)
+  if (os != &std::cout)
     delete os;
   os = 0;
 }  
index 9b05585edd726de0b32bca4a0e57baa73d18cea5..e8aeb960a9a07a12782293462028780ecb57dcfa 100644 (file)
@@ -38,7 +38,7 @@ AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [
       if ([$]3) {three = [$]3}
       else {three = 0}
     }
-    {printf "%s%s%s\n", [$]1*100, [$]2*10, three}'
+    {printf "%d\n", [$]1*1000000 + [$]2*1000 + three}'
 ])
 
 
index f9b49024a76f7b66124045a557a9c8e62868f9f5..b6e588fd6ef515f6b16bd6502ad0c2ce6a8e0ae6 100644 (file)
@@ -127,7 +127,7 @@ installextradoc:
        $(foreach i, $(EXTRA_DOC_FILES),\
                cp -r $(i) $(prefix)/doc/$(package) &&) true
 
-include $(outdir)/dummy.dep $(DEP_FILES)
+include $(outdir)/dummy.dep $(DEP_FILES) # expect a warning here
 
 $(outdir)/dummy.dep:
        -mkdir -p $(outdir)