forked from openenclave/openenclave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
39 lines (28 loc) · 979 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
#ifndef _OE_COMMON_COMMON_H
#define _OE_COMMON_COMMON_H
/*
* This file is intended to be used by code that exists in common folder.
* It handles the differences between host and enclave header includes so
* that common code can be written consistently using oe_* methods. When
* compiling for host, it routes the oe_* prefixed C library calls to
* standard libc symbols via inline function wrappers in oe_host_* headers.
*/
#ifdef OE_BUILD_ENCLAVE
#include <openenclave/enclave.h>
#include <openenclave/corelibc/stdint.h>
#include <openenclave/corelibc/stdio.h>
#include <openenclave/corelibc/stdlib.h>
#include <openenclave/corelibc/string.h>
#else
#include <openenclave/host.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "oe_host_stdio.h"
#include "oe_host_stdlib.h"
#include "oe_host_string.h"
#endif
#endif // _OE_COMMON_COMMON_H