view src/s/isc4-1.h @ 73562:368665ce6f35

Add support for TCP sockets. (SEND_STRING, SEND_QUOTED, HSOCKET, CLOSE_SOCKET, IOCTL, INITIALIZE): New macros. (IOCTL_BOOL_ARG): New typedef. (server_file): New global variable. (longopts): New option --server-file. (decode_options): Process new option --server-file and environment variable EMACS_SERVER_FILE. (print_help_and_exit): Document new option. (fail): If no connection available and no alternate editor, suggest using options to make them explicit. (AUTH_KEY_LENGTH, SEND_BUFFER_SIZE): New constants. (send_buffer, sblen): New variables. (send_to_emacs): New function to buffer output and send it with send(). (quote_file_name): Use SEND_STRING. (close_winsock, initialize_sockets): New functions to load and unload Winsock. (get_server_config, set_tcp_socket): New functions to create and set up TCP sockets. (set_local_socket): New function to create and set up Unix socket (code moved from previous implementation). (set_socket): New function to chose between TCP and Unix sockets. (main): Use SEND_STRING and SEND_QUOTED. Most code moved to set_local_socket. Use set_socket. Get answers from server.el with recv(), not file stream functions.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 31 Oct 2006 00:21:19 +0000
parents 695cf19ef79e
children 375f2633d815
line wrap: on
line source

#include "isc3-0.h"

/* ISC 4.1 has renamed __setostype, but also has fixed the bug
   for which we needed to call it; so just do nothing.  uddeborg@carmen.se.  */
#undef EXTRA_INITIALIZE

#define ISC4_1

#undef LIBS_SYSTEM
#define LIBS_SYSTEM -linet

/* uddeborg@carmen.se recommends the rest of this file.  */

/* A special startup file is used when compiling with Posix. */
#define START_FILES pre-crt0.o /lib/crtp1.o

/* -lPW is only needed if not using Gcc. */
#undef LIB_STANDARD
#if defined (__GNUC__)
#  define LIB_STANDARD -lcposix -lc /lib/crtn.o
#else /* !__GNUC__ */
#  define LIB_STANDARD -lPW -lcposix -lc /lib/crtn.o
#endif /* !__GNUC__ */

/* We have Posix termios. */
#define HAVE_TERMIOS
/* According to template.h HAVE_TERMIO and HAVE_TERMIOS shouldn't be */
/* defined at the same time. */
#undef HAVE_TERMIO

/* ISC 4.1 has sys/wait.h but it does not work right.  */
#undef HAVE_SYS_WAIT_H

/* arch-tag: ec5c77d9-a330-4d93-8117-d2b374531c67
   (do not change this comment) */