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
David Barchiesi
OpenLDAP
Commits
0b5691f1
Commit
0b5691f1
authored
21 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
cleanup previous commit; update header
parent
a004061c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/lutil.h
+3
-1
3 additions, 1 deletion
include/lutil.h
libraries/liblutil/utils.c
+7
-9
7 additions, 9 deletions
libraries/liblutil/utils.c
with
10 additions
and
10 deletions
include/lutil.h
+
3
−
1
View file @
0b5691f1
...
...
@@ -149,8 +149,10 @@ struct tm;
/* use this macro to statically allocate buffer for lutil_gentime */
#define LDAP_LUTIL_GENTIME_BUFSIZE 22
#define lutil_gentime(s,m,t) lutil_localtime((s),(m),(t),0)
LDAP_LUTIL_F
(
size_t
)
lutil_gentime
LDAP_P
((
char
*
s
,
size_t
max
,
const
struct
tm
*
tm
));
lutil_localtime
LDAP_P
((
char
*
s
,
size_t
smax
,
const
struct
tm
*
tm
,
long
delta
));
#ifndef HAVE_MKSTEMP
LDAP_LUTIL_F
(
int
)
...
...
This diff is collapsed.
Click to expand it.
libraries/liblutil/utils.c
+
7
−
9
View file @
0b5691f1
...
...
@@ -46,9 +46,9 @@ char* lutil_progname( const char* name, int argc, char *argv[] )
return
progname
;
}
#if 0
size_t lutil_gentime( char *s, size_t smax, const struct tm *tm )
{
#if 0
size_t ret;
#ifdef HAVE_EBCDIC
/* We've been compiling in ASCII so far, but we want EBCDIC now since
...
...
@@ -62,18 +62,16 @@ size_t lutil_gentime( char *s, size_t smax, const struct tm *tm )
__etoa( s );
#endif
return ret;
#else
return
lutil_localtime
(
s
,
smax
,
tm
,
0
);
#endif
}
#endif
size_t
lutil_localtime
(
char
*
s
,
size_t
smax
,
const
struct
tm
*
tm
,
long
delta
)
{
size_t
ret
;
char
*
p
;
if
(
smax
<
20
)
{
return
-
1
;
if
(
smax
<
16
)
{
/* YYYYmmddHHMMSSZ */
return
0
;
}
#ifdef HAVE_EBCDIC
...
...
@@ -83,12 +81,12 @@ size_t lutil_localtime( char *s, size_t smax, const struct tm *tm, long delta )
#pragma convlit(suspend)
#endif
ret
=
strftime
(
s
,
smax
,
"%Y%m%d%H%M%SZ"
,
tm
);
if
(
ret
==
0
)
{
if
(
delta
==
0
||
ret
==
0
)
{
return
ret
;
}
if
(
delta
==
0
)
{
return
ret
;
if
(
smax
<
20
)
{
/* YYYYmmddHHMMSS+HHMM */
return
0
;
}
p
=
s
+
14
;
...
...
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