summaryrefslogtreecommitdiff
path: root/modules/timespec
Commit message (Collapse)AuthorAgeFilesLines
* timespec: remove dependence on ‘verify’Paul Eggert2020-07-241-1/+0
| | | | | * lib/timespec.h: Do not include verify.h; no longer needed. * modules/timespec (Depends-on): Remove ‘verify’.
* timespec: new function current_timespecPaul Eggert2018-09-161-0/+1
| | | | | | | | | | | | | * lib/gettime.c (gettime): Prefer clock_gettime to nanotime, and don’t worry about it failing on a CLOCK_REALTIME arg. POSIX requires it to succeed and I don’t know of any counterexamples where the fallbacks would work. (current_timespec): New function, taken from Emacs. It is more convenient than gettime, and can help register allocation. * lib/timespec.h: Include arg-nonnull.h. (current_timespec): New declaration. (gettime, settime): Declare args to be nonnull. * modules/timespec (Depends-on): Add snippet/arg-nonnull.
* timespec: prefer ‘assume’ to ‘assure’Paul Eggert2017-10-291-1/+1
| | | | | | | | | | | | This avoids some runtime tests. The rest of the module makes similar assumptions and there is little point to testing here. * lib/timespec.h: Include verify.h instead of assure.h. (timespec_cmp): Use ‘assume’, not ‘assure’. Also, remove an unnecessary cast to ‘int’, as lots of other code in this module now causes -Wconversion to complain, and this is a problem with -Wconversion not with the code. * modules/timespec (Depends-on): Depend on ‘verify’, not ‘assure’.
* timespec.h: use "assure" to avoid a spurious warningJim Meyering2017-10-291-0/+1
| | | | | | | | * lib/timespec.h: Include "assure.h" and use it to help gcc7's -Wstrict-overflow avoid a false positive warning for a use in coreutils' ls.c. Suggested by Paul Eggert in https://lists.gnu.org/r/bug-gnulib/2017-10/msg00007.html * modules/timespec (Depends-on): Add assure.
* gettime, timespec, utimens: Relicense under LGPL.Bruno Haible2016-10-151-1/+1
| | | | | | * modules/gettime (License): Change to LGPL. * modules/timespec (License): Likewise. * modules/utimens (License): Likewise.
* timespec: use extern-inlinePaul Eggert2012-08-011-0/+3
| | | | | | | | | * lib/timespec.c: New file. * lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (_GL_TIMESPEC_INLINE): New macro. Use it instead of 'static inline'. * modules/timespec (Files): Add lib/timespec.c. (Depends-on): Add extern-inline. (lib_SOURCES): Add timespec.c.
* New module 'time', so that apps can include <time.h> as perPaul Eggert2007-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX and GNU instead of separate include files like time_r.h and timegm.h. This implementation tries out a simpler approach for replacing decls in standard include files (as compared to the string module), somewhat as an experiment. * config/srclist.txt: Comment out mktime.c for now. * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example since it doesn't apply any more. Use generic wording instead. * MODULES.html.sh (Support for systems lacking POSIX:2001): New module 'time'. * lib/time_.h, m4/time_h.m4, modules/time: New files. * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove. * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H. Don't include <sys/types.h>; no longer needed since we assume C89. * lib/mktime.c: Don't include "time_r.h"; no longer needed. * lib/strftime.c: Likewise. * lib/time_r.c: Likewise. * lib/nanosleep.c (nanosleep): #undef after include files, not before. * lib/nanosleep.c: Include <time.h> first, to check interface. * lib/strptime.c: Likewise. * lib/time_r.c: Likewise. * lib/timegm.c: Likewise. * lib/strptime.c: Don't include strptime.h or time_r.h; no longer needed. * lib/timegm.c: Don't include timegm.h; no longer needed. * lib/timespec.h: Don't include <sys/time.h> before <time.h>; time.h now handles any problems in that area. (struct timespec, nanosleep): Remove; time.h now arranges for these. * lib/xnanosleep.c: Don't include timespec.h; no longer needed now that time.h defines struct timespec. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared. Set REPLACE_NANOSLEEP. Don't AC_DEFINE nanosleep; the time module now handles that. * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME. * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer needed. Set REPLACE_LOCALTIME. * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM. * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4. (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or nanosleep; time_h.m4 now does that. Don't require gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time module handles this now. * modules/getdate (Depends-on): Remove timespec. Add time. * modules/nanosleep (Depends-on): Likewise. * modules/stat-time (Depends-on): Likewise. * modules/nanosleep (Include): Include time.h, not timespec.h. * modules/strptime (Files): Remove lib/strptime.h. (Depends-on): Add extensions, time. (Include): Include time.h, not strptime.h. * modules/time_r (Files): Remove lib/time_r.h. (Depends-on): Add time. (Include): Include time.h, not time_r.h. * modules/timegm: Likewise. * modules/timespec (Description): Now does timespec-related decls of our own, instead of struct timespec itself. (Depends-on): Add time; remove extensions. (Maintainer): Add self. * modules/utimecmp (Depends-on): Add time; remove timespec. * modules/utimens (Depends-on): Likewise. * modules/xnanosleep (Depends-on): Likewise.
* gnulib-tool now synthesizes the EXTRA_DIST line.Bruno Haible2006-10-131-1/+0
|
* Avoid the need for AC_LIBSOURCES in m4 macros.Paul Eggert2006-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/acl (EXTRA_DIST): Add acl.h. * modules/argmatch (Files): Add m4/argmatch.m4. (configure.ac): Add gl_ARGMATCH. (EXTRA_DIST): Renamed from lib_SOURCES, for consistency with the other modules. Remove argmatch.c. * modules/backupfile (EXTRA_DIST): Add backupfile.h. * modules/c-strtod (EXTRA_DIST): Add c-strtod.h. * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h. * modules/canonhost (EXTRA_DIST): Add c-canonhost.h. * modules/canonicalize (EXTRA_DIST): Add canonicalize.h. * modules/chdir-long (EXTRA_DIST): Add chdir-long.h. * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h. * modules/cloexec (EXTRA_DIST): Add cloexec.h. * modules/close-stream (EXTRA_DIST): Add close-stream.h. * modules/closeout (EXTRA_DIST): Add closeout.h. * modules/cycle-check (EXTRA_DIST): Add cycle-check.h. * modules/dev-ino (EXTRA_DIST): Add dev-ino.h. * modules/dirfd (EXTRA_DIST): Add dirfd.h. * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES. Add dirname.h; remove basename.c and stripslash.c. * modules/exclude (EXTRA_DIST): Add exclude.h. * modules/exitfail (EXTRA_DIST): Add exitfail.h. * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h. * modules/file-type (EXTRA_DIST): Add file-type.h. * modules/filemode (EXTRA_DIST): Add filemode.h. * modules/filenamecat (EXTRA_DIST): Add filenamecat.h. * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h. * modules/fpending (EXTRA_DIST): Add __fpending.h. * modules/fprintftime (EXTRA_DIST): Add fprintftime.h. * modules/fsusage (EXTRA_DIST): Add fsusage.h. * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c. * modules/getcwd (EXTRA_DIST): Add getcwd.h. * modules/getdate (EXTRA_DIST): Add getdate.c. * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h. * modules/getpagesize (EXTRA_DIST): Add getpagesize.h. * modules/getpass (EXTRA_DIST): Add getpass.h. * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h. * modules/group-member (EXTRA_DIST): Add group-member.h. * modules/hard-locale (EXTRA_DIST): Add hard-locale.h. * modules/hash (EXTRA_DIST): Add hash.h. * modules/human (EXTRA_DIST): Add human.h. * modules/inttypes (EXTRA_DIST): Add inttypes.h. * modules/lchmod (EXTRA_DIST): Add lchmod.h. * modules/lchown (EXTRA_DIST): Add lchown.h. * modules/long-options (EXTRA_DIST): Add long-options.h. * modules/lstat (EXTRA_DIST): Add lstat.h. * modules/md5 (EXTRA_DIST): Add memcasecmp.h. * modules/memcoll (EXTRA_DIST): Add memcoll.h. * modules/mempcpy (EXTRA_DIST): Add mempcpy.h. * modules/memrchr (EXTRA_DIST): Add memrchr.h. * modules/memxor (EXTRA_DIST): Add memxor.h. * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h. * modules/mkdir-p (EXTRA_DIST): Add modechange.h. * modules/mountlist (EXTRA_DIST): Add mountlist.h. * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h. * modules/pathmax (EXTRA_DIST): Add pathmax.h. * modules/physmem (EXTRA_DIST): Add physmem.h. * modules/posixtm (EXTRA_DIST): Add posixtm.h. * modules/posixver (EXTRA_DIST): Add posixver.h. * modules/quote (EXTRA_DIST): Add quote.h. * modules/quotearg (EXTRA_DIST): Add quotearg.h. * modules/readtokens (EXTRA_DIST): Add readtokens.h. * modules/readutmp (EXTRA_DIST): Add readutmp.h. * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c regex_internal.h regexec.c. * modules/safe-read (EXTRA_DIST): Add safe-read.h. * modules/safe-write (EXTRA_DIST): Add safe-write.h. * modules/same (EXTRA_DIST): Add same.h. * modules/same-inode (EXTRA_DIST): Add same-inode.h. * modules/save-cwd (EXTRA_DIST): Add save-cwd.h. * modules/savedir (EXTRA_DIST): Add savedir.h. * modules/sha1 (EXTRA_DIST): Add sha1.h. * modules/sig2str (EXTRA_DIST): Add sig2str.h. * modules/stat-macros (EXTRA_DIST): Add stat-macros.h. * modules/stat-time (EXTRA_DIST): Add stat-time.h. * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h. * modules/strdup (EXTRA_DIST): Add strdup.h. * modules/strftime (EXTRA_DIST): Add strftime.h. * modules/strndup (EXTRA_DIST): Add strndup.h. * modules/strnlen (EXTRA_DIST): Add strnlen.h. * modules/strverscmp (EXTRA_DIST): Add strverscmp.h. * modules/time_r (EXTRA_DIST): Add time_r.h. * modules/timespec (EXTRA_DIST): Add timespec.h. * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h. * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h. * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h. * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h. * modules/userspec (EXTRA_DIST): Add userspec.h. * modules/utimecmp (EXTRA_DIST): Add utimecmp.h. * modules/utimens (EXTRA_DIST): Add utimens.h. * modules/xalloc (EXTRA_DIST): Add xalloc.h. * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h. * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h. * modules/xreadlink (EXTRA_DIST): Add xreadlink.h. * modules/xstrtod (EXTRA_DIST): Add xstrtod.h. * modules/xstrtol (EXTRA_DIST): Add xstrtol.h. * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h. * modules/yesno (EXTRA_DIST): Add yesno.h. + * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed. * m4/dev-ino.m4, same-inode.m4: Remove. + * m4/_inttypes_h.m4 (gl_INTTYPES_H): * m4/acl.m4 (AC_FUNC_ACL): * m4/backupfile.m4 (gl_BACKUPFILE): * m4/c-strtod.m4 (gl_C99_STRTOLD): * m4/canon-host.m4 (gl_CANON_HOST): * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): * m4/chdir-safer.m4 (gl_CHDIR_SAFER): * m4/cloexec.m4 (gl_CLOEXEC): * m4/close-stream.m4 (gl_CLOSE_STREAM): * m4/closeout.m4 (gl_CLOSEOUT): * m4/dirfd.m4 (gl_FUNC_DIRFD): * m4/dirname.m4 (gl_DIRNAME): * m4/exclude.m4 (gl_EXCLUDE): * m4/exitfail.m4 (gl_EXITFAIL): * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): * m4/file-type.m4 (gl_FILE_TYPE): * m4/filemode.m4 (gl_FILEMODE): * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT): * m4/fpending.m4 (gl_FUNC_FPENDING): * m4/fprintftime.m4 (gl_FPRINTFTIME): * m4/fts.m4 (gl_FUNC_FTS): * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): * m4/getdate.m4 (gl_GETDATE): * m4/gethrxtime.m4 (gl_GETHRXTIME): * m4/getpagesize.m4 (gl_GETPAGESIZE): * m4/getpass.m4 (gl_FUNC_GETPASS): * m4/gettime.m4 (gl_GETTIME): * m4/getugroups.m4 (gl_GETUGROUPS): * m4/glob.m4 (gl_GLOB_SUBSTITUTE): * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): * m4/hard-locale.m4 (gl_HARD_LOCALE): * m4/hash.m4 (gl_HASH): * m4/idcache.m4 (gl_IDCACHE): * m4/lchmod.m4 (gl_FUNC_LCHMOD): * m4/lchown.m4 (gl_FUNC_LCHOWN): * m4/long-options.m4 (gl_LONG_OPTIONS): * m4/lstat.m4 (gl_FUNC_LSTAT): * m4/md5.m4 (gl_MD5): * m4/memcasecmp.m4 (gl_MEMCASECMP): * m4/memcoll.m4 (gl_MEMCOLL): * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): * m4/memrchr.m4 (gl_FUNC_MEMRCHR): * m4/memxor.m4 (gl_MEMXOR): * m4/mkancesdirs.m4 (gl_MKANCESDIRS): * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): * m4/modechange.m4 (gl_MODECHANGE): * m4/mountlist.m4 (gl_MOUNTLIST): * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): * m4/openat.m4 (gl_FUNC_OPENAT): * m4/pathmax.m4 (gl_PATHMAX): * m4/physmem.m4 (gl_PHYSMEM): * m4/posixtm.m4 (gl_POSIXTM): * m4/posixver.m4 (gl_POSIXVER): * m4/quote.m4 (gl_QUOTE): * m4/quotearg.m4 (gl_QUOTEARG): * m4/readtokens.m4 (gl_READTOKENS): * m4/readutmp.m4 (gl_READUTMP): * m4/regex.m4 (gl_REGEX): * m4/safe-read.m4 (gl_SAFE_READ): * m4/safe-write.m4 (gl_SAFE_WRITE): * m4/same.m4 (gl_SAME): * m4/save-cwd.m4 (gl_SAVE_CWD): * m4/savedir.m4 (gl_SAVEDIR): * m4/settime.m4 (gl_SETTIME): * m4/sha1.m4 (gl_SHA1): * m4/sig2str.m4 (gl_FUNC_SIG2STR): * m4/stat-macros.m4 (gl_STAT_MACROS): * m4/stat-time.m4 (gl_STAT_TIME): * m4/stdio-safer.m4 (gl_FOPEN_SAFER): * m4/stdlib-safer.m4 (gl_STDLIB_SAFER): * m4/strdup.m4 (gl_FUNC_STRDUP): * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): * m4/strndup.m4 (gl_FUNC_STRNDUP): * m4/strnlen.m4 (gl_FUNC_STRNLEN): * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): * m4/time_r.m4 (gl_TIME_R): * m4/timespec.m4 (gl_TIMESPEC): * m4/unistd-safer.m4 (gl_UNISTD_SAFER): * m4/unlinkdir.m4 (gl_UNLINKDIR): * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): * m4/userspec.m4 (gl_USERSPEC): * m4/utimecmp.m4 (gl_UTIMECMP): * m4/utimens.m4 (gl_UTIMENS): * m4/xalloc.m4 (gl_XALLOC): * m4/xgetcwd.m4 (gl_XGETCWD): * m4/xnanosleep.m4 (gl_XNANOSLEEP): * m4/xreadlink.m4 (gl_XREADLINK): * m4/xstrtod.m4 (gl_XSTRTOD): * m2/yesno.m4 (gl_YESNO): Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/ to get the necessary .h files and whatnot.
* * MODULES.html.sh (File system functions): Add stat-time.Paul Eggert2005-09-161-1/+0
| | | | | | | | | | | | | | | * lib/stat-time.h: New file. * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP): (MTIME_CMP, TIMESPEC_NS): Remove. Now done by stat-time.h, in a different way. (timespec_cmp): New function. * m4/st_mtim.m4: Remove. Superseded by... * m4/stat-time.m4: New file. * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE. Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed. * modules/stat-time: New file. * modules/timespec (Files): Remove m4/st_mtim.m4; this is now done in a different way, by the stat-time module.
* Remove lib_SOURCES line from Makefile.am section of modules where thisPaul Eggert2005-03-211-2/+0
| | | | is now done automatically by the corresponding Autoconf macro.
* Add a license tag to every module.Bruno Haible2004-09-221-0/+3
|
* New module 'extensions', used by timespec and unlocked-ioPaul Eggert2003-08-081-0/+1
| | | | for portability to Solaris.
* Add a Maintainer.Bruno Haible2003-01-201-0/+3
|
* Add module descriptions.Bruno Haible2003-01-131-0/+1
|
* Module description.Bruno Haible2002-12-311-0/+18