> Hi Mark,
>
> thank you for your feedback. I will fix the problems and repack tntdb 1.0.0.
Hello Tommi,
Great, thanks. It works fine in simple tests compiled as 64 bit on
Solaris 10u4 with Oracle 10.
> Can you tell me, why this <string.h> is needed? If it is for size_t
> <sys/types.h> might be better.
man memset on Solaris 10 says it needs #include <string.h> to fix this compiler
error:
CC -DHAVE_CONFIG_H -I. -I../../src -I../../include
-I/h/goanna/2/ts/boost/boost_1_34_1 -I/h/goanna/1/s_5.10_m64/c/include
-I/usr/xpg4/include -I/usr/sfw/include
-I/h/goanna/1/oracle/oracle/product/10.2.0/db_1/rdbms/public -D_REENTRANT -mt
-g -xdebugformat=stabs -mt -library=stlport4 -xs -m64
-I/h/goanna/1/s_5.10_m64/c/include -c blob.cpp -KPIC -DPIC -o .libs/blob.o
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 38:
Warning: The variable tmp has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 87:
Warning: The variable ret has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 109:
Warning: The variable old has not yet been assigned a value.
"blob.cpp", line 95: Error: The function "memset" must have a prototype.
1 Error(s) and 3 Warning(s) detected.
gmake[1]: *** [blob.lo] Error 1
gmake[1]: Leaving directory `/h/goanna/2/ts/tntnet/tntdb/src/oracle'
gmake: *** [all-recursive] Error 1
> I have to think about the integer constant for drivers. The problem is, that
> it will be a magic constant, which would always limit the number of drivers
> to the number of known magic constants. If someone else will create a driver
> for say firebird, he needs to get a constant.
This is a good point. It might be better for tntdb to return
a string for the RDBMS name instead of a magic constant, and for the application
to convert the RDBMS names it knows how to write the SQL for to application
magic constants.
> And what if someone writes a
> driver for odbc? Which constant will the driver return?
Thanks for thinking of this tricky question. Of course as
you are pointing out, for issuing SQL where their may be differences
in SQL for different RDBMSs, the application would really want to
know which RDBMS it is connected to, rather than which tntdb
database driver is being used.
> Since the application
> itself will deliver the driver name, why shouldn't the application itself
> store that for reference. The application knows better, for which drivers the
> SQL is optimized for.
> Tommi
OK thanks, I will do that.
> another question: why we need <stdlib.h> in tntnet/framework/runtime/main.cpp
> and tntnet/framework/common/worker.cpp?
CC -DHAVE_CONFIG_H -I. -I/h/goanna/2/ts/boost/boost_1_34_1
-I/h/goanna/1/s_5.10_m64/c/include -I/usr/xpg4/include -I/usr/sfw/include
-I/h/goanna/1/oracle/oracle/product/10.2.0/db_1/rdbms/public
-DPKGLIBDIR=\"/h/goanna/1/s_5.10_m64/c/lib/tntnet\" -D_REENTRANT -mt -g
-xdebugformat=stabs -mt -library=stlport4 -xs -m64 -c worker.cpp -KPIC -DPIC
-o .libs/libtntnet_la-worker.o
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 38:
Warning: The variable tmp has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 87:
Warning: The variable ret has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 109:
Warning: The variable old has not yet been assigned a value.
"worker.cpp", line 370: Error: The function "exit" must have a prototype.
1 Error(s) and 3 Warning(s) detected.
gmake[2]: *** [libtntnet_la-worker.lo] Error 1
gmake[2]: Leaving directory `/h/goanna/2/ts/tntnet/tntnet/framework/common'
And this diff:
Index: tntnet/framework/common/tnt/ecpp.h
===================================================================
--- tntnet/framework/common/tnt/ecpp.h (revision 986)
+++ tntnet/framework/common/tnt/ecpp.h (working copy)
@@ -227,11 +227,11 @@
tnt::Scope& _scope = scope;
\
tnt::Scope::pointer_type _ptr = _scope.get(varname##_scopekey);
\
if (_ptr.getPointer())
\
- varname##_pointer = static_cast<tnt::PointerObject<type>*>(
\
+ varname##_pointer = static_cast<tnt::PointerObject<type >*>(
\
_ptr.getPointer())->get();
\
else
\
{
\
- tnt::PointerObject<type>* _poptr = new tnt::PointerObject<type>();
\
+ tnt::PointerObject<type >* _poptr = new tnt::PointerObject<type >();
\
_ptr = _poptr;
\
_poptr->set(varname##_pointer = new type construct);
\
_scope.put(varname##_scopekey, _ptr);
\
is for this compiler error (Sun Studio 12 needs a space between > > in
templates):
CC -DHAVE_CONFIG_H -I. -I../../../framework/common
-I/h/goanna/2/ts/boost/boost_1_34_1 -I/h/goanna/1/s_5.10_m64/c/include
-I/usr/xpg4/include -I/usr/sfw/include
-I/h/goanna/1/oracle/oracle/product/10.2.0/db_1/rdbms/public -D_REENTRANT -mt
-g -xdebugformat=stabs -mt -library=stlport4 -xs -m64 -c strings.cpp -KPIC
-DPIC -o .libs/strings.o
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 38:
Warning: The variable tmp has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 87:
Warning: The variable ret has not yet been assigned a value.
"/h/goanna/1/s_5.10_m64/c/include/cxxtools/atomicity.gcc.x86_64.h", line 109:
Warning: The variable old has not yet been assigned a value.
"strings.ecpp", line 23: Warning:::_component_strings::operator() hides the
virtual function tnt::Component::operator()(tnt::HttpRequest&, tnt::HttpReply&,
tnt::QueryParams&, bool).
"strings.ecpp", line 7: Error: "," expected instead of ">>".
"strings.ecpp", line 7: Error: Illegal value for template parameter.
"strings.ecpp", line 7: Error: Cannot cast from tnt::Object* to
std::vector<std::string>.
"strings.ecpp", line 7: Error: Cannot cast from tnt::Object* to
std::vector<std::string>.
"strings.ecpp", line 7: Error: ">" expected instead of ";".
"strings.ecpp", line 7: Error: "(" expected instead of ";".
"strings.ecpp", line 7: Error: Operand expected instead of ";".
"strings.ecpp", line 7: Error: "," expected instead of ">>".
"strings.ecpp", line 7: Error: Illegal value for template parameter.
"strings.ecpp", line 7: Error: "," expected instead of ";".
"strings.ecpp", line 7: Error: Illegal value for template parameter.
"strings.ecpp", line 7: Warning: declarator required in declaration.
"strings.ecpp", line 7: Error: _poptr is not defined.
"strings.ecpp", line 7: Error: _poptr is not defined.
13 Error(s) and 5 Warning(s) detected.
gmake[1]: *** [strings.lo] Error 1
gmake[1]: Leaving directory `/h/goanna/2/ts/tntnet/tntnet/sdk/demos/strings'
gmake: *** [all-recursive] Error 1
If type could start with ::, then it would need a space between
< and type as well, as <: is a digraph token, a synonym for [ .
Thanks, Mark
--
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general