1*6cb10275Sriastradh.\" $NetBSD: getbyteorder.3,v 1.4 2014/03/18 18:20:38 riastradh Exp $ 2b1fc4beeSmatt.\" 3b1fc4beeSmatt.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4b1fc4beeSmatt.\" All rights reserved. 5b1fc4beeSmatt.\" 6b1fc4beeSmatt.\" This code is derived from software contributed to The NetBSD Foundation 7b1fc4beeSmatt.\" by Jason R. Thorpe. 8b1fc4beeSmatt.\" 9b1fc4beeSmatt.\" Redistribution and use in source and binary forms, with or without 10b1fc4beeSmatt.\" modification, are permitted provided that the following conditions 11b1fc4beeSmatt.\" are met: 12b1fc4beeSmatt.\" 1. Redistributions of source code must retain the above copyright 13b1fc4beeSmatt.\" notice, this list of conditions and the following disclaimer. 14b1fc4beeSmatt.\" 2. Redistributions in binary form must reproduce the above copyright 15b1fc4beeSmatt.\" notice, this list of conditions and the following disclaimer in the 16b1fc4beeSmatt.\" documentation and/or other materials provided with the distribution. 17b1fc4beeSmatt.\" 18b1fc4beeSmatt.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19b1fc4beeSmatt.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20b1fc4beeSmatt.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21b1fc4beeSmatt.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22b1fc4beeSmatt.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23b1fc4beeSmatt.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24b1fc4beeSmatt.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25b1fc4beeSmatt.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26b1fc4beeSmatt.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27b1fc4beeSmatt.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28b1fc4beeSmatt.\" POSSIBILITY OF SUCH DAMAGE. 29b1fc4beeSmatt.\" 30b1fc4beeSmatt.Dd May 1, 2013 31b1fc4beeSmatt.Dt GETBYTEORDER 3 32b1fc4beeSmatt.Os 33b1fc4beeSmatt.Sh NAME 34b1fc4beeSmatt.Nm getbyteorder 35b1fc4beeSmatt.Nd get the current byte order 36b1fc4beeSmatt.Sh LIBRARY 37b1fc4beeSmatt.Lb libutil 38b1fc4beeSmatt.Sh SYNOPSIS 39b1fc4beeSmatt.In util.h 40b1fc4beeSmatt.In sys/endian.h 41b1fc4beeSmatt.Ft int 42b1fc4beeSmatt.Fn getbyteorder void 43b1fc4beeSmatt.Sh DESCRIPTION 44b1fc4beeSmatt.Fn getbyteorder 4527534056Swizreturns 4627534056Swiz.Dv LITTLE_ENDIAN , 4727534056Swiz.Dv BIG_ENDIAN , 48b1fc4beeSmattor \-1 in case of an error, setting the global 49b1fc4beeSmatt.Va errno 50b1fc4beeSmattvariable. 51b1fc4beeSmattThe possible values for 52b1fc4beeSmatt.Va errno 53b1fc4beeSmattare the same as in 54b1fc4beeSmatt.Xr sysctl 3 . 55b1fc4beeSmatt.Sh SEE ALSO 56b1fc4beeSmatt.Xr sysctl 3 57b1fc4beeSmatt.Sh HISTORY 58b1fc4beeSmattThe 59b1fc4beeSmatt.Fn getbyteorder 60b1fc4beeSmattfunction call appeared in 61f2bb7e66Snjoly.Nx 7.0 . 62