Bug 1546364 - Reformat to Google coding style (again) in LDAP. rs=reformat
# ignore-this-changeset
This commit is contained in:
Родитель
7dd212ff13
Коммит
12b759150b
|
@ -50,47 +50,47 @@
|
|||
*/
|
||||
|
||||
#ifndef _DISPTMPL_H
|
||||
# define _DISPTMPL_H
|
||||
#define _DISPTMPL_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling conventions used by library */
|
||||
# ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
#ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
# endif /* LDAP_CALL */
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
#endif /* LDAP_CALL */
|
||||
|
||||
# define LDAP_TEMPLATE_VERSION 1
|
||||
#define LDAP_TEMPLATE_VERSION 1
|
||||
|
||||
/*
|
||||
* general types of items (confined to most significant byte)
|
||||
*/
|
||||
# define LDAP_SYN_TYPE_TEXT 0x01000000L
|
||||
# define LDAP_SYN_TYPE_IMAGE 0x02000000L
|
||||
# define LDAP_SYN_TYPE_BOOLEAN 0x04000000L
|
||||
# define LDAP_SYN_TYPE_BUTTON 0x08000000L
|
||||
# define LDAP_SYN_TYPE_ACTION 0x10000000L
|
||||
#define LDAP_SYN_TYPE_TEXT 0x01000000L
|
||||
#define LDAP_SYN_TYPE_IMAGE 0x02000000L
|
||||
#define LDAP_SYN_TYPE_BOOLEAN 0x04000000L
|
||||
#define LDAP_SYN_TYPE_BUTTON 0x08000000L
|
||||
#define LDAP_SYN_TYPE_ACTION 0x10000000L
|
||||
|
||||
/*
|
||||
* syntax options (confined to second most significant byte)
|
||||
*/
|
||||
# define LDAP_SYN_OPT_DEFER 0x00010000L
|
||||
#define LDAP_SYN_OPT_DEFER 0x00010000L
|
||||
|
||||
/*
|
||||
* display template item syntax ids (defined by common agreement)
|
||||
|
@ -99,29 +99,29 @@ extern "C" {
|
|||
* most-significant 8 bits, and some options are encoded in the next
|
||||
* 8 bits. The lower 16 bits are reserved for the distinct types.
|
||||
*/
|
||||
# define LDAP_SYN_CASEIGNORESTR (1 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_MULTILINESTR (2 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_DN (3 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_BOOLEAN (4 | LDAP_SYN_TYPE_BOOLEAN)
|
||||
# define LDAP_SYN_JPEGIMAGE (5 | LDAP_SYN_TYPE_IMAGE)
|
||||
# define LDAP_SYN_JPEGBUTTON (6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
# define LDAP_SYN_FAXIMAGE (7 | LDAP_SYN_TYPE_IMAGE)
|
||||
# define LDAP_SYN_FAXBUTTON (8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
# define LDAP_SYN_AUDIOBUTTON (9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
# define LDAP_SYN_TIME (10 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_DATE (11 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_LABELEDURL (12 | LDAP_SYN_TYPE_TEXT)
|
||||
# define LDAP_SYN_SEARCHACTION (13 | LDAP_SYN_TYPE_ACTION)
|
||||
# define LDAP_SYN_LINKACTION (14 | LDAP_SYN_TYPE_ACTION)
|
||||
# define LDAP_SYN_ADDDNACTION (15 | LDAP_SYN_TYPE_ACTION)
|
||||
# define LDAP_SYN_VERIFYDNACTION (16 | LDAP_SYN_TYPE_ACTION)
|
||||
# define LDAP_SYN_RFC822ADDR (17 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_CASEIGNORESTR (1 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_MULTILINESTR (2 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_DN (3 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_BOOLEAN (4 | LDAP_SYN_TYPE_BOOLEAN)
|
||||
#define LDAP_SYN_JPEGIMAGE (5 | LDAP_SYN_TYPE_IMAGE)
|
||||
#define LDAP_SYN_JPEGBUTTON (6 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
#define LDAP_SYN_FAXIMAGE (7 | LDAP_SYN_TYPE_IMAGE)
|
||||
#define LDAP_SYN_FAXBUTTON (8 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
#define LDAP_SYN_AUDIOBUTTON (9 | LDAP_SYN_TYPE_BUTTON | LDAP_SYN_OPT_DEFER)
|
||||
#define LDAP_SYN_TIME (10 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_DATE (11 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_LABELEDURL (12 | LDAP_SYN_TYPE_TEXT)
|
||||
#define LDAP_SYN_SEARCHACTION (13 | LDAP_SYN_TYPE_ACTION)
|
||||
#define LDAP_SYN_LINKACTION (14 | LDAP_SYN_TYPE_ACTION)
|
||||
#define LDAP_SYN_ADDDNACTION (15 | LDAP_SYN_TYPE_ACTION)
|
||||
#define LDAP_SYN_VERIFYDNACTION (16 | LDAP_SYN_TYPE_ACTION)
|
||||
#define LDAP_SYN_RFC822ADDR (17 | LDAP_SYN_TYPE_TEXT)
|
||||
|
||||
/*
|
||||
* handy macros
|
||||
*/
|
||||
# define LDAP_GET_SYN_TYPE(syid) ((syid)&0xFF000000UL)
|
||||
# define LDAP_GET_SYN_OPTIONS(syid) ((syid)&0x00FF0000UL)
|
||||
#define LDAP_GET_SYN_TYPE(syid) ((syid)&0xFF000000UL)
|
||||
#define LDAP_GET_SYN_OPTIONS(syid) ((syid)&0x00FF0000UL)
|
||||
|
||||
/*
|
||||
* display options for output routines (used by entry2text and friends)
|
||||
|
@ -130,31 +130,31 @@ extern "C" {
|
|||
* use calculated label width (based on length of longest label in
|
||||
* template) instead of constant width
|
||||
*/
|
||||
# define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001L
|
||||
# define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002L
|
||||
#define LDAP_DISP_OPT_AUTOLABELWIDTH 0x00000001L
|
||||
#define LDAP_DISP_OPT_HTMLBODYONLY 0x00000002L
|
||||
|
||||
/*
|
||||
* perform search actions (applies to ldap_entry2text_search only)
|
||||
*/
|
||||
# define LDAP_DISP_OPT_DOSEARCHACTIONS 0x00000002L
|
||||
#define LDAP_DISP_OPT_DOSEARCHACTIONS 0x00000002L
|
||||
|
||||
/*
|
||||
* include additional info. relevant to "non leaf" entries only
|
||||
* used by ldap_entry2html and ldap_entry2html_search to include "Browse"
|
||||
* and "Move Up" HREFs
|
||||
*/
|
||||
# define LDAP_DISP_OPT_NONLEAF 0x00000004L
|
||||
#define LDAP_DISP_OPT_NONLEAF 0x00000004L
|
||||
|
||||
/*
|
||||
* display template item options (may not apply to all types)
|
||||
* if this bit is set in ti_options, it applies.
|
||||
*/
|
||||
# define LDAP_DITEM_OPT_READONLY 0x00000001L
|
||||
# define LDAP_DITEM_OPT_SORTVALUES 0x00000002L
|
||||
# define LDAP_DITEM_OPT_SINGLEVALUED 0x00000004L
|
||||
# define LDAP_DITEM_OPT_HIDEIFEMPTY 0x00000008L
|
||||
# define LDAP_DITEM_OPT_VALUEREQUIRED 0x00000010L
|
||||
# define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */
|
||||
#define LDAP_DITEM_OPT_READONLY 0x00000001L
|
||||
#define LDAP_DITEM_OPT_SORTVALUES 0x00000002L
|
||||
#define LDAP_DITEM_OPT_SINGLEVALUED 0x00000004L
|
||||
#define LDAP_DITEM_OPT_HIDEIFEMPTY 0x00000008L
|
||||
#define LDAP_DITEM_OPT_VALUEREQUIRED 0x00000010L
|
||||
#define LDAP_DITEM_OPT_HIDEIFFALSE 0x00000020L /* booleans only */
|
||||
|
||||
/*
|
||||
* display template item structure
|
||||
|
@ -170,15 +170,14 @@ struct ldap_tmplitem {
|
|||
void *ti_appdata;
|
||||
};
|
||||
|
||||
# define NULLTMPLITEM ((struct ldap_tmplitem *)0)
|
||||
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
|
||||
|
||||
# define LDAP_SET_TMPLITEM_APPDATA(ti, datap) \
|
||||
(ti)->ti_appdata = (void *)(datap)
|
||||
#define LDAP_SET_TMPLITEM_APPDATA(ti, datap) (ti)->ti_appdata = (void *)(datap)
|
||||
|
||||
# define LDAP_GET_TMPLITEM_APPDATA(ti, type) (type)((ti)->ti_appdata)
|
||||
#define LDAP_GET_TMPLITEM_APPDATA(ti, type) (type)((ti)->ti_appdata)
|
||||
|
||||
# define LDAP_IS_TMPLITEM_OPTION_SET(ti, option) \
|
||||
(((ti)->ti_options & option) != 0)
|
||||
#define LDAP_IS_TMPLITEM_OPTION_SET(ti, option) \
|
||||
(((ti)->ti_options & option) != 0)
|
||||
|
||||
/*
|
||||
* object class array structure
|
||||
|
@ -188,21 +187,21 @@ struct ldap_oclist {
|
|||
struct ldap_oclist *oc_next;
|
||||
};
|
||||
|
||||
# define NULLOCLIST ((struct ldap_oclist *)0)
|
||||
#define NULLOCLIST ((struct ldap_oclist *)0)
|
||||
|
||||
/*
|
||||
* add defaults list
|
||||
*/
|
||||
struct ldap_adddeflist {
|
||||
int ad_source;
|
||||
# define LDAP_ADSRC_CONSTANTVALUE 1
|
||||
# define LDAP_ADSRC_ADDERSDN 2
|
||||
#define LDAP_ADSRC_CONSTANTVALUE 1
|
||||
#define LDAP_ADSRC_ADDERSDN 2
|
||||
char *ad_attrname;
|
||||
char *ad_value;
|
||||
struct ldap_adddeflist *ad_next;
|
||||
};
|
||||
|
||||
# define NULLADLIST ((struct ldap_adddeflist *)0)
|
||||
#define NULLADLIST ((struct ldap_adddeflist *)0)
|
||||
|
||||
/*
|
||||
* display template global options
|
||||
|
@ -211,17 +210,17 @@ struct ldap_adddeflist {
|
|||
/*
|
||||
* users should be allowed to try to add objects of these entries
|
||||
*/
|
||||
# define LDAP_DTMPL_OPT_ADDABLE 0x00000001L
|
||||
#define LDAP_DTMPL_OPT_ADDABLE 0x00000001L
|
||||
|
||||
/*
|
||||
* users should be allowed to do "modify RDN" operation of these entries
|
||||
*/
|
||||
# define LDAP_DTMPL_OPT_ALLOWMODRDN 0x00000002L
|
||||
#define LDAP_DTMPL_OPT_ALLOWMODRDN 0x00000002L
|
||||
|
||||
/*
|
||||
* this template is an alternate view, not a primary view
|
||||
*/
|
||||
# define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L
|
||||
#define LDAP_DTMPL_OPT_ALTVIEW 0x00000004L
|
||||
|
||||
/*
|
||||
* display template structure
|
||||
|
@ -241,25 +240,24 @@ struct ldap_disptmpl {
|
|||
struct ldap_disptmpl *dt_next;
|
||||
};
|
||||
|
||||
# define NULLDISPTMPL ((struct ldap_disptmpl *)0)
|
||||
#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
|
||||
|
||||
# define LDAP_SET_DISPTMPL_APPDATA(dt, datap) \
|
||||
(dt)->dt_appdata = (void *)(datap)
|
||||
#define LDAP_SET_DISPTMPL_APPDATA(dt, datap) (dt)->dt_appdata = (void *)(datap)
|
||||
|
||||
# define LDAP_GET_DISPTMPL_APPDATA(dt, type) (type)((dt)->dt_appdata)
|
||||
#define LDAP_GET_DISPTMPL_APPDATA(dt, type) (type)((dt)->dt_appdata)
|
||||
|
||||
# define LDAP_IS_DISPTMPL_OPTION_SET(dt, option) \
|
||||
(((dt)->dt_options & option) != 0)
|
||||
#define LDAP_IS_DISPTMPL_OPTION_SET(dt, option) \
|
||||
(((dt)->dt_options & option) != 0)
|
||||
|
||||
# define LDAP_TMPL_ERR_VERSION 1
|
||||
# define LDAP_TMPL_ERR_MEM 2
|
||||
# define LDAP_TMPL_ERR_SYNTAX 3
|
||||
# define LDAP_TMPL_ERR_FILE 4
|
||||
#define LDAP_TMPL_ERR_VERSION 1
|
||||
#define LDAP_TMPL_ERR_MEM 2
|
||||
#define LDAP_TMPL_ERR_SYNTAX 3
|
||||
#define LDAP_TMPL_ERR_FILE 4
|
||||
|
||||
/*
|
||||
* buffer size needed for entry2text and vals2text
|
||||
*/
|
||||
# define LDAP_DTMPL_BUFSIZ 8192
|
||||
#define LDAP_DTMPL_BUFSIZ 8192
|
||||
|
||||
typedef int (*writeptype)(void *writeparm, char *p, int len);
|
||||
|
||||
|
@ -359,7 +357,7 @@ LDAP_API(char *)
|
|||
LDAP_CALL
|
||||
ldap_tmplerr2string(int err);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif /* _DISPTMPL_H */
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
/* lber.h - header file for ber_* functions */
|
||||
#ifndef _LBER_H
|
||||
# define _LBER_H
|
||||
#define _LBER_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# include <stdlib.h> /* to pick up size_t typedef */
|
||||
#include <stdlib.h> /* to pick up size_t typedef */
|
||||
|
||||
/*
|
||||
* Note that LBER_ERROR and LBER_DEFAULT are values that can never appear
|
||||
|
@ -50,45 +50,45 @@ extern "C" {
|
|||
* fact, any tag for which the following is true is invalid:
|
||||
* (( tag & 0x00000080 ) != 0 ) && (( tag & 0xFFFFFF00 ) != 0 )
|
||||
*/
|
||||
# define LBER_ERROR ((ber_tag_t)-1) /* 0xffffffffU */
|
||||
# define LBER_DEFAULT ((ber_tag_t)-1) /* 0xffffffffU */
|
||||
# define LBER_END_OF_SEQORSET ((ber_tag_t)-2) /* 0xfffffffeU */
|
||||
# define LBER_OVERFLOW ((ber_tag_t)-3) /* 0xfffffffdU */
|
||||
#define LBER_ERROR ((ber_tag_t)-1) /* 0xffffffffU */
|
||||
#define LBER_DEFAULT ((ber_tag_t)-1) /* 0xffffffffU */
|
||||
#define LBER_END_OF_SEQORSET ((ber_tag_t)-2) /* 0xfffffffeU */
|
||||
#define LBER_OVERFLOW ((ber_tag_t)-3) /* 0xfffffffdU */
|
||||
|
||||
/* BER classes and mask */
|
||||
# define LBER_CLASS_UNIVERSAL 0x00
|
||||
# define LBER_CLASS_APPLICATION 0x40
|
||||
# define LBER_CLASS_CONTEXT 0x80
|
||||
# define LBER_CLASS_PRIVATE 0xc0
|
||||
# define LBER_CLASS_MASK 0xc0
|
||||
#define LBER_CLASS_UNIVERSAL 0x00
|
||||
#define LBER_CLASS_APPLICATION 0x40
|
||||
#define LBER_CLASS_CONTEXT 0x80
|
||||
#define LBER_CLASS_PRIVATE 0xc0
|
||||
#define LBER_CLASS_MASK 0xc0
|
||||
|
||||
/* BER encoding type and mask */
|
||||
# define LBER_PRIMITIVE 0x00
|
||||
# define LBER_CONSTRUCTED 0x20
|
||||
# define LBER_ENCODING_MASK 0x20
|
||||
#define LBER_PRIMITIVE 0x00
|
||||
#define LBER_CONSTRUCTED 0x20
|
||||
#define LBER_ENCODING_MASK 0x20
|
||||
|
||||
# define LBER_BIG_TAG_MASK 0x1f
|
||||
# define LBER_MORE_TAG_MASK 0x80
|
||||
#define LBER_BIG_TAG_MASK 0x1f
|
||||
#define LBER_MORE_TAG_MASK 0x80
|
||||
|
||||
/* general BER types we know about */
|
||||
# define LBER_BOOLEAN 0x01
|
||||
# define LBER_INTEGER 0x02
|
||||
# define LBER_BITSTRING 0x03
|
||||
# define LBER_OCTETSTRING 0x04
|
||||
# define LBER_NULL 0x05
|
||||
# define LBER_ENUMERATED 0x0a
|
||||
# define LBER_SEQUENCE 0x30
|
||||
# define LBER_SET 0x31
|
||||
#define LBER_BOOLEAN 0x01
|
||||
#define LBER_INTEGER 0x02
|
||||
#define LBER_BITSTRING 0x03
|
||||
#define LBER_OCTETSTRING 0x04
|
||||
#define LBER_NULL 0x05
|
||||
#define LBER_ENUMERATED 0x0a
|
||||
#define LBER_SEQUENCE 0x30
|
||||
#define LBER_SET 0x31
|
||||
|
||||
/* BerElement set/get options */
|
||||
# define LBER_OPT_REMAINING_BYTES 0x01
|
||||
# define LBER_OPT_TOTAL_BYTES 0x02
|
||||
# define LBER_OPT_USE_DER 0x04
|
||||
# define LBER_OPT_TRANSLATE_STRINGS 0x08
|
||||
# define LBER_OPT_BYTES_TO_WRITE 0x10
|
||||
# define LBER_OPT_MEMALLOC_FN_PTRS 0x20
|
||||
# define LBER_OPT_DEBUG_LEVEL 0x40
|
||||
# define LBER_OPT_BUFSIZE 0x80
|
||||
#define LBER_OPT_REMAINING_BYTES 0x01
|
||||
#define LBER_OPT_TOTAL_BYTES 0x02
|
||||
#define LBER_OPT_USE_DER 0x04
|
||||
#define LBER_OPT_TRANSLATE_STRINGS 0x08
|
||||
#define LBER_OPT_BYTES_TO_WRITE 0x10
|
||||
#define LBER_OPT_MEMALLOC_FN_PTRS 0x20
|
||||
#define LBER_OPT_DEBUG_LEVEL 0x40
|
||||
#define LBER_OPT_BUFSIZE 0x80
|
||||
|
||||
/*
|
||||
* LBER_USE_DER is defined for compatibility with the C LDAP API RFC.
|
||||
|
@ -97,23 +97,23 @@ extern "C" {
|
|||
* ber_init_w_nullchar() only. Callers of ber_set_option() or
|
||||
* ber_get_option() must use LBER_OPT_USE_DER instead. Sorry!
|
||||
*/
|
||||
# define LBER_USE_DER 0x01
|
||||
#define LBER_USE_DER 0x01
|
||||
|
||||
/* Sockbuf set/get options */
|
||||
# define LBER_SOCKBUF_OPT_TO_FILE 0x001
|
||||
# define LBER_SOCKBUF_OPT_TO_FILE_ONLY 0x002
|
||||
# define LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE 0x004
|
||||
# define LBER_SOCKBUF_OPT_NO_READ_AHEAD 0x008
|
||||
# define LBER_SOCKBUF_OPT_DESC 0x010
|
||||
# define LBER_SOCKBUF_OPT_COPYDESC 0x020
|
||||
# define LBER_SOCKBUF_OPT_READ_FN 0x040
|
||||
# define LBER_SOCKBUF_OPT_WRITE_FN 0x080
|
||||
# define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100
|
||||
# define LBER_SOCKBUF_OPT_VALID_TAG 0x200
|
||||
# define LBER_SOCKBUF_OPT_SOCK_ARG 0x400
|
||||
#define LBER_SOCKBUF_OPT_TO_FILE 0x001
|
||||
#define LBER_SOCKBUF_OPT_TO_FILE_ONLY 0x002
|
||||
#define LBER_SOCKBUF_OPT_MAX_INCOMING_SIZE 0x004
|
||||
#define LBER_SOCKBUF_OPT_NO_READ_AHEAD 0x008
|
||||
#define LBER_SOCKBUF_OPT_DESC 0x010
|
||||
#define LBER_SOCKBUF_OPT_COPYDESC 0x020
|
||||
#define LBER_SOCKBUF_OPT_READ_FN 0x040
|
||||
#define LBER_SOCKBUF_OPT_WRITE_FN 0x080
|
||||
#define LBER_SOCKBUF_OPT_EXT_IO_FNS 0x100
|
||||
#define LBER_SOCKBUF_OPT_VALID_TAG 0x200
|
||||
#define LBER_SOCKBUF_OPT_SOCK_ARG 0x400
|
||||
|
||||
# define LBER_OPT_ON ((void *)1)
|
||||
# define LBER_OPT_OFF ((void *)0)
|
||||
#define LBER_OPT_ON ((void *)1)
|
||||
#define LBER_OPT_OFF ((void *)0)
|
||||
|
||||
typedef unsigned int ber_len_t; /* for BER len */
|
||||
typedef unsigned int ber_tag_t; /* for BER tags */
|
||||
|
@ -130,48 +130,48 @@ typedef struct berelement BerElement;
|
|||
typedef struct sockbuf Sockbuf;
|
||||
typedef int (*BERTranslateProc)(char **bufp, ber_uint_t *buflenp,
|
||||
int free_input);
|
||||
# ifndef macintosh
|
||||
# if defined(_WINDOWS) || defined(_WIN32) || defined(_CONSOLE)
|
||||
# include <winsock.h> /* for SOCKET */
|
||||
#ifndef macintosh
|
||||
# if defined(_WINDOWS) || defined(_WIN32) || defined(_CONSOLE)
|
||||
# include <winsock.h> /* for SOCKET */
|
||||
typedef SOCKET LBER_SOCKET;
|
||||
# else
|
||||
# else
|
||||
typedef long LBER_SOCKET;
|
||||
# endif /* _WINDOWS */
|
||||
# else /* macintosh */
|
||||
# endif /* _WINDOWS */
|
||||
#else /* macintosh */
|
||||
typedef void *LBER_SOCKET;
|
||||
# endif /* macintosh */
|
||||
#endif /* macintosh */
|
||||
|
||||
/* calling conventions used by library */
|
||||
# ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
#ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
# endif /* LDAP_CALL */
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
#endif /* LDAP_CALL */
|
||||
|
||||
/*
|
||||
* function prototypes for lber library
|
||||
*/
|
||||
|
||||
# ifndef LDAP_API
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_API(rt) rt
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_API(rt) rt
|
||||
# endif /* _WINDOWS */
|
||||
# endif /* LDAP_API */
|
||||
#ifndef LDAP_API
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_API(rt) rt
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_API(rt) rt
|
||||
# endif /* _WINDOWS */
|
||||
#endif /* LDAP_API */
|
||||
|
||||
struct lextiof_socket_private; /* Defined by the extended I/O */
|
||||
/* callback functions */
|
||||
|
@ -214,7 +214,7 @@ struct lber_x_ext_io_fns {
|
|||
struct lextiof_socket_private *lbextiofn_socket_arg;
|
||||
LDAP_X_EXTIOF_WRITEV_CALLBACK *lbextiofn_writev;
|
||||
};
|
||||
# define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns)
|
||||
#define LBER_X_EXTIO_FNS_SIZE sizeof(struct lber_x_ext_io_fns)
|
||||
|
||||
/*
|
||||
* liblber memory allocation callback functions. These are global to all
|
||||
|
@ -334,7 +334,7 @@ LDAP_CALL ber_sockbuf_set_option(Sockbuf *sb, int option, void *value);
|
|||
LDAP_API(int)
|
||||
LDAP_CALL ber_sockbuf_get_option(Sockbuf *sb, int option, void *value);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif /* _LBER_H */
|
||||
|
|
|
@ -37,31 +37,31 @@
|
|||
|
||||
/* lcache.h - ldap persistent cache */
|
||||
#ifndef _LCACHE_H
|
||||
# define _LCACHE_H
|
||||
#define _LCACHE_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling conventions used by library */
|
||||
# ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
#ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
# endif /* LDAP_CALL */
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
#endif /* LDAP_CALL */
|
||||
|
||||
LDAP_API(int) LDAP_C lcache_init(LDAP *ld, void *arg);
|
||||
LDAP_API(int)
|
||||
|
@ -95,8 +95,8 @@ LDAP_C lcache_result(LDAP *ld, int msgid, int all, struct timeval *timeout,
|
|||
LDAPMessage **result);
|
||||
LDAP_API(int) LDAP_C lcache_flush(LDAP *ld, char *dn, char *filter);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _LCACHE_H */
|
||||
|
|
|
@ -50,31 +50,31 @@
|
|||
*/
|
||||
|
||||
#ifndef _SRCHPREF_H
|
||||
# define _SRCHPREF_H
|
||||
#define _SRCHPREF_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* calling conventions used by library */
|
||||
# ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
#ifndef LDAP_CALL
|
||||
# if defined(_WINDOWS) || defined(_WIN32)
|
||||
# define LDAP_C __cdecl
|
||||
# ifndef _WIN32
|
||||
# define __stdcall _far _pascal
|
||||
# define LDAP_CALLBACK _loadds
|
||||
# else
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
# endif /* LDAP_CALL */
|
||||
# endif /* _WIN32 */
|
||||
# define LDAP_PASCAL __stdcall
|
||||
# define LDAP_CALL LDAP_PASCAL
|
||||
# else /* _WINDOWS */
|
||||
# define LDAP_C
|
||||
# define LDAP_CALLBACK
|
||||
# define LDAP_PASCAL
|
||||
# define LDAP_CALL
|
||||
# endif /* _WINDOWS */
|
||||
#endif /* LDAP_CALL */
|
||||
|
||||
struct ldap_searchattr {
|
||||
char *sa_attrlabel;
|
||||
|
@ -106,23 +106,23 @@ struct ldap_searchobj {
|
|||
struct ldap_searchobj *so_next;
|
||||
};
|
||||
|
||||
# define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
|
||||
#define NULLSEARCHOBJ ((struct ldap_searchobj *)0)
|
||||
|
||||
/*
|
||||
* global search object options
|
||||
*/
|
||||
# define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
|
||||
#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
|
||||
|
||||
# define LDAP_IS_SEARCHOBJ_OPTION_SET(so, option) \
|
||||
(((so)->so_options & option) != 0)
|
||||
#define LDAP_IS_SEARCHOBJ_OPTION_SET(so, option) \
|
||||
(((so)->so_options & option) != 0)
|
||||
|
||||
# define LDAP_SEARCHPREF_VERSION_ZERO 0
|
||||
# define LDAP_SEARCHPREF_VERSION 1
|
||||
#define LDAP_SEARCHPREF_VERSION_ZERO 0
|
||||
#define LDAP_SEARCHPREF_VERSION 1
|
||||
|
||||
# define LDAP_SEARCHPREF_ERR_VERSION 1
|
||||
# define LDAP_SEARCHPREF_ERR_MEM 2
|
||||
# define LDAP_SEARCHPREF_ERR_SYNTAX 3
|
||||
# define LDAP_SEARCHPREF_ERR_FILE 4
|
||||
#define LDAP_SEARCHPREF_ERR_VERSION 1
|
||||
#define LDAP_SEARCHPREF_ERR_MEM 2
|
||||
#define LDAP_SEARCHPREF_ERR_SYNTAX 3
|
||||
#define LDAP_SEARCHPREF_ERR_FILE 4
|
||||
|
||||
LDAP_API(int)
|
||||
LDAP_CALL
|
||||
|
@ -145,7 +145,7 @@ LDAP_API(struct ldap_searchobj *)
|
|||
LDAP_CALL
|
||||
ldap_next_searchobj(struct ldap_searchobj *sollist, struct ldap_searchobj *so);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif /* _SRCHPREF_H */
|
||||
|
|
Загрузка…
Ссылка в новой задаче