Mangled function type declarations?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcus Lessard

    Mangled function type declarations?

    Why do header files have declarations for functions in them that look like
    this:

    unsigned long _RTLENTRY _EXPFUNC _beginthread (void (_USERENTRY
    *__start)(void *),unsigned __stksize, void *__arg);

    When the implementation files declares them like this:
    int thread_id;
    thread_id = _beginthread(th read_code,4096, (void *)i);

    What is the "_RTLENTRY _EXPFUNC" all about and what should I know about it?
    My help files (Borland bcc32 ver 5.5) don't have a lot to say about it.

    Thanks In Advance!


  • Eric Sosman

    #2
    Re: Mangled function type declarations?

    Marcus Lessard wrote:[color=blue]
    >
    > Why do header files have declarations for functions in them that look like
    > this:
    >
    > unsigned long _RTLENTRY _EXPFUNC _beginthread (void (_USERENTRY
    > *__start)(void *),unsigned __stksize, void *__arg);
    >
    > When the implementation files declares them like this:
    > int thread_id;
    > thread_id = _beginthread(th read_code,4096, (void *)i);
    >
    > What is the "_RTLENTRY _EXPFUNC" all about and what should I know about it?
    > My help files (Borland bcc32 ver 5.5) don't have a lot to say about it.[/color]

    These declarations use Implementation Magic: they are
    mystical incantations that have meaning (one presumes) to
    the compiler that's part of the same package as the headers.
    We do not know exactly what they mean; they are "private
    communications" to the compiler from the authors of the
    header.

    "Meddle not in the affairs of wizards, for they are
    subtle and quick to anger."

    --
    Eric.Sosman@sun .com

    Comment

    Working...