[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

Guideline to port Sparc Solaris applicatin to Intel Solaris

We have an application developed for Sparc Solaris 8. We are thinking of expanding its domain on Intel processor too. I am looking for the guidelines for porting my application from Sparc Solaris to Intel Solaris and are there known issues to be taken into consideration? What I am really worried about is something like endianness (or data alignment and other such issue which I might not even be aware of), which is different on Sparc Solaris then on Intel Solaris. What effect does endianness has on something like socket programming. Since endianness of bytes received from network on Sparc Solaris doesn’t has to be changed to use, but endianness of the bytes received from network on Intel Solaris has to be changed. Really appreciate a quick response on this.
0
shuklasunil
Asked:
shuklasunil
1 Solution
 
_iskywalker_Commented:
well, normally you need to pass from network order to the computer order (always, only sparcs and ppc have the network endiness, x86 have little_endian). This should be done. some operations should also be checked like << and & (cause endiness) but normally the compiler do the job, and types, most intels are 32 and some sparcs are 64 bits, so maybe int wont be 32 but 64 bits... i have programmed a game: xblast it works on solaris sparc, linux  x86 and on windows x86. we just checked on sun for that: (every else is like linux x86)
#ifdef sparc       
 typedef uint32_t u_int32_t;
 #endif
for network sockets on x11... every thing else is done by gcc (maybe it is also   a solaris not a sparc thing, so maybe you dont need to bother)
0
 
PsiCopCommented:
Well, something operating in your favor is that Solaris is a fairly hardware-independent OS. Only about 5% of its code is affected by the hardware archicture. So unless your application gets down-n-dirty with Solaris, or tries to deal directly with the hardware, its unlikely you'd have to do anything except re-compile it on the Intel platform (or cross-compile on SPARC).
0
 
brettmjohnsonCommented:
0
 
shuklasunilAuthor Commented:
PsiCop,

How do you say that only 5% of code is hardware dependent. Can you forward some link confirming this. Also how will I know if my application is making low level calls. Do you have list of such calls that I can look for in the code.


0
 
PsiCopCommented:
Offhand, I don't know of any link confirming that. I recall discovering that fact when my organization was weighing *NIX vs. NT a few years ago. Fortunately, we went *NIX.

Want to know if your app is making low-level calls low enuf to be an issue? If you're not the programmer, then ask the programmer(s). Unless your app is a device driver, its probably not going to be an issue.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now