Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
ea85bcad
Commit
ea85bcad
authored
19 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
remove #defines moved to frontend
parent
18714cee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-monitor/proto-back-monitor.h
+0
-52
0 additions, 52 deletions
servers/slapd/back-monitor/proto-back-monitor.h
with
0 additions
and
52 deletions
servers/slapd/back-monitor/proto-back-monitor.h
+
0
−
52
View file @
ea85bcad
...
...
@@ -268,58 +268,6 @@ monitor_subsys_rww_update LDAP_P((
SlapReply
*
rs
,
Entry
*
e
));
/* NOTE: this macro assumes that bv has been allocated
* by ber_* malloc functions or is { 0L, NULL } */
#if defined(HAVE_BIGNUM)
#define UI2BV(bv,ui) \
do { \
char *val; \
ber_len_t len; \
val = BN_bn2dec(ui); \
if (val) { \
len = strlen(val); \
if ( len > (bv)->bv_len ) { \
(bv)->bv_val = ber_memrealloc( (bv)->bv_val, len + 1 ); \
} \
AC_MEMCPY((bv)->bv_val, val, len + 1); \
(bv)->bv_len = len; \
OPENSSL_free(val); \
} else { \
ber_memfree( (bv)->bv_val ); \
BER_BVZERO( (bv) ); \
} \
} while ( 0 )
#elif defined(HAVE_GMP)
/* NOTE: according to the documentation, the result
* of mpz_sizeinbase() can exceed the length of the
* string representation of the number by 1
*/
#define UI2BV(bv,ui) \
do { \
ber_len_t len = mpz_sizeinbase( (ui), 10 ); \
if ( len > (bv)->bv_len ) { \
(bv)->bv_val = ber_memrealloc( (bv)->bv_val, len + 1 ); \
} \
(void)mpz_get_str( (bv)->bv_val, 10, (ui) ); \
if ( (bv)->bv_val[ len - 1 ] == '\0' ) { \
len--; \
} \
(bv)->bv_len = len; \
} while ( 0 )
#else
/* ! HAVE_BIGNUM && ! HAVE_GMP */
#define UI2BV(bv,ui) \
do { \
char buf[] = "+9223372036854775807L"; \
ber_len_t len; \
snprintf( buf, sizeof( buf ), "%lu", (ui) ); \
len = strlen( buf ); \
if ( len > (bv)->bv_len ) { \
(bv)->bv_val = ber_memrealloc( (bv)->bv_val, len + 1 ); \
} \
AC_MEMCPY( (bv)->bv_val, buf, len + 1 ); \
} while ( 0 )
#endif
/* ! HAVE_GMP */
/*
* former external.h
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment