renamed 'clock' variable to quiet compiler warnings.
[freeradius.git] / src / include / missing.h
1 #ifndef _FR_MISSING_H
2 #define _FR_MISSING_H
3
4 /*
5  * missing.h    Replacements for functions that are or can be
6  *              missing on some platforms.
7  *
8  * Version:     $Id$
9  *
10  */
11 #ifndef HAVE_STRNCASECMP
12 extern int strncasecmp(char *s1, char *s2, int n);
13 #endif
14
15 #ifndef HAVE_STRCASECMP
16 extern int strcasecmp(char *s1, char *s2);
17 #endif
18
19 #ifndef HAVE_STRSEP
20 extern char *strsep(char **stringp, const char *delim);
21 #endif
22
23 #ifndef HAVE_LOCALTIME_R
24 struct tm *localtime_r(const time_t *l_clock, struct tm *result);
25 #endif
26
27 #ifdef NEED_DECLARATION_CRYPT
28 char *crypt(char *key, char *salt);
29 #endif
30
31 #ifdef NEED_DECLARATION_STRNCASECMP
32 int strncasecmp(char *s1, char *s2, int n);
33 #endif
34
35 #ifdef NEED_DECLARATION_STRCASECMP
36 int strcasecmp(char *s1, char *s2);
37 #endif
38
39 #ifdef NEED_DECLARATION_INET_ATON
40 struct in_addr;
41 int inet_aton(char *cp, struct in_addr *inp);
42 #endif
43
44 #ifdef NEED_DECLARATION_GETHOSTNAME
45 int gethostname(char *name, int len);
46 #endif
47
48 #ifndef HAVE_SETLINEBUF
49 #ifdef HAVE_SETVBUF
50 #define setlinebuf(x) setvbuf(x, NULL, _IOLBF, 0)
51 #else
52 #define setlinebuf(x)     0
53 #endif
54 #endif
55
56 #ifdef NEED_DECLARATION_SETLINEBUF
57 #define setlinebuf(x)     0
58 #endif
59
60 #ifdef NEED_DECLARATION_GETUSERSHELL
61 char *getusershell(void);
62 #endif
63
64 #ifdef NEED_DECLARATION_ENDUSERSHELL
65 void endusershell(void);
66 #endif
67
68 #ifndef INADDR_ANY
69 #define INADDR_ANY      ((uint32_t) 0x00000000)
70 #endif
71
72 #ifndef INADDR_LOOPBACK
73 #define INADDR_LOOPBACK ((uint32_t) 0x7f000001) /* Inet 127.0.0.1 */
74 #endif
75
76 #ifndef INADDR_NONE
77 #define INADDR_NONE     ((uint32_t) 0xffffffff)
78 #endif
79
80 #endif /* _FR_MISSING_H */