fbb-git / icmake

Icmake is a make utility using a C-line grammar
9 stars 2 forks source link

rss.h: include <stdarg.h> for va_list #4

Open ip1981 opened 7 years ago

fbb-git commented 7 years ago

Dear Igor Pashev, you wrote:

You can view, comment on, or merge this pull request online at:

https://github.com/fbb-git/icmake/pull/4

-- Commit Summary --

  • rss.h: include for va_list

Thanks for your patch suggestion. I noticed that stdarg.h is already included in quite a few header files:

comp/parser/parser.ih
comp/util/util.ih
dep/options/options.ih
dep/util/util.ih
icmake/icmake.ih
icmbuild/icmbuild.ih
pp/parser/parser.ih
rss/rss.ih

while va_list is used in

comp/parser/pcallrss.c
comp/parser/pgeneratecode.c
comp/util/printf.c
comp/util/semantic.c
dep/options/optmsg.c
dep/util/strcatn.c
icmake/spawnlp.c
rss/error.c
rss/errorlist.c
rss/fatal.c
rss/msg.c
rss/rsmsg.c
rss/warning.c

AFAICS the above header files cover the inclusion of stdarg.h for the listed source files. Is there a particular file which doesn't compile on your system because of a missing stdarg.h inclusion? When I compile icmake on my (Debian Linux) system everything compiles fine.

Please advise,

-- Frank B. Brokken Center for Information Technology, University of Groningen (+31) 50 363 9281 Public PGP key: http://pgp.surfnet.nl Key Fingerprint: DF32 13DE B156 7732 E65E 3B4D 7DB2 A8BE EAE4 D8AA

ip1981 commented 7 years ago

The problem is that va_list is used in rss.h itself. And I got compilation error on this file when builing for https://www.osdyson.org.

stdarg.h might be included implicitly on some systems, but it is always better to follow standards and include headers explicitly :)

fbb-git commented 7 years ago

Dear Igor Pashev, you wrote:

The problem is that va_list is used in rss.h itself.

You're right. I overlooked that one. Thanks! I'll fix it in the next icmake release.

Thx again,

-- Frank B. Brokken Center for Information Technology, University of Groningen (+31) 50 363 9281 Public PGP key: http://pgp.surfnet.nl Key Fingerprint: DF32 13DE B156 7732 E65E 3B4D 7DB2 A8BE EAE4 D8AA