aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-12-01 16:15:54 +0100
committerAndreas Schneider <mail@cynapses.org>2009-12-01 16:15:54 +0100
commit48b719cf68db72f77a650e235ffa87bdd925ed6b (patch)
treef8da1e5252c785b5e7f372252028f1a6875b9fc8 /include
parent96afa4530c98447d1d8a8971da8cc84168983e81 (diff)
downloadlibssh-48b719cf68db72f77a650e235ffa87bdd925ed6b.tar.gz
libssh-48b719cf68db72f77a650e235ffa87bdd925ed6b.tar.xz
libssh-48b719cf68db72f77a650e235ffa87bdd925ed6b.zip
Fixed uint* to work on Windows.
Thanks to Patrick Spendrin.
Diffstat (limited to 'include')
-rw-r--r--include/libssh/callbacks.h4
-rw-r--r--include/libssh/libssh.h4
-rw-r--r--include/libssh/pcap.h4
-rw-r--r--include/libssh/priv.h2
4 files changed, 9 insertions, 5 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h
index c7a9e3cf..af821409 100644
--- a/include/libssh/callbacks.h
+++ b/include/libssh/callbacks.h
@@ -169,9 +169,9 @@ typedef int (*ssh_packet_callback) (ssh_session session, uint8_t type, ssh_buffe
struct ssh_packet_callbacks_struct {
/** Index of the first packet type being handled */
- u_int8_t start;
+ uint8_t start;
/** Number of packets being handled by this callback struct */
- u_int8_t n_callbacks;
+ uint8_t n_callbacks;
/** A pointer to n_callbacks packet callbacks */
ssh_packet_callback *callbacks;
void *user;
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index a17e90a2..b8462209 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -50,6 +50,7 @@
#ifdef _MSC_VER
/* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
+ typedef int int32_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
@@ -62,6 +63,9 @@
#ifdef _WIN32
#include <winsock2.h>
+ #ifndef socklen_t
+ #define socklen_t int
+ #endif
#else /* _WIN32 */
#include <sys/select.h> /* for fd_set * */
#include <netdb.h>
diff --git a/include/libssh/pcap.h b/include/libssh/pcap.h
index 831a5647..2026f470 100644
--- a/include/libssh/pcap.h
+++ b/include/libssh/pcap.h
@@ -7,7 +7,7 @@
#ifdef WITH_PCAP
typedef struct ssh_pcap_context_struct* ssh_pcap_context;
-int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, u_int32_t original_len);
+int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, uint32_t original_len);
ssh_pcap_context ssh_pcap_context_new(ssh_session session);
void ssh_pcap_context_free(ssh_pcap_context ctx);
@@ -18,7 +18,7 @@ enum ssh_pcap_direction{
};
void ssh_pcap_context_set_file(ssh_pcap_context, ssh_pcap_file);
int ssh_pcap_context_write(ssh_pcap_context,enum ssh_pcap_direction direction, void *data,
- u_int32_t len, u_int32_t origlen);
+ uint32_t len, uint32_t origlen);
#endif /* WITH_PCAP */
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 137cdb25..97500fd4 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -143,7 +143,7 @@ int ssh_packet_socket_callback(const void *data, size_t len, void *user);
void ssh_packet_register_socket_callback(ssh_session session, struct socket *s);
void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks);
void ssh_packet_set_default_callbacks(ssh_session session);
-void ssh_packet_process(ssh_session session, u_int8_t type);
+void ssh_packet_process(ssh_session session, uint8_t type);
/* connect.c */
int ssh_regex_init(void);
void ssh_regex_finalize(void);