Skip to content

Commit

Permalink
Merge pull request #2647 from moriyoshi/moriyoshi/cygwin-x86_64-support
Browse files Browse the repository at this point in the history
Cygwin x86_64 support.
  • Loading branch information
ruil2 committed Jan 23, 2017
2 parents 2c6185a + 121859e commit 47aedcf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
20 changes: 20 additions & 0 deletions build/platform-cygwin_nt.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include $(SRC_PATH)build/x86-common.mk
SHAREDLIB_DIR = $(PREFIX)/bin
SHAREDLIBSUFFIX = dll
SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX)
SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX)
EXTRA_LIBRARY=$(LIBPREFIX)$(PROJECT_NAME).dll.a
SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY)
CFLAGS += -MMD -MP
LDFLAGS +=
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
CC = x86_64-pc-cygwin-gcc
CXX = x86_64-pc-cygwin-g++
AR = x86_64-pc-cygwin-gcc-ar
else
ASMFLAGS += -f win32 -DPREFIX
endif
EXEEXT = .exe

2 changes: 1 addition & 1 deletion codec/common/inc/WelsThreadLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
extern "C" {
#endif

#if defined(_WIN32)
#if defined(_WIN32) || defined(__CYGWIN__)

#include <windows.h>

Expand Down
6 changes: 3 additions & 3 deletions codec/common/src/WelsThreadLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define _GNU_SOURCE
#endif
#include <sched.h>
#elif !defined(_WIN32)
#elif !defined(_WIN32) && !defined(__CYGWIN__)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/param.h>
Expand All @@ -67,7 +67,7 @@
#include <stdlib.h>


#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)

#ifdef WINAPI_FAMILY
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
Expand Down Expand Up @@ -129,7 +129,7 @@ WELS_THREAD_ERROR_CODE WelsMutexDestroy (WELS_MUTEX* mutex) {

#endif /* !_WIN32 */

#ifdef _WIN32
#if defined(_WIN32) || defined(__CYGWIN__)

WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* event, const char* event_name) {
WELS_EVENT h = CreateEvent (NULL, FALSE, FALSE, NULL);
Expand Down

0 comments on commit 47aedcf

Please sign in to comment.