Go to main content

Oracle® Solaris 64-bit Developer's Guide

Exit Print View

Updated: March 2019
 
 

6.10 Changes to stdio

In the 64-bit environment, the stdio facility allows more than 256 streams to be open simultaneously. Given the large number of open streams, iterating over every file descriptor is inefficient. To improve efficiency, you can use the closefrom() and fdwalk() API's to iterate over the open file descriptors. For more information, see closefrom(3C) and fdwalk(3C) man pages.


Note -  The 32-bit stdio facility continues to have the 256 streams limit.

64-bit applications should not rely on having access to the members of the FILE data structure. Attempts to access private implementation-specific structure members directly can result in compilation errors. Existing 32-bit applications are unaffected by this change, but any direct usage of these structure members should be removed from all code.

The FILE structure has a long history, and a few applications have looked inside the structure to glean additional information about the state of the stream. Because the 64-bit version of the structure is now opaque, a new family of routines has been added to both 32-bit libc and 64-bit libc to allow the same state to be examined without depending on implementation internals. For example, see the __fbufsize(3C) man page.