bf0e4b3714
also move the header files to ${LOCALBASE}/include/mysql++
30 lines
721 B
Plaintext
30 lines
721 B
Plaintext
$OpenBSD: patch-sqlplusint_stream2string3_hh,v 1.1 2004/01/06 11:16:53 wilfried Exp $
|
|
--- sqlplusint/stream2string3.hh.orig 2001-05-19 18:44:48.000000000 +0200
|
|
+++ sqlplusint/stream2string3.hh 2004-01-04 23:27:18.000000000 +0100
|
|
@@ -1,21 +1,14 @@
|
|
#ifndef __stream2string3_hh__
|
|
#define __stream2string3_hh__
|
|
|
|
-#include <strstream.h>
|
|
+#include <sstream>
|
|
|
|
template<class Strng, class T>
|
|
Strng stream2string(const T &object) {
|
|
- ostrstream str;
|
|
+ std::ostringstream str;
|
|
object.out_stream(str);
|
|
- str << ends;
|
|
- Strng s = str.str();
|
|
-#ifdef __USLC__
|
|
- strstreambuf *tmpbuf = str.rdbuf();
|
|
- tmpbuf->freeze(0);
|
|
-#else
|
|
- str.freeze(0);
|
|
-#endif
|
|
- return s;
|
|
+ str << std::ends;
|
|
+ return str.str();
|
|
}
|
|
|
|
#endif
|