Module Name: src
Committed By: christos
Date: Wed Jul 16 10:52:26 UTC 2014
Modified Files:
src/lib/libc/gen: basename.c dirname.c
Log Message:
basename_r and dirname_r are non-standard and different from what we define
here on FreeBSD. Their libgen.h exposes them unconditionally, so hide ours
for now.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/gen/basename.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/dirname.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/basename.c
diff -u src/lib/libc/gen/basename.c:1.10 src/lib/libc/gen/basename.c:1.11
--- src/lib/libc/gen/basename.c:1.10 Mon Jul 14 16:44:45 2014
+++ src/lib/libc/gen/basename.c Wed Jul 16 06:52:26 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: basename.c,v 1.10 2014/07/14 20:44:45 christos Exp $ */
+/* $NetBSD: basename.c,v 1.11 2014/07/16 10:52:26 christos Exp $ */
/*-
* Copyright (c) 1997, 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: basename.c,v 1.10 2014/07/14 20:44:45 christos Exp $");
+__RCSID("$NetBSD: basename.c,v 1.11 2014/07/16 10:52:26 christos Exp $");
#endif /* !LIBC_SCCS && !lint */
#include "namespace.h"
@@ -46,7 +46,7 @@ __weak_alias(basename,_basename)
#endif
static size_t
-basename_r(const char *path, char *buf, size_t buflen)
+xbasename_r(const char *path, char *buf, size_t buflen)
{
const char *startp, *endp;
size_t len;
@@ -94,7 +94,7 @@ char *
basename(char *path) {
static char result[PATH_MAX];
- (void)basename_r(path, result, sizeof(result));
+ (void)xbasename_r(path, result, sizeof(result));
return result;
}
Index: src/lib/libc/gen/dirname.c
diff -u src/lib/libc/gen/dirname.c:1.12 src/lib/libc/gen/dirname.c:1.13
--- src/lib/libc/gen/dirname.c:1.12 Mon Jul 14 16:44:45 2014
+++ src/lib/libc/gen/dirname.c Wed Jul 16 06:52:26 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dirname.c,v 1.12 2014/07/14 20:44:45 christos Exp $ */
+/* $NetBSD: dirname.c,v 1.13 2014/07/16 10:52:26 christos Exp $ */
/*-
* Copyright (c) 1997, 2002 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: dirname.c,v 1.12 2014/07/14 20:44:45 christos Exp $");
+__RCSID("$NetBSD: dirname.c,v 1.13 2014/07/16 10:52:26 christos Exp $");
#endif /* !LIBC_SCCS && !lint */
#include "namespace.h"
@@ -45,7 +45,7 @@ __weak_alias(dirname,_dirname)
#endif
static size_t
-dirname_r(const char *path, char *buf, size_t buflen)
+xdirname_r(const char *path, char *buf, size_t buflen)
{
const char *endp;
size_t len;
@@ -94,7 +94,7 @@ char *
dirname(char *path)
{
static char result[PATH_MAX];
- (void)dirname_r(path, result, sizeof(result));
+ (void)xdirname_r(path, result, sizeof(result));
return result;
}
#endif