Let rename-file rename dirs across filesystems
[emacs.git] / lib-src / ntlib.h
blobf7ee305e861ffd19db96b89db105ea8052f897a8
1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
2 Copyright (C) 1994, 2002-2017 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or (at
9 your option) any later version.
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
19 #include <pwd.h>
20 #include <malloc.h>
22 /* Include these headers now so we don't have to worry about include
23 order dependencies in common source files. */
24 #include <direct.h>
25 #include <fcntl.h>
26 #include <io.h>
27 #include <stdio.h>
29 #ifdef sleep
30 #undef sleep
31 #endif
32 unsigned sleep (unsigned seconds);
33 char *getwd (char *dir);
34 int getppid (void);
35 char * getlogin (void);
36 char * cuserid (char * s);
37 unsigned getegid (void);
38 unsigned getgid (void);
39 int setuid (unsigned uid);
40 int setregid (unsigned rgid, unsigned gid);
41 char * getpass (const char * prompt);
42 int fchown (int fd, unsigned uid, unsigned gid);
44 /* redirect or undo interceptions created by config.h */
45 #undef access
46 #define access _access
47 #undef chdir
48 #define chdir _chdir
49 #undef chmod
50 #define chmod _chmod
51 #undef close
52 #define close _close
53 #undef creat
54 #define creat _creat
55 #undef ctime
56 #undef dup
57 #define dup _dup
58 #undef dup2
59 #define dup2 _dup2
60 #undef fopen
61 #undef pipe
62 #define pipe _pipe
63 #undef read
64 #define read _read
65 #undef rmdir
66 #define rmdir _rmdir
67 #undef unlink
68 #define unlink _unlink
69 #undef write
70 #define write _write
72 /* map to MSVC names */
73 #define execlp _execlp
74 #define execvp _execvp
75 #define fdopen _fdopen
76 #ifndef fileno
77 #define fileno _fileno
78 #endif
79 #define getcwd _getcwd
80 #define getw _getw
81 #define getpid _getpid
82 #define isatty _isatty
83 #define locking _locking
84 #define logb _logb
85 #define _longjmp longjmp
86 #define popen _popen
87 #define pclose _pclose
88 #define umask _umask
89 #define utime _utime
90 #define index strchr
91 #define rindex strrchr
93 /* Make standard winsock definitions available if needed. */
94 #undef _WINSOCKAPI_
95 #undef _WINSOCK_H
97 /* end of ntlib.h */