Skip to content

Commit

Permalink
try fixing compilation on windows (microsoft/cppwinrt#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
jungikim committed Feb 3, 2024
1 parent 4588339 commit a5182bf
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/iconv_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#include "iconv_utils.h"

#if defined(_WIN32) && !defined(__CYGWIN__)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "windows.h"
#endif

Expand Down
3 changes: 3 additions & 0 deletions src/iconv_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#endif

#if defined(_WIN32) && !defined(__CYGWIN__)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include "windows.h"
#endif

Expand Down
3 changes: 3 additions & 0 deletions src/libmecab-ko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// Copyright(C) 2001-2006 Taku Kudo <[email protected]>
// Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation
#if defined(_WIN32) && !defined(__CYGWIN__)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

Expand Down
3 changes: 3 additions & 0 deletions src/mecab-ko.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ extern "C" {
#endif

#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
# ifdef DLL_EXPORT
# define MECAB_KO_DLL_EXTERN __declspec(dllexport)
Expand Down
3 changes: 3 additions & 0 deletions src/mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ extern "C" {

#if defined(_WIN32) && !defined(__CYGWIN__)
#ifdef HAVE_WINDOWS_H
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif
#else
Expand Down
3 changes: 3 additions & 0 deletions src/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include <pthread.h>
#else
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <process.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#endif

#ifdef HAVE_WINDOWS_H
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <stdlib.h>
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/winmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// Copyright(C) 2004-2006 Nippon Telegraph and Telephone Corporation
#if defined(_WIN32) || defined(__CYGWIN__)

#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <string>

Expand Down

0 comments on commit a5182bf

Please sign in to comment.