/
compat.h
50 lines (46 loc) · 920 Bytes
/
compat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// SPDX-License-Identifier: GPL-2.0-only
/*
* compat.h -- for compatibility
* (C)Copyright 2000-2024 by Hiroshi Takekawa
* This file is part of multiskkserv.
*
* Last Modified: Sat Feb 24 15:51:06 2024.
*/
#ifdef HAVE_CONFIG_H
# ifndef CONFIG_H_INCLUDED
# include "config.h"
# define CONFIG_H_INCLUDED
# endif
#endif
#ifdef REQUIRE_STRING_H
# if STDC_HEADERS
# include <string.h>
# else
# ifndef HAVE_MEMCPY
# define memcpy(d, s, n) bcopy((s), (d), (n))
# define memmove(d, s, n) bcopy((s), (d), (n))
# endif
# endif
#endif
#ifdef REQUIRE_UNISTD_H
# ifdef HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
# endif
#endif
#ifdef REQUIRE_DIRENT_H
# if HAVE_DIRENT_H
# include <dirent.h>
# else
# define dirent direct
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
# endif
#endif