This chapter discusses the changes to tools and resources for the development environment.
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 termios structure and Solaris 7 termios structure. For example, the Solaris 7 termios structure does not include a c_line field.
The following ioctls requests, defined in <sys/ttold.h>, are not implemented in this release.
TIOCMODG
OTTYDISC
TABLDISC
KBLDISC
TIOCMIDS
TIOCSETX
NETLDISC
NTABLDISC
TIOCGETX
NTTYDISC
MOUSELDISC
The following ttycom ioctl requests are not in the Solaris 7 operating environment.
TIOCSCTTY
TIOCNOTTY
TIOCISPACE
TIOCPKT
TIOCGETPGRP
TIOCISIZE
TIOCUCNTL
TIOCOUTQ
TIOCTCNTL
TIOCCONS
Table 16-1 shows the ioctls supported in the Solaris 7 operating environment.
Table 16-1 ioctl() Support
The ptrace() facility is implemented on top of /proc. New applications should use proc(4) directly.
The ptrace() routine in Solaris 7 software is present solely to support applications running in BCP mode. It uses integers 1 - 9 as request values, while the SunOS release 4 routine defines request values as symbolic constants in <sys/ptrace.h>. The following SunOS release 4 request symbolic constants are compatible with Solaris 7 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 PTRACE_CONT 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 equivalent Solaris 7 request 7 requires that addr always be equal to 1 and that execution always resumes from where the process stopped. Also, the Solaris 7 request 7 cancels all pending signals before the process resumes execution except those specified by data. The SunOS release 4 PTRACE_CONT does not cancel all pending signals.
Table 16-2 shows SunOS release 4 valid requests that are not supported by the Solaris 7 ptrace() routine.
Table 16-2 ptrace() Requests Not Supported by Solaris 7 Software
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 |
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 BSD C library require more effort.
Several functions and groups of functions were moved into different libraries. This can cause references to these functions to be flagged as undefined when compiling a SunOS release 4 application in the Solaris 7 environment.
After a compile, check the man page of any functions flagged as undefined. The synopsis lists both the -l linker option and any include files that you need to resolve the symbol.
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 7 software.
In previous releases, static table allocations were used for resources such as file descriptors and active processes. These resources are now dynamically allocated, so they are limited by the physical memory available. Table 16-3 shows the resource limits.
Table 16-3 Resource Limits
Configuration |
Limitation |
---|---|
|
Maximum size of core file (in bytes) that can be created by a process |
|
Maximum amount of CPU time (in seconds) that a process can use |
|
Maximum size of a process's heap (in bytes) |
|
Maximum size of a file (in bytes) that can be created by a process |
|
One more than the maximum number of file descriptors that can be created by a process |
|
Maximum size (in bytes) to which a process's mapped address space may grow |
|
Maximum size (in bytes) of a process's stack |
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-4 shows SunOS release 4 and Solaris 7 libraries and their locations.
Table 16-4 Comparison of Library Locations
Library Name |
SunOS release 4 Directory |
Solaris 7 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 |
/usr/lib and /usr/5lib |
/usr/ucblib and /usr/ccs/lib |
|
libcurses_p.a |
/usr/5lib |
Not available |
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 |
/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 | |
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 |
/usr/5lib |
Not available |
|
libsvidm_p.a |
/usr/5lib |
Not available |
/usr/lib and /usr/5lib |
/usr/ucblib and /usr/ccs/lib |
|
libtermlib.a |
/usr/lib and /usr/5lib |
/usr/ccs/lib |
libxgl.so.1.1 |
/usr/lib |
/opt/SUNWits/ Graphics-sw/xgl/lib |
/usr/xpg2lib |
Not available |
|
liby.a |
/usr/lib and /usr/5lib |
There are two make utilities available in the Solaris 7 operating environment. The default version, /usr/ccs/bin/make, is identical to the SunOS release 4 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, as shown in the following examples.
In a SunOS release 4 Makefile - install:
install -o bin -g bin -m 444 target.c /usr/bin/target |
In a SunOS release 5.7 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 SunOS release 4 version.
Check the compatibility tables in Appendix A, Commands Reference Table, for information about individual interfaces.
The Solaris 7 operating environment source code control system (SCCS) is slightly different from the SunOS release 4 version. The same set of commands and subcommands are supported in both environments. SCCS directories and s.files used on SunOS release 4 systems work equally well on Solaris 7 systems.
In the SunOS release 4 software, 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 7 operating environment.
One difference between SunOS release 4 and Solaris 7 utilities is the handling of unreadable s.files. The SunOS release 4 commands print an error and continue when they encounter an unreadable s.file. The Solaris 7 commands silently ignore the error.
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.
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.
The Binary Compatibility Package works with well-behaved user applications. Well-behaved applications do not:
Trap directly to the kernel
Write directly to any system files
Use /dev/kmem, /dev/mem, or libkvm
Use unpublished SunOS interfaces
Rely on customer-supplied drivers
Applications that are not well-behaved can produce unpredictable results.
Information on using the Binary Compatibility Package is available in Binary Compatibility Guide.
The Solaris 7 operating environment is bundled in units called packages. These packages contain all 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-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 7 system from diskette, tape, or CD-ROM. Application Packaging Developer's Guide provides guidelines for building your packages.
Several utilities are provided to create and manipulate packages. Table 16-5 lists commands that are useful for creating packages.
Table 16-5 Commands for Creating Packages
Generates prototype file entries for input to the pkgmk command |
|
Produces an installable package |
|
Translates package format |
Table 16-6 lists commands that are useful for adding and removing packages.
Table 16-6 Commands for Adding and Removing Packages
Adds software package to the system |
|
Stores answers to a request script |
|
Removes a package from the system |
|
Checks accuracy of installation |
Table 16-7 lists commands that provide information about packages.
Table 16-7 Commands for Providing Information About Packages
Displays software package information about installed packages |
|
This section discusses OPEN LOOK Intrinsics ToolKit (OLIT) and XViewTM.
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.
The XView Window Toolkit provides an implementation of the OPEN LOOK Graphical User Interface (GUI) specification. It provides a migration path for SunViewTM 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.
Most SunOS release 4 programming tools are still available and stil provide the same capabilities, but many are in new locations. All bundled programming tools are now in the /usr/ccs/bin library except cpp, which is now in the /usr/ccs/lib library. Table 16-8 shows the programming tools and their SunOS release 4 locations.
Table 16-8 Bundled Programming Tools
SunOS Release 4 Command |
SunOS Release 4 Location |
---|---|
/usr/sccs |
|
/usr/bin |
|
/usr/bin |
|
/usr/sccs |
|
/usr/sccs |
|
/usr/lib/cpp |
|
/usr/sccs |
|
/usr/ucb |
|
/usr/sccs |
|
/usr/sccs |
|
/usr/bin |
|
/usr/bin |
|
/usr/bin |
|
/usr/bin |
|
/usr/bin |
|
/usr/bin |
|
/usr/bin |
|
/usr/sccs |
|
/usr/sccs |
|
/usr/bin |
|
/usr/sccs |
|
/usr/sccs |
|
/usr/ucb |
|
/usr/sccs |
|
/usr/bin |
|
/usr/bin |
|
/usr/ucb |
|
/usr/bin |
|
/usr/sccs |
|
/usr/ucb |
|
/usr/sccs |
|
/usr/old |
|
/usr/sccs |
|
/usr/bin |
|
/usr/lib |
Table 16-9 lists the new Solaris 7 programming tools and their descriptions.
Table 16-9 New Programming Tools
New Command |
Description |
---|---|
Object code disassembler |
|
Dumps selected parts of an object file |
|
Extracts strings from source files |
|
Manipulates the comment section of an object file |
|
Regular expression compiler |
|
Traces system calls and signals |
|
ptools |
Miscellaneous /proc utilities |
Table 16-10 lists the SunOS release 4 commands that are unbundled in SunOS release 5.7.
Table 16-10 Unbundled Programming Tools
Unbundled Command |
Description |
---|---|
Simple C program beautifier |
|
C compiler |
|
Generates a flow graph for a C program |
|
Interactively examines a C program |
|
Generates a C program execution trace |
|
Generates a C program cross-reference |
|
Source-level debugger |
|
Window-based source-level debugger |
|
Displays call-graph profile data |
|
Indents and formats C program source files |
|
In-line procedure call expander |
|
C program verifier |
|
Dumps selected parts of a COFF object file |
|
Constructs test coverage analysis and statement-by-statement profile |