5db8be908b
- Move CMake modules from cmake_modules/ to cmake/modules/ - CMake now use cmake/config_windows.h.cmake to create config.h on Windows platform - contrib/windows.h header is automagically included by config.h - Put missing NFC_EXPORT macro on front of emulation API - nfc-mfclassic and nfc-mfcultralight examples are now compiled under Windows Many thanks to Glenn Ergeerts which provide the initial patch.
19 lines
334 B
C
19 lines
334 B
C
#ifndef _ERR_H_
|
|
#define _ERR_H_
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define warnx(...) do { \
|
|
fprintf (stderr, __VA_ARGS__); \
|
|
fprintf (stderr, "\n"); \
|
|
} while (0)
|
|
|
|
#define errx(code, ...) do { \
|
|
fprintf (stderr, __VA_ARGS__); \
|
|
fprintf (stderr, "\n"); \
|
|
exit (code); \
|
|
} while (0)
|
|
|
|
#define err errx
|
|
|
|
#endif /* !_ERR_H_ */
|