Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

... when Unix is little endian?

From Wikipedia, Solaris is based on Unix in some sense:

In 1987, AT&T and Sun announced that they were collaborating on a project to merge the most popular Unix variants on the market at that time: BSD, System V, and Xenix. This became Unix System V Release 4 (SVR4).

On September 4, 1991, Sun announced that it would replace its existing BSD-derived Unix, SunOS 4, with one based on SVR4. This was identified internally as SunOS 5, but a new marketing name was introduced at the same time: Solaris 2.

share|improve this question
    
Very educational and informative amazon.com/Microprocessors-Programmers-View-Computing-Works/dp/… –  Aki Oct 14 '11 at 12:08

2 Answers 2

up vote 10 down vote accepted

Endianness is a property of the CPU, not the operating system. Solaris is normally big-endian because Suns used big-endian CPUs, while UNIX was originally little-endian because it ran on little-endian machines.

Today, common UNIX-derived operating systems such as Linux run on a wide variety of CPU architectures and can be either big- or little-endian depending on which architecture is in use. (See this question on ServerFault if you want to find out which way your *nix goes.)

share|improve this answer
    
In other words decisions made 20 years ago is the reason. –  Ramhound Oct 14 '11 at 12:20
1  
@Ramhoud Essentially, yes. BUt your dates are a bit off. The original Unix was developed in 1969, on hardware released in 1965, so closer to 50 years ago then 20. –  KeithB Oct 14 '11 at 13:47
    
Many processor architectures allow for selecting which endian-ness to use , e.g. ARM. –  Julian Oct 14 '11 at 15:04
2  
Unix was designed from the beginning to be endian neutral. Solaris is not "normally big-endian" as it supports both big and little endian architectures. –  jlliagre Oct 15 '11 at 5:44

Your assumptions are incorrect: Solaris is not big-endian, Unix is not little-endian.

Both depend on the CPU they are running on. Solaris on a big-endian SPARC CPU is big-endian, Solaris on a little-endian Intel or AMD CPU is little-endian. Solaris is one flavor of Unix, others similarly run either big-endian or little-endian depending on the CPU being used.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.