aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index bafc7e02720..1ca9b793f3a 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -82,10 +82,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
82 82
83 83
84char *getenv (const char *), *getwd (char *); 84char *getenv (const char *), *getwd (char *);
85char *(getcwd) (); 85#ifdef HAVE_GETCWD
86char *(getcwd) (char *, size_t);
87#endif
86 88
87#ifdef WINDOWSNT 89#ifdef WINDOWSNT
88char *w32_getenv (); 90char *w32_getenv (char *);
89#define egetenv(VAR) w32_getenv(VAR) 91#define egetenv(VAR) w32_getenv(VAR)
90#else 92#else
91#define egetenv(VAR) getenv(VAR) 93#define egetenv(VAR) getenv(VAR)
@@ -158,6 +160,8 @@ char *server_file = NULL;
158int emacs_pid = 0; 160int emacs_pid = 0;
159 161
160void print_help_and_exit (void) NO_RETURN; 162void print_help_and_exit (void) NO_RETURN;
163void fail (void) NO_RETURN;
164
161 165
162struct option longopts[] = 166struct option longopts[] =
163{ 167{
@@ -400,7 +404,7 @@ w32_set_user_model_id (void)
400 /* On Windows 7 and later, we need to set the user model ID 404 /* On Windows 7 and later, we need to set the user model ID
401 to associate emacsclient launched files with Emacs frames 405 to associate emacsclient launched files with Emacs frames
402 in the UI. */ 406 in the UI. */
403 shell = LoadLibrary("shell32.dll"); 407 shell = LoadLibrary ("shell32.dll");
404 if (shell) 408 if (shell)
405 { 409 {
406 set_user_model 410 set_user_model
@@ -430,7 +434,7 @@ w32_window_app (void)
430 nonconsole apps. Testing for the console title seems to work. */ 434 nonconsole apps. Testing for the console title seems to work. */
431 window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0); 435 window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0);
432 if (window_app) 436 if (window_app)
433 InitCommonControls(); 437 InitCommonControls ();
434 } 438 }
435 439
436 return window_app; 440 return window_app;
@@ -481,7 +485,7 @@ ttyname (int fd)
481void 485void
482message (int is_error, char *message, ...) 486message (int is_error, char *message, ...)
483{ 487{
484 char msg [2048]; 488 char msg[2048];
485 va_list args; 489 va_list args;
486 490
487 va_start (args, message); 491 va_start (args, message);
@@ -1468,7 +1472,7 @@ start_daemon_and_retry_set_socket (void)
1468 pid_t w; 1472 pid_t w;
1469 w = waitpid (dpid, &status, WUNTRACED | WCONTINUED); 1473 w = waitpid (dpid, &status, WUNTRACED | WCONTINUED);
1470 1474
1471 if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS(status)) 1475 if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status))
1472 { 1476 {
1473 message (TRUE, "Error: Could not start the Emacs daemon\n"); 1477 message (TRUE, "Error: Could not start the Emacs daemon\n");
1474 exit (EXIT_FAILURE); 1478 exit (EXIT_FAILURE);