Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_ENDIAN.2const

raw
1 .\" Copyright 2006-2015, Michael Kerrisk <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_SET_ENDIAN 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_SET_ENDIAN
9 \-
10 set endianness 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_SET_ENDIAN, long " endianness );
20 .fi
21 .SH DESCRIPTION
22 Set the endianness of the calling process
23 to the value given in
24 .IR endianness ,
25 which should be one of the following:
26 .\" Respectively 0, 1, 2
27 .BR PR_ENDIAN_BIG ,
28 .BR PR_ENDIAN_LITTLE ,
29 or
30 .B PR_ENDIAN_PPC_LITTLE
31 (PowerPC pseudo little endian).
32 .SH RETURN VALUE
33 On success,
34 0 is returned.
35 On error, \-1 is returned, and
36 .I errno
37 is set to indicate the error.
38 .SH ERRORS
39 .TP
40 .B EINVAL
41 .I endianness
42 is not a valid value.
43 .SH STANDARDS
44 Linux.
45 PowerPC only.
46 .SH HISTORY
47 Linux 2.6.18 (PowerPC).
48 .SH SEE ALSO
49 .BR prctl (2),
50 .BR PR_GET_ENDIAN (2const)