Module Name:    src
Committed By:   roy
Date:           Wed Dec  2 08:46:34 UTC 2009

Modified Files:
        src/lib/libc/include: namespace.h
        src/lib/libc/stdio: getline.c

Log Message:
Protect getline.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/lib/libc/include/namespace.h
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdio/getline.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/include/namespace.h
diff -u src/lib/libc/include/namespace.h:1.139 src/lib/libc/include/namespace.h:1.140
--- src/lib/libc/include/namespace.h:1.139	Tue Dec  1 00:52:13 2009
+++ src/lib/libc/include/namespace.h	Wed Dec  2 08:46:33 2009
@@ -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

Index: src/lib/libc/stdio/getline.c
diff -u src/lib/libc/stdio/getline.c:1.2 src/lib/libc/stdio/getline.c:1.3
--- src/lib/libc/stdio/getline.c:1.2	Tue Dec  1 00:52:13 2009
+++ src/lib/libc/stdio/getline.c	Wed Dec  2 08:46:33 2009
@@ -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)
 {

Reply via email to