File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 42
42
* Portions Copyright (c) 1994, Regents of the University of California
43
43
* Portions taken from FreeBSD.
44
44
*
45
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.137 2007/05/31 15:13:03 petere Exp $
45
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.138 2007/07/11 23: 15:38 tgl Exp $
46
46
*
47
47
*-------------------------------------------------------------------------
48
48
*/
@@ -2155,6 +2155,13 @@ escape_quotes(const char *src)
2155
2155
return result ;
2156
2156
}
2157
2157
2158
+ /* Hack to suppress a warning about %x from some versions of gcc */
2159
+ static inline size_t
2160
+ my_strftime (char * s , size_t max , const char * fmt , const struct tm * tm )
2161
+ {
2162
+ return strftime (s , max , fmt , tm );
2163
+ }
2164
+
2158
2165
/*
2159
2166
* Determine likely date order from locale
2160
2167
*/
@@ -2184,7 +2191,7 @@ locale_date_order(const char *locale)
2184
2191
testtime .tm_mon = 10 ; /* November, should come out as "11" */
2185
2192
testtime .tm_year = 133 ; /* 2033 */
2186
2193
2187
- res = strftime (buf , sizeof (buf ), "%x" , & testtime );
2194
+ res = my_strftime (buf , sizeof (buf ), "%x" , & testtime );
2188
2195
2189
2196
setlocale (LC_TIME , save );
2190
2197
free (save );
You can’t perform that action at this time.
0 commit comments