mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-09 02:29:07 +08:00
48 lines
1.5 KiB
C
48 lines
1.5 KiB
C
/*************************************************************************\
|
|
* Copyright (C) Michael Kerrisk, 2018. *
|
|
* *
|
|
* This program is free software. You may use, modify, and redistribute it *
|
|
* under the terms of the GNU Lesser General Public License as published *
|
|
* by the Free Software Foundation, either version 3 or (at your option) *
|
|
* any later version. This program is distributed without any warranty. *
|
|
* See the files COPYING.lgpl-v3 and COPYING.gpl-v3 for details. *
|
|
\*************************************************************************/
|
|
|
|
/* Listing 3-2 */
|
|
|
|
/* error_functions.h
|
|
|
|
Header file for error_functions.c.
|
|
*/
|
|
#ifndef ERROR_FUNCTIONS_H
|
|
#define ERROR_FUNCTIONS_H
|
|
|
|
/* Error diagnostic routines */
|
|
|
|
void errMsg(const char *format, ...);
|
|
|
|
#ifdef __GNUC__
|
|
|
|
/* This macro stops 'gcc -Wall' complaining that "control reaches
|
|
end of non-void function" if we use the following functions to
|
|
terminate main() or some other non-void function. */
|
|
|
|
#define NORETURN __attribute__ ((__noreturn__))
|
|
#else
|
|
#define NORETURN
|
|
#endif
|
|
|
|
void errExit(const char *format, ...) NORETURN ;
|
|
|
|
void err_exit(const char *format, ...) NORETURN ;
|
|
|
|
void errExitEN(int errnum, const char *format, ...) NORETURN ;
|
|
|
|
void fatal(const char *format, ...) NORETURN ;
|
|
|
|
void usageErr(const char *format, ...) NORETURN ;
|
|
|
|
void cmdLineErr(const char *format, ...) NORETURN ;
|
|
|
|
#endif
|