added virtual query tag ability, fsnames query tag,
[platform/upstream/rpm.git] / misc / miscfn.h
1 #ifndef H_MISCFN
2 #define H_MISCFN
3
4 #include "config.h"
5
6 #if HAVE_FNMATCH_H
7 #include <fnmatch.h>
8 #else
9 #include "misc-fnmatch.h"
10 #endif
11
12 #if HAVE_GLOB_H
13 #include <glob.h>
14 #else
15 #include "misc-glob.h"
16 #endif
17
18 #if ! HAVE_S_IFSOCK
19 #define S_IFSOCK (0)
20 #endif
21
22 #if ! HAVE_S_ISLNK
23 #define S_ISLNK(mode) ((mode) & S_IFLNK)
24 #endif
25
26 #if ! HAVE_S_ISSOCK
27 #define S_ISSOCK(mode) ((mode) & S_IFSOCK)
28 #endif
29
30 #if NEED_STRINGS_H
31 #include <strings.h>
32 #endif
33
34 #if ! HAVE_REALPATH
35 char *realpath(const char *path, char resolved_path []);
36 #endif
37
38 #if NEED_TIMEZONE
39 #include <sys/stdtypes.h>
40 extern time_t timezone;
41 #endif
42
43 #if NEED_MYREALLOC
44 #include <sys/stdtypes.h>
45 #define realloc(ptr,size) myrealloc(ptr,size)
46 extern void *myrealloc(void *, size_t);
47 #endif
48
49 #if HAVE_SYS_SOCKET_H
50 #include <sys/socket.h>
51 #endif
52
53 #if HAVE_LIMITS_H
54 #include <limits.h>
55 #endif
56
57 #if HAVE_SYS_SELECT_H
58 #include <sys/select.h>
59 #endif
60
61 #if ! HAVE_LCHOWN
62 #define lchown chown
63 #endif
64
65 #if HAVE_MNTENT_H
66 #include <mntent.h>
67 #define GETMNTENT_ONE
68 #define our_mntent struct mntent
69 #elif HAVE_SYS_MNTTAB_H
70 #include <sys/mnttab.h>
71 #define GETMNTENT_TWO
72 #define our_mntent struct mnttab
73 #else
74 #error Neither mntent.h nor mnttab.h exists. I cannot build on this system.
75 #endif
76
77 #ifndef MOUNTED
78 #define MOUNTED "/etc/mnttab"
79 #endif
80
81 #endif