[PATCH 04/17] crypto: Rename cipher include files to .inc.c

Richard Henderson posted 17 patches 5 years, 6 months ago
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
[PATCH 04/17] crypto: Rename cipher include files to .inc.c
Posted by Richard Henderson 5 years, 6 months ago
QEMU standard procedure for included c files is to use *.inc.c.
E.g. there are a different set of checks that are applied.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 crypto/{cipher-builtin.c => cipher-builtin.inc.c} | 0
 crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c}   | 0
 crypto/{cipher-nettle.c => cipher-nettle.inc.c}   | 0
 crypto/cipher.c                                   | 6 +++---
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename crypto/{cipher-builtin.c => cipher-builtin.inc.c} (100%)
 rename crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c} (100%)
 rename crypto/{cipher-nettle.c => cipher-nettle.inc.c} (100%)

diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.inc.c
similarity index 100%
rename from crypto/cipher-builtin.c
rename to crypto/cipher-builtin.inc.c
diff --git a/crypto/cipher-gcrypt.c b/crypto/cipher-gcrypt.inc.c
similarity index 100%
rename from crypto/cipher-gcrypt.c
rename to crypto/cipher-gcrypt.inc.c
diff --git a/crypto/cipher-nettle.c b/crypto/cipher-nettle.inc.c
similarity index 100%
rename from crypto/cipher-nettle.c
rename to crypto/cipher-nettle.inc.c
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 2722dc7d87..deae82c264 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -151,11 +151,11 @@ qcrypto_cipher_munge_des_rfb_key(const uint8_t *key,
 #endif /* CONFIG_GCRYPT || CONFIG_NETTLE */
 
 #ifdef CONFIG_GCRYPT
-#include "cipher-gcrypt.c"
+#include "cipher-gcrypt.inc.c"
 #elif defined CONFIG_NETTLE
-#include "cipher-nettle.c"
+#include "cipher-nettle.inc.c"
 #else
-#include "cipher-builtin.c"
+#include "cipher-builtin.inc.c"
 #endif
 
 QCryptoCipher *qcrypto_cipher_new(QCryptoCipherAlgorithm alg,
-- 
2.25.1


Re: [PATCH 04/17] crypto: Rename cipher include files to .inc.c
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
On 8/13/20 5:25 AM, Richard Henderson wrote:
> QEMU standard procedure for included c files is to use *.inc.c.
> E.g. there are a different set of checks that are applied.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  crypto/{cipher-builtin.c => cipher-builtin.inc.c} | 0
>  crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c}   | 0
>  crypto/{cipher-nettle.c => cipher-nettle.inc.c}   | 0
>  crypto/cipher.c                                   | 6 +++---
>  4 files changed, 3 insertions(+), 3 deletions(-)
>  rename crypto/{cipher-builtin.c => cipher-builtin.inc.c} (100%)
>  rename crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c} (100%)
>  rename crypto/{cipher-nettle.c => cipher-nettle.inc.c} (100%)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(This clashes with Paolo's Meson series renaming them to .c.inc).


Re: [PATCH 04/17] crypto: Rename cipher include files to .inc.c
Posted by Daniel P. Berrangé 5 years, 5 months ago
On Thu, Aug 13, 2020 at 10:00:29AM +0200, Philippe Mathieu-Daudé wrote:
> On 8/13/20 5:25 AM, Richard Henderson wrote:
> > QEMU standard procedure for included c files is to use *.inc.c.
> > E.g. there are a different set of checks that are applied.
> > 
> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> > ---
> >  crypto/{cipher-builtin.c => cipher-builtin.inc.c} | 0
> >  crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c}   | 0
> >  crypto/{cipher-nettle.c => cipher-nettle.inc.c}   | 0
> >  crypto/cipher.c                                   | 6 +++---
> >  4 files changed, 3 insertions(+), 3 deletions(-)
> >  rename crypto/{cipher-builtin.c => cipher-builtin.inc.c} (100%)
> >  rename crypto/{cipher-gcrypt.c => cipher-gcrypt.inc.c} (100%)
> >  rename crypto/{cipher-nettle.c => cipher-nettle.inc.c} (100%)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> (This clashes with Paolo's Meson series renaming them to .c.inc).

IIRC, we need to use  c.inc, because Meson has specific semantics
around a file ending in ".c" that we don't want.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|