Operating System - HP-UX
1854862 Members
30843 Online
104104 Solutions
New Discussion

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

 
SOLVED
Go to solution
sg222
Occasional Advisor

Bi-Endian HP-UX 11.0 ? Where can i find this setting?

Hi,

our software developers now have the problem to migrate from a hp-ux 11.0 system to a linux enterprise server on intel machines.

HP-UX 11.0 is running on L1500-6x Hardware, so this is a bi-endian hardware.

But where can i find the setting on my system? I thought on bi-endian systems, sometimes user-applications can choose which endian-type (big or little) the use.

Can i find out, which type the application choses?

Thanks for any reply, i am a bit confused...
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

Hi,

read this to learn more about big-endian and little-endian architectures:

http://docs.hp.com/en/B2355-90950/ch02s10.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Gregory Fruth
Esteemed Contributor

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

Even though the hardware may be bi-endian,
I believe HP-UX and HP-UX applications are
always run in big-endian mode. I don't
think there is a way to switch modes.

If you want to test to see if your
environment is big endian, use sysconf()
or getconf:

getconf KERNEL_IS_BIGENDIAN

The KERNEL_IS_BIGENDIAN parameter is not
standardized, so it may not be available on
other platforms. In that case, a C union can
be used to detect endianness.
rick jones
Honored Contributor
Solution

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

Indeed, HP-UX is always big-endian. While PA-RISC may be bi-endian, I don't think there is any support in UX to run little-endian PA-RISC binaries under HP-UX. Bi-endian on PA-RISC was done long ago for something that never saw the light of day. As near as I can recall, even parisc-linux runs PA-RISC in big-endian mode.

Now, Itanium is a bi-endian processor, and the Linux Enablement Kit (IIRC that is the name, perhaps it is Linux Runtime Environment) on HP-UX 11iv2 on _Integrity_ systems (aka Itanium CPUs) has ways to run little-endian Linux _Itanium_ binaries on the big-endian UX kernel. (Linux on Itanium runs the CPU in little-endian mode)

So, there is nothing on HP-UX 11.00 on PA-RISC to allow you to try things there before migrating to little-endian linux.

So, are these "intel machines" x86 or Itanium? They do at least say "HP" on the front yes?-)
there is no rest for the wicked yet the virtuous have no pillows
sg222
Occasional Advisor

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

The new machines the linux will run on are intel xeon processors x86_64.

So HP-UX is an only big-endian os. So our developers will have no choice except converting their programs (testing positions of bytes in cobol) to little endian syntax or write a hole new program.

I just wanted to know, so thanks for all of your answers, they all helped me.
sg222
Occasional Advisor

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

my questions were answered. thx
Dennis Handly
Acclaimed Contributor

Re: Bi-Endian HP-UX 11.0 ? Where can i find this setting?

cadvise has a +wendian option to allow you to flag C/C++ code:
http://www.hp.com/go/cadvise