Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
[platform/upstream/rpm.git] / lib / misc.h
1 #ifndef H_MISC
2 #define H_MISC
3
4 /**
5  * \file lib/misc.h
6  *
7  */
8
9 #include <string.h>
10 #include <rpm/rpmtypes.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /* known arch? */
17 RPM_GNUC_INTERNAL
18 int rpmIsKnownArch(const char *name);
19
20 RPM_GNUC_INTERNAL
21 unsigned int hashFunctionString(const char * string);
22 /*
23  * These may be called w/ a NULL argument to flush the cache -- they return
24  * -1 if the user can't be found.
25  */
26 RPM_GNUC_INTERNAL
27 int     unameToUid(const char * thisUname, uid_t * uid);
28
29 RPM_GNUC_INTERNAL
30 int     gnameToGid(const char * thisGname, gid_t * gid);
31
32 /*
33  * Call w/ -1 to flush the cache, returns NULL if the user can't be found.
34  */
35 RPM_GNUC_INTERNAL
36 const char * uidToUname(uid_t uid);
37
38 RPM_GNUC_INTERNAL
39 const char * gidToGname(gid_t gid);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif  /* H_MISC */