X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlio.h;h=dd1e3d51a09dec9dfb43a062d6a9506d0319635e;hb=75d1b5dfc310050618a644104f03818db57b4915;hp=1b7ac367c8c314621f1dd7ed81a92a1ae0ad2634;hpb=a9a28921a06508e1ec8a1da7fdf58c72faa64c96;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlio.h b/perlio.h index 1b7ac36..dd1e3d5 100644 --- a/perlio.h +++ b/perlio.h @@ -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); @@ -371,15 +369,9 @@ extern int PerlIO_intmode2str(int rawmode, char *mode, int *writing); #ifdef PERLIO_LAYERS extern void PerlIO_cleanup(pTHX); -extern void PerlIO_debug(const char *fmt, ...) -#ifdef CHECK_FORMAT - __attribute__ ((__format__(__printf__, 1, 2))) -#endif -; - +extern void PerlIO_debug(const char *fmt, ...); typedef struct PerlIO_list_s PerlIO_list_t; -extern PerlIO *PerlIO_syslayer(pTHX_ PerlIO *); #endif