diff options
author | Fritz Elfert <felfert@to.com> | 2003-02-05 07:59:09 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2003-02-05 07:59:09 +0000 |
commit | f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85 (patch) | |
tree | 166bf2df5ca4fc40904af30a56a0de88683baf8d /plpbackup | |
parent | 27ba222abbf3137eef49e31ac521de01d39c8088 (diff) | |
download | plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.tar.gz plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.tar.bz2 plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.zip |
- Changes for compiling with gcc 3.2
Diffstat (limited to 'plpbackup')
-rw-r--r-- | plpbackup/plpbackup.cc | 42 |
1 files changed, 22 insertions, 20 deletions
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 <config.h> #endif -#include <sys/types.h> -#include <sys/wait.h> -#include <dirent.h> #include <fstream> -#include <strstream> +#include <sstream> +#include <iostream> #include <iomanip> #include <vector> #include <set> +#include <plpintl.h> +#include <ppsocket.h> +#include <rfsv.h> +#include <rfsvfactory.h> +#include <rpcs.h> +#include <rpcsfactory.h> +#include <bufferstore.h> +#include <bufferarray.h> + +#include <sys/types.h> +#include <sys/wait.h> +#include <dirent.h> + #include <ctype.h> #include <stdio.h> #include <stdlib.h> @@ -46,15 +57,6 @@ #include <getopt.h> #include <fcntl.h> -#include <plpintl.h> -#include <ppsocket.h> -#include <rfsv.h> -#include <rfsvfactory.h> -#include <rpcs.h> -#include <rpcsfactory.h> -#include <bufferstore.h> -#include <bufferarray.h> - 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()); |