dont pollute namespace with our own local restrict keyword

This commit is contained in:
Mike Frysinger 2007-12-30 17:55:44 +00:00
parent b6fcfd1157
commit 409e73bc29

View File

@ -41,11 +41,13 @@
#include <stdbool.h>
/* Although OpenRC requires C99, linking to us should not. */
#ifndef restrict
# ifdef __restrict
# define restrict __restrict
#ifdef restrict
# define __EINFO_RESTRICT restrict
#else
# define restrict
# ifdef __restrict
# define __EINFO_RESTRICT __restrict
# else
# define __EINFO_RESTRICT
# endif
#endif
@ -64,7 +66,7 @@ typedef enum
const char *ecolor (einfo_color_t);
/*! @brief Writes to syslog. */
void elog (int __level, const char * restrict __fmt, ...) __EEND_PRINTF;
void elog (int __level, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
/*!
* @brief Display informational messages.
@ -82,22 +84,22 @@ void elog (int __level, const char * restrict __fmt, ...) __EEND_PRINTF;
* The v suffix means only print if EINFO_VERBOSE is yes.
*/
/*@{*/
int einfon (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ewarnn (const char * restrict __fmt, ...) __EINFO_PRINTF;
int eerrorn (const char * restrict __fmt, ...) __EINFO_PRINTF;
int einfo (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ewarn (const char * restrict __fmt, ...) __EINFO_PRINTF;
void ewarnx (const char * restrict __fmt, ...) __EINFO_XPRINTF;
int eerror (const char * restrict __fmt, ...) __EINFO_PRINTF;
void eerrorx (const char * restrict __fmt, ...) __EINFO_XPRINTF;
int einfon (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ewarnn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int eerrorn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int einfo (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ewarn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
void ewarnx (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_XPRINTF;
int eerror (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
void eerrorx (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_XPRINTF;
int einfovn (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ewarnvn (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ebeginvn (const char * restrict __fmt, ...) __EINFO_PRINTF;
int eendvn (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
int ewendvn (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
int einfov (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ewarnv (const char * restrict __fmt, ...) __EINFO_PRINTF;
int einfovn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ewarnvn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ebeginvn (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int eendvn (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
int ewendvn (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
int einfov (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ewarnv (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
/*@}*/
/*! @ingroup ebegin
@ -105,8 +107,8 @@ int ewarnv (const char * restrict __fmt, ...) __EINFO_PRINTF;
*
* Similar to einfo, but we add ... to the end of the message */
/*@{*/
int ebeginv (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ebegin (const char * restrict __fmt, ...) __EINFO_PRINTF;
int ebeginv (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
int ebegin (const char * __EINFO_RESTRICT __fmt, ...) __EINFO_PRINTF;
/*@}*/
/*! @ingroup eend
@ -118,12 +120,12 @@ int ebegin (const char * restrict __fmt, ...) __EINFO_PRINTF;
*
* ebracket allows you to specifiy the position, color and message */
/*@{*/
int eend (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
int ewend (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
void ebracket (int __col, einfo_color_t __color, const char * restrict __msg);
int eend (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
int ewend (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
void ebracket (int __col, einfo_color_t __color, const char * __EINFO_RESTRICT __msg);
int eendv (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
int ewendv (int __retval, const char * restrict __fmt, ...) __EEND_PRINTF;
int eendv (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
int ewendv (int __retval, const char * __EINFO_RESTRICT __fmt, ...) __EEND_PRINTF;
/*@}*/
/*! @ingroup eindent
@ -137,6 +139,6 @@ void eindentv (void);
void eoutdentv (void);
/*! @brief Prefix each einfo line with something */
void eprefix (const char * restrict __prefix);
void eprefix (const char * __EINFO_RESTRICT __prefix);
#endif