blob: 558149fe2b02248f6fd32e5baa5a7912ea301390 [file] [log] [blame]
Valerio Setti4f4ade92024-05-03 17:28:04 +02001/* Common definitions used for clients and services */
2
3/*
4 * Copyright The Mbed TLS Contributors
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
6 */
7
Valerio Setti66fb1c12024-05-10 06:51:16 +02008#include "service.h"
Valerio Setti4f4ade92024-05-03 17:28:04 +02009
10#define PRINT(fmt, ...) \
11 fprintf(stdout, fmt "\n", ##__VA_ARGS__)
12
13#if defined(DEBUG)
14#define INFO(fmt, ...) \
15 fprintf(stdout, "Info (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__)
16
17#define ERROR(fmt, ...) \
18 fprintf(stdout, "Error (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__)
19
20#define FATAL(fmt, ...) \
21 { \
22 fprintf(stdout, "Fatal (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
23 abort(); \
24 }
25#else /* DEBUG */
26#define INFO(...)
27#define ERROR(...)
28#define FATAL(...)
29#endif /* DEBUG*/
30
31#define PROJECT_ID 'M'
32#define PATHNAMESIZE 256
33#define TMP_FILE_BASE_PATH "./"