Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen basename_r and dirname_r are non-standard and d...



details:   https://anonhg.NetBSD.org/src/rev/45c658d98cbe
branches:  trunk
changeset: 797377:45c658d98cbe
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 16 10:52:26 2014 +0000

description:
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.

diffstat:

 lib/libc/gen/basename.c |  8 ++++----
 lib/libc/gen/dirname.c  |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 84af27def3b0 -r 45c658d98cbe lib/libc/gen/basename.c
--- a/lib/libc/gen/basename.c   Wed Jul 16 07:41:43 2014 +0000
+++ b/lib/libc/gen/basename.c   Wed Jul 16 10:52:26 2014 +0000
@@ -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 @@
 #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 @@
 basename(char *path) {
        static char result[PATH_MAX];
 
-       (void)basename_r(path, result, sizeof(result));
+       (void)xbasename_r(path, result, sizeof(result));
        return result;
 }
 
diff -r 84af27def3b0 -r 45c658d98cbe lib/libc/gen/dirname.c
--- a/lib/libc/gen/dirname.c    Wed Jul 16 07:41:43 2014 +0000
+++ b/lib/libc/gen/dirname.c    Wed Jul 16 10:52:26 2014 +0000
@@ -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 @@
 #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 @@
 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



Home | Main Index | Thread Index | Old Index