[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix for bug #47381, how to order #includes
From: |
Mike Miller |
Subject: |
fix for bug #47381, how to order #includes |
Date: |
Fri, 25 Mar 2016 15:30:21 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Rik, all,
The fix [1] for bug #47381 [2] accidentally breaks building Octave
without gl2ps [3]. The header file associated with gl2ps-print.cc,
gl2ps-print.h, needs to be #included outside of the HAVE_GL2PS_H
condition.
This is easy to restore, but any ideas how to avoid accidentally
rearranging things like this in the future? I'd be tempted to clean up
includes in the same way and make the same mistake. The graphics classes
are particularly complicated. Should we comment when #includes are
grouped for particular reasons like this? Should we use additional #if
blocks to separate conditional includes from unconditional includes, and
conditional code from unconditional code?
[1]: http://hg.savannah.gnu.org/hgweb/octave/rev/ab8760b1245d
[2]: https://savannah.gnu.org/bugs/?47381
[3]: https://hydra.nixos.org/build/33552213
--
mike