mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-19 21:16:55 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
22fddb16f8 | ||
![]() |
abe3c8c332 | ||
![]() |
1d711a2ced | ||
![]() |
aff40cae08 |
4
README
4
README
@@ -33,11 +33,11 @@ Source Repository
|
||||
|
||||
The primary repository can be browsed at:
|
||||
|
||||
<https://cgit.freedesktop.org/libbsd>
|
||||
<https://gitlab.freedesktop.org/libbsd/libbsd>
|
||||
|
||||
and cloned from:
|
||||
|
||||
<https://anongit.freedesktop.org/git/libbsd>
|
||||
<https://gitlab.freedesktop.org/libbsd/libbsd.git>
|
||||
|
||||
|
||||
Building from git source
|
||||
|
@@ -99,6 +99,12 @@
|
||||
#define LIBBSD_GCC_VERSION 0
|
||||
#endif
|
||||
|
||||
#if LIBBSD_GCC_VERSION >= 0x0300 || __has_attribute(__unused__)
|
||||
# define LIBBSD_UNUSED __attribute__((__unused__))
|
||||
#else
|
||||
# define LIBBSD_UNUSED
|
||||
#endif
|
||||
|
||||
#if LIBBSD_GCC_VERSION >= 0x0405 || __has_attribute(__deprecated__)
|
||||
#define LIBBSD_DEPRECATED(x) __attribute__((__deprecated__(x)))
|
||||
#elif LIBBSD_GCC_VERSION >= 0x0301
|
||||
@@ -150,11 +156,7 @@
|
||||
* Disable for now. */
|
||||
#if 0
|
||||
#ifndef __unused
|
||||
# if LIBBSD_GCC_VERSION >= 0x0300
|
||||
# define __unused __attribute__((__unused__))
|
||||
# else
|
||||
# define __unused
|
||||
# endif
|
||||
# define __unused LIBBSD_UNUSED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -385,7 +385,7 @@ struct { \
|
||||
#define RB_PROTOTYPE(name, type, field, cmp) \
|
||||
RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
|
||||
#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
|
||||
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
|
||||
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, LIBBSD_UNUSED static)
|
||||
#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
|
||||
attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
|
||||
attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
|
||||
@@ -404,7 +404,7 @@ attr struct type *name##_RB_MINMAX(struct name *, int); \
|
||||
#define RB_GENERATE(name, type, field, cmp) \
|
||||
RB_GENERATE_INTERNAL(name, type, field, cmp,)
|
||||
#define RB_GENERATE_STATIC(name, type, field, cmp) \
|
||||
RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
|
||||
RB_GENERATE_INTERNAL(name, type, field, cmp, LIBBSD_UNUSED static)
|
||||
#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
|
||||
attr void \
|
||||
name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
|
||||
|
@@ -48,8 +48,16 @@ typedef struct
|
||||
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
|
||||
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
|
||||
|
||||
static const char sigma[16] = "expand 32-byte k";
|
||||
static const char tau[16] = "expand 16-byte k";
|
||||
#if defined(__has_attribute)
|
||||
#if __has_attribute(__nonstring__)
|
||||
#define ATTRIBUTE_NONSTRING __attribute__((__nonstring__))
|
||||
#else
|
||||
#define ATTRIBUTE_NONSTRING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const char sigma[16] ATTRIBUTE_NONSTRING = "expand 32-byte k";
|
||||
static const char tau[16] ATTRIBUTE_NONSTRING = "expand 16-byte k";
|
||||
|
||||
static void
|
||||
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)
|
||||
|
Reference in New Issue
Block a user