Todd C. Miller
78edde5ea1
Use NSIG instead of nitems(array) for the loop bound.
...
This matches the sudo_sys_siglist[] and sudo_sys_signame[] declarations.
2023-10-18 13:32:08 -06:00
Todd C. Miller
14d514e5ac
Avoid using %zu or %zd with printf() and fprintf().
...
This prevents problems on systems where the system printf(3) is not
C99-compliant. We use our own snprintf() on such systems so that
is safe.
2023-10-17 20:14:53 -06:00
Rose
e095069d2a
Prefer fputs over fprintf where possible
...
fprintf does extra work and meant for formatting strings.
2023-10-15 10:28:57 -06:00
Todd C. Miller
e343e07543
Use #include <foo.h> instead of #include "foo.h" in most cases.
...
We rely on the include path to find many of these headers. It
especially doesn't make sense to use #include "foo.h" for headers
in the top-level include directory.
2023-09-25 10:13:28 -06:00
Rose
e54ba33ea0
Avoid compiler casting warnings by assigning to the same type where possible
...
This saves instructions that are related to casting as well as compiler warnings.
2023-06-28 17:25:26 -04:00
Todd C. Miller
99655f28de
format string fix: print signal number as unsigned.
...
Quiets a cppcheck warning; mksiglist.c already has this fixed.
2021-09-22 11:23:41 -06:00
Todd C. Miller
b40f74cb24
Cross-build support for mksigname and mksiglist
...
We must build these with the host C compiler but use the target
preprocessor to generate the output.
2021-08-19 09:50:05 -06:00
Todd C. Miller
985af422d2
Rename __dso_public -> sudo_dso_public and move to config.h.
2020-08-12 09:57:42 -06:00
Todd C. Miller
dd88460800
We no longer need to include headers we don't use for sudo*.h files.
...
Previously we needed to include headers required by the various
sudo*h files. Now those files are more self-sufficient and we
should only include headers needed by code in the various .c files.
2020-05-18 06:47:04 -06:00
Todd C. Miller
ac61b5655d
Use EXIT_SUCCESS and EXIT_FAILURE more consistently.
2020-02-08 12:43:00 -07:00
Todd C. Miller
1e1ef61902
Add SPDX-License-Identifier to files.
2019-04-29 07:21:51 -06:00
Todd C. Miller
6c3d20cb41
Convert PVS-Studio comment to ANSI C.
2018-10-26 08:39:09 -06:00
Todd C. Miller
64e5d34c57
Add comments in .c files so PVS-Studio will check them.
2018-10-21 08:46:05 -06:00
Todd C. Miller
48fba3c2cc
update my email to Todd.Miller@sudo.ws
2017-12-03 17:53:40 -07:00
Todd C. Miller
4a07b472f0
Only include stddef.h where it is needed.
2015-06-20 05:34:35 -06:00
Todd C. Miller
dc883f2454
We require ANSI C so stop using the obsolete STDC_HEADERS.
2015-06-19 14:29:27 -06:00
Todd C. Miller
eeca3b0ca4
Include sys/types.h instead of unistd.h to get uid_t and gid_t.
...
Add missing include of sys/types.h to a few places.
2015-04-09 10:58:04 -06:00
Todd C. Miller
8cae9876f3
Include unistd.h in siglist.c and signame.c to get gid_t which
...
is used by sudo_compat.h. Bug #686
2015-02-17 06:21:06 -07:00
Todd C. Miller
47835ff289
Rename missing.h -> sudo_compat.h
2014-07-22 14:25:16 -06:00
Todd C. Miller
9071e95080
Move mksiglist.h and mksigname.h to lib/util where they belong.
2014-07-14 09:46:17 -06:00
Todd C. Miller
4d37a4a162
Top level directory reorg
...
Move src/po -> po
Combine common and compat -> lib/util
Move zlib -> lib/zlib
2014-06-26 15:51:02 -06:00