gethostsex(3) Library Functions Manual gethostsex(3)Name
gethostsex - get the byte sex of the host machine
Syntax
#include <sex.h>
int gethostsex()
Description
The routine returns one of two constants, BIGENDIAN or LITTLEENDIAN, for the sex of the host machine. These constants are in sex.h.
See Alsoswapsex(3)
RISC gethostsex(3)
Check Out this Related Man Page
swapsex(3) Library Functions Manual swapsex(3)Name
swap_word, swap_half, swap_filehdr, swap_aouthdr, swap_scnhdr, swap_hdr, swap_fd, swap_fi, swap_sym, swap_ext, swap_pd, swap_dn, swap_opt,
swap_aux, swap_reloc, swap_ranlib - swap the sex of the specified structure
Syntax
#include <sex.h>
#include <filehdr.h>
#include <aouthdr.h>
#include <scnhdr.h>
#include <sym.h>
#include <symconst.h>
#include <cmplrs/stsupport.h>
#include <reloc.h>
#include <ar.h>
long swap_word( word )
long word;
short swap_half( half )
short half;
void swap_filehdr( pfilehdr, destsex )
FILHDR *pfilehdr;
long destsex;
void swap_aouthdr( paouthdr, destsex )
AOUTHDR *paouthdr;
long destsex;
void swap_scnhdr( pscnhdr, destsex )
SCNHDR *pscnhdr;
long destsex;
void swap_hdr( phdr, destsex )
pHDRR phdr;
long destsex;
void swap_fd( pfd, count, destsex )
pFDR pfd;
long count;
long destsex;
void swap_fi( pfi, count, destsex )
pFIT pfi;
long count;
long destsex;
void swap_sym( psym, count, destsex )
pSYMR psym;
long count;
long destsex;
void swap_ext( pext, count, destsex )
pEXTR pext;
long count;
long destsex;
void swap_pd( ppd, count, destsex )
pPDR ppd;
long count;
long destsex;
void swap_dn( pdn, count, destsex )
pRNDXR pdn;
long count;
long destsex;
void swap_opt( popt, count, destsex )
pOPTR popt;
long count;
long destsex;
void swap_aux( paux, type, destsex )
pAUXU paux;
long type;
long destsex;
void swap_reloc( preloc, count, destsex )
struct reloc *preloc;
long count;
long destsex;
void swap_ranlib( pranlib, count, destsex )
struct ranlib *pranlib;
long count;
long destsex;
Description
All routines that swap headers take a pointer to a header structure to change the byte's sex. The destsex argument lets the swapsex rou-
tines decide whether to swap bitfields before or after swapping the words in which they occur. If destsex equals the hostsex of the machine
you are running on, the flip happens before the swap; otherwise, the flip happens after the swap. Although not all routines swap struc-
tures containing bitfields, the destsex is required.
The routine takes a pointer to an aux entry and a type, which is a ST_AUX_* constant in cmplrs/stsupport.h. The constant specifies the
type of the aux entry to change the sex of. All other routines are passed a pointer to an array of structures and a count of structures to
have the byte sex changed. The routines and are macros declared in sex.h. Only the include files that describe the structures being
swapped have to be included.
See Alsogethostsex(3)
RISC swapsex(3)
<h1>A short history of UNIX</h1>
<p>In the late 1960's Ken Thompsom joined the computing-science research group at Bell
Laboratories, which is the research arm of the giant American corporation ATT. He and many
colleagues had been collaborating with MIT and GE on the development of an... (0 Replies)
We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
I'm writing a command shell, and I want to be able to detect when the user presses an arrow key (otherwise it just prints [[A, [[B, etc.). I know it's relatively easy (although somewhat more time-consuming) to detect keystrokes in noncanonical mode, but I've noticed that the bash shell detects... (4 Replies)
I'm learning off Linux (Ubuntu) right now. I want to move up to Unix, but I don't want to rush like I did when it came to Windows --> to Linux. What is the best Unix OS that fits in pretty well with Ubuntu.
In other words is there kind of an equal Linux with Unix?
Also what do I need to... (10 Replies)
I noticed my hostname is <my-full-name>s-macbook.local. I'm not sure exactly what information leaves the local network, and whether the hostname is included, but if it is, this would mean people on the Internet can look at my hostname and see who I am. Before anyone says that's not possible,... (4 Replies)