• Do you know how can I transform

    struct _WSABUF
    {
    unsigned long len;
    char FAR* far;
    }

    from windows to UNIX?

    I checked out and found out the folowing definition in windows:

    #define FAR far,

    but I don't know what 'far' means? is it a var type? how can I use it in UNIX?

    any help will be appreciated.


  • THNAKS MAN


  • Well, "far" is a memory model modifier that defines the size of a
    pointer on certain systems... Typically, you would only use it if
    dealing with a mixed model environment... Eg: in the old days,
    when people still wrote 16-bit code on 32-bit systems, having a
    "far" pointer meant it was a full 32-bit pointer, giving you full access
    to the true memory capacity of the system, as opposed to a normal
    unadorned pointer, which would've only given you 16-bits in such
    a case... But, really, this was back in the ancient times, and I
    haven't seen such nonsense in MANY years... These days, all
    code is generally just pure 32-bit code, and the entire concept of
    "near" and "far" pointers don't even apply, because they're all just
    plain flat-model 32-bit pointers... (But, then, I don't do Windoze code
    at all, so for all I know, it may very well still be in popular use in code
    written for that bass-ackwards excuse for an OS... *shrug*) Another
    place I could conceive of it being used these days is in 64-bit systems,
    where you might have a "far" pointer be a 64-bit pointer, while
    normal "near" pointers were 32-bit... But, I don't know if anyone
    is actually doing such stuff on 64-bit systems these days... I tend
    to hope not, and that they're just going for full-on 64-bit code, and
    not bothering with stupid mistakes of the past, such as "small" and
    "large" model code, which really shouldn't be repeated... *shrug*







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about far - is a var? , Please add it free.