Mercurial > emacs
comparison src/process.c @ 110680:3bc79f337a57
Small process.c cleanups.
* src/process.c: Move #include <pty.h> earlier.
(SIGCHLD): Remove conditional definition, syssignal.h defines it.
(pty_name): Move definition later.
| author | Dan Nicolaescu <dann@ics.uci.edu> |
|---|---|
| date | Fri, 01 Oct 2010 06:04:07 -0700 |
| parents | 256dd50b2a63 |
| children | 55c8c3ca3d48 |
comparison
equal
deleted
inserted
replaced
| 110679:400dd9dfdb7b | 110680:3bc79f337a57 |
|---|---|
| 78 #include <resolv.h> | 78 #include <resolv.h> |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 #ifdef HAVE_UTIL_H | 81 #ifdef HAVE_UTIL_H |
| 82 #include <util.h> | 82 #include <util.h> |
| 83 #endif | |
| 84 | |
| 85 #ifdef HAVE_PTY_H | |
| 86 #include <pty.h> | |
| 83 #endif | 87 #endif |
| 84 | 88 |
| 85 #endif /* subprocesses */ | 89 #endif /* subprocesses */ |
| 86 | 90 |
| 87 #include "lisp.h" | 91 #include "lisp.h" |
| 169 #define SERIALCONN1_P(p) (EQ ((p)->type, Qserial)) | 173 #define SERIALCONN1_P(p) (EQ ((p)->type, Qserial)) |
| 170 | 174 |
| 171 /* Define first descriptor number available for subprocesses. */ | 175 /* Define first descriptor number available for subprocesses. */ |
| 172 #define FIRST_PROC_DESC 3 | 176 #define FIRST_PROC_DESC 3 |
| 173 | 177 |
| 174 /* Define SIGCHLD as an alias for SIGCLD. There are many conditionals | |
| 175 testing SIGCHLD. */ | |
| 176 | |
| 177 #if !defined (SIGCHLD) && defined (SIGCLD) | |
| 178 #define SIGCHLD SIGCLD | |
| 179 #endif /* SIGCLD */ | |
| 180 | |
| 181 extern const char *get_operating_system_release (void); | 178 extern const char *get_operating_system_release (void); |
| 182 | 179 |
| 183 /* From sysdep.c or w32.c */ | 180 /* From sysdep.c or w32.c */ |
| 184 extern int serial_open (char *port); | 181 extern int serial_open (char *port); |
| 185 extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); | 182 extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); |
| 354 #endif | 351 #endif |
| 355 | 352 |
| 356 /* Maximum number of bytes to send to a pty without an eof. */ | 353 /* Maximum number of bytes to send to a pty without an eof. */ |
| 357 static int pty_max_bytes; | 354 static int pty_max_bytes; |
| 358 | 355 |
| 359 #ifdef HAVE_PTYS | |
| 360 #ifdef HAVE_PTY_H | |
| 361 #include <pty.h> | |
| 362 #endif | |
| 363 /* The file name of the pty opened by allocate_pty. */ | |
| 364 | |
| 365 static char pty_name[24]; | |
| 366 #endif | |
| 367 | 356 |
| 368 | 357 |
| 369 struct fd_callback_data | 358 struct fd_callback_data |
| 370 { | 359 { |
| 371 fd_callback func; | 360 fd_callback func; |
| 560 else | 549 else |
| 561 return Fcopy_sequence (Fsymbol_name (symbol)); | 550 return Fcopy_sequence (Fsymbol_name (symbol)); |
| 562 } | 551 } |
| 563 | 552 |
| 564 #ifdef HAVE_PTYS | 553 #ifdef HAVE_PTYS |
| 554 | |
| 555 /* The file name of the pty opened by allocate_pty. */ | |
| 556 static char pty_name[24]; | |
| 565 | 557 |
| 566 /* Open an available pty, returning a file descriptor. | 558 /* Open an available pty, returning a file descriptor. |
| 567 Return -1 on failure. | 559 Return -1 on failure. |
| 568 The file name of the terminal corresponding to the pty | 560 The file name of the terminal corresponding to the pty |
| 569 is left in the variable pty_name. */ | 561 is left in the variable pty_name. */ |
