diff options
Diffstat (limited to 'lib-src/ntlib.c')
| -rw-r--r-- | lib-src/ntlib.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index f43117457cb..41b4e3a0cbc 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c | |||
| @@ -34,21 +34,26 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | 34 | ||
| 35 | #include "ntlib.h" | 35 | #include "ntlib.h" |
| 36 | 36 | ||
| 37 | /* MinGW64 defines _TIMEZONE_DEFINED and defines 'struct timespec' in | ||
| 38 | its system headers. */ | ||
| 39 | #ifndef _TIMEZONE_DEFINED | ||
| 37 | struct timezone | 40 | struct timezone |
| 38 | { | 41 | { |
| 39 | int tz_minuteswest; /* minutes west of Greenwich */ | 42 | int tz_minuteswest; /* minutes west of Greenwich */ |
| 40 | int tz_dsttime; /* type of dst correction */ | 43 | int tz_dsttime; /* type of dst correction */ |
| 41 | }; | 44 | }; |
| 45 | #endif | ||
| 42 | 46 | ||
| 43 | #define MAXPATHLEN _MAX_PATH | 47 | #define MAXPATHLEN _MAX_PATH |
| 44 | 48 | ||
| 45 | /* Emulate sleep...we could have done this with a define, but that | 49 | /* Emulate sleep...we could have done this with a define, but that |
| 46 | would necessitate including windows.h in the files that used it. | 50 | would necessitate including windows.h in the files that used it. |
| 47 | This is much easier. */ | 51 | This is much easier. */ |
| 48 | void | 52 | unsigned |
| 49 | sleep (unsigned long seconds) | 53 | sleep (unsigned seconds) |
| 50 | { | 54 | { |
| 51 | Sleep (seconds * 1000); | 55 | Sleep (seconds * 1000); |
| 56 | return 0; | ||
| 52 | } | 57 | } |
| 53 | 58 | ||
| 54 | /* Get the current working directory. */ | 59 | /* Get the current working directory. */ |
| @@ -134,6 +139,12 @@ getuid (void) | |||
| 134 | } | 139 | } |
| 135 | 140 | ||
| 136 | unsigned | 141 | unsigned |
| 142 | geteuid (void) | ||
| 143 | { | ||
| 144 | return getuid (); | ||
| 145 | } | ||
| 146 | |||
| 147 | unsigned | ||
| 137 | getgid (void) | 148 | getgid (void) |
| 138 | { | 149 | { |
| 139 | return 0; | 150 | return 0; |
| @@ -411,4 +422,3 @@ lstat (const char * path, struct stat * buf) | |||
| 411 | { | 422 | { |
| 412 | return stat (path, buf); | 423 | return stat (path, buf); |
| 413 | } | 424 | } |
| 414 | |||