diff options
author | 1999-05-28 22:00:20 +0000 | |
---|---|---|
committer | 1999-05-28 22:00:20 +0000 | |
commit | ffaea6318bcea02774e2d1259c78bc7addf9645f (patch) | |
tree | ea0320c88b08a117e80d0ac98e6caf1d1ff71bb6 /lib/libc | |
parent | Oops, missed in last commit: additional AUDIO definitions (diff) | |
download | wireguard-openbsd-ffaea6318bcea02774e2d1259c78bc7addf9645f.tar.xz wireguard-openbsd-ffaea6318bcea02774e2d1259c78bc7addf9645f.zip |
proper const semantics for dirname & basename.
(this follows FreeBSD and Linux. Single Unix 2 is still illogical)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/basename.3 | 4 | ||||
-rw-r--r-- | lib/libc/gen/basename.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/dirname.3 | 4 | ||||
-rw-r--r-- | lib/libc/gen/dirname.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index b19d7c691fb..543eb2bc0dd 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: basename.3,v 1.8 1999/05/28 16:28:05 espie Exp $ +.\" $OpenBSD: basename.3,v 1.9 1999/05/28 22:00:21 espie Exp $ .\" .Dd August 17, 1997 .Dt BASENAME 3 @@ -35,7 +35,7 @@ .Sh SYNOPSIS .Fd #include <libgen.h> .Ft char * -.Fn basename "char *path" +.Fn basename "const char *path" .Sh DESCRIPTION The .Fn basename diff --git a/lib/libc/gen/basename.c b/lib/libc/gen/basename.c index 41f74d2fa64..6c8b1f610a4 100644 --- a/lib/libc/gen/basename.c +++ b/lib/libc/gen/basename.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basename.c,v 1.2 1998/06/21 22:13:39 millert Exp $ */ +/* $OpenBSD: basename.c,v 1.3 1999/05/28 22:00:21 espie Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: basename.c,v 1.2 1998/06/21 22:13:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: basename.c,v 1.3 1999/05/28 22:00:21 espie Exp $"; #endif /* not lint */ #include <errno.h> @@ -38,7 +38,7 @@ static char rcsid[] = "$OpenBSD: basename.c,v 1.2 1998/06/21 22:13:39 millert Ex char * basename(path) - char *path; + const char *path; { static char bname[MAXPATHLEN]; register char *endp, *startp; diff --git a/lib/libc/gen/dirname.3 b/lib/libc/gen/dirname.3 index 029bb43c826..9a13aa5ede9 100644 --- a/lib/libc/gen/dirname.3 +++ b/lib/libc/gen/dirname.3 @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: dirname.3,v 1.4 1999/05/27 20:49:32 aaron Exp $ +.\" $OpenBSD: dirname.3,v 1.5 1999/05/28 22:00:20 espie Exp $ .\" .Dd August 17, 1997 .Dt DIRNAME 3 @@ -35,7 +35,7 @@ .Sh SYNOPSIS .Fd #include <libgen.h> .Ft char * -.Fn dirname "char *path" +.Fn dirname "const char *path" .Sh DESCRIPTION The .Fn dirname diff --git a/lib/libc/gen/dirname.c b/lib/libc/gen/dirname.c index 10692c9eec6..23fe46691ae 100644 --- a/lib/libc/gen/dirname.c +++ b/lib/libc/gen/dirname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirname.c,v 1.2 1998/06/21 22:13:40 millert Exp $ */ +/* $OpenBSD: dirname.c,v 1.3 1999/05/28 22:00:21 espie Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -28,7 +28,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: dirname.c,v 1.2 1998/06/21 22:13:40 millert Exp $"; +static char rcsid[] = "$OpenBSD: dirname.c,v 1.3 1999/05/28 22:00:21 espie Exp $"; #endif /* not lint */ #include <errno.h> @@ -38,7 +38,7 @@ static char rcsid[] = "$OpenBSD: dirname.c,v 1.2 1998/06/21 22:13:40 millert Exp char * dirname(path) - char *path; + const char *path; { static char bname[MAXPATHLEN]; register char *endp; |