15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
|
94828
|
2 Copyright (C) 1994, 2002, 2003, 2004, 2005, 2006, 2007,
|
|
3 2008 Free Software Foundation, Inc.
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
4
|
94828
|
5 This file is part of GNU Emacs.
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
6
|
94828
|
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.
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
11
|
94828
|
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.
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
16
|
94828
|
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/>. */
|
|
19
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
20
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
21 #include <pwd.h>
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
22 #include <malloc.h>
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
23
|
19232
|
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
|
31082
|
33 void sleep(unsigned long seconds);
|
15674
|
34 char *getwd (char *dir);
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
35 int getppid(void);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
36 char * getlogin ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
37 char * cuserid (char * s);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
38 int getuid ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
39 int setuid (int uid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
40 struct passwd * getpwuid (int uid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
41 char * getpass (const char * prompt);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
42 int fchown (int fd, int uid, int gid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
43
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
44 #ifndef BSTRING
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
45 #define bzero(b, l) memset(b, 0, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
46 #define bcopy(s, d, l) memcpy(d, s, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
47 #define bcmp(a, b, l) memcmp(a, b, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
48 #endif
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
49
|
22315
|
50 /* redirect or undo interceptions created by config.h */
|
19232
|
51 #undef access
|
|
52 #define access _access
|
|
53 #undef chdir
|
|
54 #define chdir _chdir
|
|
55 #undef chmod
|
|
56 #define chmod _chmod
|
|
57 #undef close
|
|
58 #define close _close
|
|
59 #undef creat
|
|
60 #define creat _creat
|
|
61 #undef ctime
|
|
62 #undef dup
|
|
63 #define dup _dup
|
|
64 #undef dup2
|
|
65 #define dup2 _dup2
|
|
66 #undef fopen
|
|
67 #undef mkdir
|
|
68 #define mkdir _mkdir
|
|
69 #undef mktemp
|
|
70 #define mktemp _mktemp
|
|
71 #undef open
|
|
72 #define open _open
|
|
73 #undef pipe
|
|
74 #define pipe _pipe
|
|
75 #undef read
|
|
76 #define read _read
|
|
77 #undef rename
|
|
78 #undef rmdir
|
|
79 #define rmdir _rmdir
|
|
80 #undef unlink
|
|
81 #define unlink _unlink
|
|
82 #undef write
|
|
83 #define write _write
|
|
84
|
|
85 /* map to MSVC names */
|
|
86 #define execlp _execlp
|
|
87 #define execvp _execvp
|
|
88 #define fdopen _fdopen
|
63018
|
89 #ifndef fileno
|
19232
|
90 #define fileno _fileno
|
63018
|
91 #endif
|
19232
|
92 #define getcwd _getcwd
|
|
93 #define getw _getw
|
|
94 #define getpid _getpid
|
|
95 #define isatty _isatty
|
|
96 #define locking _locking
|
|
97 #define logb _logb
|
|
98 #define _longjmp longjmp
|
|
99 #define lseek _lseek
|
|
100 #define popen _popen
|
|
101 #define pclose _pclose
|
|
102 #define umask _umask
|
|
103 #define utime _utime
|
|
104 #define index strchr
|
|
105 #define rindex strrchr
|
|
106
|
22315
|
107 /* Make standard winsock definitions available if needed. */
|
|
108 #undef _WINSOCKAPI_
|
31082
|
109 #undef _WINSOCK_H
|
22315
|
110
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
111 /* end of ntlib.h */
|
52401
|
112
|
|
113 /* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28
|
|
114 (do not change this comment) */
|