Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
05c4d8f7
Commit
05c4d8f7
authored
Jul 11, 2007
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress a warning that some versions of gcc emit about %x in strftime.
Per suggestion from Alvaro.
parent
31013db0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+9
-2
No files found.
src/bin/initdb/initdb.c
View file @
05c4d8f7
...
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.13
7 2007/05/31 15:13:03 petere
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.13
8 2007/07/11 23:15:38 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -2155,6 +2155,13 @@ escape_quotes(const char *src)
return
result
;
}
/* Hack to suppress a warning about %x from some versions of gcc */
static
inline
size_t
my_strftime
(
char
*
s
,
size_t
max
,
const
char
*
fmt
,
const
struct
tm
*
tm
)
{
return
strftime
(
s
,
max
,
fmt
,
tm
);
}
/*
* Determine likely date order from locale
*/
...
...
@@ -2184,7 +2191,7 @@ locale_date_order(const char *locale)
testtime
.
tm_mon
=
10
;
/* November, should come out as "11" */
testtime
.
tm_year
=
133
;
/* 2033 */
res
=
strftime
(
buf
,
sizeof
(
buf
),
"%x"
,
&
testtime
);
res
=
my_
strftime
(
buf
,
sizeof
(
buf
),
"%x"
,
&
testtime
);
setlocale
(
LC_TIME
,
save
);
free
(
save
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment