[vala/staging] posix: Fix crypt(3), now that we have feature test macros.
- From: Dr. Michael Lauer <mlauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] posix: Fix crypt(3), now that we have feature test macros.
- Date: Tue, 6 Mar 2018 15:33:02 +0000 (UTC)
commit d3b8aa3734656c589fb6f6555ce21fbc77bbfc88
Author: Dr. Michael Lauer <mickey vanille-media de>
Date: Tue Mar 6 16:29:25 2018 +0100
posix: Fix crypt(3), now that we have feature test macros.
Note that crypt(3) returns 'null' on error.
vapi/posix.vapi | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index 155e704..5265ab5 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -2126,16 +2126,8 @@ namespace Posix {
[Version (deprecated_since = "POSIX.2", replacement = "termios ECHO flag")]
[CCode (cheader_filename = "unistd.h")]
public unowned string getpass (string promt);
- /**
- * Encodes a string
- *
- * 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", feature_test_macro = "_XOPEN_SOURCE")]
+ 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]