FastLED
3.9.15
Loading...
Searching...
No Matches
cerrno.h
Go to the documentation of this file.
1
#pragma once
2
3
// IWYU pragma: begin_keep
4
#include <errno.h>
5
// IWYU pragma: end_keep // okay banned header (STL wrapper requires standard header)
6
// Use C header <errno.h> instead of C++ <cerrno> for AVR platform compatibility
7
8
// Bring errno functionality into fl:: namespace
9
// Note: errno is a macro that expands to a thread-local lvalue.
10
// Error constants (EEXIST, ENOENT, etc.) are also macros, so we access them
11
// directly rather than trying to redefine them (which would cause macro expansion conflicts).
12
13
namespace
fl
{
14
15
// Inline function to get current errno value
16
// Use this instead of accessing ::errno directly for cleaner code
17
inline
int
get_errno
() {
18
return
errno;
19
}
20
21
// Inline function to set errno value
22
inline
void
set_errno
(
int
value
) {
23
errno =
value
;
24
}
25
26
// Inline function to clear errno
27
inline
void
clear_errno
() {
28
errno = 0;
29
}
30
31
// Error constants are available as global macros (EEXIST, ENOENT, etc.)
32
// They can be used directly: if (errno == EEXIST) { ... }
33
// We provide them in the fl:: namespace for documentation purposes
34
35
// Note: We do NOT redefine these as they are macros and will cause conflicts.
36
// Instead, users can access them directly: EEXIST, ENOENT, etc.
37
// Or use qualified access if needed, though the macros are global.
38
39
}
// namespace fl
fl::value
constexpr int type_rank< T >::value
Definition
static_constexpr_defs.cpp.hpp:82
fl::clear_errno
void clear_errno()
Definition
cerrno.h:27
fl::set_errno
void set_errno(int value)
Definition
cerrno.h:22
fl::get_errno
int get_errno()
Definition
cerrno.h:17
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
fl
stl
cerrno.h
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2