Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen provide a _sys_getcwd() entry like all the rest...
details: https://anonhg.NetBSD.org/src/rev/d9b62ca185f5
branches: trunk
changeset: 761061:d9b62ca185f5
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 20 02:57:00 2011 +0000
description:
provide a _sys_getcwd() entry like all the rest of the system calls to be
used by SSP.
diffstat:
lib/libc/gen/getcwd.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r 668b4ec98449 -r d9b62ca185f5 lib/libc/gen/getcwd.c
--- a/lib/libc/gen/getcwd.c Wed Jan 19 21:39:41 2011 +0000
+++ b/lib/libc/gen/getcwd.c Thu Jan 20 02:57:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcwd.c,v 1.46 2010/01/01 19:59:21 dholland Exp $ */
+/* $NetBSD: getcwd.c,v 1.47 2011/01/20 02:57:00 christos Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)getcwd.c 8.5 (Berkeley) 2/7/95";
#else
-__RCSID("$NetBSD: getcwd.c,v 1.46 2010/01/01 19:59:21 dholland Exp $");
+__RCSID("$NetBSD: getcwd.c,v 1.47 2011/01/20 02:57:00 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -54,8 +54,15 @@
#include "extern.h"
#ifdef __weak_alias
-__weak_alias(getcwd,_getcwd)
+__weak_alias(getcwd,_sys_getcwd)
+__weak_alias(_getcwd,_sys_getcwd)
__weak_alias(realpath,_realpath)
+
+#if defined(_FORTIFY_SOURCE) && !defined(__lint__)
+#undef getcwd
+#define getcwd _sys_getcwd
+#endif
+
#endif
/*
@@ -205,12 +212,6 @@
goto loop;
}
-
-#if defined(_FORTIFY_SOURCE) && !defined(__lint__)
-#undef getcwd
-#define getcwd _getcwd
-#endif
-
char *
getcwd(char *pt, size_t size)
{
Home |
Main Index |
Thread Index |
Old Index