X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fsd-daemon.h;h=4a94082dadfcadda4a3baea9e902e0e1bfa1a330;hb=aa0b1f599f25cfe858ebbc7fa80d459bcdb2ae02;hp=4b853a15bec92fa98785fdb6638cfd2d22f67dd9;hpb=2abe23d6ff8179b0d047a0bcdeff9c6b75bd89da;p=i3%2Fi3 diff --git a/include/sd-daemon.h b/include/sd-daemon.h index 4b853a15..4a94082d 100644 --- a/include/sd-daemon.h +++ b/include/sd-daemon.h @@ -1,7 +1,6 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#ifndef foosddaemonhfoo -#define foosddaemonhfoo +#pragma once /*** Copyright 2010 Lennart Poettering @@ -58,8 +57,8 @@ extern "C" { You may find an up-to-date version of these source files online: - http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h - http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c + https://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h + https://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c This should compile on non-Linux systems, too, but with the exception of the sd_is_xxx() calls all functions will become NOPs. @@ -69,15 +68,15 @@ extern "C" { #ifndef _sd_printf_attr_ #if __GNUC__ >= 4 -#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) +#define _sd_printf_attr_(a, b) __attribute__((format(printf, a, b))) #else -#define _sd_printf_attr_(a,b) +#define _sd_printf_attr_(a, b) #endif #endif #ifndef _sd_hidden_ #if (__GNUC__ >= 4) && !defined(SD_EXPORT_SYMBOLS) -#define _sd_hidden_ __attribute__ ((visibility("hidden"))) +#define _sd_hidden_ __attribute__((visibility("hidden"))) #else #define _sd_hidden_ #endif @@ -90,14 +89,14 @@ extern "C" { This is similar to printk() usage in the kernel. */ -#define SD_EMERG "<0>" /* system is unusable */ -#define SD_ALERT "<1>" /* action must be taken immediately */ -#define SD_CRIT "<2>" /* critical conditions */ -#define SD_ERR "<3>" /* error conditions */ -#define SD_WARNING "<4>" /* warning conditions */ -#define SD_NOTICE "<5>" /* normal but significant condition */ -#define SD_INFO "<6>" /* informational */ -#define SD_DEBUG "<7>" /* debug-level messages */ +#define SD_EMERG "<0>" /* system is unusable */ +#define SD_ALERT "<1>" /* action must be taken immediately */ +#define SD_CRIT "<2>" /* critical conditions */ +#define SD_ERR "<3>" /* error conditions */ +#define SD_WARNING "<4>" /* warning conditions */ +#define SD_NOTICE "<5>" /* normal but significant condition */ +#define SD_INFO "<6>" /* informational */ +#define SD_DEBUG "<7>" /* debug-level messages */ /* The first passed file descriptor is fd 3 */ #define SD_LISTEN_FDS_START 3 @@ -243,7 +242,7 @@ int sd_notify(int unset_environment, const char *state) _sd_hidden_; See sd_notifyf(3) for more information. */ -int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3) _sd_hidden_; +int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2, 3) _sd_hidden_; /* Returns > 0 if the system was booted with systemd. Returns < 0 on @@ -261,5 +260,3 @@ int sd_booted(void) _sd_hidden_; #ifdef __cplusplus } #endif - -#endif