1N/A * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1N/A * The contents of this file are subject to the Netscape Public License 1N/A * Version 1.0 (the "NPL"); you may not use this file except in 1N/A * compliance with the NPL. You may obtain a copy of the NPL at 1N/A * Software distributed under the NPL is distributed on an "AS IS" basis, 1N/A * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL 1N/A * for the specific language governing rights and limitations under the 1N/A * The Initial Developer of the Original Code is Netscape 1N/A * Communications Corporation. Portions created by Netscape are 1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All 1N/A * Copyright (c) 1990 Regents of the University of Michigan. 1N/A * All rights reserved. 1N/A * Redistribution and use in source and binary forms are permitted 1N/A * provided that this notice is preserved and that due credit is given 1N/A * to the University of Michigan at Ann Arbor. The name of the University 1N/A * may not be used to endorse or promote products derived from this 1N/A * software without specific prior written permission. This software 1N/A * is provided ``as is'' without express or implied warranty. 1N/A#
else /* macintosh */ 1N/A/* No stderr in a 16-bit Windows DLL */ 1N/A#
endif /* defined( _WINDOWS ) */ 1N/A#
endif /* macintosh */ 1N/A#
endif /* _WINDOWS */ 1N/A/* No stderr in a 16-bit Windows DLL */ 1N/A * Everything from this point on is excluded if NSLBERI_LBER_INT_FRIEND is 1N/A * macros used to check validity of data structures and parameters 1N/A ((((
_l)&
0xff)<<
24) + (((
_l)&
0xff00)<<
8) + \
1N/A (((
_l)&
0xff0000)>>
8) + (((
_l)&
0xff000000)>>
24))
1N/A * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the 1N/A * lower-order 32-bits of a (64-bit) long, so we define correct versions 1N/A |
htonl( ( (l) &
0xFFFFFFFF00000000 ) >>
32 ))
1N/A |
ntohl( ( (l) &
0xFFFFFFFF00000000 ) >>
32 ))
1N/A/* function prototypes */ 1N/A * slapd spends much of its time doing memcpy's for the ber code. 1N/A * Most of these are single-byte, so we special-case those and speed 1N/A * things up considerably. 1N/A * Memory allocation done in liblber should all go through one of the 1N/A * following macros. This is so we can plug-in alternative memory 1N/A * allocators, etc. as the need arises. 1N/A/* allow the library to access the debug variable */ 1N/A#
endif /* !NSLBERI_LBER_INT_FRIEND */ 1N/A#
endif /* _LBERINT_H */