# HG changeset patch # User Andreas Schwab # Date 891857666 0 # Node ID 1a8c44e38d9c4813faefa632b9771bf1b1568f58 # Parent 4812cf2289717b53b99d9a0fe5a49369f0dd78a2 Include if available. (main, handle_signals, perror_1, fatal_error): Explicitly declare return types. Add forward declarations. diff -r 4812cf228971 -r 1a8c44e38d9c lib-src/emacsserver.c --- a/lib-src/emacsserver.c Mon Apr 06 10:13:46 1998 +0000 +++ b/lib-src/emacsserver.c Mon Apr 06 10:14:26 1998 +0000 @@ -37,6 +37,7 @@ #if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC) #include +int main () { fprintf (stderr, "Sorry, the Emacs server is supported only on systems\n"); @@ -46,6 +47,9 @@ #else /* HAVE_SOCKETS or HAVE_SYSVIPC */ +void perror_1 (); +void fatal_error (); + #if defined (HAVE_SOCKETS) && ! defined (NO_SOCKETS_IN_FILE_SYSTEM) /* BSD code is very different from SYSV IPC code */ @@ -57,6 +61,10 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif + extern int errno; /* Copied from src/process.c */ @@ -104,6 +112,7 @@ /* Set up to handle all the signals. */ +void handle_signals () { signal (SIGHUP, delete_socket); @@ -414,6 +423,7 @@ Its stderr always exists--rms. */ #include +int main () { int s, infd, fromlen, ioproc; @@ -547,6 +557,7 @@ /* This is like perror but puts `Error: ' at the beginning. */ +void perror_1 (string) char *string; { @@ -559,6 +570,7 @@ perror (copy); } +void fatal_error (string) char *string; {