#endif /* !HAVE_ERR_H */
+static inline
+__attribute__((__noreturn__))
+void __err_oom(const char *file, unsigned int line)
+{
+ err(EXIT_FAILURE, "%s: %u: cannot allocate memory", file, line);
+}
+#define err_oom() __err_oom(__FILE__, __LINE__)
+
+
/* Don't use inline function to avoid '#include "nls.h"' in c.h
*/
#define errtryhelp(eval) __extension__ ({ \
#define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, \
_("failed to execute %s"), name)
-
static inline __attribute__((const)) int is_power_of_2(unsigned long num)
{
return (num != 0 && ((num & (num - 1)) == 0));
# define XALLOC_EXIT_CODE EXIT_FAILURE
#endif
-static inline
-__attribute__((__noreturn__))
-void __err_oom(const char *file, unsigned int line)
-{
- err(XALLOC_EXIT_CODE, "%s: %u: cannot allocate memory", file, line);
-}
-
-#define err_oom() __err_oom(__FILE__, __LINE__)
-
static inline
__ul_alloc_size(1)
__ul_returns_nonnull