15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
1 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
2 Copyright (C) 1994 Free Software Foundation, Inc.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
3
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
4 This file is part of GNU Emacs.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
5
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
6 GNU Emacs is free software; you can redistribute it and/or modify it
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
7 under the terms of the GNU General Public License as published by the
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
8 Free Software Foundation; either version 2, or (at your option) any later
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
9 version.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
10
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
11 GNU Emacs is distributed in the hope that it will be useful, but WITHOUT
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
14 more details.
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
15
|
15742
|
16 You should have received a copy of the GNU General Public License
|
|
17 along with GNU Emacs; see the file COPYING. If not, write to the
|
|
18 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 Boston, MA 02111-1307, USA.
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
20
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
21 */
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
22
|
19232
|
23 #define WIN32
|
|
24
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
25 #include <pwd.h>
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
26 #include <malloc.h>
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
27
|
19232
|
28 /* Include these headers now so we don't have to worry about include
|
|
29 order dependencies in common source files. */
|
|
30 #include <direct.h>
|
|
31 #include <io.h>
|
|
32 #include <stdio.h>
|
|
33
|
|
34 #ifdef sleep
|
|
35 #undef sleep
|
|
36 #endif
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
37 void sleep(int seconds);
|
15674
|
38 char *getwd (char *dir);
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
39 int getppid(void);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
40 char * getlogin ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
41 char * cuserid (char * s);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
42 int getuid ();
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
43 int setuid (int uid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
44 struct passwd * getpwuid (int uid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
45 char * getpass (const char * prompt);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
46 int fchown (int fd, int uid, int gid);
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
47
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
48 #ifndef BSTRING
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
49 #define bzero(b, l) memset(b, 0, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
50 #define bcopy(s, d, l) memcpy(d, s, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
51 #define bcmp(a, b, l) memcmp(a, b, l)
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
52 #endif
|
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
53
|
22315
|
54 /* redirect or undo interceptions created by config.h */
|
19232
|
55 #undef access
|
|
56 #define access _access
|
|
57 #undef chdir
|
|
58 #define chdir _chdir
|
|
59 #undef chmod
|
|
60 #define chmod _chmod
|
|
61 #undef close
|
|
62 #define close _close
|
|
63 #undef creat
|
|
64 #define creat _creat
|
|
65 #undef ctime
|
|
66 #undef dup
|
|
67 #define dup _dup
|
|
68 #undef dup2
|
|
69 #define dup2 _dup2
|
|
70 #undef fopen
|
|
71 #undef mkdir
|
|
72 #define mkdir _mkdir
|
|
73 #undef mktemp
|
|
74 #define mktemp _mktemp
|
|
75 #undef open
|
|
76 #define open _open
|
|
77 #undef pipe
|
|
78 #define pipe _pipe
|
|
79 #undef read
|
|
80 #define read _read
|
|
81 #undef rename
|
|
82 #undef rmdir
|
|
83 #define rmdir _rmdir
|
|
84 #undef unlink
|
|
85 #define unlink _unlink
|
|
86 #undef write
|
|
87 #define write _write
|
|
88
|
|
89 /* map to MSVC names */
|
|
90 #define execlp _execlp
|
|
91 #define execvp _execvp
|
|
92 #define fcloseall _fcloseall
|
|
93 #define fdopen _fdopen
|
|
94 #define fgetchar _fgetchar
|
|
95 #define fileno _fileno
|
|
96 #define flushall _flushall
|
|
97 #define fputchar _fputchar
|
|
98 #define getcwd _getcwd
|
|
99 #define getw _getw
|
|
100 #define getpid _getpid
|
|
101 #define isatty _isatty
|
|
102 #define locking _locking
|
|
103 #define logb _logb
|
|
104 #define _longjmp longjmp
|
|
105 #define lseek _lseek
|
|
106 #define popen _popen
|
|
107 #define pclose _pclose
|
|
108 #define putw _putw
|
|
109 #define umask _umask
|
|
110 #define utime _utime
|
|
111 #define index strchr
|
|
112 #define rindex strrchr
|
|
113
|
22315
|
114 /* Make standard winsock definitions available if needed. */
|
|
115 #undef _WINSOCKAPI_
|
|
116
|
15139
Geoff Voelker <voelker@cs.washington.edu>
parents:
diff
changeset
|
117 /* end of ntlib.h */
|