Subject: [libssh2] 32bit variables!

[libssh2] 32bit variables!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 11 Nov 2006 11:04:00 +0100 (CET)

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
Received on 2006-11-11