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

Re: [PATCH 1/5] tools/include: generate a _xen_list.h file



On 30.01.22 09:43, Juergen Gross wrote:
Today tools/include contains two basically identical header files
generated from the same source. They just differ by the used name space
and they are being generated from different Makefiles via a perl
script.

Prepare to have only one such header by using a more generic namespace
"XEN" for _xen_list.h.

As the original header hasn't been updated in the Xen tree since its
introduction about 10 years ago, and the updates of FreeBSD side have
mostly covered BSD internal debugging aids, just don't generate the
new header during build, especially as using the current FreeBSD
version of the file would require some updates of the perl script,
which are potentially more work than just doing the needed editing by
hand. Additionally this enables to remove the not needed debugging
extensions of FreeBSD.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
  tools/include/Makefile    |   2 +
  tools/include/_xen_list.h | 523 ++++++++++++++++++++++++++++++++++++++
  2 files changed, 525 insertions(+)
  create mode 100644 tools/include/_xen_list.h

diff --git a/tools/include/Makefile b/tools/include/Makefile
index d7b51006e0..d965987f55 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -70,11 +70,13 @@ install: all
        $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io
        $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys
        $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm
+       $(INSTALL_DATA) _xen_list.h $(DESTDIR)$(includedir)
.PHONY: uninstall
  uninstall:
        echo "[FIXME] uninstall headers"
        rm -rf $(DESTDIR)$(includedir)/xen
+       rm -f $(DESTDIR)$(includedir)/_xen_list.h
.PHONY: clean
  clean:
diff --git a/tools/include/_xen_list.h b/tools/include/_xen_list.h
new file mode 100644
index 0000000000..79acaf4cf3
--- /dev/null
+++ b/tools/include/_xen_list.h
@@ -0,0 +1,523 @@
+/*
+ * DO NOT EDIT THIS FILE
+ *
+ * Generated automatically by bsd-sys-queue-h-seddery to
+ *  - introduce XEN_ and XEN_ namespace prefixes
+ *  - turn "struct type" into "type" so that type arguments
+ *     to the macros are type names not struct tags
+ *  - remove the reference to sys/cdefs.h, which is not needed
+ *
+ * The purpose of this seddery is to allow the resulting file to be
+ * freely included by software which might also want to include other
+ * list macros; to make it usable when struct tags are not being used
+ * or not known; to make it more portable.
+ */

Sorry, forgot to remove above comment. I'll wait for more comments
before resending.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.