Debian Codegraph @

upstream/debian-trixie/man2/PR_GET_ENDIAN.2const

raw
1 .\" Copyright 2002, 2006, 2008, 2012, 2013, 2015, Michael Kerrisk <[email protected]>
2 .\" Copyright 2024, Alejandro Colomar <[email protected]>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_GET_ENDIAN 2const 2024-06-02 "Linux man-pages 6.9.1"
7 .SH NAME
8 PR_GET_ENDIAN
9 \-
10 get the endian-ness of the calling process
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
17 .B #include <sys/prctl.h>
18 .P
19 .BI "int prctl(PR_GET_ENDIAN, int *" endianness );
20 .fi
21 .SH DESCRIPTION
22 Return the endian-ness of the calling process,
23 in the location pointed to by
24 .IR endianness .
25 .SH RETURN VALUE
26 On success,
27 0 is returned.
28 On error, \-1 is returned, and
29 .I errno
30 is set to indicate the error.
31 .SH ERRORS
32 .TP
33 .B EFAULT
34 .I endianness
35 is an invalid address.
36 .SH STANDARDS
37 Linux.
38 PowerPC only.
39 .SH HISTORY
40 Linux 2.6.18 (PowerPC).
41 .SH SEE ALSO
42 .BR prctl (2),
43 .BR PR_SET_ENDIAN (2const)