By default, the executable installs the LibC SDK in the following directories:
Binaries—c:\novell\ndk\libc
Documentation—c:\novell\ndk\doc\libc
Sample code—c:\novell\ndk\samples\libc_sample
The c:\novell\ndk\libc directory has the following subdirectories:
This directory contains the prelude object files (which need to be linked in your application) along with several import files. The prelude file is especially designed for use with the header files in this release. You should never use a prelude file from one version of the LibC with header files from either an earlier or later version.
The files and their purposes are listed in the following table.
Table 1-2 The Files in the Import Directory
LibC provides two prelude files, a traditional libcpre file that supports NetWare semantics and a posixpre file that supports POSIX semantics. These files support the following features:
Table 1-3 Prelude File Comparison
Feature |
libcpre |
posixpre |
---|---|---|
Path and filenames |
NetWare semantics. For example: sys:\system\nlm |
POSIX semantics. For example: /sys/system/nlm For more information, see Section 13.2, POSIX Path Semantics |
Multiple NLMs loaded in the same address space, even in ring 3. |
Supported |
Partial support. When a POSIX NLM is loaded in ring 3, only one NLM containing a function named main can be loaded in a specified address space. Additional NLMs can be loaded into this address space if they meet the following conditions:
|
Signal support |
Basic support, including SIGTERM and SIGABRT. |
Extended support, including support for
|
TZ (time zone) environment variable |
Not supported |
Supported. |
Link flag (LD_WANT_ POSIX_SEMANTICS) |
Supported. Causes the NLM to be a POSIX NLM while allowing multiple NLMs to be loaded into the same protected address space. |
Supported. Causes the linker flag LD_WANT_POSIX_SEMANTICS to be set even when not set with the FLAG_ON linker directive. |
TMPDIR (temporary directory) environment variable |
Not supported |
Supported. |
CWD (current working directory) environment variable |
Not supported. |
Supported. |
alarm function |
Not supported. |
Supported |
system function |
Legacy semantics, which allow you to use a console command as the value for the command parameter. |
Extended support, which allows you to use the system function to load another NLM or to issue a console command. |
rename function |
NetWare semantics, which includes wildcards for reanming multiple files and failure when the new name is the name of an existing file. |
POSIX semantics which allow you to rename the file to the name of an existing file. |
Consoles |
NetWare behavior. |
More POSIX-like behavior, which enables such things as ^C and ^Z. This feature also requires nwtermio.nlm. |
The LD_WANT_POSIX_SEMANTICS linker flag enables all of the POSIX features except for the single address space. If your NLM does not require the single address space, you can select to use the licpre prelude file with the POSIX semantics linker flag. For more information about this flag, see Section 1.6, Using a Linker Definition File.
The POSIX prelude file contains new start up functions:
POSIX_Start replaces _LibCPrelude. _NonAppStart is not recommended for a POSIX application.
POSIX_Stop replaces _LibCPostlude. _NonAppStop is not recommended for a POSIX application.
POSIX_CheckUnload replaces _LibCCheckUnload. NonApp_CheckUnload is not recommended for a POSIX application.
This prelude permits the use of two new symbols, init and fini, whose absence from earlier versions of LibC will prevent your NLM from loading on those systems. This is by design since older versions of LibC do not contain the functionality and NLM linking this new prelude is looking for.
An NLM compiled with this prelude file runs best on the LibC version included in this NDK or on the version that ships with NetWare 6.5 SP3 and NetWare 5.1 SP8. It also must be loaded into protected address space to take advantage of the new features.
For more information about using this feature to write a library, including coverage of the _init and _fini functions, see AppNote: Writing NetWare Loadable Modules (NLMs) as Shared Libraries.
This directory contains the C header files for all compilers. It has five subdirectories. Because some of the filenames are duplicated in the subdirectories, your include statements must contain both the directory and filename. For example:
# include <nks/netware.h>
The include directory has the following subdirectories.
This directory contains two versions of the libraries: normal and debug. Because the NDK is updated more frequently than NetWare, you must copy these libraries to your server to use them. In a default NetWare installation, you should copy them to the c:\nwserver directory. For more complete installation information, see Section 1.7, Installing the LibC Files on a NetWare Server.
This directory contains several XML locale files and code page tables. Because the NDK is updated more frequently than NetWare, you must copy these files to your server to use any new or updated files. In a default NetWare installation, you should copy them to the c:\nwserver\nls directory.