1 // Module: Log4CPLUS
2 // File: cygwin-win32.cxx
3 // Created: 7/2011
4 // Author: Vaclav Zeman
5 //
6 // Copyright (C) 2011-2013, Vaclav Zeman. All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without modifica-
9 // tion, are permitted provided that the following conditions are met:
10 //
11 // 1. Redistributions of source code must retain the above copyright notice,
12 // this list of conditions and the following disclaimer.
13 //
14 // 2. Redistributions in binary form must reproduce the above copyright notice,
15 // this list of conditions and the following disclaimer in the documentation
16 // and/or other materials provided with the distribution.
17 //
18 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 // APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
23 // DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24 // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 #if defined (__CYGWIN__)
30
31 // Work around missing _X86_ symbol with Clang on Cygwin.
32 #if ! defined (_X86_) && defined (__i386__)
33 # define _X86_ 1
34 #endif
35
36 #include <log4cplus/internal/cygwin-win32.h>
37
38 // This is intentionally included directly instead of through
39 // windowsh-inc.h.
40 #include <winsock2.h>
41
42
43 namespace log4cplus { namespace cygwin {
44
45 unsigned long
get_current_win32_thread_id()46 get_current_win32_thread_id ()
47 {
48 return GetCurrentThreadId ();
49 }
50
51 } } // namespace log4cplus { namespace cygwin {
52
53 #endif // defined (__CYGWIN__)
54