]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/next.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / compat / os / next.h
1 /*
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_OS_NEXT_H
10 #define SQUID_OS_NEXT_H
11
12 #if _SQUID_NEXT_
13
14 /****************************************************************************
15 *--------------------------------------------------------------------------*
16 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
17 *--------------------------------------------------------------------------*
18 ****************************************************************************/
19
20 /*
21 * Don't allow inclusion of malloc.h
22 */
23 #if defined(HAVE_MALLOC_H)
24 #undef HAVE_MALLOC_H
25 #endif
26
27 /*
28 * S_ISDIR() may not be defined on Next
29 */
30 #if HAVE_SYS_STAT_H
31 #include <sys/stat.h>
32 #endif
33 #if !defined(S_ISDIR)
34 #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
35 #endif
36
37 /*
38 * WAS: lots of special wrappers labeled only 'protect NEXTSTEP'
39 * I'm assuming its an incomplete definition problem on that OS
40 * or a missing safety wrapper by the looks of the original hack.
41 *
42 * Anyway, this file is included before all general non-type headers.
43 * doing the include here for Next and undefining HAVE_NETDB_H will
44 * save us from including it again in general.
45 */
46 #if HAVE_NETDB_H
47 #include <netdb.h>
48 #endif
49 #undef HAVE_NETDB_H
50 #define HAVE_NETDB_H 0
51
52 #if !defined(S_ISDIR)
53 #define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
54 #endif
55
56 #endif /* _SQUID_NEXT_ */
57 #endif /* SQUID_OS_NEXT_H */
58