Commit Graph

3 Commits

Author SHA1 Message Date
Werner Koch
12a0c93433 Fix ttyname problem on Android.
* configure.ac: Define macro and conditional HAVE_ANDROID_SYSTEM.
* m4/gnupg-ttyname.m4: Force use of replacement on Android.
* src/ttyname_r.c: Ditto.
--

Android's bionic lib has no working ttyname_r() nor ttyname().  Using
them anyway will print

  FIX ME! implement ttyname_r() bionic/libc/bionic/stubs.c:466

Thus we force the use of our replacement code which simply return
"/dev/tty".
2012-10-24 16:44:34 +02:00
Werner Koch
2f304957f5 Fix Solaris problems with ttyname_r.
* m4/gnupg-ttyname.m4: New.  Based on ttyname_r from gnulib.
* src/ttyname_r.c (_gpgme_ttyname_r): Rename from ttyname_r.
Implement hacks required for Solaris and possible other non-fully
Posix systems.
* src/util.h: Include unistd.h.  Redefine ttyname_r depending on
REPLACE_TTYNAME_R and put it into the gpgme name space.
--

Unfortunately we cant not use the ttyname_r replacement from gnulib
because we want to keep GPGME LGPLv2+.
2012-01-19 18:43:10 +01:00
Werner Koch
3ef528b636 Add ttyname_r check macro from gnulib.
* m4/gnupg-ttyname.m4: New. Taken from current gnulib.
2012-01-19 14:58:40 +01:00