Large file API - Unix

This is a discussion on Large file API - Unix ; Hello All; Is there a payoff for using Large File API? Why, for example, wouldn't one use xxx64() functions in all cases rather than considering either to use 32-bit or 64-bit API. Thank you, Alona...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Large file API

  1. Large file API

    Hello All;

    Is there a payoff for using Large File API?
    Why, for example, wouldn't one use xxx64() functions in all cases
    rather than considering either to use 32-bit or 64-bit API.

    Thank you,
    Alona

  2. Re: Large file API

    >Is there a payoff for using Large File API?
    >Why, for example, wouldn't one use xxx64() functions in all cases
    >rather than considering either to use 32-bit or 64-bit API.


    Because many operating systems don't HAVE xxx64() functions? (or,
    rather, they are named xxx(), not xxx64(), and there is no 32-bit
    API). FreeBSD (for versions >= about 2, I think) is one example.



  3. Re: Large file API

    Alona wrote:
    > Hello All;
    >
    > Is there a payoff for using Large File API?
    > Why, for example, wouldn't one use xxx64() functions in all cases
    > rather than considering either to use 32-bit or 64-bit API.
    >
    > Thank you,
    > Alona


    It mostly relates to breaking compatibility AFAIK with the previous
    structures and syscalls for old programs that can't be recompiled to
    work with the new 64-bit syscalls, and environments where the Large
    File Support isn't available.

    -D_LARGEFILE_SOURCE and -D_LARGEFILE64_SOURCE are usually enough to
    provide macro wrappers that use the 64-bit syscalls, as well as structs
    that work with those. Generally you don't need to use the functions
    with a 64 suffix directly in your code.

    See this documentation on Large File Support:
    http://www.unix.org/version2/whatsnew/lfs20mar.html


    George

+ Reply to Thread