mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
This commit is contained in:
parent
96f979dfc5
commit
fa20edc44d
3057 changed files with 410 additions and 4398 deletions
1
third_party/argon2/argon2.c
vendored
1
third_party/argon2/argon2.c
vendored
|
@ -26,7 +26,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/**
|
||||
* Function that gives the string representation of an argon2_type.
|
||||
|
|
2
third_party/argon2/argon2.h
vendored
2
third_party/argon2/argon2.h
vendored
|
@ -5,7 +5,6 @@
|
|||
|
||||
#define ARGON2_NO_THREADS
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/*
|
||||
|
@ -210,5 +209,4 @@ size_t argon2_encodedlen(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t,
|
|||
argon2_type);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_ARGON2_H_ */
|
||||
|
|
1
third_party/argon2/blake2-impl.h
vendored
1
third_party/argon2/blake2-impl.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef PORTABLE_BLAKE2_IMPL_H
|
||||
#define PORTABLE_BLAKE2_IMPL_H
|
||||
#include "libc/str/str.h"
|
||||
/* clang-format off */
|
||||
|
||||
static inline uint64_t load64(const void *src) {
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
|
|
2
third_party/argon2/blake2.h
vendored
2
third_party/argon2/blake2.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum blake2b_constant {
|
||||
|
@ -48,5 +47,4 @@ int blake2b(void *, size_t, const void *, size_t, const void *, size_t);
|
|||
int blake2b_long(void *, size_t, const void *, size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_BLAKE2_H_ */
|
||||
|
|
3
third_party/argon2/blake2b.c
vendored
3
third_party/argon2/blake2b.c
vendored
|
@ -15,12 +15,11 @@
|
|||
│ - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0 │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/limits.h"
|
||||
#include "third_party/argon2/blake2-impl.h"
|
||||
#include "third_party/argon2/blake2.h"
|
||||
#include "third_party/argon2/core.h"
|
||||
/* clang-format off */
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
argon2 (CC0 or Apache2)\\n\
|
||||
|
|
1
third_party/argon2/blamka-round-ref.h
vendored
1
third_party/argon2/blamka-round-ref.h
vendored
|
@ -2,7 +2,6 @@
|
|||
#define BLAKE_ROUND_MKA_H
|
||||
#include "third_party/argon2/blake2-impl.h"
|
||||
#include "third_party/argon2/blake2.h"
|
||||
/* clang-format off */
|
||||
|
||||
/* designed by the Lyra PHC team */
|
||||
static inline uint64_t fBlaMka(uint64_t x, uint64_t y) {
|
||||
|
|
1
third_party/argon2/core.c
vendored
1
third_party/argon2/core.c
vendored
|
@ -24,7 +24,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
int FLAG_clear_internal_memory = 1;
|
||||
|
||||
|
|
2
third_party/argon2/core.h
vendored
2
third_party/argon2/core.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum argon2_core_constants {
|
||||
|
@ -83,5 +82,4 @@ void fill_segment(const argon2_instance_t *, argon2_position_t);
|
|||
int fill_memory_blocks(argon2_instance_t *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_CORE_H_ */
|
||||
|
|
1
third_party/argon2/encoding.c
vendored
1
third_party/argon2/encoding.c
vendored
|
@ -25,7 +25,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* Example code for a decoder and encoder of "hash strings", with Argon2
|
||||
|
|
2
third_party/argon2/encoding.h
vendored
2
third_party/argon2/encoding.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
||||
#include "third_party/argon2/argon2.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define ARGON2_MAX_DECODED_LANES UINT32_C(255)
|
||||
|
@ -14,5 +13,4 @@ size_t b64len(uint32_t);
|
|||
size_t numlen(uint32_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_ */
|
||||
|
|
1
third_party/argon2/ref.c
vendored
1
third_party/argon2/ref.c
vendored
|
@ -26,7 +26,6 @@ asm(".ident\t\"\\n\\n\
|
|||
argon2 (CC0 or Apache2)\\n\
|
||||
Copyright 2016 Daniel Dinu, Dmitry Khovratovich\\n\
|
||||
Copyright 2016 Jean-Philippe Aumasson, Samuel Neves\"");
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* Argon2 reference source code package - reference C implementations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue