index e5a3ca26f42e0b9474261313db8e391f36e31fa9..10c5b4bfb5b55e517383ec2698527ac26f3e74b1 100644 (file)
if (nfields == 0)
{
if (name == leapsec && *buf == '#')
- sscanf(buf, "#expires " INT64_FORMAT, &comment_leapexpires);
+ {
+ /*
+ * PG: INT64_FORMAT isn't portable for sscanf, so be content
+ * with scanning a "long". Once we are requiring C99 in all
+ * live branches, it'd be sensible to adopt upstream's
+ * practice of using the <inttypes.h> macros. But for now, we
+ * don't actually use this code, and it won't overflow before
+ * 2038 anyway.
+ */
+ long cl_tmp;
+
+ sscanf(buf, "#expires %ld", &cl_tmp);
+ comment_leapexpires = cl_tmp;
+ }
}
else if (wantcont)
{