Date: Fri, 4 Jul 2014 16:00:17 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Dmitry Sivachenko <trtrmitya@gmail.com> Cc: freebsd-standards@freebsd.org Subject: Re: About sysconf(_SC_GETPW_R_SIZE_MAX) Message-ID: <20140704130017.GG93733@kib.kiev.ua> In-Reply-To: <DDC4C361-1C27-4913-91BB-1974AD1163A7@gmail.com> References: <DDC4C361-1C27-4913-91BB-1974AD1163A7@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--s2LtGGIeHe+Td5YU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2014 at 11:05:46AM +0400, Dmitry Sivachenko wrote: > Hello! >=20 > (FreeBSD-10/stable). >=20 > According to sysconf(3), _SC_GETPW_R_SIZE_MAX is the valid argument to sy= sconf(): >=20 > _SC_GETPW_R_SIZE_MAX > Suggested initial value for the size of the password entry > buffer. >=20 > But the following test program fails: >=20 > #include <unistd.h> > #include <err.h> > #include <errno.h> > #include <stdio.h> >=20 > int main() { > int buf_sz; >=20 > errno=3D0; > buf_sz =3D sysconf(_SC_GETPW_R_SIZE_MAX); > printf("%d\n", buf_sz); > warn("sysconf: "); > return 0; > } >=20 > % ./a.out=20 > -1 > a.out: sysconf: : Invalid argument >=20 >=20 > What is wrong? =46rom lib/libc/gen/sysconf.c, around line 327: #if _POSIX_THREAD_SAFE_FUNCTIONS > -1 case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: #error "somebody needs to implement this" #endif --s2LtGGIeHe+Td5YU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTtqVhAAoJEJDCuSvBvK1BfrgP/j0bYJcXt2kqs+YsNOrjHjR8 9ZamVUow5Adl2i06PGLuYosMLlKecx2sfpU8n5uJ/8Lpfmh5ORWxxUeFqKrnUsxE 7f5ln+EfiMJxejxw3SxC7iEEoGiC+E/JycGBEz0GN7b/5p9DULmJ/QavQxYxuoCI d/mwrORYmTcJ0H1pas4kotuyKKk/z9q4cEc+DJiUTOPI/bvc0mDtPAx9MZURMjBU WbZrH9uSJjgvfMdd8Z3tOANBFeeJclUq4nthgeiDQ53COKj51vwlesDtyfbj92h/ IWhsotJuac9XP7NZ9PrVq4jj6L7Hl7rJhGzw4FiiAWDrap3hsdjiiRE1VY5+6K7Q 3MCsC2SBg4B7ZZi1s9VieNTv4Ymm3LSS9q6Zly0uYXpFkJNWQXPsuAd7gMrcxJms 3vcpkPTXba2HjIqtcIoacOusDbFHMLvGA9reiUR+2VCMG+bmXdzzqTbjo2sK2ro0 +Gf2uq1SOiMzoct9CyH3hxCVeUUxTKo7vhXE8C1wgHRkDAtJscxzrAMoLTP9Ba82 rFYO8pNwKnfjqSnmgiSEHmympEaUUX8QIFZ7zfNpRhf5C4LRkgC4EDkSwwoGxhtG giGHcEnsnfCrI6468Tw0SC8bQ6DlYJ9LoACbV36stgRXIrLgBuHKSmTM00XJI0tB HMzI4ClKf1wMuNw4tEI5 =HhZT -----END PGP SIGNATURE----- --s2LtGGIeHe+Td5YU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140704130017.GG93733>