I see the following code in HPUX C program:
extern int fcntl __((int, int, ...));
_LF_EXTERN int creat __((const char *, mode_t));
These lines are compiled using aCC.
Could somebody let me know the meaning of 2 underscores after fcntl
and creat
in the above code?
This is most likely a macro that enables the use of the header with old, pre-ANSI C compilers.
The "old style" C function declarations didn't include parameter types.
I suspect its definition looks somewhat like this
I believe type-safe function prototypes is one of the first language features that C adopted from C++.
And the fact that I remember this makes me feel very, very old.