]> granicus.if.org Git - graphviz/commit
render: unconditionally include stdlib.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 3 Apr 2022 06:49:41 +0000 (08:49 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 18 Apr 2022 06:06:58 +0000 (08:06 +0200)
commit13987e752a557d35be02e4a88010f81300f92b75
tree8e43dcdb372f033cde304deabc4ed74c95e3e153
parentf83dfbd0bfa7655825459b0b296301c8eab387e8
render: unconditionally include stdlib.h

Without this change, attempting to include geomproc.h in render.h
would cause the following warning:

In file included from /home/magjac/graphviz/lib/common/shapes.c:12:
/home/magjac/graphviz/lib/common/render.h:24: warning: "__USE_GNU" redefined
   24 | #define __USE_GNU
      |
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/limits.h:26,
                 from /usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h:203,
                 from /usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h:34,
                 from /home/magjac/graphviz/lib/common/arith.h:21,
                 from /home/magjac/graphviz/lib/common/geom.h:16,
                 from /home/magjac/graphviz/lib/common/geomprocs.h:21,
                 from /home/magjac/graphviz/lib/common/shapes.c:11:
/usr/include/features.h:407: note: this is the location of the previous definition
  407 | # define __USE_GNU      1
      |

This is casued by arith.h defining _GNU_SOURCE to 1 which seems to
implicitly set __USE_GNU.
lib/common/render.h