mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-10-22 16:18:18 +08:00

This is required in util.h in PSASIM as it uses fprintf. Previously stdio was inadvertantly included via psa/crypto_struct.h (of all places). Signed-off-by: David Horstmann <david.horstmann@arm.com>
34 lines
835 B
C
34 lines
835 B
C
/* Common definitions used for clients and services */
|
|
|
|
/*
|
|
* Copyright The Mbed TLS Contributors
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "service.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#define PRINT(fmt, ...) \
|
|
fprintf(stdout, fmt "\n", ##__VA_ARGS__)
|
|
|
|
#if defined(DEBUG)
|
|
#define INFO(fmt, ...) \
|
|
fprintf(stdout, "Info (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__)
|
|
#else /* !DEBUG */
|
|
#define INFO(...)
|
|
#endif /* DEBUG*/
|
|
|
|
#define ERROR(fmt, ...) \
|
|
fprintf(stderr, "Error (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__)
|
|
|
|
#define FATAL(fmt, ...) \
|
|
{ \
|
|
fprintf(stderr, "Fatal (%s - %d): " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
|
|
abort(); \
|
|
}
|
|
|
|
#define PROJECT_ID 'M'
|
|
#define PATHNAMESIZE 256
|
|
#define TMP_FILE_BASE_PATH "./"
|