annotate lib-src/ntlib.h @ 19392:c243eff11a64

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