[vala] posix: add crypt(), deprecate getpass()



commit 33fb6fb5b719e9d64968ea87e0b19fdfab313fd6
Author: Al Thomas <astavale yahoo co uk>
Date:   Tue Oct 27 17:28:36 2015 +0100

    posix: add crypt(), deprecate getpass()
    
    Fixes bug 756315

 vapi/posix.vapi |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index fee343e..d39e394 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1913,8 +1913,16 @@ namespace Posix {
        public void setusershell ();
        [CCode (cheader_filename = "unistd.h")]
        public int chroot (string path);
+       [Deprecated (since = "POSIX.2", replacement = "termios ECHO flag")]
        [CCode (cheader_filename = "unistd.h")]
        public unowned string getpass (string promt);
+       /** To expose Posix crypt() GNU's libc and others require the feature test
+        *  macro _XOPEN_SOURCE to be defined. See man 3 crypt
+        *  A VAPI is unable to define and emit this macro before all include files
+        *  Instead use valac -X -D_XOPEN_SOURCE
+        */
+       [CCode (cheader_filename = "unistd.h")]
+       public unowned string crypt (string key, string salt);
        [CCode (cheader_filename = "unistd.h")]
        public int getpagesize ();
        [CCode (cheader_filename = "unistd.h")]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]