Sanitize python object -> tag number exception handling
[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 /*
21  * These may be called w/ a NULL argument to flush the cache -- they return
22  * -1 if the user can't be found.
23  */
24 RPM_GNUC_INTERNAL
25 int     unameToUid(const char * thisUname, uid_t * uid);
26
27 RPM_GNUC_INTERNAL
28 int     gnameToGid(const char * thisGname, gid_t * gid);
29
30 /*
31  * Call w/ -1 to flush the cache, returns NULL if the user can't be found.
32  */
33 RPM_GNUC_INTERNAL
34 const char * uidToUname(uid_t uid);
35
36 RPM_GNUC_INTERNAL
37 const char * gidToGname(gid_t gid);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif  /* H_MISC */