You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.8 KiB

  1. // Module: Log4CPLUS
  2. // File: cygwin-win32.cxx
  3. // Created: 7/2011
  4. // Author: Vaclav Zeman
  5. //
  6. // Copyright (C) 2011, 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. #if defined (__CYGWIN__)
  29. #include <log4cplus/internal/cygwin-win32.h>
  30. // This is intentionally included directly instead of through
  31. // windowsh-inc.h.
  32. #include <winsock2.h>
  33. namespace log4cplus { namespace cygwin {
  34. unsigned long
  35. get_current_win32_thread_id ()
  36. {
  37. return GetCurrentThreadId ();
  38. }
  39. } } // namespace log4cplus { namespace cygwin {
  40. #endif // defined (__CYGWIN__)