Commit | Line | Data |
---|---|---|
c911543b | 1 | /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
acaf905b | 2 | Copyright (C) 1994, 2002-2012 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 | |
20 | #include <pwd.h> | |
21 | #include <malloc.h> | |
22 | ||
6bf87eac GV |
23 | /* Include these headers now so we don't have to worry about include |
24 | order dependencies in common source files. */ | |
25 | #include <direct.h> | |
26 | #include <io.h> | |
27 | #include <stdio.h> | |
28 | ||
29 | #ifdef sleep | |
30 | #undef sleep | |
31 | #endif | |
361358ea | 32 | void sleep (unsigned long seconds); |
4eb8218d | 33 | char *getwd (char *dir); |
361358ea JB |
34 | int getppid (void); |
35 | char * getlogin (void); | |
c911543b | 36 | char * cuserid (char * s); |
361358ea JB |
37 | unsigned getuid (void); |
38 | unsigned getegid (void); | |
39 | unsigned getgid (void); | |
22749e9a | 40 | int setuid (unsigned uid); |
f915f0f7 | 41 | int setregid (unsigned rgid, unsigned gid); |
c911543b | 42 | char * getpass (const char * prompt); |
22749e9a | 43 | int fchown (int fd, unsigned uid, unsigned gid); |
c911543b | 44 | |
14fa0be5 | 45 | /* redirect or undo interceptions created by config.h */ |
6bf87eac GV |
46 | #undef access |
47 | #define access _access | |
48 | #undef chdir | |
49 | #define chdir _chdir | |
50 | #undef chmod | |
51 | #define chmod _chmod | |
52 | #undef close | |
53 | #define close _close | |
54 | #undef creat | |
55 | #define creat _creat | |
56 | #undef ctime | |
57 | #undef dup | |
58 | #define dup _dup | |
59 | #undef dup2 | |
60 | #define dup2 _dup2 | |
61 | #undef fopen | |
62 | #undef mkdir | |
63 | #define mkdir _mkdir | |
64 | #undef mktemp | |
65 | #define mktemp _mktemp | |
66 | #undef open | |
67 | #define open _open | |
68 | #undef pipe | |
69 | #define pipe _pipe | |
70 | #undef read | |
71 | #define read _read | |
72 | #undef rename | |
73 | #undef rmdir | |
74 | #define rmdir _rmdir | |
75 | #undef unlink | |
76 | #define unlink _unlink | |
77 | #undef write | |
78 | #define write _write | |
79 | ||
80 | /* map to MSVC names */ | |
81 | #define execlp _execlp | |
82 | #define execvp _execvp | |
6bf87eac | 83 | #define fdopen _fdopen |
23bf9efb | 84 | #ifndef fileno |
6bf87eac | 85 | #define fileno _fileno |
23bf9efb | 86 | #endif |
6bf87eac GV |
87 | #define getcwd _getcwd |
88 | #define getw _getw | |
89 | #define getpid _getpid | |
90 | #define isatty _isatty | |
91 | #define locking _locking | |
92 | #define logb _logb | |
93 | #define _longjmp longjmp | |
94 | #define lseek _lseek | |
95 | #define popen _popen | |
96 | #define pclose _pclose | |
6bf87eac GV |
97 | #define umask _umask |
98 | #define utime _utime | |
99 | #define index strchr | |
100 | #define rindex strrchr | |
101 | ||
14fa0be5 AI |
102 | /* Make standard winsock definitions available if needed. */ |
103 | #undef _WINSOCKAPI_ | |
afffac46 | 104 | #undef _WINSOCK_H |
14fa0be5 | 105 | |
c911543b | 106 | /* end of ntlib.h */ |
ab5796a9 | 107 |