# New Ticket Created by Ron Blaschke
# Please include the string: [perl #43569]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=43569 >
Problem:
Building Parrot on Win32 currently emits a warning for VC and an
error for MinGW because C<PIO_win32_isatty> is declared before it is used.
VC8
src\io\io_win32.c(341) : warning C4013: 'PIO_win32_isatty' undefined;
assuming extern returning int
src\io\io_win32.c(389) : warning C4142: benign redefinition of type
MinGW gcc
src\io\io_win32.c: In function `PIO_win32_fdopen':
src\io\io_win32.c:341: warning: implicit declaration of function
`PIO_win32_isatty'
src\io\io_win32.c: At top level:
src\io\io_win32.c:389: warning: no previous prototype for 'PIO_win32_isatty'
src\io\io_win32.c:389: error: conflicting types for 'PIO_win32_isatty'
src\io\io_win32.c:341: error: previous implicit declaration of
'PIO_win32_isatty' was here
mingw32-make: *** [src\io\io_win32.o] Error 1
Solution:
C<PIO_win32_isatty> can be static, I think, because
C<PIO_stdio_isatty> and C<PIO_unix_isatty> are too. I also headerized
the file again, which brings in the required function declaration.
This should solve issue [perl #43515].
Changed Files:
src/io/io_win32.c
Ron
Index: src/io/io_win32.c
===================================================================
--- src/io/io_win32.c (revision 19618)
+++ src/io/io_win32.c (working copy)
@@ -68,6 +68,7 @@
ParrotIO *io );
static INTVAL PIO_win32_init( Interp *interp, ParrotIOLayer *layer );
+static INTVAL PIO_win32_isatty( PIOHANDLE fd );
static INTVAL PIO_win32_listen( Interp *interp,
ParrotIOLayer *layer,
ParrotIO *io,
@@ -384,7 +385,7 @@
*/
-INTVAL
+static INTVAL
PIO_win32_isatty(PIOHANDLE fd)
{
DWORD ftype = GetFileType(fd);