libxl: CODING_STYLE: Explicitly deprecate #ifdef
authorIan Jackson <iwj@xenproject.org>
Tue, 12 Oct 2021 14:50:28 +0000 (15:50 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 13 Oct 2021 14:10:38 +0000 (15:10 +0100)
We don't use ifdefs in the main code.  Actually document this.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/libs/light/CODING_STYLE

index 3d572f69253366d020ee04136a01d732e75d8a27..b1a6a45c74df083cdd793e5cb6a67a76cb5c1174 100644 (file)
@@ -121,6 +121,16 @@ permitted exceptions to the usual libxl code formatting rules.
 
 
 
+ARCHITECTURE-SPECIFIC CODE, CONDITIONAL COMPILATION
+---------------------------------------------------
+
+Architecture-specific code should be isolated in libxl_<arch>.c,
+with a function call interface, wherever possible.
+
+#ifdefs should be avoided, and in any case not interspersed through
+the primary functional code.
+
+
 IDEMPOTENT DATA STRUCTURE CONSTRUCTION/DESTRUCTION
 --------------------------------------------------