build: add some build options to customise library functionality

This commit is contained in:
2026-04-01 19:02:04 +01:00
parent 6b04920d29
commit 467c13e161
5 changed files with 49 additions and 22 deletions
+4 -1
View File
@@ -60,6 +60,7 @@ unsigned long long fx_random_next_int64(struct fx_random_ctx *ctx)
return ctx->__a->gen_getrand(ctx);
}
#if FX_ENABLE_FLOATING_POINT
double fx_random_next_double(struct fx_random_ctx *ctx)
{
unsigned long long v = fx_random_next_int64(ctx);
@@ -69,8 +70,10 @@ double fx_random_next_double(struct fx_random_ctx *ctx)
return (double)(v >> 11) * (1.0 / 9007199254740991.0);
}
#endif
void fx_random_next_bytes(struct fx_random_ctx *ctx, unsigned char *out, size_t nbytes)
void fx_random_next_bytes(
struct fx_random_ctx *ctx, unsigned char *out, size_t nbytes)
{
size_t n_qwords = 0;
n_qwords = nbytes >> 3;