Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dev/x86_64/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#define MLD_USE_NATIVE_POLYVECL_POINTWISE_ACC_MONTGOMERY_L7

#if !defined(__ASSEMBLER__)
#include <string.h>
#include "../../common.h"
#include "../api.h"
#include "src/arith_native_x86_64.h"
Expand Down
1 change: 0 additions & 1 deletion dev/x86_64/src/arith_native_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef MLD_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
#define MLD_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
#include "../../../common.h"

#include "consts.h"

#define MLD_AVX2_REJ_UNIFORM_BUFLEN \
Expand Down
1 change: 1 addition & 0 deletions mldsa/src/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#if !defined(__ASSEMBLER__)

#include <stdint.h>

#include "cbmc.h"
#include "sys.h"

Expand Down
1 change: 1 addition & 0 deletions mldsa/src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>

#include "debug.h"

#define MLD_DEBUG_ERROR_HEADER "[ERROR:%s:%04d] "
Expand Down
1 change: 1 addition & 0 deletions mldsa/src/fips202/fips202.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define MLD_FIPS202_FIPS202_H

#include <stddef.h>

#include "../cbmc.h"
#include "../common.h"

Expand Down
1 change: 0 additions & 1 deletion mldsa/src/native/x86_64/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#define MLD_USE_NATIVE_POLYVECL_POINTWISE_ACC_MONTGOMERY_L7

#if !defined(__ASSEMBLER__)
#include <string.h>
#include "../../common.h"
#include "../api.h"
#include "src/arith_native_x86_64.h"
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/native/x86_64/src/arith_native_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef MLD_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
#define MLD_NATIVE_X86_64_SRC_ARITH_NATIVE_X86_64_H
#include "../../../common.h"

#include "consts.h"

#define MLD_AVX2_REJ_UNIFORM_BUFLEN \
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/packing.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
*/
#include "packing.h"

#include "common.h"
#include "poly.h"
#include "polyvec.h"
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/poly.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

#include "poly.h"

#include "common.h"
#include "ct.h"
#include "debug.h"
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/poly_kl.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

#include "poly_kl.h"

#include "ct.h"
#include "debug.h"
#include "rounding.h"
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/polyvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/

#include "polyvec.h"

#include "debug.h"
#include "polyvec_lazy.h"

Expand Down
1 change: 0 additions & 1 deletion mldsa/src/polyvec_lazy.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/

#include "polyvec_lazy.h"

#include "debug.h"

/* This namespacing is not done at the top to avoid a naming conflict
Expand Down
1 change: 0 additions & 1 deletion mldsa/src/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
*/

#include "sign.h"

#include "cbmc.h"
#include "ct.h"
#include "debug.h"
Expand Down
1 change: 1 addition & 0 deletions mldsa/src/sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define MLD_SIGN_H

#include <stddef.h>

#include "cbmc.h"
#include "common.h"
#include "poly.h"
Expand Down
8 changes: 6 additions & 2 deletions scripts/autogen
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ def finalize_format_batch(batch):
# Skip files scheduled for deletion
if content is None:
continue
with tempfile.NamedTemporaryFile(mode="w", suffix=".c", delete=False) as f:
# Keep the file name: clang-format uses it to identify the main
# include, which it sorts first.
temp_path = os.path.join(tempfile.mkdtemp(), os.path.basename(filename))
with open(temp_path, "w") as f:
f.write(content)
temp_files.append((f.name, filename))
temp_files.append((temp_path, filename))

# Call clang-format with -i to update files in-place
clang_format_file = os.path.join(
Expand All @@ -141,6 +144,7 @@ def finalize_format_batch(batch):
finally:
for temp_path, _ in temp_files:
os.unlink(temp_path)
os.rmdir(os.path.dirname(temp_path))


def finalize_file(item, dry_run):
Expand Down
Loading