[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 4/9] builder: fix inclusion of <config.h> in lex-generated source



Use a %top block for including <config.h>, so it is included prior to
any other include, even for system ones. This makes sure its definitions
are properly used in gnulib replacement headers.
---
 builder/index-scan.l | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/builder/index-scan.l b/builder/index-scan.l
index e3fe377..b5eade5 100644
--- a/builder/index-scan.l
+++ b/builder/index-scan.l
@@ -16,9 +16,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-%{
+%top{
 #include <config.h>
+}
 
+%{
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-- 
1.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]