develooper Front page | perl.perl5.porters | Postings from November 2000

Re: perlio.c:1680: undefined reference to `setmode'

Thread Previous
From:
Nick Ing-Simmons
Date:
November 28, 2000 02:07
Subject:
Re: perlio.c:1680: undefined reference to `setmode'
Message ID:
200011281006.KAA20349@mikado.tiuk.ti.com
Calle Dybedahl <calle@lysator.liu.se> writes:
>>>>>> "Andreas" == Andreas J Koenig <andreas.koenig@anima.de> writes:
>
>> Since patch 7861 perl does not compile on my RedHat 6.2 box. 7858 was
>> the last that was ok.
>
>I don't know exactly since which patch, but the rsynced bleadperl as
>of a few minutes ago doesn't build on my FreeBSD machine, and the
>error is also to do with setmode:
>
>`sh  cflags libperl.a perlio.o`  perlio.c
>          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing
>-I/usr/local/include -O 
>perlio.c: In function `PerlIOBuf_fdopen':
>perlio.c:1680: warning: passing arg 1 of `setmode' makes pointer from integer without a cast
>perlio.c:1680: too many arguments to function `setmode'
>perlio.c:1680: warning: initialization makes integer from pointer without a cast
>*** Error code 1

Drat, that code in perlio.c is this:

 if (O_BINARY != O_TEXT)
  {
   int code = PerlLIO_setmode(fd, O_BINARY);
   PerlIO_debug(__FUNCTION__ " %s fd=%d m=%s c=%d\n",tab->name,fd,mode,code); 
  }

I meant:

#if  O_BINARY != O_TEXT
  {
   int code = PerlLIO_setmode(fd, O_BINARY);
   PerlIO_debug(__FUNCTION__ " %s fd=%d m=%s c=%d\n",tab->name,fd,mode,code); 
  }
#endif

or rather seeing as debug should not be required:

#if O_BINARY != O_TEXT
   PerlLIO_setmode(fd, O_BINARY);
#endif




-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About