1 /*
2 **  Copyright (c) 2009, 2012, The Trusted Domain Project.  All rights reserved.
3 */
4 
5 #ifndef _DMARC_STRL_H_
6 #define _DMARC_STRL_H_
7 
8 /* system includes */
9 #include <sys/types.h>
10 
11 /* OpenDMARC includes */
12 #include "build-config.h"
13 
14 #ifdef __STDC__
15 # ifndef __P
16 #  define __P(x)  x
17 # endif /* ! __P */
18 #else /* __STDC__ */
19 # ifndef __P
20 #  define __P(x)  ()
21 # endif /* ! __P */
22 #endif /* __STDC__ */
23 
24 /* prototypes */
25 extern size_t dmarc_strlcat __P((char *, const char *, ssize_t));
26 extern size_t dmarc_strlcpy __P((char *, const char *, ssize_t));
27 
28 /* mappings */
29 #if HAVE_STRLCAT == 0
30 # define strlcat(x,y,z)	dmarc_strlcat((x), (y), (z))
31 #endif /* HAVE_STRLCAT == 0 */
32 
33 #if HAVE_STRLCPY == 0
34 # define strlcpy(x,y,z)	dmarc_strlcpy((x), (y), (z))
35 #endif /* HAVE_STRLCPY == 0 */
36 
37 #endif /* _DMARC_STRL_H_ */
38