netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
compat.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1996 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
6#ifdef HAVE_CONFIG_H
7#include "config.h"
8
9#include <signal.h>
10
11/* OpenBSD */
12#if defined(__OpenBSD__) && !defined(ENOTSUP)
13#define ENOTSUP EOPNOTSUPP
14#endif
15
16#if !defined(HAVE_PSELECT) || defined(__OpenBSD__)
17extern int pselect(int, fd_set *restrict, fd_set *restrict,
18 fd_set *restrict, const struct timespec *restrict,
19 const sigset_t *restrict);
20#endif
21
22#ifndef HAVE_STRNLEN
23extern size_t strnlen(const char *s, size_t n);
24#endif
25
26#ifndef HAVE_STRLCPY
27extern size_t strlcpy(char *, const char *, size_t);
28#endif
29
30#ifndef HAVE_STRLCAT
31extern size_t strlcat(char *, const char *, size_t);
32#endif
33
34#ifndef HAVE_VASPRINTF
35#include <stdio.h>
36#include <stdarg.h>
37extern int vasprintf(char **ret, const char *fmt, va_list ap);
38#endif
39
40#endif
int vasprintf(char **ret, const char *fmt, va_list ap)
Definition misc.c:34
size_t strnlen(const char *s, size_t max)
Definition misc.c:19
size_t strlcat(char *d, const char *s, size_t bufsize)
Definition strlcpy.c:59
size_t strlcpy(char *d, const char *s, size_t bufsize)
Definition strlcpy.c:36