Re: [perl #34493] h2ph `extern inline' problems
[p5sagit/p5-mst-13.2.git] / perlio.h
index 4d88439..adea6b7 100644 (file)
--- a/perlio.h
+++ b/perlio.h
@@ -12,7 +12,7 @@
 #define _PERLIO_H
 /*
   Interface for perl to IO functions.
-  There is a hierachy of Configure determined #define controls:
+  There is a hierarchy of Configure determined #define controls:
    USE_STDIO   - forces PerlIO_xxx() to be #define-d onto stdio functions.
                  This is used for x2p subdirectory and for conservative
                  builds - "just like perl5.00X used to be".
@@ -195,6 +195,13 @@ extern void PerlIO_clone(pTHX_ PerlInterpreter *proto, CLONE_PARAMS *param);
 /* --------------------- Now prototypes for functions --------------- */
 
 START_EXTERN_C
+#ifndef __attribute__format__
+#ifdef CHECK_FORMAT
+#define __attribute__format__(x,y,z) __attribute__((__format__(x,y,z)))
+#else
+#define __attribute__format__(x,y,z)
+#endif
+#endif
 #ifndef NEXT30_NO_ATTRIBUTE
 #ifndef HASATTRIBUTE           /* disable GNU-cc attribute checking? */
 #ifdef  __attribute__          /* Avoid possible redefinition errors */
@@ -208,10 +215,7 @@ extern void PerlIO_init(pTHX);
 #endif
 #ifndef PerlIO_stdoutf
 extern int PerlIO_stdoutf(const char *, ...)
-#ifdef CHECK_FORMAT
-    __attribute__ ((__format__(__printf__, 1, 2)))
-#endif
-;
+    __attribute__format__(__printf__, 1, 2);
 #endif
 #ifndef PerlIO_puts
 extern int PerlIO_puts(PerlIO *, const char *);
@@ -271,17 +275,11 @@ extern void PerlIO_setlinebuf(PerlIO *);
 #endif
 #ifndef PerlIO_printf
 extern int PerlIO_printf(PerlIO *, const char *, ...)
-#ifdef CHECK_FORMAT
-    __attribute__ ((__format__(__printf__, 2, 3)))
-#endif
-;
+    __attribute__format__(__printf__, 2, 3);
 #endif
 #ifndef PerlIO_sprintf
 extern int PerlIO_sprintf(char *, int, const char *, ...)
-#ifdef CHECK_FORMAT
-    __attribute__ ((__format__(__printf__, 3, 4)))
-#endif
-;
+    __attribute__format__(__printf__, 3, 4);
 #endif
 #ifndef PerlIO_vprintf
 extern int PerlIO_vprintf(PerlIO *, const char *, va_list);