]> git.proxmox.com Git - libtpms.git/commitdiff
rev148: Rework USE_MARSHALING_DEFINES
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 11 Jul 2018 16:54:28 +0000 (12:54 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 3 Jan 2019 18:15:44 +0000 (13:15 -0500)
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/tpm2/TpmBuildSwitches.h

index d52856d9933ca1c16bb7168eec4c5bc11d02e494..c866d28d74f5f7173c6f387c6c0a16298cff64d0 100644 (file)
 #   undef   CLOCK_STOPS
 #   define  CLOCK_STOPS             NO     // Default: Either YES or NO
 #endif
+
+// This switch allows use of #defines in place of pass-through marshaling or unmarshaling code. A
+// pass-through function just calls another function to do the required function and does no
+// parameter checking of its own. The table-driven dispatcher calls directly to the lowest level
+// marshaling/unmarshaling code and by-passes any pass-through functions so, for that code. If
+// #defines are used in other code, then no code is generated for a pass-through
+// marshaling/unmarshaling function.
+#if (defined USE_MARSHALING_DEFINES) && (USE_MARSHALING_DEFINES != NO)
+#   undef   USE_MARSHALING_DEFINES
+#   define  USE_MARSHALING_DEFINES  YES
+#else
+#   define USE_MARSHALING_DEFINES   YES     // Default: Either YES or NO
+#endif
+
 /* The switches in this group can only be enabled when running a simulation */
 #ifdef SIMULATION
 /* Enables use of the key cache */