内に含ま
その他のドキュメント
サポート リソース
| PDF 文書ファイルをダウンロードする
Networking and Internationalization
17
- This chapter discusses Solaris 2.4 networking features as they relate to the programming environment, and it discusses issues concerning the improved internationalization features.
-
Networking
- The Solaris 2.4 operating environment includes the following networking features:
-
- Distributed file system (DFS), which centralizes the file system utilities
- Network information services plus (NIS+)
- Name service switch file
- See Name Services Administration Guide for more information on using these services.
NIS, NIS+
- The Solaris 2.4 operating environment supports the network information service (NIS), the SunOS 4.x name service, and the network information services plus (NIS+), an enterprise-naming service of heterogenous distributed systems. See "NIS Support in SunOS Release 5.4" on page 143 for the nature of NIS support available in the Solaris 2.4 operating environment.
- NIS+ provides a more detailed model for objects in the name space, improved security, and faster updates than NIS.
- The NIS+ programmer interfaces are documented in section 3N of the man Pages(3): Library Routines.
nsswitch.conf File
- The nsswitch.conf file is designed to simplify name service administration. Applications can use this file to select a name service. This information no longer needs to be hard-coded into the service itself. See the nsswitch.conf(4) man page for more information on the format of this file.
NIT
- The Network Interface Tap (NIT) provided in the SunOS 4.x release is no longer required in the Solaris 2.4 operating environment. Now Ethernet drivers are real STREAMS drivers that can be opened and communicated with directly.
- The Solaris 2.4 Ethernet drivers and other data link drivers support the connectionless Data Link Provider Interface (DLPI) Version 2 specification.
Sockets
- Sockets are not defined as part of the ABI, although they are supported in the Solaris 2.4 operating environment. Unlike the SunOS release 4.x, sockets are no longer a kernel-level interface. They are now a library, libsocket, implemented on STREAMS.
Internationalization
- Developers concerned with internationalization will find that most of the changes in the Solaris 2.4 operating environment improve on previous internationalization features.
- For complete information on internationalization support, see Developer's Guide to Internationalization.
- Application developers concerned with internationalizing their programs should follow these guidelines:
-
- Call setlocale(3C) to set up the LANG environment variable
- Use standard code sets and follow 8-bit boundaries
- Use srftime(3C) to print the date and time
- Replace strcmp(3) with strcoll(3C) for user-visible collation
- Call gettext(3C) to retrieve translated strings from locale-specific message catalogs
Character Support
- The Solaris 2.4 operating environment supports the extended UNIX code (EUC). This allows multibyte and multiple code sets on one system.
- The SunOS release 4.x supported single byte representation of non-ASCII characters. The Solaris 2.4 operating environment supports multibyte representation. This support is needed for Asian language character sets, which contain thousands of characters.
- The multibyte library, libw, is documented in section 3I of man Pages(3): Library Routines and provides the following features:
-
- Multibyte-to-wide character conversions
- Wide character standard I/O
- Wide character classification
- Wide character formatting
- The Solaris 2.4 operating environment supports multibyte file names; however, login and machine names should be restricted to ASCII characters.
Message Catalogs
- SunOS release 4.x support for message catalogs is enhanced in the Solaris 2.4 operating environment to enable the creation of message catalogs using multibyte characters.
- Using message catalogs, an application can display messages at run time in the native language in which an application was run. These message catalogs must first be created for the native language specified by the language locale.
Commands
- Most of the system commands in the Solaris 2.4 operating environment have been messaged. Many of these commands can pass through multibyte character representations. The increased number of messaged commands will ease localization efforts.
- The colldef(8) command has been replaced with colltbl(1M), which supports East Asian languages (level-4 support).
- The installtxt(1) command has been replaced with msgfmt(1). Use the new xgettext(1) command to extract messages.
- The montbl(1M) command is now available to automatically generate monetary databases for LC_MONETARY.
- Changes to strftime(3C) affect date and time formats. Shell programs that rely on the output format of the date(1) command will have to be updated to handle the new format.
Libraries
- The /usr/xpg2lib/libxpg2.a archive library is no longer available. These routines have been included in libc or libintl (a new Solaris 2.4 library).
-
Table 17-1 shows the new location of these interfaces.
-
Table 17-1 xpg2lib
| Routine | SunOS 4.x Location | Solaris 2.4 Location |
| bindtextdomain | /usr/xpg2lib/libxpg | /usr/lib/libintl |
| chroot | /usr/xpg2lib/libxpg | /usr/lib/libc |
| catgets | /usr/xpg2lib/libxpg | /usr/lib/libc |
| dgettext | /usr/xpg2lib/libxpg | /usr/lib/libintl |
| getcwd | /usr/xpg2lib/libxpg | /usr/lib/libc |
| getut | /usr/xpg2lib/libxpg | /usr/lib/libc |
| l3tol | /usr/xpg2lib/libxpg | /usr/lib/libc |
| logname | /usr/xpg2lib/libxpg | /usr/lib/libc |
| malloc | /usr/xpg2lib/libxpg | /usr/lib/libc |
| swab | /usr/xpg2lib/libxpg | /usr/lib/libc |
| langinfo | /usr/xpg2lib/libxpg | /usr/lib/libc |
| gettext | /usr/xpg2lib/libxpg | /usr/lib/libintl |
| sbrk | /usr/xpg2lib/libxpg | /usr/lib/libc |
| textdomain | /usr/xpg2lib/libxpg | /usr/lib/libintl |
- Programs that use these routines no longer need to pass -lxpg2 to the C compiler (although some may need to specify -lintl now, and may need to include libintl.h; see Table 17-1 for these routines).
- The libintl and libw libraries are new. The libw library provides wide character, multibyte support. These routines were included in the unbundled ALE product with previous releases, and are documented in section 3I of man Pages(1): User Commands.
- The catgetmsg(3C) routine is no longer available.
- The order of locale categories in the string returned by setlocale(3C) differs between the SunOS release 4.x and the Solaris 2.4 software. This string is normally used by a subsequent call to setlocale(3C), and the order should not matter. Applications should not rely on a specific order of locale categories.
|
|