summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-04-06 10:14:26 +0000
committerAndreas Schwab <schwab@suse.de>1998-04-06 10:14:26 +0000
commita06b631e87f6b7811b0f5795d55b6e1b879d65eb (patch)
tree016e43e4b120831aeebf3508b22d7cd433c92bfa /lib-src
parentb3a0b703f5a464592f612699a22628c9115934f0 (diff)
downloademacs-a06b631e87f6b7811b0f5795d55b6e1b879d65eb.tar.gz
Include <unistd.h> if available.
(main, handle_signals, perror_1, fatal_error): Explicitly declare return types. Add forward declarations.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsserver.c12
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. */
#if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC)
#include <stdio.h>
+int
main ()
{
fprintf (stderr, "Sorry, the Emacs server is supported only on systems\n");
@@ -46,6 +47,9 @@ main ()
#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 @@ main ()
#include <errno.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
extern int errno;
/* Copied from src/process.c */
@@ -104,6 +112,7 @@ delete_socket (sig)
/* Set up to handle all the signals. */
+void
handle_signals ()
{
signal (SIGHUP, delete_socket);
@@ -414,6 +423,7 @@ msgcatch ()
Its stderr always exists--rms. */
#include <stdio.h>
+int
main ()
{
int s, infd, fromlen, ioproc;
@@ -547,6 +557,7 @@ main ()
/* This is like perror but puts `Error: ' at the beginning. */
+void
perror_1 (string)
char *string;
{
@@ -559,6 +570,7 @@ perror_1 (string)
perror (copy);
}
+void
fatal_error (string)
char *string;
{