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  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 char rcsid_tds_sysdep_private_h[] = "$Id: tds_sysdep_private.h,v 1.11 2003/12/29 16:08:03 freddy77 Exp $";
00024 static void *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 WSAEINPROGRESS
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 #endif /* defined(WIN32) || defined(_WIN32) || defined(__WIN32__) */
00063 
00064 #ifndef sock_errno
00065 #define sock_errno errno
00066 #endif
00067 
00068 #ifndef TDSSOCK_EINTR
00069 #define TDSSOCK_EINTR EINTR
00070 #endif
00071 
00072 #ifndef TDSSOCK_EINPROGRESS 
00073 #define TDSSOCK_EINPROGRESS EINPROGRESS
00074 #endif
00075 
00076 #ifndef READSOCKET
00077 #define READSOCKET(a,b,c)       read((a), (b), (c))
00078 #endif /* !READSOCKET */
00079 
00080 #ifndef WRITESOCKET
00081 #define WRITESOCKET(a,b,c)      write((a), (b), (c))
00082 #endif /* !WRITESOCKET */
00083 
00084 #ifndef CLOSESOCKET
00085 #define CLOSESOCKET(a)          close((a))
00086 #endif /* !CLOSESOCKET */
00087 
00088 #ifndef IOCTLSOCKET
00089 #define IOCTLSOCKET(a,b,c)      ioctl((a), (b), (c))
00090 #endif /* !IOCTLSOCKET */
00091 
00092 #ifdef __cplusplus
00093 #if 0
00094 {
00095 #endif
00096 }
00097 #endif
00098 
00099 #endif /* _tds_sysdep_private_h_ */

Generated on Mon Mar 22 21:57:15 2004 for FreeTDS API by doxygen1.3