summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-11-20 02:25:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-11-20 02:25:00 +0000
commit576f48978970b19621764b1a3b915b02078d8119 (patch)
treee5dd8a1331e3c7e9ad7681876e94c6bce7428bd7
parent687000bc8379c0be88328737dec65ef66b27dd95 (diff)
brk() and sbrk() should use void *, not char *. Note that sbrk()
should take intptr_t, not int, but we don't presently have intptr_t available from unistd.h. OK marco@
-rw-r--r--include/unistd.h6
-rw-r--r--lib/libc/sys/brk.28
2 files changed, 7 insertions, 7 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 56a85a1521b..ae2e03e6e60 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.53 2005/05/27 17:45:56 millert Exp $ */
+/* $OpenBSD: unistd.h,v 1.54 2005/11/20 02:24:59 millert Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
@@ -130,7 +130,7 @@ ssize_t pwrite(int, const void *, size_t, off_t);
#endif
int acct(const char *);
-char *brk(const char *);
+void *brk(void *);
int chroot(const char *);
#if !defined(_XOPEN_SOURCE)
int closefrom(int);
@@ -188,7 +188,7 @@ int rresvport(int *);
int rresvport_af(int *, int);
int ruserok(const char *, int, const char *, const char *);
int quotactl(const char *, int, int, char *);
-char *sbrk(int);
+void *sbrk(int);
#if !defined(_XOPEN_SOURCE)
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2
index f96157752bb..c20f71713da 100644
--- a/lib/libc/sys/brk.2
+++ b/lib/libc/sys/brk.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: brk.2,v 1.15 2005/08/10 01:06:13 jaredy Exp $
+.\" $OpenBSD: brk.2,v 1.16 2005/11/20 02:24:59 millert Exp $
.\" $NetBSD: brk.2,v 1.7 1995/02/27 12:31:57 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -39,9 +39,9 @@
.Nd change data segment size
.Sh SYNOPSIS
.Fd #include <unistd.h>
-.Ft char *
-.Fn brk "const char *addr"
-.Ft char *
+.Ft void *
+.Fn brk "void *addr"
+.Ft void *
.Fn sbrk "int incr"
.Sh DESCRIPTION
.Bf -symbolic