不寻常的C函数声明

Exh*_*xho 11 c declaration function

我目前正在使用一个旧的C库(在90年代早期制作),以下函数声明使我感到困惑:

#define bland_dll
typedef unsigned short int usint;
typedef unsigned char uchar;

int bland_dll Read_Chan (usint channel);
Run Code Online (Sandbox Code Playgroud)

什么是bland_dll函数的名称,它的返回类型之间在做什么?

谢谢你的灯!

t0m*_*13b 7

它是一个宏定义为空,所以当预处理时它结果是:

int Read_Chan (usint channel);
Run Code Online (Sandbox Code Playgroud)

我怀疑,它是从早期宣告DLL链接类型的延续,例如pascal,它对链接器具有特殊意义.另一个例子是__cdecl.

为了完成编译器链接机制的特性:

  1. __stdcall
  2. __fastcall
  3. __cdecl

它们中的每一个都影响了链接器在编译时管理名称修饰的方式,并且可能由于链接时间开关的不同而导致链接到第三方DLL的连接.

编辑:谢谢放松修正.