[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108721: Improve port of struct times
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108721: Improve port of struct timespec to MS-Windows. |
Date: |
Sun, 24 Jun 2012 20:21:20 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108721
fixes bug: http://debbugs.gnu.org/9000
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2012-06-24 20:21:20 +0300
message:
Improve port of struct timespec to MS-Windows.
lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)):
($(BLD)/timespec-add.$(O)):
($(BLD)/timespec-sub.$(O)): Don't depend on
$(EMACS_ROOT)/nt/inc/sys/time.h.
lib/stat-time.h:
lib/timespec.h:
lib/utimens.h: Revert last change.
src/makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
(SYSTIME_H): Add nt/inc/sys/time.h.
src/systime.h [WINDOWSNT]: Include sys/time.h.
src/s/ms-w32.h (struct timespec): Definition moved from
nt/inc/sys/time.h. Suggested by Paul Eggert <address@hidden>.
nt/inc/sys/time.h (struct timespec): Don't define it here, it is
now defined in src/s/ms-w32.h.
modified:
ChangeLog
lib/makefile.w32-in
lib/stat-time.h
lib/timespec.h
lib/utimens.h
nt/ChangeLog
nt/inc/sys/time.h
src/ChangeLog
src/makefile.w32-in
src/s/ms-w32.h
src/systime.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-23 17:25:56 +0000
+++ b/ChangeLog 2012-06-24 17:21:20 +0000
@@ -1,3 +1,14 @@
+2012-06-24 Eli Zaretskii <address@hidden>
+
+ * lib/makefile.w32-in ($(BLD)/dtotimespec.$(O)):
+ ($(BLD)/timespec-add.$(O)):
+ ($(BLD)/timespec-sub.$(O)): Don't depend on
+ $(EMACS_ROOT)/nt/inc/sys/time.h.
+
+ * lib/stat-time.h:
+ * lib/timespec.h:
+ * lib/utimens.h: Revert last change.
+
2012-06-23 Paul Eggert <address@hidden>
Merge from gnulib.
=== modified file 'lib/makefile.w32-in'
--- a/lib/makefile.w32-in 2012-06-23 10:22:59 +0000
+++ b/lib/makefile.w32-in 2012-06-24 17:21:20 +0000
@@ -77,7 +77,6 @@
$(SRC)/dtotimespec.c \
$(SRC)/intprops.h \
$(SRC)/timespec.h \
- $(EMACS_ROOT)/nt/inc/sys/time.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
@@ -126,7 +125,6 @@
$(SRC)/timespec-add.c \
$(SRC)/intprops.h \
$(SRC)/timespec.h \
- $(EMACS_ROOT)/nt/inc/sys/time.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
@@ -135,7 +133,6 @@
$(SRC)/timespec-sub.c \
$(SRC)/intprops.h \
$(SRC)/timespec.h \
- $(EMACS_ROOT)/nt/inc/sys/time.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
=== modified file 'lib/stat-time.h'
--- a/lib/stat-time.h 2012-06-23 10:22:59 +0000
+++ b/lib/stat-time.h 2012-06-24 17:21:20 +0000
@@ -22,7 +22,6 @@
#include <sys/stat.h>
#include <time.h>
-#include <sys/time.h>
/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST,
=== modified file 'lib/timespec.h'
--- a/lib/timespec.h 2012-06-23 10:22:59 +0000
+++ b/lib/timespec.h 2012-06-24 17:21:20 +0000
@@ -20,7 +20,6 @@
# define TIMESPEC_H
# include <time.h>
-# include <sys/time.h>
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
=== modified file 'lib/utimens.h'
--- a/lib/utimens.h 2012-06-23 10:22:59 +0000
+++ b/lib/utimens.h 2012-06-24 17:21:20 +0000
@@ -1,5 +1,4 @@
#include <time.h>
-#include <sys/time.h>
int fdutimens (int, char const *, struct timespec const [2]);
int utimens (char const *, struct timespec const [2]);
int lutimens (char const *, struct timespec const [2]);
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2012-06-23 10:22:59 +0000
+++ b/nt/ChangeLog 2012-06-24 17:21:20 +0000
@@ -1,3 +1,8 @@
+2012-06-24 Eli Zaretskii <address@hidden>
+
+ * inc/sys/time.h (struct timespec): Don't define it here, it is
+ now defined in src/s/ms-w32.h.
+
2012-06-23 Eli Zaretskii <address@hidden>
Fix the MS-Windows build broken by revno 108687.
=== modified file 'nt/inc/sys/time.h'
--- a/nt/inc/sys/time.h 2012-06-23 10:22:59 +0000
+++ b/nt/inc/sys/time.h 2012-06-24 17:21:20 +0000
@@ -17,12 +17,6 @@
int tz_dsttime; /* type of dst correction */
};
-struct timespec
-{
- time_t tv_sec; /* seconds */
- long int tv_nsec; /* nanoseconds */
-};
-
void gettimeofday (struct timeval *, struct timezone *);
#endif /* SYS_TIME_H_INCLUDED */
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-24 04:11:19 +0000
+++ b/src/ChangeLog 2012-06-24 17:21:20 +0000
@@ -1,3 +1,13 @@
+2012-06-24 Eli Zaretskii <address@hidden>
+
+ * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
+ (SYSTIME_H): Add nt/inc/sys/time.h.
+
+ * systime.h [WINDOWSNT]: Include sys/time.h.
+
+ * s/ms-w32.h (struct timespec): Definition moved from
+ nt/inc/sys/time.h. Suggested by Paul Eggert <address@hidden>.
+
2012-06-24 Paul Eggert <address@hidden>
Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
=== modified file 'src/makefile.w32-in'
--- a/src/makefile.w32-in 2012-06-23 19:28:01 +0000
+++ b/src/makefile.w32-in 2012-06-24 17:21:20 +0000
@@ -390,10 +390,10 @@
GNU_LIB = $(EMACS_ROOT)/lib
NT_INC = $(EMACS_ROOT)/nt/inc
-TIMESPEC_H = $(GNU_LIB)/timespec.h \
- $(NT_INC)/sys/time.h
+TIMESPEC_H = $(GNU_LIB)/timespec.h
SYSTIME_H = $(SRC)/systime.h \
- $(TIMESPEC_H)
+ $(TIMESPEC_H) \
+ $(NT_INC)/sys/time.h
ATIMER_H = $(SRC)/atimer.h \
$(SYSTIME_H)
BLOCKINPUT_H = $(SRC)/blockinput.h \
=== modified file 'src/s/ms-w32.h'
--- a/src/s/ms-w32.h 2012-06-23 10:22:59 +0000
+++ b/src/s/ms-w32.h 2012-06-24 17:21:20 +0000
@@ -296,6 +296,15 @@
#define utime _utime
#endif
+/* 'struct timespec' is used by time-related functions in lib/ and
+ elsewhere, but we don't use lib/time.h where the structure is
+ defined. */
+struct timespec
+{
+ time_t tv_sec; /* seconds */
+ long int tv_nsec; /* nanoseconds */
+};
+
/* This is hacky, but is necessary to avoid warnings about macro
redefinitions using the SDK compilers. */
#ifndef __STDC__
=== modified file 'src/systime.h'
--- a/src/systime.h 2012-06-22 21:17:42 +0000
+++ b/src/systime.h 2012-06-24 17:21:20 +0000
@@ -38,6 +38,10 @@
#endif
#endif
#endif
+
+#ifdef WINDOWSNT
+#include <sys/time.h> /* for 'struct timeval' */
+#endif
/* The type to use to represent temporal intervals. It can be passed
as the timeout argument to the pselect system call. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108721: Improve port of struct timespec to MS-Windows.,
Eli Zaretskii <=