]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Use __compar_fn_t as cname for compar_fn_t
authorRyan Lortie <desrt@desrt.ca>
Wed, 10 Mar 2010 06:15:51 +0000 (01:15 -0500)
committerRyan Lortie <desrt@desrt.ca>
Wed, 10 Mar 2010 06:15:51 +0000 (01:15 -0500)
There is no standard name in the ISO C specification for this type.
compar_fn_t isn't defined anywhere.  comparison_fn_t is a glibc
extension that is only defined with _GNU_SOURCE.

__compar_fn_t at least has the advantage of always working on glibc.

vapi/posix.vapi

index d032f5087c9641eab30f36c80555625bb8784943..90f8fbdc909b3837592823750f4f6ca72f428419 100644 (file)
@@ -985,7 +985,7 @@ namespace Posix {
        [CCode (cheader_filename = "stdlib.h")]
        public int system (string command);
 
-       [CCode (has_target = false, cheader_filename = "stdlib.h")]
+       [CCode (has_target = false, cheader_filename = "stdlib.h", cname = "__compar_fn_t")]
        public delegate int compar_fn_t (void* key1, void* key2);
 
        [CCode (cheader_filename = "stdlib.h")]