aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-01 19:28:53 +0300
committerEli Zaretskii2013-04-01 19:28:53 +0300
commit86e9346005b957ddadb73586c9641e68ea12a79d (patch)
tree683c40f6e61d57905d7b7807ef42e8f1ae4038ea /nt
parentcbbb6bfd46dbab26a570b853959da6ecaada4a93 (diff)
downloademacs-86e9346005b957ddadb73586c9641e68ea12a79d.tar.gz
emacs-86e9346005b957ddadb73586c9641e68ea12a79d.zip
Fixed misc compilation warnings and errors. Dumping errors out.
Diffstat (limited to 'nt')
-rw-r--r--nt/inc/ms-w32.h9
-rw-r--r--nt/inc/sys/stat.h33
2 files changed, 36 insertions, 6 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 6fca448db07..65540f238e5 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -144,9 +144,6 @@ extern char *getenv ();
144/* Make a leaner executable. */ 144/* Make a leaner executable. */
145#define WIN32_LEAN_AND_MEAN 1 145#define WIN32_LEAN_AND_MEAN 1
146 146
147#ifdef HAVE_STRINGS_H
148#include "strings.h"
149#endif
150#include <sys/types.h> 147#include <sys/types.h>
151 148
152#ifndef MAXPATHLEN 149#ifndef MAXPATHLEN
@@ -258,9 +255,6 @@ extern int sys_unlink (const char *);
258#define execvp _execvp 255#define execvp _execvp
259#define fdatasync _commit 256#define fdatasync _commit
260#define fdopen _fdopen 257#define fdopen _fdopen
261#ifndef fileno
262#define fileno _fileno
263#endif
264#define fsync _commit 258#define fsync _commit
265#define ftruncate _chsize 259#define ftruncate _chsize
266#define getpid _getpid 260#define getpid _getpid
@@ -330,6 +324,9 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
330#include <io.h> 324#include <io.h>
331#include <stdio.h> 325#include <stdio.h>
332#endif /* !_MSC_VER */ 326#endif /* !_MSC_VER */
327#ifndef fileno
328#define fileno _fileno
329#endif
333 330
334/* Defines that we need that aren't in the standard signal.h. */ 331/* Defines that we need that aren't in the standard signal.h. */
335#define SIGHUP 1 /* Hang up */ 332#define SIGHUP 1 /* Hang up */
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index 857acce1815..f1d8341141e 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -102,6 +102,39 @@ struct stat {
102 char st_gname[260]; 102 char st_gname[260];
103}; 103};
104 104
105/* These are here to avoid compiler warnings when using wchar.h. */
106struct _stat
107{
108 _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
109 _ino_t st_ino; /* Always zero ? */
110 _mode_t st_mode; /* See above constants */
111 short st_nlink; /* Number of links. */
112 short st_uid; /* User: Maybe significant on NT ? */
113 short st_gid; /* Group: Ditto */
114 _dev_t st_rdev; /* Seems useless (not even filled in) */
115 _off_t st_size; /* File size in bytes */
116 time_t st_atime; /* Accessed date (always 00:00 hrs local
117 * on FAT) */
118 time_t st_mtime; /* Modified time */
119 time_t st_ctime; /* Creation time */
120};
121
122#if defined (__MSVCRT__)
123struct _stati64 {
124 _dev_t st_dev;
125 _ino_t st_ino;
126 _mode_t st_mode;
127 short st_nlink;
128 short st_uid;
129 short st_gid;
130 _dev_t st_rdev;
131 __int64 st_size;
132 time_t st_atime;
133 time_t st_mtime;
134 time_t st_ctime;
135};
136#endif
137
105/* Internal variable for asking 'stat'/'lstat' to produce accurate 138/* Internal variable for asking 'stat'/'lstat' to produce accurate
106 info about owner and group of files. */ 139 info about owner and group of files. */
107extern int w32_stat_get_owner_group; 140extern int w32_stat_get_owner_group;