]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: add crypt(), deprecate getpass()
authorAl Thomas <astavale@yahoo.co.uk>
Tue, 27 Oct 2015 16:28:36 +0000 (17:28 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Tue, 27 Oct 2015 16:29:02 +0000 (17:29 +0100)
Fixes bug 756315

vapi/posix.vapi

index fee343e047c2adbe387a3dcfb3877626f03d8128..d39e394f83def1f2e3751b5d9b9cb30e4d883a26 100644 (file)
@@ -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")]