Checks for ssize_t
Works around the different typedef of ssize_t in MinGW
This commit is contained in:
@@ -200,6 +200,7 @@ AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h sys/socket.h sys/time.h
|
|||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
AC_TYPE_UINT16_T
|
AC_TYPE_UINT16_T
|
||||||
AC_CHECK_DECLS([SO_NOSIGPIPE], [], [], [#include <sys/socket.h>])
|
AC_CHECK_DECLS([SO_NOSIGPIPE], [], [], [#include <sys/socket.h>])
|
||||||
AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [#include <sys/socket.h>])
|
AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [#include <sys/socket.h>])
|
||||||
|
|||||||
@@ -19,10 +19,17 @@
|
|||||||
#ifndef _VPCD_H_
|
#ifndef _VPCD_H_
|
||||||
#define _VPCD_H_
|
#define _VPCD_H_
|
||||||
|
|
||||||
|
#if HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#ifndef HAVE_CONFIG_H
|
||||||
|
/* we assume that ./configure has not defined ssize_t for us */
|
||||||
typedef int ssize_t;
|
typedef int ssize_t;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define SOCKET int
|
#define SOCKET int
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user