aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/boot.c2
-rw-r--r--console/console.c16
-rw-r--r--eth-multiplexer/ethernet.c2
-rw-r--r--exec/exec.c4
-rw-r--r--libdiskfs/dir-link.c2
-rw-r--r--libdiskfs/dir-lookup.c4
-rw-r--r--libdiskfs/dir-mkdir.c2
-rw-r--r--libdiskfs/dir-rename.c4
-rw-r--r--libdiskfs/dir-unlink.c2
-rw-r--r--libdiskfs/file-exec.c4
-rw-r--r--libdiskfs/fsys-get-source.c2
-rw-r--r--libdiskfs/fsys-getroot.c2
-rw-r--r--libdiskfs/io-version.c2
-rw-r--r--libmachdev/Makefile3
-rw-r--r--libmachdev/ds_routines.c5
-rw-r--r--libnetfs/dir-link.c4
-rw-r--r--libnetfs/dir-lookup.c4
-rw-r--r--libnetfs/dir-mkdir.c2
-rw-r--r--libnetfs/dir-rename.c4
-rw-r--r--libnetfs/dir-rmdir.c2
-rw-r--r--libnetfs/dir-unlink.c2
-rw-r--r--libnetfs/file-exec.c4
-rw-r--r--libnetfs/fsys-get-source.c2
-rw-r--r--libnetfs/fsys-getroot.c2
-rw-r--r--libnetfs/io-version.c2
-rw-r--r--libtrivfs/fsys-get-source.c2
-rw-r--r--libtrivfs/fsys-getroot.c2
-rw-r--r--libtrivfs/io-version.c4
-rw-r--r--lwip/iioctl-ops.c2
-rw-r--r--lwip/io-ops.c2
-rw-r--r--lwip/port/netif/hurdethif.c2
-rw-r--r--mach-defpager/default_pager.c3
-rw-r--r--pci-arbiter/main.c1
-rw-r--r--pfinet/ethernet.c10
-rw-r--r--pfinet/glue-include/linux/malloc.h2
-rw-r--r--pfinet/iioctl-ops.c2
-rw-r--r--pfinet/io-ops.c2
-rw-r--r--proc/host.c6
-rw-r--r--proc/info.c8
-rw-r--r--rumpdisk/main.c1
-rw-r--r--startup/startup.c6
-rw-r--r--sutils/clookup.c8
-rw-r--r--term/users.c30
-rw-r--r--trans/crash.c2
-rw-r--r--trans/fakeroot.c8
-rw-r--r--trans/password.c4
-rw-r--r--trans/streamio.c2
-rw-r--r--trans/symlink.c2
-rw-r--r--utils/ps.c1
49 files changed, 104 insertions, 92 deletions
diff --git a/boot/boot.c b/boot/boot.c
index feec4f6b..1cc6152f 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -1731,7 +1731,7 @@ kern_return_t
S_io_server_version (mach_port_t object,
mach_port_t reply_port,
mach_msg_type_name_t reply_type,
- char *name,
+ string_t name,
int *maj,
int *min,
int *edit)
diff --git a/console/console.c b/console/console.c
index 7306b6b8..ab684198 100644
--- a/console/console.c
+++ b/console/console.c
@@ -1853,29 +1853,29 @@ S_tioctl_tiocnxcl (struct protid *cred)
}
kern_return_t
-S_tioctl_tiocgeta (struct protid *cred, tcflag_t *modes, cc_t *ccs,
- speed_t *speeds)
+S_tioctl_tiocgeta (struct protid *cred, modes_t modes, ccs_t ccs,
+ speeds_t speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocseta (struct protid *cred, tcflag_t *modes, cc_t *ccs,
- speed_t *speeds)
+S_tioctl_tiocseta (struct protid *cred, modes_t modes, ccs_t ccs,
+ speeds_t speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsetaw (struct protid *cred, tcflag_t *modes, cc_t *ccs,
- speed_t *speeds)
+S_tioctl_tiocsetaw (struct protid *cred, modes_t modes, ccs_t ccs,
+ speeds_t speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsetaf (struct protid *cred, tcflag_t *modes, cc_t *ccs,
- speed_t *speeds)
+S_tioctl_tiocsetaf (struct protid *cred, modes_t modes, ccs_t ccs,
+ speeds_t speeds)
{
return EOPNOTSUPP;
}
diff --git a/eth-multiplexer/ethernet.c b/eth-multiplexer/ethernet.c
index c8849aa1..e45a4b94 100644
--- a/eth-multiplexer/ethernet.c
+++ b/eth-multiplexer/ethernet.c
@@ -59,7 +59,7 @@ static struct bpf_insn ether_filter[] =
{6, 0, 0, 1500},
{6, 0, 0, 0}
};
-static int ether_filter_len = sizeof (ether_filter) / sizeof (short);
+static int ether_filter_len = sizeof (ether_filter) / (sizeof (short));
int ethernet_demuxer (mach_msg_header_t *inp,
mach_msg_header_t *outp)
diff --git a/exec/exec.c b/exec/exec.c
index 05608b86..eeb2715c 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -1562,8 +1562,8 @@ S_exec_exec_paths (struct trivfs_protid *protid,
file_t file,
task_t oldtask,
int flags,
- char *path,
- char *abspath,
+ string_t path,
+ string_t abspath,
char *argv, mach_msg_type_number_t argvlen,
boolean_t argv_copy,
char *envp, mach_msg_type_number_t envplen,
diff --git a/libdiskfs/dir-link.c b/libdiskfs/dir-link.c
index 403e9d5c..2e9cb626 100644
--- a/libdiskfs/dir-link.c
+++ b/libdiskfs/dir-link.c
@@ -22,7 +22,7 @@
kern_return_t
diskfs_S_dir_link (struct protid *dircred,
struct protid *filecred,
- char *name,
+ string_t name,
int excl)
{
struct node *np; /* node being linked */
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index f005dd86..3534facf 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -30,11 +30,11 @@
/* Implement dir_lookup as described in <hurd/fs.defs>. */
error_t
diskfs_S_dir_lookup (struct protid *dircred,
- char *filename,
+ string_t filename,
int flags,
mode_t mode,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *retry_port,
mach_msg_type_name_t *retry_port_type)
{
diff --git a/libdiskfs/dir-mkdir.c b/libdiskfs/dir-mkdir.c
index 1ddb8087..f8c07a55 100644
--- a/libdiskfs/dir-mkdir.c
+++ b/libdiskfs/dir-mkdir.c
@@ -21,7 +21,7 @@
/* Implement dir_mkdir as found in <hurd/fs.defs>. */
kern_return_t
diskfs_S_dir_mkdir (struct protid *dircred,
- char *name,
+ string_t name,
mode_t mode)
{
struct node *dnp;
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index 90f7c683..b12dd018 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -29,9 +29,9 @@ static pthread_mutex_t renamedirlock = PTHREAD_MUTEX_INITIALIZER;
/* Implement dir_rename as described in <hurd/fs.defs>. */
kern_return_t
diskfs_S_dir_rename (struct protid *fromcred,
- char *fromname,
+ string_t fromname,
struct protid *tocred,
- char *toname,
+ string_t toname,
int excl)
{
struct node *fdp, *tdp, *fnp, *tnp, *tmpnp;
diff --git a/libdiskfs/dir-unlink.c b/libdiskfs/dir-unlink.c
index cf02c227..2a54cc38 100644
--- a/libdiskfs/dir-unlink.c
+++ b/libdiskfs/dir-unlink.c
@@ -22,7 +22,7 @@
/* Implement dir_unlink as described in <hurd/fs.defs>. */
kern_return_t
diskfs_S_dir_unlink (struct protid *dircred,
- char *name)
+ string_t name)
{
struct node *dnp;
struct node *np;
diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c
index f5939647..7625cf43 100644
--- a/libdiskfs/file-exec.c
+++ b/libdiskfs/file-exec.c
@@ -66,8 +66,8 @@ kern_return_t
diskfs_S_file_exec_paths (struct protid *cred,
task_t task,
int flags,
- char *path,
- char *abspath,
+ string_t path,
+ string_t abspath,
char *argv,
size_t argvlen,
char *envp,
diff --git a/libdiskfs/fsys-get-source.c b/libdiskfs/fsys-get-source.c
index 59eee55e..cd151560 100644
--- a/libdiskfs/fsys-get-source.c
+++ b/libdiskfs/fsys-get-source.c
@@ -30,7 +30,7 @@ error_t
diskfs_S_fsys_get_source (struct diskfs_control *fsys,
mach_port_t reply,
mach_msg_type_name_t replytype,
- char *source)
+ string_t source)
{
if (! fsys)
return EOPNOTSUPP;
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 2c0d15dd..81bd7db4 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -37,7 +37,7 @@ diskfs_S_fsys_getroot (struct diskfs_control *pt,
size_t ngids,
int flags,
retry_type *retry,
- char *retryname,
+ string_t retryname,
file_t *returned_port,
mach_msg_type_name_t *returned_port_poly)
{
diff --git a/libdiskfs/io-version.c b/libdiskfs/io-version.c
index fc0922de..ed6b0322 100644
--- a/libdiskfs/io-version.c
+++ b/libdiskfs/io-version.c
@@ -26,7 +26,7 @@
kern_return_t
diskfs_S_io_server_version (struct protid *cred,
- char *server_name,
+ string_t server_name,
int *major,
int *minor,
int *edit)
diff --git a/libmachdev/Makefile b/libmachdev/Makefile
index f5dac9ba..a4a58198 100644
--- a/libmachdev/Makefile
+++ b/libmachdev/Makefile
@@ -29,6 +29,7 @@ LDLIBS += -lpthread -lmachuser
OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name"
-mach_i386-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name"
+mach_i386-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" \
+ "-DMACH_I386_IMPORTS=import \"$(srcdir)/../libports/ports.h\";"
include ../Makeconf
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index ac915166..b12d1ff3 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -90,7 +90,8 @@ static int num_emul = 0;
io_return_t
ds_device_open (mach_port_t open_port, mach_port_t reply_port,
mach_msg_type_name_t reply_port_type, dev_mode_t mode,
- char *name, device_t *devp, mach_msg_type_name_t *devicePoly)
+ dev_name_t name, device_t *devp,
+ mach_msg_type_name_t *devicePoly)
{
int i;
mach_port_t dev_master;
@@ -201,7 +202,7 @@ ds_device_read (struct mach_device *device, mach_port_t reply_port,
io_return_t
ds_device_read_inband (struct mach_device *device, mach_port_t reply_port,
mach_msg_type_name_t reply_port_type, dev_mode_t mode,
- recnum_t recnum, int count, char *data,
+ recnum_t recnum, int count, io_buf_ptr_inband_t data,
unsigned *bytes_read)
{
/* Refuse if device is dead or not completely open. */
diff --git a/libnetfs/dir-link.c b/libnetfs/dir-link.c
index 637f4a3a..0881adf4 100644
--- a/libnetfs/dir-link.c
+++ b/libnetfs/dir-link.c
@@ -22,8 +22,8 @@
#include "fs_S.h"
error_t
-netfs_S_dir_link (struct protid *diruser, struct protid *fileuser, char *name,
- int excl)
+netfs_S_dir_link (struct protid *diruser, struct protid *fileuser,
+ string_t name, int excl)
{
error_t err;
diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c
index 23adeb33..85436ca0 100644
--- a/libnetfs/dir-lookup.c
+++ b/libnetfs/dir-lookup.c
@@ -29,11 +29,11 @@
error_t
netfs_S_dir_lookup (struct protid *dircred,
- char *filename,
+ string_t filename,
int flags,
mode_t mode,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *retry_port,
mach_msg_type_name_t *retry_port_type)
{
diff --git a/libnetfs/dir-mkdir.c b/libnetfs/dir-mkdir.c
index c8bebac8..0ba42f9b 100644
--- a/libnetfs/dir-mkdir.c
+++ b/libnetfs/dir-mkdir.c
@@ -22,7 +22,7 @@
#include "fs_S.h"
error_t
-netfs_S_dir_mkdir (struct protid *user, char *name, mode_t mode)
+netfs_S_dir_mkdir (struct protid *user, string_t name, mode_t mode)
{
error_t err;
diff --git a/libnetfs/dir-rename.c b/libnetfs/dir-rename.c
index 21362194..365b29ce 100644
--- a/libnetfs/dir-rename.c
+++ b/libnetfs/dir-rename.c
@@ -22,8 +22,8 @@
#include "fs_S.h"
error_t
-netfs_S_dir_rename (struct protid *fromdiruser, char *fromname,
- struct protid *todiruser, char *toname, int excl)
+netfs_S_dir_rename (struct protid *fromdiruser, string_t fromname,
+ struct protid *todiruser, string_t toname, int excl)
{
error_t err;
diff --git a/libnetfs/dir-rmdir.c b/libnetfs/dir-rmdir.c
index 96196fd4..36c97359 100644
--- a/libnetfs/dir-rmdir.c
+++ b/libnetfs/dir-rmdir.c
@@ -22,7 +22,7 @@
#include "fs_S.h"
error_t
-netfs_S_dir_rmdir (struct protid *diruser, char *name)
+netfs_S_dir_rmdir (struct protid *diruser, string_t name)
{
error_t err;
diff --git a/libnetfs/dir-unlink.c b/libnetfs/dir-unlink.c
index 6f1eaca6..ed27e4d9 100644
--- a/libnetfs/dir-unlink.c
+++ b/libnetfs/dir-unlink.c
@@ -22,7 +22,7 @@
#include "fs_S.h"
error_t
-netfs_S_dir_unlink (struct protid *user, char *name)
+netfs_S_dir_unlink (struct protid *user, string_t name)
{
error_t err;
diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c
index 0f0f2864..fb070aca 100644
--- a/libnetfs/file-exec.c
+++ b/libnetfs/file-exec.c
@@ -68,8 +68,8 @@ kern_return_t
netfs_S_file_exec_paths (struct protid *cred,
task_t task,
int flags,
- char *path,
- char *abspath,
+ string_t path,
+ string_t abspath,
char *argv,
size_t argvlen,
char *envp,
diff --git a/libnetfs/fsys-get-source.c b/libnetfs/fsys-get-source.c
index bd33cb21..65431d4b 100644
--- a/libnetfs/fsys-get-source.c
+++ b/libnetfs/fsys-get-source.c
@@ -30,7 +30,7 @@ error_t
netfs_S_fsys_get_source (struct netfs_control *fsys,
mach_port_t reply,
mach_msg_type_name_t reply_type,
- char *source)
+ string_t source)
{
if (! fsys)
return EOPNOTSUPP;
diff --git a/libnetfs/fsys-getroot.c b/libnetfs/fsys-getroot.c
index d9191105..514fc37c 100644
--- a/libnetfs/fsys-getroot.c
+++ b/libnetfs/fsys-getroot.c
@@ -34,7 +34,7 @@ netfs_S_fsys_getroot (struct netfs_control *pt,
uid_t *gids, mach_msg_type_number_t ngids,
int flags,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *retry_port,
mach_msg_type_name_t *retry_port_type)
{
diff --git a/libnetfs/io-version.c b/libnetfs/io-version.c
index 46152537..927f50c2 100644
--- a/libnetfs/io-version.c
+++ b/libnetfs/io-version.c
@@ -26,7 +26,7 @@
kern_return_t
netfs_S_io_server_version (struct protid *cred,
- char *server_name,
+ string_t server_name,
int *major,
int *minor,
int *edit)
diff --git a/libtrivfs/fsys-get-source.c b/libtrivfs/fsys-get-source.c
index 5d063eb8..37ae57d7 100644
--- a/libtrivfs/fsys-get-source.c
+++ b/libtrivfs/fsys-get-source.c
@@ -30,7 +30,7 @@ error_t
trivfs_S_fsys_get_source (struct trivfs_control *fsys,
mach_port_t reply,
mach_msg_type_name_t replyPoly,
- char *source)
+ string_t source)
{
return fsys ? trivfs_get_source (source, 1024 /* XXX */) : EOPNOTSUPP;
}
diff --git a/libtrivfs/fsys-getroot.c b/libtrivfs/fsys-getroot.c
index eac13284..6542ab16 100644
--- a/libtrivfs/fsys-getroot.c
+++ b/libtrivfs/fsys-getroot.c
@@ -35,7 +35,7 @@ trivfs_S_fsys_getroot (struct trivfs_control *cntl,
uid_t *gids, size_t ngids,
int flags,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *newpt,
mach_msg_type_name_t *newpttype)
{
diff --git a/libtrivfs/io-version.c b/libtrivfs/io-version.c
index 59a0ebef..206dd767 100644
--- a/libtrivfs/io-version.c
+++ b/libtrivfs/io-version.c
@@ -15,6 +15,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+#include <stdio.h>
+
#include "priv.h"
#include "trivfs_io_S.h"
@@ -22,7 +24,7 @@ kern_return_t
trivfs_S_io_server_version (trivfs_protid_t obj,
mach_port_t reply,
mach_msg_type_name_t replytype,
- char *name,
+ string_t name,
int *maj,
int *min,
int *edit)
diff --git a/lwip/iioctl-ops.c b/lwip/iioctl-ops.c
index 6d3b6cb9..0834cd32 100644
--- a/lwip/iioctl-ops.c
+++ b/lwip/iioctl-ops.c
@@ -193,7 +193,7 @@ lwip_S_iioctl_siocsifflags (struct sock_user * user,
/* 17 SIOCGIFFLAGS -- Get flags of a network interface. */
kern_return_t
-lwip_S_iioctl_siocgifflags (struct sock_user * user, char *name, short *flags)
+lwip_S_iioctl_siocgifflags (struct sock_user * user, ifname_t name, short *flags)
{
error_t err = 0;
struct netif *netif;
diff --git a/lwip/io-ops.c b/lwip/io-ops.c
index f2ee01af..8e84e46b 100644
--- a/lwip/io-ops.c
+++ b/lwip/io-ops.c
@@ -492,7 +492,7 @@ lwip_S_io_get_icky_async_id (struct sock_user * user,
error_t
lwip_S_io_server_version (struct sock_user * user,
- char *name, int *major, int *minor, int *edit)
+ string_t name, int *major, int *minor, int *edit)
{
return EOPNOTSUPP;
}
diff --git a/lwip/port/netif/hurdethif.c b/lwip/port/netif/hurdethif.c
index e076a3ac..ec899e40 100644
--- a/lwip/port/netif/hurdethif.c
+++ b/lwip/port/netif/hurdethif.c
@@ -75,7 +75,7 @@ static struct bpf_insn bpf_ether_filter[] = {
{BPF_RET | BPF_K, 0, 0, 0}, /* Or discard it all */
};
-static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / sizeof (short);
+static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / (sizeof (short));
/* Bucket and class for the incoming data */
struct port_bucket *etherport_bucket;
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index afdcc99e..c92a9e28 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -45,12 +45,15 @@
#include <hurd/ihash.h>
+#include <libshouldbeinlibc/wire.h>
+
#include "queue.h"
#include "wiring.h"
#include "default_pager.h"
#include <assert-backtrace.h>
#include <errno.h>
+#include <error.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/pci-arbiter/main.c b/pci-arbiter/main.c
index 88d89f0e..2955133c 100644
--- a/pci-arbiter/main.c
+++ b/pci-arbiter/main.c
@@ -40,6 +40,7 @@
#include "libports/interrupt_S.h"
#include "libnetfs/ifsock_S.h"
#include "libmachdev/machdev.h"
+#include "libshouldbeinlibc/wire.h"
#include <pciaccess.h>
#include <pthread.h>
#include "pcifs.h"
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index 5c69b54a..c317820c 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -71,7 +71,7 @@ ethernet_set_multi (struct device *dev)
{
}
-static short ether_filter[] =
+static filter_t ether_filter[] =
{
#ifdef NETF_IN
/* We have to tell the packet filtering code that we're interested in
@@ -93,7 +93,7 @@ static struct bpf_insn bpf_ether_filter[] =
{BPF_RET|BPF_K, 0, 0, 1500}, /* And return 1500 bytes */
{BPF_RET|BPF_K, 0, 0, 0}, /* Or discard it all */
};
-static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / sizeof (short);
+static int bpf_ether_filter_len = sizeof (bpf_ether_filter) / (sizeof (short));
static struct port_bucket *etherport_bucket;
@@ -219,7 +219,7 @@ ethernet_open (struct device *dev)
err = device_set_filter (edev->ether_port, ports_get_right (edev->readpt),
MACH_MSG_TYPE_MAKE_SEND, 0,
- bpf_ether_filter, bpf_ether_filter_len);
+ (filter_array_t) bpf_ether_filter, bpf_ether_filter_len);
if (err)
error (2, err, "device_set_filter on %s", dev->name);
}
@@ -273,13 +273,13 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev)
{
error_t err;
struct ether_device *edev = (struct ether_device *) dev->priv;
- u_int count;
+ int count;
u_int tried = 0;
do
{
tried++;
- err = device_write (edev->ether_port, D_NOWAIT, 0, skb->data, skb->len, &count);
+ err = device_write (edev->ether_port, D_NOWAIT, 0, (io_buf_ptr_t) skb->data, skb->len, &count);
if (err == EMACH_SEND_INVALID_DEST || err == EMIG_SERVER_DIED)
{
/* Device probably just died, try to reopen it. */
diff --git a/pfinet/glue-include/linux/malloc.h b/pfinet/glue-include/linux/malloc.h
index 46ae1051..276ee8eb 100644
--- a/pfinet/glue-include/linux/malloc.h
+++ b/pfinet/glue-include/linux/malloc.h
@@ -8,7 +8,7 @@
static inline void *kmalloc (size_t sz, int ignored) { return malloc (sz); }
static inline void kfree (void *ptr) { free (ptr); }
static inline void kfree_s (void *ptr, size_t sz) { free (ptr); }
-#define free(x) kfree(x) /* just don't ask */
+//#define free(x) kfree(x) /* just don't ask */
typedef struct kmem_cache_s kmem_cache_t;
diff --git a/pfinet/iioctl-ops.c b/pfinet/iioctl-ops.c
index be659582..72e557d9 100644
--- a/pfinet/iioctl-ops.c
+++ b/pfinet/iioctl-ops.c
@@ -192,7 +192,7 @@ S_iioctl_siocsifflags (struct sock_user *user,
/* 17 SIOCGIFFLAGS -- Get flags of a network interface. */
kern_return_t
S_iioctl_siocgifflags (struct sock_user *user,
- char *name,
+ ifname_t name,
short *flags)
{
error_t err = 0;
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 2e7dc641..a4b012c0 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -567,7 +567,7 @@ S_io_get_icky_async_id (struct sock_user *user,
error_t
S_io_server_version (struct sock_user *user,
- char *name,
+ string_t name,
int *major,
int *minor,
int *edit)
diff --git a/proc/host.c b/proc/host.c
index 7d76f7cb..9934837f 100644
--- a/proc/host.c
+++ b/proc/host.c
@@ -409,9 +409,9 @@ S_proc_uname (pstruct_t process,
kern_return_t
S_proc_register_version (pstruct_t server,
mach_port_t credential,
- char *name,
- char *release,
- char *version)
+ string_t name,
+ string_t release,
+ string_t version)
{
error_t err = 0;
int i;
diff --git a/proc/info.c b/proc/info.c
index 6c2567d2..435c718f 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -954,7 +954,7 @@ S_proc_getloginpids (struct proc *callerp,
/* Implement proc_setlogin as described in <hurd/process.defs>. */
kern_return_t
S_proc_setlogin (struct proc *p,
- char *login)
+ string_t login)
{
struct login *l;
@@ -979,7 +979,7 @@ S_proc_setlogin (struct proc *p,
/* Implement proc_getlogin as described in <hurd/process.defs>. */
kern_return_t
S_proc_getlogin (struct proc *p,
- char *login)
+ string_t login)
{
if (!p)
return EOPNOTSUPP;
@@ -1030,7 +1030,7 @@ S_proc_getnports (struct proc *callerp,
/* Implement proc_set_path as described in <hurd/process.defs>. */
kern_return_t
S_proc_set_exe (struct proc *p,
- char *path)
+ string_t path)
{
char *copy;
@@ -1050,7 +1050,7 @@ S_proc_set_exe (struct proc *p,
kern_return_t
S_proc_get_exe (struct proc *callerp,
pid_t pid,
- char *path)
+ string_t path)
{
struct proc *p = pid_find (pid);
diff --git a/rumpdisk/main.c b/rumpdisk/main.c
index 6a011e37..8dbe505a 100644
--- a/rumpdisk/main.c
+++ b/rumpdisk/main.c
@@ -27,6 +27,7 @@
#include <version.h>
#include "libmachdev/machdev.h"
+#include "libshouldbeinlibc/wire.h"
#include "block-rump.h"
#include <pthread.h>
#include <mach.h>
diff --git a/startup/startup.c b/startup/startup.c
index bc0ff73a..3db7e5b5 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -1459,7 +1459,7 @@ S_startup_essential_task (mach_port_t server,
mach_msg_type_name_t replytype,
task_t task,
mach_port_t excpt,
- char *name,
+ string_t name,
mach_port_t credential)
{
static int authinit, procinit, execinit, fsinit;
@@ -1546,7 +1546,7 @@ S_startup_essential_task (mach_port_t server,
kern_return_t
S_startup_request_notification (mach_port_t server,
mach_port_t notify,
- char *name)
+ string_t name)
{
struct ntfy_task *nt;
@@ -1861,7 +1861,7 @@ S_fsys_getroot (mach_port_t fsys_t,
uid_t *gids, size_t ngids,
int flags,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *ret,
mach_msg_type_name_t *rettype)
{
diff --git a/sutils/clookup.c b/sutils/clookup.c
index 1858efb9..ec1799dd 100644
--- a/sutils/clookup.c
+++ b/sutils/clookup.c
@@ -56,12 +56,14 @@ file_name_lookup_carefully (const char *name, int flags, mode_t mode)
mach_port_t *node)
{
error_t err;
- const char *tail;
- char *slash = index (name, '/'), *head;
+ const char *head, *tail;
+ char *slash = index (name, '/');
if (slash)
{
- *stpncpy (head = alloca (slash - name + 1), name, slash - name) = 0;
+ char *str = alloca (slash - name + 1);
+ *stpncpy (str, name, slash - name) = 0;
+ head = str;
tail = slash + 1;
}
else
diff --git a/term/users.c b/term/users.c
index 1a3209c7..0289969d 100644
--- a/term/users.c
+++ b/term/users.c
@@ -1045,9 +1045,9 @@ S_tioctl_tiocflush (struct trivfs_protid *cred,
/* TIOCGETA ioctl -- Get termios state */
kern_return_t
S_tioctl_tiocgeta (struct trivfs_protid *cred,
- tcflag_t *modes,
- cc_t *ccs,
- speed_t *speeds)
+ modes_t modes,
+ ccs_t ccs,
+ speeds_t speeds)
{
if (!cred
|| cred->pi.bucket != term_bucket)
@@ -1166,9 +1166,9 @@ set_state (struct trivfs_protid *cred,
/* TIOCSETA -- Set termios state */
kern_return_t
S_tioctl_tiocseta (struct trivfs_protid *cred,
- tcflag_t *modes,
- cc_t *ccs,
- speed_t *speeds)
+ modes_t modes,
+ ccs_t ccs,
+ speeds_t speeds)
{
return set_state (cred, modes, ccs, speeds, 0, 0);
}
@@ -1176,9 +1176,9 @@ S_tioctl_tiocseta (struct trivfs_protid *cred,
/* Drain output, then set term state. */
kern_return_t
S_tioctl_tiocsetaw (struct trivfs_protid *cred,
- tcflag_t *modes,
- cc_t *ccs,
- speed_t *speeds)
+ modes_t modes,
+ ccs_t ccs,
+ speeds_t speeds)
{
return set_state (cred, modes, ccs, speeds, 1, 0);
}
@@ -1186,9 +1186,9 @@ S_tioctl_tiocsetaw (struct trivfs_protid *cred,
/* Flush input, drain output, then set term state. */
kern_return_t
S_tioctl_tiocsetaf (struct trivfs_protid *cred,
- tcflag_t *modes,
- cc_t *ccs,
- speed_t *speeds)
+ modes_t modes,
+ ccs_t ccs,
+ speeds_t speeds)
{
return set_state (cred, modes, ccs, speeds, 1, 1);
@@ -2125,7 +2125,7 @@ report_carrier_error (error_t err)
kern_return_t
S_term_get_nodename (struct trivfs_protid *cred,
- char *name)
+ string_t name)
{
if (!cred
|| cred->pi.bucket != term_bucket
@@ -2144,7 +2144,7 @@ S_term_get_nodename (struct trivfs_protid *cred,
kern_return_t
S_term_set_nodename (struct trivfs_protid *cred,
- char *name)
+ string_t name)
{
error_t err = 0;
if (!cred
@@ -2172,7 +2172,7 @@ S_term_set_filenode (struct trivfs_protid *cred,
kern_return_t
S_term_get_peername (struct trivfs_protid *cred,
- char *name)
+ string_t name)
{
struct trivfs_control *peer;
diff --git a/trans/crash.c b/trans/crash.c
index d20b9f43..838ae9b2 100644
--- a/trans/crash.c
+++ b/trans/crash.c
@@ -646,7 +646,7 @@ parse_opt (int opt, char *arg, struct argp_state *state)
case 'c': crash_how = crash_corefile; break;
case 'C':
{
- char *errp;
+ const char *errp;
if (! template_valid (arg, &errp))
{
argp_error (state, "Invalid template: ...'%s'", errp);
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 7084d4a5..e8825abf 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -282,11 +282,11 @@ netfs_check_open_permissions (struct iouser *user, struct node *np,
error_t
netfs_S_dir_lookup (struct protid *diruser,
- char *filename,
+ string_t filename,
int flags,
mode_t mode,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *retry_port,
mach_msg_type_name_t *retry_port_type)
{
@@ -907,8 +907,8 @@ kern_return_t
netfs_S_file_exec_paths (struct protid *user,
task_t task,
int flags,
- char *path,
- char *abspath,
+ string_t path,
+ string_t abspath,
char *argv,
size_t argvlen,
char *envp,
diff --git a/trans/password.c b/trans/password.c
index b9f9c5bd..2b16cefd 100644
--- a/trans/password.c
+++ b/trans/password.c
@@ -141,7 +141,7 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
/* Implement password_check_user as described in <hurd/password.defs>. */
kern_return_t
-S_password_check_user (struct trivfs_protid *cred, uid_t user, char *pw,
+S_password_check_user (struct trivfs_protid *cred, uid_t user, string_t pw,
mach_port_t *port, mach_msg_type_name_t *port_type)
{
struct ugids ugids = UGIDS_INIT;
@@ -189,7 +189,7 @@ S_password_check_user (struct trivfs_protid *cred, uid_t user, char *pw,
/* Implement password_check_group as described in <hurd/password.defs>. */
kern_return_t
-S_password_check_group (struct trivfs_protid *cred, uid_t group, char *pw,
+S_password_check_group (struct trivfs_protid *cred, uid_t group, string_t pw,
mach_port_t *port, mach_msg_type_name_t *port_type)
{
struct ugids ugids = UGIDS_INIT;
diff --git a/trans/streamio.c b/trans/streamio.c
index 44aabef1..fb449a8a 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -998,7 +998,7 @@ dev_read (size_t amount, void **buf, size_t *len, int nowait)
error_t
device_read_reply_inband (mach_port_t reply, error_t errorcode,
- char *data, u_int datalen)
+ io_buf_ptr_inband_t data, u_int datalen)
{
if (reply != phys_reply)
return EOPNOTSUPP;
diff --git a/trans/symlink.c b/trans/symlink.c
index 80d60f64..f7883448 100644
--- a/trans/symlink.c
+++ b/trans/symlink.c
@@ -129,7 +129,7 @@ S_fsys_getroot (mach_port_t fsys_t,
uid_t *gids, size_t ngids,
int flags,
retry_type *do_retry,
- char *retry_name,
+ string_t retry_name,
mach_port_t *ret,
mach_msg_type_name_t *rettype)
{
diff --git a/utils/ps.c b/utils/ps.c
index d6c55f7e..b23dc1e2 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -35,6 +35,7 @@
#include "psout.h"
#include "parse.h"
#include "pids.h"
+#include "msgids.h"
const char *argp_program_version = STANDARD_HURD_VERSION (ps);