Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What is the purpose of having underscored names and then defining a non-underscored alias to it?
Post
What is the purpose of having underscored names and then defining a non-underscored alias to it?
+5
−0
In a C implementation in <stdio.h>
on Linux I saw something like:
extern FILE *__stdinp;
extern FILE *__stdoutp;
extern FILE *__stderrp;
And then:
#define stdin __stdinp
#define stdout __stdoutp
#define stderr __stderrp
My question is, for what reason would an implementation provide the __name
items and then create aliases to them instead of just providing the canonical name to begin with?
1 comment thread