[tlbuild] interact.cc and getline insanity

Nelson H. F. Beebe beebe at math.utah.edu
Thu Apr 24 02:41:27 CEST 2014


Karl Berry <karl at freefriends.org> comments today on problems compiling
the latest release of asymptote, which contains a private function
named getline.

I've seen similar problems with several other packages on various
systems, when those systems contain declarations of getline in system
header files that might conflict with the definition in the package.

The solution has always been to rename the package's getline to
something else, like _getline, pkgname_getline, and so on.  I've
modified some of my own packages to avoid using getline as a private
name.

The name getline is not part of POSIX, or ISO C Standards, and thus,
should NOT be appearing in system header files.  Unfortunately, it
does on some systems, and therefore, it must be viewed as a reserved
name that is not available for user code.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



More information about the tlbuild mailing list