Commit d35af63c authored by Paul Eggert's avatar Paul Eggert
Browse files

Support higher-resolution time stamps.

Fixes: debbugs:9000
parent f143bfe3
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
* configure.in (gl_ASSERT_NO_GNULIB_POSIXCHECK)
(gl_ASSERT_NO_GNULIB_TESTS, gl_INIT): Move these up earlier, so
that the new clock stuff doesn't clash with RSVG_LIBS.
(AC_CHECK_HEADERS): Don't check for sys/select.h, sys/time.h, utime.h,
as gnulib does that for us now.
(emacs_cv_struct_utimbuf, HAVE_STRUCT_UTIMBUF, HAVE_TIMEVAL)
(GETTIMEOFDAY_ONE_ARGUMENT): Remove; gnulib does these now.
(AC_CHECK_FUNCS): Remove utimes; no longer needed.
* lib/dtotimespec.c, lib/gettime.c, lib/gettimeofday.c, lib/pselect.c:
* lib/stat-time.h, lib/sys_select.in.h, lib/sys_time.in.h:
* lib/timespec-add.c, lib/timespec-sub.c, lib/timespec.h:
* lib/utimens.c, lib/utimens.h, m4/clock_time.m4, m4/gettime.m4:
* m4/gettimeofday.m4, m4/pselect.m4, m4/stat-time.m4:
* m4/sys_select_h.m4, m4/sys_socket_h.m4, m4/sys_time_h.m4:
* m4/timespec.m4, m4/utimbuf.m4, m4/utimens.m4, m4/utimes.m4:
New files, copied automatically from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Merge from gnulib.
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib.
......
......@@ -160,11 +160,9 @@ HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
HAVE_TCATTR
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
HAVE_UNISTD_H
HAVE_UTIMES
HAVE_UTIME_H
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
......
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
* merge-gnulib (GNULIB_MODULES): Add dtotimespec, gettime,
gettimeofday, pselect, stat-time, sys_time, time, timespec-add,
timespec-sub, utimens.
(GNULIB_TOOL_FLAGS): Add --avoid=select --avoid=sigprocmask.
This trims down the gnulib import, from the very latest gnulib.
Emacs does its own implementation of 'select' and 'sigprocmask'
on Windows, and it assumes 'select' and 'sigprocmask' on non-Windows
hosts, so it doesn't need these modules.
Similarly, avoid errno, fcntl, fcntl-h, fstat, and sys_types, as
these gnulib modules are only for Windows porting and Emacs ports
to Windows in a different way.
2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
* make-emacs: Rename --union-type to --check-lisp-type. Define
......
......@@ -28,16 +28,20 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
GNULIB_MODULES='
alloca-opt
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
dtoastr dup2
filemode getloadavg getopt-gnu ignore-value intprops largefile lstat
manywarnings mktime pthread_sigmask readlink
socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
dtoastr dtotimespec dup2
filemode getloadavg getopt-gnu gettime gettimeofday
ignore-value intprops largefile lstat
manywarnings mktime pselect pthread_sigmask readlink
socklen stat-time stdarg stdio strftime strtoimax strtoumax symlink sys_stat
sys_time time timespec-add timespec-sub utimens
warnings
'
GNULIB_TOOL_FLAGS='
--avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat
--avoid=msvc-inval --avoid=msvc-nothrow
--avoid=raise --avoid=threadlib
--avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types
--avoid=threadlib
--conditional-dependencies --import --no-changelog --no-vc-files
--makefile-name=gnulib.mk
'
......
......@@ -1069,6 +1069,13 @@ case $opsys in
esac
# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might
# for example add -lrt to RSVG_LIBS, which would then cause gnulib to
# incorrectly conclude that -lrt is not needed to link clock_gettime.
gl_ASSERT_NO_GNULIB_POSIXCHECK
gl_ASSERT_NO_GNULIB_TESTS
gl_INIT
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dnl This function definition taken from Gnome 2.0
......@@ -1211,26 +1218,6 @@ if test $ac_cv_have_decl_sys_siglist != yes; then
fi
AC_HEADER_SYS_WAIT
dnl Some systems have utime.h but don't declare the struct anyplace.
AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif]], [[static struct utimbuf x; x.actime = x.modtime;]])],
emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
if test $emacs_cv_struct_utimbuf = yes; then
AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.])
fi
dnl Check for speed_t typedef.
AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <termios.h>]], [[speed_t x = 1;]])],
......@@ -1240,23 +1227,6 @@ if test $emacs_cv_speed_t = yes; then
[Define to 1 if `speed_t' is declared by <termios.h>.])
fi
AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
HAVE_TIMEVAL=$emacs_cv_struct_timeval
if test $emacs_cv_struct_timeval = yes; then
AC_DEFINE(HAVE_TIMEVAL, 1, [Define to 1 if `struct timeval' is declared by <sys/time.h>.])
fi
AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
[[static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;]])],
......@@ -3019,33 +2989,6 @@ if test $emacs_cv_localtime_cache = yes; then
[Define to 1 if localtime caches TZ.])
fi
if test "x$HAVE_TIMEVAL" = xyes; then
AC_CHECK_FUNCS(gettimeofday)
if test $ac_cv_func_gettimeofday = yes; then
AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
emacs_cv_gettimeofday_two_arguments,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif]],
[[struct timeval time;
gettimeofday (&time, 0);]])],
emacs_cv_gettimeofday_two_arguments=yes,
emacs_cv_gettimeofday_two_arguments=no)])
if test $emacs_cv_gettimeofday_two_arguments = no; then
AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1,
[Define to 1 if gettimeofday accepts only one argument.])
fi
fi
fi
ok_so_far=yes
AC_CHECK_FUNC(socket, , ok_so_far=no)
if test $ok_so_far = yes; then
......@@ -3118,7 +3061,7 @@ case $opsys in
esac
dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
case $opsys in
hpux* | irix6-5 | openbsd | sol2* | unixware )
AC_DEFINE(BROKEN_SIGIO, 1, [Define if SIGIO should not be used.])
......@@ -3376,11 +3319,6 @@ AC_SUBST(CYGWIN_OBJ)
AC_SUBST(PRE_ALLOC_OBJ)
AC_SUBST(POST_ALLOC_OBJ)
# Configure gnulib here, now that we know LIBS.
gl_ASSERT_NO_GNULIB_POSIXCHECK
gl_ASSERT_NO_GNULIB_TESTS
gl_INIT
case "$opsys" in
aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
......
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
* os.texi (Time of Day, Time Parsing, Processor Run Time, Idle Timers):
* processes.texi (System Processes):
Time stamp resolution is now picosecond, not microsecond.
2012-06-21 Glenn Morris <rgm@gnu.org>
* Makefile.in: Rename infodir to buildinfodir throughout. (Bug#11737)
......
......@@ -1166,7 +1166,9 @@ The value may be a floating point number.
zone.
@cindex epoch
Most of these functions represent time as a list of either three
Most of these functions represent time as a list of either four
integers, @code{(@var{sec-high} @var{sec-low} @var{microsec}
@var{picosec})}, or of three
integers, @code{(@var{sec-high} @var{sec-low} @var{microsec})}, or of
two integers, @code{(@var{sec-high} @var{sec-low})}. The integers
@var{sec-high} and @var{sec-low} give the high and low bits of an
......@@ -1181,12 +1183,15 @@ is the number of seconds from the @dfn{epoch} (0:00 January 1, 1970
UTC) to the specified time. The third list element @var{microsec}, if
present, gives the number of microseconds from the start of that
second to the specified time.
Similarly, the fourth list element @var{picosec}, if present, gives
the number of picoseconds from the start of that microsecond to the
specified time.
The return value of @code{current-time} represents time using three
integers, while the timestamps in the return value of
@code{file-attributes} use two integers (@pxref{Definition of
integers, as do the timestamps in the return value of
@code{file-attributes} (@pxref{Definition of
file-attributes}). In function arguments, e.g.@: the @var{time-value}
argument to @code{current-time-string}, both two- and three-integer
argument to @code{current-time-string}, two-, three-, and four-integer
lists are accepted. You can convert times from the list
representation into standard human-readable strings using
@code{current-time}, or to other forms using the @code{decode-time}
......@@ -1216,9 +1221,12 @@ The argument @var{time-value}, if given, specifies a time to format
@end defun
@defun current-time
This function returns the current time, represented as a list of three
integers @code{(@var{sec-high} @var{sec-low} @var{microsec})}. On
systems with only one-second time resolutions, @var{microsec} is 0.
This function returns the current time, represented as a list of four
integers @code{(@var{sec-high} @var{sec-low} @var{microsec} @var{picosec})}.
These integers have trailing zeros on systems that return time with
lower resolutions. On all current machines @var{picosec} is a
multiple of 1000, but this may change as higher-resolution clocks
become available.
@end defun
@defun float-time &optional time-value
......@@ -1259,7 +1267,7 @@ time zone.
@node Time Conversion
@section Time Conversion
These functions convert time values (lists of two or three integers,
These functions convert time values (lists of two to four integers,
as explained in the previous section) into calendrical information and
vice versa.
......@@ -1410,8 +1418,6 @@ This stands for a newline.
This stands for the nanoseconds (000000000-999999999). To ask for
fewer digits, use @samp{%3N} for milliseconds, @samp{%6N} for
microseconds, etc. Any excess digits are discarded, without rounding.
Currently Emacs time stamps are at best microsecond resolution so the
last three digits generated by plain @samp{%N} are always zero.
@item %p
This stands for @samp{AM} or @samp{PM}, as appropriate.
@item %r
......@@ -1563,18 +1569,9 @@ When called interactively, it prints the uptime in the echo area.
@defun get-internal-run-time
This function returns the processor run time used by Emacs as a list
of three integers: @code{(@var{high} @var{low} @var{microsec})}. The
integers @var{high} and @var{low} combine to give the number of
seconds, which is
@ifnottex
@var{high} * 2**16 + @var{low}.
@end ifnottex
@tex
$high*2^{16}+low$.
@end tex
The third element, @var{microsec}, gives the microseconds (or 0 for
systems that return time with the resolution of only one second).
of four integers: @code{(@var{high} @var{low} @var{microsec}
@var{picosec})}, using the same format as @code{current-time}
(@pxref{Time of Day}).
Note that the time returned by this function excludes the time Emacs
was not using the processor, and if the Emacs process has several
......@@ -1817,10 +1814,9 @@ set up to repeat will subsequently run another time, one by one.
@defun current-idle-time
If Emacs is idle, this function returns the length of time Emacs has
been idle, as a list of three integers: @code{(@var{sec-high}
@var{sec-low} @var{microsec})}, where @var{high} and @var{low} are the
high and low bits for the number of seconds and @var{microsec} is the
additional number of microseconds (@pxref{Time of Day}).
been idle, as a list of four integers: @code{(@var{sec-high}
@var{sec-low} @var{microsec} @var{picosec})}, using the same format as
@code{current-time} (@pxref{Time of Day}).
When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
This is a convenient way to test whether Emacs is idle.
......
......@@ -1770,7 +1770,7 @@ faults for all the child processes of the given process.
@item utime
Time spent by the process in the user context, for running the
application's code. The corresponding @var{value} is in the
@w{@code{(@var{high} @var{low} @var{microsec})}} format, the same
@w{@code{(@var{high} @var{low} @var{microsec} @var{picosec})}} format, the same
format used by functions @code{current-time} (@pxref{Time of Day,
current-time}) and @code{file-attributes} (@pxref{File Attributes}).
......@@ -1801,12 +1801,12 @@ The number of threads in the process.
@item start
The time when the process was started, in the same
@w{@code{(@var{high} @var{low} @var{microsec})}} format used by
@w{@code{(@var{high} @var{low} @var{microsec} @var{picosec})}} format used by
@code{current-time} and by @code{file-attributes}.
@item etime
The time elapsed since the process started, in the @w{@code{(@var{high}
@var{low} @var{microsec})}} format.
@var{low} @var{microsec} @var{picosec})}} format.
@item vsize
The virtual memory size of the process, measured in kilobytes.
......
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
* NEWS: Mention addition of picoseconds to time stamp format.
2012-06-13 Deniz Dogan <deniz@dogan.se>
* tutorials/TUTORIAL.sv: Fix grammar and a couple of typos.
......
......@@ -64,6 +64,13 @@ been adding them there, put them somewhere else, eg site-lisp.
* Changes in Emacs 24.2
** The function `current-time' now returns extended-format time stamps
(HIGH LOW USEC PSEC) that use picosecond resolution; the PSEC
component is new. PSEC is typically a multiple of 1000 on current
machines. Other functions that use this format, such as
file-attributes and format-time-string, have been changed accordingly.
Old-format time stamps are still accepted.
** New functions `system-users', `system-groups' return lists of the user
name, group names known to the system (where possible).
......
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
* Makefile.in (LIB_CLOCK_GETTIME): New macro.
(profile${EXEEXT}): Use it.
* profile.c: Include inttyeps.h, intprops.h.
(time_string): Size conservatively; do not guess size.
(get_time): Now prints nanoseconds.
(gettimeofday): Remove replacement function; gnulib now does this.
2012-06-08 Andreas Schwab <schwab@linux-m68k.org>
* make-docfile.c (search_lisp_doc_at_eol): Unget last read
......
......@@ -159,6 +159,8 @@ LIBHESIOD=@LIBHESIOD@
LIBRESOLV=@LIBRESOLV@
## -llockfile if HAVE_LIBLOCKFILE or -lmail if HAVE_LIBMAIL
LIBS_MAIL=@LIBS_MAIL@
## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
## Extra libraries to use when linking movemail.
LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
......@@ -309,7 +311,8 @@ ctags${EXEEXT}: etags${EXEEXT}
regex.o $(LOADLIBES) -o ctags
profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
$(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile
make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \
......
......@@ -29,12 +29,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
** operations: reset_watch, get_time
*/
#include <config.h>
#include <inttypes.h>
#include <stdio.h>
#include <intprops.h>
#include <systime.h>
static EMACS_TIME TV1, TV2;
static int watch_not_started = 1; /* flag */
static char time_string[30];
static char time_string[INT_STRLEN_BOUND (uintmax_t) + sizeof "."
+ LOG10_EMACS_TIME_RESOLUTION];
/* Reset the stopwatch to zero. */
......@@ -46,36 +51,23 @@ reset_watch (void)
}
/* This call returns the time since the last reset_watch call. The time
is returned as a string with the format <seconds>.<micro-seconds>
is returned as a string with the format <seconds>.<nanoseconds>
If reset_watch was not called yet, exit. */
static char *
get_time (void)
{
uintmax_t s;
int ns;
if (watch_not_started)
exit (EXIT_FAILURE); /* call reset_watch first ! */
EMACS_GET_TIME (TV2);
EMACS_SUB_TIME (TV2, TV2, TV1);
sprintf (time_string, "%lu.%06lu", (unsigned long)EMACS_SECS (TV2), (unsigned long)EMACS_USECS (TV2));
s = EMACS_SECS (TV2);
ns = EMACS_NSECS (TV2);
sprintf (time_string, "%"PRIuMAX".%0*d", s, LOG10_EMACS_TIME_RESOLUTION, ns);
return time_string;
}
#if ! defined (HAVE_GETTIMEOFDAY) && defined (HAVE_TIMEVAL)
/* ARGSUSED */
gettimeofday (tp, tzp)
struct timeval *tp;
struct timezone *tzp;
{
extern long time ();
tp->tv_sec = time ((long *)0);
tp->tv_usec = 0;
if (tzp != 0)
tzp->tz_minuteswest = -1;
}
#endif
int
main (void)
......
......@@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops largefile lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdarg stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
MOSTLYCLEANFILES += core *.stackdump
......@@ -123,6 +123,12 @@ EXTRA_libgnu_a_SOURCES += ftoastr.c
## end gnulib module dtoastr
## begin gnulib module dtotimespec
libgnu_a_SOURCES += dtotimespec.c
## end gnulib module dtotimespec
## begin gnulib module dup2
......@@ -184,6 +190,21 @@ libgnu_a_SOURCES += gettext.h
endif
## end gnulib module gettext-h
## begin gnulib module gettime
libgnu_a_SOURCES += gettime.c
## end gnulib module gettime
## begin gnulib module gettimeofday
EXTRA_DIST += gettimeofday.c
EXTRA_libgnu_a_SOURCES += gettimeofday.c
## end gnulib module gettimeofday
## begin gnulib module ignore-value
......@@ -269,6 +290,15 @@ EXTRA_DIST += pathmax.h
## end gnulib module pathmax
## begin gnulib module pselect
EXTRA_DIST += pselect.c
EXTRA_libgnu_a_SOURCES += pselect.c
## end gnulib module pselect
## begin gnulib module pthread_sigmask
......@@ -329,17 +359,6 @@ EXTRA_DIST += signal.in.h
## end gnulib module signal-h
## begin gnulib module sigprocmask
if gl_GNULIB_ENABLED_sigprocmask
endif
EXTRA_DIST += sigprocmask.c
EXTRA_libgnu_a_SOURCES += sigprocmask.c
## end gnulib module sigprocmask
## begin gnulib module snippet/_Noreturn
# Because this Makefile snippet defines a variable used by other
......@@ -432,6 +451,13 @@ EXTRA_libgnu_a_SOURCES += stat.c
## end gnulib module stat
## begin gnulib module stat-time
EXTRA_DIST += stat-time.h
## end gnulib module stat-time
## begin gnulib module stdalign
BUILT_SOURCES += $(STDALIGN_H)
......@@ -871,6 +897,40 @@ EXTRA_libgnu_a_SOURCES += symlink.c
## end gnulib module symlink
## begin gnulib module sys_select
BUILT_SOURCES += sys/select.h
# We need the following in order to create <sys/select.h> when the system
# doesn't have one that works with the given compiler.
sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
-e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
-e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
-e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
-e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
-e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_select.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += sys/select.h sys/select.h-t
MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_select.in.h
## end gnulib module sys_select
## begin gnulib module sys_stat
BUILT_SOURCES += sys/stat.h
......@@ -933,30 +993,39 @@ EXTRA_DIST += sys_stat.in.h
## end gnulib module sys_stat
## begin gnulib module sys_types
## begin gnulib module sys_time
BUILT_SOURCES += sys/types.h
BUILT_SOURCES += sys/time.h
# We need the following in order to create <sys/types.h> when the system
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
sys/types.h: sys_types.in.h $(top_builddir)/config.status
sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
< $(srcdir)/sys_types.in.h; \
-e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
-e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
-e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
-e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
-e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_time.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += sys/types.h sys/types.h-t
MOSTLYCLEANFILES += sys/time.h sys/time.h-t
EXTRA_DIST += sys_types.in.h
EXTRA_DIST += sys_time.in.h
## end gnulib module sys_types
## end gnulib module sys_time
## begin gnulib module time
......@@ -1009,6 +1078,25 @@ EXTRA_libgnu_a_SOURCES += time_r.c
## end gnulib module time_r
## begin gnulib module timespec
EXTRA_DIST += timespec.h