Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include
File: ldap_cdefs.h
/* $OpenLDAP$ */
[0] Fix | Delete
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
[1] Fix | Delete
*
[2] Fix | Delete
* Copyright 1998-2018 The OpenLDAP Foundation.
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted only as authorized by the OpenLDAP
[7] Fix | Delete
* Public License.
[8] Fix | Delete
*
[9] Fix | Delete
* A copy of this license is available in file LICENSE in the
[10] Fix | Delete
* top-level directory of the distribution or, alternatively, at
[11] Fix | Delete
* <http://www.OpenLDAP.org/license.html>.
[12] Fix | Delete
*/
[13] Fix | Delete
/* LDAP C Defines */
[14] Fix | Delete
[15] Fix | Delete
#ifndef _LDAP_CDEFS_H
[16] Fix | Delete
#define _LDAP_CDEFS_H
[17] Fix | Delete
[18] Fix | Delete
#if defined(__cplusplus) || defined(c_plusplus)
[19] Fix | Delete
# define LDAP_BEGIN_DECL extern "C" {
[20] Fix | Delete
# define LDAP_END_DECL }
[21] Fix | Delete
#else
[22] Fix | Delete
# define LDAP_BEGIN_DECL /* begin declarations */
[23] Fix | Delete
# define LDAP_END_DECL /* end declarations */
[24] Fix | Delete
#endif
[25] Fix | Delete
[26] Fix | Delete
#if !defined(LDAP_NO_PROTOTYPES) && ( defined(LDAP_NEEDS_PROTOTYPES) || \
[27] Fix | Delete
defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) )
[28] Fix | Delete
[29] Fix | Delete
/* ANSI C or C++ */
[30] Fix | Delete
# define LDAP_P(protos) protos
[31] Fix | Delete
# define LDAP_CONCAT1(x,y) x ## y
[32] Fix | Delete
# define LDAP_CONCAT(x,y) LDAP_CONCAT1(x,y)
[33] Fix | Delete
# define LDAP_STRING(x) #x /* stringify without expanding x */
[34] Fix | Delete
# define LDAP_XSTRING(x) LDAP_STRING(x) /* expand x, then stringify */
[35] Fix | Delete
[36] Fix | Delete
#ifndef LDAP_CONST
[37] Fix | Delete
# define LDAP_CONST const
[38] Fix | Delete
#endif
[39] Fix | Delete
[40] Fix | Delete
#else /* no prototypes */
[41] Fix | Delete
[42] Fix | Delete
/* traditional C */
[43] Fix | Delete
# define LDAP_P(protos) ()
[44] Fix | Delete
# define LDAP_CONCAT(x,y) x/**/y
[45] Fix | Delete
# define LDAP_STRING(x) "x"
[46] Fix | Delete
[47] Fix | Delete
#ifndef LDAP_CONST
[48] Fix | Delete
# define LDAP_CONST /* no const */
[49] Fix | Delete
#endif
[50] Fix | Delete
[51] Fix | Delete
#endif /* no prototypes */
[52] Fix | Delete
[53] Fix | Delete
#if (__GNUC__) * 1000 + (__GNUC_MINOR__) >= 2006
[54] Fix | Delete
# define LDAP_GCCATTR(attrs) __attribute__(attrs)
[55] Fix | Delete
#else
[56] Fix | Delete
# define LDAP_GCCATTR(attrs)
[57] Fix | Delete
#endif
[58] Fix | Delete
[59] Fix | Delete
/*
[60] Fix | Delete
* Support for Windows DLLs.
[61] Fix | Delete
*
[62] Fix | Delete
* When external source code includes header files for dynamic libraries,
[63] Fix | Delete
* the external source code is "importing" DLL symbols into its resulting
[64] Fix | Delete
* object code. On Windows, symbols imported from DLLs must be explicitly
[65] Fix | Delete
* indicated in header files with the __declspec(dllimport) directive.
[66] Fix | Delete
* This is not totally necessary for functions because the compiler
[67] Fix | Delete
* (gcc or MSVC) will generate stubs when this directive is absent.
[68] Fix | Delete
* However, this is required for imported variables.
[69] Fix | Delete
*
[70] Fix | Delete
* The LDAP libraries, i.e. liblber and libldap, can be built as
[71] Fix | Delete
* static or shared, based on configuration. Just about all other source
[72] Fix | Delete
* code in OpenLDAP use these libraries. If the LDAP libraries
[73] Fix | Delete
* are configured as shared, 'configure' defines the LDAP_LIBS_DYNAMIC
[74] Fix | Delete
* macro. When other source files include LDAP library headers, the
[75] Fix | Delete
* LDAP library symbols will automatically be marked as imported. When
[76] Fix | Delete
* the actual LDAP libraries are being built, the symbols will not
[77] Fix | Delete
* be marked as imported because the LBER_LIBRARY or LDAP_LIBRARY macros
[78] Fix | Delete
* will be respectively defined.
[79] Fix | Delete
*
[80] Fix | Delete
* Any project outside of OpenLDAP with source code wanting to use
[81] Fix | Delete
* LDAP dynamic libraries should explicitly define LDAP_LIBS_DYNAMIC.
[82] Fix | Delete
* This will ensure that external source code appropriately marks symbols
[83] Fix | Delete
* that will be imported.
[84] Fix | Delete
*
[85] Fix | Delete
* The slapd executable, itself, can be used as a dynamic library.
[86] Fix | Delete
* For example, if a backend module is compiled as shared, it will
[87] Fix | Delete
* import symbols from slapd. When this happens, the slapd symbols
[88] Fix | Delete
* must be marked as imported in header files that the backend module
[89] Fix | Delete
* includes. Remember that slapd links with various static libraries.
[90] Fix | Delete
* If the LDAP libraries were configured as static, their object
[91] Fix | Delete
* code is also part of the monolithic slapd executable. Thus, when
[92] Fix | Delete
* a backend module imports symbols from slapd, it imports symbols from
[93] Fix | Delete
* all of the static libraries in slapd as well. Thus, the SLAP_IMPORT
[94] Fix | Delete
* macro, when defined, will appropriately mark symbols as imported.
[95] Fix | Delete
* This macro should be used by shared backend modules as well as any
[96] Fix | Delete
* other external source code that imports symbols from the slapd
[97] Fix | Delete
* executable as if it were a DLL.
[98] Fix | Delete
*
[99] Fix | Delete
* Note that we don't actually have to worry about using the
[100] Fix | Delete
* __declspec(dllexport) directive anywhere. This is because both
[101] Fix | Delete
* MSVC and Mingw provide alternate (more effective) methods for exporting
[102] Fix | Delete
* symbols out of binaries, i.e. the use of a DEF file.
[103] Fix | Delete
*
[104] Fix | Delete
* NOTE ABOUT BACKENDS: Backends can be configured as static or dynamic.
[105] Fix | Delete
* When a backend is configured as dynamic, slapd will load the backend
[106] Fix | Delete
* explicitly and populate function pointer structures by calling
[107] Fix | Delete
* the backend's well-known initialization function. Because of this
[108] Fix | Delete
* procedure, slapd never implicitly imports symbols from dynamic backends.
[109] Fix | Delete
* This makes it unnecessary to tag various backend functions with the
[110] Fix | Delete
* __declspec(dllimport) directive. This is because neither slapd nor
[111] Fix | Delete
* any other external binary should ever be implicitly loading a backend
[112] Fix | Delete
* dynamic module.
[113] Fix | Delete
*
[114] Fix | Delete
* Backends are supposed to be self-contained. However, it appears that
[115] Fix | Delete
* back-meta DOES implicitly import symbols from back-ldap. This means
[116] Fix | Delete
* that the __declspec(dllimport) directive should be marked on back-ldap
[117] Fix | Delete
* functions (in its header files) if and only if we're compiling for
[118] Fix | Delete
* windows AND back-ldap has been configured as dynamic AND back-meta
[119] Fix | Delete
* is the client of back-ldap. When client is slapd, there is no effect
[120] Fix | Delete
* since slapd does not implicitly import symbols.
[121] Fix | Delete
*
[122] Fix | Delete
* TODO(?): Currently, back-meta nor back-ldap is supported for Mingw32.
[123] Fix | Delete
* Thus, there's no need to worry about this right now. This is something that
[124] Fix | Delete
* may or may not have to be addressed in the future.
[125] Fix | Delete
*/
[126] Fix | Delete
[127] Fix | Delete
/* LBER library */
[128] Fix | Delete
#if defined(_WIN32) && \
[129] Fix | Delete
((defined(LDAP_LIBS_DYNAMIC) && !defined(LBER_LIBRARY)) || \
[130] Fix | Delete
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
[131] Fix | Delete
# define LBER_F(type) extern __declspec(dllimport) type
[132] Fix | Delete
# define LBER_V(type) extern __declspec(dllimport) type
[133] Fix | Delete
#else
[134] Fix | Delete
# define LBER_F(type) extern type
[135] Fix | Delete
# define LBER_V(type) extern type
[136] Fix | Delete
#endif
[137] Fix | Delete
[138] Fix | Delete
/* LDAP library */
[139] Fix | Delete
#if defined(_WIN32) && \
[140] Fix | Delete
((defined(LDAP_LIBS_DYNAMIC) && !defined(LDAP_LIBRARY)) || \
[141] Fix | Delete
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
[142] Fix | Delete
# define LDAP_F(type) extern __declspec(dllimport) type
[143] Fix | Delete
# define LDAP_V(type) extern __declspec(dllimport) type
[144] Fix | Delete
#else
[145] Fix | Delete
# define LDAP_F(type) extern type
[146] Fix | Delete
# define LDAP_V(type) extern type
[147] Fix | Delete
#endif
[148] Fix | Delete
[149] Fix | Delete
/* AVL library */
[150] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[151] Fix | Delete
# define LDAP_AVL_F(type) extern __declspec(dllimport) type
[152] Fix | Delete
# define LDAP_AVL_V(type) extern __declspec(dllimport) type
[153] Fix | Delete
#else
[154] Fix | Delete
# define LDAP_AVL_F(type) extern type
[155] Fix | Delete
# define LDAP_AVL_V(type) extern type
[156] Fix | Delete
#endif
[157] Fix | Delete
[158] Fix | Delete
/* LDIF library */
[159] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[160] Fix | Delete
# define LDAP_LDIF_F(type) extern __declspec(dllimport) type
[161] Fix | Delete
# define LDAP_LDIF_V(type) extern __declspec(dllimport) type
[162] Fix | Delete
#else
[163] Fix | Delete
# define LDAP_LDIF_F(type) extern type
[164] Fix | Delete
# define LDAP_LDIF_V(type) extern type
[165] Fix | Delete
#endif
[166] Fix | Delete
[167] Fix | Delete
/* LUNICODE library */
[168] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[169] Fix | Delete
# define LDAP_LUNICODE_F(type) extern __declspec(dllimport) type
[170] Fix | Delete
# define LDAP_LUNICODE_V(type) extern __declspec(dllimport) type
[171] Fix | Delete
#else
[172] Fix | Delete
# define LDAP_LUNICODE_F(type) extern type
[173] Fix | Delete
# define LDAP_LUNICODE_V(type) extern type
[174] Fix | Delete
#endif
[175] Fix | Delete
[176] Fix | Delete
/* LUTIL library */
[177] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[178] Fix | Delete
# define LDAP_LUTIL_F(type) extern __declspec(dllimport) type
[179] Fix | Delete
# define LDAP_LUTIL_V(type) extern __declspec(dllimport) type
[180] Fix | Delete
#else
[181] Fix | Delete
# define LDAP_LUTIL_F(type) extern type
[182] Fix | Delete
# define LDAP_LUTIL_V(type) extern type
[183] Fix | Delete
#endif
[184] Fix | Delete
[185] Fix | Delete
/* REWRITE library */
[186] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[187] Fix | Delete
# define LDAP_REWRITE_F(type) extern __declspec(dllimport) type
[188] Fix | Delete
# define LDAP_REWRITE_V(type) extern __declspec(dllimport) type
[189] Fix | Delete
#else
[190] Fix | Delete
# define LDAP_REWRITE_F(type) extern type
[191] Fix | Delete
# define LDAP_REWRITE_V(type) extern type
[192] Fix | Delete
#endif
[193] Fix | Delete
[194] Fix | Delete
/* SLAPD (as a dynamic library exporting symbols) */
[195] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[196] Fix | Delete
# define LDAP_SLAPD_F(type) extern __declspec(dllimport) type
[197] Fix | Delete
# define LDAP_SLAPD_V(type) extern __declspec(dllimport) type
[198] Fix | Delete
#else
[199] Fix | Delete
# define LDAP_SLAPD_F(type) extern type
[200] Fix | Delete
# define LDAP_SLAPD_V(type) extern type
[201] Fix | Delete
#endif
[202] Fix | Delete
[203] Fix | Delete
/* SLAPD (as a dynamic library exporting symbols) */
[204] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[205] Fix | Delete
# define LDAP_SLAPI_F(type) extern __declspec(dllimport) type
[206] Fix | Delete
# define LDAP_SLAPI_V(type) extern __declspec(dllimport) type
[207] Fix | Delete
#else
[208] Fix | Delete
# define LDAP_SLAPI_F(type) extern type
[209] Fix | Delete
# define LDAP_SLAPI_V(type) extern type
[210] Fix | Delete
#endif
[211] Fix | Delete
[212] Fix | Delete
/* SLAPD (as a dynamic library exporting symbols) */
[213] Fix | Delete
#if defined(_WIN32) && defined(SLAPD_IMPORT)
[214] Fix | Delete
# define SLAPI_F(type) extern __declspec(dllimport) type
[215] Fix | Delete
# define SLAPI_V(type) extern __declspec(dllimport) type
[216] Fix | Delete
#else
[217] Fix | Delete
# define SLAPI_F(type) extern type
[218] Fix | Delete
# define SLAPI_V(type) extern type
[219] Fix | Delete
#endif
[220] Fix | Delete
[221] Fix | Delete
/*
[222] Fix | Delete
* C library. Mingw32 links with the dynamic C run-time library by default,
[223] Fix | Delete
* so the explicit definition of CSTATIC will keep dllimport from
[224] Fix | Delete
* being defined, if desired.
[225] Fix | Delete
*
[226] Fix | Delete
* MSVC defines the _DLL macro when the compiler is invoked with /MD or /MDd,
[227] Fix | Delete
* which means the resulting object code will be linked with the dynamic
[228] Fix | Delete
* C run-time library.
[229] Fix | Delete
*
[230] Fix | Delete
* Technically, it shouldn't be necessary to redefine any functions that
[231] Fix | Delete
* the headers for the C library should already contain. Nevertheless, this
[232] Fix | Delete
* is here as a safe-guard.
[233] Fix | Delete
*
[234] Fix | Delete
* TODO: Determine if these macros ever get expanded for Windows. If not,
[235] Fix | Delete
* the declspec expansion can probably be removed.
[236] Fix | Delete
*/
[237] Fix | Delete
#if (defined(__MINGW32__) && !defined(CSTATIC)) || \
[238] Fix | Delete
(defined(_MSC_VER) && defined(_DLL))
[239] Fix | Delete
# define LDAP_LIBC_F(type) extern __declspec(dllimport) type
[240] Fix | Delete
# define LDAP_LIBC_V(type) extern __declspec(dllimport) type
[241] Fix | Delete
#else
[242] Fix | Delete
# define LDAP_LIBC_F(type) extern type
[243] Fix | Delete
# define LDAP_LIBC_V(type) extern type
[244] Fix | Delete
#endif
[245] Fix | Delete
[246] Fix | Delete
#endif /* _LDAP_CDEFS_H */
[247] Fix | Delete
[248] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function