/* perlio.h
*
* Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003,
- * by Larry Wall and others
+ * 2004, 2005, 2006, 2007, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
then there are two modes determined by USE_SFIO:
USE_SFIO - If set causes PerlIO_xxx() to be #define-d onto sfio functions.
- A backward compatability mode for some specialist applications.
+ A backward compatibility mode for some specialist applications.
If USE_SFIO is not set then PerlIO_xxx() are real functions
defined in perlio.c which implement extra functionality
*/
#include <stdio.h>
-#ifdef __BEOS__
-int fseeko(FILE *stream, off_t offset, int whence);
-off_t ftello(FILE *stream);
-#endif
-
#if defined(USE_64_BIT_STDIO) && defined(HAS_FTELLO) && !defined(USE_FTELL64)
#define ftell ftello
#endif
#endif /* ifndef PERLIO_NOT_STDIO */
#endif /* PERLIO_IS_STDIO */
-#define specialCopIO(sv) ((sv) == Nullsv)
-
/* ----------- fill in things that have not got #define'd ---------- */
#ifndef Fpos_t
#define BUFSIZ 1024
#endif
+/* The default buffer size for the perlio buffering layer */
+#ifndef PERLIOBUF_DEFAULT_BUFSIZ
+#define PERLIOBUF_DEFAULT_BUFSIZ (BUFSIZ > 8192 ? BUFSIZ : 8192)
+#endif
+
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
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);
PERL_EXPORT_C int PerlIO_printf(PerlIO *, const char *, ...)
__attribute__format__(__printf__, 2, 3);
#endif
-#ifndef PerlIO_sprintf
-PERL_EXPORT_C int PerlIO_sprintf(char *, int, const char *, ...)
- __attribute__format__(__printf__, 3, 4);
-#endif
#ifndef PerlIO_vprintf
PERL_EXPORT_C int PerlIO_vprintf(PerlIO *, const char *, va_list);
#endif
PERL_EXPORT_C STDCHAR *PerlIO_get_ptr(PerlIO *);
#endif
#ifndef PerlIO_get_cnt
-PERL_EXPORT_C int PerlIO_get_cnt(PerlIO *);
+PERL_EXPORT_C SSize_t PerlIO_get_cnt(PerlIO *);
#endif
#ifndef PerlIO_set_cnt
-PERL_EXPORT_C void PerlIO_set_cnt(PerlIO *, int);
+PERL_EXPORT_C void PerlIO_set_cnt(PerlIO *, SSize_t);
#endif
#ifndef PerlIO_set_ptrcnt
-PERL_EXPORT_C void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, int);
+PERL_EXPORT_C void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, SSize_t);
#endif
#ifndef PerlIO_get_base
PERL_EXPORT_C STDCHAR *PerlIO_get_base(PerlIO *);
#endif
#ifndef PerlIO_get_bufsiz
-PERL_EXPORT_C int PerlIO_get_bufsiz(PerlIO *);
+PERL_EXPORT_C SSize_t PerlIO_get_bufsiz(PerlIO *);
#endif
#ifndef PerlIO_tmpfile
PERL_EXPORT_C PerlIO *PerlIO_tmpfile(void);
#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;
END_EXTERN_C
#endif /* _PERLIO_H */
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 et:
+ */