Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

replacements.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 _replacements_h_
00021 #define _replacements_h_
00022 
00023 /* $Id: replacements.h,v 1.18 2007/12/21 09:06:53 freddy77 Exp $ */
00024 
00025 #include <stdarg.h>
00026 #include "tds_sysdep_public.h"
00027 
00028 #ifndef HAVE_READPASSPHRASE
00029 # include <replacements/readpassphrase.h>
00030 #else
00031 # include <readpassphrase.h>
00032 #endif
00033 
00034 /* these headers are needed for basename */
00035 #ifdef HAVE_STRING_H
00036 # include <string.h>
00037 #endif
00038 #ifdef HAVE_LIBGEN_H
00039 # include <libgen.h>
00040 #endif
00041 
00042 #if defined(__GNUC__) && __GNUC__ >= 4
00043 #pragma GCC visibility push(hidden)
00044 #endif
00045 
00046 #ifdef __cplusplus
00047 extern "C"
00048 {
00049 #if 0
00050 }
00051 #endif
00052 #endif
00053 
00054 #if defined(HAVE__VSNPRINTF) && !defined(HAVE_VSNPRINTF)
00055 #undef vsnprintf
00056 #define vsnprintf _vsnprintf
00057 #elif !HAVE_VSNPRINTF
00058 int vsnprintf(char *ret, size_t max, const char *fmt, va_list ap);
00059 #endif /* !HAVE_VSNPRINTF */
00060 
00061 #if !HAVE_ASPRINTF
00062 int asprintf(char **ret, const char *fmt, ...);
00063 #endif /* !HAVE_ASPRINTF */
00064 
00065 #if !HAVE_VASPRINTF
00066 int vasprintf(char **ret, const char *fmt, va_list ap);
00067 #endif /* !HAVE_VASPRINTF */
00068 
00069 #if !HAVE_ATOLL
00070 tds_sysdep_int64_type atoll(const char *nptr);
00071 #endif /* !HAVE_ATOLL */
00072 
00073 #if !HAVE_STRTOK_R
00074 char *strtok_r(char *str, const char *sep, char **lasts);
00075 #endif /* !HAVE_STRTOK_R */
00076 
00077 #if HAVE_STRLCPY
00078 #define tds_strlcpy(d,s,l) strlcpy(d,s,l)
00079 #else
00080 size_t tds_strlcpy(char *dest, const char *src, size_t len);
00081 #endif
00082 
00083 #if HAVE_STRLCAT
00084 #define tds_strlcat(d,s,l) strlcat(d,s,l)
00085 #else
00086 size_t tds_strlcat(char *dest, const char *src, size_t len);
00087 #endif
00088 
00089 #if HAVE_BASENAME
00090 #define tds_basename(s) basename(s)
00091 #else
00092 char *tds_basename(char *path);
00093 #endif
00094 
00095 #if defined(WIN32)
00096 int gettimeofday (struct timeval *tv, void *tz);
00097 #endif
00098 
00099 #ifdef __cplusplus
00100 #if 0
00101 {
00102 #endif
00103 }
00104 #endif
00105 
00106 #if defined(__GNUC__) && __GNUC__ >= 4
00107 #pragma GCC visibility pop
00108 #endif
00109 
00110 #endif

Generated on Sun Sep 21 04:23:17 2008 for FreeTDS API by  doxygen 1.4.1