mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
emacsclient.c cleanups.
* lib-src/emacsclient.c: Move socket related #includes together with the rest of the #includes. Move a WINDOWSNT includes closer together. (HAVE_CONFIG_H): Remove. (NO_RETURN): Remove, defined in config.h. (main): Convert definition to standard C.
This commit is contained in:
parent
b3d42406f8
commit
0613f5d515
2 changed files with 19 additions and 25 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
2010-08-06 Dan Nicolaescu <dann@ics.uci.edu>
|
||||||
|
|
||||||
|
* emacsclient.c: Move socket related #includes together with the
|
||||||
|
rest of the #includes. Move a WINDOWSNT includes closer together.
|
||||||
|
(HAVE_CONFIG_H): Remove.
|
||||||
|
(NO_RETURN): Remove, defined in config.h.
|
||||||
|
(main): Convert definition to standard C.
|
||||||
|
|
||||||
2010-07-29 Juanma Barranquero <lekktu@gmail.com>
|
2010-07-29 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
* make-docfile.c (write_c_args): Warn for old-style empty arglist ().
|
* make-docfile.c (write_c_args): Warn for old-style empty arglist ().
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,7 @@ You should have received a copy of the GNU General Public License
|
||||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
#ifdef WINDOWSNT
|
||||||
|
|
||||||
|
|
@ -32,6 +30,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <commctrl.h>
|
# include <commctrl.h>
|
||||||
|
# include <io.h>
|
||||||
|
# include <winsock2.h>
|
||||||
|
|
||||||
# define NO_SOCKETS_IN_FILE_SYSTEM
|
# define NO_SOCKETS_IN_FILE_SYSTEM
|
||||||
|
|
||||||
|
|
@ -45,8 +45,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
# ifdef HAVE_INET_SOCKETS
|
# ifdef HAVE_INET_SOCKETS
|
||||||
# include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
|
# ifdef HAVE_SOCKETS
|
||||||
|
# include <sys/types.h>
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# include <sys/un.h>
|
||||||
|
# endif /* HAVE_SOCKETS */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
|
|
||||||
# define INVALID_SOCKET -1
|
# define INVALID_SOCKET -1
|
||||||
|
|
@ -70,16 +74,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
|
||||||
# include <io.h>
|
|
||||||
#else /* not WINDOWSNT */
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif /* not WINDOWSNT */
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *getenv (const char *), *getwd (char *);
|
char *getenv (const char *), *getwd (char *);
|
||||||
#ifdef HAVE_GETCWD
|
#ifdef HAVE_GETCWD
|
||||||
|
|
@ -114,10 +114,6 @@ char *w32_getenv (char *);
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_RETURN
|
|
||||||
#define NO_RETURN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Additional space when allocating buffers for filenames, etc. */
|
/* Additional space when allocating buffers for filenames, etc. */
|
||||||
#define EXTRA_SPACE 100
|
#define EXTRA_SPACE 100
|
||||||
|
|
||||||
|
|
@ -702,9 +698,7 @@ fail (void)
|
||||||
#if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS)
|
#if !defined (HAVE_SOCKETS) || !defined (HAVE_INET_SOCKETS)
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (int argc, char **argv)
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
main_argv = argv;
|
main_argv = argv;
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
@ -716,14 +710,6 @@ main (argc, argv)
|
||||||
|
|
||||||
#else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */
|
#else /* HAVE_SOCKETS && HAVE_INET_SOCKETS */
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
|
||||||
# include <winsock2.h>
|
|
||||||
#else
|
|
||||||
# include <sys/types.h>
|
|
||||||
# include <sys/socket.h>
|
|
||||||
# include <sys/un.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AUTH_KEY_LENGTH 64
|
#define AUTH_KEY_LENGTH 64
|
||||||
#define SEND_BUFFER_SIZE 4096
|
#define SEND_BUFFER_SIZE 4096
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue