posix.h
1! This file is part of MOM6, the Modular Ocean Model version 6.
2! See the LICENSE file for licensing information.
3! SPDX-License-Identifier: Apache-2.0
4
5#ifndef MOM6_POSIX_H_
6#define MOM6_POSIX_H_
7
9! The default value is based on glibc 2.28.
10#ifndef SIZEOF_STAT_BUF
11#define SIZEOF_STAT_BUF 144
12#endif
13
14! JMP_BUF_SIZE should be set to sizeof(jmp_buf).
15! If unset, then use a typical glibc value (25 long ints)
16#ifndef SIZEOF_JMP_BUF
17#define SIZEOF_JMP_BUF 200
18#endif
19
20! If unset, assume jmp_buf and sigjmp_buf are equivalent (as in glibc).
21#ifndef SIZEOF_SIGJMP_BUF
22#define SIZEOF_SIGJMP_BUF SIZEOF_JMP_BUF
23#endif
24
25! Wrappers to <setjmp.h> are disabled on default.
26#ifndef SETJMP_NAME
27#define SETJMP_NAME "setjmp_missing"
28#endif
29
30#ifndef LONGJMP_NAME
31#define LONGJMP_NAME "longjmp_missing"
32#endif
33
34#ifndef SIGSETJMP_NAME
35#define SIGSETJMP_NAME "sigsetjmp_missing"
36#endif
37
38#ifndef SIGLONGJMP_NAME
39#define SIGLONGJMP_NAME "siglongjmp_missing"
40#endif
41
42! This should be defined by <signal.h>;
43! If unset, we use the most common (x86) value
44#ifndef POSIX_SIGUSR1
45#define POSIX_SIGUSR1 10
46#endif
47
48#endif