Subject: Re: [libssh2] 32bit variables!

Re: [libssh2] 32bit variables!

From: Satish Mittal <satish.mittal_at_gmail.com>
Date: Sat, 11 Nov 2006 15:45:37 +0530

But finally we need to ensure that libssh2 runs clean on 64 bit unix
platforms as well. So will we have a typedef for int datatypes, that would
resolve to 64bit type on 64 bit platforms? How do we ensure that in libcurl?

On 11/11/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> Hey
>
> We really need to address the problem with the (ab)using longs all over
> the
> code to hold 32bit values. (Most) 64bit architectures will use 64bit types
> for
> that and I think it is error-prone (and likely to introduce compiler
> warnings)
> to continue this habit. Like when we call libssh2_ntohu32() etc.
>
> I values we read and write to the protocol layer as 32bit, i.e that HAVE
> to be
> 32bit, use the types int32_t and uint32_t.
>
> I believe that is in C99 (and The Single UNIX Specification *), so we
> would
> only need to add some configure magic to check for it and possibly typedef
> our
> own version if built on old systems.
>
> [*] = http://www.opengroup.org/onlinepubs/007908799/xsh/inttypes.h.html
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> libssh2-devel mailing list
> libssh2-devel_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libssh2-devel
>

-- 
"The happiest of people donĀ“t necessarily have the best of everything, they
just make the most of everything that comes along their way."
Received on 2006-11-11