Valerio Setti | 4f4ade9 | 2024-05-03 17:28:04 +0200 | [diff] [blame] | 1 | /* 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 Setti | 66fb1c1 | 2024-05-10 06:51:16 +0200 | [diff] [blame^] | 8 | #include "service.h" |
Valerio Setti | 4f4ade9 | 2024-05-03 17:28:04 +0200 | [diff] [blame] | 9 | |
| 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 "./" |