00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
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
00039
00040 #if !HAVE_ASPRINTF
00041 int asprintf(char **ret, const char *fmt, ...);
00042 #endif
00043
00044 #if !HAVE_VASPRINTF
00045 int vasprintf(char **ret, const char *fmt, va_list ap);
00046 #endif
00047
00048 #if !HAVE_ATOLL
00049 tds_sysdep_int64_type atoll(const char *nptr);
00050 #endif
00051
00052 #if !HAVE_STRTOK_R
00053 char *strtok_r(char *str, const char *sep, char **lasts);
00054 #endif
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