aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-12-30 17:55:44 +0000
committerMike Frysinger <vapier@gentoo.org>2007-12-30 17:55:44 +0000
commit409e73bc29e31f9498aa76998b3763e219943c01 (patch)
tree4ceca9caf4b51ee19c89dd5774df835bb8b90c84 /src
parentb6fcfd115766c04f5ed490637c709b33b11a241e (diff)
dont pollute namespace with our own local restrict keyword
Diffstat (limited to 'src')
-rw-r--r--src/einfo.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/einfo.h b/src/einfo.h
index 48321106..2720e458 100644
--- a/src/einfo.h
+++ b/src/einfo.h
@@ -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 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 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 * __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