Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Protect getline.
details: https://anonhg.NetBSD.org/src/rev/02b8058a1105
branches: trunk
changeset: 749542:02b8058a1105
user: roy <roy%NetBSD.org@localhost>
date: Wed Dec 02 08:46:33 2009 +0000
description:
Protect getline.
diffstat:
lib/libc/include/namespace.h | 3 ++-
lib/libc/stdio/getline.c | 8 ++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r 1a6a514e0687 -r 02b8058a1105 lib/libc/include/namespace.h
--- a/lib/libc/include/namespace.h Wed Dec 02 08:31:56 2009 +0000
+++ b/lib/libc/include/namespace.h Wed Dec 02 08:46:33 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.139 2009/12/01 00:52:13 roy Exp $ */
+/* $NetBSD: namespace.h,v 1.140 2009/12/02 08:46:33 roy Exp $ */
/*-
* Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -295,6 +295,7 @@
#define gethostent _gethostent
#define gethostname _gethostname
#define getifaddrs _getifaddrs
+#define getline _getline
#define getloadavg _getloadavg
#define getlogin _getlogin
#define getlogin_r _getlogin_r
diff -r 1a6a514e0687 -r 02b8058a1105 lib/libc/stdio/getline.c
--- a/lib/libc/stdio/getline.c Wed Dec 02 08:31:56 2009 +0000
+++ b/lib/libc/stdio/getline.c Wed Dec 02 08:46:33 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $ */
+/* $NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,12 +28,16 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $");
+__RCSID("$NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $");
#include "namespace.h"
#include <stdio.h>
+#ifdef __weak_alias
+__weak_alias(getline, _getline)
+#endif
+
ssize_t
getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp)
{
Home |
Main Index |
Thread Index |
Old Index