Commit | Line | Data |
---|---|---|
c911543b | 1 | /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
ba318903 | 2 | Copyright (C) 1994, 2002-2014 Free Software Foundation, Inc. |
c911543b | 3 | |
294981c7 | 4 | This file is part of GNU Emacs. |
c911543b | 5 | |
294981c7 GM |
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 | |
9 | (at your option) any later version. | |
c911543b | 10 | |
294981c7 GM |
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. | |
c911543b | 15 | |
294981c7 GM |
16 | You should have received a copy of the GNU General Public License |
17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |
c911543b | 18 | |
c911543b GV |
19 | #include <pwd.h> |
20 | #include <malloc.h> | |
21 | ||
6bf87eac GV |
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> | |
e443729d | 25 | #include <fcntl.h> |
6bf87eac GV |
26 | #include <io.h> |
27 | #include <stdio.h> | |
28 | ||
29 | #ifdef sleep | |
30 | #undef sleep | |
31 | #endif | |
7c4026b6 | 32 | unsigned sleep (unsigned seconds); |
4eb8218d | 33 | char *getwd (char *dir); |
361358ea JB |
34 | int getppid (void); |
35 | char * getlogin (void); | |
c911543b | 36 | char * cuserid (char * s); |
361358ea | 37 | unsigned getuid (void); |
7c4026b6 | 38 | unsigned geteuid (void); |
361358ea JB |
39 | unsigned getegid (void); |
40 | unsigned getgid (void); | |
22749e9a | 41 | int setuid (unsigned uid); |
f915f0f7 | 42 | int setregid (unsigned rgid, unsigned gid); |
c911543b | 43 | char * getpass (const char * prompt); |
22749e9a | 44 | int fchown (int fd, unsigned uid, unsigned gid); |
e443729d | 45 | int mkostemp (char * template, int flags); |
c911543b | 46 | |
14fa0be5 | 47 | /* redirect or undo interceptions created by config.h */ |
6bf87eac GV |
48 | #undef access |
49 | #define access _access | |
50 | #undef chdir | |
51 | #define chdir _chdir | |
52 | #undef chmod | |
53 | #define chmod _chmod | |
54 | #undef close | |
55 | #define close _close | |
56 | #undef creat | |
57 | #define creat _creat | |
58 | #undef ctime | |
59 | #undef dup | |
60 | #define dup _dup | |
61 | #undef dup2 | |
62 | #define dup2 _dup2 | |
63 | #undef fopen | |
64 | #undef mkdir | |
65 | #define mkdir _mkdir | |
6bf87eac GV |
66 | #undef open |
67 | #define open _open | |
68 | #undef pipe | |
69 | #define pipe _pipe | |
70 | #undef read | |
71 | #define read _read | |
6bf87eac GV |
72 | #undef rmdir |
73 | #define rmdir _rmdir | |
74 | #undef unlink | |
75 | #define unlink _unlink | |
76 | #undef write | |
77 | #define write _write | |
78 | ||
79 | /* map to MSVC names */ | |
80 | #define execlp _execlp | |
81 | #define execvp _execvp | |
6bf87eac | 82 | #define fdopen _fdopen |
23bf9efb | 83 | #ifndef fileno |
6bf87eac | 84 | #define fileno _fileno |
23bf9efb | 85 | #endif |
6bf87eac GV |
86 | #define getcwd _getcwd |
87 | #define getw _getw | |
88 | #define getpid _getpid | |
89 | #define isatty _isatty | |
90 | #define locking _locking | |
91 | #define logb _logb | |
92 | #define _longjmp longjmp | |
93 | #define lseek _lseek | |
94 | #define popen _popen | |
95 | #define pclose _pclose | |
6bf87eac GV |
96 | #define umask _umask |
97 | #define utime _utime | |
98 | #define index strchr | |
99 | #define rindex strrchr | |
100 | ||
14fa0be5 AI |
101 | /* Make standard winsock definitions available if needed. */ |
102 | #undef _WINSOCKAPI_ | |
afffac46 | 103 | #undef _WINSOCK_H |
14fa0be5 | 104 | |
c911543b | 105 | /* end of ntlib.h */ |
ab5796a9 | 106 |