Main Page | Modules | Class List | Directories | File List | Class 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 #undef TDS_RCSID
00024 #if defined(__GNUC__) && __GNUC__ >= 3
00025 #define TDS_RCSID(name, id) \
00026         static const char rcsid_##name[] __attribute__ ((unused)) = id
00027 #else
00028 #define TDS_RCSID(name, id) \
00029         static const char rcsid_##name[] = id; \
00030         static const void *const no_unused_##name##_warn[] = { rcsid_##name, no_unused_##name##_warn }
00031 #endif
00032 
00033 TDS_RCSID(tds_sysdep_private_h, "$Id: tds_sysdep_private.h,v 1.18 2005/08/09 10:57:55 freddy77 Exp $");
00034 
00035 #define TDS_ADDITIONAL_SPACE 0
00036 
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #if 0
00041 }
00042 #endif
00043 #endif
00044 
00045 #ifdef __INCvxWorksh
00046 #include <ioLib.h>              /* for FIONBIO */
00047 #endif                          /* __INCvxWorksh */
00048 
00049 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00050 #include <windows.h>
00051 #define READSOCKET(a,b,c)       recv((a), (b), (c), 0L)
00052 #define WRITESOCKET(a,b,c)      send((a), (b), (c), 0L)
00053 #define CLOSESOCKET(a)          closesocket((a))
00054 #define IOCTLSOCKET(a,b,c)      ioctlsocket((a), (b), (c))
00055 #define NETDB_REENTRANT 1       /* BSD-style netdb interface is reentrant */
00056 
00057 #define TDSSOCK_EINTR WSAEINTR
00058 #define TDSSOCK_EINPROGRESS WSAEWOULDBLOCK
00059 #define sock_errno WSAGetLastError()
00060 #ifndef __MINGW32__
00061 typedef DWORD pid_t;
00062 #endif
00063 #define strcasecmp stricmp
00064 #define strncasecmp strnicmp
00065 #define atoll _atoi64
00066 #define vsnprintf _vsnprintf
00067 
00068 #ifndef WIN32
00069 #define WIN32 1
00070 #endif
00071 
00072 #define TDS_SDIR_SEPARATOR "\\"
00073 
00074 #endif /* defined(WIN32) || defined(_WIN32) || defined(__WIN32__) */
00075 
00076 #ifndef sock_errno
00077 #define sock_errno errno
00078 #endif
00079 
00080 #ifndef TDSSOCK_EINTR
00081 #define TDSSOCK_EINTR EINTR
00082 #endif
00083 
00084 #ifndef TDSSOCK_EINPROGRESS 
00085 #define TDSSOCK_EINPROGRESS EINPROGRESS
00086 #endif
00087 
00088 #ifndef READSOCKET
00089 #define READSOCKET(a,b,c)       read((a), (b), (c))
00090 #endif /* !READSOCKET */
00091 
00092 #ifndef WRITESOCKET
00093 #define WRITESOCKET(a,b,c)      write((a), (b), (c))
00094 #endif /* !WRITESOCKET */
00095 
00096 #ifndef CLOSESOCKET
00097 #define CLOSESOCKET(a)          close((a))
00098 #endif /* !CLOSESOCKET */
00099 
00100 #ifndef IOCTLSOCKET
00101 #define IOCTLSOCKET(a,b,c)      ioctl((a), (b), (c))
00102 #endif /* !IOCTLSOCKET */
00103 
00104 #ifndef TDS_SDIR_SEPARATOR
00105 #define TDS_SDIR_SEPARATOR "/"
00106 #endif /* !TDS_SDIR_SEPARATOR */
00107 
00108 #ifdef __cplusplus
00109 #if 0
00110 {
00111 #endif
00112 }
00113 #endif
00114 
00115 #endif /* _tds_sysdep_private_h_ */

Generated on Thu Sep 1 00:41:50 2005 for FreeTDS API by  doxygen 1.4.4