This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: local.h in scanf.c


Artem B. Bityuckiy wrote:
Hello.

We do some development with Newlib and have changed local.h. This caused error while compiling scanf.c. See at newlib/libc/stdio/scanf.c - local.h is included twice. Is this just non-essential defect? Why local.h doesn't contain something like #ifdef _LOCAL_H_/#endif ?

local.h is just a local header file that is not externalized. It is also not meant to be included multiple times. The C header files available to the end-user have to be protected from multiple inclusion as some header files include others and the end-user is not restricted from including them multiple times. This is not the case for local.h.


I have removed the extraneous 2nd include. Thanks for spotting this.

-- Jeff J.

If this is a defect I offer to:
1. exclude double local.h inclusion from scan.f
2. add #ifdef _LOCAL_H_/#endif to newlib/libc/stdio/local.h

Artem B. Bityuckiy.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]