glibc/support
Zack Weinberg 4a39c34c4f Change most internal uses of __gettimeofday to __clock_gettime.
Since gettimeofday will shortly be implemented in terms of
clock_gettime on all platforms, internal code should use clock_gettime
directly; in addition to removing a layer of indirection, this will
allow us to remove the PLT-bypass gunk for gettimeofday.  (We can't
quite do that yet, but it'll be coming later in this patch series.)
In many cases, the changed code does fewer conversions.

The changed code always assumes __clock_gettime (CLOCK_REALTIME)
cannot fail.  Most of the call sites were assuming gettimeofday could
not fail, but a few places were checking for errors.  POSIX says
clock_gettime can only fail if the clock constant is invalid or
unsupported, and CLOCK_REALTIME is the one and only clock constant
that's required to be supported.  For consistency I grepped the entire
source tree for any other places that checked for errors from
__clock_gettime (CLOCK_REALTIME), found one, and changed it too.

(For the record, POSIX also says gettimeofday can never fail.)

(It would be nice if we could declare that GNU systems will always
support CLOCK_MONOTONIC as well as CLOCK_REALTIME; there are several
places where we are using CLOCK_REALTIME where _MONOTONIC would be
more appropriate, and/or trying to use _MONOTONIC and then falling
back to _REALTIME.  But the Hurd doesn't support CLOCK_MONOTONIC yet,
and it looks like adding it would involve substantial changes to
gnumach's internals and API.  Oh well.)

A few Hurd-specific files were changed to use __host_get_time instead
of __clock_gettime, as this seemed tidier.  We also assume this cannot
fail.  Skimming the code in gnumach leads me to believe the only way
it could fail is if __mach_host_self also failed, and our
Hurd-specific code consistently assumes that can't happen, so I'm
going with that.

With the exception of support/support_test_main.c, test cases are not
modified, mainly because I didn't want to have to figure out which
test cases were testing gettimeofday specifically.

The definition of GETTIME in sysdeps/generic/memusage.h had a typo and
was not reading tv_sec at all.  I fixed this.  It appears nobody has been
generating malloc traces on a machine that doesn't have a superseding
definition.

There are a whole bunch of places where the code could be simplified
by factoring out timespec subtraction and/or comparison logic, but I
want to keep this patch as mechanical as possible.

Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-10-30 17:04:10 -03:00
..
blob_repeat.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
blob_repeat.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
capture_subprocess.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check_addrinfo.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check_dns_packet.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check_hostent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check_netent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check_nss.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
check.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
delayed_exit.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
descriptors.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
echo-container.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
format_nss.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ignore_stderr.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
links-dso-program-c.c nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] 2019-07-10 14:51:18 -04:00
links-dso-program.cc nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] 2019-07-10 14:51:18 -04:00
Makefile Add UNSUPPORTED check in elf/tst-pldd. 2019-09-18 12:42:39 +02:00
namespace.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
next_to_fault.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
next_to_fault.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
oom_error.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
README support: Add timespec.h 2019-05-09 14:33:53 -03:00
README-testing.c support: Introduce new subdirectory for test infrastructure 2016-12-09 08:18:27 +01:00
resolv_test.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
resolv_test.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
run_diff.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
set_fortify_handler.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
shell-container.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
subprocess.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_become_root.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_can_chroot.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_capture_subprocess_check.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_capture_subprocess.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_chroot.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_copy_file_range.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_descriptor_supports_holes.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_descriptors.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_enter_mount_namespace.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_enter_network_namespace.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_address_family.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_addrinfo.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_dns_packet.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_herrno.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_hostent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_format_netent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_isolate_in_subprocess.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_openpty.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_paths.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_ptrace.c Fix building support_ptrace.c on i686-gnu. 2019-09-19 12:26:18 +02:00
support_quote_blob.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_quote_string.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_record_failure.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_run_diff.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_shared_allocate.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_subprocess.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_test_compare_blob.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_test_compare_failure.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_test_compare_string.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_test_main.c Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
support_test_verify_impl.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support_write_file_string.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support-xfstat.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support-xstat.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
support.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
temp_file-internal.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
temp_file.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
temp_file.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
test-container.c Add wait-for-debugger test harness hooks 2019-10-24 16:32:32 -04:00
test-driver.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
test-driver.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
timespec-add.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
timespec-sub.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
timespec.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
timespec.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
true-container.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_blob_repeat.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_capture_subprocess.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_descriptors.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_format_dns_packet.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_quote_blob.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_quote_string.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_record_failure-2.sh Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support_record_failure.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-support-namespace.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-test_compare_blob.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-test_compare_string.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-test_compare.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-xreadlink.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-xsigstack.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tty.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
write_message.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xaccept4.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xaccept.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xasprintf.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xbind.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xcalloc.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xchroot.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xclock_gettime.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xclose.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xconnect.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xcopy_file_range.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xdlfcn.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xdlfcn.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xdlmopen.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xdup2.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xfclose.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xfopen.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xfork.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xftruncate.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xgetsockname.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xlisten.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xlseek.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmalloc.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmemstream.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmemstream.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmkdir.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmkdirp.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmmap.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmprotect.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xmunmap.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xopen.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpipe.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpoll.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xposix_memalign.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xposix_spawn_file_actions_addclose.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xposix_spawn_file_actions_adddup2.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xposix_spawn.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_setdetachstate.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_setguardsize.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_setstack.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_attr_setstacksize.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrier_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrier_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrier_wait.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrierattr_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrierattr_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_barrierattr_setpshared.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_cancel.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_check_return.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_cond_wait.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_create.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_detach.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_join.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutex_consistent.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutex_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutex_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutex_lock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutex_unlock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_setprotocol.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_setpshared.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_setrobust.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_mutexattr_settype.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_once.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlock_destroy.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlock_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlock_rdlock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlock_unlock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlock_wrlock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlockattr_init.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_rwlockattr_setkind_np.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_sigmask.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_spin_lock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xpthread_spin_unlock.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xptrace.h Add UNSUPPORTED check in elf/tst-pldd. 2019-09-18 12:42:39 +02:00
xraise.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xreadlink.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xrealloc.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xrecvfrom.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsendto.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsetsockopt.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsigaction.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsignal.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsignal.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsigstack.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsocket.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsocket.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xspawn.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xstdio.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xstrdup.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xstrndup.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsymlink.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xsysconf.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xthread.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xtime.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xunistd.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xunlink.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xwaitpid.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xwrite.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00

This subdirectory contains infrastructure which is not put into
installed libraries, but may be linked into programs (installed or
not) and tests.

# Error-checking wrappers

These wrappers test for error return codes an terminate the process on
error.  They are declared in these header files:

* support.h
* xsignal.h
* xthread.h
* xtime.h

In general, new wrappers should be added to support.h if possible.
However, support.h must remain fully compatible with C90 and therefore
cannot include headers which use identifers not reserved in C90.  If
the wrappers need additional types, additional headers such as
signal.h need to be introduced.

# Test framework

The test framework provides a main program for tests, including a
timeout for hanging tests.  See README-testing.c for a minimal
example, and test-driver.c for details how to use it.  The following
header files provide related declarations:

* check.h
* temp_file.h
* test-driver.h

For tests that make use of struct timespec, the following header files
contain additional macros and helper functions:

* timespec.h