1 #ifndef OPENAFS_OPR_OPR_H
2 #define OPENAFS_OPR_OPR_H 1
6 #define opr_containerof(ptr, structure, member) \
7 ((structure *)((char *)(ptr)-(char *)(&((structure *)NULL)->member)))
12 # define opr_abort() opr_NTAbort()
13 extern void opr_NTAbort(void);
15 # define opr_abort() abort()
18 extern void opr_AssertionFailed(char *, int);
19 extern void opr_AssertFailU(const char *, const char *, int);
21 #define opr_Assert(ex) \
22 do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
25 #define lcstring opr_lcstring
26 #define ucstring opr_ucstring
27 #define stolower opr_stolower
28 #define stoupper opr_stoupper
29 #define strcompose opr_strcompose
31 extern char *opr_lcstring(char *d, char *s, int n);
32 extern char *opr_ucstring(char *d, char *s, int n);
33 extern void opr_stolower(char *s);
34 extern void opr_stoupper(char *s);
35 extern char *opr_strcompose(char *buf, size_t len, ...);