Systemd/src/basic
Zbigniew Jędrzejewski-Szmek 349cc4a507 build-sys: use #if Y instead of #ifdef Y everywhere
The advantage is that is the name is mispellt, cpp will warn us.

$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build

squash! build-sys: use #if Y instead of #ifdef Y everywhere

v2:
- fix incorrect setting of HAVE_LIBIDN2
2017-10-04 12:09:29 +02:00
..
MurmurHash2.c MurmurHash: all /* fall through */ comments 2017-01-31 19:35:04 -05:00
MurmurHash2.h build-sys: split internal basic/ library from shared/ 2015-06-11 10:52:46 +02:00
af-list.c build-sys: add check for gperf lookup function signature (#5055) 2017-01-10 08:39:05 +01:00
af-list.h Use provided buffer in dns_resource_key_to_string 2016-02-16 19:55:51 -05:00
af-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
alloc-util.c alloc-util: add new helpers memdup_suffix0() and newdup_suffix0() 2017-07-31 18:20:28 +02:00
alloc-util.h alloc-util: add new helpers memdup_suffix0() and newdup_suffix0() 2017-07-31 18:20:28 +02:00
architecture.c architecture: add Synopsys DesignWare ARC cores support (#5992) 2017-05-19 10:55:24 -04:00
architecture.h architecture: add Synopsys DesignWare ARC cores support (#5992) 2017-05-19 10:55:24 -04:00
arphrd-list.c build-sys: add check for gperf lookup function signature (#5055) 2017-01-10 08:39:05 +01:00
arphrd-list.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
arphrd-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
async.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
async.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
audit-util.c audit: introduce audit_session_is_valid() and make use of it everywhere 2017-07-31 18:01:42 +02:00
audit-util.h audit: introduce audit_session_is_valid() and make use of it everywhere 2017-07-31 18:01:42 +02:00
barrier.c tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
barrier.h Minor line wrapping adjustment 2017-10-02 14:52:12 +02:00
bitmap.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
bitmap.h resolved: when using the ResolveRecord() bus call, adjust TTL for caching time 2016-06-21 13:20:48 +02:00
blkid-util.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
bpf-program.c bpf: set BPF_F_ALLOW_OVERRIDE when attaching a cgroup program if Delegate=yes is set 2017-09-22 15:28:05 +02:00
bpf-program.h bpf: set BPF_F_ALLOW_OVERRIDE when attaching a cgroup program if Delegate=yes is set 2017-09-22 15:28:05 +02:00
btrfs-ctree.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
btrfs-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
btrfs-util.h nspawn: add fallback top normal copy/reflink when we cannot btrfs snapshot 2016-11-22 13:35:09 +01:00
build.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
bus-label.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-label.h string-util: add strlen_ptr() helper 2017-07-31 18:20:28 +02:00
calendarspec.c Simplify the if cases for timezone checking 2017-09-17 09:42:20 +02:00
calendarspec.h Added timezone to the CalendarSpec, parser/formatter and the timedatectl 2017-09-17 09:42:20 +02:00
cap-list.c basic/cap-list: report empty capability set as "" 2017-09-25 11:11:20 +02:00
cap-list.h cap-list: add capability_set_{from_string,to_string_alloc}() 2017-08-07 23:25:11 +09:00
cap-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
capability-util.c capability: add new ambient_capabilities_supported() helper 2017-08-10 15:02:50 +02:00
capability-util.h capability: add new ambient_capabilities_supported() helper 2017-08-10 15:02:50 +02:00
cgroup-util.c test-cpu-set-util.c: fix typo in comment (#6916) 2017-09-26 16:07:34 +02:00
cgroup-util.h core: introduce cg_mask_from_string()/cg_mask_to_string() 2017-05-04 09:41:19 +02:00
chattr-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
chattr-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
clock-util.c clock-util: be more tolerant in parsing /etc/adjtime 2016-02-26 12:33:41 +01:00
clock-util.h clock-util: make clock_is_localtime() testable and add initial tests 2016-02-26 11:28:49 +01:00
conf-files.c conf-files: fix check for masking with empty files 2017-09-17 21:22:39 +02:00
conf-files.h exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
copy.c copy: a plain unlink() works here too 2017-02-21 21:41:32 +01:00
copy.h machined: when copying files from/to userns containers chown to root 2017-02-17 10:22:28 +01:00
cpu-set-util.c cpu-set-util: add parse_cpu_set() 2017-08-07 23:40:40 +09:00
cpu-set-util.h cpu-set-util: add parse_cpu_set() 2017-08-07 23:40:40 +09:00
def.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
device-nodes.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
device-nodes.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
dirent-util.c basic: add readdir_no_dot and safe_glob functions 2017-04-27 13:20:08 -04:00
dirent-util.h basic: add readdir_no_dot and safe_glob functions 2017-04-27 13:20:08 -04:00
env-util.c nss: use secure_getenv for behaviour-modifying booleans (#6817) 2017-09-14 09:20:27 +02:00
env-util.h nss: use secure_getenv for behaviour-modifying booleans (#6817) 2017-09-14 09:20:27 +02:00
errno-list.c build-sys: add check for gperf lookup function signature (#5055) 2017-01-10 08:39:05 +01:00
errno-list.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
errno-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
escape.c string-util: add strlen_ptr() helper 2017-07-31 18:20:28 +02:00
escape.h Use "dollar-single-quotes" to escape shell-sensitive strings 2017-06-19 19:39:43 -04:00
ether-addr-util.c util-lib: add ether_addr_from_string() 2016-05-17 16:55:20 -04:00
ether-addr-util.h util-lib: add ether_addr_from_string() 2016-05-17 16:55:20 -04:00
exec-util.c exec-util,conf-files: skip non-executable files in execute_directories() 2017-09-13 11:42:31 +02:00
exec-util.h exec-util: implement a set of callbacks to pass variables around 2017-02-20 18:49:14 -05:00
exit-status.c exit-status: drop EXIT_MAKE_STARTER 2017-09-15 16:43:06 +02:00
exit-status.h exit-status: drop EXIT_MAKE_STARTER 2017-09-15 16:43:06 +02:00
extract-word.c shared/extract-word: replace enum with unsigned int to avoid undefined behaviour 2017-04-25 21:12:52 -04:00
extract-word.h shared/extract-word: replace enum with unsigned int to avoid undefined behaviour 2017-04-25 21:12:52 -04:00
fd-util.c tree-wide: make use of getpid_cached() wherever we can 2017-07-20 20:27:24 +02:00
fd-util.h basic/fd-util: introduce stdio_unset_cloexec() function 2016-07-02 23:38:47 +06:00
fileio-label.c basic/fileio: extend atomic file writing with timestamp setting 2017-05-11 10:23:36 -04:00
fileio-label.h basic/fileio: extend atomic file writing with timestamp setting 2017-05-11 10:23:36 -04:00
fileio.c Merge pull request #6891 from poettering/read-line 2017-09-24 20:51:01 +02:00
fileio.h Merge pull request #6891 from poettering/read-line 2017-09-24 20:51:01 +02:00
format-util.h timesync/timesyncd-manager: fix format-specifier issues 2017-05-19 14:38:25 +02:00
fs-util.c fs-util: propagate EEXIST error in symlink_idempotent() as EEXIST 2017-09-27 17:52:42 +02:00
fs-util.h tmpfiles: silently ignore any path that passes through autofs (#6506) 2017-09-04 15:35:07 +02:00
generate-af-list.sh meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
generate-arphrd-list.sh meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
generate-cap-list.sh meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
generate-errno-list.sh meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
generate-gperfs.py Mark python scripts executable 2017-05-07 20:16:47 -04:00
glob-util.c basic: add readdir_no_dot and safe_glob functions 2017-04-27 13:20:08 -04:00
glob-util.h basic: add readdir_no_dot and safe_glob functions 2017-04-27 13:20:08 -04:00
gunicode.c basic: use for() loop instead of while() 2016-10-12 22:48:41 +02:00
gunicode.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
hash-funcs.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
hash-funcs.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
hashmap.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
hashmap.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
hexdecoct.c string-util: add strlen_ptr() helper 2017-07-31 18:20:28 +02:00
hexdecoct.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
hostname-util.c resolved,nss-myhostname: use _gateway for the gateway 2017-07-31 14:41:56 -04:00
hostname-util.h networkd: add basic LLDP transmission support 2016-02-21 20:58:59 +01:00
in-addr-util.c ip-address-access: minimize IP address lists 2017-09-22 15:24:55 +02:00
in-addr-util.h tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
io-util.c core: rework how we flush incoming traffic when a socket unit goes down 2016-05-06 13:29:26 +02:00
io-util.h io-util: add new IOVEC_INIT/IOVEC_MAKE macros 2017-09-22 15:28:04 +02:00
ioprio.h tree-wide: sort includes in *.h 2015-11-18 23:09:02 +01:00
journal-importer.c tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
journal-importer.h Move export format parsing from src/journal-remote/ to src/basic/ 2017-02-14 23:56:48 -05:00
khash.c basic: check strdup result in khash_dup (#5176) 2017-01-31 08:27:14 +01:00
khash.h Fix missing space in comments (#5439) 2017-02-24 18:14:02 +01:00
label.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
label.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
list.h list: LIST_INSERT_BEFORE: update head if necessary (#4261) 2016-10-04 16:15:37 +02:00
locale-util.c locale-util: mark special_glyph() as _const_ 2016-05-09 15:17:57 -04:00
locale-util.h locale-util: mark special_glyph() as _const_ 2016-05-09 15:17:57 -04:00
lockfile-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
lockfile-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
log.c log: add a mode where we open the log fds for every single log message 2017-09-26 17:46:33 +02:00
log.h log: add a mode where we open the log fds for every single log message 2017-09-26 17:46:33 +02:00
login-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
login-util.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
macro.h tree-wide: drop assert.h includes 2017-05-13 15:44:30 -04:00
memfd-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
memfd-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
mempool.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
mempool.h tree-wide: make more global variables static 2016-02-13 12:28:28 +01:00
meson.build set: add new helper set_make() which is like set_new() + multiple set_put() in vararg 2017-09-26 16:17:22 +02:00
missing.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
missing_syscall.h build-sys: change all HAVE_DECL_ macros to HAVE_ 2017-10-03 10:32:34 +02:00
mkdir-label.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
mkdir.c mkdir: chmod_and_chown() returns errors as "return -errno", not in errno itself 2017-08-10 15:02:50 +02:00
mkdir.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
mount-util.c mount-util: add fusectl to list of API VFS 2017-09-29 14:36:33 +02:00
mount-util.h dissect: split list of discard-supporting fs out into mount-util.c 2017-09-29 14:36:29 +02:00
nss-util.h nss-util: silence warning about deprecated RES_USE_INET6 2017-01-31 19:55:33 -05:00
ordered-set.c networkd: use an OrderedSet instead of Set to collect link domains 2016-01-26 14:42:03 +01:00
ordered-set.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
parse-util.c parse-util: introduce pid_is_valid() 2017-07-31 18:01:42 +02:00
parse-util.h parse-util: introduce parse_dev() helper 2017-06-06 22:42:35 +02:00
path-util.c path-util: some updates to path_make_relative() 2017-10-02 17:41:44 +02:00
path-util.h build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
prioq.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
prioq.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
proc-cmdline.c Fix missing space in comments (#5439) 2017-02-24 18:14:02 +01:00
proc-cmdline.h util-lib: various improvements to kernel command line parsing 2016-12-21 19:09:08 +01:00
process-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
process-util.h util-lib: wrap personality() to fix up broken glibc error handling (#6766) 2017-09-08 17:16:29 +03:00
random-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
random-util.h basic/random-util: do not fall back to /dev/urandom if getrandom() returns short 2017-06-28 10:32:02 -04:00
ratelimit.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
ratelimit.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
raw-clone.h seccomp: on s390 the clone() parameters are reversed 2017-02-08 22:21:27 +01:00
refcnt.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
replace-var.c basic: cosmetic changes (#6440) 2017-07-24 19:32:34 -04:00
replace-var.h basic: cosmetic changes (#6440) 2017-07-24 19:32:34 -04:00
rlimit-util.c rlimit: don't assume getrlimit() always succeeds 2017-09-22 15:28:05 +02:00
rlimit-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
rm-rf.c tree-wide: use `!IN_SET(..)` for `a != b && a != c && …` 2017-10-02 13:09:56 +02:00
rm-rf.h util-lib: drop unnecessary NULL check 2016-12-07 18:38:41 +01:00
securebits-util.c securebits-util: add secure_bits_{from_string,to_string_alloc}() 2017-08-07 23:40:25 +09:00
securebits-util.h securebits-util: add secure_bits_{from_string,to_string_alloc}() 2017-08-07 23:40:25 +09:00
securebits.h build-sys: split internal basic/ library from shared/ 2015-06-11 10:52:46 +02:00
selinux-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
selinux-util.h Revert "selinux: split up mac_selinux_have() from mac_selinux_use()" 2017-05-12 14:43:39 +01:00
set.c set: add new helper set_make() which is like set_new() + multiple set_put() in vararg 2017-09-26 16:17:22 +02:00
set.h set: add new helper set_make() which is like set_new() + multiple set_put() in vararg 2017-09-26 16:17:22 +02:00
sigbus.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
sigbus.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
signal-util.c tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
signal-util.h tree-wide: add new SIGNAL_VALID() macro-like function that validates signal numbers 2016-04-12 13:43:32 +02:00
siphash24.c tree-wide: adjust fall through comments so that gcc is happy 2017-01-31 14:04:55 -05:00
siphash24.h shared: make sure foo.bar and foobar result in different domain name hashes 2016-01-11 19:39:59 +01:00
smack-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
smack-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
socket-label.c socket-label: let's use IN_SET, so that we have to call socket_address_family() only once 2017-09-22 15:24:55 +02:00
socket-util.c build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
socket-util.h dhcp-network: adjust sockaddr length for addresses longer than 8 bytes (#6527) 2017-08-08 18:55:31 +02:00
sparse-endian.h sparse: avoid clash with __bitwise and __force from 4.10 linux/types.h (#5061) 2017-01-11 10:50:25 +01:00
special.h Drop busname unit type 2017-07-23 09:29:02 -04:00
stat-util.c basic/path-util: allow flags for path_equal_or_files_same 2017-06-17 12:37:16 -04:00
stat-util.h basic/path-util: allow flags for path_equal_or_files_same 2017-06-17 12:37:16 -04:00
stdio-util.h tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
strbuf.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
strbuf.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
string-table.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
string-table.h string-table: make sure DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN() handles NULL strings nicely 2016-06-21 13:20:47 +02:00
string-util.c build-sys: change all HAVE_DECL_ macros to HAVE_ 2017-10-03 10:32:34 +02:00
string-util.h build-sys: change all HAVE_DECL_ macros to HAVE_ 2017-10-03 10:32:34 +02:00
strv.c basic/strv: use existing qsort_safe() helper 2017-07-10 15:40:47 -04:00
strv.h strv: fix STRV_FOREACH_BACKWARDS() to be a single statement only 2016-10-07 20:14:38 +02:00
strxcpyx.c strxcpyx: assert throughout on non-NULL src/dest 2017-07-03 06:46:34 -07:00
strxcpyx.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
syslog-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
syslog-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
terminal-util.c tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
terminal-util.h systemctl: don't do ANSI underlining on TERM=linux (#6778) 2017-09-09 22:48:35 +02:00
time-util.c time-util: mktime_or_timegm are changing the struct tm 2017-09-22 14:01:33 +02:00
time-util.h Parse "timeout=0" as infinity in various generators (#6264) 2017-07-03 14:29:32 +02:00
umask-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
unaligned.h util-lib: add accessors for unaligned native endian words 2016-06-06 19:59:09 +02:00
unit-name.c swap: adjust swap.c in a similar way to what we just did to mount.c 2017-09-26 16:17:22 +02:00
unit-name.h swap: adjust swap.c in a similar way to what we just did to mount.c 2017-09-26 16:17:22 +02:00
user-util.c util-lib: add a comment explaining the user name rules we enforce 2016-12-27 18:09:58 +01:00
user-util.h core: do not fail in a container if we can't use setgroups 2016-10-06 11:49:00 +02:00
utf8.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
utf8.h Ignore BOM in config files 2016-03-22 18:51:59 -04:00
util.c tree-wide: use IN_SET where possible 2017-10-02 13:09:54 +02:00
util.h util: make get_block_device() available 2017-09-13 11:49:43 +02:00
verbs.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
verbs.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
virt.c tree-wide: make use of getpid_cached() wherever we can 2017-07-20 20:27:24 +02:00
virt.h detect-virt: add --private-users switch to check if a userns is active 2016-10-26 20:12:51 -04:00
web-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
web-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
xattr-util.c tree-wide: no need to pass excess flags to open()/openat() if O_PATH is passed 2016-03-02 00:42:49 +06:00
xattr-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
xml.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
xml.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00