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.
This commit is contained in:
christos 2014-07-16 10:52:26 +00:00
parent dfbb0220fc
commit db6e70af12
2 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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