diff options
| author | Stefan Monnier | 2009-12-03 18:51:32 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-12-03 18:51:32 +0000 |
| commit | f00c449ba1e11bda4b50d39b9ab60dfc9c889b05 (patch) | |
| tree | a97f103db67f3d494808b32eaedbc2af5b86600b /src/process.c | |
| parent | 627e0a14e8718945668b246f18053df0f82ed383 (diff) | |
| download | emacs-f00c449ba1e11bda4b50d39b9ab60dfc9c889b05.tar.gz emacs-f00c449ba1e11bda4b50d39b9ab60dfc9c889b05.zip | |
(Qseqpacket): New symbol.
(HAVE_SEQPACKET): New macro.
(Fmake_network_process): Accept new :type `seqpacket'.
(init_process): Add `seqpacket' feature when applicable.
(syms_of_process): Initialize Qseqpacket.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 90f2a9aa6bb..61cf86e4eb3 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -127,7 +127,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 127 | Lisp_Object Qprocessp; | 127 | Lisp_Object Qprocessp; |
| 128 | Lisp_Object Qrun, Qstop, Qsignal; | 128 | Lisp_Object Qrun, Qstop, Qsignal; |
| 129 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; | 129 | Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; |
| 130 | Lisp_Object Qlocal, Qipv4, Qdatagram; | 130 | Lisp_Object Qlocal, Qipv4, Qdatagram, Qseqpacket; |
| 131 | Lisp_Object Qreal, Qnetwork, Qserial; | 131 | Lisp_Object Qreal, Qnetwork, Qserial; |
| 132 | #ifdef AF_INET6 | 132 | #ifdef AF_INET6 |
| 133 | Lisp_Object Qipv6; | 133 | Lisp_Object Qipv6; |
| @@ -253,6 +253,10 @@ int update_tick; | |||
| 253 | #endif /* DATAGRAM_SOCKETS */ | 253 | #endif /* DATAGRAM_SOCKETS */ |
| 254 | #endif /* BROKEN_DATAGRAM_SOCKETS */ | 254 | #endif /* BROKEN_DATAGRAM_SOCKETS */ |
| 255 | 255 | ||
| 256 | #if defined HAVE_LOCAL_SOCKETS && defined DATAGRAM_SOCKETS | ||
| 257 | # define HAVE_SEQPACKET | ||
| 258 | #endif | ||
| 259 | |||
| 256 | #if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING) | 260 | #if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING) |
| 257 | #ifdef EMACS_HAS_USECS | 261 | #ifdef EMACS_HAS_USECS |
| 258 | #define ADAPTIVE_READ_BUFFERING | 262 | #define ADAPTIVE_READ_BUFFERING |
| @@ -3123,7 +3127,8 @@ compiled with getaddrinfo, a port number can also be specified as a | |||
| 3123 | string, e.g. "80", as well as an integer. This is not portable.) | 3127 | string, e.g. "80", as well as an integer. This is not portable.) |
| 3124 | 3128 | ||
| 3125 | :type TYPE -- TYPE is the type of connection. The default (nil) is a | 3129 | :type TYPE -- TYPE is the type of connection. The default (nil) is a |
| 3126 | stream type connection, `datagram' creates a datagram type connection. | 3130 | stream type connection, `datagram' creates a datagram type connection, |
| 3131 | `seqpacket' creates a reliable datagram connection. | ||
| 3127 | 3132 | ||
| 3128 | :family FAMILY -- FAMILY is the address (and protocol) family for the | 3133 | :family FAMILY -- FAMILY is the address (and protocol) family for the |
| 3129 | service specified by HOST and SERVICE. The default (nil) is to use | 3134 | service specified by HOST and SERVICE. The default (nil) is to use |
| @@ -3302,6 +3307,10 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3302 | else if (EQ (tem, Qdatagram)) | 3307 | else if (EQ (tem, Qdatagram)) |
| 3303 | socktype = SOCK_DGRAM; | 3308 | socktype = SOCK_DGRAM; |
| 3304 | #endif | 3309 | #endif |
| 3310 | #ifdef HAVE_SEQPACKET | ||
| 3311 | else if (EQ (tem, Qseqpacket)) | ||
| 3312 | socktype = SOCK_SEQPACKET; | ||
| 3313 | #endif | ||
| 3305 | else | 3314 | else |
| 3306 | error ("Unsupported connection type"); | 3315 | error ("Unsupported connection type"); |
| 3307 | 3316 | ||
| @@ -6859,7 +6868,7 @@ exec_sentinel (proc, reason) | |||
| 6859 | record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); | 6868 | record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); |
| 6860 | /* Inhibit quit so that random quits don't screw up a running filter. */ | 6869 | /* Inhibit quit so that random quits don't screw up a running filter. */ |
| 6861 | specbind (Qinhibit_quit, Qt); | 6870 | specbind (Qinhibit_quit, Qt); |
| 6862 | specbind (Qlast_nonmenu_event, Qt); | 6871 | specbind (Qlast_nonmenu_event, Qt); /* Why? --Stef */ |
| 6863 | 6872 | ||
| 6864 | /* In case we get recursively called, | 6873 | /* In case we get recursively called, |
| 6865 | and we already saved the match data nonrecursively, | 6874 | and we already saved the match data nonrecursively, |
| @@ -7330,6 +7339,9 @@ init_process () | |||
| 7330 | #ifdef DATAGRAM_SOCKETS | 7339 | #ifdef DATAGRAM_SOCKETS |
| 7331 | ADD_SUBFEATURE (QCtype, Qdatagram); | 7340 | ADD_SUBFEATURE (QCtype, Qdatagram); |
| 7332 | #endif | 7341 | #endif |
| 7342 | #ifdef HAVE_SEQPACKET | ||
| 7343 | ADD_SUBFEATURE (QCtype, Qseqpacket); | ||
| 7344 | #endif | ||
| 7333 | #ifdef HAVE_LOCAL_SOCKETS | 7345 | #ifdef HAVE_LOCAL_SOCKETS |
| 7334 | ADD_SUBFEATURE (QCfamily, Qlocal); | 7346 | ADD_SUBFEATURE (QCfamily, Qlocal); |
| 7335 | #endif | 7347 | #endif |
| @@ -7403,6 +7415,8 @@ syms_of_process () | |||
| 7403 | #endif | 7415 | #endif |
| 7404 | Qdatagram = intern_c_string ("datagram"); | 7416 | Qdatagram = intern_c_string ("datagram"); |
| 7405 | staticpro (&Qdatagram); | 7417 | staticpro (&Qdatagram); |
| 7418 | Qseqpacket = intern_c_string ("seqpacket"); | ||
| 7419 | staticpro (&Qseqpacket); | ||
| 7406 | 7420 | ||
| 7407 | QCport = intern_c_string (":port"); | 7421 | QCport = intern_c_string (":port"); |
| 7408 | staticpro (&QCport); | 7422 | staticpro (&QCport); |