#pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported
in other compilers.
I've been using and maintaining (rebasing) this patch for a while now, as
it annoyed me to see #ifndef fooblahfoo, etc all over the place,
almost arrogant about the annoyance of having to define all these names to
perform a commen but neccicary functionality, when a completely superior
alternative exists.
I havn't sent it till now, cause its kindof a style change, and it is bad
voodoo to mess with style that has been established by more established
editors. So feel free to lambast me as a crazy bafoon.
v2 - preserve externally used headers
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooautomounthfoo
-#define fooautomounthfoo
+#pragma once
/***
This file is part of systemd.
const char* automount_result_to_string(AutomountResult i);
AutomountResult automount_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foobuildhfoo
-#define foobuildhfoo
+#pragma once
/***
This file is part of systemd.
#endif
#define SYSTEMD_FEATURES _PAM_FEATURE_ " " _LIBWRAP_FEATURE_ " " _AUDIT_FEATURE_ " " _SELINUX_FEATURE_ " " _IMA_FEATURE_ " " _SYSVINIT_FEATURE_ " " _LIBCRYPTSETUP_FEATURE_
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foobuserrorshfoo
-#define foobuserrorshfoo
+#pragma once
/***
This file is part of systemd.
return strerror(-r);
}
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgroupattrhfoo
-#define foocgroupattrhfoo
+#pragma once
/***
This file is part of systemd.
CGroupAttribute *cgroup_attribute_find_list(CGroupAttribute *first, const char *controller, const char *name);
void cgroup_attribute_free_list(CGroupAttribute *first);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgrouphfoo
-#define foocgrouphfoo
+#pragma once
/***
This file is part of systemd.
int cgroup_notify_empty(Manager *m, const char *group);
Unit* cgroup_unit_by_pid(Manager *m, pid_t pid);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooconditionhfoo
-#define fooconditionhfoo
+#pragma once
/***
This file is part of systemd.
const char* condition_type_to_string(ConditionType t);
int condition_type_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusautomounthfoo
-#define foodbusautomounthfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_automount_interface[];
extern const char bus_automount_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusdevicehfoo
-#define foodbusdevicehfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_device_interface[];
extern const char bus_device_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusexecutehfoo
-#define foodbusexecutehfoo
+#pragma once
/***
This file is part of systemd.
int bus_execute_append_kill_mode(DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_env_files(DBusMessageIter *i, const char *property, void *data);
int bus_execute_append_syscall_filter(DBusMessageIter *i, const char *property, void *data);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusjobhfoo
-#define foodbusjobhfoo
+#pragma once
/***
This file is part of systemd.
extern const DBusObjectPathVTable bus_job_vtable;
extern const char bus_job_interface[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusmanagerhfoo
-#define foodbusmanagerhfoo
+#pragma once
/***
This file is part of systemd.
extern const DBusObjectPathVTable bus_manager_vtable;
extern const char bus_manager_interface[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusmounthfoo
-#define foodbusmounthfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_mount_interface[];
extern const char bus_mount_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbuspathhfoo
-#define foodbuspathhfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_path_interface[];
extern const char bus_path_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusservicehfoo
-#define foodbusservicehfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_service_interface[];
extern const char bus_service_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbussnapshothfoo
-#define foodbussnapshothfoo
+#pragma once
/***
This file is part of systemd.
DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
extern const char bus_snapshot_interface[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbussockethfoo
-#define foodbussockethfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_socket_interface[];
extern const char bus_socket_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusswaphfoo
-#define foodbusswaphfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_swap_interface[];
extern const char bus_swap_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbustargethfoo
-#define foodbustargethfoo
+#pragma once
/***
This file is part of systemd.
DBusHandlerResult bus_target_message_handler(Unit *u, DBusConnection *c, DBusMessage *message);
extern const char bus_target_interface[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbustimerhfoo
-#define foodbustimerhfoo
+#pragma once
/***
This file is part of systemd.
extern const char bus_timer_interface[];
extern const char bus_timer_invalidating_properties[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusunithfoo
-#define foodbusunithfoo
+#pragma once
/***
This file is part of systemd.
extern const DBusObjectPathVTable bus_unit_vtable;
extern const char bus_unit_interface[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbushfoo
-#define foodbushfoo
+#pragma once
/***
This file is part of systemd.
#define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->name_data_slot)
extern const char * const bus_interface_table[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodevicehfoo
-#define foodevicehfoo
+#pragma once
/***
This file is part of systemd.
const char* device_state_to_string(DeviceState i);
DeviceState device_state_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooexecutehfoo
-#define fooexecutehfoo
+#pragma once
/***
This file is part of systemd.
const char *kill_who_to_string(KillWho k);
KillWho kill_who_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foofdsethfoo
-#define foofdsethfoo
+#pragma once
/***
This file is part of systemd.
int fdset_new_fill(FDSet **_s);
int fdset_cloexec(FDSet *fds, bool b);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foohostnamesetuphfoo
-#define foohostnamesetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int hostname_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooimasetuphfoo
-#define fooimasetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int ima_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojobhfoo
-#define foojobhfoo
+#pragma once
/***
This file is part of systemd.
const char* job_result_to_string(JobResult t);
JobResult job_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fookmodsetuphfoo
-#define fookmodsetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int kmod_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloaddropinhfoo
-#define fooloaddropinhfoo
+#pragma once
/***
This file is part of systemd.
/* Read service data supplementary drop-in directories */
int unit_load_dropin(Unit *u);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloadfragmenthfoo
-#define fooloadfragmenthfoo
+#pragma once
/***
This file is part of systemd.
/* gperf prototypes */
const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
extern const char load_fragment_gperf_nulstr[];
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolocalesetuphfoo
-#define foolocalesetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int locale_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooloopbacksetuphfoo
-#define fooloopbacksetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int loopback_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomachineidsetuphfoo
-#define foomachineidsetuphfoo
+#pragma once
/***
This file is part of systemd.
***/
int machine_id_setup(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomanagerhfoo
-#define foomanagerhfoo
+#pragma once
/***
This file is part of systemd.
const char *manager_running_as_to_string(ManagerRunningAs i);
ManagerRunningAs manager_running_as_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomountsetuphfoo
-#define foomountsetuphfoo
+#pragma once
/***
This file is part of systemd.
bool mount_point_is_api(const char *path);
bool mount_point_ignore(const char *path);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomounthfoo
-#define foomounthfoo
+#pragma once
/***
This file is part of systemd.
const char* mount_result_to_string(MountResult i);
MountResult mount_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foonamespacehfoo
-#define foonamespacehfoo
+#pragma once
/***
This file is part of systemd.
char **inaccessible,
bool private_tmp,
unsigned long flags);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foopathhfoo
-#define foopathhfoo
+#pragma once
/***
This file is part of systemd.
const char* path_result_to_string(PathResult i);
PathResult path_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooselinuxsetuphfoo
-#define fooselinuxsetuphfoo
+#pragma once
/***
This file is part of systemd.
#include <stdbool.h>
int selinux_setup(bool *loaded_policy);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooservicehfoo
-#define fooservicehfoo
+#pragma once
/***
This file is part of systemd.
const char* start_limit_action_to_string(StartLimitAction i);
StartLimitAction start_limit_action_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosnapshothfoo
-#define foosnapshothfoo
+#pragma once
/***
This file is part of systemd.
const char* snapshot_state_to_string(SnapshotState i);
SnapshotState snapshot_state_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosockethfoo
-#define foosockethfoo
+#pragma once
/***
This file is part of systemd.
const char* socket_result_to_string(SocketResult i);
SocketResult socket_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foospecialhfoo
-#define foospecialhfoo
+#pragma once
/***
This file is part of systemd.
#define SPECIAL_RUNLEVEL3_TARGET "runlevel3.target"
#define SPECIAL_RUNLEVEL4_TARGET "runlevel4.target"
#define SPECIAL_RUNLEVEL5_TARGET "runlevel5.target"
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooswaphfoo
-#define fooswaphfoo
+#pragma once
/***
This file is part of systemd.
const char* swap_result_to_string(SwapResult i);
SwapResult swap_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosysfsshowhfoo
-#define foosysfsshowhfoo
+#pragma once
/***
This file is part of systemd.
***/
int show_sysfs(const char *seat, const char *prefix, unsigned columns);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef footargethfoo
-#define footargethfoo
+#pragma once
/***
This file is part of systemd.
const char* target_state_to_string(TargetState i);
TargetState target_state_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolibwraphfoo
-#define foolibwraphfoo
+#pragma once
/***
This file is part of systemd.
#include <stdbool.h>
bool socket_tcpwrap(int fd, const char *name);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef footimerhfoo
-#define footimerhfoo
+#pragma once
/***
This file is part of systemd.
const char* timer_result_to_string(TimerResult i);
TimerResult timer_result_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooumounthfoo
-#define fooumounthfoo
+#pragma once
/***
This file is part of systemd.
int loopback_detach_all(bool *changed);
int dm_detach_all(bool *changed);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foounithfoo
-#define foounithfoo
+#pragma once
/***
This file is part of systemd.
const char *unit_dependency_to_string(UnitDependency i);
UnitDependency unit_dependency_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocompresshfoo
-#define foocompresshfoo
+#pragma once
/***
This file is part of systemd.
void **buffer, uint64_t *buffer_size,
const void *prefix, uint64_t prefix_len,
uint8_t extra);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojournaldefhfoo
-#define foojournaldefhfoo
+#pragma once
/***
This file is part of systemd.
le64_t n_data;
le64_t n_fields;
};
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojournalfilehfoo
-#define foojournalfilehfoo
+#pragma once
/***
This file is part of systemd.
int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to);
bool journal_file_rotate_suggested(JournalFile *f);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojournalinternalhfoo
-#define foojournalinternalhfoo
+#pragma once
/***
This file is part of systemd.
char *journal_make_match_string(sd_journal *j);
void journal_print_header(sd_journal *j);
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojournalratelimithfoo
-#define foojournalratelimithfoo
+#pragma once
/***
This file is part of systemd.
JournalRateLimit *journal_rate_limit_new(usec_t interval, unsigned burst);
void journal_rate_limit_free(JournalRateLimit *r);
int journal_rate_limit_test(JournalRateLimit *r, const char *id, int priority, uint64_t available);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foojournaldhfoo
-#define foojournaldhfoo
+#pragma once
/***
This file is part of systemd.
const char *storage_to_string(Storage s);
Storage storage_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolookup3hfoo
-#define foolookup3hfoo
+#pragma once
#include <inttypes.h>
#include <sys/types.h>
return ((uint64_t) a << 32ULL) | (uint64_t) b;
}
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindaclhfoo
-#define foologindaclhfoo
+#pragma once
/***
This file is part of systemd.
}
#endif
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologinddevicehfoo
-#define foologinddevicehfoo
+#pragma once
/***
This file is part of systemd.
void device_free(Device *d);
void device_attach(Device *d, Seat *s);
void device_detach(Device *d);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindseathfoo
-#define foologindseathfoo
+#pragma once
/***
This file is part of systemd.
int seat_send_signal(Seat *s, bool new_seat);
int seat_send_changed(Seat *s, const char *properties);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindsessionhfoo
-#define foologindsessionhfoo
+#pragma once
/***
This file is part of systemd.
const char *kill_who_to_string(KillWho k);
KillWho kill_who_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologinduserhfoo
-#define foologinduserhfoo
+#pragma once
/***
This file is part of systemd.
const char* user_state_to_string(UserState s);
UserState user_state_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindhfoo
-#define foologindhfoo
+#pragma once
/***
This file is part of systemd.
/* gperf lookup function */
const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooreadaheadcommonhfoo
-#define fooreadaheadcommonhfoo
+#pragma once
/***
This file is part of systemd.
int main_collect(const char *root);
int main_replay(const char *root);
int main_analyze(const char *pack_path);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooaclutilhfoo
-#define fooaclutilhfoo
+#pragma once
/***
This file is part of systemd.
***/
int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooaskpasswordapihfoo
-#define fooaskpasswordapihfoo
+#pragma once
/***
This file is part of systemd.
int ask_password_agent(const char *message, const char *icon, usec_t until, bool accept_cached, char ***_passphrases);
int ask_password_auto(const char *message, const char *icon, usec_t until, bool accept_cached, char ***_passphrases);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foocgrouputilhfoo
-#define foocgrouputilhfoo
+#pragma once
/***
This file is part of systemd.
int cg_pid_get_unit(pid_t pid, char **unit);
char **cg_shorten_controllers(char **controllers);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooconfparserhfoo
-#define fooconfparserhfoo
+#pragma once
/***
This file is part of systemd.
\
return 0; \
}
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbuscommonhfoo
-#define foodbuscommonhfoo
+#pragma once
/***
This file is part of systemd.
DBusHandlerResult bus_exit_idle_filter(DBusConnection *bus, DBusMessage *m, void *userdata);
pid_t bus_get_unix_process_id(DBusConnection *connection, const char *name, DBusError *error);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodbusloophfoo
-#define foodbusloophfoo
+#pragma once
/***
This file is part of systemd.
int bus_loop_open(DBusConnection *c);
int bus_loop_dispatch(int fd);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foodefhfoo
-#define foodefhfoo
+#pragma once
/***
This file is part of systemd.
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
#define SIGNALS_IGNORE SIGKILL,SIGPIPE
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooexitstatushfoo
-#define fooexitstatushfoo
+#pragma once
/***
This file is part of systemd.
bool is_clean_exit(int code, int status);
bool is_clean_exit_lsb(int code, int status);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foohashmaphfoo
-#define foohashmaphfoo
+#pragma once
/***
This file is part of systemd.
#define HASHMAP_FOREACH_BACKWARDS(e, h, i) \
for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL))
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooinstallhfoo
-#define fooinstallhfoo
+#pragma once
/***
This file is part of systemd.
const char *unit_file_change_type_to_string(UnitFileChangeType s);
UnitFileChangeType unit_file_change_type_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolabelhfoo
-#define foolabelhfoo
+#pragma once
/***
This file is part of systemd.
void label_retest_selinux(void);
int label_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foolisthfoo
-#define foolisthfoo
+#pragma once
/***
This file is part of systemd.
#define LIST_FOREACH_AFTER(name,i,p) \
for ((i) = (p)->name##_next; (i); (i) = (i)->name##_next)
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologhfoo
-#define foologhfoo
+#pragma once
/***
This file is part of systemd.
const char *log_target_to_string(LogTarget target);
LogTarget log_target_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologsshowhfoo
-#define foologsshowhfoo
+#pragma once
/***
This file is part of systemd.
const char* output_mode_to_string(OutputMode m);
OutputMode output_mode_from_string(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomacrohfoo
-#define foomacrohfoo
+#pragma once
/***
This file is part of systemd.
}
#include "log.h"
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foomissinghfoo
-#define foomissinghfoo
+#pragma once
/***
This file is part of systemd.
#ifndef PR_SET_NO_NEW_PRIVS
#define PR_SET_NO_NEW_PRIVS 38
#endif
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foopagerhfoo
-#define foopagerhfoo
+#pragma once
/***
This file is part of systemd.
void pager_open(void);
void pager_close(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foopathlookuphfoo
-#define foopathlookuphfoo
+#pragma once
/***
This file is part of systemd.
int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal, const char *generator, const char *generator_early, const char *generator_late);
void lookup_paths_free(LookupPaths *p);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foopolkithfoo
-#define foopolkithfoo
+#pragma once
/***
This file is part of systemd.
bool interactive,
bool *challenge,
DBusError *error);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooratelimithfoo
-#define fooratelimithfoo
+#pragma once
/***
This file is part of systemd.
} while (false)
bool ratelimit_test(RateLimit *r);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosethfoo
-#define foosethfoo
+#pragma once
/***
This file is part of systemd.
#define SET_FOREACH_BACKWARDS(e, s, i) \
for ((i) = ITERATOR_LAST, (e) = set_iterate_backwards((s), &(i)); (e); (e) = set_iterate_backwards((s), &(i)))
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foosocketutilhfoo
-#define foosocketutilhfoo
+#pragma once
/***
This file is part of systemd.
int netlink_family_from_string(const char *s);
bool socket_ipv6_is_supported(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foospawnaskpasswordagenthfoo
-#define foospawnaskpasswordagenthfoo
+#pragma once
/***
This file is part of systemd.
int ask_password_agent_open(void);
void ask_password_agent_close(void);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foospecifierhfoo
-#define foospecifierhfoo
+#pragma once
/***
This file is part of systemd.
char *specifier_printf(const char *text, const Specifier table[], void *userdata);
char* specifier_string(char specifier, void *data, void *userdata);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foostrvhfoo
-#define foostrvhfoo
+#pragma once
/***
This file is part of systemd.
#define STRV_FOREACH_BACKWARDS(s, l) \
for (; (l) && ((s) >= (l)); (s)--)
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foounitnamehfoo
-#define foounitnamehfoo
+#pragma once
/***
This file is part of systemd.
char *unit_dbus_path_from_name(const char *name);
char *unit_name_mangle(const char *name);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooutf8hfoo
-#define fooutf8hfoo
+#pragma once
/***
This file is part of systemd.
char *utf8_filter(const char *s);
char *ascii_filter(const char *s);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooutilhfoo
-#define fooutilhfoo
+#pragma once
/***
This file is part of systemd.
int get_shell(char **ret);
int get_home_dir(char **ret);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef fooutmpwtmphfoo
-#define fooutmpwtmphfoo
+#pragma once
/***
This file is part of systemd.
int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line);
int utmp_wall(const char *message, bool (*match_tty)(const char *tty));
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foovirthfoo
-#define foovirthfoo
+#pragma once
/***
This file is part of systemd.
} Virtualization;
Virtualization detect_virtualization(const char **id);
-
-#endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foowatchdoghfoo
-#define foowatchdoghfoo
+#pragma once
/***
This file is part of systemd.
int watchdog_set_timeout(usec_t *usec);
int watchdog_ping(void);
void watchdog_close(bool disarm);
-
-#endif