home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
nwnet
/
root
/
usr
/
include
/
sys
/
nwportable.h
/
nwportable
Wrap
Text File
|
1998-08-19
|
4KB
|
129 lines
/*
* Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
* SANTA CRUZ OPERATION INC.
*
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*/
/* $Novell-NWU: $Header: /proj6/ncps/nwu_top/nwnet/include/sys/nwportable.h,v 1.4 1996/04/05 21:56:12 vtag Exp $ */
/*
* Copyright 1991, 1992 Novell, Inc.
* All Rights Reserved.
*
* This work is subject to U.S. and International copyright laws and
* treaties. No part of this work may be used, practiced, performed,
* copied, distributed, revised, modified, translated, abridged,
* condensed, expanded, collected, compiled, linked, recast,
* transformed or adapted without the prior written consent
* of Novell. Any use or exploitation of this work without
* authorization could subject the perpetrator to criminal and
* civil liability.
*/
/*
** Max length of a netware server name, must stay outside of wrapper
*/
#ifndef NWMAX_SERVER_NAME_LENGTH
#define NWMAX_SERVER_NAME_LENGTH 48
#endif
#ifndef _NET_NW_NWPORTABLE_H /* wrapper symbol for kernel use */
#define _NET_NW_NWPORTABLE_H /* subject to change without notice */
#ident "@(#)nwportable.h 1.2"
/*
** Definitions required for application include files
*/
/* Define base types. */
typedef unsigned long uint32; /* 32-bit unsigned type */
typedef unsigned short uint16; /* 16-bit unsigned type */
typedef unsigned char uint8; /* 8-bit unsigned type */
typedef long int32; /* 32-bit signed type */
typedef short int16; /* 16-bit signed type */
typedef char int8; /* 8-bit signed type */
/* Define base types, same as those above but with "np" suffix,
* defined so that the compiler doesn't try to align these types
* (causing padding in structure definitions) ("np" stands for "no
* padding").
*
* When defining structures for which you wish NO PADDING, bracket the
* structure with #include's of nopad.h and nopadoff.h, and use these
* "np" types in the structure rather than the "naturally aligned"
* base types above.
*
* NOTE: On some platforms (such as HPUX), the "nopadding" directives
* (from nopad.h and nopadoff.h) MUST be at global scope (i.e. outside
* all bracketed blocks ({}). Thus, when defining unpadded
* structures, both the #includes of nopad.h and nopadoff.h, as well
* as the structure definition itself must be at global scope.
*
* NOTE how the definitions below are themselves within #include
* nopad.h/nopadoff.h above and below. This bracketing of the
* typedefs of the base types is crucial on HPUX and superfluous on
* most other platforms (such as UnixWare).
*/
#ifdef _KERNEL_HEADERS
#include <nwu/nwnet/include/unixware/nopad.h>
#else
#include "sys/nopad.h"
#endif
typedef unsigned long uint32np; /* "npadding" 32-bit unsigned type */
typedef unsigned short uint16np; /* "npadding" 16-bit unsigned type */
typedef unsigned char uint8np; /* "npadding" 8-bit unsigned type */
typedef long int32np; /* "npadding" 32-bit signed type */
typedef short int16np; /* "npadding" 16-bit signed type */
typedef char int8np; /* "npadding" 8-bit signed type */
#ifdef _KERNEL_HEADERS
#include <nwu/nwnet/include/unixware/nopadoff.h>
#else
#include "sys/nopadoff.h"
#endif
/* For compatibility with native NetWare source code. */
#ifndef LONG
#define LONG unsigned long
#endif
#ifndef WORD
#define WORD unsigned short
#endif
#ifndef BYTE
#define BYTE unsigned char
#endif
/* Standard constants */
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
/* these defines are used at the NCP layer as response values to the requestors.
** Some of the other layers have been using these defines, which is ok, but
** do not change their values.
*/
#ifndef SUCCESS
#define SUCCESS 0x00
#endif
#ifndef FAILURE
#define FAILURE 0xFF
#endif
#endif /* _NET_NW_NWPORTABLE_H */