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