automatic conversion to new libstdc++-v3

A Mennucc1 debian@Tonelli.sns.it
Mon Aug 6 10:51:00 GMT 2001


hello

I have tried to prepare a tool that tries to automatically convert
c++ code to use the new library libstdc++-v3, and then gcc-v3.0

This sh script tries to solve the problem shown in 
 http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/porting-howto.html
as suggested in section 1.1.4

 Usage: gcc-3.0-ize [ --undo ]
  In libstdc++-v3 the string class has been moved to std::string, and
  so for other classes.
  gcc-3.0-ize tries to automatically adapt your source code; to this end,
  gcc-3.0-ize patches the c++ code and the 'configure.in' file.

  gcc-3.0-ize adds AC_LIBSTDCXX_STRING to configure.in: 
   this autoconf macro checks if 'string' is in base namespace or in 'std::'
   and it defines NS_STD in config.h
   and replaces NS_THESTD in *.in accordingly.
  See gcc-3.0-ize.m4 for details.

  The header files FILE.h that will be installed by 'make install' are
  changed to FILE.h.in so that they will be preprocessed accordingly
  by 'configure'.

  All other c++ files are patched directly:
  gcc-3.0-ize changes the c++ code to use the preprocessor variable NS_STD.
  It also deletes 'bad_alloc' that is not a valid signal any more.

  Currently gcc-3.0-ize handles the following classes:
   string basic_string deque queue list cout cin ios basic_streambuf streambuf stream
  It is quite easy to add other classes. Please tell me which I am missing.

  gcc-3.0-ize backups any file into file.nogcc-3.0 so that
  gcc-3.0-ize --undo   will safely undo any change to your project. 

to use, put both attachments in a same directory.

have fun

a.

-- 
A Mennucc
 "È un mondo difficile. Che vita intensa!" (Renato Carotone)


More information about the Libstdc++ mailing list