www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/12/07:07:40

From: scottc AT net-community DOT com (Scott Christley)
Subject: RE: .def files for stdcall functions (was: linking problems
with the minimalist version)
12 Sep 1997 07:07:40 -0700 :
Message-ID: <199709121413.HAA19519.cygnus.gnu-win32@duncan.net-community.com>
Mime-Version: 1.0
To: Colin Peters <colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp>

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019