Add getdelim(3) and getline(3) to bionic

Some userspace programs (e.g. perf) need getline.

Changes:
() add getdelim.c, getline.c from NetBSD (http://netbsd.org/) under the
NetBSD Foundation's (TNF) license ("2 clause" Berkeley-style license).
() add stub for reentrant.h header that is needed by getdelim.c
() add tests for getdelim(3) and getline(3).
() update NOTICE file.

Change-Id: I22ed82dd5904b9d7a3695535c04f502be3c27c5d
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 8b95663..d0121c6 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -249,6 +249,9 @@
 size_t	 fwrite(const void *, size_t, size_t, FILE *);
 int	 getc(FILE *);
 int	 getchar(void);
+ssize_t	 getdelim(char ** __restrict, size_t * __restrict, int,
+	    FILE * __restrict);
+ssize_t	 getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
 char	*gets(char *);
 #if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
 #define __SYS_ERRLIST
diff --git a/libc/include/sys/param.h b/libc/include/sys/param.h
index 3a815cb..0bfdc5d 100644
--- a/libc/include/sys/param.h
+++ b/libc/include/sys/param.h
@@ -37,4 +37,6 @@
 #define ALIGNBYTES  3
 #define ALIGN(p)    (((unsigned int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
 
+#define powerof2(x) ((((x)-1)&(x))==0)
+
 #endif /* _SYS_PARAM_H_ */