include/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 #ifdef __cplusplus
00024 extern "C"
00025 {
00026 #if 0
00027 }
00028 #endif
00029 #endif
00030 
00031 /* $Id: replacements.h,v 1.14 2005/12/21 08:06:54 freddy77 Exp $ */
00032 
00033 #include <stdarg.h>
00034 #include "tds_sysdep_public.h"
00035 
00036 #if !HAVE_VSNPRINTF
00037 int vsnprintf(char *ret, size_t max, const char *fmt, va_list ap);
00038 #endif /* !HAVE_VSNPRINTF */
00039 
00040 #if !HAVE_ASPRINTF
00041 int asprintf(char **ret, const char *fmt, ...);
00042 #endif /* !HAVE_ASPRINTF */
00043 
00044 #if !HAVE_VASPRINTF
00045 int vasprintf(char **ret, const char *fmt, va_list ap);
00046 #endif /* !HAVE_VASPRINTF */
00047 
00048 #if !HAVE_ATOLL
00049 tds_sysdep_int64_type atoll(const char *nptr);
00050 #endif /* !HAVE_ATOLL */
00051 
00052 #if !HAVE_STRTOK_R
00053 char *strtok_r(char *str, const char *sep, char **lasts);
00054 #endif /* !HAVE_STRTOK_R */
00055 
00056 #ifndef HAVE_READPASSPHRASE
00057 # include <replacements/readpassphrase.h>
00058 #else
00059 # include <readpassphrase.h>
00060 #endif
00061 
00062 #if HAVE_STRLCPY
00063 #define tds_strlcpy(d,s,l) strlcpy(d,s,l)
00064 #else
00065 size_t tds_strlcpy(char *dest, const char *src, size_t len);
00066 #endif
00067 
00068 #if HAVE_STRLCAT
00069 #define tds_strlcat(d,s,l) strlcat(d,s,l)
00070 #else
00071 size_t tds_strlcat(char *dest, const char *src, size_t len);
00072 #endif
00073 
00074 #if HAVE_BASENAME
00075 #define tds_basename(s) basename(s)
00076 #else
00077 char *tds_basename(char *path);
00078 #endif
00079 
00080 #ifdef __cplusplus
00081 #if 0
00082 {
00083 #endif
00084 }
00085 #endif
00086 
00087 #endif

Generated on Tue Sep 8 15:43:30 2009 for FreeTDS API by  doxygen 1.4.7