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