Commit | Line | Data |
---|---|---|
c911543b | 1 | /* Utility and Unix shadow routines for GNU Emacs support programs on NT. |
294981c7 | 2 | Copyright (C) 1994, 2002, 2003, 2004, 2005, 2006, 2007, |
49f70d46 | 3 | 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. |
c911543b | 4 | |
294981c7 | 5 | This file is part of GNU Emacs. |
c911543b | 6 | |
294981c7 GM |
7 | GNU Emacs is free software: you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation, either version 3 of the License, or | |
10 | (at your option) any later version. | |
c911543b | 11 | |
294981c7 GM |
12 | GNU Emacs is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
c911543b | 16 | |
294981c7 GM |
17 | You should have received a copy of the GNU General Public License |
18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |
c911543b | 19 | |
c911543b GV |
20 | |
21 | #include <pwd.h> | |
22 | #include <malloc.h> | |
23 | ||
6bf87eac GV |
24 | /* Include these headers now so we don't have to worry about include |
25 | order dependencies in common source files. */ | |
26 | #include <direct.h> | |
27 | #include <io.h> | |
28 | #include <stdio.h> | |
29 | ||
30 | #ifdef sleep | |
31 | #undef sleep | |
32 | #endif | |
afffac46 | 33 | void sleep(unsigned long seconds); |
4eb8218d | 34 | char *getwd (char *dir); |
c911543b GV |
35 | int getppid(void); |
36 | char * getlogin (); | |
37 | char * cuserid (char * s); | |
22749e9a | 38 | unsigned getuid (); |
6f5b0654 JB |
39 | unsigned getegid (); |
40 | unsigned getgid (); | |
22749e9a | 41 | int setuid (unsigned uid); |
2ff1f755 | 42 | int setregid (unsigned rgid, unsigned gid); |
c911543b | 43 | char * getpass (const char * prompt); |
22749e9a | 44 | int fchown (int fd, unsigned uid, unsigned gid); |
c911543b GV |
45 | |
46 | #ifndef BSTRING | |
47 | #define bzero(b, l) memset(b, 0, l) | |
48 | #define bcopy(s, d, l) memcpy(d, s, l) | |
49 | #define bcmp(a, b, l) memcmp(a, b, l) | |
c911543b GV |
50 | #endif |
51 | ||
14fa0be5 | 52 | /* redirect or undo interceptions created by config.h */ |
6bf87eac GV |
53 | #undef access |
54 | #define access _access | |
55 | #undef chdir | |
56 | #define chdir _chdir | |
57 | #undef chmod | |
58 | #define chmod _chmod | |
59 | #undef close | |
60 | #define close _close | |
61 | #undef creat | |
62 | #define creat _creat | |
63 | #undef ctime | |
64 | #undef dup | |
65 | #define dup _dup | |
66 | #undef dup2 | |
67 | #define dup2 _dup2 | |
68 | #undef fopen | |
69 | #undef mkdir | |
70 | #define mkdir _mkdir | |
71 | #undef mktemp | |
72 | #define mktemp _mktemp | |
73 | #undef open | |
74 | #define open _open | |
75 | #undef pipe | |
76 | #define pipe _pipe | |
77 | #undef read | |
78 | #define read _read | |
79 | #undef rename | |
80 | #undef rmdir | |
81 | #define rmdir _rmdir | |
82 | #undef unlink | |
83 | #define unlink _unlink | |
84 | #undef write | |
85 | #define write _write | |
86 | ||
87 | /* map to MSVC names */ | |
88 | #define execlp _execlp | |
89 | #define execvp _execvp | |
6bf87eac | 90 | #define fdopen _fdopen |
23bf9efb | 91 | #ifndef fileno |
6bf87eac | 92 | #define fileno _fileno |
23bf9efb | 93 | #endif |
6bf87eac GV |
94 | #define getcwd _getcwd |
95 | #define getw _getw | |
96 | #define getpid _getpid | |
97 | #define isatty _isatty | |
98 | #define locking _locking | |
99 | #define logb _logb | |
100 | #define _longjmp longjmp | |
101 | #define lseek _lseek | |
102 | #define popen _popen | |
103 | #define pclose _pclose | |
6bf87eac GV |
104 | #define umask _umask |
105 | #define utime _utime | |
106 | #define index strchr | |
107 | #define rindex strrchr | |
108 | ||
14fa0be5 AI |
109 | /* Make standard winsock definitions available if needed. */ |
110 | #undef _WINSOCKAPI_ | |
afffac46 | 111 | #undef _WINSOCK_H |
14fa0be5 | 112 | |
c911543b | 113 | /* end of ntlib.h */ |
ab5796a9 MB |
114 | |
115 | /* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28 | |
116 | (do not change this comment) */ |