Checks for ssize_t

Works around the different typedef of ssize_t in MinGW
This commit is contained in:
Frank Morgner
2015-09-19 02:39:33 +02:00
parent b1b7616c24
commit d9dfc2c697
2 changed files with 8 additions and 0 deletions

View File

@@ -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.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_CHECK_DECLS([SO_NOSIGPIPE], [], [], [#include <sys/socket.h>])
AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [#include <sys/socket.h>])

View File

@@ -19,10 +19,17 @@
#ifndef _VPCD_H_
#define _VPCD_H_
#if HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef _WIN32
#include <stddef.h>
#include <winsock2.h>
#ifndef HAVE_CONFIG_H
/* we assume that ./configure has not defined ssize_t for us */
typedef int ssize_t;
#endif
#else
#define SOCKET int
#include <unistd.h>