Main Page Modules Compound List File List Compound Members File Members Related Pages

# tds_sysdep_private.h

    00001 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
    00002  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004  Brian Bruns
    00003  *
    00004  * This library is free software; you can redistribute it and/or
    00005  * modify it under the terms of the GNU Library General Public
    00006  * License as published by the Free Software Foundation; either
    00007  * version 2 of the License, or (at your option) any later version.
    00008  *
    00009  * This library is distributed in the hope that it will be useful,
    00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  * Library General Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Library General Public
    00015  * License along with this library; if not, write to the
    00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017  * Boston, MA 02111-1307, USA.
    00018  */
    00019
    00020 #ifndef _tds_sysdep_private_h_
    00021 #define _tds_sysdep_private_h_
    00022
    00023 static const char rcsid_tds_sysdep_private_h[] = "$Id: tds_sysdep_private.h,v 1.15 2004/10/28 12:42:12 freddy77 Exp $";
    00024 static const void *const no_unused_tds_sysdep_private_h_warn[] = { rcsid_tds_sysdep_private_h, no_unused_tds_sysdep_private_h_warn };
    00025
    00026 #ifdef __cplusplus
    00027 extern "C"
    00028 {
    00029 #if 0
    00030 }
    00031 #endif
    00032 #endif
    00033
    00034 #ifdef __INCvxWorksh
    00035 #include <ioLib.h>              /* for FIONBIO */
    00036 #endif                          /* __INCvxWorksh */
    00037
    00038 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
    00039 #include <windows.h>
    00040 #define READSOCKET(a,b,c)       recv((a), (b), (c), 0L)
    00041 #define WRITESOCKET(a,b,c)      send((a), (b), (c), 0L)
    00042 #define CLOSESOCKET(a)          closesocket((a))
    00043 #define IOCTLSOCKET(a,b,c)      ioctlsocket((a), (b), (c))
    00044 #define NETDB_REENTRANT 1       /* BSD-style netdb interface is reentrant */
    00045
    00046 #define TDSSOCK_EINTR WSAEINTR
    00047 #define TDSSOCK_EINPROGRESS WSAEWOULDBLOCK
    00048 #define getpid() GetCurrentThreadId()
    00049 #define sock_errno WSAGetLastError()
    00050 #ifndef __MINGW32__
    00051 typedef DWORD pid_t;
    00052 #endif
    00053 #define strcasecmp stricmp
    00054 #define strncasecmp strnicmp
    00055 #define atoll _atoi64
    00056 #define vsnprintf _vsnprintf
    00057
    00058 #ifndef WIN32
    00059 #define WIN32 1
    00060 #endif
    00061
    00062 #define TDS_SDIR_SEPARATOR "\\"
    00063
    00064 #endif /* defined(WIN32) || defined(_WIN32) || defined(__WIN32__) */
    00065
    00066 #ifndef sock_errno
    00067 #define sock_errno errno
    00068 #endif
    00069
    00070 #ifndef TDSSOCK_EINTR
    00071 #define TDSSOCK_EINTR EINTR
    00072 #endif
    00073
    00074 #ifndef TDSSOCK_EINPROGRESS
    00075 #define TDSSOCK_EINPROGRESS EINPROGRESS
    00076 #endif
    00077
    00078 #ifndef READSOCKET
    00079 #define READSOCKET(a,b,c)       read((a), (b), (c))
    00080 #endif /* !READSOCKET */
    00081
    00082 #ifndef WRITESOCKET
    00083 #define WRITESOCKET(a,b,c)      write((a), (b), (c))
    00084 #endif /* !WRITESOCKET */
    00085
    00086 #ifndef CLOSESOCKET
    00087 #define CLOSESOCKET(a)          close((a))
    00088 #endif /* !CLOSESOCKET */
    00089
    00090 #ifndef IOCTLSOCKET
    00091 #define IOCTLSOCKET(a,b,c)      ioctl((a), (b), (c))
    00092 #endif /* !IOCTLSOCKET */
    00093
    00094 #ifndef TDS_SDIR_SEPARATOR
    00095 #define TDS_SDIR_SEPARATOR "/"
    00096 #endif /* !TDS_SDIR_SEPARATOR */
    00097
    00098 #ifdef __cplusplus
    00099 #if 0
    00100 {
    00101 #endif
    00102 }
    00103 #endif
    00104
    00105 #endif /* _tds_sysdep_private_h_ */