mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Fix PerlSIO_fputc() and PerlSIO_fputs() signatures
They should have the same prototype as in stdio. This "proper fix" replaces the 5.12.0 compatible fix in commit 634b482, but cannot be integrated into 5.12.1 because it breaks binary compatibility. See also http://rt.perl.org/rt3/Public/Bug/Display.html?id=72704
This commit is contained in:
parent
20c8f8f911
commit
50a4e53597
12
iperlsys.h
12
iperlsys.h
@ -78,8 +78,8 @@ typedef int (*LPGetBufsiz)(struct IPerlStdIO*, FILE*);
|
||||
typedef int (*LPGetCnt)(struct IPerlStdIO*, FILE*);
|
||||
typedef STDCHAR* (*LPGetPtr)(struct IPerlStdIO*, FILE*);
|
||||
typedef char* (*LPGets)(struct IPerlStdIO*, FILE*, char*, int);
|
||||
typedef int (*LPPutc)(struct IPerlStdIO*, FILE*, int);
|
||||
typedef int (*LPPuts)(struct IPerlStdIO*, FILE*, const char*);
|
||||
typedef int (*LPPutc)(struct IPerlStdIO*, int, FILE*);
|
||||
typedef int (*LPPuts)(struct IPerlStdIO*, const char *, FILE*);
|
||||
typedef int (*LPFlush)(struct IPerlStdIO*, FILE*);
|
||||
typedef int (*LPUngetc)(struct IPerlStdIO*, int,FILE*);
|
||||
typedef int (*LPFileno)(struct IPerlStdIO*, FILE*);
|
||||
@ -225,9 +225,9 @@ struct IPerlStdIOInfo
|
||||
(*PL_StdIO->pGetCnt)(PL_StdIO, (f))
|
||||
#define PerlSIO_get_ptr(f) \
|
||||
(*PL_StdIO->pGetPtr)(PL_StdIO, (f))
|
||||
#define PerlSIO_fputc(f,c) \
|
||||
#define PerlSIO_fputc(c,f) \
|
||||
(*PL_StdIO->pPutc)(PL_StdIO, (c),(f))
|
||||
#define PerlSIO_fputs(f,s) \
|
||||
#define PerlSIO_fputs(s,f) \
|
||||
(*PL_StdIO->pPuts)(PL_StdIO, (s),(f))
|
||||
#define PerlSIO_fflush(f) \
|
||||
(*PL_StdIO->pFlush)(PL_StdIO, (f))
|
||||
@ -311,8 +311,8 @@ struct IPerlStdIOInfo
|
||||
#define PerlSIO_get_cnt(f) 0
|
||||
#define PerlSIO_get_ptr(f) NULL
|
||||
#endif
|
||||
#define PerlSIO_fputc(f,c) fputc(c,f)
|
||||
#define PerlSIO_fputs(f,s) fputs(s,f)
|
||||
#define PerlSIO_fputc(c,f) fputc(c,f)
|
||||
#define PerlSIO_fputs(s,f) fputs(s,f)
|
||||
#define PerlSIO_fflush(f) Fflush(f)
|
||||
#define PerlSIO_fgets(s, n, fp) fgets(s,n,fp)
|
||||
#if defined(VMS) && defined(__DECC)
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
#define PerlIO_fdopen PerlSIO_fdopen
|
||||
#define PerlIO_reopen PerlSIO_freopen
|
||||
#define PerlIO_close(f) PerlSIO_fclose(f)
|
||||
#define PerlIO_puts(f,s) PerlSIO_fputs(f,s)
|
||||
#define PerlIO_putc(f,c) PerlSIO_fputc(f,c)
|
||||
#define PerlIO_puts(f,s) PerlSIO_fputs(s,f)
|
||||
#define PerlIO_putc(f,c) PerlSIO_fputc(c,f)
|
||||
#if defined(VMS)
|
||||
# if defined(__DECC)
|
||||
/* Unusual definition of ungetc() here to accomodate fast_sv_gets()'
|
||||
|
||||
@ -669,13 +669,13 @@ PerlStdIOGets(struct IPerlStdIO* piPerl, FILE* pf, char* s, int n)
|
||||
}
|
||||
|
||||
int
|
||||
PerlStdIOPutc(struct IPerlStdIO* piPerl, FILE* pf, int c)
|
||||
PerlStdIOPutc(struct IPerlStdIO* piPerl, int c, FILE* pf)
|
||||
{
|
||||
return win32_fputc(c, pf);
|
||||
}
|
||||
|
||||
int
|
||||
PerlStdIOPuts(struct IPerlStdIO* piPerl, FILE* pf, const char *s)
|
||||
PerlStdIOPuts(struct IPerlStdIO* piPerl, const char *s, FILE* pf)
|
||||
{
|
||||
return win32_fputs(s, pf);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user