From f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 5 Feb 2003 07:59:09 +0000 Subject: - Changes for compiling with gcc 3.2 --- plpbackup/plpbackup.cc | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'plpbackup') diff --git a/plpbackup/plpbackup.cc b/plpbackup/plpbackup.cc index 6570603..1dde5e6 100644 --- a/plpbackup/plpbackup.cc +++ b/plpbackup/plpbackup.cc @@ -25,15 +25,26 @@ #include #endif -#include -#include -#include #include -#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + #include #include #include @@ -46,15 +57,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include - using namespace std; bool full = false; @@ -295,10 +297,10 @@ startPrograms() { int i; for (i = 0; i < 26; i++) { if (devbits & 1) { - ostrstream tmp; + ostringstream tmp; tmp << 'A' + i << "\\System\\Apps\\" << cmd << "\\" << cmd << ".app"; - res = Rpcs->execProgram(tmp.str(), ""); + res = Rpcs->execProgram(tmp.str().c_str(), ""); } if (res == rfsv::E_PSI_GEN_NONE) break; @@ -867,7 +869,7 @@ runRestore() { unsigned int i; char indexbuf[40]; - ostrstream tarcmd; + ostringstream tarcmd; string dstPath; struct timeval start_tv, end_tv, cstart_tv, cend_tv; @@ -875,7 +877,7 @@ runRestore() tarcmd << "tar --to-stdout -xzf " << archList[i] << " 'KPsion*Index'" << ends; char backupType = '?'; - FILE *f = popen(tarcmd.str(), "r"); + FILE *f = popen(tarcmd.str().c_str(), "r"); if (!f) { perror(_("Could not get backup index")); continue; @@ -932,7 +934,7 @@ runRestore() tarcmd << "tar xzCf " << dstPath << " " << fn << ends; if (verbose > 0) cout << _("Extracting tar archive ...") << endl; - if (system(tarcmd.str()) != 0) + if (system(tarcmd.str().c_str()) != 0) cerr << _("Execution of ") << tarcmd.str() << _(" failed.") << endl; continue; @@ -1340,7 +1342,7 @@ runBackup() // tar it all up if (!bErr) { - ostrstream tarcmd; + ostringstream tarcmd; if (verbose > 0) cout << _("Creating tar archive ...") << endl; @@ -1355,7 +1357,7 @@ runBackup() tarcmd << ends; mkdirp(archPath.c_str()); - if (system(tarcmd.str())) { + if (system(tarcmd.str().c_str())) { cerr << _("plpbackup: Error during execution of ") << tarcmd.str() << endl; unlink(archPath.c_str()); -- cgit v1.2.3