Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
ptx_Platform.h
Go to the documentation of this file.
1
43#ifndef PTX_PLATFORM_H
44#define PTX_PLATFORM_H
45
51#if defined PTX_CROSS_GENERIC
52 /* Microcontroller, "bare metal" or other, without system dependencies. */
53# define PTX_PLAT_EMBEDDED_GENERIC
54
55#elif defined (_WIN32) || defined (_WIN64) || defined (ming) || defined (__MINGW32__) || defined (__GNUWIN32__)
56
57# define PTX_PLAT_WINDOWS
58# ifndef UNICODE
59# define UNICODE
60# endif
61
62
63// #warning PTX_PLAT_WINDOWS // Debug
64# if defined (_WIN64) /* Windows (64-bit) */
65# define PTX_PLAT_WINDOWS_64
66# endif
67
68#elif defined (PTX_CROSS_ANDROID) || defined (__ANDROID__)
69
70# define PTX_PLAT_ANDROID /* Android */
71
72#else
73
74# if defined (__GNUC__) /* GCC */
75
76# define PTX_PLAT_GNUC
77# if defined (__APPLE__) /* Apple could be */
78# include "TargetConditionals.h"
79# if TARGET_OS_IPHONE /* iOS */
80# define PTX_PLAT_IOS
81# elif TARGET_IPHONE_SIMULATOR /* iOS Simulator */
82# error Unsupported Platform (iOS Simulator)
83# elif TARGET_OS_MAC /* MacOS */
84# define PTX_PLAT_MACOS
85# endif
86# else /* Linux with gcc */
87# define PTX_PLAT_LINUX
88# endif
89
90# elif defined (_linux) || defined (__linux) /* Linux with some other compiler */
91
92# define PTX_PLAT_LINUX
93
94# else
95
96# error Missing Platform Specification
97
98# endif
99#endif
100
101# if defined (EMBEDDED_LINUX)
102# define PTX_PLAT_EMB_LINUX
103# endif
104
105/*
106 * Platform diversity; globally applied
107 */
108#if defined PTX_PLAT_WINDOWS
109 #ifdef __POLYSPACE__
110 #define PTX_LIBFUNC
111 #else
112 #define PTX_LIBFUNC __declspec(dllexport) /* */
113 #endif
114# define PTX_FILE_NAME(_name_) static const char g_FileName[] = __FILE__
115# define PTX_FILE g_FileName
116
117#elif defined PTX_PLAT_GNUC
118
119# define PTX_LIBFUNC __attribute__ ((visibility("default"))) /* requires -fvisibility=hidden as compiler option */
120# define PTX_FILE_NAME(_name_) static const char g_FileName[] = __FILE__
121# define PTX_FILE g_FileName
122
123#elif defined PTX_PLAT_ANDROID
124 #if defined (__ANDROID__)
125 # define PTX_LIBFUNC __attribute__ ((visibility("default"))) /* requires -fvisibility=hidden as compiler option */
126 #else
127 # define PTX_LIBFUNC /* Empty */
128 #endif
129# define PTX_FILE_NAME(_name_) static const char g_FileName[] = __FILE__
130# define PTX_FILE g_FileName
131
132#elif defined PTX_PLAT_EMBEDDED_GENERIC
133
134# define PTX_LIBFUNC /* Empty */
135# define PTX_FILE_NAME(_name_) static const char g_FileName[] = "/"_name_"." /* '/' and '.' are needed for the logger */
136# define PTX_FILE g_FileName
137
138#else
139
140# error Missing PTX_LIBFUNC Specification
141
142#endif
143
146#endif /* Guard */
147
148