Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF
Tools and Resources
16
- This chapter discusses the changes to tools and resources for the development environment. This chapter contains the following sections:
-
ioctl() Requests
- All ioctls related to dkio(7I), filio, mtio(7I), sockio(7I), streamio(7I), termio(7I), and termios(7I) are supported in this release.
- A few incompatibilities exist between the SunOS release 4.x termios structure and Solaris 2.5 termios structure. Solaris 2.5 termios structure does not include a c_line field as it does in SunOS release 4.x. In the SunOS release 4.x,
- the c_cflag (hardware control of the terminal) can have CRTSCTS (enable RTS/CTS flow control), but this value is not defined in SVR4 or the Solaris 2.5 operating environment.
-
Table 16-1 shows ioctls defined in <sys/ttold.h> that are not implemented in this release.
-
Table 16-1 ioctl
| TIOCMODG | TIOCMIDS | TIOCGETX |
| OTTYDISC | TIOCSETX | NTTYDISC |
| TABLDISC | NETLDISC | MOUSELDISC |
| KBLDISC | NTABLDISC |
-
Table 16-2 shows ttycom ioctl requests that are not in the Solaris 2.5 operating environment.
-
Table 16-2 ttycom ioctl
| TIOCSCTTY | TIOCGETPGRP | TIOCSETPGRP |
| TIOCNOTTY | TIOCISIZE | TIOCTCNTL |
| TIOCISPACE | TIOCUCNTL | TIOCCONS |
| TIOCPKT | TIOCOUTQ |
-
Table 16-3 shows the ioctls supported in the Solaris 2.5 operating environment.
-
Table 16-3 ioctl
| ioctl() | Description |
| DKIOCGPART | These requests are replaced with DKIOCGAPART and DKIOCSAPART in Solaris 2.5 software. |
| DKIOCGCONF | This request is replaced with DKIOCINFO in Solaris 2.5 software, which includes the combined information of the SunOS release 4.x DKIOCGCONF and DKIOCINFO structures. |
| DKIOCSCMD | This request succeeds only for IPI drives. This ioctl fails for SCSI
devices. Use the USCSI ioctl for SCSI devices. |
| DKIOCGLOG | EINVAL is returned. DKIOCWCHK toggles the write check on the floppy device. |
-
Table 16-3 ioctl(Continued)
| ioctl() | Description |
| filio | The following filio ioctl requests are not supported in this release or SVR4: FIOSETOWN, FIOGETOWN, FIOCLEX, FIONCLEX. filio ioctl requests not defined in the ABI or SVID. |
| mtio | Not all devices support all mtio ioctl requests in Solaris 2.5. See mtio(7). |
| sockio | The following sockio ioctl requests are implemented in SVR4 and Solaris 2.5 software: SIOCSPGRP, SIOCGPGRP, SIOCATMARK. sockio ioctl requests are not defined in the ABI or SVID. |
| streamio | All SunOS release 4.x streamio ioctl requests are implemented in Solaris 2.5 software, the ABI, SVID, and SVR4. The I_FDINSERT request requires an argument that points to a strfdinsert structure. The SunOS release 4.x strfdinsert structure includes an fd (int) field, while the ABI, SVID, or SVR4 strfdinsert structure includes a fildes (int) field instead. |
| audioio | The SunOS release 4.x <sun/audioio.h> file has been moved to <sys/audioio.h> for Solaris 2.5 software. Additionally, in Solaris 2.5 software, there are enhancements to the interface. See audio(7), audioamd(7), or dbri(7) for more information. |
termio,
termios | All SunOS release 4.x termio and termios ioctl requests are
implemented in Solaris 2.5 software, the ABI, SVID, and SVR4.
There are a few incompatibilities between the SunOS release 4.x
termios structure and Solaris 2.5 software, or the ABI, SVID, or
SVR4 termios structure. The SunOS release 4.x termios structure
includes a c_line field that is not supported by the other releases.
The c_cflag (hardware control of the terminal) can have CRTSCTS
(enable RTS/CTS flow control) under SunOS release 4.x, but this
value is not defined in Solaris 2.5 software, the ABI, SVID, or SVR4.
However, the functionality is supported through the termiox(7)
interface. |
ptrace() Request Values
- The ptrace() facility is implemented on top of /proc. New applications should use proc(4) directly.
- The ptrace() routine in Solaris 2.5 software is present solely to support applications running in BCP mode. It uses integers 1 - 9 as request values, while the SunOS release 4.x routine defines request values as symbolic constants in <sys/ptrace.h>. The following SunOS release 4.x request symbolic constants are compatible with Solaris 2.5 software:
-
-
PTRACE_TRACEME, PTRACE_PEEKTEXT, PTRACE_PEEKDATA,
PTRACE_PEEKUSER, PTRACE_POKETEXT, PTRACE_POKEDATA,
PTRACE_POKEUSER, PTRACE_CONT, PTRACE_KILL, PTRACE_SINGLESTEP.
- The SunOS release 4.x PTRACE_CONT (Solaris 2.5 request 7) addr argument specifies where the stopped process should resume execution, unless addr = 1, in which case execution resumes from where the process had stopped. The Solaris 2.5 request 7 (SunOS release 4.x PTRACE_CONT) requires that addr always be equal to 1 and that execution always resumes from where the process had stopped. Also, the Solaris 2.5 request 7 cancels all pending signals, except those specified by data, before the process resumes execution. The SunOS release 4.x PTRACE_CONT does not cancel all pending signals.
-
Table 16-4 shows SunOS release 4.x valid requests that are not supported by the Solaris 2.5 ptrace() routine.
-
Table 16-4 ptrace
| PTRACE_ATTACH | PTRACE_GETWINDOW |
| PTRACE_DETACH | PTRACE_SETWINDOW |
| PTRACE_GETREGS | PTRACE_22 |
| PTRACE_SETREGS | PTRACE_23 |
| PTRACE_GETFPREGS | PTRACE_26 |
| PTRACE_SETFPREGS | PTRACE_27 |
| PTRACE_READDATA | PTRACE_28 |
| PTRACE_WRITEDATA | PTRACE_SYSCALL |
| PTRACE_READTEXT | PTRACE_DUMPCORE |
| PTRACE_WRITETEXT | PTRACE_SETWRBKPT |
| PTRACE_GETFPAREGS | PTRACE_SETACBKPT |
| PTRACE_SETFPAREGS | PTRACE_CLRDR7 |
Libraries
- This release is compliant with the System V Interface Definition, Third Edition (SVID 3). Programs written with the SunOS release 4.1 System V libraries are easy to port to this release. Programs using the SunOS release 4.x BSD C library require more effort.
Reorganized Libraries
- Several functions and groups of functions that were in particular libraries in SunOS release 4.x were moved into different libraries in Solaris 2.5. This can cause references to these functions to be flagged as undefined when compiling a 4.x application in Solaris 2.5.
- After a compile, check the man page of any functions flagged as undefined. The synopsis list both the -l linker option and any include files that you need to resolve the symbol.
Shared Libraries
- Shared libraries do not currently support minor version numbers.
- Files for shared initialized data (.sa) are no longer required; no .sa files are provided with the Solaris 2.5 software.
Resource Limits
- The Solaris 2.5 operating environment handles resource limits differently from SunOS release 4.x. In previous releases, static table allocations were used for resources such as file descriptors and active processes. These resources are now dynamically allocated. This means that they are limited by the physical memory available. Table 16-5 shows the resource limits.
-
Table 16-5
| Configuration | Limitation |
| RLIMIT_CORE | Maximum size of core file (in bytes) that can be created by a process |
| RLIMIT_CPU | Maximum amount of CPU time (in seconds) that a process can use |
| RLIMIT_DATA | Maximum size of a process's heap (in bytes) |
| RLIMIT_FSIZE | Maximum size of a file (in bytes) that can be created by a process |
| RLIMIT_NOFILE | One more than the maximum number of file descriptors that can be created by a process |
| RLIMIT_VMEM | Maximum size (in bytes) to which a process's mapped address space may grow |
| RLIMIT_STACK | Maximum size (in bytes) of a process's stack |
-
Note - Any shared objects that need the networking libraries must be dynamically linked. The networking libraries require libdl.so.1. An archive library is not available.
-
Table 16-6 shows SunOS release 4.x and Solaris 2.5 libraries and their locations.
-
Table 16-6
| Library Name | SunOS release 4.x Directory | Solaris 2.5 Directory |
| libbsdmalloc.a | /usr/lib | /usr/lib |
| libc.a | /usr/lib, and
/usr/5lib | /usr/lib |
| libc.so.1.7 | /usr/lib | /usr/lib |
| libc.so.2.7 | /usr/5lib | /usr/lib |
| libc_p.a | /usr/5lib | Not available |
| libcurses.a | /usr/lib, and
/usr/5lib | /usr/ucblib, and
/usr/ccs/lib |
| libcurses_p.a | /usr/5lib | Not available |
-
Table 16-6 (Continued)
| Library Name | SunOS release 4.x Directory | Solaris 2.5 Directory |
| libdbm.a | /usr/lib | /usr/ucblib |
| libdl.so.1.0 | /usr/lib | /usr/lib |
| libg.a | /usr/lib | Not available |
| libkvm.a | /usr/lib | Not available |
| libkvm.so.0.3 | /usr/lib | /usr/lib |
| libl.a | /usr/lib | /usr/ccs/lib |
| libln.a | /usr/lib | Not available |
| liblwp.a | /usr/lib | Not available |
| libm.a | /usr/lib | /usr/lib, and
/usr/lib/libp |
| libmp.a | /usr/lib | /usr/lib |
| libnbio.a | /usr/lib | Not available |
| libnsl.a | /usr/lib | /usr/lib |
| libpixrect.a | /usr/lib | Not available |
| libpixrect.so.2.14 | /usr/lib | Not available |
| libposix.a | /usr/lib | Not available |
| libresolv.a | /usr/lib | /usr/lib |
| librpcsvc.a | /usr/lib | /usr/lib |
| libsuntool.so.0.54 | /usr/lib | Not available |
| libsunwindow.so.0.55 | /usr/lib | Not available |
| libsvidm.a | /usr/5lib | Not available |
| libsvidm_p.a | /usr/5lib | Not available |
| libtermcap.a | /usr/lib,
/usr/5lib | /usr/ucblib, and
/usr/ccs/lib |
| libtermlib.a | /usr/lib, and
/usr/5lib | /usr/ccs/lib |
-
Table 16-6 (Continued)
| Library Name | SunOS release 4.x Directory | Solaris 2.5 Directory |
| libxgl.so.1.1 | /usr/lib | /opt/SUNWits/Graphi cs-sw/xgl/lib |
| libxpg.a | /usr/xpg2lib | Not available |
| liby.a | /usr/lib, and
/usr/5lib | /usr/ccs/lib |
Using make
- There are two make utilities available in the Solaris 2.5 operating environment. The default version, /usr/ccs/bin/make, is identical to the SunOS release 4.x make command. The SVR4 version is available in /usr/ccs/lib/svr4-make.
- Using the default version, your Makefiles will not need changes. However, some of the commands used in your Makefiles may have changed. For example, install(1), commonly used in Makefiles, could produce unexpected results because of changes to the options. (See the following code sample.)
-
In a SunOS 4.x Makefile:
install:
install -o bin -g bin -m 444 target.c /usr/bin/target
In a SunOS 5.5 Makefile:
install:
install -u bin -g bin -m 444 target.c /usr/bin/target
|
- The version of install(1B) in /usr/ueb is compatible with the 4.x version.
- Check the compatibility tables in Appendix A, "Commands Reference Table," for information about individual interfaces.
Using SCCS
- The Solaris 2.5 operating environment source code control system (SCCS) has minor differences from the SunOS release 4.x version. The same set of commands and subcommands are supported in both environments. SCCS directories and s.files used on SunOS release 4.x systems work equally well on Solaris 2.5 systems.
- In SunOS release 4.x, the SCCS commands were located in the /usr/sccs directory. These commands are located with the other programming tools in /usr/ccs/bin in the Solaris 2.5 operating environment.
- One difference between SunOS release 4.x and Solaris 2.5 utilities is the handling of unreadable s.files. The SunOS release 4.x commands print an error and continue when they encounter an unreadable s.file. The Solaris 2.5 commands silently ignore the error.
Determining Application Compatibility
- Although the Binary Compatibility Package is not provided as a development environment, it requires sound programming practices that can improve binary compatibility with future releases.
- Information on using the Binary Compatibility Package is available in Binary Compatibility Guide.
Well-Behaved Applications
- The Binary Compatibility Package works with well-behaved user applications. Well-behaved applications meet the following requirements:
-
- They do not trap directly to the kernel
- They do not write directly to any system files
- They do not use /dev/kmem, /dev/mem, or libkvm
- They do not use unpublished SunOS interfaces
- They do not rely on customer-supplied drivers
- Applications that are not well-behaved can produce unpredictable results.
Dynamically Linked and Statically Linked Executables
- The Binary Compatibility Package provides compatibility for dynamically linked and statically linked applications, as well as hybrids that are partially static and partially dynamically linked.
Packaging Applications
- The Solaris 2.5 operating environment is bundled in units called packages. These packages contain all of the files and information you need to add or remove software from your system.
- A package consists of the following components:
-
-
pkginfo file - This is an ASCII file that sets characteristics of the package. It consists of a list of macro=value pairs that describe the package and set control parameters for its installation. See the pkginfo(4) man page for more information.
prototype file - This is an ASCII file that defines the contents of the package. It contains one entry for each deliverable object (for example, files, directories, and links). It also contains installation entries for package information files, such as pkginfo, depend, and copyright files, and scripts. See the prototype(4) man page for more information.
copyright file -This is an ASCII file that provides a copyright notice for the package. Its contents (including comment lines) are displayed during package installation. See the copyright(4) man page for more information. Package contents - The contents of the package. Scripts - Scripts can be used to control installation or removal of a package, to request input from the user, or to perform an action on all objects of a particular class. Scripts must be executable by the Bourne shell.
- Add-on application software should be packaged so it can be installed on a Solaris 2.5 system from diskette, tape, or CD-ROM. Application Packaging Developer's Guide provides guidelines for building your packages.
Packaging Utilities
- Several utilities are provided to create and manipulate packages.
-
| pkgproto....Generates prototype file entries for input to the pkgmk command
pkgmk......Produces an installable package
pkgtrans....Translates package format
|
Table 16-8 lists commands that are useful for adding and removing packages.
Table 16-8 Commands for Adding and Removing Packages |
pkgadd.....Add software package to the system
pkgask.....Store answers to a request script
pkgrm......Remove a package from the system
pkgchk.....Check accuracy of installation |
-
| pkginfo | Display software package information about installed packages |
| pkgparam | Display package parameter values |
Toolkits
- This section discusses changes to OLIT and XView.
OLIT
- The OPEN LOOK Intrinsics Toolkit (OLIT) is based on Xt Intrinsics. It provides a set of functions common to many widget sets to create, employ, and destroy user interface components for an X environment.
XView
- The XView Window Toolkit provides an implementation of the OPEN LOOK Graphical User Interface (GUI) specification. It provides a migration path for SunView applications.
- XView uses variable-length attribute-value lists based on varargs to specify objects to be created, such as windows, menus, and scrollbars. This eliminates most of the boilerplate software usually found in procedural interfaces, since the usual behavior is already defined.
Finding SunOS Release 4.x Tools
- Most programming tools are still available in the Solaris 2.5 operating environment, and they provide the same capabilities, but many are in new locations. All bundled programming tools are now in two directories: /usr/ccs/bin and /usr/ccs/lib. Table 16-10 shows the programming tools and their locations.
-
Table 16-10
| SunOS release 4.x Command | SunOS release 4.x Location | Solaris 2.5 Location |
| admin | /usr/sccs | /usr/ccs/bin |
| ar | /usr/bin | /usr/ccs/bin |
| as | /usr/bin | /usr/ccs/bin |
| cdc | /usr/sccs | /usr/ccs/bin |
| comb | /usr/sccs | /usr/ccs/bin |
| cpp | /usr/lib/cpp | /usr/ccs/lib |
| delta | /usr/sccs | /usr/ccs/bin |
| error | /usr/ucb | /usr/ccs/bin |
| get | /usr/sccs | /usr/ccs/bin |
| help | /usr/sccs | /usr/ccs/bin |
| ld | /usr/bin | /usr/ccs/bin |
| lex | /usr/bin | /usr/ccs/bin |
| lorder | /usr/bin | /usr/ccs/bin |
| m4 | /usr/bin | /usr/ccs/bin |
| make | /usr/bin | /usr/ccs/bin |
| nm | /usr/bin | /usr/ccs/bin |
| prof | /usr/bin | /usr/ccs/bin |
-
Table 16-10(Continued)
| SunOS release 4.x Command | SunOS release 4.x Location | Solaris 2.5 Location |
| prs | /usr/sccs | /usr/ccs/bin |
| prt | /usr/sccs | /usr/ccs/bin |
| ranlib | /usr/bin | /usr/ccs/bin |
| rmdel | /usr/sccs | /usr/ccs/bin |
| sact | /usr/sccs | /usr/ccs/bin |
| sccs | /usr/ucb | /usr/ccs/bin |
| sccsdiff | /usr/sccs | /usr/ccs/bin |
| size | /usr/bin | /usr/ccs/bin |
| strip | /usr/bin | /usr/ccs/bin |
| symorder | /usr/ucb | /usr/ccs/bin |
| tsort | /usr/bin | /usr/ccs/bin |
| unget | /usr/sccs | /usr/ccs/bin |
| unifdef | /usr/ucb | /usr/ccs/bin |
| val | /usr/sccs | /usr/ccs/bin |
| vc | /usr/old | /usr/ccs/bin |
| what | /usr/sccs | /usr/ccs/bin |
| yacc | /usr/bin | /usr/ccs/bin |
| yaccpar | /usr/lib | /usr/ccs/bin |
-
Table 16-11 lists the new Solaris 2.5 commands and their descriptions.
-
Table 16-11
| New Command | Description |
| dis | Object code disassembler |
| dump | Dumps selected parts of an object file |
| exstr | Extracts strings from source files |
| mcs | Manipulates the comment section of an object file |
-
Table 16-11
| New Command | Description |
| regcmp | Regular expression compiler |
| truss | Traces system calls and signals |
| ptools | Miscelaneous /proc utilities |
-
Table 16-12 lists the SunOS release 4.x commands that are now unbundled.
-
Table 16-12
| Unbundled Command | Description |
| cb | A simple C program beautifier |
| cc | C compiler |
| cflow | Generates a flow graph for a C program |
| cscope | Interactively examines a C program |
| ctrace | Generates a C program execution trace |
| cxref | Generates a C program cross-reference |
| dbx | Source-level debugger |
| dbxtool | Window-based source-level debugger |
| gprof | Displays call-graph profile data |
| indent | Indents and formats C program source files |
| inline | In-line procedure call expander |
| lint | A C program verifier |
| objdump | Dumps selected parts of a COFF object file |
| tcov | Constructs test coverage analysis and statement-by-
statement profile |
|
|