]> arthur.barton.de Git - netatalk.git/blob - include/atalk/compat.h
ac7ed55808d9528b163551c20794810faf6e82aa
[netatalk.git] / include / atalk / compat.h
1 /*
2  * Copyright (c) 1996 Regents of The University of Michigan.
3  * All Rights Reserved.  See COPYRIGHT.
4  *
5  * NOTE: SunOS 4 and ultrix are pretty much the only reason why there
6  * are checks for EINTR everywhere. 
7  */
8
9 #ifdef HAVE_CONFIG_H
10 #include "config.h"
11
12 #include <signal.h>
13
14 #if defined(ultrix) || defined(_IBMR2) || defined(NEED_GETUSERSHELL)
15 extern char *getusershell (void);
16 #endif
17
18 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
19 # include <stdio.h>
20 # include <stdarg.h>
21 # ifndef HAVE_SNPRINTF
22 int snprintf (char *str,size_t count,const char *fmt,...);
23 # endif
24
25 # ifndef HAVE_VSNPRINTF
26 int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
27 # endif
28 #endif
29
30 /* OpenBSD */
31 #if defined(__OpenBSD__) && !defined(ENOTSUP)
32 #define ENOTSUP EOPNOTSUPP
33 #endif
34
35 #if !defined(HAVE_PSELECT) || defined(__OpenBSD__)
36 extern int pselect(int, fd_set * restrict, fd_set * restrict,
37                    fd_set * restrict, const struct timespec * restrict,
38                    const sigset_t * restrict);
39 #endif
40
41 #ifndef HAVE_FLOCK
42 extern int flock (int, int);
43 #endif
44
45 #ifndef HAVE_INET_ATON
46 struct in_addr;
47 extern int inet_aton(const char *, struct in_addr *);
48 #endif
49
50 #ifndef HAVE_STRNLEN
51 extern size_t strnlen(const char *s, size_t n);
52 #endif
53
54 #ifndef HAVE_STRLCPY
55 extern size_t strlcpy (char *, const char *, size_t);
56 #endif
57  
58 #ifndef HAVE_STRLCAT
59 extern size_t strlcat (char *, const char *, size_t);
60 #endif
61
62 #endif