diff options
author | <shinichiro.hamaji@gmail.com> | 2009-01-22 18:22:48 +0000 |
---|---|---|
committer | <shinichiro.hamaji@gmail.com> | 2009-01-22 18:22:48 +0000 |
commit | c3441fb6bafd1646e239b9e36e84272c31f8d4b1 (patch) | |
tree | ca86a2194955c9b30ae8404577ca8176a468eb19 /src/base | |
parent | e31a91b6502b3d15ecd7c2d1b518fafbc7234572 (diff) | |
download | glog-c3441fb6bafd1646e239b9e36e84272c31f8d4b1.tar.gz glog-c3441fb6bafd1646e239b9e36e84272c31f8d4b1.tar.bz2 glog-c3441fb6bafd1646e239b9e36e84272c31f8d4b1.zip |
Better Cygwin support.
- configure.ac: Add -lpthread only if acx_pthread_ok is yes. In cygwin, we use Windows' thread so that we don't need -lpthread.
- base/mutex.h: Define NOMINMAX before we include windows.h.
- glog/*.h: Make sure that dllimport doesn't appear in cygwin. Note that windows.h may define _WIN32 macro.
- utilities.h: Define OS_CYGWIN.
git-svn-id: https://google-glog.googlecode.com/svn/trunk@30 eb4d4688-79bd-11dd-afb4-1d65580434c0
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/mutex.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/mutex.h b/src/base/mutex.h index 4a0cc2d..090f503 100644 --- a/src/base/mutex.h +++ b/src/base/mutex.h @@ -79,7 +79,7 @@ #elif defined(HAVE_PTHREAD) # include <pthread.h> typedef pthread_mutex_t MutexType; -#elif defined(OS_WINDOWS) +#elif defined(OS_WINDOWS) || defined(OS_CYGWIN) # define WIN32_LEAN_AND_MEAN // We only need minimal includes # ifdef GMUTEX_TRYLOCK // We need Windows NT or later for TryEnterCriticalSection(). If you @@ -91,6 +91,8 @@ # endif // To avoid macro definition of ERROR. # define NOGDI +// To avoid macro definition of min/max. +# define NOMINMAX # include <windows.h> typedef CRITICAL_SECTION MutexType; #else |