[Live-devel] Porting of live555 Streaming on Windows CE

Sid Price sidprice at softtools.com
Tue Jul 24 09:22:48 PDT 2012


Thanks Ross,

 

I think we are getting close to the issue here because in stdlib.h I see the
following code:

 

#if !__STDC__

/* Non-ANSI names for compatibility */

#define fcloseall _fcloseall

#define fileno    _fileno

#define flushall  _flushall

#endif /* !__STDC__ */

 

Notice this maps "fileno" to "_fileno". And therefore since "_fopen" returns
(void *) we have an implicit cast, and hence the error. If I define __STDC__
then "fileno" is undefined.

 

According to the help for the compiler this, and other, POSIX functions are
deprecated in favor of the ANSI function. 

Sid.

 

From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Tuesday, July 24, 2012 9:37 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Porting of live555 Streaming on Windows CE

 

The problem with _fileno is that it returns "void *" and
"makeSocketNonBlocking" and "turnOffBackgroundReadHandling"takes a "socket"
parameter that is defined as "int". 

 

Note the difference between "fileno()" - a standard C library function that
should always returns an "int" (even, I hope, on WinCE) - and "_fileno()"
(i.e., with a preceding "_"), which is a Windows-specific function which we
use only in Windows-specific code (in the files "InputFile.cpp" and
"OutputFile.cpp").  Note also that we use "_fileno()" only inside other
Windows-specific functions "_setmode()", "_lseeki64()", and "_telli64()", so
I'm surprised if you're seeing problems there.

 

So is the problem only with "_fileno()" (in which case, please propose a
patch to the Windows-specific code in "InputFile.cpp" and "OutputFile.cpp")?

 

Or are you saying that Microsoft has redefined the return type of the
standard C library function "fileno()" as well??

 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/ 

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5862 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120724/848ae8ab/attachment-0001.bin>


More information about the live-devel mailing list