This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: .def files for stdcall functions (was: linking problems with the minimalist version)


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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]