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 8 #include "service.h" 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 #else /* !DEBUG */ 17 #define INFO(...) 18 #endif /* DEBUG*/ 19 20 #define ERROR(fmt, ...) \ 21 fprintf(stderr, "Error (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__) 22 23 #define FATAL(fmt, ...) \ 24 { \ 25 fprintf(stderr, "Fatal (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \ 26 abort(); \ 27 } 28 29 #define PROJECT_ID 'M' 30 #define PATHNAMESIZE 256 31 #define TMP_FILE_BASE_PATH "./" 32