]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disable clang format around .c includes
authorBob Beck <beck@openssl.org>
Thu, 28 Aug 2025 18:59:59 +0000 (12:59 -0600)
committerTomas Mraz <tomas@openssl.org>
Wed, 3 Dec 2025 13:40:56 +0000 (14:40 +0100)
we assume these to be order sensitive and not self contained, so
as per our new style we disable clang format around them.

we should consider renaming to .inc, or doing away with some
of these and just putting the code inline, but that's for
later consideration.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29241)

16 files changed:
crypto/LPdir_win32.c
crypto/LPdir_wince.c
crypto/bn/asm/x86_64-gcc.c
crypto/des/cbc_enc.c
crypto/des/des_enc.c
crypto/o_dir.c
engines/e_afalg.c
engines/e_capi.c
engines/e_dasync.c
engines/e_loader_attic.c
engines/e_ossltest.c
engines/e_padlock.c
providers/implementations/macs/blake2b_mac.c
providers/implementations/macs/blake2s_mac.c
test/mem_alloc_custom_fns_test.c
test/radix/quic_radix.c

index b29e096ff30f939de5c38f9674a7f8bf38c0df30..33b8261774c4c31bf3433ea3e774a45cb139b73f 100644 (file)
@@ -38,4 +38,6 @@
 
 #define LP_SYS_WIN32
 #define LP_MULTIBYTE_AVAILABLE
+/* clang-format off */
 #include "LPdir_win.c"
+/* clang-format on */
index ebf89628272a502d909e8eb3fabfcad7deca70cc..e4c883dcefe46d2622aeb3073c7aabd4cbf1d813 100644 (file)
@@ -41,4 +41,6 @@
  * We might want to define LP_MULTIBYTE_AVAILABLE here.  It's currently under
  * investigation what the exact conditions would be
  */
+/* clang-format off */
 #include "LPdir_win.c"
+/* clang-format on */
index 18d0b136086c68a97ca35667b63b67405465abe5..7049a4f382428f62ac9e9963a04d983326ddc50e 100644 (file)
@@ -9,7 +9,9 @@
 
 #include "../bn_local.h"
 #if !(defined(__GNUC__) && __GNUC__>=2)
+/* clang-format off */
 # include "../bn_asm.c"         /* kind of dirty hack for Sun Studio */
+/* clang-format on */
 #else
 /*-
  * x86_64 BIGNUM accelerator version 0.1, December 2002.
index aa8ac1a5c339fcdc3520fc16e7a958075b8eb35e..d13cbe19d2b469e5445972fc59bb27e54ccb047d 100644 (file)
@@ -15,4 +15,6 @@
 
 #define CBC_ENC_C__DONT_UPDATE_IV
 
+/* clang-format off */
 #include "ncbc_enc.c"           /* des_cbc_encrypt */
+/* clang-format on */
index 0041f21b8d3ba9393a24a5204c2f568ebd87a32d..37a424cd4e7451c292e3c16492a44e8424834282 100644 (file)
@@ -195,7 +195,9 @@ void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
 #ifndef DES_DEFAULT_OPTIONS
 
 # undef CBC_ENC_C__DONT_UPDATE_IV
+/* clang-format off */
 # include "ncbc_enc.c"          /* DES_ncbc_encrypt */
+/* clang-format on */
 
 void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
                           long length, DES_key_schedule *ks1,
index d7f5d64d064f3c621bf9e4357cce3ab849b0be3c..36d33fbed4f9c7ba075129da64c3c33b8b3d7c0e 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "internal/o_dir.h"
 
+/* clang-format off */
 #define LPDIR_H
 #if defined OPENSSL_SYS_UNIX || defined DJGPP \
     || (defined __VMS_VER && __VMS_VER >= 70000000)
@@ -35,3 +36,4 @@
 #else
 # include "LPdir_nyi.c"
 #endif
+/* clang-format on */
index 22df8d50e11bdac73d0e638dc844d47e7b266de4..83c5c8f0940d1ba2f3edd9ff8b32f2d1e0de9a90 100644 (file)
@@ -48,8 +48,10 @@ void engine_load_afalg_int(void)
 # include <sys/syscall.h>
 # include <errno.h>
 
+/* clang-format off */
 # include "e_afalg.h"
 # include "e_afalg_err.c"
+/* clang-format on */
 
 # ifndef SOL_ALG
 #  define SOL_ALG 279
index 73a81f7d1688e2d673931b8669fce519abd40cc0..5d5546b98fc153e2ddd0fb976fa101a21fe50afc 100644 (file)
 # include <openssl/pem.h>
 # include <openssl/x509v3.h>
 
+/* clang-format off */
 # include "e_capi_err.h"
 # include "e_capi_err.c"
+/* clang-format on */
 
 static const char *engine_capi_id = "capi";
 static const char *engine_capi_name = "CryptoAPI ENGINE";
index 5f809e8321997682c581da552364317291417353..47eca87a6b103fb7ddb2bf3f9e22cbf826f3eeae 100644 (file)
@@ -46,7 +46,9 @@
 # define ASYNC_WIN
 #endif
 
+/* clang-format off */
 #include "e_dasync_err.c"
+/* clang-format on */
 
 /* Engine Id and Name */
 static const char *engine_dasync_id = "dasync";
index 223929463a58a82bba57fd93b4316e4a35f4c279..e7597c54ef9fb144145092e1a914c58c9ee36e9a 100644 (file)
@@ -40,7 +40,9 @@
 #include "crypto/ctype.h"        /* For ossl_isdigit */
 #include "crypto/pem.h"          /* For PVK and "blob" PEM headers */
 
+/* clang-format off */
 #include "e_loader_attic_err.c"
+/* clang-format on */
 
 DEFINE_STACK_OF(OSSL_STORE_INFO)
 
index e31d82d0a5b1288ef1d8e9a0e2d1d4661aa5f6b7..dd5bef57dc140fbdac24464124b503f4cca291a5 100644 (file)
@@ -41,7 +41,9 @@
 #include <openssl/pem.h>
 #include <crypto/evp.h>
 
+/* clang-format off */
 #include "e_ossltest_err.c"
+/* clang-format on */
 
 /* Engine Id and Name */
 static const char *engine_ossltest_id = "ossltest";
index 5e7fc4df30d3e6f14988cfe716c30bd16227c6ac..bdad24b5b2f8c2e498c8518b15533f8ecfd0946c 100644 (file)
@@ -156,7 +156,9 @@ static int padlock_aes_set_decrypt_key(const unsigned char *userKey,
 #   define AES_ASM
 #   define AES_set_encrypt_key padlock_aes_set_encrypt_key
 #   define AES_set_decrypt_key padlock_aes_set_decrypt_key
+/* clang-format off */
 #   include "../crypto/aes/aes_core.c"
+/* clang-format on */
 #  endif
 
 /*
index b445cbd57875ec0918a471c866e8613e1247b0ec..7ba2b71b376b9472de487f2c791844a6f3c4953b 100644 (file)
@@ -29,5 +29,7 @@
 /* OSSL_DISPATCH symbol */
 #define BLAKE2_FUNCTIONS ossl_blake2bmac_functions
 
+/* clang-format off */
 #include "blake2_mac_impl.c"
+/* clang-format on */
 
index 6b3fa28bd36be53fc224ca08c77adbcc87c35fed..0d89267aa6c656ce5faa17667af6653d60d0d9ca 100644 (file)
@@ -29,4 +29,6 @@
 /* OSSL_DISPATCH symbol */
 #define BLAKE2_FUNCTIONS ossl_blake2smac_functions
 
+/* clang-format off */
 #include "blake2_mac_impl.c"
+/* clang-format on */
index 2b0a7a2bda1025a46d15fe022caccedbede72345..832801b89369f37116a893c6fe8c14d4d2644e45 100644 (file)
@@ -1,2 +1,4 @@
 #define USE_CUSTOM_ALLOC_FNS 1
+/* clang-format off */
 #include "mem_alloc_test.c"
+/* clang-format on */
index 3400eda3fdaf1c9c16b5dee6070f5ce9e9dbd3c2..ada8773b502665a9b9e5dc5c9196feab608b606f 100644 (file)
@@ -6,8 +6,10 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+/* clang-format off */
 #include "terp.c"
 #include "quic_bindings.c"
 #include "quic_ops.c"
 #include "quic_tests.c"
 #include "main.c"
+/* clang-format on */