Added rpmfilename tag to to rpmrc and made use of it during package builds
[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 1
68 #define GETMNTENT_TWO 0
69 #define our_mntent struct mntent
70 #define our_mntdir mnt_dir
71 #elif HAVE_SYS_MNTTAB_H
72 #include <stdio.h>
73 #include <sys/mnttab.h>
74 #define GETMNTENT_ONE 0
75 #define GETMNTENT_TWO 1
76 #define our_mntdir mnt_mountp
77 #define our_mntent struct mnttab
78 #else
79 #error Neither mntent.h nor mnttab.h exists. I cannot build on this system.
80 #endif
81
82 #ifndef MOUNTED
83 #define MOUNTED "/etc/mnttab"
84 #endif
85
86 #endif