diff options
| author | Andreas Schwab | 1998-04-06 10:14:26 +0000 |
|---|---|---|
| committer | Andreas Schwab | 1998-04-06 10:14:26 +0000 |
| commit | 4e7ef1d6c58795f33fbf49f4d57289669b5dfeae (patch) | |
| tree | 23e8b729c5c27b9154e8d0f2b5fd4fcd3a776bac /lib-src/emacsserver.c | |
| parent | 7f3bff3e4cf05e54e37047f28c15a2747404125f (diff) | |
| download | emacs-4e7ef1d6c58795f33fbf49f4d57289669b5dfeae.tar.gz emacs-4e7ef1d6c58795f33fbf49f4d57289669b5dfeae.zip | |
Include <unistd.h> if available.
(main, handle_signals, perror_1, fatal_error): Explicitly declare
return types. Add forward declarations.
Diffstat (limited to 'lib-src/emacsserver.c')
| -rw-r--r-- | lib-src/emacsserver.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib-src/emacsserver.c b/lib-src/emacsserver.c index ad5285de453..3675c8efcaf 100644 --- a/lib-src/emacsserver.c +++ b/lib-src/emacsserver.c | |||
| @@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 37 | #if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC) | 37 | #if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC) |
| 38 | #include <stdio.h> | 38 | #include <stdio.h> |
| 39 | 39 | ||
| 40 | int | ||
| 40 | main () | 41 | main () |
| 41 | { | 42 | { |
| 42 | fprintf (stderr, "Sorry, the Emacs server is supported only on systems\n"); | 43 | fprintf (stderr, "Sorry, the Emacs server is supported only on systems\n"); |
| @@ -46,6 +47,9 @@ main () | |||
| 46 | 47 | ||
| 47 | #else /* HAVE_SOCKETS or HAVE_SYSVIPC */ | 48 | #else /* HAVE_SOCKETS or HAVE_SYSVIPC */ |
| 48 | 49 | ||
| 50 | void perror_1 (); | ||
| 51 | void fatal_error (); | ||
| 52 | |||
| 49 | #if defined (HAVE_SOCKETS) && ! defined (NO_SOCKETS_IN_FILE_SYSTEM) | 53 | #if defined (HAVE_SOCKETS) && ! defined (NO_SOCKETS_IN_FILE_SYSTEM) |
| 50 | /* BSD code is very different from SYSV IPC code */ | 54 | /* BSD code is very different from SYSV IPC code */ |
| 51 | 55 | ||
| @@ -57,6 +61,10 @@ main () | |||
| 57 | #include <errno.h> | 61 | #include <errno.h> |
| 58 | #include <sys/stat.h> | 62 | #include <sys/stat.h> |
| 59 | 63 | ||
| 64 | #ifdef HAVE_UNISTD_H | ||
| 65 | #include <unistd.h> | ||
| 66 | #endif | ||
| 67 | |||
| 60 | extern int errno; | 68 | extern int errno; |
| 61 | 69 | ||
| 62 | /* Copied from src/process.c */ | 70 | /* Copied from src/process.c */ |
| @@ -104,6 +112,7 @@ delete_socket (sig) | |||
| 104 | 112 | ||
| 105 | /* Set up to handle all the signals. */ | 113 | /* Set up to handle all the signals. */ |
| 106 | 114 | ||
| 115 | void | ||
| 107 | handle_signals () | 116 | handle_signals () |
| 108 | { | 117 | { |
| 109 | signal (SIGHUP, delete_socket); | 118 | signal (SIGHUP, delete_socket); |
| @@ -414,6 +423,7 @@ msgcatch () | |||
| 414 | Its stderr always exists--rms. */ | 423 | Its stderr always exists--rms. */ |
| 415 | #include <stdio.h> | 424 | #include <stdio.h> |
| 416 | 425 | ||
| 426 | int | ||
| 417 | main () | 427 | main () |
| 418 | { | 428 | { |
| 419 | int s, infd, fromlen, ioproc; | 429 | int s, infd, fromlen, ioproc; |
| @@ -547,6 +557,7 @@ main () | |||
| 547 | 557 | ||
| 548 | /* This is like perror but puts `Error: ' at the beginning. */ | 558 | /* This is like perror but puts `Error: ' at the beginning. */ |
| 549 | 559 | ||
| 560 | void | ||
| 550 | perror_1 (string) | 561 | perror_1 (string) |
| 551 | char *string; | 562 | char *string; |
| 552 | { | 563 | { |
| @@ -559,6 +570,7 @@ perror_1 (string) | |||
| 559 | perror (copy); | 570 | perror (copy); |
| 560 | } | 571 | } |
| 561 | 572 | ||
| 573 | void | ||
| 562 | fatal_error (string) | 574 | fatal_error (string) |
| 563 | char *string; | 575 | char *string; |
| 564 | { | 576 | { |