Merge pull request #3755 from pentagra/master

ifdef's for Cygwin compilation
This commit is contained in:
Martin Fleisz 2017-02-14 12:42:10 +01:00 committed by GitHub
commit 096de0f7dd
5 changed files with 6 additions and 4 deletions

View File

@ -61,7 +61,7 @@
typedef UINT32 ssize_t;
typedef UINT32 mode_t;
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
#define STAT stat
#define OPEN open
#define LSEEK lseek

View File

@ -21,7 +21,9 @@
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#ifndef __CYGWIN__
#include <sys/syscall.h>
#endif
#include <unistd.h>
#include <fcntl.h>

View File

@ -60,7 +60,7 @@ WINPR_API HMODULE LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFl
#endif
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__CYGWIN__)
#ifdef __cplusplus
extern "C" {

View File

@ -166,7 +166,7 @@ HMODULE LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
#endif
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__CYGWIN__)
FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName)
{

View File

@ -923,7 +923,7 @@ int WSAIoctl(SOCKET s, DWORD dwIoControlCode, LPVOID lpvInBuffer,
next_ifreq:
#if !defined(__linux__) && !defined(__sun__)
#if !defined(__linux__) && !defined(__sun__) && !defined(__CYGWIN__)
ifreq_len = IFNAMSIZ + ifreq->ifr_addr.sa_len;
#else
ifreq_len = sizeof(*ifreq);