forked from I2P_Developers/i2p.i2p
Some winsock improvements
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#define NO_GETHOSTBYNAME2
|
||||
#define NO_INET_ATON /* implies NO_INET_PTON */
|
||||
#define NO_INET_NTOP
|
||||
#define NO_SSIZE_T
|
||||
#define NO_STRL
|
||||
#define NO_Z_FORMAT
|
||||
#define WINSOCK
|
||||
@@ -103,6 +104,7 @@
|
||||
#endif
|
||||
#ifdef WINSOCK
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -112,10 +114,12 @@
|
||||
*/
|
||||
#ifdef WINSOCK
|
||||
typedef SOCKET socket_t;
|
||||
typedef signed long ssize_t;
|
||||
#else
|
||||
typedef int socket_t;
|
||||
#endif
|
||||
#ifdef NO_SSIZE_T
|
||||
typedef signed long ssize_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prints out the file name, line number, and function name before log message
|
||||
|
@@ -86,7 +86,7 @@ extern samerr_t sam_connect(const char *samhost, uint16_t samport,
|
||||
const char *destname, sam_conn_t style, uint_t tunneldepth);
|
||||
extern void sam_naming_lookup(const char *name);
|
||||
extern bool sam_read_buffer(void);
|
||||
extern char *sam_strerror(samerr_t code);
|
||||
extern const char *sam_strerror(samerr_t code);
|
||||
/* SAM controls - callbacks */
|
||||
extern void (*sam_diedback)(void);
|
||||
extern void (*sam_logback)(char *str);
|
||||
|
Reference in New Issue
Block a user