]> granicus.if.org Git - graphviz/commit
fix macOS lexer compilation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 22 Aug 2020 20:12:16 +0000 (13:12 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 22 Aug 2020 20:12:16 +0000 (13:12 -0700)
commit429718cb387092b5bf81850ac97d18ca34149055
treeb7779a69a068dbb7d2438625b2566e1726c2cd72
parent276ed5873b1dcab98a75dfbebf25f1f065efc569
fix macOS lexer compilation

Commits 3b00c1fc6b949cc9744d075e0d2b2ed4b1c46763 and
5162bfe8e72624ef7988b217e289476325365810 removed find-and-replace of an isatty
string, which exposed the following compilation error on macOS:

  [ 69%] Building C object lib/cgraph/CMakeFiles/cgraph.dir/grammar.c.o
  [ 70%] Building C object lib/cgraph/CMakeFiles/cgraph.dir/scan.c.o
  /Users/north/src/graphviz/build/lib/cgraph/scan.c:1706:12: error: expected
        identifier or '('
  extern int isatty (int );
             ^
  scan.l:44:19: note: expanded from macro 'isatty'
  #define isatty(x) 0
                    ^
  1 error generated.
  make[2]: *** [lib/cgraph/CMakeFiles/cgraph.dir/scan.c.o] Error 1
  make[1]: *** [lib/cgraph/CMakeFiles/cgraph.dir/all] Error 2
  make: *** [all] Error 2

which conveniently explained why this find-and-replace had existed in the first
place. Rather than reverting this, the present change uses a more principled way
of instructing Flex not to call isatty().

This reverts 40a5a33ac76e4d3d22662fd51e7c0e1d2be3100b. Related to #1796, !1522,
!1523.
lib/cgraph/scan.l