Changes to perlfaq8 "How do I find out if I'm running interactively
[p5sagit/p5-mst-13.2.git] / perlio.h
index ba9b067..d1e3dd5 100644 (file)
--- a/perlio.h
+++ b/perlio.h
@@ -174,7 +174,7 @@ PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto,
 #endif                         /* ifndef PERLIO_NOT_STDIO */
 #endif                         /* PERLIO_IS_STDIO */
 
-#define specialCopIO(sv) ((sv) == Nullsv)
+#define specialCopIO(sv) ((sv) == NULL)
 
 /* ----------- fill in things that have not got #define'd  ---------- */
 
@@ -210,19 +210,11 @@ PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto,
 
 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 */
-#undef  __attribute__
-#endif
-#define __attribute__(attr)
-#endif
+#  ifdef HASATTRIBUTE_FORMAT
+#    define __attribute__format__(x,y,z) __attribute__((format(x,y,z)))
+#  else
+#    define __attribute__format__(x,y,z)
+#  endif
 #endif
 #ifndef PerlIO_init
 PERL_EXPORT_C void PerlIO_init(pTHX);
@@ -383,7 +375,8 @@ PERL_EXPORT_C int PerlIO_intmode2str(int rawmode, char *mode, int *writing);
 #ifdef PERLIO_LAYERS
 PERL_EXPORT_C void PerlIO_cleanup(pTHX);
 
-PERL_EXPORT_C void PerlIO_debug(const char *fmt, ...);
+PERL_EXPORT_C void PerlIO_debug(const char *fmt, ...)
+    __attribute__format__(__printf__, 1, 2);
 typedef struct PerlIO_list_s PerlIO_list_t;