]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: prefer enums over macros for sources used for multiple programs
authorCollin Funk <collin.funk1@gmail.com>
Sun, 21 Dec 2025 01:24:17 +0000 (17:24 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 21 Dec 2025 01:25:32 +0000 (17:25 -0800)
commit1313c240569db9dbf5814332a05020c196334418
treee822409f11892bb1d65be87e7f4ed40ab1fd0fd8
parentd7aaa001d9c9b784f379c1de457b4bc6857584ac
maint: prefer enums over macros for sources used for multiple programs

* src/chown.h (enum chown_modes): New type.
(CHOWN_CHOWN, CHOWN_CHGRP): Define as an enum instead of a macro.
* src/chown-chgrp.c (chown_mode): Use "enum chown_modes" instead of
"int".
* src/chown-chown.c (chown_mode): Likewise.
* src/ls.h (enum ls_modes): New type.
(LS_LS, LS_MULTI_COL, LS_LONG_FORMAT): Define as an enum instead of a
macro.
* src/ls-dir.c (ls_mode): Use "enum ls_modes" instead of "int".
* src/ls-ls.c (ls_mode): Likewise.
* src/ls-vdir.c (ls_mode): Likewise.
* src/uname.h (enum uname_modes): New type.
(UNAME_UNAME, UNAME_ARCH): Define as an enum instead of a macro.
* src/uname-arch.c (uname_mode): Use "enum uname_modes" instead of
"int".
* src/uname-uname.c (uname_mode): Likewise.
src/chown-chgrp.c
src/chown-chown.c
src/chown.h
src/ls-dir.c
src/ls-ls.c
src/ls-vdir.c
src/ls.h
src/uname-arch.c
src/uname-uname.c
src/uname.h