1 /*
2  * Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 /* clang-format off */
19 
20 /**
21  * \file
22  * \brief ent3f.h macros for building RTE routine names and arg lists
23  */
24 
25 #undef DCHAR
26 #undef DCLEN
27 #undef CADR
28 #undef CLEN
29 
30 /* macros for entries */
31 #if defined(WINNT) && !defined(WIN64) && !defined(UXOBJS)
32 
33 #pragma global - x 121 0x20000
34 #define ENT3F(UC, LC) __attribute__((stdcall)) UC
35 #define ENT3FSU(UC, LC) __attribute__((stdcall)) UC##_
36 /* macros to declare character arguments */
37 #define DCHAR(ARG) char *ARG##_adr, int ARG##_len
38 #define DCLEN(ARG)
39 
40 #else
41 
42 #define ENT3F(UC, LC) LC##_
43 #define ENT3FSU(UC, LC) LC##__
44 /* macros to declare character arguments */
45 #define DCHAR(ARG) char *ARG##_adr
46 #define DCLEN(ARG) , int ARG##_len
47 
48 #endif
49 
50 #if defined(WIN32) || defined(WIN64)
51 #define j0 _j0
52 #define j1 _j1
53 #define jn _jn
54 #define y0 _y0
55 #define y1 _y1
56 #define yn _yn
57 #define access _access
58 #define chdir _chdir
59 #define chmod _chmod
60 #define getpid _getpid
61 #define putenv _putenv
62 #define unlink _unlink
63 #endif
64 
65 /* macros to access character arguments */
66 #define CADR(ARG) (ARG##_adr)
67 #define CLEN(ARG) (ARG##_len)
68 
69 /* declarations in runtime must match declarations in MS msvcrt.dll
70  * to achieve consistent DLL linkage.
71  */
72 #define WIN_CDECL
73 #define WIN_MSVCRT_IMP extern
74