[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108698: Fix the MS-Windows build bro
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108698: Fix the MS-Windows build broken by revno 108687. |
Date: |
Sat, 23 Jun 2012 13:22:59 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108698
fixes bug: http://debbugs.gnu.org/9000
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-06-23 13:22:59 +0300
message:
Fix the MS-Windows build broken by revno 108687.
nt/inc/sys/time.h (struct timespec): Define.
lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/dtotimespec.$(O),
$(BLD)/gettime.$(O), $(BLD)/timespec-add.$(O), and
$(BLD)/timespec-sub.$(O).
($(BLD)/dtotimespec.$(O)):
($(BLD)/gettime.$(O)):
($(BLD)/timespec-add.$(O)):
($(BLD)/timespec-sub.$(O)): New dependencies.
lib/stat-time.h:
lib/timespec.h:
lib/utimens.h: Include sys/time.h
src/w32.c (fdutimens): New function.
src/w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
src/s/ms-w32.h (pselect): Redirect to sys_select.
src/sysselect.h [WINDOWSNT]: Don't include sys/select.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/s/ms-w32.h
src/sysselect.h
src/w32.c
src/w32proc.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-23 09:55:13 +0000
+++ b/ChangeLog 2012-06-23 10:22:59 +0000
@@ -1,3 +1,18 @@
+2012-06-23 Eli Zaretskii <address@hidden>
+
+ Fix the MS-Windows build broken by revno 108687.
+ * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/dtotimespec.$(O),
+ $(BLD)/gettime.$(O), $(BLD)/timespec-add.$(O), and
+ $(BLD)/timespec-sub.$(O).
+ ($(BLD)/dtotimespec.$(O)):
+ ($(BLD)/gettime.$(O)):
+ ($(BLD)/timespec-add.$(O)):
+ ($(BLD)/timespec-sub.$(O)): New dependencies.
+
+ * lib/stat-time.h:
+ * lib/timespec.h:
+ * lib/utimens.h: Include sys/time.h
+
2012-06-23 Andreas Schwab <address@hidden>
* configure.in: Don't use AC_CHECK_FUNCS_ONCE, which doesn't use
=== modified file 'lib/makefile.w32-in'
--- a/lib/makefile.w32-in 2012-05-27 12:11:23 +0000
+++ b/lib/makefile.w32-in 2012-06-23 10:22:59 +0000
@@ -24,10 +24,14 @@
LIBS =
GNULIBOBJS = $(BLD)/dtoastr.$(O) \
+ $(BLD)/dtotimespec.$(O) \
$(BLD)/getopt.$(O) \
$(BLD)/getopt1.$(O) \
+ $(BLD)/gettime.$(O) \
$(BLD)/strftime.$(O) \
$(BLD)/time_r.$(O) \
+ $(BLD)/timespec-add.$(O) \
+ $(BLD)/timespec-sub.$(O) \
$(BLD)/md5.$(O) \
$(BLD)/sha1.$(O) \
$(BLD)/sha256.$(O) \
@@ -69,6 +73,15 @@
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
+$(BLD)/dtotimespec.$(O) : \
+ $(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
+
$(BLD)/getopt.$(O) : \
$(SRC)/getopt.c \
$(SRC)/getopt.h \
@@ -87,6 +100,14 @@
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
+$(BLD)/gettime.$(O) : \
+ $(SRC)/gettime.c \
+ $(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
+
$(BLD)/strftime.$(O) : \
$(SRC)/strftime.c \
$(SRC)/strftime.h \
@@ -101,6 +122,24 @@
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/config.h
+$(BLD)/timespec-add.$(O) : \
+ $(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
+
+$(BLD)/timespec-sub.$(O) : \
+ $(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
+
$(BLD)/md5.$(O) : \
$(SRC)/md5.c \
$(SRC)/md5.h \
=== modified file 'lib/stat-time.h'
--- a/lib/stat-time.h 2012-06-22 21:26:37 +0000
+++ b/lib/stat-time.h 2012-06-23 10:22:59 +0000
@@ -22,6 +22,7 @@
#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-22 21:26:37 +0000
+++ b/lib/timespec.h 2012-06-23 10:22:59 +0000
@@ -20,6 +20,7 @@
# 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-22 21:26:37 +0000
+++ b/lib/utimens.h 2012-06-23 10:22:59 +0000
@@ -1,4 +1,5 @@
#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-16 13:17:14 +0000
+++ b/nt/ChangeLog 2012-06-23 10:22:59 +0000
@@ -1,3 +1,8 @@
+2012-06-23 Eli Zaretskii <address@hidden>
+
+ Fix the MS-Windows build broken by revno 108687.
+ * inc/sys/time.h (struct timespec): Define.
+
2012-06-16 Eli Zaretskii <address@hidden>
* makefile.w32-in (install-addpm): New target.
=== modified file 'nt/inc/sys/time.h'
--- a/nt/inc/sys/time.h 2011-01-15 23:16:57 +0000
+++ b/nt/inc/sys/time.h 2012-06-23 10:22:59 +0000
@@ -6,15 +6,22 @@
*/
struct timeval
- {
- long tv_sec; /* seconds */
- long tv_usec; /* microseconds */
- };
+{
+ long tv_sec; /* seconds */
+ long tv_usec; /* microseconds */
+};
+
struct timezone
- {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
- };
+{
+ int tz_minuteswest; /* minutes west of Greenwich */
+ 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 *);
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-23 09:46:33 +0000
+++ b/src/ChangeLog 2012-06-23 10:22:59 +0000
@@ -1,5 +1,14 @@
2012-06-23 Eli Zaretskii <address@hidden>
+ Fix the MS-Windows build broken by revno 108687.
+ * w32.c (fdutimens): New function.
+
+ * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
+
+ * s/ms-w32.h (pselect): Redirect to sys_select.
+
+ * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
+
* ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
in the logic of incrementing and decrementing the value of
use_relocatable_buffers.
=== modified file 'src/s/ms-w32.h'
--- a/src/s/ms-w32.h 2012-06-11 23:17:11 +0000
+++ b/src/s/ms-w32.h 2012-06-23 10:22:59 +0000
@@ -226,6 +226,7 @@
#define rename sys_rename
#define rmdir sys_rmdir
#define select sys_select
+#define pselect sys_select
#define sleep sys_sleep
#define strerror sys_strerror
#undef unlink
=== modified file 'src/sysselect.h'
--- a/src/sysselect.h 2012-06-22 21:17:42 +0000
+++ b/src/sysselect.h 2012-06-23 10:22:59 +0000
@@ -19,7 +19,9 @@
#if defined (DARWIN_OS)
#undef init_process
#endif
+#ifndef WINDOWSNT
#include <sys/select.h>
+#endif
#if defined (DARWIN_OS)
#define init_process emacs_init_process
#endif
=== modified file 'src/w32.c'
--- a/src/w32.c 2012-06-22 21:17:42 +0000
+++ b/src/w32.c 2012-06-23 10:22:59 +0000
@@ -1996,6 +1996,41 @@
}
}
+/* Emulate fdutimens. */
+
+/* Set the access and modification time stamps of FD (a.k.a. FILE) to be
+ TIMESPEC[0] and TIMESPEC[1], respectively.
+ FD must be either negative -- in which case it is ignored --
+ or a file descriptor that is open on FILE.
+ If FD is nonnegative, then FILE can be NULL, which means
+ use just futimes instead of utimes.
+ If TIMESPEC is null, FAIL.
+ Return 0 on success, -1 (setting errno) on failure. */
+
+int
+fdutimens (int fd, char const *file, struct timespec const timespec[2])
+{
+ struct _utimbuf ut;
+
+ if (!timespec)
+ {
+ errno = ENOSYS;
+ return -1;
+ }
+ if (fd < 0 && !file)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ ut.actime = timespec[0].tv_sec;
+ ut.modtime = timespec[1].tv_sec;
+ if (fd >= 0)
+ return _futime (fd, &ut);
+ else
+ return _utime (file, &ut);
+}
+
+
/* ------------------------------------------------------------------------- */
/* IO support and wrapper functions for W32 API. */
/* ------------------------------------------------------------------------- */
=== modified file 'src/w32proc.c'
--- a/src/w32proc.c 2012-05-05 08:40:31 +0000
+++ b/src/w32proc.c 2012-06-23 10:22:59 +0000
@@ -1090,7 +1090,8 @@
HANDLE wait_hnd[MAXDESC + MAX_CHILDREN];
int fdindex[MAXDESC]; /* mapping from wait handles back to descriptors */
- timeout_ms = timeout ? (timeout->tv_sec * 1000 + timeout->tv_usec / 1000) :
INFINITE;
+ timeout_ms =
+ timeout ? (timeout->tv_sec * 1000 + timeout->tv_nsec / 1000000) : INFINITE;
/* If the descriptor sets are NULL but timeout isn't, then just Sleep. */
if (rfds == NULL && wfds == NULL && efds == NULL && timeout != NULL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108698: Fix the MS-Windows build broken by revno 108687.,
Eli Zaretskii <=