I'm currently working with an old C library (made in the early 90's) and the following function declaration made me confused :
#define bland_dll
typedef unsigned short int usint;
typedef unsigned char uchar;
int bland_dll Read_Chan (usint channel);
What is the bland_dll
doing between the function's name and it's return type ?
Thanks for your lights!
Its a macro defining empty, so when preprocessed it turns out to be:
int Read_Chan (usint channel);
I suspect, its a holdover from the early days when declaring DLL linkage types, like pascal
which has a special meaning to the linker, for example. Another example is __cdecl
.
For completion of the idiosyncracies of compiler linkage mechanisms:
__stdcall
__fastcall
__cdecl
Each of them influenced how the linker managed the name decoration at compile time, and may have caused conniptions with linking to third party DLL's due to the differing link time switches.
Edit: Thanks unwind for the correction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With