libc/pwd_grp: Allocate buffers for non-reentrant functions dynamically
commit0df690c66b2fdf0bf9d85ee83ca8dc3596a3d1c6
authorWaldemar Brodkorb <wbx@uclibc-ng.org>
Sat, 2 Jan 2016 15:48:54 +0000 (2 16:48 +0100)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>
Sat, 2 Jan 2016 15:57:04 +0000 (2 16:57 +0100)
treec7783d6f080c5e4a0b2548cf0768bb35870ecbeb
parent1957edde77a0c228fcdcc3c3716f4529a48610a4
libc/pwd_grp: Allocate buffers for non-reentrant functions dynamically

 Saves 3k bss with default buffer size(256).

   text    data     bss     dec     hex filename
-    61       0     272     333     14d fgetgrent.os
-    61       0     284     345     159 fgetpwent.os
-    61       0     292     353     161 fgetspent.os
-    57       0     272     329     149 getgrent.os
-    61       0     272     333     14d getgrgid.os
-    61       0     272     333     14d getgrnam.os
-    57       0     284     341     155 getpwent.os
-    61       0     284     345     159 getpwnam.os
-    61       0     284     345     159 getpwuid.os
-    57       0     292     349     15d getspent.os
-    61       0     292     353     161 getspnam.os
-    61       0     292     353     161 sgetspent.os
+    94       0      20     114      72 fgetgrent.os
+    94       0      32     126      7e fgetpwent.os
+    94       0      40     134      86 fgetspent.os
+    87       0      20     107      6b getgrent.os
+    94       0      20     114      72 getgrgid.os
+    94       0      20     114      72 getgrnam.os
+    87       0      32     119      77 getpwent.os
+    94       0      32     126      7e getpwnam.os
+    94       0      32     126      7e getpwuid.os
+    87       0      40     127      7f getspent.os
+    94       0      40     134      86 getspnam.os
+    94       0      40     134      86 sgetspent.os
=====================================================
   +387           -3024

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
libc/pwd_grp/pwd_grp_internal.c