2010/4/15 Andreas Jellinghaus <a...@dungeon.inka.de>:
> Am Donnerstag 15 April 2010 19:41:45 schrieb OpenSC:
>> #120: pkcs15-init needs to accept ctrl-c
>> --------------------+------------------------------------------------------
>> - Reporter:  aj      |       Owner:  opensc-de...@…
>>      Type:  defect  |      Status:  new
>>  Priority:  normal  |   Milestone:  0.12.0
>> Component:  tools   |     Version:  0.11.1
>>  Severity:  normal  |    Keywords:
>> --------------------+------------------------------------------------------
>> -
>>
>> Comment(by viktor.tara...@…):
>>
>>  I propose to implement local version of getpass() sensible to Ctrl-C .
>>
>>  Any objections?
>>
>
> can you test attached patch? it is incomplete, but replaces getpass
> with out own code. it uses the recommended replacement for getpass -
> turn off echo with termios.
>
> like getline it will allocate space and the caller needs to free
> that space (and for PINs and passwords: cleanse it). because of
> that interface change the difference is quite big.

getline() is a GNU extension.
>From getline(3) on Debian:
CONFORMING TO
       Both  getline()  and  getdelim()  were originally GNU extensions.  They
       were standardized in POSIX.1-2008.

And on Mac OS X Snow Leopard I do not have getline().

Maybe a correct solution is to test for the presence of getline in
configure.ac and use
#ifdef HAVE_GETLINE
#else
/* Windows and Mac OS X */
#endif

See 
http://stackoverflow.com/questions/1117108/compiling-c-code-using-gnu-c-getline-on-mac-osx

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to