comparison src/sysdep.h @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children 5fd7ba8b56e7
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
23 #ifndef INCLUDED_sysdep_h_ 23 #ifndef INCLUDED_sysdep_h_
24 #define INCLUDED_sysdep_h_ 24 #define INCLUDED_sysdep_h_
25 25
26 #include <setjmp.h> 26 #include <setjmp.h>
27 27
28 #ifndef WINDOWSNT 28 #ifndef WIN32_NATIVE
29 extern char **environ; 29 extern char **environ;
30 #endif
31
32 #ifdef PDUMP
33 int pdump_read_file (char **pdump_start_pos, size_t *pdump_length);
30 #endif 34 #endif
31 35
32 int eight_bit_tty (struct device *d); 36 int eight_bit_tty (struct device *d);
33 37
34 void stuff_char (struct console *con, int c); 38 void stuff_char (struct console *con, int c);
44 int get_pty_max_bytes (int fd); 48 int get_pty_max_bytes (int fd);
45 Bufbyte get_eof_char (int fd); 49 Bufbyte get_eof_char (int fd);
46 50
47 /* Wait for subprocess with process id `pid' to terminate and 51 /* Wait for subprocess with process id `pid' to terminate and
48 make sure it will get eliminated (not remain forever as a zombie) */ 52 make sure it will get eliminated (not remain forever as a zombie) */
49 #ifdef WINDOWSNT 53 #ifndef WIN32_NATIVE
50 #include <windows.h>
51 void wait_for_termination (HANDLE pid);
52 #else
53 void wait_for_termination (int pid); 54 void wait_for_termination (int pid);
54 #endif 55 #endif
55 56
56 /* flush any pending output 57 /* flush any pending output
57 * (may flush input as well; it does not matter the way we use it) 58 * (may flush input as well; it does not matter the way we use it)
79 naturally interruptible. */ 80 naturally interruptible. */
80 81
81 extern JMP_BUF break_system_call_jump; 82 extern JMP_BUF break_system_call_jump;
82 extern volatile int can_break_system_calls; 83 extern volatile int can_break_system_calls;
83 84
84 ssize_t sys_write_1 (int fildes, CONST void *buf, size_t nbyte, 85 ssize_t sys_write_1 (int fildes, const void *buf, size_t nbyte,
85 int allow_quit); 86 int allow_quit);
86 ssize_t sys_read_1 (int fildes, void *buf, size_t nbyte, 87 ssize_t sys_read_1 (int fildes, void *buf, size_t nbyte,
87 int allow_quit); 88 int allow_quit);
88 89
89 /* Call these functions if you want to change some terminal parameter -- 90 /* Call these functions if you want to change some terminal parameter --
143 144
144 /* Get_system_name returns as its value a string for system-name to return. */ 145 /* Get_system_name returns as its value a string for system-name to return. */
145 void init_system_name (void); 146 void init_system_name (void);
146 147
147 #ifndef HAVE_GETCWD 148 #ifndef HAVE_GETCWD
148 char *getcwd (char *pathname, int size); 149 char *getcwd (char *pathname, size_t size);
149 #endif 150 #endif
150 151
151 #ifndef HAVE_RENAME 152 #ifndef HAVE_RENAME
152 int rename (CONST char *from, CONST char *to); 153 int rename (const char *from, const char *to);
153 #endif 154 #endif
154 155
155 #ifndef HAVE_DUP2 156 #ifndef HAVE_DUP2
156 int dup2 (int oldd, int newd); 157 int dup2 (int oldd, int newd);
157 #endif 158 #endif
159 #ifndef HAVE_STRERROR 160 #ifndef HAVE_STRERROR
160 /* X11R6 defines strerror as a macro */ 161 /* X11R6 defines strerror as a macro */
161 # ifdef strerror 162 # ifdef strerror
162 # undef strerror 163 # undef strerror
163 # endif 164 # endif
164 CONST char *strerror (int); 165 const char *strerror (int);
165 #endif 166 #endif
166 167
167 #ifdef WINDOWSNT 168 int interruptible_open (const char *path, int oflag, int mode);
168 void mswindows_set_errno (unsigned long win32_error);
169 void mswindows_set_last_errno (void);
170 #endif
171
172 int interruptible_open (CONST char *path, int oflag, int mode);
173 169
174 #ifndef HAVE_H_ERRNO 170 #ifndef HAVE_H_ERRNO
175 extern int h_errno; 171 extern int h_errno;
176 #endif 172 #endif
177 173
178 #ifdef HAVE_REALPATH 174 #ifdef HAVE_REALPATH
179 #define xrealpath realpath 175 #define xrealpath realpath
180 #else 176 #else
181 char *xrealpath(CONST char *path, char resolved_path []); 177 char *xrealpath(const char *path, char resolved_path []);
182 #endif 178 #endif
183 179
184 #endif /* INCLUDED_sysdep_h_ */ 180 #endif /* INCLUDED_sysdep_h_ */