In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/6d6551238e4ff36bc7a56635f493568a7b3ec034?hp=20c8f8f9118fd23081c818637815bf1aab60b808>

- Log -----------------------------------------------------------------
commit 6d6551238e4ff36bc7a56635f493568a7b3ec034
Author: Jan Dubois <[email protected]>
Date:   Wed Apr 21 18:55:01 2010 -0700

    Update PerlStdIOGets() signature
    
    Brings it in line with the rest of the PerlStdIO* functions that
    accept parameters in the same order as the corresponding PerlSIO_*
    macros.  See also commit ecc880cc.

M       iperlsys.h
M       win32/perlhost.h

commit 50a4e5359779fd205d8586e68e94e2d99676a8ed
Author: Jan Dubois <[email protected]>
Date:   Wed Apr 21 18:47:48 2010 -0700

    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

M       iperlsys.h
M       perlsdio.h
M       win32/perlhost.h
-----------------------------------------------------------------------

Summary of changes:
 iperlsys.h       |   20 ++++++++++----------
 perlsdio.h       |    4 ++--
 win32/perlhost.h |    6 +++---
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/iperlsys.h b/iperlsys.h
index 76f5c41..4b02cb5 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -77,9 +77,9 @@ typedef STDCHAR*      (*LPGetBase)(struct IPerlStdIO*, FILE*);
 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 char*          (*LPGets)(struct IPerlStdIO*, char*, int, FILE*);
+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,14 +225,14 @@ 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))
-#define PerlSIO_fgets(s, n, fp)                                                
\
-       (*PL_StdIO->pGets)(PL_StdIO, (fp), s, n)
+#define PerlSIO_fgets(s, n, f)                                         \
+       (*PL_StdIO->pGets)(PL_StdIO, s, n, (f))
 #define PerlSIO_ungetc(c,f)                                            \
        (*PL_StdIO->pUngetc)(PL_StdIO, (c),(f))
 #define PerlSIO_fileno(f)                                              \
@@ -311,10 +311,10 @@ 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)
+#define PerlSIO_fgets(s, n, f)         fgets(s,n,f)
 #if defined(VMS) && defined(__DECC)
      /* Unusual definition of ungetc() here to accomodate fast_sv_gets()'
       * belief that it can mix getc/ungetc with reads from stdio buffer */
diff --git a/perlsdio.h b/perlsdio.h
index 1a6f2f0..25d6b36 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -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()'
diff --git a/win32/perlhost.h b/win32/perlhost.h
index be7d61d..651a367 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -663,19 +663,19 @@ PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf)
 }
 
 char*
-PerlStdIOGets(struct IPerlStdIO* piPerl, FILE* pf, char* s, int n)
+PerlStdIOGets(struct IPerlStdIO* piPerl, char* s, int n, FILE* pf)
 {
     return win32_fgets(s, n, pf);
 }
 
 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);
 }

--
Perl5 Master Repository

Reply via email to