Disable clang format around .c includes

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)
This commit is contained in:
Bob Beck
2025-08-28 12:59:59 -06:00
committed by Tomas Mraz
parent 3a815c1481
commit 64bc3acda2
16 changed files with 32 additions and 0 deletions

View File

@@ -38,4 +38,6 @@
#define LP_SYS_WIN32
#define LP_MULTIBYTE_AVAILABLE
/* clang-format off */
#include "LPdir_win.c"
/* clang-format on */

View 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 */

View 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.

View 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 */

View 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,

View 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 */

View 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

View File

@@ -99,8 +99,10 @@
# 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";

View 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";

View 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)

View 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";

View 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
/*

View 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 */

View 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 */

View File

@@ -1,2 +1,4 @@
#define USE_CUSTOM_ALLOC_FNS 1
/* clang-format off */
#include "mem_alloc_test.c"
/* clang-format on */

View 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 */