This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)
- From: Warren Young <warren at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 9 Feb 2014 08:45:00 -0700
- Subject: Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)
- Authentication-results: sourceware.org; auth=none
- References: <52F339CA dot 5070305 at gmail dot com> <20140206090117 dot GD2821 at calimero dot vinschen dot de> <52F361C5 dot 3000807 at gmail dot com> <20140206141321 dot GI2821 at calimero dot vinschen dot de> <52F40208 dot 5030901 at etr-usa dot com> <20140207094917 dot GN2821 at calimero dot vinschen dot de> <52F4E540 dot 2010606 at tiscali dot co dot uk> <52F51D19 dot 6080807 at etr-usa dot com>
On Feb 7, 2014, at 10:51 AM, Warren Young <warren@etr-usa.com> wrote:
> Here's a better check that doesn't give false positives:
>
> $ cat <<END > checkfile
> #!/bin/sh
> if egrep -q '_getgrent(32|64)' "$1" ; then echo $1 ; fi
> END
> $ find /bin -name \*.exe -exec ./checkfile {} \;
The strings(1) call got left out of that test. Here’s a working variant, which tests for getpwent() calls instead:
$ cat <<END > checkfile
if strings "$1" | egrep -q '^getpwent$' ; then echo $1 ; fi
END
$ find /bin -name \*.exe -exec sh checkfile {} \;
Alas, Vim *does* call this API. Results:
/bin/ali.exe
/bin/biber.exe
/bin/cppcheck.exe
/bin/emacs-nox.exe
/bin/emacs-w32.exe
/bin/emacs-X11.exe
/bin/fish.exe
/bin/gdb.exe
/bin/gvim.exe
/bin/joe.exe
/bin/mc.exe
/bin/nano.exe
/bin/otp.exe
/bin/pure-pwconvert.exe
/bin/tcsh.exe
/bin/vim.exe
/bin/xdvi-xaw.exe
/bin/xemacs-21.4.22.exe
/bin/xgettext.exe
/bin/ytree.exe
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple