]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
tools/libxl: don't include libxl_osdeps.h from libxlutil sources
authorJuergen Gross <jgross@suse.com>
Fri, 28 Aug 2020 15:07:40 +0000 (17:07 +0200)
committerWei Liu <wl@xen.org>
Wed, 9 Sep 2020 10:57:25 +0000 (10:57 +0000)
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>
Acked-by: Wei Liu <wl@xen.org>
tools/libxl/libxlu_cfg.c
tools/libxl/libxlu_cfg_i.h
tools/libxl/libxlu_disk.c
tools/libxl/libxlu_disk_l.c
tools/libxl/libxlu_disk_l.h
tools/libxl/libxlu_disk_l.l
tools/libxl/libxlu_pci.c
tools/libxl/libxlu_vif.c

index f9e8aa2f3a8e1bb21a2c4bfcbb489aab09bca56d..874f5abfb9236caf89294bb81ae417b534bce567 100644 (file)
@@ -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>
 
index 87b19df311997152e49c62c32d11fc1aca8943b6..4217f5b28d1f092377cfe651cb5dffc1571d35dc 100644 (file)
@@ -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"
 
index 18fe386dbe2f0adff504af5863c2e30d4c09975d..1de16a6a062c74ce19d4ff15f57ed46d3125396b 100644 (file)
@@ -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"
index 05f7ac74a051fdf9f80131489a7466f3aab99cad..32d4b74b584152e19a84f465c7e120121abc7daf 100644 (file)
@@ -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();
index 54f4662d7a6b7830a36967cc1c3451d5bca432f5..6abeecf2793c167e94a19a2574221bb8d9f05721 100644 (file)
@@ -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 */
index 7a46f4a30ca4f66ecf07d25c3b2142b8fed6481f..3bd639aab0457acd9fa313c31258f905724c9951 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 %top{
-#include "libxl_osdeps.h" /* must come before any other headers */
+#define _GNU_SOURCE
 }
 
 %{
index e2709c5f8957127b540aff650c38aadcc6660ad4..12fc0b3a7fdc350877e2934d87fec707ce326b45 100644 (file)
@@ -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"
index 0665e624dc178a6ca8058e04a7baacaf1475bd37..ccf0cbdf577ddd9c5e345045b2bc902531ab826d 100644 (file)
@@ -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$";