fix leftover protocmp warnings
[unleashed.git] / bin / pax / compat.h
blob9e1729b6a9de13a0d4026cbdd0abd86ff5c37e9f
1 #ifndef _COMPAT_H
2 #define _COMPAT_H
4 typedef uint32_t u_int32_t;
5 typedef uint16_t u_int16_t;
7 char *group_from_gid(gid_t, int);
8 char *user_from_uid(uid_t, int);
10 int dprintf(int fd, const char *fmt, ...);
12 void strmode(int mode, char *p);
14 #include <utmpx.h>
15 #define UT_NAMESIZE (sizeof (((struct utmpx *)0)->ut_name))
16 #define _PW_NAME_LEN (UT_NAMESIZE - 1)
17 #include <nss_dbdefs.h>
18 #define _PW_BUF_LEN NSS_BUFLEN_PASSWD
19 /* XXX: sysconf(_SC_GETGR_R_SIZE_MAX) actually returns this value instead of
20 * NSS_BUFLEN_GROUP; see NSS_BUFLEN_PRACTICAL in libc nss_common.c. */
21 #define _GR_BUF_LEN (512*1024)
23 #define _PATH_DEFTAPE "/dev/rmt/0"
25 #define setpassent(x) setpwent()
26 #define setgroupent(x) setgrent()
28 #define timespeccmp(tsp, usp, cmp) \
29 (((tsp)->tv_sec == (usp)->tv_sec) ? \
30 ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
31 ((tsp)->tv_sec cmp (usp)->tv_sec))
32 #endif