1 | /** @file
|
---|
2 | * IPRT / No-CRT - Open Watcom specifics.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2022-2024 Oracle and/or its affiliates.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox base platform packages, as
|
---|
9 | * available from https://www.virtualbox.org.
|
---|
10 | *
|
---|
11 | * This program is free software; you can redistribute it and/or
|
---|
12 | * modify it under the terms of the GNU General Public License
|
---|
13 | * as published by the Free Software Foundation, in version 3 of the
|
---|
14 | * License.
|
---|
15 | *
|
---|
16 | * This program is distributed in the hope that it will be useful, but
|
---|
17 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
19 | * General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU General Public License
|
---|
22 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
23 | *
|
---|
24 | * The contents of this file may alternatively be used under the terms
|
---|
25 | * of the Common Development and Distribution License Version 1.0
|
---|
26 | * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
27 | * in the VirtualBox distribution, in which case the provisions of the
|
---|
28 | * CDDL are applicable instead of those of the GPL.
|
---|
29 | *
|
---|
30 | * You may elect to license modified versions of this file under the
|
---|
31 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
32 | *
|
---|
33 | * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
34 | */
|
---|
35 |
|
---|
36 | #ifndef IPRT_INCLUDED_nocrt_compiler_watcom_h
|
---|
37 | #define IPRT_INCLUDED_nocrt_compiler_watcom_h
|
---|
38 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
39 | # pragma once
|
---|
40 | #endif
|
---|
41 |
|
---|
42 | #include <iprt/cdefs.h>
|
---|
43 |
|
---|
44 | /* stddef.h for size_t and such */
|
---|
45 | #if 0
|
---|
46 | # include <../h/stddef.h>
|
---|
47 |
|
---|
48 | # ifndef _SSIZE_T_DEFINED_
|
---|
49 | # define _SSIZE_T_DEFINED_
|
---|
50 | typedef signed int ssize_t;
|
---|
51 | # endif
|
---|
52 |
|
---|
53 | #else
|
---|
54 |
|
---|
55 | # define _SIZE_T_DEFINED_
|
---|
56 | # define __size_t
|
---|
57 | typedef unsigned size_t;
|
---|
58 | typedef size_t _w_size_t;
|
---|
59 |
|
---|
60 | # define _SSIZE_T_DEFINED_
|
---|
61 | # define __ssize_t
|
---|
62 | typedef signed int ssize_t;
|
---|
63 |
|
---|
64 | # define _RSIZE_T_DEFINED
|
---|
65 | typedef size_t rsize_t;
|
---|
66 |
|
---|
67 | # define _PTRDIFF_T_DEFINED_
|
---|
68 | # ifdef __HUGE__
|
---|
69 | typedef long ptrdiff_t;
|
---|
70 | # else
|
---|
71 | typedef int ptrdiff_t;
|
---|
72 | # endif
|
---|
73 |
|
---|
74 | # ifndef _WCHAR_T_DEFINED /* predefined in C++ mode? */
|
---|
75 | # define _WCHAR_T_DEFINED
|
---|
76 | typedef unsigned short wchar_t;
|
---|
77 | # endif
|
---|
78 |
|
---|
79 | # ifndef NULL
|
---|
80 | # ifndef __cplusplus
|
---|
81 | # define NULL ((void *)0)
|
---|
82 | # elif defined(__SMALL__) || defined(__MEDIUM__) || !defined(_M_I86)
|
---|
83 | # define NULL (0)
|
---|
84 | # else
|
---|
85 | # define NULL (0L)
|
---|
86 | # endif
|
---|
87 | # endif
|
---|
88 |
|
---|
89 | # define offsetof(a_Type, a_Member) RT_OFFSETOF(a_Type, a_Member)
|
---|
90 |
|
---|
91 | # if defined(_M_I86) && (defined(__SMALL__) || defined(__MEDIUM__))
|
---|
92 | typedef int intptr_t;
|
---|
93 | typedef unsigned int uintptr_t;
|
---|
94 | # elif defined(_M_I86) || (!defined(__COMPACT__) && !defined(__LARGE__))
|
---|
95 | typedef long intptr_t;
|
---|
96 | typedef unsigned long uintptr_t;
|
---|
97 | # else /* 32-bit compile using far data pointers (16:32) */
|
---|
98 | typedef long long intptr_t;
|
---|
99 | typedef unsigned long long uintptr_t;
|
---|
100 | # endif
|
---|
101 |
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | /* stdarg.h */
|
---|
105 | #include <../h/stdarg.h>
|
---|
106 |
|
---|
107 | #endif /* !IPRT_INCLUDED_nocrt_compiler_watcom_h */
|
---|
108 |
|
---|