Source-Changes-HG archive

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

[src/trunk]: src/lib/libc Protect getdelim when used internally.



details:   https://anonhg.NetBSD.org/src/rev/6b7367ae97cd
branches:  trunk
changeset: 749489:6b7367ae97cd
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Dec 01 00:52:13 2009 +0000

description:
Protect getdelim when used internally.

diffstat:

 lib/libc/include/namespace.h |  3 ++-
 lib/libc/stdio/getdelim.c    |  8 ++++++--
 lib/libc/stdio/getline.c     |  6 ++++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 010dfd777920 -r 6b7367ae97cd lib/libc/include/namespace.h
--- a/lib/libc/include/namespace.h      Tue Dec 01 00:06:31 2009 +0000
+++ b/lib/libc/include/namespace.h      Tue Dec 01 00:52:13 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: namespace.h,v 1.138 2009/05/26 08:04:12 joerg Exp $    */
+/*     $NetBSD: namespace.h,v 1.139 2009/12/01 00:52:13 roy Exp $      */
 
 /*-
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -275,6 +275,7 @@
 #define getaddrinfo            _getaddrinfo
 #define getbsize               _getbsize
 #define getcwd                 _getcwd
+#define getdelim               _getdelim
 #define getdevmajor            _getdevmajor
 #define getdiskbyname          _getdiskbyname
 #define getdomainname          _getdomainname
diff -r 010dfd777920 -r 6b7367ae97cd lib/libc/stdio/getdelim.c
--- a/lib/libc/stdio/getdelim.c Tue Dec 01 00:06:31 2009 +0000
+++ b/lib/libc/stdio/getdelim.c Tue Dec 01 00:52:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getdelim.c,v 1.8 2009/12/01 00:03:53 roy Exp $ */
+/* $NetBSD: getdelim.c,v 1.9 2009/12/01 00:52:13 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getdelim.c,v 1.8 2009/12/01 00:03:53 roy Exp $");
+__RCSID("$NetBSD: getdelim.c,v 1.9 2009/12/01 00:52:13 roy Exp $");
 
 #include "namespace.h"
 
@@ -44,6 +44,10 @@
 #include "reentrant.h"
 #include "local.h"
 
+#ifdef __weak_alias
+__weak_alias(getdelim, _getdelim)
+#endif
+
 /* Minimum buffer size we create.
  * This should allow config files to fit into our power of 2 buffer growth
  * without the need for a realloc. */
diff -r 010dfd777920 -r 6b7367ae97cd lib/libc/stdio/getline.c
--- a/lib/libc/stdio/getline.c  Tue Dec 01 00:06:31 2009 +0000
+++ b/lib/libc/stdio/getline.c  Tue Dec 01 00:52:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getline.c,v 1.1 2009/07/13 22:19:25 roy Exp $ */
+/* $NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,9 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getline.c,v 1.1 2009/07/13 22:19:25 roy Exp $");
+__RCSID("$NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $");
+
+#include "namespace.h"
 
 #include <stdio.h>
 



Home | Main Index | Thread Index | Old Index