summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-02-26 04:16:01 +0000
committerRoland McGrath <roland@gnu.org>2001-02-26 04:16:01 +0000
commit43dc903ebfb710ea2e7844859d9c722b81e71799 (patch)
treeaad36af3ade5b690f0fc720f833620025cc57a11
parented7c279a06c09c49c5b9d41af284a162f94838cb (diff)
2001-02-25 Roland McGrath <roland@frob.com>
* symlink.c: Include <string.h> for decls of built-ins. * firmlink.c: Include <stdlib.h> for exit decl. * ifsock.c: Likewise. * null.c: Likewise. * magic.c: Likewise. * fifo.c: Likewise. * hello.c: Likewise. * hello-mt.c: Likewise.
-rw-r--r--trans/fifo.c6
-rw-r--r--trans/firmlink.c3
-rw-r--r--trans/hello-mt.c3
-rw-r--r--trans/hello.c3
-rw-r--r--trans/ifsock.c13
-rw-r--r--trans/magic.c3
-rw-r--r--trans/null.c6
-rw-r--r--trans/symlink.c11
8 files changed, 27 insertions, 21 deletions
diff --git a/trans/fifo.c b/trans/fifo.c
index ce48c2fb..b295ed55 100644
--- a/trans/fifo.c
+++ b/trans/fifo.c
@@ -1,8 +1,7 @@
/* A translator for fifos
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1995,96,97,98,2001 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -19,6 +18,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <error.h>
diff --git a/trans/firmlink.c b/trans/firmlink.c
index bb2d12a3..1a8740f3 100644
--- a/trans/firmlink.c
+++ b/trans/firmlink.c
@@ -1,6 +1,6 @@
/* A translator for `firmlinks'
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -19,6 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
diff --git a/trans/hello-mt.c b/trans/hello-mt.c
index f0d78614..83278e1b 100644
--- a/trans/hello-mt.c
+++ b/trans/hello-mt.c
@@ -1,5 +1,5 @@
/* hello-mt.c - A trivial single-file translator, multithreaded version
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -19,6 +19,7 @@
#include <hurd/trivfs.h>
#include <stdio.h>
+#include <stdlib.h>
#include <argp.h>
#include <argz.h>
#include <error.h>
diff --git a/trans/hello.c b/trans/hello.c
index 4199dd34..5c53c193 100644
--- a/trans/hello.c
+++ b/trans/hello.c
@@ -1,5 +1,5 @@
/* hello.c - A trivial single-file translator
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
Gordon Matzigkeit <gord@fig.org>, 1999
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -19,6 +19,7 @@
#include <hurd/trivfs.h>
#include <stdio.h>
+#include <stdlib.h>
#include <argp.h>
#include <argz.h>
#include <error.h>
diff --git a/trans/ifsock.c b/trans/ifsock.c
index 15fb7df3..319db6b3 100644
--- a/trans/ifsock.c
+++ b/trans/ifsock.c
@@ -1,5 +1,5 @@
/* Server for S_IFSOCK nodes
- Copyright (C) 1994, 1995 Free Software Foundation
+ Copyright (C) 1994, 1995, 2001 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -23,6 +23,7 @@
#include <hurd/socket.h>
#include <hurd/fsys.h>
#include <stdio.h>
+#include <stdlib.h>
#include <error.h>
#include <fcntl.h>
@@ -72,7 +73,7 @@ main (int argc, char **argv)
task_get_bootstrap_port (mach_task_self (), &bootstrap);
if (bootstrap == MACH_PORT_NULL)
error(1, 0, "Must be started as a translator");
-
+
/* Reply to our parent */
err = trivfs_startup (bootstrap, 0, control_class, port_bucket,
node_class, port_bucket, NULL);
@@ -115,18 +116,18 @@ error_t
S_ifsock_getsockaddr (file_t sockfile,
mach_port_t *address)
{
- struct trivfs_protid *cred = ports_lookup_port (port_bucket, sockfile,
+ struct trivfs_protid *cred = ports_lookup_port (port_bucket, sockfile,
node_class);
int perms;
error_t err;
-
+
if (!cred)
return EOPNOTSUPP;
-
+
err = file_check_access (cred->realnode, &perms);
if (!err && !(perms & O_READ))
err = EACCES;
-
+
if (!err)
*address = address_port;
ports_port_deref (cred);
diff --git a/trans/magic.c b/trans/magic.c
index 670b6f41..824bd5bd 100644
--- a/trans/magic.c
+++ b/trans/magic.c
@@ -1,6 +1,6 @@
/* A translator for returning FS_RETRY_MAGIC strings.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -23,6 +23,7 @@
#include <version.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <error.h>
diff --git a/trans/null.c b/trans/null.c
index ecec5c94..3f5c9839 100644
--- a/trans/null.c
+++ b/trans/null.c
@@ -1,8 +1,7 @@
/* A translator for providing endless empty space and immediate eof.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
-
- Written by Miles Bader <miles@gnu.ai.mit.edu>
+ Copyright (C) 1995,96,97,98,99,2001 Free Software Foundation, Inc.
+ Written by Miles Bader <miles@gnu.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -25,6 +24,7 @@
#include <version.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <error.h>
#include <string.h>
diff --git a/trans/symlink.c b/trans/symlink.c
index 6235d272..bacf6f03 100644
--- a/trans/symlink.c
+++ b/trans/symlink.c
@@ -1,5 +1,5 @@
/* Translator for S_IFLNK nodes
- Copyright (C) 1994, 2000 Free Software Foundation
+ Copyright (C) 1994, 2000, 2001 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -17,6 +17,8 @@
#include <hurd.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <hurd/fsys.h>
#include <fcntl.h>
#include "fsys_S.h"
@@ -37,14 +39,14 @@ main (int argc, char **argv)
mach_port_t bootstrap;
mach_port_t control;
error_t error;
-
+
task_get_bootstrap_port (mach_task_self (), &bootstrap);
if (bootstrap == MACH_PORT_NULL)
{
fprintf (stderr, "%s must be started as a translator\n", argv[0]);
exit (1);
}
-
+
if (argc != 2)
{
fprintf (stderr, "Usage: %s link-target\n", argv[0]);
@@ -130,8 +132,7 @@ S_fsys_startup (mach_port_t bootstrap, int flags, mach_port_t control,
}
error_t
-S_fsys_goaway (mach_port_t control,
- int flags)
+S_fsys_goaway (mach_port_t control, int flags)
{
exit (0);
}