diff lib-src/gnuclient.c @ 458:c33ae14dd6d0 r21-2-44

Import from CVS: tag r21-2-44
author cvs
date Mon, 13 Aug 2007 11:42:25 +0200
parents e7ef97881643
children 0784d089fdc9
line wrap: on
line diff
--- a/lib-src/gnuclient.c	Mon Aug 13 11:41:26 2007 +0200
+++ b/lib-src/gnuclient.c	Mon Aug 13 11:42:25 2007 +0200
@@ -103,7 +103,7 @@
   signal(SIGCONT, tell_emacs_to_resume);
 #endif
 
-  connect_type = make_connection (NULL, (u_short) 0, &s);
+  connect_type = make_connection (NULL, 0, &s);
 
   sprintf(buffer,"(gnuserv-eval '(resume-pid-console %d))", (int)getpid());
   send_string(s, buffer);
@@ -156,11 +156,11 @@
 {
   if (cp == NULL)
     {				/* haven't calculated it yet */
-#ifdef BSD
+#ifdef HAVE_GETCWD
+      if (getcwd (cwd,MAXPATHLEN) == NULL)
+#else
       if (getwd (cwd) == 0)
-#else /* !BSD */
-      if (getcwd (cwd,MAXPATHLEN) == NULL)
-#endif /* !BSD */
+#endif /* HAVE_GETCWD */
 	{
 	  perror (progname);
 	  fprintf (stderr, "%s: unable to get current working directory\n",
@@ -337,7 +337,7 @@
   char *path;
   int rflg = 0;			/* pathname given on cmdline */
   char *portarg;
-  u_short port = 0;		/* port to server */
+  unsigned short port = 0;	/* port to server */
 #endif /* INTERNET_DOMAIN_SOCKETS */
 #ifdef SYSV_IPC
   struct msgbuf *msgp;		/* message */
@@ -488,7 +488,7 @@
 #if defined(INTERNET_DOMAIN_SOCKETS)
       connect_type = make_connection (hostarg, port, &s);
 #else
-      connect_type = make_connection (NULL, (u_short) 0, &s);
+      connect_type = make_connection (NULL, 0, &s);
 #endif
       sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : "");
       send_string (s, command);
@@ -526,7 +526,7 @@
 #if defined(INTERNET_DOMAIN_SOCKETS)
       connect_type = make_connection (hostarg, port, &s);
 #else
-      connect_type = make_connection (NULL, (u_short) 0, &s);
+      connect_type = make_connection (NULL, 0, &s);
 #endif
       sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : "");
       send_string (s, command);
@@ -560,7 +560,7 @@
 #if defined(INTERNET_DOMAIN_SOCKETS)
 	  connect_type = make_connection (hostarg, port, &s);
 #else
-	  connect_type = make_connection (NULL, (u_short) 0, &s);
+	  connect_type = make_connection (NULL, 0, &s);
 #endif
 	  send_string (s, "(gnuserv-eval '(emacs-pid))");
 	  send_string (s, EOT_STR);
@@ -585,7 +585,7 @@
 #if defined(INTERNET_DOMAIN_SOCKETS)
       connect_type = make_connection (hostarg, port, &s);
 #else
-      connect_type = make_connection (NULL, (u_short) 0, &s);
+      connect_type = make_connection (NULL, 0, &s);
 #endif
 
 #ifdef INTERNET_DOMAIN_SOCKETS