Guen.
Guenter <devf...@novell.com> wrote in
news:VRzNg.1019$lb5...@prv-forum2.provo.novell.com:
> Hi,
> some time ago ASF has released mod_jk 1.2.18 (shippping NW product);
> this version introduced some long long stuff which gives me some issues,
> and one is that it seems to me that our CLIB printf() doesnt like to
> print long long ...?? Also tested with NWprintf() which gave same
> result:
>
> Loading module TPRINTF.NLM
> tprintf Test Commandline Utility (CLIB) - mwccnlm build
> Version 0.01 12 September 2006
> (c) Copyright 2005 G. Knauf <in...@gknw.de>
> TPRINTF.NLM will run on any processor
> Module TPRINTF.NLM load status OK
> sizeof(jk_uint32_t) : 4
> sizeof(jk_uint64_t) : 8
> jk_uint32_t is set to ffffffff hex - 4294967295 dez
> jk_uint64_t is set to ffffffff hex - 4294967295 dez
>
> same source compiled with LIBC returns what I expect:
>
> Loading module TPRINTF.NLM
> tprintf Test Commandline Utility (LIBC) - mwccnlm build
> Version 0.01 12 September 2006
> (c) Copyright 2005 G. Knauf <in...@gknw.de>
> TPRINTF.NLM will run on any processor
> Module TPRINTF.NLM load status OK
> sizeof(jk_uint32_t) : 4
> sizeof(jk_uint64_t) : 8
> jk_uint32_t is set to ffffffff hex - 4294967295 dez
> jk_uint64_t is set to ffffffffffffffff hex - 18446744073709551615 dez
>
> I've also tested back to NW 4.11 with same result - so where's the trick
> to print out long long values with CLIB?? I cant believe that its
> impossible, or?
>
> Guen.
>
>
> begin 644 tprintf.zip
> Attachment decoded: tprintf.zip
> `
> end
>
>
long long val = (some really big number);
char storage[20], *s;
s = lltoa( val, storage, 10 );
printf( "long long value is: %s", s );
It requires no context--and then use clib's printf to render the
returned string. I don't think clib had lltoa, so you could just add it
to your NLM's import list: I'm pretty sure it's a klib-level function.
Russ
Russell Bateman <ru...@windofkeltia.com> wrote in
news:TeHNg.1748$lb5...@prv-forum2.provo.novell.com:
> Sniff no longer, Günter, I called McGyver and he told me just to call
> lltoa in LibC:
>
> long long val = (some really big number);
> char storage[20], *s;
>
> s = lltoa( val, storage, 10 );
> printf( "long long value is: %s", s );
>
>
> It requires no context--and then use clib's printf to render the
> returned string. I don't think clib had lltoa, so you could just add it
> to your NLM's import list: I'm pretty sure it's a klib-level function.
thanks for the cool hack! Unfortunately its not that simple for me:
I have the problem with mod_jk; and the above was only one of two probs I
have: when it comes to link stage I get unresolved:
tstdiv.o -o tstdiv.nlm -commandfile tstdiv.def
### mwldnlm Linker Error:
# Undefined symbol: _rt_modu64%16 in
# tstdiv.o
### mwldnlm Linker Error:
# Undefined symbol: _rt_mul64%16 in
# tstdiv.o
### mwldnlm Linker Error:
# Undefined symbol: _rt_divu64%16 in
# tstdiv.o
and its not a useful option to just call into LibC even if its possible
because those using the CLIB build of mod_jk are most likely on older
NetWare versions (NW 5.0, 5.1 and 6.0) which probably dont have recent
LibC, and then might cause other trouble....
So I'm more on the way to decide that from now on we drop support for
NetWare CLIB builds of mod_jk for Apache 1.3.x and Netscape server;
anyway there's no Novell developer anymore hwo cares about mod_jk - so why
should I twist my mind? No user feedback at all is another reason which
makes me feel that anyway nobody uses this stuff anymore...
thanks though for your suggestion!
greetz, Guenter.
Anyway, I'll bet Jeff would just send you the code to lltoa() if you
asked. It's pretty simple (I remember because I'm pretty sure I wrote
it) or you could get it from Free BSD. If you compiled in your clib
program, then you'd get the equivalent stuff to _rt_mod... from there no
problem.
Best regards,
Russ