about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-10-27 10:42:10 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-10-27 16:34:37 +0100
commit562ef5e69eb38230810bd25a4335224a31bfe31b (patch)
treef89ee605da223922e9d2920704af109bbf495772 /include
parent0ce51bef34e1edde9f60ccd6d9d70c56020d9d21 (diff)
downloadglibc-562ef5e69eb38230810bd25a4335224a31bfe31b.tar.gz
glibc-562ef5e69eb38230810bd25a4335224a31bfe31b.tar.xz
glibc-562ef5e69eb38230810bd25a4335224a31bfe31b.zip
misc: Add internal __getauxval2 function
The explicit error return value (without in-band signaling) avoids
complicated steps to detect errors based on whether errno has been
updated.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include')
-rw-r--r--include/sys/auxv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/auxv.h b/include/sys/auxv.h
index 3bab6d05d4..dd0602b08d 100644
--- a/include/sys/auxv.h
+++ b/include/sys/auxv.h
@@ -5,4 +5,9 @@
 extern __typeof (getauxval) __getauxval;
 libc_hidden_proto (__getauxval)
 
+/* Like getauxval, but writes the value to *RESULT and returns true if
+   found, or returns false.  Does not set errno.  */
+_Bool __getauxval2 (unsigned long int type, unsigned long int *result);
+libc_hidden_proto (__getauxval2)
+
 #endif  /* !_ISOMAC */