-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsrc_start.cpp
85 lines (73 loc) · 1.89 KB
/
src_start.cpp
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifdef GEN_INTELLISENSE_DIRECTIVES
# pragma once
# include "header_start.hpp"
#endif
#pragma region Macros and Includes
# include <stdio.h>
// NOTE: Ensure we use standard methods for these calls if we use GEN_PICO
# if ! defined( GEN_PICO_CUSTOM_ROUTINES )
# if ! defined( GEN_MODULE_CORE )
# define _strlen strlen
# define _printf_err( fmt, ... ) fprintf( stderr, fmt, __VA_ARGS__ )
# define _printf_err_va( fmt, va ) vfprintf( stderr, fmt, va )
# else
# define _strlen c_str_len
# define _printf_err( fmt, ... ) c_str_fmt_out_err( fmt, __VA_ARGS__ )
# define _printf_err_va( fmt, va ) c_str_fmt_out_err_va( fmt, va )
# endif
# endif
#
# include <errno.h>
#
# if defined( GEN_SYSTEM_UNIX ) || defined( GEN_SYSTEM_MACOS )
# include <unistd.h>
# elif defined( GEN_SYSTEM_WINDOWS )
# if ! defined( GEN_NO_WINDOWS_H )
# ifndef WIN32_LEAN_AND_MEAN
# ifndef NOMINMAX
# define NOMINMAX
# endif
#
# define WIN32_LEAN_AND_MEAN
# define WIN32_MEAN_AND_LEAN
# define VC_EXTRALEAN
# endif
# include <windows.h>
# undef NOMINMAX
# undef WIN32_LEAN_AND_MEAN
# undef WIN32_MEAN_AND_LEAN
# undef VC_EXTRALEAN
# endif
# endif
#include <sys/stat.h>
#ifdef GEN_SYSTEM_MACOS
# include <copyfile.h>
#endif
#ifdef GEN_SYSTEM_CYGWIN
# include <windows.h>
#endif
#if defined( GEN_SYSTEM_WINDOWS ) && ! defined( GEN_COMPILER_GCC )
# include <io.h>
#endif
#if defined( GEN_SYSTEM_LINUX )
# include <sys/types.h>
#endif
#ifdef GEN_BENCHMARK
// Timing includes
#if defined( GEN_SYSTEM_MACOS ) || GEN_SYSTEM_UNIX
# include <time.h>
# include <sys/time.h>
#endif
#if defined( GEN_SYSTEM_MACOS )
# include <mach/mach.h>
# include <mach/mach_time.h>
# include <mach/clock.h>
#endif
#if defined( GEN_SYSTEM_EMSCRIPTEN )
# include <emscripten.h>
#endif
#if defined( GEN_SYSTEM_WINDOWS )
# include <timezoneapi.h>
#endif
#endif
#pragma endregion Macros and Includes