NLM and NetWare Libraries for C (including CLib and XPlat)

1.0 Overview
2.0 What's New
2.1 New Install Directory
2.2 CLib Libraries
2.3 Prelude File
2.4 What's New Archive
3.0 Multiprocessor Functionality
4.0 Installation Instructions
4.1 CLib Libraries
4.2 Cross-Platform Libraries
5.0 Documentation
6.0 Sample Code
7.0 Legal Notices


1.0 Overview

NLM and NetWare Libraries for C (including CLib and XPlat) include the core libraries for creating NLMs and client applications on legacy NetWare and client platforms. For NLMs that need to run on NetWare 5.1 or later, LibC is the preferred library.


2.0 What's New

This release contains the libraries that shipped with NetWare 6.5 SP4, NetWare 6.0 SP6, and Novell Open Enterprise Server SP1. It contains minor technical corrections to the libraries. It also includes minor technical corrections in a few manuals and formatting changes in all manuals.

To ask questions, to find answers, or to report problems, visit the following Developer Support Forums: NLM and NetWare Libraries for C (including CLib and XPlat).


2.1 New Install Directory

Starting with the March 2005 NDK, the default install directory for this SDK has changed from Novell\ndk\nwsdk to Novell\ndk\clib. If you have installed a previous version in the default location, please remove it before installing this version.


2.2 CLib Libraries

In past releases, the lib/nlm directory has contained two subdirectories: one for the NetWare 4.x libraries and one for the NetWare 5.x and NetWare 6.x libraries. The NetWare 4.x libraries and its directories have been removed. The NetWare 4.x libraries can be downloaded from Forge.

Because the libraries are single sourced for NetWare 5.x and 6.x, the lib/nlm directory now contains a single set of libraries that runs on both NetWare 5.x and NetWare 6.x with a debug subdirectory for the debug versions.


2.3 Prelude File

The July 2003 release contains a new CLib pre file that fixes a problem with the destruction of globals.

The CLib pre file replaces the two existing CLib prelude files (nwpre.obj and prelude.obj). The new file, clibpre.obj, contains new C++ hooks for use by CodeWarrior, Watcom and GNU, and a higher NLM architecture version number. However, an NLM linked with this file, but without a vendor-specific runtime library, may not load on versions of NetWare prior to v5.1 SP4 (including NetWare 4 and NetWare 3).

If this is a problem, either link with nwpre.obj instead or add the following function stubs to your code (and link them):

   int __init_environment( void *reserved ) 
{
return 0;
}

int __deinit_environment( void *reserved )
{
return 0;
}

Basically, clibpre.obj is nwpre.obj with a call to these functions that vendor runtime libraries implement to perform their C++ initialization and clean-up.


2.4 What's New Archive

To see what was changed in the software, sample code, and documentation for previous releases, see the Update Archive.

To see the specific documentation changes that were made, see the Revision History at the end of each manual.


3.0 Multiprocessor Functionality

NOTE:  For a more complete description of multi-processing, see "Multiprocessor Enabled/ Safe" at the following URL.

In general, LibC is multiprocessor (MP) enabled and CLib is MP safe.

If you call LibC functions, you will always be able to migrate to other processors and take advantage of multiprocessor functionality (unless you call file I/O functions on a traditional, non NSS file system).

If you call CLib functions, you will often be funneled to processor zero. File I/O functions always funnel to processor zero.

In addition, the following CLib scheduling primitives will always funnel you to processor zero:

If you use the Requester and send a packet, you will always be funneled to processor zero as well.


4.0 Installation Instructions

The NDK version of CLib and Cross-Platform libraries are for NetWare 5.1 and above. They should not be installed on NetWare 4.x or below. The following instructions explain how to update the CLib libraries and the Cross-Platform libraries on a NetWare test server.


4.1 CLib Libraries

Support packs for NetWare 5.1 and above install newer versions of CLib. However, the NDK often has a newer version than the current support pack. If you need to test with this newest version, complete the following steps to install the CLib files on a test server.

WARNING:  NDK versions of CLib should never be used in a production environment. You should always use a support pack to install newer versions of CLib into a production environment.

The following instructions assume that you installed CLib in the c:\Novell\ndk\nwsdk directory and that you installed server.exe into the c:\nwserver directory on your NetWare server.

To install the CLib files for NLMs:

  1. Back up the following files in the c:\nwserver directory:

    clib.nlm
    lib0.nlm
    nit.nlm
    nlmlib.nlm
    requestr.nlm
    threads.nlm
  2. Copy from the following files from the c:\novell\ndk\nwsdk\lib\nlm directory on your workstation to the c:\nwserver directory on your server:

    clib.nlm
    lib0.nlm
    nit.nlm
    nlmlib.nlm
    requestr.nlm
    threads.nlm
  3. (Optional) Copy the message files from the c:\novell\ndk\nwsdk\lib\nlm\msg directory on your workstation to the c:\nwserver\nls\4 directory on your server.

    This is optional, because if you compare file dates, you'll discover these files are seldom updated.

  4. Reboot your server.


4.2 Cross-Platform Libraries

Support packs for NetWare 5.1 and above install newer versions of the Cross-Platform libraries. However, the NDK often has a newer version than the current support pack. If you need to test with this newest version, complete the following steps to install the new library files on a test server.

The following instructions assume that you installed server.exe into the c:\nwserver directory on your NetWare server.

To install the files for the Cross-Platform libraries:

  1. Backup the following files in the c:\nwserver directory:

    locnlm32.nlm
    unicode.nlm
  2. Copy from the following files from the c:\novell\ndk\nwsdk\lib\nlm directory on your workstation to the c:\nwserver directory on your server:

    locnlm32.nlm
    unicode.nlm

    WARNING:  Do not install a version of unicode.nlm dated later than 6/3/2004 on a NetWare 5.1 server.

  3. Backup the following files in the sys:\system directory of your NetWare server.

    audnlm32.nlm
    calnlm32.nlm
    clnnlm32.nlm
    clxnlm32.nlm
    dsapi.nlm
    dsevent.nlm
    locnlm32.nlm
    ncpnlm32.nlm
    netnlm32.nlm
  4. Copy from the following files from the c:\novell\ndk\nwsdk\lib\nlm directory on your workstation to the sys:\system directory of your NetWare server.

    audnlm32.nlm
    calnlm32.nlm
    clnnlm32.nlm
    clxnlm32.nlm
    dsapi.nlm
    dsevent.nlm
    locnlm32.nlm
    ncpnlm32.nlm
    netnlm32.nlm
  5. Reboot your server.


5.0 Documentation

The download contains PDF files in the [install directory]\doc\clib directory.

If you selected an exe install, NDK documentation entries are enabled from Start menu. After you have installed the component, use the "NDK Documents" entry on your Start menu to quickly locate and access NDK documentation.

To read or print the documentation, you need Adobe Acrobat Reader 4.0, a free download available from Adobe.

The documents in this download were created as standalone files; therefore, links between files in this download and links to files in other downloads will not resolve.


6.0 Sample Code

For sample code, see NDK Sample Code.


7.0 Legal Notices

Novell, Inc. makes no representations or warranties with respect to the contents or use of this download, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to revise this publication and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes.

Further, Novell, Inc. makes no representations or warranties with respect to any software, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any person or entity of such changes.

You may not use, export, or re-export this product in violation of any applicable laws or regulations including, without limitation, U.S. export regulations or the laws of the country in which you reside.

All files provided in this release are subject to the Novell Developer License Agreement, which can be found in the license.txt file provided in this download.

Copyright © 2002-2005 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.

Novell and NetWare are registered trademarks of Novell, Inc. in the United States and other countries.

All third-party products are the property of their respective owners.