FreeTDS API
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
replacements.h
1
/* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2
* Copyright (C) 1998-1999 Brian Bruns
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
13
*
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
18
*/
19
20
#ifndef _replacements_h_
21
#define _replacements_h_
22
23
/* $Id: replacements.h,v 1.18 2007/12/21 09:06:53 freddy77 Exp $ */
24
25
#include <stdarg.h>
26
#include "tds_sysdep_public.h"
27
28
#ifndef HAVE_READPASSPHRASE
29
# include <replacements/readpassphrase.h>
30
#else
31
# include <readpassphrase.h>
32
#endif
33
34
/* these headers are needed for basename */
35
#ifdef HAVE_STRING_H
36
# include <string.h>
37
#endif
38
#ifdef HAVE_LIBGEN_H
39
# include <libgen.h>
40
#endif
41
42
#if defined(__GNUC__) && __GNUC__ >= 4
43
#pragma GCC visibility push(hidden)
44
#endif
45
46
#ifdef __cplusplus
47
extern
"C"
48
{
49
#if 0
50
}
51
#endif
52
#endif
53
54
#if defined(HAVE__VSNPRINTF) && !defined(HAVE_VSNPRINTF)
55
#undef vsnprintf
56
#define vsnprintf _vsnprintf
57
#elif !HAVE_VSNPRINTF
58
int
vsnprintf(
char
*ret,
size_t
max,
const
char
*fmt, va_list ap);
59
#endif
/* !HAVE_VSNPRINTF */
60
61
#if !HAVE_ASPRINTF
62
int
asprintf(
char
**ret,
const
char
*fmt, ...);
63
#endif
/* !HAVE_ASPRINTF */
64
65
#if !HAVE_VASPRINTF
66
int
vasprintf(
char
**ret,
const
char
*fmt, va_list ap);
67
#endif
/* !HAVE_VASPRINTF */
68
69
#if !HAVE_ATOLL
70
tds_sysdep_int64_type atoll(
const
char
*nptr);
71
#endif
/* !HAVE_ATOLL */
72
73
#if !HAVE_STRTOK_R
74
char
*strtok_r(
char
*str,
const
char
*sep,
char
**lasts);
75
#endif
/* !HAVE_STRTOK_R */
76
77
#if HAVE_STRLCPY
78
#define tds_strlcpy(d,s,l) strlcpy(d,s,l)
79
#else
80
size_t
tds_strlcpy(
char
*dest,
const
char
*src,
size_t
len);
81
#endif
82
83
#if HAVE_STRLCAT
84
#define tds_strlcat(d,s,l) strlcat(d,s,l)
85
#else
86
size_t
tds_strlcat(
char
*dest,
const
char
*src,
size_t
len);
87
#endif
88
89
#if HAVE_BASENAME
90
#define tds_basename(s) basename(s)
91
#else
92
char
*tds_basename(
char
*path);
93
#endif
94
95
#if defined(WIN32)
96
int
gettimeofday (
struct
timeval *tv,
void
*tz);
97
#endif
98
99
#ifdef __cplusplus
100
#if 0
101
{
102
#endif
103
}
104
#endif
105
106
#if defined(__GNUC__) && __GNUC__ >= 4
107
#pragma GCC visibility pop
108
#endif
109
110
#endif
Generated by
1.8.5