Re: [perl #18872] File::Basename example misleading
[p5sagit/p5-mst-13.2.git] / perlio.h
index b12539d..b5082ea 100644 (file)
--- a/perlio.h
+++ b/perlio.h
@@ -1,3 +1,12 @@
+/*    perlio.h
+ *
+ *    Copyright (c) 1997-2003, Larry Wall
+ *
+ *    You may distribute under the terms of either the GNU General Public
+ *    License or the Artistic License, as specified in the README file.
+ *
+ */
+
 #ifndef _PERLIO_H
 #define _PERLIO_H
 /*
@@ -31,7 +40,7 @@
 #if defined(PERL_IMPLICIT_SYS)
 #ifndef USE_PERLIO
 #ifndef NETWARE
-# define USE_PERLIO
+/* # define USE_PERLIO */
 #endif
 #endif
 #endif
@@ -149,7 +158,7 @@ extern void PerlIO_clone(pTHX_ PerlInterpreter *proto, CLONE_PARAMS *param);
 #endif                         /* ifndef PERLIO_NOT_STDIO */
 #endif                         /* PERLIO_IS_STDIO */
 
-#define specialCopIO(sv) ((sv) != Nullsv)
+#define specialCopIO(sv) ((sv) == Nullsv)
 
 /* ----------- fill in things that have not got #define'd  ---------- */
 
@@ -197,7 +206,10 @@ extern void PerlIO_init(pTHX);
 #endif
 #ifndef PerlIO_stdoutf
 extern int PerlIO_stdoutf(const char *, ...)
-    __attribute__ ((__format__(__printf__, 1, 2)));
+#ifdef CHECK_FORMAT
+    __attribute__ ((__format__(__printf__, 1, 2)))
+#endif
+;
 #endif
 #ifndef PerlIO_puts
 extern int PerlIO_puts(PerlIO *, const char *);
@@ -232,10 +244,10 @@ extern int PerlIO_ungetc(PerlIO *, int);
 extern PerlIO *PerlIO_fdopen(int, const char *);
 #endif
 #ifndef PerlIO_importFILE
-extern PerlIO *PerlIO_importFILE(FILE *, int);
+extern PerlIO *PerlIO_importFILE(FILE *, const char *);
 #endif
 #ifndef PerlIO_exportFILE
-extern FILE *PerlIO_exportFILE(PerlIO *, int);
+extern FILE *PerlIO_exportFILE(PerlIO *, const char *);
 #endif
 #ifndef PerlIO_findFILE
 extern FILE *PerlIO_findFILE(PerlIO *);
@@ -257,11 +269,17 @@ extern void PerlIO_setlinebuf(PerlIO *);
 #endif
 #ifndef PerlIO_printf
 extern int PerlIO_printf(PerlIO *, const char *, ...)
-    __attribute__ ((__format__(__printf__, 2, 3)));
+#ifdef CHECK_FORMAT
+    __attribute__ ((__format__(__printf__, 2, 3)))
+#endif
+;
 #endif
 #ifndef PerlIO_sprintf
 extern int PerlIO_sprintf(char *, int, const char *, ...)
-    __attribute__ ((__format__(__printf__, 3, 4)));
+#ifdef CHECK_FORMAT
+    __attribute__ ((__format__(__printf__, 3, 4)))
+#endif
+;
 #endif
 #ifndef PerlIO_vprintf
 extern int PerlIO_vprintf(PerlIO *, const char *, va_list);