Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src move __getcwd prototypes to libc-private header file.
details: https://anonhg.NetBSD.org/src/rev/20ad06850411
branches: trunk
changeset: 467640:20ad06850411
user: sommerfe <sommerfe%NetBSD.org@localhost>
date: Fri Mar 26 22:23:57 1999 +0000
description:
move __getcwd prototypes to libc-private header file.
XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).
diffstat:
include/unistd.h | 3 +--
lib/libc/gen/getcwd.c | 6 ++++--
lib/libc/include/extern.h | 3 ++-
regress/sys/kern/getcwd/getcwd.c | 5 ++++-
4 files changed, 11 insertions(+), 6 deletions(-)
diffs (80 lines):
diff -r f5416b51a013 -r 20ad06850411 include/unistd.h
--- a/include/unistd.h Fri Mar 26 22:04:07 1999 +0000
+++ b/include/unistd.h Fri Mar 26 22:23:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unistd.h,v 1.72 1999/03/22 17:59:08 sommerfe Exp $ */
+/* $NetBSD: unistd.h,v 1.73 1999/03/26 22:23:57 sommerfe Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -291,7 +291,6 @@
void endusershell __P((void));
int exect __P((const char *, char * const *, char * const *));
int fchroot __P((int));
-int __getcwd __P((char *, size_t));
int getdomainname __P((char *, size_t));
int getgrouplist __P((const char *, gid_t, gid_t *, int *));
mode_t getmode __P((const void *, mode_t));
diff -r f5416b51a013 -r 20ad06850411 lib/libc/gen/getcwd.c
--- a/lib/libc/gen/getcwd.c Fri Mar 26 22:04:07 1999 +0000
+++ b/lib/libc/gen/getcwd.c Fri Mar 26 22:23:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcwd.c,v 1.16 1999/03/26 04:04:13 sommerfe Exp $ */
+/* $NetBSD: getcwd.c,v 1.17 1999/03/26 22:23:57 sommerfe Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)getcwd.c 8.5 (Berkeley) 2/7/95";
#else
-__RCSID("$NetBSD: getcwd.c,v 1.16 1999/03/26 04:04:13 sommerfe Exp $");
+__RCSID("$NetBSD: getcwd.c,v 1.17 1999/03/26 22:23:57 sommerfe Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -57,6 +57,8 @@
#include <string.h>
#include <unistd.h>
+#include "extern.h"
+
#ifdef __weak_alias
__weak_alias(getcwd,_getcwd);
__weak_alias(realpath,_realpath);
diff -r f5416b51a013 -r 20ad06850411 lib/libc/include/extern.h
--- a/lib/libc/include/extern.h Fri Mar 26 22:04:07 1999 +0000
+++ b/lib/libc/include/extern.h Fri Mar 26 22:23:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.5 1999/01/14 22:48:18 kleink Exp $ */
+/* $NetBSD: extern.h,v 1.6 1999/03/26 22:23:57 sommerfe Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -31,6 +31,7 @@
__BEGIN_DECLS
extern char *__minbrk;
+int __getcwd __P((char *, size_t));
int __getlogin __P((char *, size_t));
const char *__strerror __P((int , char *, size_t));
const char *__strsignal __P((int , char *, size_t));
diff -r f5416b51a013 -r 20ad06850411 regress/sys/kern/getcwd/getcwd.c
--- a/regress/sys/kern/getcwd/getcwd.c Fri Mar 26 22:04:07 1999 +0000
+++ b/regress/sys/kern/getcwd/getcwd.c Fri Mar 26 22:23:57 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcwd.c,v 1.2 1999/03/26 13:14:12 sommerfe Exp $ */
+/* $NetBSD: getcwd.c,v 1.3 1999/03/26 22:23:58 sommerfe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -75,6 +75,9 @@
static void stress_test_getcwd __P((void));
static void usage __P((char *progname));
+/* libc-private interface */
+int __getcwd __P((char *, size_t));
+
/*
* test cases:
* NULL pointer
Home |
Main Index |
Thread Index |
Old Index