Subject: [libssh2] 32bit variables!

[libssh2] 32bit variables!

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


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.

[*] =

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
libssh2-devel mailing list
Received on 2006-11-11