Boost logo

Boost Testing :

From: Jonathan Turkanis (turkanis_at_[hidden])
Date: 2008-01-16 00:46:01

Christopher Cambly wrote:
>>> Jonathan Turkanis <turkanis_at_[hidden]> wrote on 12/01/2008 03:27:42

>>> I guess if I was to tentatively suggest something for AIX in general it
>>> would be _LARGE_FILE_API
> Forget I mentioned it :-) I spoke with the AIX developers today and they
> said applications shouldn't ever use _LARGE_FILE_API directly themselves

Okay, that would explain the lack of documentation. I have now forgotten
about it.

> Here is the response from them to your original query:
> ****
> So, as for what the Boost code should use, note that the presence of
> _LARGE_FILES controls whether or not the file handling API's map to their
> counterparts -- in other words, it serves the same purpose that the coded
> conditional does below. (meaning the coded conditional in your code)
> In other words, if they simply always did this for AIX:
> # define BOOST_IOSTREAMS_FD_SEEK lseek
> After including the standard header files, that's all taken care of because
> if he has defined _LARGE_FILES, then lseek is already defined to lseek64.
> If _LARGE_FILES is not defined, then lseek is just lseek. Also
> _LARGE_FILES defines off_t to be a long long instead of a long, so if you
> always just use the names "off_t" and "lseek" (and so on), the types will
> be correct for either defining or not defining _LARGE_FILES.

> The best info on this is in the AIX pubs, in the "Writing Programs That
> Access Large Files" page.

I read that document after you recommended it a few messages back.

My goal is to take advantage of the 64-bit aware functions whenever they
are available. If I understand the document correctly, unless
_LARGE_FILES is defined, if I use plain lseek instead of lseek64, I will
get the 32-bit versions, which is not what I want.

Based on the AIX developer's remarks above, I'm now wondering whether I
could just use lseek64 unconditionally on AIX (instead of using lseek
unconditionally, as suggested).

I think I may add a couple of tests to verify which functions are
available with which options.

> ***
> I'm not sure whether or not this is a satisfactory response to your
> question. The recommendation being that on AIX let the system headers
> determine the function to be called. But...If I read the above correctly,
> it also seems like if you really want to do it in the Boost,

Thanks for all your help.

> the code as
> you have it now in SVN should work.
> Chris Cambly
> XL C/C++ Compiler Development

Jonathan Turkanis

Boost-testing list run by mbergal at