![]() |
|||||
|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: unixem/internal/winsock.h 00003 * 00004 * Purpose: Internal utility header for introducing WinSock (in order to 00005 * support timeval and gethostname()). 00006 * 00007 * Created: 28th December 2007 00008 * Updated: 5th February 2010 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2007-2010, Matthew Wilson and Synesis Software 00013 * All rights reserved. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are 00017 * met: 00018 * 00019 * - Redistributions of source code must retain the above copyright notice, 00020 * this list of conditions and the following disclaimer. 00021 * - Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in the 00023 * documentation and/or other materials provided with the distribution. 00024 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the 00025 * names of any contributors may be used to endorse or promote products 00026 * derived from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00029 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00035 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00036 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00037 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00038 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * 00040 * ////////////////////////////////////////////////////////////////////// */ 00041 00042 00047 #ifndef UNIXEM_INCL_UNIXEM_INTERNAL_H_WINSOCK 00048 #define UNIXEM_INCL_UNIXEM_INTERNAL_H_WINSOCK 00049 00050 /* ///////////////////////////////////////////////////////////////////////// 00051 * Version 00052 */ 00053 00054 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00055 # define UNIXEM_VER_UNIXEM_INTERNAL_H_WINSOCK_MAJOR 1 00056 # define UNIXEM_VER_UNIXEM_INTERNAL_H_WINSOCK_MINOR 0 00057 # define UNIXEM_VER_UNIXEM_INTERNAL_H_WINSOCK_REVISION 1 00058 # define UNIXEM_VER_UNIXEM_INTERNAL_H_WINSOCK_EDIT 4 00059 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00060 00061 /* ///////////////////////////////////////////////////////////////////////// 00062 * Includes 00063 */ 00064 00065 #include <unixem/unixem.h> 00066 00067 #if !defined(WIN32_LEAN_AND_MEAN) 00068 # if defined(_WINSOCKAPI_) || \ 00069 defined(_WINSOCK_H) 00070 # define UNIXEM_WINSOCK_IS_INCLUDED 00071 # endif /* winsock.h */ 00072 # if defined(_WINSOCK2API_) || \ 00073 defined(_WINSOCK2_H) 00074 # define UNIXEM_WINSOCK2_IS_INCLUDED 00075 # endif /* winsock2.h */ 00076 00077 # if !defined(UNIXEM_WINSOCK_IS_INCLUDED) && \ 00078 !defined(UNIXEM_WINSOCK2_IS_INCLUDED) 00079 # if _WIN32_WINNT >= 0x0400 00080 # include <winsock2.h> 00081 # define UNIXEM_WINSOCK_IS_INCLUDED 00082 # define UNIXEM_WINSOCK2_IS_INCLUDED 00083 # else /* _WIN32_WINNT */ 00084 # include <winsock.h> 00085 # define UNIXEM_WINSOCK_IS_INCLUDED 00086 # endif /* _WIN32_WINNT >= 0x0400 */ 00087 # endif /* winsock ? */ 00088 #endif /* !WIN32_LEAN_AND_MEAN */ 00089 00090 /* ////////////////////////////////////////////////////////////////////// */ 00091 00092 #endif /* UNIXEM_INCL_UNIXEM_INTERNAL_H_WINSOCK */ 00093 00094 /* ///////////////////////////// end of file //////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010 |