-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_bottom.h
69 lines (57 loc) · 1.59 KB
/
config_bottom.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef _CONFIG_H
# error "config_bottom.h should only be included from config.h"
#endif /* _CONFIG_H */
#include "util/util.h"
#if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF)
# undef asprintf
# define asprintf vt_asprintf
#endif /* HAVE_ASPRINTF */
#if !(defined(HAVE_SNPRINTF) && HAVE_SNPRINTF)
# undef snprintf
# define snprintf vt_snprintf
#endif /* HAVE_SNPRINTF */
#if !(defined(HAVE_VASPRINTF) && HAVE_VASPRINTF)
# undef vasprintf
# define vasprintf vt_vasprintf
#endif /* HAVE_VASPRINTF */
#if !(defined(HAVE_VSNPRINTF) && HAVE_VSNPRINTF)
# undef vsnprintf
# define vsnprintf vt_vsnprintf
#endif /* HAVE_VSNPRINTF */
#if !(defined(HAVE_STRDUP) && HAVE_STRDUP)
# undef strdup
# define strdup vt_strdup
#endif /* HAVE_STRDUP */
#if !(defined(HAVE_MEMMOVE) && HAVE_MEMMOVE)
# undef memmove
# define memmove vt_memmove
#endif /* HAVE_MEMMOVE */
#if defined(HAVE_FNMATCH_H) && HAVE_FNMATCH_H
# include <fnmatch.h>
#else /* HAVE_FNMATCH_H */
# undef fnmatch
# define fnmatch vt_fnmatch
# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
# define vt_fnmatch(_pattern, _string, __flags) strcmp(_string, _pattern)
#endif /* HAVE_FNMATCH_H */
#if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#if defined(MIN)
# define VT_MIN MIN
#else
# define VT_MIN(a,b) (((a)<(b))?(a):(b))
#endif
#if defined(MAX)
# define VT_MAX MAX
#else
# define VT_MAX(a,b) (((a)>(b))?(a):(b))
#endif
#include <limits.h>
#if defined(PATH_MAX)
# define VT_PATH_MAX (PATH_MAX + 1)
#elif defined(_POSIX_PATH_MAX)
# define VT_PATH_MAX (_POSIX_PATH_MAX + 1)
#else
# define VT_PATH_MAX 256
#endif