@@ -15,8 +15,7 @@
* GNU Lesser General Public License for more details.
*/
-
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
#include <limits.h>
@@ -18,7 +18,6 @@
#ifndef LIBXLU_CFG_I_H
#define LIBXLU_CFG_I_H
-#include "libxl_osdeps.h" /* must come before any other headers */
#include "libxlu_internal.h"
#include "libxlu_cfg_y.h"
@@ -1,4 +1,3 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
#include "libxlu_internal.h"
#include "libxlu_disk_l.h"
#include "libxlu_disk_i.h"
@@ -1,7 +1,7 @@
-#line 2 "libxlu_disk_l.c"
-#include "libxl_osdeps.h" /* must come before any other headers */
+#line 1 "libxlu_disk_l.c"
+#define _GNU_SOURCE
-#line 5 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
#define YY_INT_ALIGNED short int
@@ -1199,9 +1199,9 @@ static int vdev_and_devtype(DiskParseContext *dpc, char *str) {
#undef DPC /* needs to be defined differently the actual lexer */
#define DPC ((DiskParseContext*)yyextra)
-#line 1203 "libxlu_disk_l.c"
+#line 1202 "libxlu_disk_l.c"
-#line 1205 "libxlu_disk_l.c"
+#line 1204 "libxlu_disk_l.c"
#define INITIAL 0
#define LEXERR 1
@@ -1483,7 +1483,7 @@ YY_DECL
#line 180 "libxlu_disk_l.l"
/*----- the scanner rules which do the parsing -----*/
-#line 1487 "libxlu_disk_l.c"
+#line 1486 "libxlu_disk_l.c"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1836,7 +1836,7 @@ YY_RULE_SETUP
#line 291 "libxlu_disk_l.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1840 "libxlu_disk_l.c"
+#line 1839 "libxlu_disk_l.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(LEXERR):
yyterminate();
@@ -2,10 +2,10 @@
#define xlu__disk_yyHEADER_H 1
#define xlu__disk_yyIN_HEADER 1
-#line 6 "libxlu_disk_l.h"
-#include "libxl_osdeps.h" /* must come before any other headers */
+#line 5 "libxlu_disk_l.h"
+#define _GNU_SOURCE
-#line 9 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
#define YY_INT_ALIGNED short int
@@ -696,6 +696,6 @@ extern int yylex (yyscan_t yyscanner);
#line 291 "libxlu_disk_l.l"
-#line 700 "libxlu_disk_l.h"
+#line 699 "libxlu_disk_l.h"
#undef xlu__disk_yyIN_HEADER
#endif /* xlu__disk_yyHEADER_H */
@@ -28,7 +28,7 @@
*/
%top{
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
}
%{
@@ -1,4 +1,5 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
+
#include "libxlu_internal.h"
#include "libxlu_disk_l.h"
#include "libxlu_disk_i.h"
@@ -1,4 +1,5 @@
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
+
#include "libxlu_internal.h"
static const char *vif_bytes_per_sec_re = "^[0-9]+[GMK]?[Bb]/s$";
There is no need for the sources of libxlutil to include libxl_osdeps.h as the only dependency is the leading #define _GNU_SOURCE in libxl_osdeps.h. So replace including libxl_osdeps.h by the needed define. Signed-off-by: Juergen Gross <jgross@suse.com> --- tools/libxl/libxlu_cfg.c | 3 +-- tools/libxl/libxlu_cfg_i.h | 1 - tools/libxl/libxlu_disk.c | 1 - tools/libxl/libxlu_disk_l.c | 14 +++++++------- tools/libxl/libxlu_disk_l.h | 8 ++++---- tools/libxl/libxlu_disk_l.l | 2 +- tools/libxl/libxlu_pci.c | 3 ++- tools/libxl/libxlu_vif.c | 3 ++- 8 files changed, 17 insertions(+), 18 deletions(-)