diff --git a/Userland/Libraries/LibC/arch/aarch64/fenv.h b/Userland/Libraries/LibC/arch/aarch64/fenv.h new file mode 100644 index 00000000000..a17752abd86 --- /dev/null +++ b/Userland/Libraries/LibC/arch/aarch64/fenv.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024, Dan Klishch + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +#ifndef __aarch64__ +# error "This file should not be included on architectures other than AArch64." +#endif + +__BEGIN_DECLS + +// TODO: Implement this. +typedef struct fenv_t { + char __dummy; // NOTE: This silences -Wextern-c-compat. +} fenv_t; + +__END_DECLS diff --git a/Userland/Libraries/LibC/arch/fenv.h b/Userland/Libraries/LibC/arch/fenv.h new file mode 100644 index 00000000000..0121f1afc31 --- /dev/null +++ b/Userland/Libraries/LibC/arch/fenv.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2024, Dan Klishch + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#if defined(__x86_64__) +# include +#elif defined(__aarch64__) +# include +#elif defined(__riscv) && __riscv_xlen == 64 +# include +#else +# error Unknown architecture +#endif diff --git a/Userland/Libraries/LibC/fenv.h b/Userland/Libraries/LibC/fenv.h index 34b14ddfa8f..7617921d16e 100644 --- a/Userland/Libraries/LibC/fenv.h +++ b/Userland/Libraries/LibC/fenv.h @@ -6,23 +6,10 @@ #pragma once +#include #include #include -#if defined(__x86_64__) -# include -#elif defined(__aarch64__) - -// TODO: Implement this. -typedef struct fenv_t { -} fenv_t; - -#elif defined(__riscv) && __riscv_xlen == 64 -# include -#else -# error "Unknown architecture" -#endif - __BEGIN_DECLS #define FE_DFL_ENV ((fenv_t const*)-1)