Subject: RE: .def files for stdcall functions (was: linking problems with the minimalist version)
From: [email-masked] (Scott Christley)

12 Sep 1997 07:07:40 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: Colin Peters <[email-masked]>

At 02:39 PM 9/12/97 +0900, Colin Peters wrote:
>
>My beef with all this is: why does GCC do it this way at all? What purpose
>does the @NN serve? After all, GCC knows how to generate the correct
>function call given a prototype, it *generates* the @NN, so it doesn't
>need it to know what to do. I don't think any other compilers add on @NN
>to the names of WINAPI functions like this. Why doesn't GCC just use the
>plain function name and call it with PASCAL calling convention? Someone
>please enlighten me.

It's a Microsoft thing not GCC; if you look at the Microsoft libraries you
will see that they have the @NN tacked onto the function names.  Special
code had to be added to GCC so that it produced the appropriate functions.
That is why you see these predefinitions when you run GCC with the -v flag

-D__stdcall=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__))

Now why Microsoft felt it was necessary to tack on @NN, I don't know.

Scott

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".