1 From 18345986e29c820e64daced78232f236fd4a4e6e Mon Sep 17 00:00:00 2001
2 From: Daiki Ueno <ueno@gnu.org>
3 Date: Thu, 16 Mar 2023 16:21:37 +0900
4 Subject: [PATCH] build: use /* clang-format {on|off} */ annotation
6 Signed-off-by: Daiki Ueno <ueno@gnu.org>
8 lib/includes/gnutls/abstract.h | 4 ----
9 lib/includes/gnutls/compat.h | 4 ----
10 lib/includes/gnutls/crypto.h | 4 ----
11 lib/includes/gnutls/dtls.h | 4 ----
12 lib/includes/gnutls/gnutls.h.in | 18 ++++++++----------
13 lib/includes/gnutls/ocsp.h | 4 ----
14 lib/includes/gnutls/openpgp.h | 4 ----
15 lib/includes/gnutls/pkcs11.h | 4 ----
16 lib/includes/gnutls/pkcs12.h | 4 ----
17 lib/includes/gnutls/pkcs7.h | 4 ----
18 lib/includes/gnutls/socket.h | 4 ----
19 lib/includes/gnutls/system-keys.h | 4 ----
20 lib/includes/gnutls/tpm.h | 4 ----
21 lib/includes/gnutls/urls.h | 4 ----
22 lib/includes/gnutls/x509-ext.h | 4 ----
23 lib/includes/gnutls/x509.h | 4 ----
24 tests/test-chains-issuer-aia.h | 4 ----
25 tests/test-chains.h | 4 ----
26 18 files changed, 8 insertions(+), 78 deletions(-)
28 --- a/lib/includes/gnutls/abstract.h
29 +++ b/lib/includes/gnutls/abstract.h
31 # include <gnutls/openpgp.h>
32 # include <gnutls/tpm.h>
40 /* Public key operations */
42 @@ -748,10 +746,8 @@ gnutls_pubkey_print(gnutls_pubkey_t pubk
43 gnutls_certificate_print_formats_t format,
44 gnutls_datum_t * out);
52 #endif /* GNUTLS_ABSTRACT_H */
53 --- a/lib/includes/gnutls/compat.h
54 +++ b/lib/includes/gnutls/compat.h
56 #ifndef GNUTLS_COMPAT_H
57 # define GNUTLS_COMPAT_H
67 @@ -228,10 +226,8 @@ int gnutls_priority_compression_list(gnu
68 const unsigned int **list)
69 _GNUTLS_GCC_ATTR_DEPRECATED;
77 #endif /* GNUTLS_COMPAT_H */
78 --- a/lib/includes/gnutls/crypto.h
79 +++ b/lib/includes/gnutls/crypto.h
82 # include <gnutls/gnutls.h>
90 typedef struct api_cipher_hd_st *gnutls_cipher_hd_t;
92 @@ -335,10 +333,8 @@ int gnutls_encode_gost_rs_value(gnutls_d
93 int gnutls_decode_gost_rs_value(const gnutls_datum_t * sig_value,
94 gnutls_datum_t * r, gnutls_datum_t * s);
102 #endif /* GNUTLS_CRYPTO_H */
103 --- a/lib/includes/gnutls/dtls.h
104 +++ b/lib/includes/gnutls/dtls.h
107 # include <gnutls/gnutls.h>
115 # define GNUTLS_COOKIE_KEY_SIZE 16
117 @@ -84,10 +82,8 @@ void gnutls_dtls_prestate_set(gnutls_ses
119 unsigned int gnutls_record_get_discarded(gnutls_session_t session);
127 #endif /* GNUTLS_DTLS_H */
128 --- a/lib/includes/gnutls/gnutls.h.in
129 +++ b/lib/includes/gnutls/gnutls.h.in
140 # define GNUTLS_VERSION "@VERSION@"
142 -# define GNUTLS_VERSION_MAJOR @MAJOR_VERSION@
143 -# define GNUTLS_VERSION_MINOR @MINOR_VERSION@
144 -# define GNUTLS_VERSION_PATCH @PATCH_VERSION@
145 +/* clang-format off */
146 +#define GNUTLS_VERSION_MAJOR @MAJOR_VERSION@
147 +#define GNUTLS_VERSION_MINOR @MINOR_VERSION@
148 +#define GNUTLS_VERSION_PATCH @PATCH_VERSION@
150 -# define GNUTLS_VERSION_NUMBER @NUMBER_VERSION@
151 +#define GNUTLS_VERSION_NUMBER @NUMBER_VERSION@
152 +/* clang-format on */
154 # define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC
155 # define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC
156 @@ -2365,9 +2365,9 @@ int gnutls_dh_params_cpy(gnutls_dh_param
161 +/* clang-format off */
164 +/* clang-format on */
166 typedef ssize_t(*gnutls_pull_func) (gnutls_transport_ptr_t, void *, size_t);
167 typedef ssize_t(*gnutls_push_func) (gnutls_transport_ptr_t, const void *,
168 @@ -3634,11 +3634,9 @@ gnutls_transport_is_ktls_enabled(gnutls_
169 # define GNUTLS_E_APPLICATION_ERROR_MAX -65000
170 # define GNUTLS_E_APPLICATION_ERROR_MIN -65500
178 # include <gnutls/compat.h>
180 --- a/lib/includes/gnutls/ocsp.h
181 +++ b/lib/includes/gnutls/ocsp.h
183 # include <gnutls/gnutls.h>
184 # include <gnutls/x509.h>
192 # define GNUTLS_OCSP_NONCE "1.3.6.1.5.5.7.48.1.2"
194 @@ -269,10 +267,8 @@ gnutls_ocsp_resp_list_import2(gnutls_ocs
195 const gnutls_datum_t * resp_data,
196 gnutls_x509_crt_fmt_t format, unsigned int flags);
204 #endif /* GNUTLS_OCSP_H */
205 --- a/lib/includes/gnutls/openpgp.h
206 +++ b/lib/includes/gnutls/openpgp.h
208 # include <gnutls/gnutls.h>
217 /* Openpgp certificate stuff
219 @@ -424,10 +422,8 @@ int gnutls_certificate_set_openpgp_keyri
220 (gnutls_certificate_credentials_t c, const char *file,
221 gnutls_openpgp_crt_fmt_t format) _GNUTLS_GCC_ATTR_DEPRECATED;
229 #endif /* GNUTLS_OPENPGP_H */
230 --- a/lib/includes/gnutls/pkcs11.h
231 +++ b/lib/includes/gnutls/pkcs11.h
233 # include <gnutls/gnutls.h>
234 # include <gnutls/x509.h>
242 # define GNUTLS_PKCS11_MAX_PIN_LEN 256
244 @@ -491,10 +489,8 @@ gnutls_pkcs11_copy_attached_extension(co
246 # define gnutls_x509_crt_import_pkcs11_url gnutls_x509_crt_import_url
254 #endif /* GNUTLS_PKCS11_H */
255 --- a/lib/includes/gnutls/pkcs12.h
256 +++ b/lib/includes/gnutls/pkcs12.h
259 # include <gnutls/x509.h>
267 /* PKCS12 structures handling
269 @@ -138,10 +136,8 @@ int gnutls_pkcs12_bag_get_friendly_name(
270 int gnutls_pkcs12_bag_set_friendly_name(gnutls_pkcs12_bag_t bag,
271 unsigned indx, const char *name);
279 #endif /* GNUTLS_PKCS12_H */
280 --- a/lib/includes/gnutls/pkcs7.h
281 +++ b/lib/includes/gnutls/pkcs7.h
283 # include <gnutls/gnutls.h>
284 # include <gnutls/x509.h>
292 /* PKCS7 structures handling
294 @@ -149,10 +147,8 @@ int gnutls_pkcs7_print_signature_info(gn
295 gnutls_certificate_print_formats_t format,
296 gnutls_datum_t * out);
304 #endif /* GNUTLS_PKCS7_H */
305 --- a/lib/includes/gnutls/socket.h
306 +++ b/lib/includes/gnutls/socket.h
309 # include <sys/socket.h>
317 void gnutls_transport_set_fastopen(gnutls_session_t session,
319 @@ -43,10 +41,8 @@ void gnutls_transport_set_fastopen(gnutl
320 socklen_t connect_addrlen,
329 #endif /* GNUTLS_SOCKET_H */
330 --- a/lib/includes/gnutls/system-keys.h
331 +++ b/lib/includes/gnutls/system-keys.h
333 * they will be requested through the pin callbacks.
342 struct system_key_iter_st;
343 typedef struct system_key_iter_st *gnutls_system_key_iter_t;
344 @@ -54,10 +52,8 @@ int gnutls_system_key_add_x509(gnutls_x5
345 gnutls_x509_privkey_t privkey, const char *label,
346 char **cert_url, char **key_url);
354 #endif /* GNUTLS_SYSTEM_KEYS_H */
355 --- a/lib/includes/gnutls/tpm.h
356 +++ b/lib/includes/gnutls/tpm.h
358 # include <gnutls/gnutls.h>
359 # include <gnutls/x509.h>
367 struct tpm_key_list_st;
368 typedef struct tpm_key_list_st *gnutls_tpm_key_list_t;
369 @@ -71,10 +69,8 @@ int gnutls_tpm_get_registered(gnutls_tpm
370 int gnutls_tpm_privkey_delete(const char *url, const char *srk_password);
379 #endif /* GNUTLS_TPM_H */
380 --- a/lib/includes/gnutls/urls.h
381 +++ b/lib/includes/gnutls/urls.h
383 * keys and certificates.
392 typedef int (*gnutls_privkey_import_url_func)(gnutls_privkey_t pkey,
393 const char *url, unsigned flags);
394 @@ -71,10 +69,8 @@ typedef struct gnutls_custom_url_st {
396 int gnutls_register_custom_url(const gnutls_custom_url_st * st);
404 #endif /* GNUTLS_URLS_H */
405 --- a/lib/includes/gnutls/x509-ext.h
406 +++ b/lib/includes/gnutls/x509-ext.h
408 # include <gnutls/gnutls.h>
409 # include <gnutls/x509.h>
417 typedef struct gnutls_subject_alt_names_st *gnutls_subject_alt_names_t;
419 @@ -215,10 +213,8 @@ int gnutls_x509_ct_sct_get(const gnutls_
420 gnutls_sign_algorithm_t * sigalg,
421 gnutls_datum_t * signature);
429 #endif /* GNUTLS_X509_EXT_H */
430 --- a/lib/includes/gnutls/x509.h
431 +++ b/lib/includes/gnutls/x509.h
434 # include <gnutls/gnutls.h>
442 /* Some OIDs usually found in Distinguished names, or
443 * in Subject Directory Attribute extensions.
444 @@ -1710,10 +1708,8 @@ gnutls_x509_ext_print(gnutls_x509_ext_st
446 # include <gnutls/pkcs7.h>
454 #endif /* GNUTLS_X509_H */
455 --- a/tests/test-chains-issuer-aia.h
456 +++ b/tests/test-chains-issuer-aia.h
458 #ifndef GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H
459 # define GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H
465 static const char *missing_cert_aia[] = {
466 @@ -132,6 +130,4 @@ static const char *missing_cert_aia_ca[]
467 # pragma GCC diagnostic pop
472 #endif /* GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H */
473 --- a/tests/test-chains.h
474 +++ b/tests/test-chains.h
476 #ifndef GNUTLS_TESTS_TEST_CHAINS_H
477 # define GNUTLS_TESTS_TEST_CHAINS_H
483 static const char *chain_with_no_subject_id_in_ca_ok[] = {
484 @@ -4449,6 +4447,4 @@ static struct
485 # pragma GCC diagnostic pop
490 #endif /* GNUTLS_TESTS_TEST_CHAINS_H */