# DP: Install libstdc++ man pages with suffix .3cxx instead of .3

--- a/src/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/src/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -1388,7 +1388,7 @@
 # The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
-MAN_EXTENSION          = .3
+MAN_EXTENSION          = .3cxx
 
 # If the MAN_LINKS tag is set to YES and Doxygen generates man output,
 # then it will generate one additional man file for each entity
--- a/src/libstdc++-v3/scripts/run_doxygen
+++ b/src/libstdc++-v3/scripts/run_doxygen
@@ -235,6 +235,7 @@
 if $do_man; then
 echo ::
 echo :: Fixing up the man pages...
+mv $outdir/man/man3cxx/* $outdir/man/man3/
 cd $outdir/man/man3
 
 # File names with embedded spaces (EVIL!) need to be....?  renamed or removed?
@@ -256,7 +257,7 @@
 # and I'm off getting coffee then anyhow, so I didn't care enough to make
 # this super-fast.
 g++ ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader
-problematic=`egrep -l '#include <.*_.*>' [a-z]*.3`
+problematic=`egrep -l '#include <.*_.*>' [a-z]*.3 [a-z]*.3cxx`
 for f in $problematic; do
     # this is also slow, but safe and easy to debug
     oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
@@ -269,7 +270,7 @@
 # Some of the pages for generated modules have text that confuses certain
 # implementations of man(1), e.g., Linux's.  We need to have another top-level
 # *roff tag to /stop/ the .SH NAME entry.
-problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
+problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3 [A-Z]*.3cxx`
 #problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3'
 
 for f in $problematic; do
@@ -283,7 +284,7 @@
 done
 
 # Also, break this (generated) line up.  It's ugly as sin.
-problematic=`grep -l '[^^]Definition at line' *.3`
+problematic=`grep -l '[^^]Definition at line' *.3 *.3cxx`
 for f in $problematic; do
     sed 's/Definition at line/\
 .PP\
@@ -388,8 +389,8 @@
 	 istringstream ostringstream stringstream filebuf ifstream \
 	 ofstream fstream string;
 do
-    echo ".so man3/std::basic_${f}.3" > std::${f}.3
-    echo ".so man3/std::basic_${f}.3" > std::w${f}.3
+    echo ".so man3/std::basic_${f}.3cxx" > std::${f}.3cxx
+    echo ".so man3/std::basic_${f}.3cxx" > std::w${f}.3cxx
 done
 
 echo ::
