1 /*
2  * Collected by EPIC Software Labs
3  * Public Domain
4  */
5 
6 #ifndef __COMPAT_H__
7 #define __COMPAT_H__
8 
9 #ifndef HAVE_TPARM
10 char *my_tparm (const char *, ...);
11 #define tparm my_tparm
12 #endif
13 
14 #ifndef HAVE_STRTOUL
15 unsigned long strtoul (const char *, char **, int);
16 #endif
17 
18 #ifndef HAVE_STRLCPY
19 size_t	strlcpy (char *, const char *, size_t);
20 #endif
21 
22 #ifndef HAVE_STRLCAT
23 size_t	strlcat (char *, const char *, size_t);
24 #endif
25 
26 void	bsd_arc4random_stir (void);
27 void	bsd_arc4random_addrandom (unsigned char *, int);
28 u_32int_t	bsd_arc4random (void);
29 
30 #ifndef HAVE_VSNPRINTF
31 int	vsnprintf (char *, size_t, const char *, va_list);
32 #endif
33 
34 #ifndef HAVE_SNPRINTF
35 int	snprintf (char *, size_t, const char *, ...);
36 #endif
37 
38 #ifndef HAVE_SETSID
39 int	setsid (void);
40 #endif
41 
42 #ifndef HAVE_SETENV
43 int	setenv (const char *, const char *, int);
44 #endif
45 
46 #ifndef HAVE_UNSETENV
47 int	unsetenv (const char *);
48 #endif
49 
50 #ifdef HAVE_BROKEN_REALPATH
51 char *	my_realpath (const char *, char x[MAXPATHLEN]);
52 #endif
53 
54 #endif
55