jeff Gray writes: > (2) For driver code, if it uses standard DDI/DDK kernel interface, it's just > recompile, no need to change. Defore Sun open source the code 2+ years ago, > is it likely to develop such driver using non-standard kernel interface for > a driver?
Yes, such non-Sun-developed code does exist. People outside of Sun have been able to reverse-engineer undocumented interfaces and use them for all sorts of things. An example of this would be the AFS code. Our undocumented things have (in general) never been "secret." They're just "not intended to be used and likely to change." > (3) If the application on SPARC using published Solaris OS interfaces on > SPARC, it doesn't need any change, just recompile. Perhaps. If the application deals with networking at all, it's important to note that SPARC is a big-endian machine and x86 is little-endian. If you forget to use ntohs/ntohl where necessary in your SPARC code, you'll never notice it, because it's a no-op there. Such mistakes are fatal on x86. > (4) If the application using Sun Studio to compile, no need to change > compiler options, only test options to optimize for x86. How about those > compiled using gcc on Solaris/SPARC, are there big efforts to modify the > compiler options if keep using the same gcc on x86? Generally, no, you shouldn't need to change anything. But if you're using special CPU-related options, you may find that those options aren't necessarily valid on another platform. > (3) byte-order code (big/little endian) needs to be changed. Are there any > code examples of this? Sure: struct sockaddr_in sinv; sinv.sin_family = AF_INET; sinv.sin_port = 1243; That code is incorrect, but it works fine on SPARC. If you compile it on x86, it'll fail miserably there, because the "sin_port" field is defined as network-byte-order. SPARC happens to be in network-byte- order all the time, but x86 is not. > (6) If port from Solaris9/SPARC, does it take more efforts compared with > porting from Solaris10/SPARC to Solaris10/x86? In most cases, I'd say that going from one minor release of Solaris to another (e.g., from S9 SPARC to S10 SPARC) is a no-brainer, because we intentionally support binary compatibility. In other words, you don't recompile when going from one release to another; only when going from one CPU family to another. -- James Carlson, Solaris Networking <[EMAIL PROTECTED]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org