mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Added define 'unused_' for '__attribute__((unused))'. The oldest version of GCC with online docs (GCC 2.95.3, released in March 16, 2001 [1]) already has support for this attribute, so it doesn't make sense to check the version. Renamed 'noreturn' to 'noreturn_' for consistency. [1] https://gcc.gnu.org/onlinedocs/ Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
45 lines
914 B
C
45 lines
914 B
C
/*
|
|
* This file is part of RGBDS.
|
|
*
|
|
* Copyright (c) 1997-2018, RGBDS contributors.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef EXTERN_ERR_H
|
|
#define EXTERN_ERR_H
|
|
|
|
#ifdef ERR_IN_LIBC
|
|
|
|
#include <err.h>
|
|
|
|
#else /* ERR_IN_LIBC */
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include "helpers.h"
|
|
|
|
#define warn rgbds_warn
|
|
#define vwarn rgbds_vwarn
|
|
#define warnx rgbds_warnx
|
|
#define vwarnx rgbds_vwarnx
|
|
|
|
#define err rgbds_err
|
|
#define verr rgbds_verr
|
|
#define errx rgbds_errx
|
|
#define verrx rgbds_verrx
|
|
|
|
void warn(const char *fmt, ...);
|
|
void vwarn(const char *fmt, va_list ap);
|
|
void warnx(const char *fmt, ...);
|
|
void vwarnx(const char *fmt, va_list ap);
|
|
|
|
noreturn_ void err(int status, const char *fmt, ...);
|
|
noreturn_ void verr(int status, const char *fmt, va_list ap);
|
|
noreturn_ void errx(int status, const char *fmt, ...);
|
|
noreturn_ void verrx(int status, const char *fmt, va_list ap);
|
|
|
|
#endif /* ERR_IN_LIBC */
|
|
|
|
#endif /* EXTERN_ERR_H */
|