355ad6a9e0
PARAMETERS: According to the C2x charter, I reordered the parameters 'size' and 'buf' from previously existing date_to_str() definitions. C2x charter: > 15. Application Programming Interfaces (APIs) should be > self-documenting when possible. In particular, the order of > parameters in function declarations should be arranged such that > the size of an array appears before the array. The purpose is to > allow Variable-Length Array (VLA) notation to be used. This not > only makes the code's purpose clearer to human readers, but also > makes static analysis easier. Any new APIs added to the Standard > should take this into consideration. I used 'long' for the date parameter, as some uses of the function need to pass a negative value meaning "never". FUNCTION BODY: I didn't check '#ifdef HAVE_STRFTIME', which old definitions did, since strftime(3) is guaranteed by the C89 standard, and all of the conversion specifiers that we use are also specified by that standard, so we don't need any extensions at all. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
81 lines
1.1 KiB
Makefile
81 lines
1.1 KiB
Makefile
|
|
EXTRA_DIST = .indent.pro xgetXXbyYY.c
|
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
|
|
|
|
noinst_LTLIBRARIES = libmisc.la
|
|
|
|
libmisc_la_SOURCES = \
|
|
addgrps.c \
|
|
age.c \
|
|
audit_help.c \
|
|
basename.c \
|
|
chkname.c \
|
|
chkname.h \
|
|
chowndir.c \
|
|
chowntty.c \
|
|
cleanup.c \
|
|
cleanup_group.c \
|
|
cleanup_user.c \
|
|
console.c \
|
|
copydir.c \
|
|
date_to_str.c \
|
|
entry.c \
|
|
env.c \
|
|
failure.c \
|
|
failure.h \
|
|
find_new_gid.c \
|
|
find_new_uid.c \
|
|
find_new_sub_gids.c \
|
|
find_new_sub_uids.c \
|
|
getdate.h \
|
|
getdate.y \
|
|
getgr_nam_gid.c \
|
|
getrange.c \
|
|
gettime.c \
|
|
hushed.c \
|
|
idmapping.h \
|
|
idmapping.c \
|
|
isexpired.c \
|
|
limits.c \
|
|
list.c log.c \
|
|
loginprompt.c \
|
|
mail.c \
|
|
motd.c \
|
|
myname.c \
|
|
obscure.c \
|
|
pam_pass.c \
|
|
pam_pass_non_interactive.c \
|
|
prefix_flag.c \
|
|
pwd2spwd.c \
|
|
pwdcheck.c \
|
|
pwd_init.c \
|
|
remove_tree.c \
|
|
rlogin.c \
|
|
root_flag.c \
|
|
salt.c \
|
|
setugid.c \
|
|
setupenv.c \
|
|
shell.c \
|
|
strtoday.c \
|
|
sub.c \
|
|
sulog.c \
|
|
ttytype.c \
|
|
tz.c \
|
|
ulimit.c \
|
|
user_busy.c \
|
|
utmp.c \
|
|
valid.c \
|
|
xgetpwnam.c \
|
|
xgetpwuid.c \
|
|
xgetgrnam.c \
|
|
xgetgrgid.c \
|
|
xgetspnam.c \
|
|
xmalloc.c \
|
|
yesno.c
|
|
|
|
if WITH_BTRFS
|
|
libmisc_la_SOURCES += btrfs.c
|
|
endif
|
|
|